The course provides the student with an overview of the issues in the design and construction of translators. The course emphasizes techniques with direct application to construction of compilers; many of the same concepts find application in interpreters.
- Automata Theory: regular expressions, finite automata, context free grammars, NFA and DFAs. Deterministic parsing: LL, LR parsers and the lex/yacc (flex/bison) like tools (Jflex, javacc, etc)
- Semantic analysis: abstract syntax trees, symbol tables, type checking, resource allocation.
- Virtual machines and run-time environments: stacks, heaps, objects.
- Code generation: resources, templates, and optimizations.
| Project | Description |
| LL(1) Parser (Java & JLex) | A simple grammar parser in written in Java using JLex. I have rewritten the grammar in Backus-Naur Form at the top of the “.lex” file. The project description can be found here |
| LL(1) Parser (Java & JavaCC) | The above grammar re-described in JavaCC. It is not an elegant solution, but in order to save time during a summer session, I upped the token lookahead. It could have been easily implemented using LL(1) with an one token lookahead but I got lazy and didn’t feel like writing the extra grammar productions. So in the end I used less productions and more lookaheads. |
| An index of all cs431 files can be found here. | |