Description
In this course, you will :
- Understand the LR(1) and LALR(1) parsers thoroughly.
- Understand the functionalities of each phase in detail.
- Understand the conversion of a parse tree to machine code.
Syllabus :
1. Phase II : Bottom Up Parsers - CLR(1) Grammars.
- CLR(1) Grammar : Introduction
- CLR(1) Grammar : Closure(I) and Goto()
- CLR(1) Grammar : Example
- Conflicts in CLR(1) : SR and RR Conflicts.
- CLR(1) Grammar relation with LL(1), LR(0) and SLR(1) Grammars.
2. Phase II : Bottom Up Parsers - LALR(1) Grammars.
- LALR(1) Grammar : Example - 2
- Relation among LL(1) , LR(0), SLR(1), CLR(1) and LALR(1) Grammars.
- Operator Grammar
3. Phase III : Syntax Directed Translation
- SDT : Introduction.
- SDT : Functions
- Annotated Parse Tree
- Types of Attributes
- Example 1 - Counting number of paranthesis.
- Example 2 - SDT to Evaluate the Algebraic Expression.
- Example 3 - SDT to Convert Infix Notation to Postfix Notaiton.
- Example 4 - SDT for Type Checking.
- Example 5 - SDT for Constructing Abstract Syntax Tree (AST).
- Directed Acyclic Graph.
- Types of SDT's
- Note : Types of SDT's
- Example : Constructing SDT
- Example : Constructing SDT
4. Phase IV : Intermediate Code Generation
- Introduction and Types
- Three Address Code
- Three Address Code : Representation
- Three Address Code : Example 1
- Three Address Code : Example 2
- Three Address Code : Example 3 - Loop
- Three Address Code : Example 4 - Loop and Array
- Three Address Code : Quadruples
- Three Address Code : Triples
- Three Address Code : Indirect Triples
- Three Address Code : Quadruples, Triples, Indirect Triples.