




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考《編譯原理》課程設(shè)計(jì)報(bào)告—SLR(1)分析的實(shí)現(xiàn) 學(xué) 院 電腦科學(xué)與技術(shù)專 業(yè)電腦科學(xué)與技術(shù)學(xué) 號 學(xué)生姓名 指導(dǎo)教師 2015年12月26日目錄TOC\o"1-5"\h\z1.設(shè)計(jì)的目的與內(nèi)容 11.1課程設(shè)計(jì)的目的 1\o"CurrentDocument"1.2設(shè)計(jì)內(nèi)容 1\o"CurrentDocument"1.3設(shè)計(jì)要求 1\o"CurrentDocument"1.4理論基礎(chǔ) 12算法的基本思想 22.1主要功能函數(shù) 2\o"CurrentDocument"2.2算法思想 3SLR文法構(gòu)造分析表的主要思想: 3解決沖突的方法: 3SLR語法分析表的構(gòu)造方法: 43主要功能模塊流程圖 53.1主函數(shù)功能流程圖 5\o"CurrentDocument"4系統(tǒng)測試 6\o"CurrentDocument"5結(jié)論 11\o"CurrentDocument"附錄程序源碼清單 121.設(shè)計(jì)的目的與內(nèi)容1.1課程設(shè)計(jì)的目的編譯原理課程設(shè)計(jì)是電腦專業(yè)重要的教學(xué)環(huán)節(jié),它為學(xué)生提供了一個(gè)既動手又動腦,將課本上的理論知識和實(shí)際有機(jī)的結(jié)合起來,獨(dú)立分析和解決實(shí)際問題的時(shí)機(jī)。進(jìn)一步穩(wěn)固和復(fù)習(xí)編譯原理的基礎(chǔ)知識。培養(yǎng)學(xué)生結(jié)構(gòu)化程序、模塊化程序設(shè)計(jì)的方法和能力。提高學(xué)生對于編程語言原理的理解能力。加深學(xué)生對于編程語言實(shí)現(xiàn)手段的印象。1.2設(shè)計(jì)內(nèi)容構(gòu)造LR(1)分析程序,利用它進(jìn)行語法分析,判斷給出的符號串是否為該文法識別的句子,了解LR〔K〕分析方法是嚴(yán)格的從左向右掃描,和自底向上的語法分析方法。1.3設(shè)計(jì)要求SLR(1)分析表的生成可以選擇編程序生成,也可選擇手動生成;程序要求要配合適當(dāng)?shù)腻e誤處理機(jī)制;要打印句子的文法分析過程。1.4理論基礎(chǔ)由于大多數(shù)適用的程序設(shè)計(jì)語言的文法不能滿足LR(0)文法的條件,即使是描述一個(gè)實(shí)數(shù)變量說明這樣簡單的文法也不一定是LR(0)文法。因此對于LR(0)標(biāo)準(zhǔn)族中有沖突的項(xiàng)目集(狀態(tài))用向前查看一個(gè)符號的方法進(jìn)行處理,以解決沖突。這種方法將能滿足一些文法的需要,因?yàn)橹粚τ袥_突的狀態(tài)才向前查看一個(gè)符號,以確定做那種動作,因而稱這種分析方法為簡單的LR(1)分析法,用SLR(1)表示。學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考2算法的基本思想2.1主要功能函數(shù)classWF{WF(charsi[],chars2[],intx,inty)WF(conststring&si,conststring&s2,intx,inty)booloperator<(constWF&a)constbooloperator==(constWF&a)constvoidprint()}□classClosure{voidprint(stringstr)booloperator==(constClosure&a)const}□voidmake_item()voiddfs(conststring&x)voidmake_first()voidappend(conststring&str1,conststring&str2)bool_check(constvector<int>&id,conststringstr)voidmake_follow()voidmake_set()voidmake_V()voidmake_cmp(vector<WF>&cmp1,inti,charch)voidmake_go()voidmake_table()voidprint(strings1,strings2,strings3,strings4,strings5,strings6,strings7)stringget_steps(intx)stringget_stk(vector<T>stk)stringget_shift(WF&temp)voidanalyse(stringsrc)2.2算法思想SLR文法構(gòu)造分析表的主要思想:許多沖突性的動作都可能通過考察有關(guān)非終結(jié)符的FOLLOW集而獲解決。解決沖突的方法:解決沖突的方法是分析所有含A和B的句型,考察集合FOLLOW(A)和FOLLOW(B),如果這兩個(gè)集合不相交,而且也不包含b,那么當(dāng)狀態(tài)I面臨輸入符號a時(shí),我們可以使用如下策略:假設(shè)a=b,則移進(jìn)。假設(shè)aEFOLLOW(A),則用產(chǎn)生式A-a進(jìn)行歸約;假設(shè)aEFOLLOW(B),則用產(chǎn)生式B-a進(jìn)行歸約;此外,報(bào)錯*SLR的基本算法:假定LR(0)標(biāo)準(zhǔn)族的一個(gè)項(xiàng)目集I中含有m個(gè)移進(jìn)項(xiàng)目A1—a?alBl,A2—a?a2B2,…,Am—a?amBm;同時(shí)含有n個(gè)歸約項(xiàng)目B1—a?,B2—a?,…,B3—a?,如果集合“1廣?,am},FOLLOW(B1),…,F(xiàn)OLLOW(Bn)兩兩不相交〔包括不得有兩個(gè)FOLLOW集合有世,則隱含在I中的動作沖突可以通過檢查現(xiàn)行輸入符號a屬于上述n+1個(gè)集合中的哪個(gè)集合而活的解決:假設(shè)a是某個(gè)ai,i=1,2,…,m,則移進(jìn)。假設(shè)aEFOLLOW(Bi),i=1,2,…,m,則用產(chǎn)生式Bi-a進(jìn)行歸約;此外,報(bào)錯這種沖突的解決方法叫做SLR⑴解決方法SLR語法分析表的構(gòu)造方法:首先把G拓廣為G',對G'構(gòu)造LR(0)項(xiàng)目集標(biāo)準(zhǔn)族C和活前綴識別自動機(jī)的狀態(tài)轉(zhuǎn)換函數(shù)GO。函數(shù)ACTION和GOTO可按如下方法構(gòu)造:假設(shè)項(xiàng)目A-a?bB屬于Ik,GO(Ik,a)=Ij,a為終結(jié)符,置ACTION氐a]為“把狀態(tài)j和符號a移進(jìn)?!?,簡記為“sj”;假設(shè)項(xiàng)目A-a?屬于Ik,那么,對任何非終結(jié)符a,aGFOLLOW(A),置ACTION氐a]為“用產(chǎn)生式A—a進(jìn)行歸約”,簡記為“rj”;其中,假定A—a為文法G'的第j個(gè)產(chǎn)生式假設(shè)項(xiàng)目S'—S?屬于Ik,則置ACTIONS#]為可“接受”,簡記為“acc”;假設(shè)GO(Ik,A)=Ij,A為非終結(jié)符,則置GOTO氐A(chǔ)]=j;分析表中凡不能用規(guī)則1至4填入信息的空白格均填上“出錯標(biāo)志”。語法分析器的初始狀態(tài)是包含S'—?S的項(xiàng)目集合的狀態(tài)SLR解決的沖突只是移進(jìn)規(guī)約沖突和規(guī)約規(guī)約沖突學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考3主要功能模塊流程圖3.1主函數(shù)功能流程圖圖3.1程序主要流程4系統(tǒng)測試7S->ES->EE->E十TE->E+TE->TE->TT->WT->T^FT->FT->FF->(E)F-海)F->iF->i圖4.1輸入 坎曰衣S->$Eback:Oid:OS->E$back:Oid:lE->$E+Tback:lid:2E->E$+Tback:!id:3E~>E+$Tback:1id:4E->E+T$back:lid:5E->$Tback:2id:6E->T$back:2id:7T-)■$T*Fback:3id:8T->T$*Fback:3id:9?->T^$Fback:3id:10T->T布back:3id:llT->$Fback:4id:12T->F$back:4id:13F->$(E)back:5id:14F'->($E)back:5id:15F'->(E$)back:5id:16F'->(E)$back:5id:17F'->$iback:6id:18F->i$back:6id:19圖4.2項(xiàng)目表學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考斗m_ p-jp。丁屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮斗_屮FIRST?={(,i}FIRST(F)=K,1}FIRSTCS)={(?ilFIRST(T)={(,il圖4.3FIRST集****:+■:率火率率牛率牛叱平叱FOLLOW集漆半牢牢牢********:+■:*火*火率FOLLOW疋)={為工+]”LLQW(?)={#,),料+}FOLLOW(S)={fi}FOLLOW(T)二沛,〕,禮+}圖4.4FOLLOW集CLOSURE closure-10E->$E+TE->$TF->$(E)F->$iS->$ET->$FT->$T+Fclosure-ILE->$E+TE->$TF->$(E)F->$iF->($E)T->JFT->$T+Eclasurs-I2E->E$+TS->E$closure-13T->F$clo5ure-I4E->T$T->T$+Fclosure-15F->i$clQsure-ISE->E$+TF->(E$)cloEure-I7E->E+$TF->$iT->$FT->$T+FcloEure-IBF->$(E)F->$iT->T+$FcLosure-ISF->(E)$closure-110E->E-HT$T->T$*Fclosure-111T->T+F?圖4.5CLOSURE表 EDGE.io—C—1110—E—1210—F—1310—T—141—15(—11II—ir—isII—T—14II—i—I5II—E—1612—--17f--IBTOC\o"1-5"\h\zh17)—19C—Il17—F—1317—i—1517—T—110IB—C—IlIB—i—15IB—F—Illno—IB圖4.6EDGE表升析表圖4.7LR(O)表學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考***mJ(f(t(t(t(t(tu(eftee+e+網(wǎng)e+einputti+i)+ifif詩i)+iti4i)+iffi]+iir)+itt)+itt)+itt:心###flIL11.IL,Lt—++++iw:t=:t=QperatiQnIstat0-etackshift10shift101reduce(F->i)015:reduce(T->F)013shift014shift0143reduce(F->i)01485reduce(T->T+F)014311reduce(E->T)014shiftQL5reduceOL購reduce(T_>F)Q3reduce(£_>T)gshiftshift027reduce(F->i)0275reduce(T->F)0273reduce(E:->E-^)02710Accept02ACTIDMSIS5R&R4SB£5R&R3R2S9R5dr11蟲6圖4.8文法分析步驟3105結(jié)論LR分析法是一種自下而上進(jìn)行標(biāo)準(zhǔn)歸約的語法分析方法。這里L(fēng)是指從左到右掃描輸入符號串。R是指構(gòu)造最右推倒的逆工程。這種分析法比遞歸下降分析法、預(yù)測分析法和算符優(yōu)先分析法對文法的限制要少得多。附錄程序源碼清單#include<iostream>#include<cstdio>#include〈algorithm〉#include<cstring>#include<cctype>#include<vector>#include<string>#include<queue>#include<map>#include<set>#include<sstream>#defineMAX507//#defineDEBUGusingnamespacestd#pragmawarning(disable:4996)classWF{public:stringleft,right;intback;intid;WF(chars1[],chars2[],intx,inty){left=s1;right=s2back=xid=y}WF(conststring&si,conststring&s2,intx,inty){left=si;right=s2back=xid=y}booloperator<(constWF&a)const{if(left==a.left)returnright<a.right;returnleft<a.left}booloperator==(constWF&a)const{return(left==a.left)&&(right==a.right);}voidprint(){printf("%s->%s\n",left.c_str(),right.c_str());}};classClosure{public:vector<WF>elementvoidprint(stringstr){printf("%-15s%-15s\n","",str.c_str())Dfor(inti=QDi<element.size()Di++)element[i].print()D}booloperator==(constClosure&a)const{if(a,element.size()!=element.size())returnfalse;for(inti=QDi<a.element.size();i++)if(element[i]==a.element[i])continue;elsereturnfalsereturntrue}};structContent{inttype;intnumstringout;Content(){type=-1;}Content(inta,intb):type(a),num(b){}};vector<WF>wfmap<string,vector<int>>dicmap<string,vector<int>>VN_set;map<string,bool>vis;stringstart="S";vector<Closure>collection;vector<WF>items;學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考charCH='intgo[MAX][MAX]Dintto[MAX];vector<char>V;boolused[MAX];Contentaction[MAX][MAX]DintGoto[MAX][MAX]Dmap<string,set<char>>firstmap<string,set<char>>follow;voidmake_item(){memset(to,-1,sizeof(D1));for(inti=0;i<wf.size();i++)VN_set[wf[i].left].push_back(i);for(inti=0;i<wf.size();i++)for(intj=0;j<=wf[i].right.length();j++){stringtemp=wf[i].righttemp.insert(temp.begin()+j,CH);dic[wf[i].left].push_back(items.size());if(j)to[items.size()-1]=items.size();items.push_back(WF(wf[i].left,temp,i,items.size()));}#ifdefDEBUGputs(" 項(xiàng)目表 ");for(inti=0;i<items.size();i++)printf("%s->%sback:%did:%d\n",items[i].left.c_str(),items[i].right.c_str(),items[i].back,items[i].id);
puts("#endif}voiddfs(conststring&x){if(vis[x])returnvis[x]=vector<int>&id=VN_set[x]Dfor(inti=0;i<id.size();i++){string&left=wf[id[i]].left;string&right=wf[id[i]].right;for(intj=0;j<right.length()Dj++)if(isupper(right[j])){1)];dfs(right.substr(j,1)];set<char>&temp=first[right.substr(j,set<char>::iteratorit=temp.begin()0boolflag=truefor(0it!=temp.end()0it++){if(*it=='?')flag=false;first[left].insert(*it)0}if(flag)break;}else{first[left].insert(right[j]);break}}}voidmake_first(){vis.clear();map<string,vector<int>>::iteratorit2=dic.begin()Dfor(;it2!=dic.end()Dit2++)if(vis[it2D>first])continue;elsedfs(it2D>first)D#ifdefDEBUGputs("****************first^集***************************");map<string,set<char>>::iteratorit=first.begin()Dfor(;it!=first.end()Dit++){printf("FIRST(%s)=(",it->first.c_str())Dset<char>&temp=it->secondset<char>::iteratorit1=temp.begin()Dboolflag=falsefor(;it1!=temp.end()Dit1++){if(flag)printf(",");printf("%c",*it1);flag=true;}puts("}");}#endifvoidappend(conststring&strl,conststring&str2){set<char>&from=follow[strl]Dset<char>&to=follow[str2]Dset<char>::iteratorit=from.begin()Dfor(;it!=from.end()Dit++)to.insert(*it);}bool_check(constvector<int>&id,conststringstr){for(inti=0;i<id.size()Di++){intx=id[i]Dif(wf[x].right==str)returntrue;}returnfalseO}voidmakefollow()while(true){boolgoon=false;map<string,vector<int>>::iteratorit2=VN_set.begin()Ofor(Oit2!=VN_set.end()Oit2++){vector<int>&id=it2->secondfor(inti=0;i<id.size()Oi++){boolflag=trueWF&tt=wf[id[i]]O
string&left=tt.leftconststring&right=tt.rightfor(intj=right.length()-1;j>=0;jDD)if(isupper(right[j])){if(flag){inttx=follow[right.substr(j,1)],size();append(left,right.substr(j,1))0inttx1=follow[right.substr(j,1)],size()0if(tx1>tx)goon=true;if(_check(id,"~"))flag=false}for(intk=j+1;k<right.length();k++)if(isupper(right[k])){stringidd=right.substr(k,1);set<char>&from=first[idd];1)];1)].size();set<char>&to=follow[1)];1)].size();set<char>::iteratorit1=from.begin();inttx=follow[right.substr(j,for(;it1!=from.end();it1++)if(*it1!='~')to.insert(*it1);inttx1=follow[right.substr(j,11)].size();if(tx1>tx)goon=true;if(_check(id,break}else{inttx=follow[right.substr(j,1)].size()Dfollow[right.substr(j,1)].insert(right[k])Dinttx1=follow[right.substr(j,1)].size()Dif(tx1>tx)goon=true;break;}}elseflag=false}}if(!goon)break}#ifdefDEBUGputs(”***************followputs(”***************follow^集*******************map<string,set<char>>::iteratorit=follow.begin()Dfor(;it!=follow.end()Dit++){printf("FOLLOW(%s)={",it->first.c_str())Dset<char>&temp=it->secondDtemp.insert('#')1set<char>::iteratorit1=temp.begin();boolflag=false;for(;it1!=temp.end()Dit1++){if(flag)printf(",")Dprintf("%c",*it1);flag=true}puts("}")D}#endif}voidmake_set(){boolhas[MAX];for(inti=0;i<items.size();i++)if(items[i].left[0]=='S'&&items[i].right[0]==CH){ClosuretempDstring&str=items[i].right;vector<WF>&element=temp.element;element.push_back(items[i])Dsize_tx=0;for(x=0;x<str.length();x++)if(str[x]==CH)break;memset(has,0,sizeof(has));has[i]=1;if(x!=str.length()-1){
queue<string>qDq.push(str.substr(x+1,1))Dwhile(!q.empty()){stringu=q.front()Dq.pop()Dvector<int>&id=dic[u]Dfor(size_tj=0Dj<id.size()Dj++){inttx=id[j]Dif(items[tx].right[0]==CH){if(has[tx])continue;has[tx]=1if(isupper(items[tx].right[1]))q.push(items[tx].right.substr(1,element.push_back(items[tx]);}}}}collection.push_back(temp);}for(sizeti=0;i<collection.size();i++){map<int,Closure〉tempfor(size_tj=0Dj<collection[i].element.size()D{stringstr=collection[i].element[j].right1));j++)size_tx1));j++)學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考學(xué)習(xí)文檔僅供參考for(;x<str.length()Dx++)if(str[x]==CH)break;if(x==str.length()-1)continue;inty=str[x+1]Dintiistr.erase(str.begin()+x)Dstr.insert(str.begin()+x+1,CH);WFcrop=WF(collection[i].element[j].left,str,-1,-1)1for(size_tk=0;k<items.size();k++)if(items[k]==cmp){ii=k;break;}memset(has,0,sizeof(has));vector<WF>&element=temp[y].elementelement.push_back(items[ii]);has[ii]=1x++;if(x!=str.length()-1){queue<string>q;q.push(str.substr(x+1,1));while(!q.empty()){stringu=q.front();q.pop();vector<int>&id=dic[u];for(size_tj=I;j<id.size();j++){inttx=id[j]Dif(items[tx].right[0]==CH){if(has[tx])continue;has[tx]=1if(isupper(items[tx].right[1]))q.push(items[tx].right.substr(1,1))0element.push_back(items[tx])0}}}}}map<int,Closure>::iteratorit=temp.begin()0for(0it!=temp.end()0it++)collection.push_back(it->second)0for(sizeti=00i<collection.size()0i++)sort(collection[i].element.begin(),collection[i].element.end())0for(size_ti=(0i<collection.size()0i++)for(size_tj=i+10j<collection.size()0j++)if(collection[i]==collection[j])collection.erase(collection.begin()+j)0}#ifdefDEBUGputs(" CLOSURE ")0stringstreamsin0for(size_ti=00i<collection.size()0i++){sin.clear();stringoutDsin<<"closure-I"<<iDsin>>outcollection[i].print(out)D}puts("")D#endif}voidmake_V(){memset(used,0,sizeof(used));for(size_ti=Di<wf.size()Di++)string&str=wf[i].leftfor(size_tj=(Dj<str.length()Dj++){if(used[str[j]])continue;used[str[j]]=1DV.push_back(str[j])D}string&strl=wf[i].rightfor(size_tj=(Dj<strl.length()Dj++){if(used[strl[j]])continueused[strl[j]]=1V.push_back(strl[j])D}}
sort(V.begin(),V.end())0V.push_back('#')0voidmake_cmp(vector<WF>&cmpl,inti,charch)voidfor(size_tj=10j<collection[i].element.size()0j++)forstringstr=collection[i].element[j].right;sizetksizetk0for(for(k=00k<str.length()0k++)if(if(str[k]==CH)breakif(k!=str.length()-1&&str[k+1]==ch)ifstr.erase(str.begin()+k)0str.insert(str.begin()+k+1,CH)0cmp1.push_back(WF(collection[i].element[j].left,str,-1,-1))0sort(cmp1.begin(),cmp1.end())0voidmake_go(){memset(go,-1,sizeof(go))0intm=collection.size()0for(size_tt=0t<V.size()0t++){charch=V[t]Dfor(inti=QDi<m;i++){vector<WF>cmplmake_cmp(cmpl,i,ch)D#ifdefDEBUGcout<<cmp1.size()<<endl#endifif(cmp1.size()==0)continue;for(intj=0Dj<mDj++){vector<WF>cmp2Dfor(size_tk=(Dk<collection[j].element.size()Dk++){string&str=collection[j].element[k].right;size_tx;for(x=Q;x<str.length();x++)if(str[x]==CH)breakif(x&&str[x-1]==ch)cmp2.push_back(WF(collection[j].element[k].left,str,-1,-1));}sort(cmp2.begin(),cmp2.end())1#ifdefDEBUGcout<<cmp2.size()<<endl;#endifboolflag=trueif(cmp2.size()!=cmp1.size())continue#ifdefDEBUGcout<<cmpl.size()<<endlD#endiffor(size_tk=(;k<cmpl.size();k++)if(cmp1[k]==cmp2[k])continue;elseflag=false#ifdefDEBUGcout<<"out"<<endl;#endifif(flag)go[i][ch]=j}}}#ifdefDEBUGputs(" EDGE ");stringstreamsinDstringout;for(inti=0Di<m;i++)for(intj=0;j<m;j++)for(intk=0;k<MAX;k++)if(go[i][k]==j){sin.clear();sin<<"I"<<i<<"--"<<(char)(k)<<"--I"<<j;sin>>out;printf("%s\n",out.c_str());#endifvoidmake_table(){memset(Goto,-1,sizeof(Goto));for(size_ti=;i<collection.size();i++)for(size_tj=(;j<V.size();j++){charch=V[j];intx=go[i][ch]Dif(x==-1)continueif(!isupper(ch))action[i][ch]=Content(0,x)DelseGoto[i][ch]=x;}//writerandacctothetablefor(inti=0;i<collection.size()Di++)for(intj=0;j<collection[i].element.size()Dj++){WF&tt=collection[i].element[j];if(tt.right[tt.right.length()-1]==CH){if(tt.left[0]=='S')action[i]['#']=Content(2,-1);elsefor(intk=0;k<V.size();k++){inty=V[k];if(!follow[tt.left].count(V[k]))continueaction[i][y]=Content(1,tt.back);#ifdefDEBUGputs("LR(0)分析表printf("%10s%5c%5s","|",V[0],"|");for(inti=1;i<V.size();i++)printf("%5c%5s",V[i],"|")Dputs("");for(inti=0;i<(V.sizefor(inti=0;i<printf("_");puts("");stringstreamsin;for(intifor(inti=0;i<collection.size();i++)printf("%5d%5s",i,"|");for(intj=0;j<V.size();j++)charch=V[j];if(isupper(ch))if(Goto[i][ch]==-1)printf("%10s","|");elseprintf("%5d%5s",Goto[i][ch],"|");elsesin.clear();if(action[i][ch].type==-1)printf("%10s","|")Delse{Content&temp=action[i][ch]Dif(temp.type==0)sin<<"S"if(temp.type==1)sin<<"R"if(temp.type==2)sin<<"acc";if(temp.num!=-1)sin<<temp.numsin>>temp.outprintf("%7s%3s",temp.out.c_str(),"|");}}}puts("");}for(inti=0;i<(V.size()+1)*10;i++)printf("_");puts("");#endif}voidprint(strings1,strings2,strings3,strings4,strings5,strings6,strings7){printf("%-15s|%-15s%-15s%-20s|%-15s%-15s%-15s\n",si.c_str(),s2.c_str(),s3.c_str(),s4.c_str(),s5.c_str(),s6.c_str(),s7.c_str())D}stringget_steps(intx){strings
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 關(guān)聯(lián)企業(yè)合同范例
- 2025年上海貨運(yùn)從業(yè)資格證考試答案
- 2025年崇左貨運(yùn)上崗證考試考哪些科目
- 2025年邯鄲貨車叢業(yè)資格證考試題
- 低壓車回收合同范本
- 農(nóng)村建房裝修合同范本
- 養(yǎng)殖合作加盟協(xié)議合同范本
- 農(nóng)耕地出租合同范本
- 傳媒簽約合同范本
- 加氣站合同范本
- 安徽省名校2022-2023學(xué)年高一下學(xué)期開學(xué)考試生物試題(含答案)
- 燃?xì)庠畹臓I銷方案和策略
- 血庫輸血培訓(xùn)課件
- 《文化人類學(xué)電子》課件
- 教育專家報(bào)告合集:年度得到:沈祖蕓全球教育報(bào)告(2023-2024)
- 兒童尿道黏膜脫垂介紹演示培訓(xùn)課件
- 靜壓樁施工技術(shù)交底
- 《酒店客房管理課件》
- 服裝市場調(diào)研報(bào)告
- 醫(yī)院維修施工方案施工方案
- 第四單元細(xì)胞的物質(zhì)輸入和輸出(單元教學(xué)設(shè)計(jì))高一生物(人教版2019必修1)
評論
0/150
提交評論