Home | History | Annotate | Download | only in re2c
      1 #ifndef re2c_parse_h
      2 #define re2c_parse_h
      3 
      4 #include <stdio.h>
      5 #include "tools/re2c/scanner.h"
      6 #include "tools/re2c/re.h"
      7 
      8 typedef struct Symbol {
      9     struct Symbol		*next;
     10     Str			name;
     11     RegExp		*re;
     12 } Symbol;
     13 
     14 void Symbol_init(Symbol *, const SubStr*);
     15 static Symbol *Symbol_new(const SubStr*);
     16 Symbol *Symbol_find(const SubStr*);
     17 
     18 void line_source(FILE *, unsigned int);
     19 void parse(FILE *, FILE *);
     20 
     21 static Symbol *
     22 Symbol_new(const SubStr *str)
     23 {
     24     Symbol *r = malloc(sizeof(Symbol));
     25     Symbol_init(r, str);
     26     return r;
     27 }
     28 
     29 #endif
     30