-
在本编译程序中,源语言为PL/0语言,目标语言为假想栈式计算机的汇编语言.PL/0语言是Pascal语言的一个子集,PL/0的编译程序包括了对PL/0语言源程序...
在本编译程序中,源语言为PL/0语言,目标语言为假想栈式计算机的汇编语言.PL/0语言是Pascal语言的一个子集,PL/0的编译程序包括了对PL/0语言源程序进行分析处理、编译生成类PCODE代码,并在虚拟机上解释运行生成的类PCODE代码的功能。
PL/0语言编译程序采用以语法分析为核心、一遍扫描的编译方法。词法分析和代码生成作为独立的子程序供语法分析程序调用。语法分析的同时,提供了出错报告功能。在源程序没有错误编译通过的情况下,调用类PCODE解释程序解释执行生成的类PCODE代码。
该软件为PL/0语言编译程序,所实现的扩充功能如下:
1.增加单词:保留字 ELSE,FOR,TO, DOWNTO
2.增加运算 +=,-=,++,--
3.不等号# 改为
4.增加条件语句的ELSE子句
5.扩充语句:
①FOR := TO DO
②FOR := DOWNTO DO
其中,语句①的循环变量的步长为1,
语句②的循环变量的步长为-1。
概述
源文件: *.plo
目标文件: *.COD
实现平台:C++ Builder6.0
-the compiler, the source language of PL/0 language, target language of the imaginary stack of computer assembly language. PL/0 language Pascal language is a subset of, PL/0 compilers including the right PL/0 language source analysis, category PCODE compiler code generation and the virtual machine running on to explain the formation PCODE category code functions. PL/0 language compiler
- 2022-07-12 21:52:18下载
- 积分:1
-
(1) 给定一段符合Pascal子集语法的语言,能成功转换成C语言;
(2) 一个简单的说明文档;
(3) 2007.7.14之前上传到ftp:// C...
(1) 给定一段符合Pascal子集语法的语言,能成功转换成C语言;
(2) 一个简单的说明文档;
(3) 2007.7.14之前上传到ftp:// C07:C07@10.11.3.71/upload,用学号建立自己的目录;
(4) (可额外加分5分)若有出错处理功能,请在说明文档中写明可以处理哪几项错误。
注意事项:
(1) 两人一组
(2) 可以使用词法、语法自动生成工具,windows下有Flex,Bison,Linux下有Lex,Yacc,Java的有Jlex,JavaCC,ANTLR等
(3) 不用考虑Pascal和C的关键词不同问题,即Pascal子集语言中假设不出现int,for等作为变量标志符
(4) read()和write()可用由scanf(),printf()等组成的语句转换。
(5) 如果有疑问可以发信给我 xpqiu@fudan.edu.cn.
- 2022-03-23 02:20:36下载
- 积分:1
-
这是编译原理的词法分析源程序
这是编译原理的词法分析源程序- This is translates the principle the lexical analysis source
program
- 2022-07-09 02:41:51下载
- 积分:1
-
GNU的词法/语法分析器bison源码,最新版本bison
GNU的词法/语法分析器bison源码,最新版本bison-2.1-GNU/parser bison source, the latest version of bison- 2.1
- 2022-02-10 06:25:25下载
- 积分:1
-
类pascal的词法分析设计,内容详细。 这是我老师的教案,我看内容较全,希望对您也有帮助!...
类pascal的词法分析设计,内容详细。 这是我老师的教案,我看内容较全,希望对您也有帮助!- The kind of pascal lexical analysis design, the content is
detailed. This is my teacher teaches the document, I looked content
comparatively entire, hoped also has the help to you!
- 2022-01-22 07:51:57下载
- 积分:1
-
- 2022-02-02 17:15:04下载
- 积分:1
-
解法:对原文法消除左递归,根据消除左递归后的等价文法建立语法树,而后对此语法树 进行后根遍历,即可得到后缀式....
解法:对原文法消除左递归,根据消除左递归后的等价文法建立语法树,而后对此语法树 进行后根遍历,即可得到后缀式.- Solution: Eliminates the left recursion to the original
grammar, after equal in value grammar establishment grammar tree which
eliminates the left recursion, after but the grammar tree carries on
the root to spread the calendar regarding this, after then obtains
decorates the type
- 2022-01-22 17:47:18下载
- 积分:1
-
编译原理―LL(1)文法分析器(1.0) 求LL(1)文法的FOLLOW集合工具: 软件读入一个LL(1)文法,生成其FOLLOW集合。...
编译原理―LL(1)文法分析器(1.0) 求LL(1)文法的FOLLOW集合工具: 软件读入一个LL(1)文法,生成其FOLLOW集合。-compiler theory-LL (1) grammar analyzer (1.0) for LL (1) grammar FOLLOW Set tools : software read an LL (1) grammar, generating its FOLLOW pool.
- 2022-01-26 06:18:06下载
- 积分:1
-
Osprey源代码,绝对值得一看,Osprey权威资源代码
Osprey源代码,绝对值得一看,Osprey权威资源代码-Osprey source code is absolutely worth a visit, Osprey authoritative source code
- 2022-02-11 16:54:13下载
- 积分:1
-
c++ pl/0简易编译器
c++ pl/0简易编译器-c pl/0 simple compiler
- 2022-03-15 01:00:14下载
- 积分:1