_____________________________________________________________________________________


Unit 1. Introduction to Language Processors

   1.1. Aims of the course

   1.2. Why to Take this Course?

   1.3. Related Topics

   1.4. What are Compilers?

     1.4.1 Motivation and Goals

   1.5. Compilers vs. Translators

   1.6. Compilers vs. Interpreters

   1.7. Related Programs

   1.8. Compiler Architecture

   1.9. Evolution

   1.10. Compiler Classification

   1.11. The Phases of a Compiler

     1.11.1. Introduction: Front-end and Back-end

     1.11.2. Lexical Analysis

     1.11.3. Syntax Analysis

     1.11.4. Semantic Analysis

     1.11.5. Symbol Table

     1.11.6. Intermediate Code Generation

     1.11.7. Code Optimization

     1.11.8. Final Code Generation

     1.11.9. Error Handling

   1.12. Programming Language Design

   1.13. T-Notation and Bootstrapping

   1.14. Programming Paradigms

   1.15. Recommended Bibliography


Unit 2. Lexical Analysis

   2.1. Introduction: Definitions

   2.2. The Role of a Lexical Analyzer

   2.3. Scanner Implementation

     2.3.1. Loop and Switch Programs

     2.3.2. Recognizing Patterns by means of Regular Expressions

   2.4. Regular Expressions Review

     2.4.1. Regular Expressions for Tokens

   2.5. Finite Automata Review

   2.6. Implementing the Scanner

     2.6.1. From Regular Expressions to NFA

     2.6.2. From NFA to DFA

     2.6.3. From DFA to the Program


Unit 3. Formal Grammars Review

   3.1. Introduction

   3.2. Motivation

   3.3. Definitions

   3.4. Formal Grammars

     3.4.1. BNF Notation

     3.4.2. Examples

     3.4.3. Chomsky Hierarchy

     3.4.4. Definitions

     3.4.5. Derivations and Parse Trees

   3.5. Issues in Parsing Context-Free Grammars

     3.5.1. Ambiguity

     3.5.2. Left-Recursion

     3.5.3. Left-Factoring

   3.6. Push-Down Automata Review


Unit 4. Syntax Analysis

   4.1. Introduction

   4.2. Position of the Parser

   4.3. The role of the Parser

   4.4. Advantages of Using Grammars

   4.5. Types of Parsers

     4.5.1. Top-Down Parsing

     4.5.2. Bottom-Up Parsing

   4.6. Syntax Analyzers. Problems


Unit 5. Top-Down Parsing Techniques

   5.1. Introduction

   5.2. Possible Methodologies

     5.2.1. Backtracking

     5.2.2. Recursive Descent

     5.2.3. Top-Down Predictive Parsing

       5.2.3.1. Table-Driven LL(1) Parsing

         5.2.3.1.1. First and Follow Sets

         5.2.3.1.2. LL(1) Grammars

         5.2.3.1.3. Construction of the Predictive Parsing Table


Unit 6. Bottom-Up Parsing Techniques

   6.1. Introduction

   6.2. Bottom-Up Parsers

   6.3. LR(K) Methods

     6.3.1. Shift-Reduce Parsing

     6.3.2. LR Parsing Engine

     6.3.3. Model of a LR parser

     6.3.4. The LR Parsing Table

     6.3.5. Constructing the Canonical LR(0) Collection

     6.3.6. Limitations of LR(0) Parsing

     6.3.7. LR(0) and LR(1)

     6.3.8. SLR(1)

     6.3.9. LALR(1)

 

Unit 7. Semantic Analysis

   7.1. Introduction

   7.2. Semantic Analysis

   7.3. Type Checking

     7.3.1. Designing a Type Checker

   7.4. Flow of Control Checks

   7.5. Uniqueness Check

   7.6. Name-Related Checks

   7.7. Cycles in Representations of Types

   7.8. Scope Checking

   7.9. Example of a Simple Language

 

Unit 8. Error Handling

   8.1. Introduction

   8.2. Recovering from Errors

   8.3. Error Recovery Strategies

     8.3.1. Panic Mode

     8.3.2. Phase Level

     8.3.3. Error Productions

     8.3.4. Global Correction Techniques

     8.3.5. Error Detection and Recovery in LL Parsers

     8.3.6. Error Detection and Recovery in LR Parsers

 

Unit 9. Intermediate Code Generation

   9.1. Introduction

   9.2. Advantages and disadvantages

   9.3. Compiler architecture review

     9.3.1. The Role of Intermediate Code

     9.3.2. Analysis Phase

     9.3.3. Synthesis Phase

   9.4. Intermediate Languages Types

     9.4.1. Graphical IRs

     9.4.2. Linearized IC

   9.5. Graphical IRs

     9.5.1. Abstract Syntax Trees

     9.5.2. Directed Acyclic Graphs

     9.5.3. Control Flow Graphs

   9.6. Linearized IC

     9.6.1. Stack based

     9.6.2. Three-Address Code

       9.6.2.1. Triples and Quadruples

   9.7. Declarations

 

Unit 10. Code Optimization

   10.1. Introduction

   10.2. Principles of Design

   10.3 Basic Blocks

   10.4. Local Optimizations

     10.4.1. Constant Folding

     10.4.2. Constant Propagation

     10.4.3. Algebraic Simplification and Reassociation

     10.4.4. Strength Reduction

     10.4.5. Other Local Optimizations

   10.5. Global Optimizations

   10.6. Live Variable Analysis

 

Unit 11.  Final Code Generation

   11.1. Introduction

   11.2. Main Issues

   11.3. Input to the Code Generator

   11.4. Target Programs/Target Machine

   11.6. The Target Machine

   11.7. Instruction Cost

   11.8. Instruction Selection

   11.9. Basic Blocks

     11.9.1. Basic Blocks and Flow Graphs

     11.9.2. Transformations on Basic Blocks

   11.10. Register Allocation


Última modificación: lunes, 18 de abril de 2022, 12:54