Programming Languages and Compilers WS 2013/14 - Slide 318

Objectives:
See a conflict in an automaton
In the lecture:
Explain
- the construction
- a solution of the conflict: The automaton can be modified such that in state 6, if an else is the next input token, it is shifted rather than a reduction is made. In that case the ambiguity is solved such that the else part is bound to the inner if. That is the structure required in Pascal and C. Some parser generators can be instructed to resolve conflicts in this way.
Suggested reading:
Kastens / Übersetzerbau, Section 4.3
©2009 by Prof. Dr. Uwe Kastens
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 07.10.2013