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

正文內(nèi)容

編譯技術(shù)課程設(shè)計(jì)報(bào)告-詞法分析、語法分析、中間代碼生成-文庫吧在線文庫

2025-07-07 13:32上一頁面

下一頁面
  

【正文】 { coutF39。flags[temp]!=9amp。 is_right=0。 } else is_right=0。 int YF()。 int newTemp() { num++。//把字符串 s連接到當(dāng)前字符串的結(jié)尾 //t[num1]=strcat(Temp,strn)。 return rt。 siyuan(tt,t1,t2,rr)。 siyuan(tt,t1,t2,rr)。 第 29 頁 rt=YE2(t1)。 return rt。 siyuan(tt,t1,t2,rr)。 siyuan(tt,t1,t2,rr)。 rt=YT2(t)。 } int YF1(int a) //乘方 { int rt,t1。 rt=rr。 } else if(flags[temp]==17) //( { v++。 } void main() { printf( 單詞號對應(yīng) 的種別編碼 \n)。 printf((/=,13) (,14) (=,14) (,14) (=,14)\n)。 printf(\n)。)。 stringstream stream。 t[num]=words。 if((flags[temp]==0)amp。 } else cout分析失敗 ! endl。 temp=0。 is_right=1。 num++。 cout(值 , 種別 )endl。 第 32 頁 do { ch =getchar()。 printf(\n)。 printf((標(biāo)括識符 ,6) (常數(shù) ,7) (=,8) (+,9) (++,9)\n)。 temp++。 第 31 頁 if(flags[temp]==6||flags[temp]==7)//標(biāo)識符或常數(shù) { v++。 v++。 rt=YP()。 } int YT2(int a) { int rt,t。 int tt=v+1。 v++。 } int YT() { int rt,t1。 } int YE2(int a) { int rt,t1。 int tt=v+1。 int tt=v+1。 } int YE() 第 28 頁 { int rt,t1。 streamstrn。 int num=0。 int YE2(int a)。 temp++。flags[temp]!=10amp。 } else if (flags[temp]!=0amp。 } void F() { coutFPF39。endl。 temp++。 F()。 } 第 25 頁 else if (flags[temp]!=0||flags[temp]!=17)//如果是非 或非) { coutE39。 } void E2() { if(flags[temp]==9||flags[temp]==12)//如果是加或減 { coutE39。+Tendl。 void F1()。 } } return flag。:{ //words[j] = 39。://空格 { words[j] =39。39。 } case39。 break。 flag = 20。\039。 words[j+1] = 39。:{ words[j] = ch。(39。 } case39。=39。/39。) { words[j++] = ch。:{ if (ch == 39。 words[j] = 39。=39。39。) { words[j++] = ch。 if (ch == 39。 } case39。=39。!39。) { words[j++] = ch。:{ if (ch == 39。 words[j] = 39。39。\039。) words[j++] = ch。)。 while ((ch = 39。 } } if (status == 0) { flag = 6。 status = 1。 k 5。(ch=39。) amp。 )||(ch=39。 j=0。 char program[500]。 定義函數(shù) YE() 進(jìn)行 中間代碼生成 ( 3) 流程圖 第 12 頁 五、 程序運(yùn)行 結(jié)果 注:本程序?qū)τ谛稳?a1 的標(biāo)識符無法作為整體識別 詞法測試: 表達(dá)式正確: 2*3+4/( as5) **6 第 13 頁 詞法分析: 第 14 頁 語法分析 第 15 頁 四元式: 表達(dá)式錯誤: 2*( 32 第 16 頁 六、總結(jié) 這次課程設(shè)計(jì)使我對編譯原理有了進(jìn)一步的了解,更加鞏固了所學(xué)習(xí)的知識。 E()。 is_right=0。flags[temp]!=9amp。 } void F1() { if(flags[temp]==11) //乘 ?方 ? { coutF39。 return 。T39。 } else if(flags[temp]==13) //除號 { coutT39。39。 } else if (flags[temp]!=0||flags[temp]!=17)//如果是非 或非 { coutE39。 } void E2() { if(flags[temp]==9||flags[temp]==12)//如果是加或減 { coutE39。+Tendl。 E 函數(shù) : 調(diào)用 T 函數(shù),調(diào)用 F 函數(shù) , 調(diào)用 P 函數(shù) ,返回后看是否是’ +’或’ ’,如 果是,則調(diào)用 E1 函數(shù),再調(diào)用 E2函數(shù),如果不是,進(jìn)行出錯處理,置 is_right 為 0。 Status 用于判斷是否為關(guān)鍵字, 1 是, 0 不是。 四、實(shí)現(xiàn)過程說明 ( 1)單詞符號表 單詞符號 種別 編碼 助記符 內(nèi)碼值 while 1 while ? if 2 if ? else 3 else ? switch 4 switch ? case 5 case ? 標(biāo)識符 6 id 符號表入口地址 常數(shù) 7 num 常數(shù)表入口地址 = 8 = ? + 9 + ? ++ 9 ++ ? += 9 += ? * 10 * ? ** 11 ** ? ? 12 ? ? / 13 / ? 第 5 頁 /= 13 /= ? 14 relop MT = 14 relop ME 14 relop LT = 14 relop LE == 14 relop EQ != 14 relop UEQ ; 15 ; ? , 16 , ? ( 17 ( LB ) 17 ) RB ! 18 ! ? { 20 { ? } 20 } ? [ 21 [ ? ] 21 ] ? : 22 : ? 39。當(dāng)轉(zhuǎn)換圖識別出一個(gè)標(biāo)識符時(shí),就去查對這張表,確定它是否為一個(gè)關(guān)鍵字。 編譯技術(shù)課程設(shè)計(jì) 班 級 學(xué) 號 姓 名 指導(dǎo)老師 年 月 第 1 頁 目 錄 一、目的 2 二、任務(wù)及要求
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1