Topics include parsing, syntax-directed translation, run-time storage management, error recovery, code generation and optimization. A significant project is required.
CSCE 2100, CSCE 2110 and CSCE 3600
Compilers, Principles, Techniques and Tools, 2nd Edition, Aho, Addison Wesley, ISBN 9780321486813
- Given a context-free grammar, build SLR(1), LR(1) and LALR(1) parse tables for that grammar.
- Given a context-free grammar, an LR parse table and an input string, show the steps of the parse.
- Given a language specification for an imperative language, build a parser for the language using tools such as lex and yacc.
- Integrate semantic actions into the above parser to construct a symbol table, perform type checking, and generate intermediate code.
- Given a control-flow graph with intermediate 3-address code within each basic block, show the improved control-flow graph after hand-optimizing for common subexpression elimination, copy propagation, and dead code removal.