-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsymbol.h
39 lines (32 loc) · 803 Bytes
/
symbol.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
/*
* =====================================================================================
*
* Filename: symbol.h
*
* Description: Symbol Table Management declarations
*
* Version: 1.0
* Created: 09/20/2017 03:33:40 PM
* Revision: none
* Compiler: gcc
*
* Author: Brad Theilman (BHT), [email protected]
* Organization:
*
* =====================================================================================
*/
#ifndef SYMBOL_H
#define SYMBOL_H
#include "cmplr.h"
#define MAXSYM 256
typedef struct Symbol {
char name[MAXIDENT];
Node * (*eval)();
void (*print)();
Node *expr;
} Symbol;
Symbol *symtab[MAXSYM];
int check_symbol(char *);
Symbol *find_symbol(Node *);
void add_symbol(Node *, Node *);
#endif