Compiler I WS 2001/2002 - Slide 44
Objectives:
Understand the decision basis of the automata
In the lecture:
Explain the meaning of the graphics:
- role of the stack: contains states of the automaton,
- accepted input: will not be considered again,
- lookahead: the next k symbols, not yet accepted
- leftmost derivation: leftmost non-terminal is derived next; rightmost correspondingly,
- consequences for the direction of tree construction,
- LL: (L)eft-to-right, (L)eftmost derivation,
- LR: (L)eft-to-right, (R)ightmost derivation,
- LALR: (L)ook(A)head LR
Suggested reading:
Kastens / Übersetzerbau, Section Text zu Abb. 4.2-1, 4.3-1
Questions:
Use the graphics to explain why a bottom-up parser without
lookahead (k=0) is reasonable, but a top-down parser is not.
©2001 by Prof. Dr. Uwe Kastens
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 10.04.2006