-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.h
53 lines (45 loc) · 843 Bytes
/
global.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
50
51
52
#ifndef GLOBAL_H
#define GLOBAL_H
#include <stdio.h>
#include <ctype.h>
#define SYMMAX 100
#define BSIZE 128
#define NONE -1
#define EOS '\0'
#define NUM 256
#define DIV 257
#define MOD 258
#define ID 259
#define DONE 260
#define ASSIGN 261
#define IF 262
#define THEN 263
#define WHILE 264
#define DO 265
#define BEGIN 266
#define END 267
#define PLUS 268
#define MINUS 269
#define EQUAL 270
#define SEMIC 271
#define TIMES 272
#define LPAREN 273
#define RPAREN 274
#define IDLEFT 275
#define PRINT 276
#define GOTO 277
#define LABEL 278
#define GOFALSE 279
#define PRINTSTR 280
#define STRING 281
int tokenval;
int lineno;
int debug;
FILE *file;
FILE *out;
struct entry {
char *lexptr;
int token;
};
struct entry symtable[SYMMAX];
#endif // GLOBAL_H