Giter Club home page Giter Club logo

compilers's Introduction

SJTU SE302 编译原理与技术(Principle and Technology of Compiler)

《Modern Compiler Implementation in C》中的Tiger编译器


lab1:Straight-line program interpreter(直线式程序解释器)
lab2:Lexical Analysis(词法分析)
lab3:Syntax Analysis(语法分析)
final_tiger:Final Test for lab2 and lab3(对lab2和lab3的深度测试)
lab4:Type Checking(类型检查)
lab5:Intermediate Code(中间代码生成)
lab6:A Workable Tiger Compiler(可用的tiger编译器)

Usage:

编译tiger编译器:(需要linux系统并安装有gcc、make、lex、yacc)
cd lab6
make
得到tiger-compiler

编译tiger程序:
./tiger-compiler hello.tig
得到hello.tig.s

链接:(对于64位系统,需要安装32位运行库)
gcc -Wl,--wrap,getchar -m32 hello.tig.s runtime.c -o hello.out
(如果是32位系统,去掉-m32参数)

运行:
./hello.out

更多信息可参考note.txt

compilers's People

Contributors

hzqmwne 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.