Skip to content

About

Building custom compiler for the COOL object oriented language from scratch (covers lexing, parsing, codegen)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C__OOL-Compiler

A from-scratch compiler for the COOL (Classroom Object-Oriented Language), covering lexing, parsing, and code generation.

Components

Phase Directory Primary implementation Status
Lexer PA2/ cool.flex Complete
Parser PA3/ cool.y Complete
Semantic Analyzer PA4/ semant.cc Complete

Most of the compiler logic for these phases lives in those two files; the rest of each directory is build tooling, drivers, and course-provided infrastructure.

Quick start

cd PA2 && make && make test    # build and test the lexer
cd PA3 && make && make test    # build and test the parser (requires PA2 lexer)
cd PA4 && make && make test    # build and test the semantic analyzer (requires PA2 lexer and PA3 parser)

About

Building custom compiler for the COOL object oriented language from scratch (covers lexing, parsing, codegen)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages