(→Problema) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Problema == | == Problema == | ||
− | Considere a gramática seguinte, onde '''?''', ''':''', '''#''' 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: