直接运行“语法分析.exe”, 它会自动读入“result.txt”的内容 并分析其中词法。 结果保存在“语法分析.txt”文件里。 其中“语法分析.cpp”是原代码。
2019-12-21 19:51:16 245KB 语法分析 编译原理
1
PL/0源程序 //PL0.txt const a=10; var b,c; procedure p; begin c:=b+a end; begin read(b); while b#0 do begin call p;write(2*c);read(b) end end. //outputfile.txt constsym, ident, a eql, number, 10 semicolon, varsym, ident, b comma, ident, c semicolon, proceduresym, ident, p semicolon, beginsym, ident, c becomes, ident, b plus, ident, a endsym, semicolon, beginsym, readsym, lparen, ident, b rparen, semicolon, whilesym, ident, b neq, number, 0 dosym, beginsym, callsym, ident, p semicolon, writesym, lparen, number, 2 times, ident, c rparen, semicolon, readsym, lparen, ident, b rparen, endsym, endsym,
2019-12-21 19:40:54 147KB 语法分析
1
相关文章请访问 https://blog.csdn.net/boss_crabe/article/details/80760348
2019-12-21 18:48:19 453KB 语法分析
1