Está en la página 1de 1

EJERCICIO # 1

Terminales:{condición ,while, do, ;}

No terminales: {<INICIO>,<DO>,<WHILE>,<SENTENCIA>, <EXPRESION>,<VARIABLE>}

Inicio = <INICIO>

Producciones:

<INICIO> ::= <While> condición <DO> <SENTENCIA>

<DO> ::= do

<WHILE > ::= while <EXPRESION>

<EXPRESION> ::= <EXPRESION><OPERADOR>BINARIO><EXPRESION>|


<OPERADORUNITARIO><EXPRESION>|<ENTERO><VARIABLE>|<VARIABLE><LISTARGUMETO>

<SENTENCIA> ::=

<SentenciaDeAsignación> | <SentenciaDeRetorno> |<SentenciaCondicional> | <SentenciaWhile> |


<Bloque>

EJERCICIO #2

S-> xSz
S -> ySz
S -> λ

También podría gustarte