5 typedef struct Resublist Resublist;
12 * Actions and Tokens (Reinst types)
14 * 02xx are operators, value == precedence
15 * 03xx are tokens, i.e. operands for operators
18 #define OPERATOR 0200 /* Bitmask of all operators */
19 #define START 0200 /* Start, used for marker on stack */
20 #define RBRA 0201 /* Right bracket, ) */
21 #define LBRA 0202 /* Left bracket, ( */
22 #define OR 0203 /* Alternation, | */
23 #define CAT 0204 /* Concatentation, implicit operator */
24 #define STAR 0205 /* Closure, * */
25 #define PLUS 0206 /* a+ == aa* */
26 #define QUEST 0207 /* a? == a|nothing, i.e. 0 or 1 a's */
27 #define ANY 0300 /* Any character except newline, . */
28 #define ANYNL 0301 /* Any character including newline, . */
29 #define NOP 0302 /* No operation, internal use only */
30 #define BOL 0303 /* Beginning of line, ^ */
31 #define EOL 0304 /* End of line, $ */
32 #define CCLASS 0305 /* Character class, [] */
33 #define NCCLASS 0306 /* Negated character class, [] */
34 #define END 0377 /* Terminate: match found */
37 * regexec execution lists
40 #define BIGLISTSIZE (25*LISTSIZE)
41 typedef struct Relist Relist;
44 Reinst* inst; /* Reinstruction of the thread */
45 Resublist se; /* matched subexpressions in this thread */
47 typedef struct Reljunk Reljunk;
60 extern Relist* _renewthread(Relist*, Reinst*, int, Resublist*);
61 extern void _renewmatch(Resub*, int, Resublist*);
62 extern Relist* _renewemptythread(Relist*, Reinst*, int, char*);
63 extern Relist* _rrenewemptythread(Relist*, Reinst*, int, Rune*);