freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

編譯課程設(shè)計報告書(參考版)

2024-10-11 09:16本頁面
  

【正文】 實驗的步驟比較嚴謹,通過本次實驗也提高了 對編譯的變成能力和程序調(diào)試能力,并對編譯原理這門課產(chǎn)生了更濃郁的興趣。 31 通過本次實驗更加深刻的理解了優(yōu)先關(guān)系表的相關(guān)概念,深刻的體會到了 ab 并不等價于ba 的含義,也體會到了優(yōu)先表對于編譯過程的意義。 2.算符優(yōu)先分析程序設(shè)計 算符優(yōu)先分析的設(shè)計,主要是把查表和分析棧結(jié)合起來,通過優(yōu)先級的判斷來 決定究竟是進行規(guī)約還是入棧。在實驗過程中遇到的諸多疑問,也通過努力一一得到了解答。同時學(xué)會了應(yīng)用 編譯程序設(shè)計的 原理和 技術(shù)設(shè)計出 詞法分析器 , 了解了掃描 器的組成結(jié)構(gòu),不同種類單詞的識別方法。 } : 課程設(shè)計(綜合實驗)總結(jié)或結(jié)論 通過一周的艱苦實驗,基本達到了實驗的目的。 30 four[l]DispSample()。l=Fp。 cout最后四元式如下 :endl。 else coutNo!endl。 (t,3)。 } } ()。 strp++。 coutendl。 cout移進 :。 exit(0)。 cout第 strp+1 字母錯誤 !endl。amp。 if((statopvt)200) 29 statopvt。 (Merge(ch,length))。 lowpos++。 if((lowpos)200) lowpos。 while(SearchCost((lowpos),(highpos))!=1) { highpos=lowpos。 int highpos=statopvt,lowpos=highpos1。amp。 else statopvt=statop1。 while(a!=7) { a=Digital[strp]。 statopvt=statop。 strp=0。產(chǎn)生 :endl。39。39。動作 :39。39。 cout符號棧 :39。 ToDigital(Digital,string,Dp,len)。 (string,MAX)。 cout*********************************************************endl。 cout*****************算符優(yōu)先關(guān)系表 :*************************endl。 int statopvt。 int strp。 int *ch=new int [MAX]。 else d_len++。amp。 exit(0)。 coutstr[i]不能被識別 endl。i++) { 27 digital[d_len]=CharToDigital(str[i])。d_len,int len) { for(int i=0。 } else return 0。j++) if(ch==cost[0][j]) return j。 for(j=0。 return Sp+100。i++) if(Sign[i]==ch) return i+100。 } } int Entry(char ch) { for(int i=1。 26 } else { cout合并失??! endl。\t39。 DispItem(Fp+301)。 DispItem(ch[2])。 DispItem(ch[0])。amp。amp。 return Tp+200。 DispItem(Tp+200)。 DispItem(ch[1])。ch[2]==6) { Temp[++Tp]=ch[1]。 } else if(ch[0]==5amp。 coutendl。 cout==。 cout合并 :。 } 25 int Merge(int *ch,int ll) { (ch,ll)。 } else if(i300) { DispIndirect(Temp[i200])。 else coutcost[0][i]。 return。 } else coutTi300。 return 。 return。 } if(i100) { if(i==3) cout**。 } ////////////////////////////////////////////////////////////////////////////////////////////////dispitem void DispItem(int i) { if(i0||i400) { coutError!endl。 coutendl。 four[Fp]=new four_item(t[1],t[0],t[2])。break。break。=39。break。39。break。39。 if(j/100==1) j=4。 else return false。Z39。amp。A39。939。amp。039。z39。amp。a39。 } coutendl。 else coutcost[i][j]39。) cout**39。j++) { if(cost[i][j]==39。i++) { for(int j=0。 22 void DispCost() { for(int i=0。 } }。39。 else cout39。 } if (thistop5) cout39。itop。 else return 0。amp。 exit(0)。 return length。i++) { temp[i]=array[toplength+i]。 } int PopStack(int temp[],int length) { 21 if(top=length) { for(int i=0。 } void PushStack(int c) { if(topMAX) array[top++]=c。} int GetTop() { return array[top1]。 int array[MAX]。 Four four[MAX]。 cout)。 cout,。 cout,。 cout,。) cout**。 if(op==39。 } void DispFour() { cout產(chǎn)生 :Fp。 DispIndirect(s3)。 DispIndirect(s2)。 DispIndirect(s1)。 else coutop。!39。 } void DispSample() { cout(。 thiss2=s2。 19 public: four_item(){} four_item(int op,int s1,int s2) { thisop=cost[0][op]。 typedef class four_item { char op。 void ToDigital(int digital[],char str[],int amp。 void DispIndirect(int i)。 int CharToDigital(char ch)。 int Entry(char ch)。 bool IsChar(char c)。 int Fp=0。 int Temp[MAX]。 char Sign[MAX]。 int Digital[MAX]。=39。 39。39。39。39。39。39。39。39。39。 39。 39。39。39。39。)39。 39。=39。39。39。39。39。39。(39。39。39。 39。 39。39。39。39。i39。39。39。39。39。39。39。39。!39。39。39。39。39。39。39。39。*39。39。39。39。39。39。39。39。+39。39。)39。(39。i39。!39。*39。+39。 39。 const int MAX=100。 語法制導(dǎo)翻譯 程序的輸入是終結(jié)符號串(即單詞符號 串,以一個“ ”結(jié)尾),如果輸入符號串是句子 ,則按照其語義進行翻譯 ,輸出等價的四元式序列(作為練習(xí)應(yīng)顯示輸出)。這個分析過程與非終結(jié)符號無關(guān),當(dāng)由文法產(chǎn)生了優(yōu)先關(guān)系之后文法也就失去了作用(所以本題目無需給出文法)。 為將來設(shè)計、分析 編譯程序打下良好的基礎(chǔ) 。通過這個 實驗 ,使學(xué)生應(yīng)用 編譯程序設(shè)計的 原理和 技術(shù) , 通過設(shè)計、編寫和調(diào)試語法制導(dǎo)翻譯程序,掌握從一種語句的語法和語義出發(fā),構(gòu)造相應(yīng)的語義子程序,實現(xiàn)基于算符優(yōu)先分析方法的語法制導(dǎo)翻譯的方法。 system (pause)。 if(()==0) coutYes!endl。 } } ()。 strp++。 else cout將 a 移進 .endl。!39。 } else 15 { ()。 break。(SearchCost((statopvt),a)==2)) { cout錯誤 !endl。))amp。(a=39。)amp。 } if (!((a=39。 statopvt=()1。N39。 else coutch[i]。!39。ilength。 cout規(guī)約 :。N39。 strcpy(ch,(length))。 lowpos++。 if(!IsVT((lowpos))) lowpos。 while(SearchCost((lowpos),(highpos))!=1) { highpos=lowpos。 //show the stack before merging int highpos=statopvt,lowpos=highpos1。amp。 14 //if the letter39。 } if(IsVT((statop))) statopvt=statop。!39。*39。amp。*39。s priority is litter than the top start merge a=string[strp]。39。 statopvt=statop。
點擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1