Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Compiler Build Status

A simple-C language compiler


Introduction

Compile the simple-C program into machine code.

暂将实现分为11个阶段: 词法分析 语法分析 语义动作 语义分析 栈帧布局 翻译 规范化 指令选择 控制流分析 数据流分析 寄存器分配 代码流出.

已完成:词法分析 语法分析

相关内容:各阶段源码 各阶段说明

Requirements

  • Linux OS

  • GCC

  • Flex

    sudo apt-get install flex
    
  • Bison

    sudo apt-get install bison
    

References

"Modern Compiler Implementation in C"
http://www.cs.princeton.edu/~appel/modern/c
<dt>"Modern Compiler Implementation in C"</dt>
<dd>http://www.cs.princeton.edu/~appel/modern/c</dd>

<dt>"ANSI C grammar (Lex)"</dt>
<dd>http://www.quut.com/c/ANSI-C-grammar-l-1998.html</dd>

<dt>"ANSI C grammar (Yacc)"</dt>
<dd>http://www.quut.com/c/ANSI-C-grammar-y-1998.html</dd>

<dt>"Lex和Yacc应用方法"</dt>
<dd>http://www.cppblog.com/woaidongmao/archive/2008/09/20/62322.aspx</dd>

Keywords

Compiler Lex Yacc LLVM

License

GPLv3

Bitdeli Badge

About

An unfinished simple-C language compiler

Resources

Releases

No releases published

Packages

No packages published