- University of Idaho - Department of Computer Science
- CS 445: Compiler and Translator Design, by Dr. Clinton Jeffery
This is a work-in-progress old-school compiler using Flex and Bison for a subset of C++, dubbed “120++” as it should work for most code written in CS 120, including basic classes.
This repo is located at: https://github.com/andschwa/uidaho-cs445
Per the requirements, my initial goal was to create a lexical analyzer (using Flex) for 120++.
Per the requirements, my second goal was to write (or reuse) a 120++ grammar that works with Bison.
Per the requirements, my third goal was to perform semantic analysis (including populating symbol tables and type checking the expressions) on the syntax tree.
Per the requirements, my fourth goal was to implement intermediate code generation, i.e., a list of three-address instructions given the parse tree.
Per the requirements, my fifth goal was to implement final code generation, i.e., either native (assembly) code, or three-address C code to demonstrate the correctness of the compiler’s memory layout and intermediate code logic.
Seeing as how I dislike assembly and have a greater need for my time than a perfect grade, I have chosen to implement TAC-C.