-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.h
More file actions
31 lines (24 loc) · 965 Bytes
/
parser.h
File metadata and controls
31 lines (24 loc) · 965 Bytes
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
// BATCH NUMBER - 57
// Authors:-
// Rishabh Singh 2012B4A7691P f2012691@pilani.bits-pilani.ac.in
// Anchit Jain 2012B3A7570P f2012570@pilani.bits-pilani.ac.in
#ifndef COMPILER_PARSER_H
#define COMPILER_PARSER_H
#include "parserDef.h"
void populateHash();
int checkInHash(char *st,int hash);
ParseTreeNode* rootNode;
Gpair populateRules();
int** getParseTable();
void makeparsetable(int **parsetable, FirstSetNode* firstset, FollowSetNode* followset, Grammar g);
void stack_simulate(FILE *fp,FILE *fp_error,FILE *fp_comment, int** parsetable, Grammar g);
void print2(Grammar g,FILE *fp,int len);
void FindFollowSet(Grammar g);
void FindFirstSet(Grammar g);
//void printParseTree(ParseTreeNode* root,FILE *fp_tree);
int printDFSTree(ParseTreeNode* root,int flag);
void setSynch(Grammar g);
void printFirstSet();
void printFollowSet();
// void synch_parsetable(int **parsetable,FirstSetNode* firstset,FollowSetNode* followset);
#endif //COMPILER_PARSER_H