blob: 02e47a4f7e8e72081d56a1cd91fe47994927dfb5 (
plain)
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
|
#ifndef __SYMBOLTABLE_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAXNAME 32
#define INT 0
#define CHAR 1
#define MAXSYMBOLS 256
typedef struct {
char name[MAXNAME];
int type;
int addr;
} STentry;
typedef struct {
STentry entries[MAXSYMBOLS];
int maxsize;
int size;
} SymbolTable;
void addVar(const char name[], int type);
void lookup(const char name[]);
void display_table();
int get_type(const char name[]);
#endif
|