Compiler Design Lectures & Labs - 1 MSE

| Description | Syllabus | Timetable | Lectures | Exams | Lab assignments | Lab activity | Bibliography |

Description

The lectures are about basic compiling techniques presented in the black dragon book. In the laboratory of this course we will implement a compiler for an object-oriented language called MiniJava. The compiler will be built using the JavaCC parser generator. The semantical analysis is based on the Visitor design pattern. Finally, the parser will generate Java byte code following the Java virtual machine specification.

Syllabus

News

  • 2022.10.02 20:20 we obtained room A305 for our lectures and labs

Timetable

Lectures:

Labs:

Preparations for the exams:

Exams:

  • 00.01.2024 10:00
  • 00.02.2024 10:00

Lectures

0100. Introduction Overview pdf

0101. Introduction pdf

0300. Lexical Analysis Overview pdf

0301. The Role of the Lexical Analyzer pdf

0302. Input Buffering pdf

0303. Specification of Tokens pdf

0305. The Lexical Analyzer Generator Lex pdf

0306. Finite Automata pdf

0307. From Regular Expression to Automata pdf

0308. Design of a Lexical Analyzer Generator pdf

0309. Optimization of a DFA-based Pattern Matchers pdf

0310. Summary pdf

0400. Syntax Analysis Overview pdf

0401. Introdution pdf

0402. Context-Free Grammars pdf

0403. Writing a Grammar pdf

0404. Top-Down Parsing pdf

0405. Bottom-Up Parsing pdf

0406. Introduction to LR Parsing pdf

video recordings user upt pass upt

Exam Results

Lab Assignments

  1. Automatic Generation of MiniJava Parser

  2. JavaCC lookahead

  3. MiniJava Expressions

  4. MiniJava AST

  5. The Visitor Design Pattern

  6. MiniJava Visitor Design Pattern

  7. Domain Analysis

  8. Type Checking

  9. Class Disassembly

  10. Class Generation

Lab Activity

Bibliography

  1. Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman - Compilers, Principles, Techniques and Tools, Addison-Wesley, 1986

  2. Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman - Compilers, Principles, Techniques and Tools, Second Edition, Pearson Education, 2006

  3. Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides - Design Patterns: Elements of Reusable Object-Oriented Software, 1995.
  4. Oracle Corporation - JavaCC Parser Generator, http://java.net/projects/javacc/downloads
  5. Tim Lindholm, Frank Yellin - The Java Virtual Machine Specification, Second Edition.