Difference between revisions of "Bottom-Up Parsing/SLR(1) Exercise 03"

From Wiki**3

< Bottom-Up Parsing
(Created page with "== Problema == == Solução == category:Compiladores category:Ensino")
 
Line 1: Line 1:
 
== Problema ==
 
== Problema ==
 +
Considere a gramática seguinte, onde '''a''' e '''b''' são símbolos terminais.
 +
 +
S -> A a A b | B b B a
 +
A -> ε
 +
B -> ε
 +
 +
Demonstre que esta gramática é LL(1), mas não LR(0).
  
 
== Solução ==
 
== Solução ==

Revision as of 18:09, 9 February 2015

Problema

Considere a gramática seguinte, onde a e b são símbolos terminais.

S -> A a A b | B b B a
A -> ε
B -> ε

Demonstre que esta gramática é LL(1), mas não LR(0).

Solução