pl0语法分析.docx

时间:2020-04-07 15:48:20
【文件属性】:
文件名称:pl0语法分析.docx
文件大小:22KB
文件格式:DOCX
更新时间:2020-04-07 15:48:20
C语言 课程实验报告C语言版本 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. 2.词法分析结果(PL/0 单词流文件) //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,

网友评论