?? parsingtable.h
字號:
using namespace std;
enum nonterminal
{P,CS,S,SS,IS,WS,AS,BE,BO,AE,AEP,ME,MEP,SE};
enum terminal
{lb,rb,lp,rp,smc,tif,tthen,telse,twhile,id,num,lt,gt,le,ge,as,eq,plus,minus,mul,di,ne,dl};
#define ROW 14
#define COLUMN 23
struct parsingTableEntry
{
string entry;
string* errorM;
parsingTableEntry()
{
entry="";
errorM=0;
}
};
string transfer(string);
string transSeq(string);
//this two just transfer the symbol used in this program into understandable english words.
class ParsingTable
{
public:
ParsingTable();
void initialize();//insert productions into the table.
parsingTableEntry* search(string nonterminal,string terminal);
parsingTableEntry* unexpect;
parsingTableEntry* missing;
parsingTableEntry* empty;
//In order to easy the work of coding ,use these three pointer to represent three kinds
//of special situation.
~ParsingTable();
private:
parsingTableEntry parTable[ROW][COLUMN];
string* errorArray;
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -