




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
院系:计算机学院实验课程:编译原理及实践实验课程实验项目TINY扩充语言的语法分析指导老师:XXX开课时间:XXXX〜XXXX年度第1学期专业:XXXXX班级:XXXX级本XX班学生:XXX学号:XXXX实验二:TINY扩充语言的语法分析一、实验题目扩充的语法规则有:实现while、dowhile、for语句和求余计算式子,具体文法规则自行构造。可参考:P97及P136的文法规则。While-stmt-->whileexpdostmt-sequenceendwhileDowhile-stmt-->dostmt-sequencewhileexpfor-stmt-->foridentifier:=simple-exptosimple-expdostmt-sequenceenddo步长递增1for-stmt-->foridentifier:=simple-expdowntosimple-expdostmt-sequenceenddo 步长递减1二、 实验要求要提供一个源程序编辑界面,以让用户输入源程序(可保存、打开源程序)。可由用户选择是否生成语法树,并可查看所生成的语法树。应该书写完善的软件文档。三、 实验思路本次实验是扩充TINY语言的语法分析,主要扩充的语法是while、dowhile、for,通过添加三个函数来进行实现,函数声明如下表示:/*新增加的函数声明语句*/staticTreeNode*while_stmt(void);staticTreeNode*dowhile_stmt(void);staticTreeNode*for_stmt(void);/*新增加的函数声明语句结束*/由于附录B所给的代码中,scan.cpp用于完成词法分析、parse・cpp用于完成语法分析、ut订.cpp用于完成结果的显示,以及main.cpp作为主函数实现交互,因此主要修改这几个函数的部分内容即可,具体修改内容如下所述。由于要对新增加的语法进行词法分析和语法分析,所以需要先定义相关保留字,而保留字是在globals.h中定义的,所以要在globals.h下定义一下内容:在typedefenum{}TokenType中添加保留字:WHILE,DO,FOR,TO,DOWNTO,ENDWHILE,ENDDO,MOD, //新增加的保留字;在typedefenum{}StmtKind中添加语句类型:WhileK,DowhileK,ForIncK,ForDecK //新增加的语句类型把MAXRESERVED由8改为15:#defineMAXRESERVED15 //将原来的8改为15在scan.cpp中对结构类型staticstruct{}添加相关保留字,并在TokenTypegetToken(void)中swicth判断中添加求余的代码,具体如下:staticstruct{}添加代码:{"do",DO},{"for",FOR},{"endwhile",ENDWHILE},{"enddo",ENDDO},{"to",TO},{"downto",DOWNTO}//新增加的保留字TokenTypegetToken(void){}添加代码:case'%': //添加求余的代码currentToken=MOD;break; //添加求余代码结束在parse.cpp中新增while/dowhile/for三个函数并对相关的语句进行修改,具体如下所述:对新扩充的while文法函数进行定义:TreeNode*while_stmt(void) //新扩充的while文法{TreeNode*t=newStmtNode(WhileK);match(WHILE);if(t!=NULL)t->child[0]=exp();match(DO);if(t!=NULL)t->child[1]=stmt_sequence();match(ENDWHILE);returnt;}对新扩充的dowhile文法函数进行定义:TreeNode*dowhile_stmt(void)//新扩充的dowhile文法{TreeNode*t=newStmtNode(DowhileK);match(DO);if(t!=NULL)t->child[0]=stmt_sequence();match(WHILE);if(t!=NULL)t->child[1]=exp();returnt;}对新扩充的for文法函数进行定义:TreeNode*for_stmt(void)//新扩充的for文法{TreeNode*t=newStmtNode(ForIncK);match(FOR);if(t!=NULL){t->child[0]=assign_stmt();if(token==TO) //实现步长递增1match(TO);elseif(token==DOWNTO)//实现步长递减1{match(DOWNTO);t->kind.stmt=ForDecK;}t->child[1]=simple_exp();match(DO);t->child[2]=stmt_sequence();match(ENDDO);}returnt;}④在TreeNode*stmt_sequence(void){}的while中添加以下代码:&&(token!=ENDDO)&&(token!=ENDWHILE)&&(token!=WHILE)) //新增加的循环判断语句,避免嵌套循环在TreeNode*statement(void){的switch(token)中添加以下代码:/*新添加的内容,实现求余操作*/caseWHILE:t=while_stmt();break;caseDO:t=dowhile_stmt();break;caseFOR:t=for_stmt();break;/*求余内容操作结束*/在TreeNode*term(void){}中添加求余代码:||(token==MOD))//此处为新增加的求余操作在util.cpp中添加界面显示的代码,具体如下所述:①在voidprintToken(TokenTypetoken,constchar*tokenstring的swicth中添加以下代码:/*添加与保留字相对应的内容*/caseWHILE:caseDO:caseFOR:caseENDWHILE:caseENDDO:caseTO:caseDOWNTO:/*增加以上部分内容*//*添加的保留字内容*/caseMOD:fprintf(listing,"%c\n",ch);break;/*以上部分为添加的内容*/②在voidprintTree(TreeNode*tree){的switch中添加以下代码:/*添加以下部分内容*/caseWhileK:fprintf(listing,"While\n");break;caseDowhileK:fprintf(listing,"Do\n");break;caseForIncK:fprintf(listing,"For(递增)\n");break;caseForDecK:fprintf(listing,"For(递减)\n");break;/*以上为添加的内容*/四、源代码此处只给出修改过的cpp文件和头文件的代码,其他代码可直接查看源程序:globals.h代码:TOC\o"1-5"\h\z/*File:globals.h *//*GlobaltypesandvarsforTINYcompiler *//*mustcomebeforeotherincludefiles *//*CompilerConstruction:PrinciplesandPractice*//*KennethC.Louden */#ifndef_GLOBALS_H_#define_GLOBALS_H_#include<stdio.h>#include<stdlib.h>#include<ctype.h>#include<string.h>#ifndefFALSE#defineFALSE0#endif#ifndefTRUE#defineTRUE1#endif/*MAXRESERVED=thenumberofreservedwords*/#defineMAXRESERVED15 //将原来的8改为15typedefenum/*book-keepingtokens*/{ENDFILE,ERROR,/*reservedwords*/IF,THEN,ELSE,END,REPEAT,UNTIL,READ,WRITE,WHILE,DO,FOR,TO,DOWNTO,ENDWHILE,ENDDO,MOD, //新增加的保留字/*multicharactertokens*/ID,NUM,/*specialsymbols*/ASSIGN,EQ,LT,PLUS,MINUS,TIMES,OVER,LPAREN,RPAREN,SEMI}TokenType;externFILE*source;/*sourcecodetextfile*/externFILE*listing;/*listingoutputtextfile*/externFILE*code;/*codetextfileforTMsimulator*/externintlineno;/*sourcelinenumberforlisting*/Syntaxtreeforparsing************/typedefenum{StmtK,ExpK}NodeKind;typedefenum{IfK,RepeatK,AssignK,ReadK,WriteK,//新增加的语句类型://新增加的语句类型:WhileK,DowhileK,ForIncK,ForDecK}StmtKind;typedefenum{OpK,ConstK,IdK}ExpKind;/*ExpTypeisusedfortypechecking*/typedefenum{Void,Integer,Boolean}ExpType;#defineMAXCHILDREN3typedefstructtreeNode{structtreeNode*child[MAXCHILDREN];structtreeNode*sibling;intlineno;NodeKindnodekind;union{StmtKindstmt;ExpKindexp;}kind;union{TokenTypeop;intval;char*name;}attr;ExpTypetype;/*fortypecheckingofexps*/}TreeNode;Flagsfortracing/*EchoSource=TRUEcausesthesourceprogramto*beechoedtothelistingfilewithlinenumbers*duringparsing*/externintEchoSource;/*TraceScan=TRUEcausestokeninformationtobe*printedtothelistingfileaseachtokenis*recognizedbythescanner*/externintTraceScan;/*TraceParse=TRUEcausesthesyntaxtreetobe*printedtothelistingfileinlinearizedform*(usingindentsforchildren)*/externintTraceParse;/*TraceAnalyze=TRUEcausessymboltableinserts
*andlookupstobereportedtothelistingfile*/externintTraceAnalyze;/*TraceCode=TRUEcausescommentstobewritten*totheTMcodefileascodeisgenerated*/externintTraceCode;/*Error=TRUEpreventsfurtherpassesifanerroroccurs*/externintError;#endif*/scan.cpp代码:*//*File:scan.c/*ThescannerimplementationfortheTINYcompiler*//*CompilerConstruction:PrinciplesandPractice*//*KennethC.Louden */#include"globals.h"#include"util.h"#include"scan.h"/*statesinscannerDFA*/typedefenum{START,INASSIGN,INCOMMENT,INNUM,INID,DONE}StateType;/*lexemeofidentifierorreservedword*/chartokenString[MAXTOKENLEN+1];/*BUFLEN=lengthoftheinputbufferforsourcecodelines*/#defineBUFLEN256staticcharlineBuf[BUFLEN];/*holdsthecurrentline*/staticintlinepos=0;/*currentpositioninLineBuf*/staticintbufsize=0;/*currentsizeofbufferstring*/staticintEOF_flag=FALSE;/*correctsungetNextCharbehavioronEOF*//*getNextCharfetchesthenextnon-blankcharacterfromlineBuf,readinginanewlineiflineBufisexhausted*/staticintgetNextChar(void){if(!(linepos<bufsize)){lineno++;if(fgets(lineBuf,BUFLEN-1,source)){if(EchoSource)fprintf(listing,"%4d:%s",lineno,lineBuf);bufsize=strlen(lineBuf);linepos=0;returnlineBuf[linepos++];}else{EOF_flag=TRUE;returnEOF;}}elsereturnlineBuf[linepos++];}/*ungetNextCharbacktracksonecharacterinlineBuf*/staticvoidungetNextChar(void){if(!EOF_flag)linepos--;}/*lookuptableofreservedwords*/staticstruct{char*str;TokenTypetok;}reservedWords[MAXRESERVED]={{"if",IF},{"then",THEN},{"else",ELSE},{"end",END},{"repeat",REPEAT},{"until",UNTIL},{"read",READ},{"write",WRITE},{"while",WHILE},{"do",DO},{"for",FOR},{"endwhile",ENDWHILE},{"enddo",ENDDO},{"to",TO},{"downto",DOWNTO}//新增加的保留字};/*lookupanidentifiertoseeifitisareservedword*//*useslinearsearch*/staticTokenTypereservedLookup(char*s){inti;for(i=0;i<MAXRESERVED;i++)if(!strcmp(s,reservedWords[i].str))returnreservedWords[i].tok;returnID;/*/*theprimaryfunctionofthescanner*//*/*functiongetTokenreturnsthe*nexttokeninsourcefile*/TokenTypegetToken(void){/*indexforstoringintotokenString*/inttokenStringIndex=0;/*holdscurrenttokentobereturned*/TokenTypecurrentToken;/*currentstate-alwaysbeginsatSTART*/StateTypestate=START;/*flagtoindicatesavetotokenString*/intsave;while(state!=DONE){intc=getNextChar();save=TRUE;switch(state){caseSTART:if(isdigit(c))state=INNUM;elseif(isalpha(c))state=INID;elseif(c==':')state=INASSIGN;elseif((c=='')||(c=='\t')||(c=='\n'))save=FALSE;elseif(c=='{'){save=FALSE;state=INCOMMENT;}else{state=DONE;switch(c){caseEOF:save=FALSE;currentToken=ENDFILE;break;case'=':currentToken=EQ;break;case'<':currentToken=LT;break;case'+':currentToken=PLUS;break;case'-':currentToken=MINUS;break;case'*':currentToken=TIMES;break;case'/':currentToken=OVER;break;case'%': //添加求余的代码currentToken=MOD;break; //添加求余代码结束case'(':currentToken=LPAREN;break;case')':currentToken=RPAREN;break;case';':currentToken=SEMI;break;default:currentToken=ERROR;break;}}break;caseINCOMMENT:save=FALSE;if(c==EOF){state=DONE;currentToken=ENDFILE;}elseif(c=='}')state=START;break;caseINASSIGN:state=DONE;if(c=='=')currentToken=ASSIGN;else{/*backupintheinput*/ungetNextChar();save=FALSE;currentToken=ERROR;}break;caseINNUM:if(!isdigit(c)){/*backupintheinput*/ungetNextChar();save=FALSE;state=DONE;currentToken=NUM;}break;caseINID:if(!isalpha(c)){/*backupintheinput*/ungetNextChar();save=FALSE;state=DONE;currentToken=ID;}break;caseDONE:default:/*shouldneverhappen*/fprintf(listing,"ScannerBug:state=%d\n",state);state=DONE;currentToken=ERROR;break;}if((save)&&(tokenStringIndex<=MAXTOKENLEN))tokenString[tokenStringIndex++]=(char)c;if(state==DONE){tokenString[tokenStringIndex]='\0';if(currentToken==ID)currentToken=reservedLookup(tokenString);}}if(TraceScan){fprintf(listing,"\t%d:",lineno);printToken(currentToken,tokenString);}returncurrentToken;}/*endgetToken*/parse・cpp代码:/*File:parse.c*//*TheparserimplementationfortheTINYcompiler*//*CompilerConstruction:PrinciplesandPractice*//*KennethC.Louden*/#include"globals.h"#include"util.h"#include"scan.h"#include"parse.h"staticTokenTypetoken;/*holdscurrenttoken*//*functionprototypesforrecursivecalls*/staticTreeNode*stmt_sequence(void);staticTreeNode*statement(void);staticTreeNode*if_stmt(void);staticTreeNode*repeat_stmt(void);staticTreeNode*assign_stmt(void);staticTreeNode*read_stmt(void);staticTreeNode*write_stmt(void);/*新增加的函数声明语句*/staticTreeNode*while_stmt(void);staticTreeNode*dowhile_stmt(void);staticTreeNode*for_stmt(void);/*新增加的函数声明语句结束*/staticTreeNode*exp(void);staticTreeNode*simple_exp(void);staticTreeNode*term(void);staticTreeNode*factor(void);staticvoidsyntaxError(char*message){fprintf(listing,"\n>>>");fprintf(listing,"Syntaxerroratline%d:%s",lineno,message);Error=TRUE;staticvoidmatch(TokenTypeexpected){if(token==expected)token=getToken();else{syntaxError("unexpectedtoken->");printToken(token,tokenString);fprintf(listing,"");}}TreeNode*stmt_sequence(void){TreeNode*t=statement();TreeNode*p=t;while((token!=ENDFILE)&&(token!=END)&&(token!=ELSE)&&(token!=UNTIL)&&(token!=ENDDO)&&(token!=ENDWHILE)&&(token!=WHILE))//新增加的循环判断语句,避免嵌套循环{TreeNode*q;match(SEMI);q=statement();if(q!=NULL){if(t==NULL)t=p=q;else/*nowpcannotbeNULLeither*/{p->sibling=q;p=q;}}}returnt;}TreeNode*statement(void){TreeNode*t=NULL;switch(token){caseIF:t=if_stmt();break;caseREPEAT:t=repeat_stmt();break;caseID:t=assign_stmt();break;caseREAD:t=read_stmt();break;caseWRITE:t=write_stmt();break;/*新添加的内容,实现求余操作*/caseWHILE:t=while_stmt();break;caseDO:t=dowhile_stmt();break;caseFOR:t=for_stmt();break;/*求余内容操作结束*/default:syntaxError("unexpectedtoken->");printToken(token,tokenString);token=getToken();break;}/*endcase*/returnt;}TreeNode*if_stmt(void){TreeNode*t=newStmtNode(IfK);match(IF);if(t!=NULL)t->child[0]=exp();match(THEN);if(t!=NULL)t->child[1]=stmt_sequence();if(token==ELSE){match(ELSE);if(t!=NULL)t->child[2]=stmt_sequence();}match(END);returnt;}TreeNode*repeat_stmt(void){TreeNode*t=newStmtNode(RepeatK);match(REPEAT);if(t!=NULL)t->child[0]=stmt_sequence();match(UNTIL);if(t!=NULL)t->child[1]=exp();returnt;}TreeNode*assign_stmt(void){TreeNode*t=newStmtNode(AssignK);if((t!=NULL)&&(token==ID))t->=copyString(tokenString);match(ID);match(ASSIGN);if(t!=NULL)t->child[0]=exp();returnt;}TreeNode*read_stmt(void){TreeNode*t=newStmtNode(ReadK);match(READ);if((t!=NULL)&&(token==ID))t->=copyString(tokenString);match(ID);returnt;}TreeNode*write_stmt(void){TreeNode*t=newStmtNode(WriteK);match(WRITE);if(t!=NULL)t->child[0]=exp();returnt;}/*以下部分为新增加的内容*/TreeNode*while_stmt(void) //新扩充的while文法{TreeNode*t=newStmtNode(WhileK);match(WHILE);if(t!=NULL)t->child[0]=exp();match(DO);if(t!=NULL)t->child[1]=stmt_sequence();match(ENDWHILE);returnt;}TreeNode*dowhile_stmt(void)//新扩充的dowhile文法{TreeNode*t=newStmtNode(DowhileK);match(DO);if(t!=NULL)t->child[0]=stmt_sequence();match(WHILE);if(t!=NULL)t->child[1]=exp();returnt;}TreeNode*for_stmt(void)//新扩充的for文法{TreeNode*t=newStmtNode(ForIncK);match(FOR);if(t!=NULL){t->child[0]=assign_stmt();if(token==TO) //实现步长递增1match(TO);elseif(token==DOWNTO)//实现步长递减1{match(DOWNTO);t->kind.stmt=ForDecK;}t->child[1]=simple_exp();match(DO);t->child[2]=stmt_sequence();match(ENDDO);}returnt;}/*新增加的内容到此结束*/TreeNode*exp(void){TreeNode*t=simple_exp();if((token==LT)||(token==EQ)){TreeNode*p=newExpNode(OpK);if(p!=NULL){p->child[0]=t;p->attr.op=token;t=p;}match(token);if(t!=NULL)t->child[1]=simple_exp();}returnt;}TreeNode*simple_exp(void){TreeNode*t=term();while((token==PLUS)||(token==MINUS)){TreeNode*p=newExpNode(OpK);if(p!=NULL){p->child[0]=t;p->attr.op=token;t=p;match(token);t->child[1]=term();}returnt;}TreeNode*term(void){TreeNode*t=factor();while((token==TIMES)||(token==OVER)||(token==MOD))//此处为新增加的求余操作{TreeNode*p=newExpNode(OpK);if(p!=NULL){p->child[0]=t;p->attr.op=token;t=p;match(token);p->child[1]=factor();}}returnt;}TreeNode*factor(void){TreeNode*t=NULL;switch(token){caseNUM:t=newExpNode(ConstK);if((t!=NULL)&&(token==NUM))t->attr.val=atoi(tokenString);match(NUM);break;caseID:t=newExpNode(IdK);if((t!=NULL)&&(token==ID))t->=copyString(tokenString);match(ID);break;caseLPAREN:match(LPAREN);t=exp();match(RPAREN);break;default:syntaxError("unexpectedtoken->");printToken(token,tokenString);token=getToken();break;}returnt;}/*/*theprimaryfunctionoftheparser*//*/*Functionparsereturnsthenewly*constructedsyntaxtree*/TreeNode*parse(void){TreeNode*t;token=getToken();t=stmt_sequence();if(token!=ENDFILE)syntaxError("Codeendsbeforefile\n");returnt;}util.cpp代码:TOC\o"1-5"\h\z/*File:util.c *//*Utilityfunctionimplementation *//*fortheTINYcompiler *//*CompilerConstruction:PrinciplesandPractice*//*KennethC.Louden */#include"globals.h"#include"util.h"/*ProcedureprintTokenprintsatoken*anditslexemetothelistingfile*/voidprintToken(TokenTypetoken,constchar*tokenString){charch='%';switch(token){caseIF:caseTHEN:caseELSE:caseEND:caseREPEAT:caseUNTIL:caseREAD:caseWRITE:/*添加与保留字相对应的内容*/caseWHILE:caseDO:caseFOR:caseENDWHILE:caseENDDO:caseTO:caseDOWNTO:/*增加以上部分内容*/fprintf(listing,"reservedword:%s\n",tokenString);break;caseASSIGN:fprintf(listing,":=\n");break;caseLT:fprintf(listing,"<\n");break;caseEQ:fprintf(listing,"=\n");break;caseLPAREN:fprintf(listing,"(\n");break;caseRPAREN:fprintf(listing,")\n");break;caseSEMI:fprintf(listing,";\n");break;casePLUS:fprintf(listing,"+\n");break;caseMINUS:fprintf(listing,"-\n");break;caseTIMES:fprintf(listing,"*\n");break;caseOVER:fprintf(listing,"/\n");break;/*添加的保留字内容*/caseMOD:fprintf(listing,"%c\n",ch);break;/*以上部分为添加的内容*/caseENDFILE:fprintf(listing,"EOF\n");break;caseNUM:fprintf(listing,"NUM,val=%s\n",tokenString);break;caseID:fprintf(listing,"ID,name=%s\n",tokenString);break;caseERROR:fprintf(listing,"ERROR:%s\n",tokenString);break;default:/*shouldneverhappen*/fprintf(listing,"Unknowntoken:%d\n",token);/*FunctionnewStmtNodecreatesanewstatement*nodeforsyntaxtreeconstruction*/TreeNode*newStmtNode(StmtKindkind){TreeNode*t=(TreeNode*)malloc(sizeof(TreeNode));inti;if(t==NULL)fprintf(listing,"Outofmemoryerroratline%d\n",lineno);else{for(i=0;i<MAXCHILDREN;i++)t->child[i]=NULL;t->sibling=NULL;t->nodekind=StmtK;t->kind.stmt=kind;t->lineno=lineno;}returnt;}/*FunctionnewExpNodecreatesanewexpression*nodeforsyntaxtreeconstruction*/TreeNode*newExpNode(ExpKindkind){TreeNode*t=(TreeNode*)malloc(sizeof(TreeNode));inti;if(t==NULL)fprintf(listing,"Outofmemoryerroratline%d\n",lineno);else{for(i=0;i<MAXCHILDREN;i++)t->child[i]=NULL;t->sibling=NULL;t->nodekind=ExpK;t->kind.exp=kind;t->lineno=lineno;t->type=Void;}returnt;}/*FunctioncopyStringallocatesandmakesanew*copyofanexistingstring*/char*copyString(char*s){intn;char*t;if(s==NULL)returnNULL;n=strlen(s)+1;t=(char*)malloc(n);if(t==NULL)fprintf(listing,"Outofmemoryerroratline%d\n",lineno);elsestrcpy(t,s);returnt;}/*VariableindentnoisusedbyprintTreeto*storecurrentnumberofspacestoindent*/staticindentno=0;/*macrostoincrease/decreaseindentation*/#defineINDENTindentno+=2#defineUNINDENTindentno-=2/*printSpacesindentsbyprintingspaces*/staticvoidprintSpaces(void){inti;for(i=0;i<indentno;i++)fprintf(listing,"");}/*procedureprintTreeprintsasyntaxtreetothe*listingfileusingindentationtoindicatesubtrees*/voidprintTree(TreeNode*tree){inti;INDENT;while(tree!=NULL){printSpaces();if(tree->nodekind==StmtK){switch(tree->kind.stmt){caseIfK:fprintf(listing,"If\n");break;caseRepeatK:fprintf(listing,"Repeat\n");break;caseAssignK:fprintf(listing,"Assignto:%s\n",tree->);break;caseReadK:fprintf(listing,"Read:%s\n",tree->);break;caseWriteK:fprintf(listing,"Write\n");break;/*添加以下部分内容*/caseWhileK:fprintf(listing,"While\n");break;caseDowhileK:fprintf(listing,"Do\n");break;caseForIncK:fprintf(listing,"For(递增)\n");break;caseForDecK:fprintf(listing,"For(递减)\n");break;/*以上为添加的内容*/default:fprintf(listing,"UnknownExpNodekind\n");break;}}elseif(tree->nodekind==ExpK){switch(tree->kind.exp){caseOpK:fprintf(listing,"Op:");printToken(tree->attr.op,"\0");break;caseConstK:fprintf(listing,"Const:%d\n",tree->attr.val);break;caseIdK:fprintf(listing,"Id:%s\n",tree->);break;default:fprintf(listing,"UnknownExpNodekind\n");break;}}elsefprintf(listing,"Unknownnodekind\n");
for(i=0;i<MAXCHILDREN;i++)printTree(tree->child[i]);tree=tree->sibling;}UNINDENT;}五、程序执行结果初始执行结果:■Z'E:\L?]尢三l 第一学貯曙原理烷監二Tiny旷充诣吞药污法令折\Det>u日(I耐扩充嗚菩打..卜watatkk比amatwwatw比.atac•atatwTIHY卞I'H•吾吉件丨1■吾 "辛T肚**** nk比nkatifatatwkkam■Fill<2>3<3>“更迥遠原荐序文件圳’te.t.Lxt.百茁結黑存放;在:tinycnmpilatinn.txt捌的结巣存放在;巧Maxtreo.txt二:「加:卡进荐代码的编辑Fill<2>3<3>“更迥遠原荐序文件圳’te.t.Lxt.百茁結黑存放;在:tinycnmpilatinn.txt捌的结巣存放在;巧Maxtreo.txt二:「加:卡进荐代码的编辑tinycoinxiilallan-txttest:.txttest.txt*syntaxtree.txt??在顶巨丁程文件中打开七1|1¥compilation.txtn查看结果1AAfl试树请请箱法法编戒语语xt生成成.t要生生晨要.3>>■■12.当选择生成语法树的结果:■3hE:\[3JXE\[1]弟一学期命原倉莫验二Ti町扩充洱言的语法令析匹EbuEVTiny旷充诣言的”,匸回.[巫[|K)C)CM:KX)C 逋:KXNKJCNWHXNWJCNKKXNT]NV扌广tq"右的i•吾分•析耳NJOCNJ()(耳xz1>-XZ23
kktt>mxz1>-XZ23
kktt>m常辑an.teax编tiyt也annnn1iynfpi^7-ts5p件代m文魯苗-程存存屮ti源臬曰歹“试結結xt....t”swstxt用功法te.t第语“st序译鑒te■txt"syntaxtree在项目工程文件中主冃五口xt生成成n要生生st否要不一仙是兴xz\z主冃五口xt生成成n要生生st否要不
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- HR工作中的情绪管理与调节
- 入股酒吧合同标准文本
- 个人农村养殖合同标准文本
- 农机产品订购合同范例
- 企业运营策划服务合同标准文本
- 农村房产转移合同标准文本
- 一氧化碳中毒迟发脑病患者脑损伤特征的多模态MRI研究
- 个体超市雇佣员工合同标准文本
- 农民果苗批发销售合同标准文本
- 个人荒山转让合同标准文本
- 企业模拟经营电子沙盘
- 专升本思政复习指导试题及答案
- 2025年涂料销售合同模板
- 2024年昆明渝润水务有限公司招聘考试真题
- 2025-2030中国小武器和轻武器行业市场发展趋势与前景展望战略研究报告
- 2025年部编版新教材语文一年级下册第一、第二次月考试题带答案(各一套)
- 8.1薪火相传的传统美德 教学设计-2024-2025学年统编版道德与法治七年级下册
- 用纸箱做鸟窝课件
- 巡视巡察课件2025
- 2025江苏南京市金陵饭店股份限公司招聘高频重点模拟试卷提升(共500题附带答案详解)
- 2025年中考物理知识点归纳
评论
0/150
提交评论