="); strcpy(finaltable[final_num],">="); finaltableint[final_num++]=14; } //>=14 else { strcpy(otherchartable[otherchar_num++],">"); strcpy(finaltable[final_num],">"); finaltableint[final_" /> ="); strcpy(finaltable[final_num],">="); finaltableint[final_num++]=14; } //>=14 else { strcpy(otherchartable[otherchar_num++],">"); strcpy(finaltable[final_num],">"); finaltableint[final_" />

全文预览

实验三_递归下降法的语法分析器

上传者:徐小白 |  格式:doc  |  页数:24 |  大小:0KB

文档介绍
ar_num++],">="); strcpy(finaltable[final_num],">="); finaltableint[final_num++]=14; } //>=14 else { strcpy(otherchartable[otherchar_num++],">"); strcpy(finaltable[final_num],">"); finaltableint[final_num++]=15; //>15 ungetc(ch,stdin); } } break;?case'<': { ch=getchar(); if(ch=='=') { strcpy(otherchartable[otherchar_num++],"<="); strcpy(finaltable[final_num],"<="); finaltableint[final_num++]=16; } //<=16 else { strcpy(otherchartable[otherchar_num++],"<"); strcpy(finaltable[final_num++],"<"); finaltableint[final_num++]=17; //<17 ungetc(ch,stdin); } } break;?case'*': strcpy(finaltable[final_num],"*"); finaltableint[final_num++]=18; //*18 break;?default: error();break;?}}voiderror(){?flag_error=1;?printf("出现错误,中止分析!\n");} voidinitialize(){?inti;?for(i=0;i<20;i++)?{ word[i]='\0';?}}voidcheck(){

收藏

分享

举报
下载此文档