Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 917 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 917 Bytes

Stanford CS143

  this is a project for Stanford CS143, the goal is to write a simple compiler for COOL(a simple object oriented language for teaching) language. The project contains five assignment. After fulfilling the project, we are able to be acquaint with front end and basic code generation part of the compiler.

PA1

  • fulfill a stack machine in COOL
  • be acquaint with COOL syntax and structures

PA2

  • fulfill a lexer in flex
  • be acquaint with COOL syntax rules
  • be acquaint with flex grammer

PA3

  • fulfill a parser in bison, target language is COOL
  • be acquaint with bison parsing tools
  • learn LALR recursive parsing tech and how to handle shift-reduce conflicts

PA4

  • fulfill a semantic analyzer for COOL language
  • fulfill a type system, with type checking and type inferencing
  • decorate AST tree with type information, as a helper for code gen in next phase