文档详情

编译原理 算符优先 编译原理_实验报告实验二__语法分析(算符优先) 2.doc

发布:2017-01-06约1.52万字共42页下载文档
文本预览下载声明
编译原理 算符优先 编译原理_实验报告实验二__语法分析(算符优先) 2 导读:就爱阅读网友为您分享以下“编译原理_实验报告实验二__语法分析(算符优先) 2”的资讯,希望对您有所帮助,感谢您对92的支持! } } else { if(p==#39;lt;#39;) //表示移进 { count++; printf(quot;(%d) %s\t%10c\t%5c%17s\t 移进\nquot;,count,AnalyseStack,p,a,remain); fprintf(fp,quot;(%d) %s\t%17s\t %s\nquot;,count,AnalyseStack,remain,quot;移进quot;); } else { if(p==#39;=#39;) { z2=testchar(AnalyseStack[j]); n2=testchar(#39;##39;); p2=priority[z2][n2]; if(p2==#39;=#39;) { count++; printf(quot;(%d) %s\t%10c\t%5c%17s\t 接受k=k+1; AnalyseStack[k]=a; remainString(); \nquot;,count,AnalyseStack,p,a,remain); fprintf(fp,quot;(%d) %s\t%17s\t %s\nquot;,count,AnalyseStack,remain,quot;接受quot;); printf(quot;该句子是该文法的合法句子。\nquot;); fprintf(fp,quot;%squot;,quot;该句子是该文法的合法句子。\nquot;); } else { count++; break; printf(quot;(%d) %s\t%10c\t%5c%17s\t 移进\nquot;,count,AnalyseStack,p,a,remain); } int testchar(char x) {
显示全部
相似文档