Mescal
Loading...
Searching...
No Matches
regexp_tonfa.h
Go to the documentation of this file.
1
6
7#ifndef REGAUT_H_
8#define REGAUT_H_
9
10 /* ____ _ _ */
11 /* | _ \ ___ __ _ _ _| | __ _ _ __ _____ ___ __ _ __ ___ ___ ___(_) ___ _ __ ___ _ */
12 /* | |_) / _ \/ _` | | | | |/ _` | '__| / _ \ \/ / '_ \| '__/ _ \/ __/ __| |/ _ \| '_ \/ __(_) */
13 /* | _ < __/ (_| | |_| | | (_| | | | __/> <| |_) | | | __/\__ \__ \ | (_) | | | \__ \_ */
14 /* |_| \_\___|\__, |\__,_|_|\__,_|_| _ \___/_/\_\ .__/|_| \___||___/___/_|\___/|_| |_|___(_) */
15 /* ___ ___ |___/_ _____ _ __ ___(_) ___ _ __|_|| |_ ___ | \ | | ___/ \ ___ */
16 /* / __/ _ \| '_ \ \ / / _ \ '__/ __| |/ _ \| '_ \ | __/ _ \ | \| | |_ / _ \ / __| */
17 /* | (_| (_) | | | \ V / __/ | \__ \ | (_) | | | | | || (_) | | |\ | _/ ___ \\__ \ */
18 /* \___\___/|_| |_|\_/ \___|_| |___/_|\___/|_| |_| \__\___/ |_| \_|_|/_/ \_\___/ */
19
20#include "error.h"
21#include "nfa.h"
22#include "nfa_intersec.h"
23#include "nfa_minimization.h"
24#include "regexp.h"
25#include "type_boolarray.h"
26#include <stdlib.h>
27
28/**************************/
29/*+ Glushkov's algorithm +*/
30/**************************/
31
40);
41
57
67);
68
74);
75
95 uint,
96 uint*,
97 letter*
98);
99
116);
117
118/**************************/
119/*+ Thompson's algorithm +*/
120/**************************/
121
136);
137
138#endif // REGAUT_H_
Macros for displaying error messages.
Implementation of NFAs.
Intersection of NFAs.
Minimization.
Implementation of regular expressions.
void reg_gk_delete(glushkov_info *)
Realease of a glushkov_info object.
Definition regexp_tonfa.c:139
nfa * reg_thompson(regexp *)
Thompson's algorithm.
Definition regexp_tonfa.c:268
nfa * reg_glushkov(regexp *)
Glushkov's algorithm.
Definition regexp_tonfa.c:183
glushkov_info * reg_create_gk_emp(uint)
Initialization of a glushkov_info for a sub-expression defining the empty language.
Definition regexp_tonfa.c:22
uint reg_countletters(regexp *)
Counts the number of letters in a regular expression.
Definition regexp_tonfa.c:8
glushkov_info * gk_indexleaves(regexp *, uint, uint *, letter *)
Full computation of the glushkov_info object from a regular expression.
Definition regexp_tonfa.c:148
Type used to represent an array of Booleans.
Definition type_boolarray.h:29
Type utilized to represent the information computed by Glushkov's algorithm from the input regular ex...
Definition regexp_tonfa.h:50
uint size
Number of letters in the regular expression.
Definition regexp_tonfa.h:51
barray * follow
Array of Booleans indexed by two-letter words. Marks the two-letter words which are a factor of a wor...
Definition regexp_tonfa.h:55
bool epsilon
Boolean indicating whether the regular expression contains the empty word.
Definition regexp_tonfa.h:52
barray * last
Array of Booleans indexed by the letters. Marks the letters which end a word recognized by the expres...
Definition regexp_tonfa.h:54
barray * first
Array of Booleans indexed by the letters. Marks the letters which start a word rexcognized by the exp...
Definition regexp_tonfa.h:53
The type used to represent a letter.
Definition words.h:33
Type used to represent a NFA.
Definition nfa.h:43
Type used to represent a single node in a regular expression.
Definition regexp.h:123
Implementation of Boolean arrays.