Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

andyleejordan/uidaho-cs445-compiler-project

Compiler and Translator Design Project

https://travis-ci.org/andschwa/uidaho-cs445.svg?branch=master Andrew Schwartzmeyer

Summary

  • 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

Assignments

Assignment #1: A Lexical Analyzer

Per the requirements, my initial goal was to create a lexical analyzer (using Flex) for 120++.

Assignment #2: A Syntax Tree

Per the requirements, my second goal was to write (or reuse) a 120++ grammar that works with Bison.

Assignment #3: Semantic Analysis

Per the requirements, my third goal was to perform semantic analysis (including populating symbol tables and type checking the expressions) on the syntax tree.

Assignment #4: Intermediate Code Generation

Per the requirements, my fourth goal was to implement intermediate code generation, i.e., a list of three-address instructions given the parse tree.

Assignment #5: Final Code Generation

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.

About

CS445 Compiler and Translator Design Project

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published