forked from rperlste/UniversalCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPredict.h
30 lines (26 loc) · 755 Bytes
/
Predict.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
#ifndef _Predict
#define _Predict
#include <iostream>
#include "MarkedVocabulary.h"
#include "LookAheadSet.h"
#include "Grammar.h"
#include "GrammarSet.h"
class Predict{
public:
Predict( const Grammar& );
void MarkLambda();
GrammarSet ComputeFirst( RightHandSide& );
GrammarSet ComputeFirst( Symbol& symbol );
GrammarSet ComputeFirst( Production& );
GrammarSet ComputeFirst( const int&,
const int& );
void FillFirstSet();
void FillFollowSet();
void FillPredictSet();
void PrintLookAheadSets();
bool DerivesLambda( Production );
Grammar* getGrammar();
private:
Grammar grammar;
};
#endif