Skip to content

Project done for Compiler in ShanghaiTech, which is also the project in Stanford

Notifications You must be signed in to change notification settings

DataCorrupted/COOL_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compiler_proj

Project done for Compiler in ShanghaiTech, which is also the project in Stanford.

Examples

cool_examples/ 	conatins all the codes I found from Github. It's not my work. You may check 
		the README.md inside that folder to find the writer(https://github.com/shinezyy/).

PA1

A lexer written for COOL. Flex used.

There are potential bugs, see README inside.

PA2

A parser written for COOL. bison used.

Do notice that PA2 is a little bit different from that in Stanford.

My cool.y couldn't correctly print all the error log, but the parser functions as long as the program is correct.

PA3

A semantic analysis written for COOL.

PA4

Code generator.

PA*/tools-bin/cgen

This file is compiled under 32bit machine, you need to install the libc support before you can run it on 64bit machine:

sudo apt-get install libc6-i386 lib32stdc++6 

About

Project done for Compiler in ShanghaiTech, which is also the project in Stanford

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published