-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.h
38 lines (32 loc) · 1004 Bytes
/
parser.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
// Group Number: 31
// MADHUR PANWAR 2016B4A70933P
// TUSSANK GUPTA 2016B3A70528P
// SALMAAN SHAHID 2016B4A70580P
// APURV BAJAJ 2016B3A70549P
// HASAN NAQVI 2016B5A70452P
#ifndef PARSER_H
#define PARSER_H
#include "set.h"
#include "parserDef.h"
int isTerminal(gSymbol symbol);
void printRuleRange();
void populateGrammarStruct(char *grFile);
void printGrammar();
void populateFirstSet();
void populateFollowSet();
void initParseTable();
intSet predictSet(grammarNode* g);
int populateParseTable();
void modifyParseTable_Err_Recovery();
void printParseTable();
void printFirst();
void printFollow();
void printPredictSets();
treeNode *parseInputSourceCode(char *src);
grammarNode createRuleNode(char *rule, int ruleIndex);
void printTreeOld(treeNode *root, char *fname);
void printTreeUtil(treeNode* cur, FILE* fpt);
void printTree(treeNode* root, char* fname);
void destroyTree(treeNode *root);
treeNode *newTreeNode(gSymbol sym, treeNode *parent, int gRuleIndex);
#endif //PARSER_H