-
Notifications
You must be signed in to change notification settings - Fork 7
/
symboltabledef.h
56 lines (46 loc) · 874 Bytes
/
symboltabledef.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
/*
GROUP NUMBER: 11
NIKKI GUPTA 2016A7PS0057P
SAHIL RANADIVE 2016A7PS0097P
ADITI AGARWAL 2016A7PS0095P
ADITYA LADDHA 2016A7PS0038P
*/
#include<stdio.h>
typedef struct variable* variable;
struct recordfields;
typedef struct recordfields* recordField;
typedef struct symbolTable** symbolTable;
typedef struct record** recordTable;
typedef struct record* recordVar;
typedef struct symbolTable* symbolTableElement;
struct variable{
int type;
char* lexeme;
int width;
int offset;
char* scope;
variable next;
int lineno;
char* recordName;
};
struct recordfields{
int type;
char* lexeme;
int width;
recordField next;
};
struct record{
char* rname;
int width;
recordField head;
int lineno;
recordVar next;
};
struct symbolTable{
char* scope;
variable inputpars;
variable outputpars;
variable localvars;
struct symbolTable* next;
int offset;
};