-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsymboltable.h
executable file
·32 lines (26 loc) · 1.12 KB
/
symboltable.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
/*
* Group no. 50
* Aniruddha Mahajan -------- 2017A7PS0145P
* Ravindra Singh Shekhawat - 2017A7PS0146P
* Shreyas Srikrishna ------- 2017A7PS0162P
* Chetan Sharma ------------ 2017A7PS0182P
*/
#ifndef symboltable
#define symboltable
#define NO_OF_AST_NODE_TYPES 21
#include "symboltableDef.h"
#include "semantic.h"
#include "semanticDef.h"
int computeStringHash(char* s);
int computeBlockHash(Block* b);
Symbol* createSymbol(ASTNode* astNode);
SymbolTable* createSymbolTable(SymbolTableType type);
SymbolTableEntry* createSymbolTableEntry(Symbol* s, SymbolForm f);
SymbolTableEntry* lookupString(char* s, SymbolTable* table, SymbolForm f, bool deepSearch, int lineNo);
SymbolTableEntry* lookupBlock(Block* b, SymbolTable* table, SymbolForm f, bool deepSearch);
SymbolTableEntry* checkForOutputParamOverloading(char* s, SymbolTable* table);
void recursiveCheckOverload(ASTNode *node, SymbolTable *table,ListOfErrors *sematicErrors);
void processAST(ASTNode* node, SymbolTable* curr, ListOfErrors* semanticErrors);
void checkSymbolTable(ListOfErrors* semanticErrors);
SymbolTable* getsymbolTable();
#endif