forked from louisje/OpenComputer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSemantic.h
31 lines (25 loc) · 823 Bytes
/
Semantic.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
#ifndef SEMANTIC_H
#define SEMANTIC_H
//Symbol* SaSymbolLookup(Parser *p, char *name);
//void SaAtom(Parser *p, Tree *atom, SemAtom *sem);
#endif
// typedef struct { } SemId;
// SemStruct* StructNew();
// void StructFree();
// Var* VarListFind(Array *vars, char *name);
// ============= sa:semantic analysis ================
//SA *SaNew();
//void SaFree(SA *sa);
//void SaTree(SA *sa, Tree *node);
// char *token(Tree *node);
// SemToken *SemTokenNew(char *token);
//char *SaAtomType(SA *sa, Tree *cAtom, char *type);
/*
typedef struct { // 語意分析器物件結構
Tree *tree;
SymTable *symTable;
char type[100]; // , pathType[100];
Array *blockStack; // 變數 id 的區塊範圍,像是 PROG, STRUCT, METHOD, BLOCK 等。
} SA;
*/
// void semanticAnalysis(Tree *tree, SymTable *symTable);