This course gives theories and techniques of compilers in programming language processors, to understand how computers work fundamentally.
(Goals) You learn theories and techniques of compilers.
(Topics) Main topics of this course are lexical analysis, parsing, context-free grammar, recursive-decent parser, LL parser, LR parser, PEG (parsing expression grammar), semantic analysis, code generation, and optimization.
lexical analysis, parsing, context-free grammar, recursive-decent parser, LL parser, LR parser, PEG (parsing expression grammar), semantic analysis, code generation, optimization
✔ Specialist skills | Intercultural skills | Communication skills | Critical thinking skills | Practical and/or problem-solving skills |
Classroom learning, programming exercise
Course schedule | Required learning | |
---|---|---|
Class 1 | introduction | introduction |
Class 2 | lexical analysis, regular expression (1) | lexical analysis, regular expression (1) |
Class 3 | lexical analysis, regular expression (2) | lexical analysis, regular expression (2) |
Class 4 | Parsing, context-free grammar (1): BNF, abstract syntax tree (AST) | Parsing, context-free grammar (1): BNF, abstract syntax tree (AST) |
Class 5 | Parsing, context-free grammar (2): recursive-decent parser, LL parser | Parsing, context-free grammar (2): recursive-decent parser, LL parser |
Class 6 | intermediate exam. | intermediate exam. |
Class 7 | Parsing, context-free grammar (3): LR parser | Parsing, context-free grammar (3): LR parser |
Class 8 | Parsing, context-free grammar (4): PEG (parsing expression grammar) | Parsing, context-free grammar (4): PEG (parsing expression grammar) |
Class 9 | Semantic analysis (1): symbol table, scope | Semantic analysis (1): symbol table, scope |
Class 10 | Semantic analysis (2): type checking | Semantic analysis (2): type checking |
Class 11 | Code generation (1): control statements | Code generation (1): control statements |
Class 12 | Code generation (2): constant, variable, expressions | Code generation (2): constant, variable, expressions |
Class 13 | Code generation (3): function calls, stack frame | Code generation (3): function calls, stack frame |
Class 14 | Code optimization | Code optimization |
To enhance effective learning, students are encouraged to spend approximately 100 minutes preparing for class and another 100 minutes reviewing class content afterwards (including assignments) for each class.
They should do so by referring to textbooks and other course material.
None. Slides are available in lecture.
None
mid exam: 30%
programming exercise report: 35%
last exam: 35%
Desirable if you have already took Assembly Language