Programming Languages and Compilers WS 2013/14 - Slide 308

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.
©2009 by Prof. Dr. Uwe Kastens
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 07.10.2013