-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.h
87 lines (83 loc) · 1.46 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#define BSIZE 128
#define NONE -1
#define EOS '\0'
#define IF 256
#define ABSTRACT 257
#define ASSERT 258
#define BOOLEAN 259
#define BREAK 260
#define BYTE 261
#define CASE 262
#define CATCH 263
#define CHAR 264
#define CLASS 265
#define CONST 266
#define CONTINUE 267
#define DEFAULT 268
#define DO 269
#define DOUBLE 270
#define ELSE 271
#define ENUM 272
#define EXTENDS 273
#define FINAL 272
#define FINALLY 273
#define FLOAT 274
#define FOR 275
#define GOTO 276
#define IMPLEMENTS 277
#define IMPORT 278
#define INSTANCEOF 279
#define INT 280
#define INTERFACE 281
#define LONG 282
#define NATIVE 283
#define NEW 284
#define PACKAGE 285
#define PRIVATE 286
#define PROTECTED 287
#define PUBLIC 288
#define RETURN 289
#define SHORT 290
#define STATIC 291
#define STRICTFP 292
#define SUPER 293
#define SWITCH 294
#define THIS 295
#define VOID 296
#define WHILE 297
#define TRY 298
#define THROW 299
#define DONE 300
#define ID 301
#define INT8 302
#define INT16 303
#define INT32 304
#define ARG 305
#define NUM 306
#define OPR 307
//function declarations
void init();
int lexan();
void error(char *);
int lookup(char s[]);
int insert(char s[], int tok);
void predictiveParser();
void stmt();
void opt_stmts();
void expr();
void moreterms();
void term();
void factor();
void morefactors();
void match(int t);
int tokenval;
int lineno;
struct entry {
char *lexptr;
int token;
};
struct entry symtable[100];