文件名称:PL0
- 所属分类:
- 编译器/词法分析
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2014-01-03
- 文件大小:
- 643kb
- 下载次数:
- 0次
- 提 供 者:
- 王*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
pl0拓展文法的编译器,包含实验报告、源码和测试程序。对PL0原编译器进行了以下的扩充:1. 增加以下保留字
else(elsesym), for(forsym),to(tosym),downto(downtosym),
return(returnsym),[(lmparen),](rmparen)
2. 增加了以下的运算符:
+=(eplus),-=(eminus),++(dplus),--(dminus)
取址运算符&(radsym),指向运算符@(padsym)
3. 修改单词:修改不等号#为<>
4. 扩充语句:
(1)增加了else子句
(2)增加了for语句
5. 增加运算:
(1).++运算
(2).--运算;
(3).+=运算;
(4).-=运算;
(5).&取址运算;
(6).@指向运算;
6. 增加类型:
(1).增加多维数组a[i1][i2][i3]……[i(n-1)][i(n-2)][in]
(2).增加指针类型(任何变量都能存放指针,但不支持指针的指针,
如b:=@@a应该改写为c:=@a,b:=@c)
7. 将过程procedure扩展为函数:
(1).允许定义过程时在其后加参数(var a, var b,……..,var n)
(2)允许通过指针向函数形式参数传地址;
(3)允许返回值;可以用 a:=p(a,b,c….,n) 返回
-pl0 expand grammar compiler , including lab reports , source code and test procedures. PL0 compiler for the original expansion of the following : (1) Add the following reserved words
else (elsesym), for (forsym), to (tosym), downto (downtosym),
return (returnsym), [(lmparen),] (rmparen)
(2) increase the following operators:
+ = (eplus),- = (eminus),++ (dplus),- (dminus)
Address-of operator & (radsym), pointing operator @ (padsym)
3 Modify word : Modify inequality# is <>
4 Expansion statement:
( 1 ) increasing the else clause
( 2 ) increasing the for statement
5 increase in computing :
(1 )++ operator
(2 )- operation
(3 )+ = operator
(4 )- = operator
(5 ) & check the site operator
(6 ) @ pointing operation
6 in
else(elsesym), for(forsym),to(tosym),downto(downtosym),
return(returnsym),[(lmparen),](rmparen)
2. 增加了以下的运算符:
+=(eplus),-=(eminus),++(dplus),--(dminus)
取址运算符&(radsym),指向运算符@(padsym)
3. 修改单词:修改不等号#为<>
4. 扩充语句:
(1)增加了else子句
(2)增加了for语句
5. 增加运算:
(1).++运算
(2).--运算;
(3).+=运算;
(4).-=运算;
(5).&取址运算;
(6).@指向运算;
6. 增加类型:
(1).增加多维数组a[i1][i2][i3]……[i(n-1)][i(n-2)][in]
(2).增加指针类型(任何变量都能存放指针,但不支持指针的指针,
如b:=@@a应该改写为c:=@a,b:=@c)
7. 将过程procedure扩展为函数:
(1).允许定义过程时在其后加参数(var a, var b,……..,var n)
(2)允许通过指针向函数形式参数传地址;
(3)允许返回值;可以用 a:=p(a,b,c….,n) 返回
-pl0 expand grammar compiler , including lab reports , source code and test procedures. PL0 compiler for the original expansion of the following : (1) Add the following reserved words
else (elsesym), for (forsym), to (tosym), downto (downtosym),
return (returnsym), [(lmparen),] (rmparen)
(2) increase the following operators:
+ = (eplus),- = (eminus),++ (dplus),- (dminus)
Address-of operator & (radsym), pointing operator @ (padsym)
3 Modify word : Modify inequality# is <>
4 Expansion statement:
( 1 ) increasing the else clause
( 2 ) increasing the for statement
5 increase in computing :
(1 )++ operator
(2 )- operation
(3 )+ = operator
(4 )- = operator
(5 ) & check the site operator
(6 ) @ pointing operation
6 in
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Pl0要求.txt
源代码\&.txt
......\1++.txt
......\error.txt
......\for.txt
......\ifelse.txt
......\pl0.c
......\pl0.h
......\pl0c.txt
......\pl0h.txt
......\repeat.txt
pl0(2)\Debug\BuildLog.htm
......\.....\mt.dep
......\.....\PL0.exe
......\.....\PL0.exe.embed.manifest
......\.....\PL0.exe.embed.manifest.res
......\.....\PL0.exe.intermediate.manifest
......\.....\PL0.ilk
......\.....\PL0.obj
......\.....\vc80.idb
......\.....\vc80.pdb
......\fa.tmp
......\fa1.tmp
......\fa2.tmp
......\fas.tmp
......\lxm.PL0
......\now.suo
......\PL0.cpp
......\PL0.dsp
......\PL0.dsw
......\pl0.h
......\PL0.ncb
......\PL0.obj
......\PL0.opt
......\PL0.plg
......\PL0.sln
......\PL0.suo
......\PL0.vcproj
......\PL0.vcproj.Edgewolf-PC.Edgewolf.user
......\PL0编译器功能扩充课程设计实验报告.doc
......\PL0编译器功能扩充课程设计实验报告YZY.doc
......\Project1.tds
......\~$0编译器功能扩充课程设计实验报告.doc
......\~$0编译器功能扩充课程设计实验报告YZY.doc
......\实验报告 杨志业 3104006519\else.txt
......\..............................\PL0.cpp
......\..............................\pl0.h
......\Debug
......\实验报告 杨志业 3104006519
源代码
pl0(2)