File: parse.h

package info (click to toggle)
yasm 1.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,880 kB
  • sloc: asm: 74,423; ansic: 53,055; python: 9,927; sh: 5,276; xml: 1,617; makefile: 214; pascal: 95; sed: 16
file content (29 lines) | stat: -rw-r--r-- 544 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef re2c_parse_h
#define re2c_parse_h

#include <stdio.h>
#include "tools/re2c/scanner.h"
#include "tools/re2c/re.h"

typedef struct Symbol {
    struct Symbol		*next;
    Str			name;
    RegExp		*re;
} Symbol;

void Symbol_init(Symbol *, const SubStr*);
static Symbol *Symbol_new(const SubStr*);
Symbol *Symbol_find(const SubStr*);

void line_source(FILE *, unsigned int);
void parse(FILE *, FILE *);

static Symbol *
Symbol_new(const SubStr *str)
{
    Symbol *r = malloc(sizeof(Symbol));
    Symbol_init(r, str);
    return r;
}

#endif