Programming Languages and Compilers WS 2013/14 - Slide 306
Objectives:
Strong LL(1) can easily be checked
In the lecture:
- Explain the definitions using the example.
- First set: set of terminal symbols, which may begin some token sequence that is derivable from u.
- Follow set: set of terminal symbols, which may follow an A in some derivation.
- Disjoint decision sets imply that decisions can be made deterministically using the next input token.
- For k=1: Strong LL(k) is equivalent to LL(k).
Suggested reading:
Kastens / Übersetzerbau, Section 4.2, LL(k) conditions, computation of First sets and Follow sets
Questions:
The example grammar is not strong LL(1).
- Show where the condition is violated.
- Explain the reason for the violation.
- What would happen if we constructed a recursive descent parser although the condition is violated?
©2009 by Prof. Dr. Uwe Kastens
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 07.10.2013