Node 200 tools/compile.c static void Node_compile_c_ko(Node *node, int ko) Node 386 tools/compile.c static int countVariables(Node *node) Node 397 tools/compile.c static void defineVariables(Node *node) Node 408 tools/compile.c static void undefineVariables(Node *node) Node 418 tools/compile.c static void Rule_compile_c2(Node *node) Node 934 tools/compile.c int consumesInput(Node *node) Node 966 tools/compile.c Node *n; Node 975 tools/compile.c Node *n; Node 996 tools/compile.c void Rule_compile_c(Node *node) Node 998 tools/compile.c Node *n; Node 38 tools/greg.h typedef union Node Node; Node 40 tools/greg.h #define NODE_COMMON NodeType type; Node *next Node 41 tools/greg.h struct Rule { NODE_COMMON; char *name; Node *variables; Node *expression; int id; int flags; }; Node 42 tools/greg.h struct Variable { NODE_COMMON; char *name; Node *value; int offset; }; Node 43 tools/greg.h struct Name { NODE_COMMON; Node *rule; Node *variable; }; Node 48 tools/greg.h struct Action { NODE_COMMON; char *text; Node *list; char *name; Node *rule; }; Node 50 tools/greg.h struct Error { NODE_COMMON; Node *element; char *text; }; Node 51 tools/greg.h struct Alternate { NODE_COMMON; Node *first; Node *last; }; Node 52 tools/greg.h struct Sequence { NODE_COMMON; Node *first; Node *last; }; Node 53 tools/greg.h struct PeekFor { NODE_COMMON; Node *element; }; Node 54 tools/greg.h struct PeekNot { NODE_COMMON; Node *element; }; Node 55 tools/greg.h struct Query { NODE_COMMON; Node *element; }; Node 56 tools/greg.h struct Star { NODE_COMMON; Node *element; }; Node 57 tools/greg.h struct Plus { NODE_COMMON; Node *element; }; Node 84 tools/greg.h extern Node *actions; Node 85 tools/greg.h extern Node *rules; Node 86 tools/greg.h extern Node *start; Node 92 tools/greg.h extern Node *makeRule(char *name, int starts); Node 93 tools/greg.h extern Node *findRule(char *name, int starts); Node 94 tools/greg.h extern Node *beginRule(Node *rule); Node 95 tools/greg.h extern void Rule_setExpression(Node *rule, Node *expression); Node 96 tools/greg.h extern Node *Rule_beToken(Node *rule); Node 97 tools/greg.h extern Node *makeVariable(char *name); Node 98 tools/greg.h extern Node *makeName(Node *rule); Node 99 tools/greg.h extern Node *makeDot(void); Node 100 tools/greg.h extern Node *makeCharacter(char *text); Node 101 tools/greg.h extern Node *makeString(char *text); Node 102 tools/greg.h extern Node *makeClass(char *text); Node 103 tools/greg.h extern Node *makeAction(char *text); Node 104 tools/greg.h extern Node *makePredicate(char *text); Node 105 tools/greg.h extern Node *makeError(Node *e, char *text); Node 106 tools/greg.h extern Node *makeAlternate(Node *e); Node 107 tools/greg.h extern Node *Alternate_append(Node *e, Node *f); Node 108 tools/greg.h extern Node *makeSequence(Node *e); Node 109 tools/greg.h extern Node *Sequence_append(Node *e, Node *f); Node 110 tools/greg.h extern Node *makePeekFor(Node *e); Node 111 tools/greg.h extern Node *makePeekNot(Node *e); Node 112 tools/greg.h extern Node *makeQuery(Node *e); Node 113 tools/greg.h extern Node *makeStar(Node *e); Node 114 tools/greg.h extern Node *makePlus(Node *e); Node 115 tools/greg.h extern Node *push(Node *node); Node 116 tools/greg.h extern Node *top(void); Node 117 tools/greg.h extern Node *pop(void); Node 120 tools/greg.h extern void Rule_compile_c(Node *node); Node 122 tools/greg.h extern void Node_print(Node *node); Node 123 tools/greg.h extern void Rule_print(Node *node); Node 124 tools/greg.h extern void Rule_free(Node *node); Node 68 tools/greg.y EQUAL expression { Node *e= pop(); Rule_setExpression(pop(), e); } Node 71 tools/greg.y expression= sequence (BAR sequence { Node *f= pop(); push(Alternate_append(pop(), f)); } Node 74 tools/greg.y sequence= error (error { Node *f= pop(); push(Sequence_append(pop(), f)); } Node 91 tools/greg.y COLON identifier !EQUAL { Node *name= makeName(findRule(yytext, 0)); name->name.variable= pop(); push(name); } Node 188 tools/greg.y Node *n; Node 27 tools/tree.c Node *actions= 0; Node 28 tools/tree.c Node *rules= 0; Node 29 tools/tree.c Node *thisRule= 0; Node 30 tools/tree.c Node *start= 0; Node 38 tools/tree.c static inline Node *_newNode(NodeType type, int size) Node 40 tools/tree.c Node *node= calloc(1, size); Node 47 tools/tree.c Node *makeRule(char *name, int defined) Node 49 tools/tree.c Node *node= newNode(Rule); Node 58 tools/tree.c Node *findRule(char *name, int defined) Node 60 tools/tree.c Node *n; Node 72 tools/tree.c Node *beginRule(Node *rule) Node 78 tools/tree.c void Rule_setExpression(Node *node, Node *expression) Node 90 tools/tree.c Node *makeVariable(char *name) Node 92 tools/tree.c Node *node; Node 104 tools/tree.c Node *makeName(Node *rule) Node 106 tools/tree.c Node *node= newNode(Name); Node 113 tools/tree.c Node *makeDot(void) Node 118 tools/tree.c Node *makeCharacter(char *text) Node 120 tools/tree.c Node *node= newNode(Character); Node 125 tools/tree.c Node *makeString(char *text) Node 127 tools/tree.c Node *node= newNode(String); Node 132 tools/tree.c Node *makeClass(char *text) Node 134 tools/tree.c Node *node= newNode(Class); Node 139 tools/tree.c Node *makeAction(char *text) Node 141 tools/tree.c Node *node= newNode(Action); Node 159 tools/tree.c Node *makePredicate(char *text) Node 161 tools/tree.c Node *node= newNode(Predicate); Node 166 tools/tree.c Node *makeError(Node *e, char *text) Node 168 tools/tree.c Node *node= newNode(Error); Node 174 tools/tree.c Node *makeAlternate(Node *e) Node 178 tools/tree.c Node *node= newNode(Alternate); Node 188 tools/tree.c Node *Alternate_append(Node *a, Node *e) Node 199 tools/tree.c Node *makeSequence(Node *e) Node 203 tools/tree.c Node *node= newNode(Sequence); Node 213 tools/tree.c Node *Sequence_append(Node *a, Node *e) Node 224 tools/tree.c Node *makePeekFor(Node *e) Node 226 tools/tree.c Node *node= newNode(PeekFor); Node 231 tools/tree.c Node *makePeekNot(Node *e) Node 233 tools/tree.c Node *node= newNode(PeekNot); Node 238 tools/tree.c Node *makeQuery(Node *e) Node 240 tools/tree.c Node *node= newNode(Query); Node 245 tools/tree.c Node *makeStar(Node *e) Node 247 tools/tree.c Node *node= newNode(Star); Node 252 tools/tree.c Node *makePlus(Node *e) Node 254 tools/tree.c Node *node= newNode(Plus); Node 260 tools/tree.c static Node *stack[1024]; Node 261 tools/tree.c static Node **stackPointer= stack; Node 267 tools/tree.c Node **p; Node 277 tools/tree.c Node *push(Node *node) Node 287 tools/tree.c Node *top(void) Node 293 tools/tree.c Node *pop(void) Node 303 tools/tree.c static void Node_fprint(FILE *stream, Node *node) Node 350 tools/tree.c void Node_print(Node *node) { Node_fprint(stderr, node); } Node 352 tools/tree.c static void Rule_fprint(FILE *stream, Node *node) Node 364 tools/tree.c void Rule_print(Node *node) { Rule_fprint(stderr, node); } Node 366 tools/tree.c void Rule_free(Node *node) Node 373 tools/tree.c Node *var= node->rule.variables; Node 380 tools/tree.c Node *tmp= var->any.next; Rule_free(var); var= tmp; Node 401 tools/tree.c Node *root= node; Node 407 tools/tree.c Node *tmp= node->any.next; Rule_free(node); node= tmp; Node 415 tools/tree.c Node *root= node; Node 421 tools/tree.c Node *tmp= node->any.next; Rule_free(node); node= tmp; Node 444 tools/tree.c Node *n; Node 447 tools/tree.c Node *tmp= n->any.next; Node 461 tools/tree.c Node *tmp= n->any.next;