資源簡介
北郵大三的語法分析,有實驗報告和可運行的代碼
代碼片段和文件信息
#include
#include
#include?
#include??
using?namespace?std;
main()
{
int?valtopnumip=0i=1count=0r=0;
int?record[20];//初始化
stack?intstack;
intstack.push(9);
intstack.push(11);
topnum=intstack.top();
while(topnum!=9)
{
if((topnum>0)&&(topnum<=9))
{
if(topnum==trans[i])
{
intstack.pop();
topnum=intstack.top();
ip=ip+1;
}
else
cout<<“出錯“< }
else
{
if(ANA[topnum][trans[ip]]!=-1)
{
record[r]=ANA[topnum][trans[ip]];
r++;
intstack.pop();
while(gen[ANA[topnum][trans[ip]]][i]!=-1)
{
count++;
i++;
}
for(i=count;i>0;i++)
{
val=gen[ANA[topnum][trans[ip]]][i];
intstack.push(val);
}
}
else
c
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????82944??2009-11-09?13:42??語法分析\Debug\vc60.idb
?????文件?????135168??2009-11-08?23:06??語法分析\Debug\vc60.pdb
?????文件?????573529??2009-10-25?18:00??語法分析\Debug\語法分析.exe
?????文件?????828196??2009-11-09?13:39??語法分析\Debug\語法分析.ilk
?????文件?????381362??2009-11-09?13:39??語法分析\Debug\語法分析.obj
?????文件????2587436??2009-11-08?22:32??語法分析\Debug\語法分析.pch
?????文件????1147904??2009-11-08?23:06??語法分析\Debug\語法分析.pdb
?????文件?????????49??2009-10-23?23:19??語法分析\first.txt
?????文件?????????49??2009-10-24?22:13??語法分析\follow.txt
?????文件????????123??2009-10-24?21:55??語法分析\generate.txt
?????文件?????188416??2013-04-24?16:33??語法分析\實驗報告.doc
?????文件????????907??2009-10-25?16:11??語法分析\棧.cpp
?????文件???????4054??2009-10-25?17:59??語法分析\語法分析.cpp
?????文件???????3427??2009-11-09?13:39??語法分析\語法分析.dsp
?????文件????????541??2009-11-09?13:53??語法分析\語法分析.dsw
?????文件?????573529??2009-10-25?17:54??語法分析\語法分析.exe
?????文件??????41984??2009-11-09?13:53??語法分析\語法分析.ncb
?????文件??????48640??2009-11-09?13:53??語法分析\語法分析.opt
?????文件????????756??2009-11-09?13:39??語法分析\語法分析.plg
?????目錄??????????0??2009-10-25?20:38??語法分析\Debug
?????目錄??????????0??2013-04-24?16:33??語法分析
-----------?---------??----------?-----??----
??????????????6599014????????????????????21
- 上一篇:安卓應(yīng)用市場源碼,絕對可運行
- 下一篇:最全拼音字庫
評論
共有 條評論