文件名称:lc

介绍说明--下载内容均来自于网络,请自行研究使用

引用原作者:这个类C编译器是我在2008年写的,完成度并不高,并没有实现指针、struct这些,不过还是实现了基本的C语言数据类型(int/char/long/short等),函数的声明、定义、调用、递归,if/for/while/goto等跳转,详细请看sample和source。



为了节省开发的时间,词法和语法分析分别采用lex和yacc编写,可以用Cygwin里面的flex和bison进行编译。另外我觉得编译成x86的bytecode比较麻烦,所以定义了一套自己的bytecode,以及写了一个虚拟机(叫模拟器更准确)去执行它,这部分是比较好修改的,而且我生成的bytecode要比x86的指令体系精简,也跟平台无关,可能适合移植到一些对运行环境要求较苛刻的地方。-Reference to the original author: This class C compiler is written in 2008, to complete the degree is not high, and did not realize the pointer to the struct, but still achieve the basic C data types (int/char/long/short, etc. ), the function declaration, definition, call, recursive, and if/for/while/a goto, etc. Jump in detail please see the sample and the source. In order to save development time, lexical and syntax analysis were used lex and yacc to write, can be compiled with Cygwin inside the flex and bison. In addition, I think compiled into x86 bytecode is too much trouble, so to define its own set of bytecode, and write a virtual machine (called the simulator is more accurate) to execute it, this part is modified, but I generated bytecode than x86 instructions to streamline the system, also has nothing to do with the platform, may be suitable for transplantation to the harsh operating environment requirements.
(系统自动生成,下载前可以参看下载内容)

下载文件列表

sample

......\array.c

......\deletefile.c

......\gcd.c

......\lc.exe

......\lclib.h

......\swap.c

source

......\lc.dsp

......\mk.bat

......\src

......\...\config.h

......\...\const.c

......\...\error.c

......\...\expr.c

......\...\gen.c

......\...\lc.h

......\...\lib.c

......\...\lib.h

......\...\main.c

......\...\parse.h

......\...\parse.y

......\...\scan.h

......\...\scan.l

......\...\stdafx.h

......\...\sym.c

......\...\tree.c

......\...\vm.c

......\...\vm.h

license-BSD.txt

readme.txt

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org