Through the study of this course, students can master basic theoretical knowledge of grammar and language, lexical analysis, syntax analysis, semantic analysis, optimization and generation of object code, and lay a good foundation for the future compilers learning and compilers design development.
There are mainly 8 chapters, and the main contents of each chapter are as follows.
01 Introduction: This chapter briefly introduces the components of the compilers and various applications of compilers techniques.
02 Lexical analysis: This chapter introduces the concepts of regular form and finite automata and the automatic generation method of lexical analyzer.
03 Syntax analysis: This chapter introduces the basic concept of context-free grammar, and introduces the predictive top-down parsing (LL(1)) and bottom-up parsing (SLR, LR(1), LALR).
04 Syntax-Directed Translation: This chapter introduces two ways to connect semantic rules and production: syntax-directed definition and syntax-directed translation.
05 Organization and Management of Run-Time Storage Space: This chapter introduces the relationship between static program body and run-time activities before code generation, as well as the binding relationship between static names and runtime data objects.
06 Intermediate Code Generation: This chapter introduces how the basic structure of programming languages can be translated into machine independent intermediate representations based on syntax-directed definitions.
07 Code Generation:
This chapter introduces the problems to be solved by code generator, and understands the whole process of code generation through a simple code generation algorithm.
08 Design and Implementation of a Simple Compiler:
This chapter describes how to implement a simple Python-based compiler.