(→Problema) |
|||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
Considere a gramática G seguinte, onde E é o símbolo inicial e '''?''', ''':''', '''#''' e '''id''' são símbolos terminais. | Considere a gramática G seguinte, onde E é o símbolo inicial e '''?''', ''':''', '''#''' e '''id''' são símbolos terminais. | ||
− | E | + | E → E ? T : E | T |
− | T | + | T → # T id | id |
Considere e resolva as seguintes questões: | Considere e resolva as seguintes questões: | ||
Line 11: | Line 11: | ||
== Solução == | == Solução == | ||
+ | |||
+ | [[image:slr1-01-1.jpg]] | ||
+ | |||
+ | [[image:slr1-01-2.jpg]] | ||
[[category:Compiladores]] | [[category:Compiladores]] | ||
[[category:Ensino]] | [[category:Ensino]] |
Considere a gramática G seguinte, onde E é o símbolo inicial e ?, :, # e id são símbolos terminais.
E → E ? T : E | T T → # T id | id
Considere e resolva as seguintes questões: