-
由于时间紧迫及事先准备不足,编译器最后定型时暴露出不少问题及不足之处,主要有以下一些方面: 不支持数组数据类型,这是文法分析器设计时的一个疏漏,由于时间关系...
由于时间紧迫及事先准备不足,编译器最后定型时暴露出不少问题及不足之处,主要有以下一些方面: 不支持数组数据类型,这是文法分析器设计时的一个疏漏,由于时间关系,最后只得把扫描器中已做好的相关的数组部分删去。 对于float数据类型的支持,直到语义分析都是正常的,也能生成相应的汇编代码,但由于我们对8086/8088指令系统本身了解不足,这样的汇编代码将只能做到含义上完全忠实于源程序,但不能运行。 对于局部变量的支持,则于时间紧迫,所有的局部变量全被处理成静态变量。使递归函数不能得到正确的结果。 对于函数调用语句,不进行参数匹配检查,如果参数数量不对,也将能通过编译,但运行时将产生非法操作。 对&& !等逻辑操作在最后生成代码时处理比较粗燥,生成的代码在逻辑复杂时将不能保证运行正常。 接下来有一些,不能说是缺陷,但必须说明的问题: 对于main函数,没有参数表,通回类型也必须为void,但如果写上参数表及其他返回类型也能编译通过,生成代码时将简单地忽略,不影响最后的代码的运行。 对于while,for,if语句,其语句体不管是一句还是多句,必须都有{}围起来。这跟C语言中若是一句则可省略{}不同。-Due to the time constraints and lack of preparation in advance, the compiler finalized when exposed numerous problems and shortcomings, mainly in the following aspects : no support for array data type, which is grammar analyzer design of an omission, because of the time, the final could only have scanners do phase customs array deleted. For float data types of support until semantic analysis is normal, and can generate the corresponding assembly code, but because of our 808
- 2022-01-26 16:03:11下载
- 积分:1
-
用SLR(1)的类C语言的编译器实现的语义分析…
用SLR(1)方法实现的类C语言的编译器的语义分析程序。-with SLR (1) Realization of the Class C language compiler is the semantic analysis procedures.
- 2023-05-13 03:15:02下载
- 积分:1
-
编译原理
编译原理-实现目标机的功能及分配功能-用于生成目标代码-Compiler Construction Principles- to achieve the target machine
- 2022-01-21 17:28:57下载
- 积分:1
-
十分详细的编译原理课件,来自北京大学,请大家评鉴。
十分详细的编译原理课件,来自北京大学,请大家评鉴。-Very detailed compilation principles of courseware, from Peking University, please evaluation.
- 2022-03-02 23:14:39下载
- 积分:1
-
正规(则)表达式转化为NFA,DFA,DFA最小化,显示结果和过程
正规(则)表达式转化为NFA,DFA,DFA最小化,显示结果和过程-Formal (then) regular expressions into NFA, DFA, DFA minimization, and process the result will be displayed
- 2023-08-04 00:15:03下载
- 积分:1
-
词法分析程序,可对以下的C源程序进行分析
词法分析程序,可对以下的C源程序进行分析:main() {int a[12] ,sum for(i=1 i=1 j--){ if(i==j&&i+j==13)sum+=a[i][j] } } printf("%c",sum) }-lexical analysis procedures, right below the C source code analysis : main () (int a [12] [12], the sum for (i = 1 ilt; I = 12) (for (j = 1 JLT; J = 12) Scanf ( "% d", a [i] [j])) for (i = 12 IGT; a = i--) (for (j = 12 IGT; = 1 j--) (if (i == ji j == 13) sum = a [i] [j])) printf ( "% c", sum
- 2022-07-19 15:44:58下载
- 积分:1
-
该文件主要是一个编译原理函数语言绘图器,可以利用起来翻译图象代码...
该文件主要是一个编译原理函数语言绘图器,可以利用起来翻译图象代码-the document is mainly a function of compiler theory language mapping device that can use up images code translation
- 2022-07-09 15:32:52下载
- 积分:1
-
err
< 编译原理实用教程>>中的程序源代码:包括词法,语法分析,目标代码生成等-err
- 2022-02-04 07:55:11下载
- 积分: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
-
1招文档生成工具。打开命令行2.input tricktest用法:电…
生成Trick文件工具
1.Open command line
2.input tricktest
Usage: TrickTest -f -o -i
-f source mpeg2 file to trick
-o trick output directory
-i output file id
-m max coding error, default 0
-b max bitrate for trick generate, default 0 mean no limit
-s trick buffer block size, must be n*188
-l log file, default c: ricktest.log
example:
tricktest -f 黑鹰行动.mpg -o c: emp -i A -m 1000 -b 3750000
soure file: 黑鹰行动.mpg
output directory: c: emp
filename: 000000A,000000A.ff,000000A.fr,000000A.vvx
max coding error: 1000
trick generation speed: 3750000 bps
a-Trick document generation tool 1.Open command line 2.input tricktest Usage: TrickTest-f-o-i-f source mpeg2 file to trick-o trick output directory-i output file id-m max coding error, default 0-b max bitrate for trick generate, default 0 mean no limit-s trick buffer block size, must be n* 188-l log file, default c: tricktest.log example: tricktest-f Black Hawk operations. mpg-oc: temp-- i A-m 1000-b 3750000
- 2022-03-16 15:10:37下载
- 积分:1