全文预览

编译原理实验1

上传者:相惜 |  格式:doc  |  页数:7 |  大小:131KB

文档介绍
<s<<endl; s=getchar(); } elseif(s==')'){//判断) cout<<"27,"<<s<<endl; s=getchar(); } elseif(s=='['){//判断[ cout<<"28,"<<s<<endl; s=getchar(); } elseif(s==']'){//判断] cout<<"29,"<<s<<endl; s=getchar(); } elseif(s=='{'){//判断{ cout<<"30,"<<s<<endl; s=getchar(); } elseif(s=='}'){//判断} cout<<"31,"<<s<<endl; s=getchar(); } elseif(s==','){//判断, cout<<"32,"<<s<<endl; s=getchar(); } elseif(s==':'){//判断: cout<<"33,"<<s<<endl; s=getchar(); } elseif(s==';'){//判断; cout<<"34,"<<s<<endl; s=getchar(); } elseif(s=='>'){//判断>或>= s=getchar(); if(s=='='){ cout<<"37,>="<<endl; s=getchar(); }else{cout<<"35,>"<<endl;} } elseif(s=='<'){//判断<或<= s=getchar(); if(s=='='){ cout<<"38,<="<<endl; s=getchar(); }else{cout<<"36,<"<<endl;} } elseif(s=='!'){ s=getchar(); if(s=='='){ cout<<"40,!="<<endl; s=getchar(); } }?}?}试验结果:

收藏

分享

举报
下载此文档