-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbnfmain.h
More file actions
45 lines (34 loc) · 719 Bytes
/
bnfmain.h
File metadata and controls
45 lines (34 loc) · 719 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef _BNFMAIN_H
#define _BNFMAIN_H
#define EBNFDEFAULT "test.bnf"
struct node {
char type;
union {
char tsym;
struct header* nsym;
} head;
struct node* suc;
struct node* alt;
};
struct header {
char sym;
struct node* entry;
struct header* suc;
};
int parse(struct header* goal,int* match);
#ifndef _VAR
#define _VAR
char sym;
FILE* febnffile;
struct header* list; /* Pointer zum ersten Element der "Merkliste" */
struct header* sentinel; /* Pointer zum letzten Element der "Merkliste" */
struct header* h;
struct node* q;
struct node* r;
struct node* s;
int noerr;
#endif
#endif