Skip to content

hthuz/cs143

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS143

Standford CS143 Compiler. Skeletion code without modification is in branch base.

Website: https://web.stanford.edu/class/cs143/. Virtual machine setup: link. Course video record: link

PA2 in the repo corresponding to PA1 in course website (lexer). There's an additional PA1 for cool practice

PA1 a stack machine written in Cool.

PA2 lexer. Do use flex provided in VM, as the latest version of flex is not compatible with C. Major difficulity: string and comments.

PA3 parser. Major difficulity: dealing with grammer for let and error handling.

PA4 semant. A good task for understanding OOP inheritance and AST traversal. BTW, I don't think SELF_TYPE is a good design in COOL.

PA5 code generation. The key is to understand how local variables, method arguments and object attributes are allocated in memory.

About

Stanford CS143

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published