35extern short symbolic_count;
42extern char** symbolic_names;
235regexp* reg_var_symbolic(
char* s, uchar number);
Macros and functions to help memory allocation.
Macros for displaying error messages.
regexp * reg_letter_symbolic(uchar c, uchar number)
Computes a regular expression corresponding to the symbolic letter a_{i+k}.
Definition regexp.c:226
regexp * reg_inter(regexp *, regexp *)
Combines two regular expressions with the intersection operator.
Definition regexp.c:288
regexp * reg_star(regexp *)
Applies the Kleene star operator to a regular expression.
Definition regexp.c:368
regexp * reg_letter(uchar)
Computes a regular expression recognizing the language {a} for an input letter a.
Definition regexp.c:204
regexp * reg_epsilon(void)
Computes a regular expression recognizing the language {ε}.
Definition regexp.c:199
regexp * reg_empty(void)
Computes a regular expression recognizing the empty language.
Definition regexp.c:194
regexp * reg_copy(regexp *)
Copy of a regular expression.
Definition regexp.c:120
regexp * reg_union(regexp *, regexp *)
Combines two regular expressions with the union operator.
Definition regexp.c:266
regexp * reg_complement(regexp *)
Applies the complement operator to a regular expression.
Definition regexp.c:397
regexp * reg_plus(regexp *)
Applies the Kleene plus operator to a regular expression.
Definition regexp.c:383
regexp * reg_letter_ext(letter)
Computes a regular expression recognizing the language {a} for an input letter a. Extended version.
Definition regexp.c:213
void reg_print(regexp *)
Displays a regular expression on the standard output stream.
Definition regexp.c:519
short symbolic_index(char *)
Computes the index of a symbolic variable name in the array symbolic_names.
Definition regexp.c:6
regelem
The operator available in an extended regular expression.
Definition regexp.h:103
@ COMPLEMENT
Complement of an expression.
Definition regexp.h:112
@ EPSILON
Empty word.
Definition regexp.h:105
@ SYCHAR
Symbolic letter.
Definition regexp.h:107
@ EMPTY
Empty language.
Definition regexp.h:104
@ CHAR
Single letter.
Definition regexp.h:106
@ WORD
Single word.
Definition regexp.h:109
@ UNION
Union of two expressions.
Definition regexp.h:110
@ INTER
Intersection of two expressions.
Definition regexp.h:111
@ PLUS
Kleene plus of an expression.
Definition regexp.h:115
@ CONCAT
Concatenation of two expressions.
Definition regexp.h:113
@ STAR
Kleene star of an expression.
Definition regexp.h:114
@ NONE
Used for simplifying the display.
Definition regexp.h:116
@ SYVAR
Symbolic variable.
Definition regexp.h:108
uint display_syvar_utf8(syvariable v, FILE *out)
Displays a symbolic variable on a given stream: UTF8 version for the indices.
Definition regexp.c:36
void reg_free(regexp *)
Release of a regular expression.
Definition regexp.c:105
regexp * reg_concat(regexp *, regexp *)
Combines two regular expressions with the concatenation operator.
Definition regexp.c:300
bool reg_has_symbolic(regexp *)
Tests if a regular expression contains a symbolic node.
Definition regexp.c:51
bool reg_symbolic_loops(regexp *, ushort, uchar, bool *)
Computes information on the symbolic variables of a regular expression.
Definition regexp.c:526
regexp * reg_letter_numbered(uchar c, uchar index)
Computes a regular expression recognizing the language {a_n} for an input letter a,...
Definition regexp.c:219
bool reg_issimple(regexp *)
Tests if a regular expression is simple.
Definition regexp.c:80
uint display_syletter_utf8(syletter, FILE *)
Displays a symbolic letter on a given stream: UTF8 version for the indices.
Definition regexp.c:15
The type used to represent a letter.
Definition words.h:33
Type used to represent a single node in a regular expression.
Definition regexp.h:123
syletter sylet
Symbolic letter.
Definition regexp.h:130
struct regexp * left
The left sub-expression (NULL if no left sub-expression).
Definition regexp.h:125
letter letter
Letter (if this is a letter node).
Definition regexp.h:128
syvariable syvar
Symbolic variable.
Definition regexp.h:131
regelem op
The operator.
Definition regexp.h:124
struct regexp * right
The right sub-expression (NULL if no right sub-expression).
Definition regexp.h:126
word * word
Word (if this is a word node).
Definition regexp.h:129
Type used to represent a symbolic letter.
Definition regexp.h:62
uchar lab
The letter itself.
Definition regexp.h:63
uchar dec
The decrementation index.
Definition regexp.h:64
Type used to represent a symbolic variable.
Definition regexp.h:71
uchar ind
The index of the symbolic variable.
Definition regexp.h:72
uchar dec
The decrementation index.
Definition regexp.h:73
Implementation of dequeues of unsigned integers.