Unit 1. Introduction to Language Processors
Unit 1 introduces the main aims of the course and describes important concepts related to compilers, translators, interpreters, and related programs. It also presents the main components in the architecture of a compiler, their evolution, programming paradigms and language design.
Unit 2. Lexical Analysis
Unit 2 introduces the role of the lexical analyzer into the architecture of a language processor. It also presents different techniques for the scanner implementation, and explains how to implement a scanner by means of the recognition of tokens using Regular Expressions and Deterministic Finite Automata.
Unit 3. Formal Grammars
Unit 3 reviews the most important concepts related to formal grammars (main definitions, use of the production rules, derivations and parse trees representations, Chomsky Hierarchy, BNF notation, etc.). It also illustrates the key issues in parsing context-free grammars (ambiguity, recursive rules, and left-factoring).
Unit 4. Syntax Analysis
Unit 4 describes the role of the parser in the architecture of a language processor. It also presents the advantages of using grammars to develop a syntax analyzer and the most relevant techniques for syntax analysis (Top-Down and Bottom-Up parsing).
Unit 5. Top-Down Parsing
Unit 5 describes the main characteristics of Top-Down parsing techniques. It presents the most relevant techniques to develop a Top-Down predictive parser and the main alternatives for error detection and recovery using these parsing techniques.
Unit 6. Bottom-Up Parsing
Unit 6 describes the main characteristics of Bottom-Up parsing techniques. It presents the most relevant features and approaches in shift-reduce parsing, and explains how to construct LR table-driven shift-reduce parsers.
Unit 7. Semantic Analysis
Unit 7 describes the role of the semantic analyzer into the architecture of a language processor. It presents the main tasks that must be completed by a semantic analyzer and the main approaches to solve them.
Unit 8. Error Handling
Unit 8 describes the main error recovery strategies for a parser. It presents the main approaches for error detection and recovery in Top-Down predictive parsing and Bottom-Up parsing.
Unit 9. Intermediate Code Generation
Unit 9 describes the role of intermediate code generation in the architecture of a language processor. It presents the main types of intermediate languages (graphical and linear intermediate representations).
Unit 10. Code Optimization
Unit 10 describes the role of code optimization in the architecture of a language processor. It presents the concept of basic block and uses it to classify optimizations into local and global.
Unit 11. Final Code Generation
Unit 11 describes the role of final code generation in the architecture of a language processor. It presents the concepts of target program, target machine, and instruction cost. The unit also describes the main transformations on basic blocks and how to carry out register allocation.