Poznámky
Osnova
Part XI.
Syntax Directed Translation and Intermediate Code
Syntax-Directed Translation
Intermediate Code: Three–Address Code
Syntax-Directed Generation of 3AC
From a Parse Tree (PT) to an AST: Example
Generation of AST
AST Generation: Example 1/2
AST Generation: Example 2/2
Direct Acyclic Graph(DAG): Example
Postfix Notation
Infix to Postfix Directed by a BU Parser
Translation Grammars
Two-Grammar Translation
One-Grammar Translation
Direct Generation of 3AC
Top-Down Translation: Introduction
Top-Down Translation: Expressions
Expressions: Variable & Parentheses
Expressions: Addition 1/4
Expressions: Addition 2/4
Expressions: Addition 3/4
Expressions: Addition 4/4
Expressions: Multiplication 1/4
Expressions: Multiplication 2/4
Expressions: Multiplication 3/4
Expressions: Multiplication 4/4
Grammar for Expressions: Summary
Evaluation of Expressions: Example 1/16
Evaluation of Expressions: Example 2/16
Evaluation of Expressions: Example 3/16
Evaluation of Expressions: Example 4/16
Evaluation of Expressions: Example 5/16
Evaluation of Expressions: Example 6/16
Evaluation of Expressions: Example 7/16
Evaluation of Expressions: Example 8/16
Evaluation of Expressions: Example 9/16
Evaluation of Expressions: Example 10/16
Evaluation of Expressions: Example 11/16
Evaluation of Expressions: Example 12/16
Evaluation of Expressions: Example 13/16
Evaluation of Expressions: Example 14/16
Evaluation of Expressions: Example 15/16
Evaluation of Expressions: Example 16/16
Semantic Analysis: Type Checking
Type Checking: Example 1/3
Type Checking: Example 2/3
Type Checking: Example 3/3
Short Evaluation (Jumping Code)
Short Evaluation: Graphic Representation
Short Evaluation Using AST: Introduction
Short Evaluation Using AST: Implementation
Short Evaluation Using AST: Example
Short Evaluation: Direct Code Generation 1/5
Short Evaluation: Direct Code Generation 2/5
Short Evaluation: Direct Code Generation 3/5
Short Evaluation: Direct Code Generation 4/5
Short Evaluation: Direct Code Generation 5/5
Branching: If-Then
Branching: If-Then-Else
While Loop
Repeat Loop
Yacc: Basic Idea
Yacc: Phases of Compilation
Structure of Yacc Source Program
Description of Grammar in Yacc
Section I: Declaration
Section II: Translation Rules
Section III: Auxiliary Procedures
Complete Source Program in Yacc