-
Notifications
You must be signed in to change notification settings - Fork 1
/
parsermain.h
49 lines (32 loc) · 1.02 KB
/
parsermain.h
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
46
47
48
49
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef _BNFMAIN_H
#define _BNFMAIN_H
#define EBNFDEFAULT "test.bnf"
#define PARSEDEFAULT "test.txt"
/* Variablendeklarationen */
char sym;
FILE *file;
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;
/* Prototypen ! Prototypen ! */
void error(char);
int parse(struct header* goal,int* match);
struct header* find(char s);
void term(struct node** p, struct node** q, struct node** r, struct node** s);
void expression(struct node** p, struct node** q, struct node** r, struct node** s);
void factor(struct node** p, struct node** q, struct node** r, struct node** s);
void link(struct node* p, struct node* q);
void getsym(void);
char bnfscanner(void);
void getsymg(void);
char scanner(void);
char findlit(char*);
int findlitg(char*);
#endif