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

From Wiki**3

Root (talk | contribs)
Created page with "== Problema == == Solução == category:Compiladores category:Ensino"
 
Root (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Problema ==
== Problema ==
Considere a gramática G seguinte, onde S é o símbolo inicial e '''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 ==

Latest revision as of 09:34, 2 May 2024

Problema

Considere a gramática G seguinte, onde S é o símbolo inicial e 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