文件名称:hc_compiler
- 所属分类:
- 编译器/词法分析
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 254kb
- 下载次数:
- 0次
- 提 供 者:
- 周*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
由于时间紧迫及事先准备不足,编译器最后定型时暴露出不少问题及不足之处,主要有以下一些方面: 不支持数组数据类型,这是文法分析器设计时的一个疏漏,由于时间关系,最后只得把扫描器中已做好的相关的数组部分删去。 对于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 8086/8088 directive to the knowledge of the system itself, this compilation can do to code meaning entirely faithful to the source, but not running. For the support of local variables, in the time constraints, all local variables were all handled in the static variable. So recursive function will not get the right results.
相关搜索: 编译器
编译
设计
exposed
source
code
for
compiler
design
semantic
8086
C--
语义分析
hc_compiler
编译
Semantic
analyzer
编译
设计
exposed
source
code
for
compiler
design
semantic
8086
C--
语义分析
hc_compiler
编译
Semantic
analyzer
(系统自动生成,下载前可以参看下载内容)
下载文件列表
hc_compiler
...........\hc1.0
...........\.....\bin
...........\.....\...\hc.exe
...........\.....\...\hhc.bat
...........\.....\...\LINK.EXE
...........\.....\...\MASM.EXE
...........\.....\course
...........\.....\......\readme.txt
...........\.....\......\sort.anl
...........\.....\......\sort.asm
...........\.....\......\sort.c
...........\.....\......\sort.pra
...........\.....\......\sort.sca
...........\.....\errorShow
...........\.....\.........\error1.c
...........\.....\.........\error1.if
...........\.....\.........\error2.c
...........\.....\.........\error2.if
...........\.....\.........\error3.c
...........\.....\.........\error3.if
...........\.....\.........\error4.c
...........\.....\.........\error4.if
...........\.....\hc-使用手册.htm
...........\.....\sample
...........\.....\......\hello world
...........\.....\......\...........\hello.c
...........\.....\......\...........\HELLO.EXE
...........\.....\......\hundred1
...........\.....\......\........\hundred.c
...........\.....\......\........\HUNDRED.EXE
...........\.....\......\hundred2
...........\.....\......\........\hundred.c
...........\.....\......\........\HUNDRED.EXE
...........\.....\......\hundred3
...........\.....\......\........\hundred.c
...........\.....\......\........\HUNDRED.EXE
...........\.....\......\sort
...........\.....\......\....\sort.c
...........\.....\......\....\SORT.EXE
...........\.....\......\V
...........\.....\......\.\V.c
...........\.....\......\.\V.EXE
...........\.....\几点补充说明.htm
...........\.....\规格说明书.htm
...........\source_code
...........\...........\analyze.cpp
...........\...........\analyze.h
...........\...........\cgen.cpp
...........\...........\cgen.h
...........\...........\CommandLine.cpp
...........\...........\CommandLine.h
...........\...........\compiler.dsp
...........\...........\compiler.dsw
...........\...........\compiler.ncb
...........\...........\compiler.opt
...........\...........\compiler.plg
...........\...........\Debug
...........\...........\ExternGla
...........\...........\globals.h
...........\...........\Main.cpp
...........\...........\myexception.cpp
...........\...........\myexception.h
...........\...........\prase.cpp
...........\...........\prase.h
...........\...........\Release
...........\...........\scan.cpp
...........\...........\scan.h
...........\...........\symtab.cpp
...........\...........\symtab.h
...........\hc1.0
...........\.....\bin
...........\.....\...\hc.exe
...........\.....\...\hhc.bat
...........\.....\...\LINK.EXE
...........\.....\...\MASM.EXE
...........\.....\course
...........\.....\......\readme.txt
...........\.....\......\sort.anl
...........\.....\......\sort.asm
...........\.....\......\sort.c
...........\.....\......\sort.pra
...........\.....\......\sort.sca
...........\.....\errorShow
...........\.....\.........\error1.c
...........\.....\.........\error1.if
...........\.....\.........\error2.c
...........\.....\.........\error2.if
...........\.....\.........\error3.c
...........\.....\.........\error3.if
...........\.....\.........\error4.c
...........\.....\.........\error4.if
...........\.....\hc-使用手册.htm
...........\.....\sample
...........\.....\......\hello world
...........\.....\......\...........\hello.c
...........\.....\......\...........\HELLO.EXE
...........\.....\......\hundred1
...........\.....\......\........\hundred.c
...........\.....\......\........\HUNDRED.EXE
...........\.....\......\hundred2
...........\.....\......\........\hundred.c
...........\.....\......\........\HUNDRED.EXE
...........\.....\......\hundred3
...........\.....\......\........\hundred.c
...........\.....\......\........\HUNDRED.EXE
...........\.....\......\sort
...........\.....\......\....\sort.c
...........\.....\......\....\SORT.EXE
...........\.....\......\V
...........\.....\......\.\V.c
...........\.....\......\.\V.EXE
...........\.....\几点补充说明.htm
...........\.....\规格说明书.htm
...........\source_code
...........\...........\analyze.cpp
...........\...........\analyze.h
...........\...........\cgen.cpp
...........\...........\cgen.h
...........\...........\CommandLine.cpp
...........\...........\CommandLine.h
...........\...........\compiler.dsp
...........\...........\compiler.dsw
...........\...........\compiler.ncb
...........\...........\compiler.opt
...........\...........\compiler.plg
...........\...........\Debug
...........\...........\ExternGla
...........\...........\globals.h
...........\...........\Main.cpp
...........\...........\myexception.cpp
...........\...........\myexception.h
...........\...........\prase.cpp
...........\...........\prase.h
...........\...........\Release
...........\...........\scan.cpp
...........\...........\scan.h
...........\...........\symtab.cpp
...........\...........\symtab.h