Git Product home page Git Product logo

compiler's Introduction

C Compiler

实现C语言到8086汇编的编译。编译前端采用LR1分析法,使用ANSI C 文法

build

Require C++14

  1. cmake
  2. make

usage

Compile file-name [-o]

file-name:待编译的C语言源程序文件。

-o:开启优化。

程序执行时在控制台输出提示信息,正确执行后在源文件同一目录生成以下文件

  1. file-name.asm: 生成的目标代码文件。
  2. file-name.tokenlist: 对源程序进行词法分析得到的Token序列。
  3. file-name.quatlist: 生成的中间代码文件。
  4. file-name.symboltable: 生成的符号表文件。

程序执行后还会在程序目录生成以下文件

  1. grammar_tree.json: 对源程序进行LR1语法分析得到的语法树文件
  2. grammar_tree.html: 显示语法树的工具程序
  3. LR1_table.html: LR1分析表

reference

compiler's People

Contributors

w-mj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.