S08-3-Ejercicios-2
2
Dada la gramática G={N,T,P,S} Donde: N = {E,S,T,M,F} T = {+,-,*,(,),n} P = { E S T | T S + | - T M F | F M * F ( E ) | n } S = {E} Ejercicio 5 ¿La gramática es de tipo LL(1)?
-
Upload
diego-corales -
Category
Documents
-
view
214 -
download
0
description
sdfsdfsdfdsfdsfdsfsdfdsf
Transcript of S08-3-Ejercicios-2
Dada la gramática G={N,T,P,S} Donde: N = {E,S,T,M,F} T = {+,-,*,(,),n}
P = { E S T | T S + | - T M F | F
M * F ( E ) | n } S = {E}
Eje
rcic
io 5
¿La gramática es de tipo LL(1)?
Dada la gramática G={N,T,P,S} Donde: N = {sentencia, sent_if, parte_else, exp_bool}
T = {if, (, ), else, true, false, otra_sent} P = { sentencia sent_if | otra_sent
sent_if if (exp_bool) sentencia parte_else
parte_else else sentencia | λ
exp_bool true | false
}
S = {sentencia} Eje
rcic
io 6
¿La gramática es de tipo LL(1)?