This module provides the regular expression compiler. Its public predicates are listed below.
This section lists the predicates defined by this module.
File is assumed to contain auxiliary regular expression operators. It is loaded in module fsa_regex_aux and will be used for compiling regular expressions.
Note that your file with definitions of regular expression operators is compiled with the special Prolog-syntax operators for regular expression notation loaded. Thus you can use * .. & etc. in your definitions. Drawback is that you cannot use operator notation for e.g. the is/2 predicate.
A typical auxiliary definition will be:
macro(vowel,{a,e,i,o,u}).
A slightly more interesting one:
macro(free(Expr), ~ $ Expr).
You can also explicitly construct an automaton yourself, e.g.:
rx(my_operator(Expr),Fa) :-
fsa_regex:rx(Expr,Fa0),
my_operator_definition(Fa0,Fa).
so you can call fsa_regex:rx/2 for further compilations.
File is assumed to contain auxiliary regular expression operators. It is reconsulted in module fsa_regex_aux and will be used for compiling regular expressions. Normally you want to use fsa_load_aux_file instead. Use this predicate if you need to debug your Prolog definitions in File.
RegexAtom is parsed as a regular expression. This expression is compiled to a finite automaton which is written to File.
RegexAtom is parsed as a regular expression. This expression is compiled to a finite automaton Fa.
A regular expression is read-in from standard input. The expression is compiled and the resulting automaton is saved in file File.
A regular expression is read-in from standard input. The expression is compiled into an automaton Fa.
The regular expression Expr (ground Prolog term) is compiled into an automaton. The automaton is saved into File.
Term is a regular expression. It is compiled into the automaton Fa. The first form is typically used for a new regular expression compilation, whereas the second form is used for embedded compilations (called from user definitions). The only difference is that during debugging the depth of recursion is set to zero for the first form.