-
在本编译程序中,源语言为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
-
编译原理 词法分析器
识别标识符,关键字,运算符,常量,界符包括出错处理...
编译原理 词法分析器
识别标识符,关键字,运算符,常量,界符包括出错处理-compiler theory lexical analyzer identification identifiers, keywords, Operators, constants, and address sector including error handling
- 2022-02-05 17:06:25下载
- 积分:1
-
前些天写了个小语言的词法分析程序,因为前些天在VC知识库看到一个pascal词法分析的程序,觉得写得挺复杂的。其实词法分析程序的原理都是一样的,所以我想只要搞明...
前些天写了个小语言的词法分析程序,因为前些天在VC知识库看到一个pascal词法分析的程序,觉得写得挺复杂的。其实词法分析程序的原理都是一样的,所以我想只要搞明白了简单的词法分析程序,再写复杂的就不难了,无非是多加几个关键字,多写几个条件判断语句而已。词法分析是编译程序的基础,也是最简单的。好,现在让我们看程序吧。 先让我们看看这个小语言的文法吧-few days ago wrote a small language lexical analysis procedures, because the other day in the knowledge base to see a VC pascal lexical analysis procedures, find that quite complex. In fact, lexical analysis procedure is the same principle, I think if you understood a simple lexical analysis procedure to write complex it is not difficult, is nothing but add a few keywords and writing several conditions judgment statement it. Lexical analysis is the basis of compilers, as well as the most simple. Well, now let us look at the procedures it. Let us look at this small language grammar it
- 2022-08-08 01:17:36下载
- 积分:1
-
C程序的二项式概率分布。
C programm for Binomial probability distribution.
- 2022-07-27 17:04:15下载
- 积分:1
-
Symbol table program using linked list..contains yacc & lex files
Symbol table program using linked list..contains yacc & lex files
- 2022-06-18 15:02:19下载
- 积分:1
-
一个slr(1)的 语法分析器
可以自行输入文法
一个slr(1)的 语法分析器
可以自行输入文法-1 slr (1) parser can enter your own grammar
- 2022-06-28 23:14:36下载
- 积分:1
-
简单的词法分析器 编译课程综合训练 java语言
简单的词法分析器 编译课程综合训练 java语言 -Simple lexical analyzer to compile a comprehensive training course java language
- 2022-03-20 11:20:02下载
- 积分:1
-
该程序能够实现简单的c语言词法,语法,语义分析。
该程序能够实现简单的c语言词法,语法,语义分析。- This procedure can realize the simple c language morphology,
the grammar, the semantic analysis.
- 2022-01-25 20:08:31下载
- 积分:1
-
计算机器程序~ 附带词法分析~
计算机器程序~ 附带词法分析~- Computation machine program ~ supplementary lexical analysis
~
- 2022-01-24 17:09:53下载
- 积分:1
-
编译器,词法分析和语法分析,里面利用到了哈希表来加快搜索字符表速度....
编译器,词法分析和语法分析,里面利用到了哈希表来加快搜索字符表速度.-compiler, lexical analysis and parsing, to use inside the hash table to expedite the search speed character tables.
- 2022-01-31 23:12:32下载
- 积分:1