CS445 Compiler and Translator Design Project
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Better comment for generated code Dec 25, 2014
.gitignore Adding *.ic and /examples to gitignore Dec 10, 2014
.travis.yml Fixing Travis build Oct 9, 2014
LICENSE Adding Affero General Public License Version 3 Sep 5, 2014
Makefile Move math library flag May 12, 2015
README.org Updating readme and version for hw5 Dec 15, 2014
TODO.org Removing list todo's Dec 25, 2014
args.h Fixing header on all files Dec 25, 2014
final.c Fixing header on all files Dec 25, 2014
final.h Fixing header on all files Dec 25, 2014
hasht.c Fixing header on all files Dec 25, 2014
hasht.h Fixing header on all files Dec 25, 2014
include_c.h Fixing header on all files Dec 25, 2014
include_fstream.h Fixing header on all files Dec 25, 2014
include_iostream.h Fixing header on all files Dec 25, 2014
include_string.h Fixing header on all files Dec 25, 2014
intermediate.c Fixing header on all files Dec 25, 2014
intermediate.h Fixing header on all files Dec 25, 2014
lexer.l Fixing header on all files Dec 25, 2014
libs.h Fixing header on all files Dec 25, 2014
list.c Fixing header on all files Dec 25, 2014
list.h Fixing header on all files Dec 25, 2014
logger.c Fixing header on all files Dec 25, 2014
logger.h Fixing header on all files Dec 25, 2014
lookup3.c Making lookup3 compile cleanly Oct 13, 2014
main.c Fixing header on all files Dec 25, 2014
node.c Fixing header on all files Dec 25, 2014
node.h Fixing header on all files Dec 25, 2014
parser.y
rules.c Fixing header on all files Dec 25, 2014
rules.h Fixing header on all files Dec 25, 2014
scope.c Fixing header on all files Dec 25, 2014
scope.h Fixing header on all files Dec 25, 2014
symbol.c
symbol.h Fixing header on all files Dec 25, 2014
test.c Fixing header on all files Dec 25, 2014
test.h
test_hasht.c
test_list.c Removing list todo's Dec 25, 2014
test_tree.c Making test output obey debug flags Dec 10, 2014
token.c Fixing header on all files Dec 25, 2014
token.h
tree.c Fixing header on all files Dec 25, 2014
tree.h Fixing header on all files Dec 25, 2014
type.c Fixing header on all files Dec 25, 2014
type.h Fixing header on all files Dec 25, 2014

README.org

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.