Poznámky
Osnova
Part VIII.
Top-Down Parsing
Top-Down Parsing: Introduction
A Table-Based Selection of a Rule
Set First
LL Grammars without
e
-rules
Simple Programming Language (SPL)
Algorithm: First(X)
First(X) for SPL: Example
Construction of LL Table
Parsing Based on LL Table: Example
LL Grammars: Useful Transformations
Factorization
Left Recursion Replacement
LL Grammars with
e
-rules: Introduction
Grammar for Arithmetical Expressions
Set Empty
Algorithm: Empty(X)
Previous Algorithm: Illustration
Empty(X) for G
expr
3
: Example
Algorithm: First(X)
Previous Algorithm: Illustration
First(X) for G
expr
3
: Example
First(X) & Empty(X) for G
expr
3
: Summary
Algorithm: First(X
1
X
2
…X
n
)
First(X
1
X
2
…X
n
): Example
Algorithm: Empty(X
1
X
2
…X
n
)
Empty(X
1
X
2
…X
n
): Example
Set Follow
Algorithm: Follow(A)
Previous Algorithm: Illustration
Follow(X) for G
expr
3
: Example
1/3
Follow(X) for G
expr
3
: Example
2/3
Follow(X) for G
expr
3
: Example
3/3
Set Predict
Set Predict(A
®
X
1
X
2
...X
n
): Illustration
Predict(A
®
x) for G
expr
3
: Example 1/2
Predict(A
®
x) for G
expr
3
: Example 2/2
Construction of LL Table
Parsing Based on LL Table: Example
LL Grammars with
e
-rules: Definition
LL Analyzer Implementation
Recursive Descent: Example 1/4
Recursive Descent: Example 2/4
Recursive Descent: Example 3/4
Recursive Descent: Example 4/4
Recursive Descent: Illustration for i*i$
Predictive Parsing
Table-Driven Parsing: Algorithm
Table-Driven Parsing: Example
Handling Errors: Introduction
Panic-Mode (Hartmann) Error Recovery
Panic-Mode Recovery: Illustration 1/2
Panic-Mode Recovery: Illustration 2/2
Context(X) for Predictive Parser: Variant I
Variant I: Example
Context(X) for Predictive Parser: Variant II
Variant II: Example