The course goes through all phases of a compiler. It shows the theoretical concepts underlying each phase as well as how to implement them efficiently. The students will write a small compiler for a Java-like language. It will translate a source program into the code of virtual machine. The implementation language will be Java.
- Overview: compilers and interpreters, structure of a compiler, single-pass vs. multi-pass compilers
- Scanning: finite automata, scanner implementation
- Parsing: recursive descent parsing, push down automata, terminal start symbols and successors, LL(1) condition, implementation of a parser
- Semantic analysis: syntax-directed translation, attribute grammars
- Symbol table handling: objects, types, scopes
- Code generation
- Compiler generators