From eddd45dc27640113ca154ead062e8383239352dd Mon Sep 17 00:00:00 2001 From: Miguel Licea <66740053+miglcesp01@users.noreply.github.com> Date: Thu, 18 Nov 2021 22:58:51 -0500 Subject: [PATCH 1/2] Probando todo --- Terminado.txt | 19 + parser.out | 3171 ++++++++----------------------------------------- parsetab.py | 122 +- sintactico.py | 155 ++- 4 files changed, 648 insertions(+), 2819 deletions(-) create mode 100644 Terminado.txt diff --git a/Terminado.txt b/Terminado.txt new file mode 100644 index 0000000..6f2f23a --- /dev/null +++ b/Terminado.txt @@ -0,0 +1,19 @@ +Trabajo terminado +> tipoDato : Tipos de datos +> booleano : Valores true y false +> comparador : Simbolos para comparar +> valores : valores numericos,cadena,booleano y variable +> operadores_asignacion : =,+=,-= +> operadores_aritmeticos : Operadores para operaciones aritmeticas +> operacion_aritmetica : Operaciones + + +#Estructura de Dato Mapa +> paresClaveValor : par clave valor o conjunto de ellos +> creacionMapa : Valor de un mapa o entre llaves o una variable +> mapa : Instanciacion de un mapa +> mapaFunciones : Funciones de la estructura mapa + + + +Notas> \ No newline at end of file diff --git a/parser.out b/parser.out index 6f146fd..bd8c87d 100644 --- a/parser.out +++ b/parser.out @@ -8,9 +8,13 @@ Unused terminals: CORCHETEABRE CORCHETECIERRA DO + ELSE EXPORT FINAL FLECHA + FOR + IF + IMPORT IN IS LIST @@ -18,2913 +22,768 @@ Unused terminals: NOT NULL PRINT + PUNTOCOMA REQUIRED + RETURN SET SUPER THIS + VOID + WHILE Grammar -Rule 0 S' -> bloque -Rule 1 bloque -> expresion -Rule 2 bloque -> bloque expresion -Rule 3 bloque -> empty -Rule 4 bloque -> estructuras -Rule 5 bloque -> bloque estructuras -Rule 6 funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA -Rule 7 funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA -Rule 8 funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA -Rule 9 parametros -> tipoDato VARIABLE -Rule 10 parametros -> parametros COMA tipoDato VARIABLE -Rule 11 parametros -> empty -Rule 12 expresion -> mapa PUNTOCOMA -Rule 13 expresion -> mapaFunciones PUNTOCOMA -Rule 14 expresion -> asignacion PUNTOCOMA -Rule 15 import -> IMPORT CADENA PUNTOCOMA -Rule 16 asignacion -> VARIABLE operadores_asignacion valores -Rule 17 asignacion -> tipoDato VARIABLE IGUAL valores -Rule 18 asignacion -> BOOL VARIABLE IGUAL comparacion -Rule 19 asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica -Rule 20 asignacion -> empty -Rule 21 operacion_aritmetica -> valores operadores_aritmeticos valores -Rule 22 operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores -Rule 23 operadores_aritmeticos -> SUMA -Rule 24 operadores_aritmeticos -> RESTA -Rule 25 operadores_aritmeticos -> MULTIPLICACION -Rule 26 operadores_aritmeticos -> DIVISION -Rule 27 operadores_aritmeticos -> DIVENTERA -Rule 28 operadores_aritmeticos -> RESIDUO -Rule 29 operadores_asignacion -> IGUAL -Rule 30 operadores_asignacion -> ASIGNACIONAUMENTADA -Rule 31 operadores_asignacion -> ASIGNACIONDISMINUIDA -Rule 32 comparacion -> valores comparador valores -Rule 33 comparacion -> comparacion comparador valores -Rule 34 comparador -> MENORQUE -Rule 35 comparador -> MAYORQUE -Rule 36 comparador -> IGUALQUE -Rule 37 comparador -> DIFERENTEQUE -Rule 38 mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa -Rule 39 mapa -> mapaFunciones -Rule 40 mapaFunciones -> mapa PUNTO VARIABLE LPAREN RPAREN -Rule 41 mapaFunciones -> mapa PUNTO VARIABLE LPAREN valores -Rule 42 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN -Rule 43 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN -Rule 44 creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA -Rule 45 creacionMapa -> VARIABLE -Rule 46 paresClaveValor -> valores DOSPUNTOS valores -Rule 47 paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores -Rule 48 valores -> VARIABLE -Rule 49 valores -> NUMERO -Rule 50 valores -> CADENA -Rule 51 valores -> booleano -Rule 52 booleano -> TRUE -Rule 53 booleano -> FALSE -Rule 54 tipoDato -> STRING -Rule 55 tipoDato -> INT -Rule 56 tipoDato -> BOOL -Rule 57 tipoDato -> DOUBLE -Rule 58 tipoDato -> DYNAMIC -Rule 59 tipoDato -> VAR -Rule 60 estructuras -> estructuraIf -Rule 61 estructuras -> estructuraWhile -Rule 62 estructuras -> estructuraFor -Rule 63 estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA -Rule 64 estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA -Rule 65 estructuraIf -> estructuraIfElse -Rule 66 estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA -Rule 67 estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA -Rule 68 estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA -Rule 69 estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA -Rule 70 asignacionVacio -> asignacion -Rule 71 asignacionVacio -> empty -Rule 72 comparacionVacio -> comparacion -Rule 73 comparacionVacio -> booleano -Rule 74 comparacionVacio -> empty -Rule 75 aumento -> VARIABLE IGUAL operacion_aritmetica -Rule 76 aumento -> VARIABLE operadores_asignacion NUMERO -Rule 77 aumento -> VARIABLE operadores_asignacion VARIABLE -Rule 78 aumento -> empty -Rule 79 argumentoEstructura -> VARIABLE -Rule 80 argumentoEstructura -> booleano -Rule 81 argumentoEstructura -> comparacion -Rule 82 empty -> +Rule 0 S' -> asignacion +Rule 1 asignacion -> VARIABLE operadores_asignacion valores +Rule 2 asignacion -> tipoDato VARIABLE IGUAL valores +Rule 3 asignacion -> BOOL VARIABLE IGUAL comparacion +Rule 4 asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica +Rule 5 operacion_aritmetica -> valores operadores_aritmeticos valores +Rule 6 operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores +Rule 7 operadores_aritmeticos -> SUMA +Rule 8 operadores_aritmeticos -> RESTA +Rule 9 operadores_aritmeticos -> MULTIPLICACION +Rule 10 operadores_aritmeticos -> DIVISION +Rule 11 operadores_aritmeticos -> DIVENTERA +Rule 12 operadores_aritmeticos -> RESIDUO +Rule 13 operadores_asignacion -> IGUAL +Rule 14 operadores_asignacion -> ASIGNACIONAUMENTADA +Rule 15 operadores_asignacion -> ASIGNACIONDISMINUIDA +Rule 16 comparacion -> valores comparador valores +Rule 17 comparacion -> comparacion comparador valores +Rule 18 comparador -> MENORQUE +Rule 19 comparador -> MAYORQUE +Rule 20 comparador -> IGUALQUE +Rule 21 comparador -> DIFERENTEQUE +Rule 22 mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa +Rule 23 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN +Rule 24 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN +Rule 25 creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA +Rule 26 creacionMapa -> VARIABLE +Rule 27 paresClaveValor -> valores DOSPUNTOS valores +Rule 28 paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores +Rule 29 valores -> NUMERO +Rule 30 valores -> CADENA +Rule 31 valores -> booleano +Rule 32 valores -> VARIABLE +Rule 33 booleano -> TRUE +Rule 34 booleano -> FALSE +Rule 35 tipoDato -> STRING +Rule 36 tipoDato -> INT +Rule 37 tipoDato -> BOOL +Rule 38 tipoDato -> DOUBLE +Rule 39 tipoDato -> DYNAMIC +Rule 40 tipoDato -> VAR Terminals, with rules where they appear ADD : -ASIGNACIONAUMENTADA : 30 -ASIGNACIONDISMINUIDA : 31 -BOOL : 18 56 -CADENA : 15 50 -COMA : 10 38 47 +ASIGNACIONAUMENTADA : 14 +ASIGNACIONDISMINUIDA : 15 +BOOL : 3 37 +CADENA : 30 +COMA : 22 28 COMILLASDOBLES : COMILLASSIMPLES : CORCHETEABRE : CORCHETECIERRA : -DIFERENTEQUE : 37 -DIVENTERA : 27 -DIVISION : 26 +DIFERENTEQUE : 21 +DIVENTERA : 11 +DIVISION : 10 DO : -DOSPUNTOS : 46 47 -DOUBLE : 57 -DYNAMIC : 58 -ELSE : 66 67 +DOSPUNTOS : 27 28 +DOUBLE : 38 +DYNAMIC : 39 +ELSE : EXPORT : -FALSE : 53 +FALSE : 34 FINAL : FLECHA : -FOR : 69 -IF : 63 64 -IGUAL : 17 18 19 29 38 75 -IGUALQUE : 36 -IMPORT : 15 +FOR : +IF : +IGUAL : 2 3 4 13 22 +IGUALQUE : 20 +IMPORT : IN : -INT : 55 +INT : 36 IS : LIST : -LLAVEABRE : 6 7 8 44 63 64 66 67 68 69 -LLAVECIERRA : 6 7 8 44 63 64 66 67 68 69 -LPAREN : 6 7 8 40 41 42 43 63 64 68 69 -MAP : 38 -MAYORQUE : 35 38 -MENORQUE : 34 38 -MULTIPLICACION : 25 +LLAVEABRE : 25 +LLAVECIERRA : 25 +LPAREN : 23 24 +MAP : 22 +MAYORQUE : 19 22 +MENORQUE : 18 22 +MULTIPLICACION : 9 NEW : NOT : NULL : -NUMERO : 49 76 +NUMERO : 29 PRINT : -PUNTO : 40 41 42 43 -PUNTOCOMA : 6 8 12 13 14 15 69 69 +PUNTO : 23 24 +PUNTOCOMA : REQUIRED : -RESIDUO : 28 -RESTA : 24 -RETURN : 6 8 -RPAREN : 6 7 8 40 42 43 63 64 68 69 +RESIDUO : 12 +RESTA : 8 +RETURN : +RPAREN : 23 24 SET : -STRING : 54 -SUMA : 23 +STRING : 35 +SUMA : 7 SUPER : THIS : -TRUE : 52 -VAR : 59 -VARIABLE : 6 7 8 9 10 16 17 18 19 38 40 41 42 42 43 43 45 48 75 76 77 77 79 -VOID : 7 8 -WHILE : 68 +TRUE : 33 +VAR : 40 +VARIABLE : 1 2 3 4 22 23 23 24 24 26 32 +VOID : +WHILE : error : Nonterminals, with rules where they appear -argumentoEstructura : 63 64 68 -asignacion : 14 70 -asignacionVacio : 69 -aumento : 69 -bloque : 2 5 6 7 8 63 66 68 69 0 -booleano : 51 73 80 -comparacion : 18 33 72 81 -comparacionVacio : 69 -comparador : 32 33 -creacionMapa : 38 -empty : 3 11 20 71 74 78 -estructuraFor : 62 -estructuraIf : 60 64 66 67 67 -estructuraIfElse : 65 -estructuraWhile : 61 -estructuras : 4 5 -expresion : 1 2 -funcion : -import : -mapa : 12 40 41 -mapaFunciones : 13 39 -operacion_aritmetica : 19 22 75 -operadores_aritmeticos : 21 22 -operadores_asignacion : 16 76 77 -parametros : 6 7 8 10 -paresClaveValor : 44 47 -tipoDato : 6 9 10 17 19 38 38 -valores : 6 16 17 21 21 22 32 32 33 41 43 46 46 47 47 +asignacion : 0 +booleano : 31 +comparacion : 3 17 +comparador : 16 17 +creacionMapa : 22 +mapa : +mapaFunciones : +operacion_aritmetica : 4 6 +operadores_aritmeticos : 5 6 +operadores_asignacion : 1 +paresClaveValor : 25 28 +tipoDato : 2 4 22 22 +valores : 1 2 5 5 6 16 16 17 24 27 27 28 28 Parsing method: LALR state 0 - (0) S' -> . bloque - (1) bloque -> . expresion - (2) bloque -> . bloque expresion - (3) bloque -> . empty - (4) bloque -> . estructuras - (5) bloque -> . bloque estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (82) empty -> . - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - ! shift/reduce conflict for MAP resolved as shift - ! shift/reduce conflict for VARIABLE resolved as shift - ! shift/reduce conflict for BOOL resolved as shift - ! shift/reduce conflict for IF resolved as shift - ! shift/reduce conflict for WHILE resolved as shift - ! shift/reduce conflict for FOR resolved as shift - ! shift/reduce conflict for STRING resolved as shift - ! shift/reduce conflict for INT resolved as shift - ! shift/reduce conflict for DOUBLE resolved as shift - ! shift/reduce conflict for DYNAMIC resolved as shift - ! shift/reduce conflict for VAR resolved as shift - $end reduce using rule 82 (empty -> .) - PUNTOCOMA reduce using rule 82 (empty -> .) - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - ! MAP [ reduce using rule 82 (empty -> .) ] - ! VARIABLE [ reduce using rule 82 (empty -> .) ] - ! BOOL [ reduce using rule 82 (empty -> .) ] - ! IF [ reduce using rule 82 (empty -> .) ] - ! WHILE [ reduce using rule 82 (empty -> .) ] - ! FOR [ reduce using rule 82 (empty -> .) ] - ! STRING [ reduce using rule 82 (empty -> .) ] - ! INT [ reduce using rule 82 (empty -> .) ] - ! DOUBLE [ reduce using rule 82 (empty -> .) ] - ! DYNAMIC [ reduce using rule 82 (empty -> .) ] - ! VAR [ reduce using rule 82 (empty -> .) ] - - bloque shift and go to state 1 - expresion shift and go to state 2 - empty shift and go to state 3 - estructuras shift and go to state 4 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - estructuraIfElse shift and go to state 16 + (0) S' -> . asignacion + (1) asignacion -> . VARIABLE operadores_asignacion valores + (2) asignacion -> . tipoDato VARIABLE IGUAL valores + (3) asignacion -> . BOOL VARIABLE IGUAL comparacion + (4) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica + (35) tipoDato -> . STRING + (36) tipoDato -> . INT + (37) tipoDato -> . BOOL + (38) tipoDato -> . DOUBLE + (39) tipoDato -> . DYNAMIC + (40) tipoDato -> . VAR + + VARIABLE shift and go to state 2 + BOOL shift and go to state 4 + STRING shift and go to state 5 + INT shift and go to state 6 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + + asignacion shift and go to state 1 + tipoDato shift and go to state 3 state 1 - (0) S' -> bloque . - (2) bloque -> bloque . expresion - (5) bloque -> bloque . estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (82) empty -> . - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - PUNTOCOMA reduce using rule 82 (empty -> .) - - expresion shift and go to state 24 - estructuras shift and go to state 25 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - empty shift and go to state 26 - estructuraIfElse shift and go to state 16 + (0) S' -> asignacion . + + state 2 - (1) bloque -> expresion . + (1) asignacion -> VARIABLE . operadores_asignacion valores + (13) operadores_asignacion -> . IGUAL + (14) operadores_asignacion -> . ASIGNACIONAUMENTADA + (15) operadores_asignacion -> . ASIGNACIONDISMINUIDA - MAP reduce using rule 1 (bloque -> expresion .) - VARIABLE reduce using rule 1 (bloque -> expresion .) - BOOL reduce using rule 1 (bloque -> expresion .) - IF reduce using rule 1 (bloque -> expresion .) - WHILE reduce using rule 1 (bloque -> expresion .) - FOR reduce using rule 1 (bloque -> expresion .) - STRING reduce using rule 1 (bloque -> expresion .) - INT reduce using rule 1 (bloque -> expresion .) - DOUBLE reduce using rule 1 (bloque -> expresion .) - DYNAMIC reduce using rule 1 (bloque -> expresion .) - VAR reduce using rule 1 (bloque -> expresion .) - $end reduce using rule 1 (bloque -> expresion .) - PUNTOCOMA reduce using rule 1 (bloque -> expresion .) - LLAVECIERRA reduce using rule 1 (bloque -> expresion .) + IGUAL shift and go to state 11 + ASIGNACIONAUMENTADA shift and go to state 12 + ASIGNACIONDISMINUIDA shift and go to state 13 + operadores_asignacion shift and go to state 10 state 3 - (3) bloque -> empty . - (20) asignacion -> empty . - - ! reduce/reduce conflict for PUNTOCOMA resolved using rule 3 (bloque -> empty .) - MAP reduce using rule 3 (bloque -> empty .) - VARIABLE reduce using rule 3 (bloque -> empty .) - BOOL reduce using rule 3 (bloque -> empty .) - IF reduce using rule 3 (bloque -> empty .) - WHILE reduce using rule 3 (bloque -> empty .) - FOR reduce using rule 3 (bloque -> empty .) - STRING reduce using rule 3 (bloque -> empty .) - INT reduce using rule 3 (bloque -> empty .) - DOUBLE reduce using rule 3 (bloque -> empty .) - DYNAMIC reduce using rule 3 (bloque -> empty .) - VAR reduce using rule 3 (bloque -> empty .) - $end reduce using rule 3 (bloque -> empty .) - PUNTOCOMA reduce using rule 3 (bloque -> empty .) - LLAVECIERRA reduce using rule 3 (bloque -> empty .) + (2) asignacion -> tipoDato . VARIABLE IGUAL valores + (4) asignacion -> tipoDato . VARIABLE IGUAL operacion_aritmetica - ! PUNTOCOMA [ reduce using rule 20 (asignacion -> empty .) ] + VARIABLE shift and go to state 14 state 4 - (4) bloque -> estructuras . + (3) asignacion -> BOOL . VARIABLE IGUAL comparacion + (37) tipoDato -> BOOL . - MAP reduce using rule 4 (bloque -> estructuras .) - VARIABLE reduce using rule 4 (bloque -> estructuras .) - BOOL reduce using rule 4 (bloque -> estructuras .) - IF reduce using rule 4 (bloque -> estructuras .) - WHILE reduce using rule 4 (bloque -> estructuras .) - FOR reduce using rule 4 (bloque -> estructuras .) - STRING reduce using rule 4 (bloque -> estructuras .) - INT reduce using rule 4 (bloque -> estructuras .) - DOUBLE reduce using rule 4 (bloque -> estructuras .) - DYNAMIC reduce using rule 4 (bloque -> estructuras .) - VAR reduce using rule 4 (bloque -> estructuras .) - $end reduce using rule 4 (bloque -> estructuras .) - PUNTOCOMA reduce using rule 4 (bloque -> estructuras .) - LLAVECIERRA reduce using rule 4 (bloque -> estructuras .) + ! shift/reduce conflict for VARIABLE resolved as shift + VARIABLE shift and go to state 15 + + ! VARIABLE [ reduce using rule 37 (tipoDato -> BOOL .) ] state 5 - (12) expresion -> mapa . PUNTOCOMA - (40) mapaFunciones -> mapa . PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> mapa . PUNTO VARIABLE LPAREN valores + (35) tipoDato -> STRING . - PUNTOCOMA shift and go to state 27 - PUNTO shift and go to state 28 + VARIABLE reduce using rule 35 (tipoDato -> STRING .) state 6 - (13) expresion -> mapaFunciones . PUNTOCOMA - (39) mapa -> mapaFunciones . + (36) tipoDato -> INT . - ! shift/reduce conflict for PUNTOCOMA resolved as shift - PUNTOCOMA shift and go to state 29 - PUNTO reduce using rule 39 (mapa -> mapaFunciones .) - - ! PUNTOCOMA [ reduce using rule 39 (mapa -> mapaFunciones .) ] + VARIABLE reduce using rule 36 (tipoDato -> INT .) state 7 - (14) expresion -> asignacion . PUNTOCOMA + (38) tipoDato -> DOUBLE . - PUNTOCOMA shift and go to state 30 + VARIABLE reduce using rule 38 (tipoDato -> DOUBLE .) state 8 - (60) estructuras -> estructuraIf . - (66) estructuraIfElse -> estructuraIf . ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> estructuraIf . ELSE LLAVEABRE estructuraIf LLAVECIERRA - - MAP reduce using rule 60 (estructuras -> estructuraIf .) - VARIABLE reduce using rule 60 (estructuras -> estructuraIf .) - BOOL reduce using rule 60 (estructuras -> estructuraIf .) - IF reduce using rule 60 (estructuras -> estructuraIf .) - WHILE reduce using rule 60 (estructuras -> estructuraIf .) - FOR reduce using rule 60 (estructuras -> estructuraIf .) - STRING reduce using rule 60 (estructuras -> estructuraIf .) - INT reduce using rule 60 (estructuras -> estructuraIf .) - DOUBLE reduce using rule 60 (estructuras -> estructuraIf .) - DYNAMIC reduce using rule 60 (estructuras -> estructuraIf .) - VAR reduce using rule 60 (estructuras -> estructuraIf .) - $end reduce using rule 60 (estructuras -> estructuraIf .) - PUNTOCOMA reduce using rule 60 (estructuras -> estructuraIf .) - LLAVECIERRA reduce using rule 60 (estructuras -> estructuraIf .) - ELSE shift and go to state 31 + (39) tipoDato -> DYNAMIC . + + VARIABLE reduce using rule 39 (tipoDato -> DYNAMIC .) state 9 - (61) estructuras -> estructuraWhile . + (40) tipoDato -> VAR . - MAP reduce using rule 61 (estructuras -> estructuraWhile .) - VARIABLE reduce using rule 61 (estructuras -> estructuraWhile .) - BOOL reduce using rule 61 (estructuras -> estructuraWhile .) - IF reduce using rule 61 (estructuras -> estructuraWhile .) - WHILE reduce using rule 61 (estructuras -> estructuraWhile .) - FOR reduce using rule 61 (estructuras -> estructuraWhile .) - STRING reduce using rule 61 (estructuras -> estructuraWhile .) - INT reduce using rule 61 (estructuras -> estructuraWhile .) - DOUBLE reduce using rule 61 (estructuras -> estructuraWhile .) - DYNAMIC reduce using rule 61 (estructuras -> estructuraWhile .) - VAR reduce using rule 61 (estructuras -> estructuraWhile .) - $end reduce using rule 61 (estructuras -> estructuraWhile .) - PUNTOCOMA reduce using rule 61 (estructuras -> estructuraWhile .) - LLAVECIERRA reduce using rule 61 (estructuras -> estructuraWhile .) + VARIABLE reduce using rule 40 (tipoDato -> VAR .) state 10 - (62) estructuras -> estructuraFor . + (1) asignacion -> VARIABLE operadores_asignacion . valores + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (33) booleano -> . TRUE + (34) booleano -> . FALSE - MAP reduce using rule 62 (estructuras -> estructuraFor .) - VARIABLE reduce using rule 62 (estructuras -> estructuraFor .) - BOOL reduce using rule 62 (estructuras -> estructuraFor .) - IF reduce using rule 62 (estructuras -> estructuraFor .) - WHILE reduce using rule 62 (estructuras -> estructuraFor .) - FOR reduce using rule 62 (estructuras -> estructuraFor .) - STRING reduce using rule 62 (estructuras -> estructuraFor .) - INT reduce using rule 62 (estructuras -> estructuraFor .) - DOUBLE reduce using rule 62 (estructuras -> estructuraFor .) - DYNAMIC reduce using rule 62 (estructuras -> estructuraFor .) - VAR reduce using rule 62 (estructuras -> estructuraFor .) - $end reduce using rule 62 (estructuras -> estructuraFor .) - PUNTOCOMA reduce using rule 62 (estructuras -> estructuraFor .) - LLAVECIERRA reduce using rule 62 (estructuras -> estructuraFor .) + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + valores shift and go to state 17 + booleano shift and go to state 20 state 11 - (38) mapa -> MAP . MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (13) operadores_asignacion -> IGUAL . - MENORQUE shift and go to state 32 + NUMERO reduce using rule 13 (operadores_asignacion -> IGUAL .) + CADENA reduce using rule 13 (operadores_asignacion -> IGUAL .) + VARIABLE reduce using rule 13 (operadores_asignacion -> IGUAL .) + TRUE reduce using rule 13 (operadores_asignacion -> IGUAL .) + FALSE reduce using rule 13 (operadores_asignacion -> IGUAL .) state 12 - (17) asignacion -> tipoDato . VARIABLE IGUAL valores - (19) asignacion -> tipoDato . VARIABLE IGUAL operacion_aritmetica + (14) operadores_asignacion -> ASIGNACIONAUMENTADA . - VARIABLE shift and go to state 33 + NUMERO reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) + CADENA reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) + VARIABLE reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) + TRUE reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) + FALSE reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) state 13 - (42) mapaFunciones -> VARIABLE . PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> VARIABLE . PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> VARIABLE . operadores_asignacion valores - (29) operadores_asignacion -> . IGUAL - (30) operadores_asignacion -> . ASIGNACIONAUMENTADA - (31) operadores_asignacion -> . ASIGNACIONDISMINUIDA + (15) operadores_asignacion -> ASIGNACIONDISMINUIDA . - PUNTO shift and go to state 34 - IGUAL shift and go to state 36 - ASIGNACIONAUMENTADA shift and go to state 37 - ASIGNACIONDISMINUIDA shift and go to state 38 + NUMERO reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) + CADENA reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) + VARIABLE reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) + TRUE reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) + FALSE reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - operadores_asignacion shift and go to state 35 state 14 - (18) asignacion -> BOOL . VARIABLE IGUAL comparacion - (56) tipoDato -> BOOL . + (2) asignacion -> tipoDato VARIABLE . IGUAL valores + (4) asignacion -> tipoDato VARIABLE . IGUAL operacion_aritmetica - ! shift/reduce conflict for VARIABLE resolved as shift - VARIABLE shift and go to state 39 - - ! VARIABLE [ reduce using rule 56 (tipoDato -> BOOL .) ] + IGUAL shift and go to state 23 state 15 - (63) estructuraIf -> IF . LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> IF . LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA + (3) asignacion -> BOOL VARIABLE . IGUAL comparacion - LPAREN shift and go to state 40 + IGUAL shift and go to state 24 state 16 - (65) estructuraIf -> estructuraIfElse . - - ELSE reduce using rule 65 (estructuraIf -> estructuraIfElse .) - MAP reduce using rule 65 (estructuraIf -> estructuraIfElse .) - VARIABLE reduce using rule 65 (estructuraIf -> estructuraIfElse .) - BOOL reduce using rule 65 (estructuraIf -> estructuraIfElse .) - IF reduce using rule 65 (estructuraIf -> estructuraIfElse .) - WHILE reduce using rule 65 (estructuraIf -> estructuraIfElse .) - FOR reduce using rule 65 (estructuraIf -> estructuraIfElse .) - STRING reduce using rule 65 (estructuraIf -> estructuraIfElse .) - INT reduce using rule 65 (estructuraIf -> estructuraIfElse .) - DOUBLE reduce using rule 65 (estructuraIf -> estructuraIfElse .) - DYNAMIC reduce using rule 65 (estructuraIf -> estructuraIfElse .) - VAR reduce using rule 65 (estructuraIf -> estructuraIfElse .) - $end reduce using rule 65 (estructuraIf -> estructuraIfElse .) - PUNTOCOMA reduce using rule 65 (estructuraIf -> estructuraIfElse .) - LLAVECIERRA reduce using rule 65 (estructuraIf -> estructuraIfElse .) + (32) valores -> VARIABLE . + + $end reduce using rule 32 (valores -> VARIABLE .) + SUMA reduce using rule 32 (valores -> VARIABLE .) + RESTA reduce using rule 32 (valores -> VARIABLE .) + MULTIPLICACION reduce using rule 32 (valores -> VARIABLE .) + DIVISION reduce using rule 32 (valores -> VARIABLE .) + DIVENTERA reduce using rule 32 (valores -> VARIABLE .) + RESIDUO reduce using rule 32 (valores -> VARIABLE .) + MENORQUE reduce using rule 32 (valores -> VARIABLE .) + MAYORQUE reduce using rule 32 (valores -> VARIABLE .) + IGUALQUE reduce using rule 32 (valores -> VARIABLE .) + DIFERENTEQUE reduce using rule 32 (valores -> VARIABLE .) state 17 - (68) estructuraWhile -> WHILE . LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA + (1) asignacion -> VARIABLE operadores_asignacion valores . - LPAREN shift and go to state 41 + $end reduce using rule 1 (asignacion -> VARIABLE operadores_asignacion valores .) state 18 - (69) estructuraFor -> FOR . LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA + (29) valores -> NUMERO . - LPAREN shift and go to state 42 + $end reduce using rule 29 (valores -> NUMERO .) + SUMA reduce using rule 29 (valores -> NUMERO .) + RESTA reduce using rule 29 (valores -> NUMERO .) + MULTIPLICACION reduce using rule 29 (valores -> NUMERO .) + DIVISION reduce using rule 29 (valores -> NUMERO .) + DIVENTERA reduce using rule 29 (valores -> NUMERO .) + RESIDUO reduce using rule 29 (valores -> NUMERO .) + MENORQUE reduce using rule 29 (valores -> NUMERO .) + MAYORQUE reduce using rule 29 (valores -> NUMERO .) + IGUALQUE reduce using rule 29 (valores -> NUMERO .) + DIFERENTEQUE reduce using rule 29 (valores -> NUMERO .) state 19 - (54) tipoDato -> STRING . + (30) valores -> CADENA . - VARIABLE reduce using rule 54 (tipoDato -> STRING .) - COMA reduce using rule 54 (tipoDato -> STRING .) - MAYORQUE reduce using rule 54 (tipoDato -> STRING .) + $end reduce using rule 30 (valores -> CADENA .) + SUMA reduce using rule 30 (valores -> CADENA .) + RESTA reduce using rule 30 (valores -> CADENA .) + MULTIPLICACION reduce using rule 30 (valores -> CADENA .) + DIVISION reduce using rule 30 (valores -> CADENA .) + DIVENTERA reduce using rule 30 (valores -> CADENA .) + RESIDUO reduce using rule 30 (valores -> CADENA .) + MENORQUE reduce using rule 30 (valores -> CADENA .) + MAYORQUE reduce using rule 30 (valores -> CADENA .) + IGUALQUE reduce using rule 30 (valores -> CADENA .) + DIFERENTEQUE reduce using rule 30 (valores -> CADENA .) state 20 - (55) tipoDato -> INT . + (31) valores -> booleano . - VARIABLE reduce using rule 55 (tipoDato -> INT .) - COMA reduce using rule 55 (tipoDato -> INT .) - MAYORQUE reduce using rule 55 (tipoDato -> INT .) + $end reduce using rule 31 (valores -> booleano .) + SUMA reduce using rule 31 (valores -> booleano .) + RESTA reduce using rule 31 (valores -> booleano .) + MULTIPLICACION reduce using rule 31 (valores -> booleano .) + DIVISION reduce using rule 31 (valores -> booleano .) + DIVENTERA reduce using rule 31 (valores -> booleano .) + RESIDUO reduce using rule 31 (valores -> booleano .) + MENORQUE reduce using rule 31 (valores -> booleano .) + MAYORQUE reduce using rule 31 (valores -> booleano .) + IGUALQUE reduce using rule 31 (valores -> booleano .) + DIFERENTEQUE reduce using rule 31 (valores -> booleano .) state 21 - (57) tipoDato -> DOUBLE . + (33) booleano -> TRUE . - VARIABLE reduce using rule 57 (tipoDato -> DOUBLE .) - COMA reduce using rule 57 (tipoDato -> DOUBLE .) - MAYORQUE reduce using rule 57 (tipoDato -> DOUBLE .) + $end reduce using rule 33 (booleano -> TRUE .) + SUMA reduce using rule 33 (booleano -> TRUE .) + RESTA reduce using rule 33 (booleano -> TRUE .) + MULTIPLICACION reduce using rule 33 (booleano -> TRUE .) + DIVISION reduce using rule 33 (booleano -> TRUE .) + DIVENTERA reduce using rule 33 (booleano -> TRUE .) + RESIDUO reduce using rule 33 (booleano -> TRUE .) + MENORQUE reduce using rule 33 (booleano -> TRUE .) + MAYORQUE reduce using rule 33 (booleano -> TRUE .) + IGUALQUE reduce using rule 33 (booleano -> TRUE .) + DIFERENTEQUE reduce using rule 33 (booleano -> TRUE .) state 22 - (58) tipoDato -> DYNAMIC . + (34) booleano -> FALSE . - VARIABLE reduce using rule 58 (tipoDato -> DYNAMIC .) - COMA reduce using rule 58 (tipoDato -> DYNAMIC .) - MAYORQUE reduce using rule 58 (tipoDato -> DYNAMIC .) + $end reduce using rule 34 (booleano -> FALSE .) + SUMA reduce using rule 34 (booleano -> FALSE .) + RESTA reduce using rule 34 (booleano -> FALSE .) + MULTIPLICACION reduce using rule 34 (booleano -> FALSE .) + DIVISION reduce using rule 34 (booleano -> FALSE .) + DIVENTERA reduce using rule 34 (booleano -> FALSE .) + RESIDUO reduce using rule 34 (booleano -> FALSE .) + MENORQUE reduce using rule 34 (booleano -> FALSE .) + MAYORQUE reduce using rule 34 (booleano -> FALSE .) + IGUALQUE reduce using rule 34 (booleano -> FALSE .) + DIFERENTEQUE reduce using rule 34 (booleano -> FALSE .) state 23 - (59) tipoDato -> VAR . - - VARIABLE reduce using rule 59 (tipoDato -> VAR .) - COMA reduce using rule 59 (tipoDato -> VAR .) - MAYORQUE reduce using rule 59 (tipoDato -> VAR .) - + (2) asignacion -> tipoDato VARIABLE IGUAL . valores + (4) asignacion -> tipoDato VARIABLE IGUAL . operacion_aritmetica + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (5) operacion_aritmetica -> . valores operadores_aritmeticos valores + (6) operacion_aritmetica -> . operacion_aritmetica operadores_aritmeticos valores + (33) booleano -> . TRUE + (34) booleano -> . FALSE + + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + + valores shift and go to state 25 + operacion_aritmetica shift and go to state 26 + booleano shift and go to state 20 state 24 - (2) bloque -> bloque expresion . - - MAP reduce using rule 2 (bloque -> bloque expresion .) - VARIABLE reduce using rule 2 (bloque -> bloque expresion .) - BOOL reduce using rule 2 (bloque -> bloque expresion .) - IF reduce using rule 2 (bloque -> bloque expresion .) - WHILE reduce using rule 2 (bloque -> bloque expresion .) - FOR reduce using rule 2 (bloque -> bloque expresion .) - STRING reduce using rule 2 (bloque -> bloque expresion .) - INT reduce using rule 2 (bloque -> bloque expresion .) - DOUBLE reduce using rule 2 (bloque -> bloque expresion .) - DYNAMIC reduce using rule 2 (bloque -> bloque expresion .) - VAR reduce using rule 2 (bloque -> bloque expresion .) - $end reduce using rule 2 (bloque -> bloque expresion .) - PUNTOCOMA reduce using rule 2 (bloque -> bloque expresion .) - LLAVECIERRA reduce using rule 2 (bloque -> bloque expresion .) - + (3) asignacion -> BOOL VARIABLE IGUAL . comparacion + (16) comparacion -> . valores comparador valores + (17) comparacion -> . comparacion comparador valores + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (33) booleano -> . TRUE + (34) booleano -> . FALSE + + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + + comparacion shift and go to state 27 + valores shift and go to state 28 + booleano shift and go to state 20 state 25 - (5) bloque -> bloque estructuras . - - MAP reduce using rule 5 (bloque -> bloque estructuras .) - VARIABLE reduce using rule 5 (bloque -> bloque estructuras .) - BOOL reduce using rule 5 (bloque -> bloque estructuras .) - IF reduce using rule 5 (bloque -> bloque estructuras .) - WHILE reduce using rule 5 (bloque -> bloque estructuras .) - FOR reduce using rule 5 (bloque -> bloque estructuras .) - STRING reduce using rule 5 (bloque -> bloque estructuras .) - INT reduce using rule 5 (bloque -> bloque estructuras .) - DOUBLE reduce using rule 5 (bloque -> bloque estructuras .) - DYNAMIC reduce using rule 5 (bloque -> bloque estructuras .) - VAR reduce using rule 5 (bloque -> bloque estructuras .) - $end reduce using rule 5 (bloque -> bloque estructuras .) - PUNTOCOMA reduce using rule 5 (bloque -> bloque estructuras .) - LLAVECIERRA reduce using rule 5 (bloque -> bloque estructuras .) - + (2) asignacion -> tipoDato VARIABLE IGUAL valores . + (5) operacion_aritmetica -> valores . operadores_aritmeticos valores + (7) operadores_aritmeticos -> . SUMA + (8) operadores_aritmeticos -> . RESTA + (9) operadores_aritmeticos -> . MULTIPLICACION + (10) operadores_aritmeticos -> . DIVISION + (11) operadores_aritmeticos -> . DIVENTERA + (12) operadores_aritmeticos -> . RESIDUO + + $end reduce using rule 2 (asignacion -> tipoDato VARIABLE IGUAL valores .) + SUMA shift and go to state 30 + RESTA shift and go to state 31 + MULTIPLICACION shift and go to state 32 + DIVISION shift and go to state 33 + DIVENTERA shift and go to state 34 + RESIDUO shift and go to state 35 + + operadores_aritmeticos shift and go to state 29 state 26 - (20) asignacion -> empty . - - PUNTOCOMA reduce using rule 20 (asignacion -> empty .) - + (4) asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica . + (6) operacion_aritmetica -> operacion_aritmetica . operadores_aritmeticos valores + (7) operadores_aritmeticos -> . SUMA + (8) operadores_aritmeticos -> . RESTA + (9) operadores_aritmeticos -> . MULTIPLICACION + (10) operadores_aritmeticos -> . DIVISION + (11) operadores_aritmeticos -> . DIVENTERA + (12) operadores_aritmeticos -> . RESIDUO + + $end reduce using rule 4 (asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica .) + SUMA shift and go to state 30 + RESTA shift and go to state 31 + MULTIPLICACION shift and go to state 32 + DIVISION shift and go to state 33 + DIVENTERA shift and go to state 34 + RESIDUO shift and go to state 35 + + operadores_aritmeticos shift and go to state 36 state 27 - (12) expresion -> mapa PUNTOCOMA . + (3) asignacion -> BOOL VARIABLE IGUAL comparacion . + (17) comparacion -> comparacion . comparador valores + (18) comparador -> . MENORQUE + (19) comparador -> . MAYORQUE + (20) comparador -> . IGUALQUE + (21) comparador -> . DIFERENTEQUE - MAP reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - VARIABLE reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - BOOL reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - IF reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - WHILE reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - FOR reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - STRING reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - INT reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - DOUBLE reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - DYNAMIC reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - VAR reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - $end reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - PUNTOCOMA reduce using rule 12 (expresion -> mapa PUNTOCOMA .) - LLAVECIERRA reduce using rule 12 (expresion -> mapa PUNTOCOMA .) + $end reduce using rule 3 (asignacion -> BOOL VARIABLE IGUAL comparacion .) + MENORQUE shift and go to state 38 + MAYORQUE shift and go to state 39 + IGUALQUE shift and go to state 40 + DIFERENTEQUE shift and go to state 41 + comparador shift and go to state 37 state 28 - (40) mapaFunciones -> mapa PUNTO . VARIABLE LPAREN RPAREN - (41) mapaFunciones -> mapa PUNTO . VARIABLE LPAREN valores + (16) comparacion -> valores . comparador valores + (18) comparador -> . MENORQUE + (19) comparador -> . MAYORQUE + (20) comparador -> . IGUALQUE + (21) comparador -> . DIFERENTEQUE - VARIABLE shift and go to state 43 + MENORQUE shift and go to state 38 + MAYORQUE shift and go to state 39 + IGUALQUE shift and go to state 40 + DIFERENTEQUE shift and go to state 41 + comparador shift and go to state 42 state 29 - (13) expresion -> mapaFunciones PUNTOCOMA . + (5) operacion_aritmetica -> valores operadores_aritmeticos . valores + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (33) booleano -> . TRUE + (34) booleano -> . FALSE - MAP reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - VARIABLE reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - BOOL reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - IF reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - WHILE reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - FOR reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - STRING reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - INT reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - DOUBLE reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - DYNAMIC reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - VAR reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - $end reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - PUNTOCOMA reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) - LLAVECIERRA reduce using rule 13 (expresion -> mapaFunciones PUNTOCOMA .) + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + valores shift and go to state 43 + booleano shift and go to state 20 state 30 - (14) expresion -> asignacion PUNTOCOMA . + (7) operadores_aritmeticos -> SUMA . - MAP reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - VARIABLE reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - BOOL reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - IF reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - WHILE reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - FOR reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - STRING reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - INT reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - DOUBLE reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - DYNAMIC reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - VAR reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - $end reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - PUNTOCOMA reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) - LLAVECIERRA reduce using rule 14 (expresion -> asignacion PUNTOCOMA .) + NUMERO reduce using rule 7 (operadores_aritmeticos -> SUMA .) + CADENA reduce using rule 7 (operadores_aritmeticos -> SUMA .) + VARIABLE reduce using rule 7 (operadores_aritmeticos -> SUMA .) + TRUE reduce using rule 7 (operadores_aritmeticos -> SUMA .) + FALSE reduce using rule 7 (operadores_aritmeticos -> SUMA .) state 31 - (66) estructuraIfElse -> estructuraIf ELSE . LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> estructuraIf ELSE . LLAVEABRE estructuraIf LLAVECIERRA + (8) operadores_aritmeticos -> RESTA . - LLAVEABRE shift and go to state 44 + NUMERO reduce using rule 8 (operadores_aritmeticos -> RESTA .) + CADENA reduce using rule 8 (operadores_aritmeticos -> RESTA .) + VARIABLE reduce using rule 8 (operadores_aritmeticos -> RESTA .) + TRUE reduce using rule 8 (operadores_aritmeticos -> RESTA .) + FALSE reduce using rule 8 (operadores_aritmeticos -> RESTA .) state 32 - (38) mapa -> MAP MENORQUE . tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR + (9) operadores_aritmeticos -> MULTIPLICACION . - STRING shift and go to state 19 - INT shift and go to state 20 - BOOL shift and go to state 46 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 + NUMERO reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) + CADENA reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) + VARIABLE reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) + TRUE reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) + FALSE reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) - tipoDato shift and go to state 45 state 33 - (17) asignacion -> tipoDato VARIABLE . IGUAL valores - (19) asignacion -> tipoDato VARIABLE . IGUAL operacion_aritmetica + (10) operadores_aritmeticos -> DIVISION . - IGUAL shift and go to state 47 + NUMERO reduce using rule 10 (operadores_aritmeticos -> DIVISION .) + CADENA reduce using rule 10 (operadores_aritmeticos -> DIVISION .) + VARIABLE reduce using rule 10 (operadores_aritmeticos -> DIVISION .) + TRUE reduce using rule 10 (operadores_aritmeticos -> DIVISION .) + FALSE reduce using rule 10 (operadores_aritmeticos -> DIVISION .) state 34 - (42) mapaFunciones -> VARIABLE PUNTO . VARIABLE LPAREN RPAREN - (43) mapaFunciones -> VARIABLE PUNTO . VARIABLE LPAREN valores RPAREN + (11) operadores_aritmeticos -> DIVENTERA . - VARIABLE shift and go to state 48 + NUMERO reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) + CADENA reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) + VARIABLE reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) + TRUE reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) + FALSE reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) state 35 - (16) asignacion -> VARIABLE operadores_asignacion . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE + (12) operadores_aritmeticos -> RESIDUO . - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 + NUMERO reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) + CADENA reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) + VARIABLE reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) + TRUE reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) + FALSE reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) - valores shift and go to state 50 - booleano shift and go to state 53 state 36 - (29) operadores_asignacion -> IGUAL . + (6) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos . valores + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (33) booleano -> . TRUE + (34) booleano -> . FALSE - VARIABLE reduce using rule 29 (operadores_asignacion -> IGUAL .) - NUMERO reduce using rule 29 (operadores_asignacion -> IGUAL .) - CADENA reduce using rule 29 (operadores_asignacion -> IGUAL .) - TRUE reduce using rule 29 (operadores_asignacion -> IGUAL .) - FALSE reduce using rule 29 (operadores_asignacion -> IGUAL .) + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + valores shift and go to state 44 + booleano shift and go to state 20 state 37 - (30) operadores_asignacion -> ASIGNACIONAUMENTADA . + (17) comparacion -> comparacion comparador . valores + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (33) booleano -> . TRUE + (34) booleano -> . FALSE - VARIABLE reduce using rule 30 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - NUMERO reduce using rule 30 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - CADENA reduce using rule 30 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - TRUE reduce using rule 30 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - FALSE reduce using rule 30 (operadores_asignacion -> ASIGNACIONAUMENTADA .) + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + valores shift and go to state 45 + booleano shift and go to state 20 state 38 - (31) operadores_asignacion -> ASIGNACIONDISMINUIDA . + (18) comparador -> MENORQUE . - VARIABLE reduce using rule 31 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - NUMERO reduce using rule 31 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - CADENA reduce using rule 31 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - TRUE reduce using rule 31 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - FALSE reduce using rule 31 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) + NUMERO reduce using rule 18 (comparador -> MENORQUE .) + CADENA reduce using rule 18 (comparador -> MENORQUE .) + VARIABLE reduce using rule 18 (comparador -> MENORQUE .) + TRUE reduce using rule 18 (comparador -> MENORQUE .) + FALSE reduce using rule 18 (comparador -> MENORQUE .) state 39 - (18) asignacion -> BOOL VARIABLE . IGUAL comparacion + (19) comparador -> MAYORQUE . - IGUAL shift and go to state 56 + NUMERO reduce using rule 19 (comparador -> MAYORQUE .) + CADENA reduce using rule 19 (comparador -> MAYORQUE .) + VARIABLE reduce using rule 19 (comparador -> MAYORQUE .) + TRUE reduce using rule 19 (comparador -> MAYORQUE .) + FALSE reduce using rule 19 (comparador -> MAYORQUE .) state 40 - (63) estructuraIf -> IF LPAREN . argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> IF LPAREN . argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (79) argumentoEstructura -> . VARIABLE - (80) argumentoEstructura -> . booleano - (81) argumentoEstructura -> . comparacion - (52) booleano -> . TRUE - (53) booleano -> . FALSE - (32) comparacion -> . valores comparador valores - (33) comparacion -> . comparacion comparador valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - - VARIABLE shift and go to state 58 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - - argumentoEstructura shift and go to state 57 - booleano shift and go to state 59 - comparacion shift and go to state 60 - valores shift and go to state 61 - -state 41 - - (68) estructuraWhile -> WHILE LPAREN . argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (79) argumentoEstructura -> . VARIABLE - (80) argumentoEstructura -> . booleano - (81) argumentoEstructura -> . comparacion - (52) booleano -> . TRUE - (53) booleano -> . FALSE - (32) comparacion -> . valores comparador valores - (33) comparacion -> . comparacion comparador valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - - VARIABLE shift and go to state 58 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - - argumentoEstructura shift and go to state 62 - booleano shift and go to state 59 - comparacion shift and go to state 60 - valores shift and go to state 61 - -state 42 - - (69) estructuraFor -> FOR LPAREN . asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (70) asignacionVacio -> . asignacion - (71) asignacionVacio -> . empty - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (82) empty -> . - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - - VARIABLE shift and go to state 66 - BOOL shift and go to state 14 - PUNTOCOMA reduce using rule 82 (empty -> .) - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - asignacionVacio shift and go to state 63 - asignacion shift and go to state 64 - empty shift and go to state 65 - tipoDato shift and go to state 12 - -state 43 - - (40) mapaFunciones -> mapa PUNTO VARIABLE . LPAREN RPAREN - (41) mapaFunciones -> mapa PUNTO VARIABLE . LPAREN valores - - LPAREN shift and go to state 67 - - -state 44 - - (66) estructuraIfElse -> estructuraIf ELSE LLAVEABRE . bloque LLAVECIERRA - (67) estructuraIfElse -> estructuraIf ELSE LLAVEABRE . estructuraIf LLAVECIERRA - (1) bloque -> . expresion - (2) bloque -> . bloque expresion - (3) bloque -> . empty - (4) bloque -> . estructuras - (5) bloque -> . bloque estructuras - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (82) empty -> . - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - - ! shift/reduce conflict for IF resolved as shift - ! shift/reduce conflict for MAP resolved as shift - ! shift/reduce conflict for VARIABLE resolved as shift - ! shift/reduce conflict for BOOL resolved as shift - ! shift/reduce conflict for WHILE resolved as shift - ! shift/reduce conflict for FOR resolved as shift - ! shift/reduce conflict for STRING resolved as shift - ! shift/reduce conflict for INT resolved as shift - ! shift/reduce conflict for DOUBLE resolved as shift - ! shift/reduce conflict for DYNAMIC resolved as shift - ! shift/reduce conflict for VAR resolved as shift - IF shift and go to state 15 - LLAVECIERRA reduce using rule 82 (empty -> .) - PUNTOCOMA reduce using rule 82 (empty -> .) - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - ! MAP [ reduce using rule 82 (empty -> .) ] - ! VARIABLE [ reduce using rule 82 (empty -> .) ] - ! BOOL [ reduce using rule 82 (empty -> .) ] - ! IF [ reduce using rule 82 (empty -> .) ] - ! WHILE [ reduce using rule 82 (empty -> .) ] - ! FOR [ reduce using rule 82 (empty -> .) ] - ! STRING [ reduce using rule 82 (empty -> .) ] - ! INT [ reduce using rule 82 (empty -> .) ] - ! DOUBLE [ reduce using rule 82 (empty -> .) ] - ! DYNAMIC [ reduce using rule 82 (empty -> .) ] - ! VAR [ reduce using rule 82 (empty -> .) ] - - estructuraIf shift and go to state 68 - bloque shift and go to state 69 - expresion shift and go to state 2 - empty shift and go to state 3 - estructuras shift and go to state 4 - estructuraIfElse shift and go to state 16 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - -state 45 - - (38) mapa -> MAP MENORQUE tipoDato . COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - - COMA shift and go to state 70 - - -state 46 - - (56) tipoDato -> BOOL . - - COMA reduce using rule 56 (tipoDato -> BOOL .) - MAYORQUE reduce using rule 56 (tipoDato -> BOOL .) - - -state 47 - - (17) asignacion -> tipoDato VARIABLE IGUAL . valores - (19) asignacion -> tipoDato VARIABLE IGUAL . operacion_aritmetica - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (21) operacion_aritmetica -> . valores operadores_aritmeticos valores - (22) operacion_aritmetica -> . operacion_aritmetica operadores_aritmeticos valores - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 71 - operacion_aritmetica shift and go to state 72 - booleano shift and go to state 53 - -state 48 - - (42) mapaFunciones -> VARIABLE PUNTO VARIABLE . LPAREN RPAREN - (43) mapaFunciones -> VARIABLE PUNTO VARIABLE . LPAREN valores RPAREN - - LPAREN shift and go to state 73 - - -state 49 - - (48) valores -> VARIABLE . - - PUNTOCOMA reduce using rule 48 (valores -> VARIABLE .) - SUMA reduce using rule 48 (valores -> VARIABLE .) - RESTA reduce using rule 48 (valores -> VARIABLE .) - MULTIPLICACION reduce using rule 48 (valores -> VARIABLE .) - DIVISION reduce using rule 48 (valores -> VARIABLE .) - DIVENTERA reduce using rule 48 (valores -> VARIABLE .) - RESIDUO reduce using rule 48 (valores -> VARIABLE .) - MENORQUE reduce using rule 48 (valores -> VARIABLE .) - MAYORQUE reduce using rule 48 (valores -> VARIABLE .) - IGUALQUE reduce using rule 48 (valores -> VARIABLE .) - DIFERENTEQUE reduce using rule 48 (valores -> VARIABLE .) - PUNTO reduce using rule 48 (valores -> VARIABLE .) - RPAREN reduce using rule 48 (valores -> VARIABLE .) - DOSPUNTOS reduce using rule 48 (valores -> VARIABLE .) - LLAVECIERRA reduce using rule 48 (valores -> VARIABLE .) - COMA reduce using rule 48 (valores -> VARIABLE .) - - -state 50 - - (16) asignacion -> VARIABLE operadores_asignacion valores . - - PUNTOCOMA reduce using rule 16 (asignacion -> VARIABLE operadores_asignacion valores .) - - -state 51 - - (49) valores -> NUMERO . - - PUNTOCOMA reduce using rule 49 (valores -> NUMERO .) - MENORQUE reduce using rule 49 (valores -> NUMERO .) - MAYORQUE reduce using rule 49 (valores -> NUMERO .) - IGUALQUE reduce using rule 49 (valores -> NUMERO .) - DIFERENTEQUE reduce using rule 49 (valores -> NUMERO .) - SUMA reduce using rule 49 (valores -> NUMERO .) - RESTA reduce using rule 49 (valores -> NUMERO .) - MULTIPLICACION reduce using rule 49 (valores -> NUMERO .) - DIVISION reduce using rule 49 (valores -> NUMERO .) - DIVENTERA reduce using rule 49 (valores -> NUMERO .) - RESIDUO reduce using rule 49 (valores -> NUMERO .) - PUNTO reduce using rule 49 (valores -> NUMERO .) - RPAREN reduce using rule 49 (valores -> NUMERO .) - DOSPUNTOS reduce using rule 49 (valores -> NUMERO .) - LLAVECIERRA reduce using rule 49 (valores -> NUMERO .) - COMA reduce using rule 49 (valores -> NUMERO .) - - -state 52 - - (50) valores -> CADENA . - - PUNTOCOMA reduce using rule 50 (valores -> CADENA .) - MENORQUE reduce using rule 50 (valores -> CADENA .) - MAYORQUE reduce using rule 50 (valores -> CADENA .) - IGUALQUE reduce using rule 50 (valores -> CADENA .) - DIFERENTEQUE reduce using rule 50 (valores -> CADENA .) - SUMA reduce using rule 50 (valores -> CADENA .) - RESTA reduce using rule 50 (valores -> CADENA .) - MULTIPLICACION reduce using rule 50 (valores -> CADENA .) - DIVISION reduce using rule 50 (valores -> CADENA .) - DIVENTERA reduce using rule 50 (valores -> CADENA .) - RESIDUO reduce using rule 50 (valores -> CADENA .) - PUNTO reduce using rule 50 (valores -> CADENA .) - RPAREN reduce using rule 50 (valores -> CADENA .) - DOSPUNTOS reduce using rule 50 (valores -> CADENA .) - LLAVECIERRA reduce using rule 50 (valores -> CADENA .) - COMA reduce using rule 50 (valores -> CADENA .) - - -state 53 - - (51) valores -> booleano . - - PUNTOCOMA reduce using rule 51 (valores -> booleano .) - SUMA reduce using rule 51 (valores -> booleano .) - RESTA reduce using rule 51 (valores -> booleano .) - MULTIPLICACION reduce using rule 51 (valores -> booleano .) - DIVISION reduce using rule 51 (valores -> booleano .) - DIVENTERA reduce using rule 51 (valores -> booleano .) - RESIDUO reduce using rule 51 (valores -> booleano .) - MENORQUE reduce using rule 51 (valores -> booleano .) - MAYORQUE reduce using rule 51 (valores -> booleano .) - IGUALQUE reduce using rule 51 (valores -> booleano .) - DIFERENTEQUE reduce using rule 51 (valores -> booleano .) - PUNTO reduce using rule 51 (valores -> booleano .) - RPAREN reduce using rule 51 (valores -> booleano .) - DOSPUNTOS reduce using rule 51 (valores -> booleano .) - LLAVECIERRA reduce using rule 51 (valores -> booleano .) - COMA reduce using rule 51 (valores -> booleano .) - - -state 54 - - (52) booleano -> TRUE . - - PUNTOCOMA reduce using rule 52 (booleano -> TRUE .) - RPAREN reduce using rule 52 (booleano -> TRUE .) - MENORQUE reduce using rule 52 (booleano -> TRUE .) - MAYORQUE reduce using rule 52 (booleano -> TRUE .) - IGUALQUE reduce using rule 52 (booleano -> TRUE .) - DIFERENTEQUE reduce using rule 52 (booleano -> TRUE .) - SUMA reduce using rule 52 (booleano -> TRUE .) - RESTA reduce using rule 52 (booleano -> TRUE .) - MULTIPLICACION reduce using rule 52 (booleano -> TRUE .) - DIVISION reduce using rule 52 (booleano -> TRUE .) - DIVENTERA reduce using rule 52 (booleano -> TRUE .) - RESIDUO reduce using rule 52 (booleano -> TRUE .) - PUNTO reduce using rule 52 (booleano -> TRUE .) - DOSPUNTOS reduce using rule 52 (booleano -> TRUE .) - LLAVECIERRA reduce using rule 52 (booleano -> TRUE .) - COMA reduce using rule 52 (booleano -> TRUE .) - - -state 55 - - (53) booleano -> FALSE . - - PUNTOCOMA reduce using rule 53 (booleano -> FALSE .) - RPAREN reduce using rule 53 (booleano -> FALSE .) - MENORQUE reduce using rule 53 (booleano -> FALSE .) - MAYORQUE reduce using rule 53 (booleano -> FALSE .) - IGUALQUE reduce using rule 53 (booleano -> FALSE .) - DIFERENTEQUE reduce using rule 53 (booleano -> FALSE .) - SUMA reduce using rule 53 (booleano -> FALSE .) - RESTA reduce using rule 53 (booleano -> FALSE .) - MULTIPLICACION reduce using rule 53 (booleano -> FALSE .) - DIVISION reduce using rule 53 (booleano -> FALSE .) - DIVENTERA reduce using rule 53 (booleano -> FALSE .) - RESIDUO reduce using rule 53 (booleano -> FALSE .) - PUNTO reduce using rule 53 (booleano -> FALSE .) - DOSPUNTOS reduce using rule 53 (booleano -> FALSE .) - LLAVECIERRA reduce using rule 53 (booleano -> FALSE .) - COMA reduce using rule 53 (booleano -> FALSE .) - - -state 56 - - (18) asignacion -> BOOL VARIABLE IGUAL . comparacion - (32) comparacion -> . valores comparador valores - (33) comparacion -> . comparacion comparador valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - comparacion shift and go to state 74 - valores shift and go to state 61 - booleano shift and go to state 53 - -state 57 - - (63) estructuraIf -> IF LPAREN argumentoEstructura . RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> IF LPAREN argumentoEstructura . RPAREN LLAVEABRE estructuraIf LLAVECIERRA - - RPAREN shift and go to state 75 - - -state 58 - - (79) argumentoEstructura -> VARIABLE . - (48) valores -> VARIABLE . - - RPAREN reduce using rule 79 (argumentoEstructura -> VARIABLE .) - MENORQUE reduce using rule 48 (valores -> VARIABLE .) - MAYORQUE reduce using rule 48 (valores -> VARIABLE .) - IGUALQUE reduce using rule 48 (valores -> VARIABLE .) - DIFERENTEQUE reduce using rule 48 (valores -> VARIABLE .) - - -state 59 - - (80) argumentoEstructura -> booleano . - (51) valores -> booleano . - - RPAREN reduce using rule 80 (argumentoEstructura -> booleano .) - MENORQUE reduce using rule 51 (valores -> booleano .) - MAYORQUE reduce using rule 51 (valores -> booleano .) - IGUALQUE reduce using rule 51 (valores -> booleano .) - DIFERENTEQUE reduce using rule 51 (valores -> booleano .) - - -state 60 - - (81) argumentoEstructura -> comparacion . - (33) comparacion -> comparacion . comparador valores - (34) comparador -> . MENORQUE - (35) comparador -> . MAYORQUE - (36) comparador -> . IGUALQUE - (37) comparador -> . DIFERENTEQUE - - RPAREN reduce using rule 81 (argumentoEstructura -> comparacion .) - MENORQUE shift and go to state 77 - MAYORQUE shift and go to state 78 - IGUALQUE shift and go to state 79 - DIFERENTEQUE shift and go to state 80 - - comparador shift and go to state 76 - -state 61 - - (32) comparacion -> valores . comparador valores - (34) comparador -> . MENORQUE - (35) comparador -> . MAYORQUE - (36) comparador -> . IGUALQUE - (37) comparador -> . DIFERENTEQUE - - MENORQUE shift and go to state 77 - MAYORQUE shift and go to state 78 - IGUALQUE shift and go to state 79 - DIFERENTEQUE shift and go to state 80 - - comparador shift and go to state 81 - -state 62 - - (68) estructuraWhile -> WHILE LPAREN argumentoEstructura . RPAREN LLAVEABRE bloque LLAVECIERRA - - RPAREN shift and go to state 82 - - -state 63 - - (69) estructuraFor -> FOR LPAREN asignacionVacio . PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - - PUNTOCOMA shift and go to state 83 - - -state 64 - - (70) asignacionVacio -> asignacion . - - PUNTOCOMA reduce using rule 70 (asignacionVacio -> asignacion .) - - -state 65 - - (71) asignacionVacio -> empty . - (20) asignacion -> empty . - - ! reduce/reduce conflict for PUNTOCOMA resolved using rule 20 (asignacion -> empty .) - PUNTOCOMA reduce using rule 20 (asignacion -> empty .) - - ! PUNTOCOMA [ reduce using rule 71 (asignacionVacio -> empty .) ] - - -state 66 - - (16) asignacion -> VARIABLE . operadores_asignacion valores - (29) operadores_asignacion -> . IGUAL - (30) operadores_asignacion -> . ASIGNACIONAUMENTADA - (31) operadores_asignacion -> . ASIGNACIONDISMINUIDA - - IGUAL shift and go to state 36 - ASIGNACIONAUMENTADA shift and go to state 37 - ASIGNACIONDISMINUIDA shift and go to state 38 - - operadores_asignacion shift and go to state 35 - -state 67 - - (40) mapaFunciones -> mapa PUNTO VARIABLE LPAREN . RPAREN - (41) mapaFunciones -> mapa PUNTO VARIABLE LPAREN . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - RPAREN shift and go to state 84 - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 85 - booleano shift and go to state 53 - -state 68 - - (67) estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf . LLAVECIERRA - (60) estructuras -> estructuraIf . - (66) estructuraIfElse -> estructuraIf . ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> estructuraIf . ELSE LLAVEABRE estructuraIf LLAVECIERRA - - ! shift/reduce conflict for LLAVECIERRA resolved as shift - LLAVECIERRA shift and go to state 86 - MAP reduce using rule 60 (estructuras -> estructuraIf .) - VARIABLE reduce using rule 60 (estructuras -> estructuraIf .) - BOOL reduce using rule 60 (estructuras -> estructuraIf .) - IF reduce using rule 60 (estructuras -> estructuraIf .) - WHILE reduce using rule 60 (estructuras -> estructuraIf .) - FOR reduce using rule 60 (estructuras -> estructuraIf .) - STRING reduce using rule 60 (estructuras -> estructuraIf .) - INT reduce using rule 60 (estructuras -> estructuraIf .) - DOUBLE reduce using rule 60 (estructuras -> estructuraIf .) - DYNAMIC reduce using rule 60 (estructuras -> estructuraIf .) - VAR reduce using rule 60 (estructuras -> estructuraIf .) - PUNTOCOMA reduce using rule 60 (estructuras -> estructuraIf .) - ELSE shift and go to state 31 - - ! LLAVECIERRA [ reduce using rule 60 (estructuras -> estructuraIf .) ] - - -state 69 - - (66) estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque . LLAVECIERRA - (2) bloque -> bloque . expresion - (5) bloque -> bloque . estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (82) empty -> . - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - LLAVECIERRA shift and go to state 87 - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - PUNTOCOMA reduce using rule 82 (empty -> .) - - estructuraIf shift and go to state 8 - expresion shift and go to state 24 - estructuras shift and go to state 25 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - empty shift and go to state 26 - estructuraIfElse shift and go to state 16 - -state 70 - - (38) mapa -> MAP MENORQUE tipoDato COMA . tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - - STRING shift and go to state 19 - INT shift and go to state 20 - BOOL shift and go to state 46 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - tipoDato shift and go to state 88 - -state 71 - - (17) asignacion -> tipoDato VARIABLE IGUAL valores . - (21) operacion_aritmetica -> valores . operadores_aritmeticos valores - (23) operadores_aritmeticos -> . SUMA - (24) operadores_aritmeticos -> . RESTA - (25) operadores_aritmeticos -> . MULTIPLICACION - (26) operadores_aritmeticos -> . DIVISION - (27) operadores_aritmeticos -> . DIVENTERA - (28) operadores_aritmeticos -> . RESIDUO - - PUNTOCOMA reduce using rule 17 (asignacion -> tipoDato VARIABLE IGUAL valores .) - SUMA shift and go to state 90 - RESTA shift and go to state 91 - MULTIPLICACION shift and go to state 92 - DIVISION shift and go to state 93 - DIVENTERA shift and go to state 94 - RESIDUO shift and go to state 95 - - operadores_aritmeticos shift and go to state 89 - -state 72 - - (19) asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica . - (22) operacion_aritmetica -> operacion_aritmetica . operadores_aritmeticos valores - (23) operadores_aritmeticos -> . SUMA - (24) operadores_aritmeticos -> . RESTA - (25) operadores_aritmeticos -> . MULTIPLICACION - (26) operadores_aritmeticos -> . DIVISION - (27) operadores_aritmeticos -> . DIVENTERA - (28) operadores_aritmeticos -> . RESIDUO - - PUNTOCOMA reduce using rule 19 (asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica .) - SUMA shift and go to state 90 - RESTA shift and go to state 91 - MULTIPLICACION shift and go to state 92 - DIVISION shift and go to state 93 - DIVENTERA shift and go to state 94 - RESIDUO shift and go to state 95 - - operadores_aritmeticos shift and go to state 96 - -state 73 - - (42) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN . RPAREN - (43) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN . valores RPAREN - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - RPAREN shift and go to state 97 - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 98 - booleano shift and go to state 53 - -state 74 - - (18) asignacion -> BOOL VARIABLE IGUAL comparacion . - (33) comparacion -> comparacion . comparador valores - (34) comparador -> . MENORQUE - (35) comparador -> . MAYORQUE - (36) comparador -> . IGUALQUE - (37) comparador -> . DIFERENTEQUE - - PUNTOCOMA reduce using rule 18 (asignacion -> BOOL VARIABLE IGUAL comparacion .) - MENORQUE shift and go to state 77 - MAYORQUE shift and go to state 78 - IGUALQUE shift and go to state 79 - DIFERENTEQUE shift and go to state 80 - - comparador shift and go to state 76 - -state 75 - - (63) estructuraIf -> IF LPAREN argumentoEstructura RPAREN . LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> IF LPAREN argumentoEstructura RPAREN . LLAVEABRE estructuraIf LLAVECIERRA - - LLAVEABRE shift and go to state 99 - - -state 76 - - (33) comparacion -> comparacion comparador . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 100 - booleano shift and go to state 53 - -state 77 - - (34) comparador -> MENORQUE . - - VARIABLE reduce using rule 34 (comparador -> MENORQUE .) - NUMERO reduce using rule 34 (comparador -> MENORQUE .) - CADENA reduce using rule 34 (comparador -> MENORQUE .) - TRUE reduce using rule 34 (comparador -> MENORQUE .) - FALSE reduce using rule 34 (comparador -> MENORQUE .) - - -state 78 - - (35) comparador -> MAYORQUE . - - VARIABLE reduce using rule 35 (comparador -> MAYORQUE .) - NUMERO reduce using rule 35 (comparador -> MAYORQUE .) - CADENA reduce using rule 35 (comparador -> MAYORQUE .) - TRUE reduce using rule 35 (comparador -> MAYORQUE .) - FALSE reduce using rule 35 (comparador -> MAYORQUE .) - - -state 79 - - (36) comparador -> IGUALQUE . + (20) comparador -> IGUALQUE . - VARIABLE reduce using rule 36 (comparador -> IGUALQUE .) - NUMERO reduce using rule 36 (comparador -> IGUALQUE .) - CADENA reduce using rule 36 (comparador -> IGUALQUE .) - TRUE reduce using rule 36 (comparador -> IGUALQUE .) - FALSE reduce using rule 36 (comparador -> IGUALQUE .) + NUMERO reduce using rule 20 (comparador -> IGUALQUE .) + CADENA reduce using rule 20 (comparador -> IGUALQUE .) + VARIABLE reduce using rule 20 (comparador -> IGUALQUE .) + TRUE reduce using rule 20 (comparador -> IGUALQUE .) + FALSE reduce using rule 20 (comparador -> IGUALQUE .) -state 80 - - (37) comparador -> DIFERENTEQUE . - - VARIABLE reduce using rule 37 (comparador -> DIFERENTEQUE .) - NUMERO reduce using rule 37 (comparador -> DIFERENTEQUE .) - CADENA reduce using rule 37 (comparador -> DIFERENTEQUE .) - TRUE reduce using rule 37 (comparador -> DIFERENTEQUE .) - FALSE reduce using rule 37 (comparador -> DIFERENTEQUE .) - - -state 81 - - (32) comparacion -> valores comparador . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 101 - booleano shift and go to state 53 - -state 82 - - (68) estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN . LLAVEABRE bloque LLAVECIERRA - - LLAVEABRE shift and go to state 102 - - -state 83 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA . comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (72) comparacionVacio -> . comparacion - (73) comparacionVacio -> . booleano - (74) comparacionVacio -> . empty - (32) comparacion -> . valores comparador valores - (33) comparacion -> . comparacion comparador valores - (52) booleano -> . TRUE - (53) booleano -> . FALSE - (82) empty -> . - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - - TRUE shift and go to state 54 - FALSE shift and go to state 55 - PUNTOCOMA reduce using rule 82 (empty -> .) - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - - comparacionVacio shift and go to state 103 - comparacion shift and go to state 104 - booleano shift and go to state 105 - empty shift and go to state 106 - valores shift and go to state 61 - -state 84 - - (40) mapaFunciones -> mapa PUNTO VARIABLE LPAREN RPAREN . - - PUNTOCOMA reduce using rule 40 (mapaFunciones -> mapa PUNTO VARIABLE LPAREN RPAREN .) - PUNTO reduce using rule 40 (mapaFunciones -> mapa PUNTO VARIABLE LPAREN RPAREN .) - - -state 85 - - (41) mapaFunciones -> mapa PUNTO VARIABLE LPAREN valores . - - PUNTOCOMA reduce using rule 41 (mapaFunciones -> mapa PUNTO VARIABLE LPAREN valores .) - PUNTO reduce using rule 41 (mapaFunciones -> mapa PUNTO VARIABLE LPAREN valores .) - - -state 86 - - (67) estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA . - - ELSE reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - MAP reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - VARIABLE reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - BOOL reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - IF reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - WHILE reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - FOR reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - STRING reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - INT reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - DOUBLE reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - DYNAMIC reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - VAR reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - $end reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - PUNTOCOMA reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - LLAVECIERRA reduce using rule 67 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA .) - - -state 87 - - (66) estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA . - - ELSE reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - MAP reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - VARIABLE reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - BOOL reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - IF reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - WHILE reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - FOR reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - STRING reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - INT reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - DOUBLE reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - DYNAMIC reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - VAR reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - $end reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - PUNTOCOMA reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - LLAVECIERRA reduce using rule 66 (estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA .) - - -state 88 - - (38) mapa -> MAP MENORQUE tipoDato COMA tipoDato . MAYORQUE VARIABLE IGUAL creacionMapa - - MAYORQUE shift and go to state 107 - - -state 89 - - (21) operacion_aritmetica -> valores operadores_aritmeticos . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 108 - booleano shift and go to state 53 - -state 90 - - (23) operadores_aritmeticos -> SUMA . - - VARIABLE reduce using rule 23 (operadores_aritmeticos -> SUMA .) - NUMERO reduce using rule 23 (operadores_aritmeticos -> SUMA .) - CADENA reduce using rule 23 (operadores_aritmeticos -> SUMA .) - TRUE reduce using rule 23 (operadores_aritmeticos -> SUMA .) - FALSE reduce using rule 23 (operadores_aritmeticos -> SUMA .) - - -state 91 - - (24) operadores_aritmeticos -> RESTA . - - VARIABLE reduce using rule 24 (operadores_aritmeticos -> RESTA .) - NUMERO reduce using rule 24 (operadores_aritmeticos -> RESTA .) - CADENA reduce using rule 24 (operadores_aritmeticos -> RESTA .) - TRUE reduce using rule 24 (operadores_aritmeticos -> RESTA .) - FALSE reduce using rule 24 (operadores_aritmeticos -> RESTA .) - - -state 92 - - (25) operadores_aritmeticos -> MULTIPLICACION . - - VARIABLE reduce using rule 25 (operadores_aritmeticos -> MULTIPLICACION .) - NUMERO reduce using rule 25 (operadores_aritmeticos -> MULTIPLICACION .) - CADENA reduce using rule 25 (operadores_aritmeticos -> MULTIPLICACION .) - TRUE reduce using rule 25 (operadores_aritmeticos -> MULTIPLICACION .) - FALSE reduce using rule 25 (operadores_aritmeticos -> MULTIPLICACION .) - - -state 93 - - (26) operadores_aritmeticos -> DIVISION . - - VARIABLE reduce using rule 26 (operadores_aritmeticos -> DIVISION .) - NUMERO reduce using rule 26 (operadores_aritmeticos -> DIVISION .) - CADENA reduce using rule 26 (operadores_aritmeticos -> DIVISION .) - TRUE reduce using rule 26 (operadores_aritmeticos -> DIVISION .) - FALSE reduce using rule 26 (operadores_aritmeticos -> DIVISION .) - - -state 94 - - (27) operadores_aritmeticos -> DIVENTERA . - - VARIABLE reduce using rule 27 (operadores_aritmeticos -> DIVENTERA .) - NUMERO reduce using rule 27 (operadores_aritmeticos -> DIVENTERA .) - CADENA reduce using rule 27 (operadores_aritmeticos -> DIVENTERA .) - TRUE reduce using rule 27 (operadores_aritmeticos -> DIVENTERA .) - FALSE reduce using rule 27 (operadores_aritmeticos -> DIVENTERA .) - - -state 95 - - (28) operadores_aritmeticos -> RESIDUO . - - VARIABLE reduce using rule 28 (operadores_aritmeticos -> RESIDUO .) - NUMERO reduce using rule 28 (operadores_aritmeticos -> RESIDUO .) - CADENA reduce using rule 28 (operadores_aritmeticos -> RESIDUO .) - TRUE reduce using rule 28 (operadores_aritmeticos -> RESIDUO .) - FALSE reduce using rule 28 (operadores_aritmeticos -> RESIDUO .) - - -state 96 - - (22) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 109 - booleano shift and go to state 53 - -state 97 - - (42) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN . - - PUNTOCOMA reduce using rule 42 (mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN .) - PUNTO reduce using rule 42 (mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN .) - - -state 98 - - (43) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores . RPAREN - - RPAREN shift and go to state 110 - - -state 99 - - (63) estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE . bloque LLAVECIERRA - (64) estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE . estructuraIf LLAVECIERRA - (1) bloque -> . expresion - (2) bloque -> . bloque expresion - (3) bloque -> . empty - (4) bloque -> . estructuras - (5) bloque -> . bloque estructuras - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (82) empty -> . - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - - ! shift/reduce conflict for IF resolved as shift - ! shift/reduce conflict for MAP resolved as shift - ! shift/reduce conflict for VARIABLE resolved as shift - ! shift/reduce conflict for BOOL resolved as shift - ! shift/reduce conflict for WHILE resolved as shift - ! shift/reduce conflict for FOR resolved as shift - ! shift/reduce conflict for STRING resolved as shift - ! shift/reduce conflict for INT resolved as shift - ! shift/reduce conflict for DOUBLE resolved as shift - ! shift/reduce conflict for DYNAMIC resolved as shift - ! shift/reduce conflict for VAR resolved as shift - IF shift and go to state 15 - LLAVECIERRA reduce using rule 82 (empty -> .) - PUNTOCOMA reduce using rule 82 (empty -> .) - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - ! MAP [ reduce using rule 82 (empty -> .) ] - ! VARIABLE [ reduce using rule 82 (empty -> .) ] - ! BOOL [ reduce using rule 82 (empty -> .) ] - ! IF [ reduce using rule 82 (empty -> .) ] - ! WHILE [ reduce using rule 82 (empty -> .) ] - ! FOR [ reduce using rule 82 (empty -> .) ] - ! STRING [ reduce using rule 82 (empty -> .) ] - ! INT [ reduce using rule 82 (empty -> .) ] - ! DOUBLE [ reduce using rule 82 (empty -> .) ] - ! DYNAMIC [ reduce using rule 82 (empty -> .) ] - ! VAR [ reduce using rule 82 (empty -> .) ] - - bloque shift and go to state 111 - estructuraIf shift and go to state 112 - expresion shift and go to state 2 - empty shift and go to state 3 - estructuras shift and go to state 4 - estructuraIfElse shift and go to state 16 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - -state 100 - - (33) comparacion -> comparacion comparador valores . - - MENORQUE reduce using rule 33 (comparacion -> comparacion comparador valores .) - MAYORQUE reduce using rule 33 (comparacion -> comparacion comparador valores .) - IGUALQUE reduce using rule 33 (comparacion -> comparacion comparador valores .) - DIFERENTEQUE reduce using rule 33 (comparacion -> comparacion comparador valores .) - RPAREN reduce using rule 33 (comparacion -> comparacion comparador valores .) - PUNTOCOMA reduce using rule 33 (comparacion -> comparacion comparador valores .) - - -state 101 - - (32) comparacion -> valores comparador valores . - - MENORQUE reduce using rule 32 (comparacion -> valores comparador valores .) - MAYORQUE reduce using rule 32 (comparacion -> valores comparador valores .) - IGUALQUE reduce using rule 32 (comparacion -> valores comparador valores .) - DIFERENTEQUE reduce using rule 32 (comparacion -> valores comparador valores .) - RPAREN reduce using rule 32 (comparacion -> valores comparador valores .) - PUNTOCOMA reduce using rule 32 (comparacion -> valores comparador valores .) - - -state 102 - - (68) estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE . bloque LLAVECIERRA - (1) bloque -> . expresion - (2) bloque -> . bloque expresion - (3) bloque -> . empty - (4) bloque -> . estructuras - (5) bloque -> . bloque estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (82) empty -> . - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - ! shift/reduce conflict for MAP resolved as shift - ! shift/reduce conflict for VARIABLE resolved as shift - ! shift/reduce conflict for BOOL resolved as shift - ! shift/reduce conflict for IF resolved as shift - ! shift/reduce conflict for WHILE resolved as shift - ! shift/reduce conflict for FOR resolved as shift - ! shift/reduce conflict for STRING resolved as shift - ! shift/reduce conflict for INT resolved as shift - ! shift/reduce conflict for DOUBLE resolved as shift - ! shift/reduce conflict for DYNAMIC resolved as shift - ! shift/reduce conflict for VAR resolved as shift - LLAVECIERRA reduce using rule 82 (empty -> .) - PUNTOCOMA reduce using rule 82 (empty -> .) - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - ! MAP [ reduce using rule 82 (empty -> .) ] - ! VARIABLE [ reduce using rule 82 (empty -> .) ] - ! BOOL [ reduce using rule 82 (empty -> .) ] - ! IF [ reduce using rule 82 (empty -> .) ] - ! WHILE [ reduce using rule 82 (empty -> .) ] - ! FOR [ reduce using rule 82 (empty -> .) ] - ! STRING [ reduce using rule 82 (empty -> .) ] - ! INT [ reduce using rule 82 (empty -> .) ] - ! DOUBLE [ reduce using rule 82 (empty -> .) ] - ! DYNAMIC [ reduce using rule 82 (empty -> .) ] - ! VAR [ reduce using rule 82 (empty -> .) ] - - bloque shift and go to state 113 - expresion shift and go to state 2 - empty shift and go to state 3 - estructuras shift and go to state 4 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - estructuraIfElse shift and go to state 16 - -state 103 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio . PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - - PUNTOCOMA shift and go to state 114 - - -state 104 - - (72) comparacionVacio -> comparacion . - (33) comparacion -> comparacion . comparador valores - (34) comparador -> . MENORQUE - (35) comparador -> . MAYORQUE - (36) comparador -> . IGUALQUE - (37) comparador -> . DIFERENTEQUE - - PUNTOCOMA reduce using rule 72 (comparacionVacio -> comparacion .) - MENORQUE shift and go to state 77 - MAYORQUE shift and go to state 78 - IGUALQUE shift and go to state 79 - DIFERENTEQUE shift and go to state 80 - - comparador shift and go to state 76 - -state 105 - - (73) comparacionVacio -> booleano . - (51) valores -> booleano . - - PUNTOCOMA reduce using rule 73 (comparacionVacio -> booleano .) - MENORQUE reduce using rule 51 (valores -> booleano .) - MAYORQUE reduce using rule 51 (valores -> booleano .) - IGUALQUE reduce using rule 51 (valores -> booleano .) - DIFERENTEQUE reduce using rule 51 (valores -> booleano .) - - -state 106 - - (74) comparacionVacio -> empty . - - PUNTOCOMA reduce using rule 74 (comparacionVacio -> empty .) - - -state 107 - - (38) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE . VARIABLE IGUAL creacionMapa - - VARIABLE shift and go to state 115 - - -state 108 - - (21) operacion_aritmetica -> valores operadores_aritmeticos valores . - - SUMA reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - RESTA reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - MULTIPLICACION reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - DIVISION reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - DIVENTERA reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - RESIDUO reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - PUNTOCOMA reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - RPAREN reduce using rule 21 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - - -state 109 - - (22) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores . - - SUMA reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - RESTA reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - MULTIPLICACION reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - DIVISION reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - DIVENTERA reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - RESIDUO reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - PUNTOCOMA reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - RPAREN reduce using rule 22 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - - -state 110 - - (43) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN . - - PUNTOCOMA reduce using rule 43 (mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN .) - PUNTO reduce using rule 43 (mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN .) - - -state 111 - - (63) estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque . LLAVECIERRA - (2) bloque -> bloque . expresion - (5) bloque -> bloque . estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (82) empty -> . - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - LLAVECIERRA shift and go to state 116 - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - PUNTOCOMA reduce using rule 82 (empty -> .) - - expresion shift and go to state 24 - estructuras shift and go to state 25 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - empty shift and go to state 26 - estructuraIfElse shift and go to state 16 - -state 112 - - (64) estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf . LLAVECIERRA - (60) estructuras -> estructuraIf . - (66) estructuraIfElse -> estructuraIf . ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> estructuraIf . ELSE LLAVEABRE estructuraIf LLAVECIERRA - - ! shift/reduce conflict for LLAVECIERRA resolved as shift - LLAVECIERRA shift and go to state 117 - MAP reduce using rule 60 (estructuras -> estructuraIf .) - VARIABLE reduce using rule 60 (estructuras -> estructuraIf .) - BOOL reduce using rule 60 (estructuras -> estructuraIf .) - IF reduce using rule 60 (estructuras -> estructuraIf .) - WHILE reduce using rule 60 (estructuras -> estructuraIf .) - FOR reduce using rule 60 (estructuras -> estructuraIf .) - STRING reduce using rule 60 (estructuras -> estructuraIf .) - INT reduce using rule 60 (estructuras -> estructuraIf .) - DOUBLE reduce using rule 60 (estructuras -> estructuraIf .) - DYNAMIC reduce using rule 60 (estructuras -> estructuraIf .) - VAR reduce using rule 60 (estructuras -> estructuraIf .) - PUNTOCOMA reduce using rule 60 (estructuras -> estructuraIf .) - ELSE shift and go to state 31 - - ! LLAVECIERRA [ reduce using rule 60 (estructuras -> estructuraIf .) ] - - -state 113 - - (68) estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque . LLAVECIERRA - (2) bloque -> bloque . expresion - (5) bloque -> bloque . estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (82) empty -> . - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - LLAVECIERRA shift and go to state 118 - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - PUNTOCOMA reduce using rule 82 (empty -> .) - - expresion shift and go to state 24 - estructuras shift and go to state 25 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - empty shift and go to state 26 - estructuraIfElse shift and go to state 16 - -state 114 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA . aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (75) aumento -> . VARIABLE IGUAL operacion_aritmetica - (76) aumento -> . VARIABLE operadores_asignacion NUMERO - (77) aumento -> . VARIABLE operadores_asignacion VARIABLE - (78) aumento -> . empty - (82) empty -> . - - VARIABLE shift and go to state 120 - RPAREN reduce using rule 82 (empty -> .) - - aumento shift and go to state 119 - empty shift and go to state 121 - -state 115 - - (38) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE . IGUAL creacionMapa - - IGUAL shift and go to state 122 - - -state 116 - - (63) estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA . - - ELSE reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - MAP reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - VARIABLE reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - BOOL reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - IF reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - WHILE reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - FOR reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - STRING reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - INT reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - DOUBLE reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - DYNAMIC reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - VAR reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - $end reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - PUNTOCOMA reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - LLAVECIERRA reduce using rule 63 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - - -state 117 - - (64) estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA . - - ELSE reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - MAP reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - VARIABLE reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - BOOL reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - IF reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - WHILE reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - FOR reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - STRING reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - INT reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - DOUBLE reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - DYNAMIC reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - VAR reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - $end reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - PUNTOCOMA reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - LLAVECIERRA reduce using rule 64 (estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA .) - - -state 118 - - (68) estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA . - - MAP reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - VARIABLE reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - BOOL reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - IF reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - WHILE reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - FOR reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - STRING reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - INT reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - DOUBLE reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - DYNAMIC reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - VAR reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - $end reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - PUNTOCOMA reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - LLAVECIERRA reduce using rule 68 (estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA .) - - -state 119 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento . RPAREN LLAVEABRE bloque LLAVECIERRA - - RPAREN shift and go to state 123 - - -state 120 - - (75) aumento -> VARIABLE . IGUAL operacion_aritmetica - (76) aumento -> VARIABLE . operadores_asignacion NUMERO - (77) aumento -> VARIABLE . operadores_asignacion VARIABLE - (29) operadores_asignacion -> . IGUAL - (30) operadores_asignacion -> . ASIGNACIONAUMENTADA - (31) operadores_asignacion -> . ASIGNACIONDISMINUIDA - - IGUAL shift and go to state 124 - ASIGNACIONAUMENTADA shift and go to state 37 - ASIGNACIONDISMINUIDA shift and go to state 38 - - operadores_asignacion shift and go to state 125 - -state 121 - - (78) aumento -> empty . - - RPAREN reduce using rule 78 (aumento -> empty .) - - -state 122 - - (38) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL . creacionMapa - (44) creacionMapa -> . LLAVEABRE paresClaveValor LLAVECIERRA - (45) creacionMapa -> . VARIABLE - - LLAVEABRE shift and go to state 128 - VARIABLE shift and go to state 126 - - creacionMapa shift and go to state 127 - -state 123 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN . LLAVEABRE bloque LLAVECIERRA - - LLAVEABRE shift and go to state 129 - - -state 124 +state 41 - (75) aumento -> VARIABLE IGUAL . operacion_aritmetica - (29) operadores_asignacion -> IGUAL . - (21) operacion_aritmetica -> . valores operadores_aritmeticos valores - (22) operacion_aritmetica -> . operacion_aritmetica operadores_aritmeticos valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE + (21) comparador -> DIFERENTEQUE . - ! shift/reduce conflict for VARIABLE resolved as shift - ! shift/reduce conflict for NUMERO resolved as shift - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - ! NUMERO [ reduce using rule 29 (operadores_asignacion -> IGUAL .) ] - ! VARIABLE [ reduce using rule 29 (operadores_asignacion -> IGUAL .) ] - - operacion_aritmetica shift and go to state 130 - valores shift and go to state 131 - booleano shift and go to state 53 - -state 125 - - (76) aumento -> VARIABLE operadores_asignacion . NUMERO - (77) aumento -> VARIABLE operadores_asignacion . VARIABLE - - NUMERO shift and go to state 133 - VARIABLE shift and go to state 132 - - -state 126 - - (45) creacionMapa -> VARIABLE . - - PUNTOCOMA reduce using rule 45 (creacionMapa -> VARIABLE .) - PUNTO reduce using rule 45 (creacionMapa -> VARIABLE .) - - -state 127 - - (38) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa . - - PUNTOCOMA reduce using rule 38 (mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa .) - PUNTO reduce using rule 38 (mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa .) - - -state 128 - - (44) creacionMapa -> LLAVEABRE . paresClaveValor LLAVECIERRA - (46) paresClaveValor -> . valores DOSPUNTOS valores - (47) paresClaveValor -> . paresClaveValor COMA valores DOSPUNTOS valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - paresClaveValor shift and go to state 134 - valores shift and go to state 135 - booleano shift and go to state 53 - -state 129 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE . bloque LLAVECIERRA - (1) bloque -> . expresion - (2) bloque -> . bloque expresion - (3) bloque -> . empty - (4) bloque -> . estructuras - (5) bloque -> . bloque estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (82) empty -> . - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - ! shift/reduce conflict for MAP resolved as shift - ! shift/reduce conflict for VARIABLE resolved as shift - ! shift/reduce conflict for BOOL resolved as shift - ! shift/reduce conflict for IF resolved as shift - ! shift/reduce conflict for WHILE resolved as shift - ! shift/reduce conflict for FOR resolved as shift - ! shift/reduce conflict for STRING resolved as shift - ! shift/reduce conflict for INT resolved as shift - ! shift/reduce conflict for DOUBLE resolved as shift - ! shift/reduce conflict for DYNAMIC resolved as shift - ! shift/reduce conflict for VAR resolved as shift - LLAVECIERRA reduce using rule 82 (empty -> .) - PUNTOCOMA reduce using rule 82 (empty -> .) - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - - ! MAP [ reduce using rule 82 (empty -> .) ] - ! VARIABLE [ reduce using rule 82 (empty -> .) ] - ! BOOL [ reduce using rule 82 (empty -> .) ] - ! IF [ reduce using rule 82 (empty -> .) ] - ! WHILE [ reduce using rule 82 (empty -> .) ] - ! FOR [ reduce using rule 82 (empty -> .) ] - ! STRING [ reduce using rule 82 (empty -> .) ] - ! INT [ reduce using rule 82 (empty -> .) ] - ! DOUBLE [ reduce using rule 82 (empty -> .) ] - ! DYNAMIC [ reduce using rule 82 (empty -> .) ] - ! VAR [ reduce using rule 82 (empty -> .) ] - - bloque shift and go to state 136 - expresion shift and go to state 2 - empty shift and go to state 3 - estructuras shift and go to state 4 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - estructuraIfElse shift and go to state 16 - -state 130 - - (75) aumento -> VARIABLE IGUAL operacion_aritmetica . - (22) operacion_aritmetica -> operacion_aritmetica . operadores_aritmeticos valores - (23) operadores_aritmeticos -> . SUMA - (24) operadores_aritmeticos -> . RESTA - (25) operadores_aritmeticos -> . MULTIPLICACION - (26) operadores_aritmeticos -> . DIVISION - (27) operadores_aritmeticos -> . DIVENTERA - (28) operadores_aritmeticos -> . RESIDUO - - RPAREN reduce using rule 75 (aumento -> VARIABLE IGUAL operacion_aritmetica .) - SUMA shift and go to state 90 - RESTA shift and go to state 91 - MULTIPLICACION shift and go to state 92 - DIVISION shift and go to state 93 - DIVENTERA shift and go to state 94 - RESIDUO shift and go to state 95 - - operadores_aritmeticos shift and go to state 96 - -state 131 - - (21) operacion_aritmetica -> valores . operadores_aritmeticos valores - (23) operadores_aritmeticos -> . SUMA - (24) operadores_aritmeticos -> . RESTA - (25) operadores_aritmeticos -> . MULTIPLICACION - (26) operadores_aritmeticos -> . DIVISION - (27) operadores_aritmeticos -> . DIVENTERA - (28) operadores_aritmeticos -> . RESIDUO - - SUMA shift and go to state 90 - RESTA shift and go to state 91 - MULTIPLICACION shift and go to state 92 - DIVISION shift and go to state 93 - DIVENTERA shift and go to state 94 - RESIDUO shift and go to state 95 - - operadores_aritmeticos shift and go to state 89 - -state 132 - - (77) aumento -> VARIABLE operadores_asignacion VARIABLE . - - RPAREN reduce using rule 77 (aumento -> VARIABLE operadores_asignacion VARIABLE .) - - -state 133 - - (76) aumento -> VARIABLE operadores_asignacion NUMERO . - - RPAREN reduce using rule 76 (aumento -> VARIABLE operadores_asignacion NUMERO .) - - -state 134 - - (44) creacionMapa -> LLAVEABRE paresClaveValor . LLAVECIERRA - (47) paresClaveValor -> paresClaveValor . COMA valores DOSPUNTOS valores - - LLAVECIERRA shift and go to state 137 - COMA shift and go to state 138 - - -state 135 - - (46) paresClaveValor -> valores . DOSPUNTOS valores - - DOSPUNTOS shift and go to state 139 - - -state 136 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque . LLAVECIERRA - (2) bloque -> bloque . expresion - (5) bloque -> bloque . estructuras - (12) expresion -> . mapa PUNTOCOMA - (13) expresion -> . mapaFunciones PUNTOCOMA - (14) expresion -> . asignacion PUNTOCOMA - (60) estructuras -> . estructuraIf - (61) estructuras -> . estructuraWhile - (62) estructuras -> . estructuraFor - (38) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - (39) mapa -> . mapaFunciones - (40) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN RPAREN - (41) mapaFunciones -> . mapa PUNTO VARIABLE LPAREN valores - (42) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN - (43) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN - (16) asignacion -> . VARIABLE operadores_asignacion valores - (17) asignacion -> . tipoDato VARIABLE IGUAL valores - (18) asignacion -> . BOOL VARIABLE IGUAL comparacion - (19) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (20) asignacion -> . empty - (63) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (64) estructuraIf -> . IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - (65) estructuraIf -> . estructuraIfElse - (68) estructuraWhile -> . WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - (69) estructuraFor -> . FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA - (54) tipoDato -> . STRING - (55) tipoDato -> . INT - (56) tipoDato -> . BOOL - (57) tipoDato -> . DOUBLE - (58) tipoDato -> . DYNAMIC - (59) tipoDato -> . VAR - (82) empty -> . - (66) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - (67) estructuraIfElse -> . estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - - LLAVECIERRA shift and go to state 140 - MAP shift and go to state 11 - VARIABLE shift and go to state 13 - BOOL shift and go to state 14 - IF shift and go to state 15 - WHILE shift and go to state 17 - FOR shift and go to state 18 - STRING shift and go to state 19 - INT shift and go to state 20 - DOUBLE shift and go to state 21 - DYNAMIC shift and go to state 22 - VAR shift and go to state 23 - PUNTOCOMA reduce using rule 82 (empty -> .) + NUMERO reduce using rule 21 (comparador -> DIFERENTEQUE .) + CADENA reduce using rule 21 (comparador -> DIFERENTEQUE .) + VARIABLE reduce using rule 21 (comparador -> DIFERENTEQUE .) + TRUE reduce using rule 21 (comparador -> DIFERENTEQUE .) + FALSE reduce using rule 21 (comparador -> DIFERENTEQUE .) - expresion shift and go to state 24 - estructuras shift and go to state 25 - mapa shift and go to state 5 - mapaFunciones shift and go to state 6 - asignacion shift and go to state 7 - estructuraIf shift and go to state 8 - estructuraWhile shift and go to state 9 - estructuraFor shift and go to state 10 - tipoDato shift and go to state 12 - empty shift and go to state 26 - estructuraIfElse shift and go to state 16 -state 137 +state 42 - (44) creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA . + (16) comparacion -> valores comparador . valores + (29) valores -> . NUMERO + (30) valores -> . CADENA + (31) valores -> . booleano + (32) valores -> . VARIABLE + (33) booleano -> . TRUE + (34) booleano -> . FALSE - PUNTOCOMA reduce using rule 44 (creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA .) - PUNTO reduce using rule 44 (creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA .) + NUMERO shift and go to state 18 + CADENA shift and go to state 19 + VARIABLE shift and go to state 16 + TRUE shift and go to state 21 + FALSE shift and go to state 22 + valores shift and go to state 46 + booleano shift and go to state 20 -state 138 +state 43 - (47) paresClaveValor -> paresClaveValor COMA . valores DOSPUNTOS valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 141 - booleano shift and go to state 53 - -state 139 - - (46) paresClaveValor -> valores DOSPUNTOS . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE - - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 - - valores shift and go to state 142 - booleano shift and go to state 53 - -state 140 - - (69) estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA . - - MAP reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - VARIABLE reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - BOOL reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - IF reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - WHILE reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - FOR reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - STRING reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - INT reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - DOUBLE reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - DYNAMIC reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - VAR reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - $end reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - PUNTOCOMA reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - LLAVECIERRA reduce using rule 69 (estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA .) - - -state 141 - - (47) paresClaveValor -> paresClaveValor COMA valores . DOSPUNTOS valores + (5) operacion_aritmetica -> valores operadores_aritmeticos valores . - DOSPUNTOS shift and go to state 143 + SUMA reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + RESTA reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + MULTIPLICACION reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + DIVISION reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + DIVENTERA reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + RESIDUO reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + $end reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) -state 142 +state 44 - (46) paresClaveValor -> valores DOSPUNTOS valores . + (6) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores . - LLAVECIERRA reduce using rule 46 (paresClaveValor -> valores DOSPUNTOS valores .) - COMA reduce using rule 46 (paresClaveValor -> valores DOSPUNTOS valores .) + SUMA reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + RESTA reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + MULTIPLICACION reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + DIVISION reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + DIVENTERA reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + RESIDUO reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + $end reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) -state 143 +state 45 - (47) paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS . valores - (48) valores -> . VARIABLE - (49) valores -> . NUMERO - (50) valores -> . CADENA - (51) valores -> . booleano - (52) booleano -> . TRUE - (53) booleano -> . FALSE + (17) comparacion -> comparacion comparador valores . - VARIABLE shift and go to state 49 - NUMERO shift and go to state 51 - CADENA shift and go to state 52 - TRUE shift and go to state 54 - FALSE shift and go to state 55 + MENORQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) + MAYORQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) + IGUALQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) + DIFERENTEQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) + $end reduce using rule 17 (comparacion -> comparacion comparador valores .) - valores shift and go to state 144 - booleano shift and go to state 53 -state 144 +state 46 - (47) paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores . + (16) comparacion -> valores comparador valores . - LLAVECIERRA reduce using rule 47 (paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores .) - COMA reduce using rule 47 (paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores .) + MENORQUE reduce using rule 16 (comparacion -> valores comparador valores .) + MAYORQUE reduce using rule 16 (comparacion -> valores comparador valores .) + IGUALQUE reduce using rule 16 (comparacion -> valores comparador valores .) + DIFERENTEQUE reduce using rule 16 (comparacion -> valores comparador valores .) + $end reduce using rule 16 (comparacion -> valores comparador valores .) WARNING: WARNING: Conflicts: WARNING: -WARNING: shift/reduce conflict for MAP in state 0 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 0 resolved as shift -WARNING: shift/reduce conflict for BOOL in state 0 resolved as shift -WARNING: shift/reduce conflict for IF in state 0 resolved as shift -WARNING: shift/reduce conflict for WHILE in state 0 resolved as shift -WARNING: shift/reduce conflict for FOR in state 0 resolved as shift -WARNING: shift/reduce conflict for STRING in state 0 resolved as shift -WARNING: shift/reduce conflict for INT in state 0 resolved as shift -WARNING: shift/reduce conflict for DOUBLE in state 0 resolved as shift -WARNING: shift/reduce conflict for DYNAMIC in state 0 resolved as shift -WARNING: shift/reduce conflict for VAR in state 0 resolved as shift -WARNING: shift/reduce conflict for PUNTOCOMA in state 6 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 14 resolved as shift -WARNING: shift/reduce conflict for IF in state 44 resolved as shift -WARNING: shift/reduce conflict for MAP in state 44 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 44 resolved as shift -WARNING: shift/reduce conflict for BOOL in state 44 resolved as shift -WARNING: shift/reduce conflict for WHILE in state 44 resolved as shift -WARNING: shift/reduce conflict for FOR in state 44 resolved as shift -WARNING: shift/reduce conflict for STRING in state 44 resolved as shift -WARNING: shift/reduce conflict for INT in state 44 resolved as shift -WARNING: shift/reduce conflict for DOUBLE in state 44 resolved as shift -WARNING: shift/reduce conflict for DYNAMIC in state 44 resolved as shift -WARNING: shift/reduce conflict for VAR in state 44 resolved as shift -WARNING: shift/reduce conflict for LLAVECIERRA in state 68 resolved as shift -WARNING: shift/reduce conflict for IF in state 99 resolved as shift -WARNING: shift/reduce conflict for MAP in state 99 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 99 resolved as shift -WARNING: shift/reduce conflict for BOOL in state 99 resolved as shift -WARNING: shift/reduce conflict for WHILE in state 99 resolved as shift -WARNING: shift/reduce conflict for FOR in state 99 resolved as shift -WARNING: shift/reduce conflict for STRING in state 99 resolved as shift -WARNING: shift/reduce conflict for INT in state 99 resolved as shift -WARNING: shift/reduce conflict for DOUBLE in state 99 resolved as shift -WARNING: shift/reduce conflict for DYNAMIC in state 99 resolved as shift -WARNING: shift/reduce conflict for VAR in state 99 resolved as shift -WARNING: shift/reduce conflict for MAP in state 102 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 102 resolved as shift -WARNING: shift/reduce conflict for BOOL in state 102 resolved as shift -WARNING: shift/reduce conflict for IF in state 102 resolved as shift -WARNING: shift/reduce conflict for WHILE in state 102 resolved as shift -WARNING: shift/reduce conflict for FOR in state 102 resolved as shift -WARNING: shift/reduce conflict for STRING in state 102 resolved as shift -WARNING: shift/reduce conflict for INT in state 102 resolved as shift -WARNING: shift/reduce conflict for DOUBLE in state 102 resolved as shift -WARNING: shift/reduce conflict for DYNAMIC in state 102 resolved as shift -WARNING: shift/reduce conflict for VAR in state 102 resolved as shift -WARNING: shift/reduce conflict for LLAVECIERRA in state 112 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 124 resolved as shift -WARNING: shift/reduce conflict for NUMERO in state 124 resolved as shift -WARNING: shift/reduce conflict for MAP in state 129 resolved as shift -WARNING: shift/reduce conflict for VARIABLE in state 129 resolved as shift -WARNING: shift/reduce conflict for BOOL in state 129 resolved as shift -WARNING: shift/reduce conflict for IF in state 129 resolved as shift -WARNING: shift/reduce conflict for WHILE in state 129 resolved as shift -WARNING: shift/reduce conflict for FOR in state 129 resolved as shift -WARNING: shift/reduce conflict for STRING in state 129 resolved as shift -WARNING: shift/reduce conflict for INT in state 129 resolved as shift -WARNING: shift/reduce conflict for DOUBLE in state 129 resolved as shift -WARNING: shift/reduce conflict for DYNAMIC in state 129 resolved as shift -WARNING: shift/reduce conflict for VAR in state 129 resolved as shift -WARNING: reduce/reduce conflict in state 3 resolved using rule (bloque -> empty) -WARNING: rejected rule (asignacion -> empty) in state 3 -WARNING: reduce/reduce conflict in state 65 resolved using rule (asignacion -> empty) -WARNING: rejected rule (asignacionVacio -> empty) in state 65 -WARNING: Rule (asignacionVacio -> empty) is never reduced +WARNING: shift/reduce conflict for VARIABLE in state 4 resolved as shift diff --git a/parsetab.py b/parsetab.py index be0d3a5..2efba04 100644 --- a/parsetab.py +++ b/parsetab.py @@ -6,9 +6,9 @@ _lr_method = 'LALR' -_lr_signature = 'ADD ASIGNACIONAUMENTADA ASIGNACIONDISMINUIDA BOOL CADENA COMA COMILLASDOBLES COMILLASSIMPLES CORCHETEABRE CORCHETECIERRA DIFERENTEQUE DIVENTERA DIVISION DO DOSPUNTOS DOUBLE DYNAMIC ELSE EXPORT FALSE FINAL FLECHA FOR IF IGUAL IGUALQUE IMPORT IN INT IS LIST LLAVEABRE LLAVECIERRA LPAREN MAP MAYORQUE MENORQUE MULTIPLICACION NEW NOT NULL NUMERO PRINT PUNTO PUNTOCOMA REQUIRED RESIDUO RESTA RETURN RPAREN SET STRING SUMA SUPER THIS TRUE VAR VARIABLE VOID WHILEbloque : expresion\n | bloque expresion\n | empty\n | estructuras\n | bloque estructuras\n funcion : tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA\n | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA\n | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRAparametros : tipoDato VARIABLE\n | parametros COMA tipoDato VARIABLE\n | emptyexpresion : mapa PUNTOCOMA\n | mapaFunciones PUNTOCOMA\n | asignacion PUNTOCOMAimport : IMPORT CADENA PUNTOCOMAasignacion : VARIABLE operadores_asignacion valores\n | tipoDato VARIABLE IGUAL valores\n | BOOL VARIABLE IGUAL comparacion\n | tipoDato VARIABLE IGUAL operacion_aritmetica\n | emptyoperacion_aritmetica : valores operadores_aritmeticos valores\n | operacion_aritmetica operadores_aritmeticos valoresoperadores_aritmeticos : SUMA\n | RESTA\n | MULTIPLICACION\n | DIVISION\n | DIVENTERA\n | RESIDUOoperadores_asignacion : IGUAL\n | ASIGNACIONAUMENTADA\n | ASIGNACIONDISMINUIDAcomparacion : valores comparador valores\n | comparacion comparador valores comparador : MENORQUE\n | MAYORQUE\n | IGUALQUE\n | DIFERENTEQUEmapa : MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa\n | mapaFuncionesmapaFunciones : mapa PUNTO VARIABLE LPAREN RPAREN\n | mapa PUNTO VARIABLE LPAREN valores\n | VARIABLE PUNTO VARIABLE LPAREN RPAREN\n | VARIABLE PUNTO VARIABLE LPAREN valores RPARENcreacionMapa : LLAVEABRE paresClaveValor LLAVECIERRA\n | VARIABLEparesClaveValor : valores DOSPUNTOS valores\n | paresClaveValor COMA valores DOSPUNTOS valoresvalores : VARIABLE\n | NUMERO\n | CADENA\n | booleano booleano : TRUE\n | FALSEtipoDato : STRING\n | INT\n | BOOL\n | DOUBLE\n | DYNAMIC\n | VAR estructuras : estructuraIf\n | estructuraWhile\n | estructuraFor estructuraIf : IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA\n | IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA\n | estructuraIfElse\n estructuraIfElse : estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA\n | estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA\n estructuraWhile : WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA\n estructuraFor : FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA asignacionVacio : asignacion\n | empty comparacionVacio : comparacion\n | booleano\n | empty aumento : VARIABLE IGUAL operacion_aritmetica\n | VARIABLE operadores_asignacion NUMERO\n | VARIABLE operadores_asignacion VARIABLE\n | empty argumentoEstructura : VARIABLE\n | booleano\n | comparacion\n empty :' +_lr_signature = 'ADD ASIGNACIONAUMENTADA ASIGNACIONDISMINUIDA BOOL CADENA COMA COMILLASDOBLES COMILLASSIMPLES CORCHETEABRE CORCHETECIERRA DIFERENTEQUE DIVENTERA DIVISION DO DOSPUNTOS DOUBLE DYNAMIC ELSE EXPORT FALSE FINAL FLECHA FOR IF IGUAL IGUALQUE IMPORT IN INT IS LIST LLAVEABRE LLAVECIERRA LPAREN MAP MAYORQUE MENORQUE MULTIPLICACION NEW NOT NULL NUMERO PRINT PUNTO PUNTOCOMA REQUIRED RESIDUO RESTA RETURN RPAREN SET STRING SUMA SUPER THIS TRUE VAR VARIABLE VOID WHILEasignacion : VARIABLE operadores_asignacion valores\n | tipoDato VARIABLE IGUAL valores\n | BOOL VARIABLE IGUAL comparacion\n | tipoDato VARIABLE IGUAL operacion_aritmeticaoperacion_aritmetica : valores operadores_aritmeticos valores\n | operacion_aritmetica operadores_aritmeticos valoresoperadores_aritmeticos : SUMA\n | RESTA\n | MULTIPLICACION\n | DIVISION\n | DIVENTERA\n | RESIDUOoperadores_asignacion : IGUAL\n | ASIGNACIONAUMENTADA\n | ASIGNACIONDISMINUIDAcomparacion : valores comparador valores\n | comparacion comparador valores comparador : MENORQUE\n | MAYORQUE\n | IGUALQUE\n | DIFERENTEQUEmapa : MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapamapaFunciones : VARIABLE PUNTO VARIABLE LPAREN RPAREN\n | VARIABLE PUNTO VARIABLE LPAREN valores RPARENcreacionMapa : LLAVEABRE paresClaveValor LLAVECIERRA\n | VARIABLEparesClaveValor : valores DOSPUNTOS valores\n | paresClaveValor COMA valores DOSPUNTOS valoresvalores : NUMERO\n | CADENA\n | booleano\n | VARIABLE booleano : TRUE\n | FALSEtipoDato : STRING\n | INT\n | BOOL\n | DOUBLE\n | DYNAMIC\n | VAR ' -_lr_action_items = {'MAP':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,44,68,69,86,87,99,102,111,112,113,116,117,118,129,136,140,],[11,11,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,11,-60,11,-67,-66,11,11,11,-60,11,-63,-64,-68,11,11,-69,]),'VARIABLE':([0,1,2,3,4,8,9,10,12,14,16,19,20,21,22,23,24,25,27,28,29,30,34,35,36,37,38,40,41,42,44,47,56,67,68,69,73,76,77,78,79,80,81,83,86,87,89,90,91,92,93,94,95,96,99,102,107,111,112,113,114,116,117,118,122,124,125,128,129,136,138,139,140,143,],[13,13,-1,-3,-4,-60,-61,-62,33,39,-65,-54,-55,-57,-58,-59,-2,-5,-12,43,-13,-14,48,49,-29,-30,-31,58,58,66,13,49,49,49,-60,13,49,49,-34,-35,-36,-37,49,49,-67,-66,49,-23,-24,-25,-26,-27,-28,49,13,13,115,13,-60,13,120,-63,-64,-68,126,49,132,49,13,13,49,49,-69,49,]),'BOOL':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,32,42,44,68,69,70,86,87,99,102,111,112,113,116,117,118,129,136,140,],[14,14,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,46,14,14,-60,14,46,-67,-66,14,14,14,-60,14,-63,-64,-68,14,14,-69,]),'IF':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,44,68,69,86,87,99,102,111,112,113,116,117,118,129,136,140,],[15,15,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,15,-60,15,-67,-66,15,15,15,-60,15,-63,-64,-68,15,15,-69,]),'WHILE':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,44,68,69,86,87,99,102,111,112,113,116,117,118,129,136,140,],[17,17,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,17,-60,17,-67,-66,17,17,17,-60,17,-63,-64,-68,17,17,-69,]),'FOR':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,44,68,69,86,87,99,102,111,112,113,116,117,118,129,136,140,],[18,18,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,18,-60,18,-67,-66,18,18,18,-60,18,-63,-64,-68,18,18,-69,]),'STRING':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,32,42,44,68,69,70,86,87,99,102,111,112,113,116,117,118,129,136,140,],[19,19,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,19,19,19,-60,19,19,-67,-66,19,19,19,-60,19,-63,-64,-68,19,19,-69,]),'INT':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,32,42,44,68,69,70,86,87,99,102,111,112,113,116,117,118,129,136,140,],[20,20,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,20,20,20,-60,20,20,-67,-66,20,20,20,-60,20,-63,-64,-68,20,20,-69,]),'DOUBLE':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,32,42,44,68,69,70,86,87,99,102,111,112,113,116,117,118,129,136,140,],[21,21,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,21,21,21,-60,21,21,-67,-66,21,21,21,-60,21,-63,-64,-68,21,21,-69,]),'DYNAMIC':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,32,42,44,68,69,70,86,87,99,102,111,112,113,116,117,118,129,136,140,],[22,22,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,22,22,22,-60,22,22,-67,-66,22,22,22,-60,22,-63,-64,-68,22,22,-69,]),'VAR':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,32,42,44,68,69,70,86,87,99,102,111,112,113,116,117,118,129,136,140,],[23,23,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,23,23,23,-60,23,23,-67,-66,23,23,23,-60,23,-63,-64,-68,23,23,-69,]),'$end':([0,1,2,3,4,8,9,10,16,24,25,27,29,30,86,87,116,117,118,140,],[-82,0,-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,-67,-66,-63,-64,-68,-69,]),'PUNTOCOMA':([0,1,2,3,4,5,6,7,8,9,10,16,24,25,26,27,29,30,42,44,49,50,51,52,53,54,55,63,64,65,68,69,71,72,74,83,84,85,86,87,97,99,100,101,102,103,104,105,106,108,109,110,111,112,113,116,117,118,126,127,129,136,137,140,],[-82,-82,-1,-3,-4,27,29,30,-60,-61,-62,-65,-2,-5,-20,-12,-13,-14,-82,-82,-48,-16,-49,-50,-51,-52,-53,83,-70,-20,-60,-82,-17,-19,-18,-82,-40,-41,-67,-66,-42,-82,-33,-32,-82,114,-72,-73,-74,-21,-22,-43,-82,-60,-82,-63,-64,-68,-45,-38,-82,-82,-44,-69,]),'LLAVECIERRA':([2,3,4,8,9,10,16,24,25,27,29,30,44,49,51,52,53,54,55,68,69,86,87,99,102,111,112,113,116,117,118,129,134,136,140,142,144,],[-1,-3,-4,-60,-61,-62,-65,-2,-5,-12,-13,-14,-82,-48,-49,-50,-51,-52,-53,86,87,-67,-66,-82,-82,116,117,118,-63,-64,-68,-82,137,140,-69,-46,-47,]),'PUNTO':([5,6,13,49,51,52,53,54,55,84,85,97,110,126,127,137,],[28,-39,34,-48,-49,-50,-51,-52,-53,-40,-41,-42,-43,-45,-38,-44,]),'ELSE':([8,16,68,86,87,112,116,117,],[31,-65,31,-67,-66,31,-63,-64,]),'MENORQUE':([11,49,51,52,53,54,55,58,59,60,61,74,100,101,104,105,],[32,-48,-49,-50,-51,-52,-53,-48,-51,77,77,77,-33,-32,77,-51,]),'IGUAL':([13,33,39,66,115,120,],[36,47,56,36,122,124,]),'ASIGNACIONAUMENTADA':([13,66,120,],[37,37,37,]),'ASIGNACIONDISMINUIDA':([13,66,120,],[38,38,38,]),'LPAREN':([15,17,18,43,48,],[40,41,42,67,73,]),'COMA':([19,20,21,22,23,45,46,49,51,52,53,54,55,134,142,144,],[-54,-55,-57,-58,-59,70,-56,-48,-49,-50,-51,-52,-53,138,-46,-47,]),'MAYORQUE':([19,20,21,22,23,46,49,51,52,53,54,55,58,59,60,61,74,88,100,101,104,105,],[-54,-55,-57,-58,-59,-56,-48,-49,-50,-51,-52,-53,-48,-51,78,78,78,107,-33,-32,78,-51,]),'LLAVEABRE':([31,75,82,122,123,],[44,99,102,128,129,]),'NUMERO':([35,36,37,38,40,41,47,56,67,73,76,77,78,79,80,81,83,89,90,91,92,93,94,95,96,124,125,128,138,139,143,],[51,-29,-30,-31,51,51,51,51,51,51,51,-34,-35,-36,-37,51,51,51,-23,-24,-25,-26,-27,-28,51,51,133,51,51,51,51,]),'CADENA':([35,36,37,38,40,41,47,56,67,73,76,77,78,79,80,81,83,89,90,91,92,93,94,95,96,124,128,138,139,143,],[52,-29,-30,-31,52,52,52,52,52,52,52,-34,-35,-36,-37,52,52,52,-23,-24,-25,-26,-27,-28,52,52,52,52,52,52,]),'TRUE':([35,36,37,38,40,41,47,56,67,73,76,77,78,79,80,81,83,89,90,91,92,93,94,95,96,124,128,138,139,143,],[54,-29,-30,-31,54,54,54,54,54,54,54,-34,-35,-36,-37,54,54,54,-23,-24,-25,-26,-27,-28,54,54,54,54,54,54,]),'FALSE':([35,36,37,38,40,41,47,56,67,73,76,77,78,79,80,81,83,89,90,91,92,93,94,95,96,124,128,138,139,143,],[55,-29,-30,-31,55,55,55,55,55,55,55,-34,-35,-36,-37,55,55,55,-23,-24,-25,-26,-27,-28,55,55,55,55,55,55,]),'SUMA':([49,51,52,53,54,55,71,72,108,109,130,131,],[-48,-49,-50,-51,-52,-53,90,90,-21,-22,90,90,]),'RESTA':([49,51,52,53,54,55,71,72,108,109,130,131,],[-48,-49,-50,-51,-52,-53,91,91,-21,-22,91,91,]),'MULTIPLICACION':([49,51,52,53,54,55,71,72,108,109,130,131,],[-48,-49,-50,-51,-52,-53,92,92,-21,-22,92,92,]),'DIVISION':([49,51,52,53,54,55,71,72,108,109,130,131,],[-48,-49,-50,-51,-52,-53,93,93,-21,-22,93,93,]),'DIVENTERA':([49,51,52,53,54,55,71,72,108,109,130,131,],[-48,-49,-50,-51,-52,-53,94,94,-21,-22,94,94,]),'RESIDUO':([49,51,52,53,54,55,71,72,108,109,130,131,],[-48,-49,-50,-51,-52,-53,95,95,-21,-22,95,95,]),'IGUALQUE':([49,51,52,53,54,55,58,59,60,61,74,100,101,104,105,],[-48,-49,-50,-51,-52,-53,-48,-51,79,79,79,-33,-32,79,-51,]),'DIFERENTEQUE':([49,51,52,53,54,55,58,59,60,61,74,100,101,104,105,],[-48,-49,-50,-51,-52,-53,-48,-51,80,80,80,-33,-32,80,-51,]),'RPAREN':([49,51,52,53,54,55,57,58,59,60,62,67,73,98,100,101,108,109,114,119,121,130,132,133,],[-48,-49,-50,-51,-52,-53,75,-79,-80,-81,82,84,97,110,-33,-32,-21,-22,-82,123,-78,-75,-77,-76,]),'DOSPUNTOS':([49,51,52,53,54,55,135,141,],[-48,-49,-50,-51,-52,-53,139,143,]),} +_lr_action_items = {'VARIABLE':([0,3,4,5,6,7,8,9,10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[2,14,15,-35,-36,-38,-39,-40,16,-13,-14,-15,16,16,16,-7,-8,-9,-10,-11,-12,16,16,-18,-19,-20,-21,16,]),'BOOL':([0,],[4,]),'STRING':([0,],[5,]),'INT':([0,],[6,]),'DOUBLE':([0,],[7,]),'DYNAMIC':([0,],[8,]),'VAR':([0,],[9,]),'$end':([1,16,17,18,19,20,21,22,25,26,27,43,44,45,46,],[0,-32,-1,-29,-30,-31,-33,-34,-2,-4,-3,-5,-6,-17,-16,]),'IGUAL':([2,14,15,],[11,23,24,]),'ASIGNACIONAUMENTADA':([2,],[12,]),'ASIGNACIONDISMINUIDA':([2,],[13,]),'NUMERO':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[18,-13,-14,-15,18,18,18,-7,-8,-9,-10,-11,-12,18,18,-18,-19,-20,-21,18,]),'CADENA':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[19,-13,-14,-15,19,19,19,-7,-8,-9,-10,-11,-12,19,19,-18,-19,-20,-21,19,]),'TRUE':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[21,-13,-14,-15,21,21,21,-7,-8,-9,-10,-11,-12,21,21,-18,-19,-20,-21,21,]),'FALSE':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[22,-13,-14,-15,22,22,22,-7,-8,-9,-10,-11,-12,22,22,-18,-19,-20,-21,22,]),'SUMA':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,30,30,-5,-6,]),'RESTA':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,31,31,-5,-6,]),'MULTIPLICACION':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,32,32,-5,-6,]),'DIVISION':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,33,33,-5,-6,]),'DIVENTERA':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,34,34,-5,-6,]),'RESIDUO':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,35,35,-5,-6,]),'MENORQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,38,38,-17,-16,]),'MAYORQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,39,39,-17,-16,]),'IGUALQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,40,40,-17,-16,]),'DIFERENTEQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,41,41,-17,-16,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -17,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'bloque':([0,44,99,102,129,],[1,69,111,113,136,]),'expresion':([0,1,44,69,99,102,111,113,129,136,],[2,24,2,24,2,2,24,24,2,24,]),'empty':([0,1,42,44,69,83,99,102,111,113,114,129,136,],[3,26,65,3,26,106,3,3,26,26,121,3,26,]),'estructuras':([0,1,44,69,99,102,111,113,129,136,],[4,25,4,25,4,4,25,25,4,25,]),'mapa':([0,1,44,69,99,102,111,113,129,136,],[5,5,5,5,5,5,5,5,5,5,]),'mapaFunciones':([0,1,44,69,99,102,111,113,129,136,],[6,6,6,6,6,6,6,6,6,6,]),'asignacion':([0,1,42,44,69,99,102,111,113,129,136,],[7,7,64,7,7,7,7,7,7,7,7,]),'estructuraIf':([0,1,44,69,99,102,111,113,129,136,],[8,8,68,8,112,8,8,8,8,8,]),'estructuraWhile':([0,1,44,69,99,102,111,113,129,136,],[9,9,9,9,9,9,9,9,9,9,]),'estructuraFor':([0,1,44,69,99,102,111,113,129,136,],[10,10,10,10,10,10,10,10,10,10,]),'tipoDato':([0,1,32,42,44,69,70,99,102,111,113,129,136,],[12,12,45,12,12,12,88,12,12,12,12,12,12,]),'estructuraIfElse':([0,1,44,69,99,102,111,113,129,136,],[16,16,16,16,16,16,16,16,16,16,]),'operadores_asignacion':([13,66,120,],[35,35,125,]),'valores':([35,40,41,47,56,67,73,76,81,83,89,96,124,128,138,139,143,],[50,61,61,71,61,85,98,100,101,61,108,109,131,135,141,142,144,]),'booleano':([35,40,41,47,56,67,73,76,81,83,89,96,124,128,138,139,143,],[53,59,59,53,53,53,53,53,53,105,53,53,53,53,53,53,53,]),'argumentoEstructura':([40,41,],[57,62,]),'comparacion':([40,41,56,83,],[60,60,74,104,]),'asignacionVacio':([42,],[63,]),'operacion_aritmetica':([47,124,],[72,130,]),'comparador':([60,61,74,104,],[76,81,76,76,]),'operadores_aritmeticos':([71,72,130,131,],[89,96,96,89,]),'comparacionVacio':([83,],[103,]),'aumento':([114,],[119,]),'creacionMapa':([122,],[127,]),'paresClaveValor':([128,],[134,]),} +_lr_goto_items = {'asignacion':([0,],[1,]),'tipoDato':([0,],[3,]),'operadores_asignacion':([2,],[10,]),'valores':([10,23,24,29,36,37,42,],[17,25,28,43,44,45,46,]),'booleano':([10,23,24,29,36,37,42,],[20,20,20,20,20,20,20,]),'operacion_aritmetica':([23,],[26,]),'comparacion':([24,],[27,]),'operadores_aritmeticos':([25,26,],[29,36,]),'comparador':([27,28,],[37,42,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): @@ -26,87 +26,45 @@ _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ - ("S' -> bloque","S'",1,None,None,None), - ('bloque -> expresion','bloque',1,'p_bloque_codigo','sintactico.py',14), - ('bloque -> bloque expresion','bloque',2,'p_bloque_codigo','sintactico.py',15), - ('bloque -> empty','bloque',1,'p_bloque_codigo','sintactico.py',16), - ('bloque -> estructuras','bloque',1,'p_bloque_codigo','sintactico.py',17), - ('bloque -> bloque estructuras','bloque',2,'p_bloque_codigo','sintactico.py',18), - ('funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA','funcion',11,'p_funciones','sintactico.py',24), - ('funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA','funcion',8,'p_funciones','sintactico.py',25), - ('funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA','funcion',10,'p_funciones','sintactico.py',26), - ('parametros -> tipoDato VARIABLE','parametros',2,'p_parametros','sintactico.py',29), - ('parametros -> parametros COMA tipoDato VARIABLE','parametros',4,'p_parametros','sintactico.py',30), - ('parametros -> empty','parametros',1,'p_parametros','sintactico.py',31), - ('expresion -> mapa PUNTOCOMA','expresion',2,'p_expresion','sintactico.py',36), - ('expresion -> mapaFunciones PUNTOCOMA','expresion',2,'p_expresion','sintactico.py',37), - ('expresion -> asignacion PUNTOCOMA','expresion',2,'p_expresion','sintactico.py',38), - ('import -> IMPORT CADENA PUNTOCOMA','import',3,'p_import','sintactico.py',41), + ("S' -> asignacion","S'",1,None,None,None), ('asignacion -> VARIABLE operadores_asignacion valores','asignacion',3,'p_asignacion','sintactico.py',44), ('asignacion -> tipoDato VARIABLE IGUAL valores','asignacion',4,'p_asignacion','sintactico.py',45), ('asignacion -> BOOL VARIABLE IGUAL comparacion','asignacion',4,'p_asignacion','sintactico.py',46), ('asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica','asignacion',4,'p_asignacion','sintactico.py',47), - ('asignacion -> empty','asignacion',1,'p_asignacion','sintactico.py',48), - ('operacion_aritmetica -> valores operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',53), - ('operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',54), - ('operadores_aritmeticos -> SUMA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',59), - ('operadores_aritmeticos -> RESTA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',60), - ('operadores_aritmeticos -> MULTIPLICACION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',61), - ('operadores_aritmeticos -> DIVISION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',62), - ('operadores_aritmeticos -> DIVENTERA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',63), - ('operadores_aritmeticos -> RESIDUO','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',64), - ('operadores_asignacion -> IGUAL','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',67), - ('operadores_asignacion -> ASIGNACIONAUMENTADA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',68), - ('operadores_asignacion -> ASIGNACIONDISMINUIDA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',69), - ('comparacion -> valores comparador valores','comparacion',3,'p_comparacion','sintactico.py',72), - ('comparacion -> comparacion comparador valores','comparacion',3,'p_comparacion','sintactico.py',73), - ('comparador -> MENORQUE','comparador',1,'p_comparador','sintactico.py',76), - ('comparador -> MAYORQUE','comparador',1,'p_comparador','sintactico.py',77), - ('comparador -> IGUALQUE','comparador',1,'p_comparador','sintactico.py',78), - ('comparador -> DIFERENTEQUE','comparador',1,'p_comparador','sintactico.py',79), - ('mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa','mapa',9,'p_mapa','sintactico.py',83), - ('mapa -> mapaFunciones','mapa',1,'p_mapa','sintactico.py',84), - ('mapaFunciones -> mapa PUNTO VARIABLE LPAREN RPAREN','mapaFunciones',5,'p_mapa_funciones','sintactico.py',87), - ('mapaFunciones -> mapa PUNTO VARIABLE LPAREN valores','mapaFunciones',5,'p_mapa_funciones','sintactico.py',88), - ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN','mapaFunciones',5,'p_mapa_funciones','sintactico.py',89), - ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN','mapaFunciones',6,'p_mapa_funciones','sintactico.py',90), - ('creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA','creacionMapa',3,'p_creacion_mapa','sintactico.py',93), - ('creacionMapa -> VARIABLE','creacionMapa',1,'p_creacion_mapa','sintactico.py',94), - ('paresClaveValor -> valores DOSPUNTOS valores','paresClaveValor',3,'p_pares_clave_valor','sintactico.py',97), - ('paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores','paresClaveValor',5,'p_pares_clave_valor','sintactico.py',98), - ('valores -> VARIABLE','valores',1,'p_valores','sintactico.py',101), - ('valores -> NUMERO','valores',1,'p_valores','sintactico.py',102), - ('valores -> CADENA','valores',1,'p_valores','sintactico.py',103), - ('valores -> booleano','valores',1,'p_valores','sintactico.py',104), - ('booleano -> TRUE','booleano',1,'p_booleano','sintactico.py',107), - ('booleano -> FALSE','booleano',1,'p_booleano','sintactico.py',108), - ('tipoDato -> STRING','tipoDato',1,'p_tipo_dato','sintactico.py',111), - ('tipoDato -> INT','tipoDato',1,'p_tipo_dato','sintactico.py',112), - ('tipoDato -> BOOL','tipoDato',1,'p_tipo_dato','sintactico.py',113), - ('tipoDato -> DOUBLE','tipoDato',1,'p_tipo_dato','sintactico.py',114), - ('tipoDato -> DYNAMIC','tipoDato',1,'p_tipo_dato','sintactico.py',115), - ('tipoDato -> VAR','tipoDato',1,'p_tipo_dato','sintactico.py',116), - ('estructuras -> estructuraIf','estructuras',1,'p_estructuras','sintactico.py',122), - ('estructuras -> estructuraWhile','estructuras',1,'p_estructuras','sintactico.py',123), - ('estructuras -> estructuraFor','estructuras',1,'p_estructuras','sintactico.py',124), - ('estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA','estructuraIf',7,'p_estructuraIf','sintactico.py',127), - ('estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA','estructuraIf',7,'p_estructuraIf','sintactico.py',128), - ('estructuraIf -> estructuraIfElse','estructuraIf',1,'p_estructuraIf','sintactico.py',129), - ('estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA','estructuraIfElse',5,'p_estructuraIfElse','sintactico.py',133), - ('estructuraIfElse -> estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA','estructuraIfElse',5,'p_estructuraIfElse','sintactico.py',134), - ('estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA','estructuraWhile',7,'p_estructuraWhile','sintactico.py',138), - ('estructuraFor -> FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA','estructuraFor',11,'p_estructuraFor','sintactico.py',143), - ('asignacionVacio -> asignacion','asignacionVacio',1,'p_asignacionVacio','sintactico.py',146), - ('asignacionVacio -> empty','asignacionVacio',1,'p_asignacionVacio','sintactico.py',147), - ('comparacionVacio -> comparacion','comparacionVacio',1,'p_comparacionVacio','sintactico.py',150), - ('comparacionVacio -> booleano','comparacionVacio',1,'p_comparacionVacio','sintactico.py',151), - ('comparacionVacio -> empty','comparacionVacio',1,'p_comparacionVacio','sintactico.py',152), - ('aumento -> VARIABLE IGUAL operacion_aritmetica','aumento',3,'p_aumento','sintactico.py',156), - ('aumento -> VARIABLE operadores_asignacion NUMERO','aumento',3,'p_aumento','sintactico.py',157), - ('aumento -> VARIABLE operadores_asignacion VARIABLE','aumento',3,'p_aumento','sintactico.py',158), - ('aumento -> empty','aumento',1,'p_aumento','sintactico.py',159), - ('argumentoEstructura -> VARIABLE','argumentoEstructura',1,'p_argumentoEstructura','sintactico.py',162), - ('argumentoEstructura -> booleano','argumentoEstructura',1,'p_argumentoEstructura','sintactico.py',163), - ('argumentoEstructura -> comparacion','argumentoEstructura',1,'p_argumentoEstructura','sintactico.py',164), - ('empty -> ','empty',0,'p_empty','sintactico.py',168), + ('operacion_aritmetica -> valores operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',52), + ('operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',53), + ('operadores_aritmeticos -> SUMA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',57), + ('operadores_aritmeticos -> RESTA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',58), + ('operadores_aritmeticos -> MULTIPLICACION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',59), + ('operadores_aritmeticos -> DIVISION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',60), + ('operadores_aritmeticos -> DIVENTERA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',61), + ('operadores_aritmeticos -> RESIDUO','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',62), + ('operadores_asignacion -> IGUAL','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',65), + ('operadores_asignacion -> ASIGNACIONAUMENTADA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',66), + ('operadores_asignacion -> ASIGNACIONDISMINUIDA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',67), + ('comparacion -> valores comparador valores','comparacion',3,'p_comparacion','sintactico.py',70), + ('comparacion -> comparacion comparador valores','comparacion',3,'p_comparacion','sintactico.py',71), + ('comparador -> MENORQUE','comparador',1,'p_comparador','sintactico.py',74), + ('comparador -> MAYORQUE','comparador',1,'p_comparador','sintactico.py',75), + ('comparador -> IGUALQUE','comparador',1,'p_comparador','sintactico.py',76), + ('comparador -> DIFERENTEQUE','comparador',1,'p_comparador','sintactico.py',77), + ('mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa','mapa',9,'p_mapa','sintactico.py',81), + ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN','mapaFunciones',5,'p_mapa_funciones','sintactico.py',84), + ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN','mapaFunciones',6,'p_mapa_funciones','sintactico.py',85), + ('creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA','creacionMapa',3,'p_creacion_mapa','sintactico.py',88), + ('creacionMapa -> VARIABLE','creacionMapa',1,'p_creacion_mapa','sintactico.py',89), + ('paresClaveValor -> valores DOSPUNTOS valores','paresClaveValor',3,'p_pares_clave_valor','sintactico.py',92), + ('paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores','paresClaveValor',5,'p_pares_clave_valor','sintactico.py',93), + ('valores -> NUMERO','valores',1,'p_valores','sintactico.py',96), + ('valores -> CADENA','valores',1,'p_valores','sintactico.py',97), + ('valores -> booleano','valores',1,'p_valores','sintactico.py',98), + ('valores -> VARIABLE','valores',1,'p_valores','sintactico.py',99), + ('booleano -> TRUE','booleano',1,'p_booleano','sintactico.py',102), + ('booleano -> FALSE','booleano',1,'p_booleano','sintactico.py',103), + ('tipoDato -> STRING','tipoDato',1,'p_tipo_dato','sintactico.py',106), + ('tipoDato -> INT','tipoDato',1,'p_tipo_dato','sintactico.py',107), + ('tipoDato -> BOOL','tipoDato',1,'p_tipo_dato','sintactico.py',108), + ('tipoDato -> DOUBLE','tipoDato',1,'p_tipo_dato','sintactico.py',109), + ('tipoDato -> DYNAMIC','tipoDato',1,'p_tipo_dato','sintactico.py',110), + ('tipoDato -> VAR','tipoDato',1,'p_tipo_dato','sintactico.py',111), ] diff --git a/sintactico.py b/sintactico.py index da720c3..3c24b9e 100644 --- a/sintactico.py +++ b/sintactico.py @@ -10,42 +10,41 @@ #Funciones(Faltan las arrow functions) #Parte de Miguel -def p_bloque_codigo(p): - '''bloque : expresion - | bloque expresion - | empty - | estructuras - | bloque estructuras - ''' -####AQUI AÑADI ESTRUCTURAS PARA HACER PRUEBAS ^ <------------- +# def p_bloque_codigo(p): +# '''bloque : expresion +# | bloque expresion +# | empty +# | estructuras +# | bloque estructuras +# ''' +# ####AQUI AÑADI ESTRUCTURAS PARA HACER PRUEBAS ^ <------------- -def p_funciones(p): - '''funcion : tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA - | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA - | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA''' +# def p_funciones(p): +# '''funcion : tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA +# | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA +# | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA''' -def p_parametros(p): - '''parametros : tipoDato VARIABLE - | parametros COMA tipoDato VARIABLE - | empty''' +# def p_parametros(p): +# '''parametros : tipoDato VARIABLE +# | parametros COMA tipoDato VARIABLE +# | empty''' -def p_expresion(p): - '''expresion : mapa PUNTOCOMA - | mapaFunciones PUNTOCOMA - | asignacion PUNTOCOMA''' +# def p_expresion(p): +# '''expresion : mapa PUNTOCOMA +# | mapaFunciones PUNTOCOMA +# | asignacion PUNTOCOMA''' -def p_import(p): - '''import : IMPORT CADENA PUNTOCOMA''' +# def p_import(p): +# '''import : IMPORT CADENA PUNTOCOMA''' def p_asignacion(p): '''asignacion : VARIABLE operadores_asignacion valores | tipoDato VARIABLE IGUAL valores | BOOL VARIABLE IGUAL comparacion - | tipoDato VARIABLE IGUAL operacion_aritmetica - | empty''' + | tipoDato VARIABLE IGUAL operacion_aritmetica''' #EN ^ ESTA REGLAS ELIMINÉ LO SIGUIENTE PORQUE DABA PROBLEMAS: VARIABLE IGUAL comparacion , VARIABLE operadores_asignacion operacion_aritmetica @@ -54,7 +53,6 @@ def p_operacion_aritmetica(p): | operacion_aritmetica operadores_aritmeticos valores''' - def p_operadores_aritmeticos(p): '''operadores_aritmeticos : SUMA | RESTA @@ -80,13 +78,10 @@ def p_comparador(p): def p_mapa(p): - '''mapa : MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - | mapaFunciones''' + '''mapa : MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa''' def p_mapa_funciones(p): - '''mapaFunciones : mapa PUNTO VARIABLE LPAREN RPAREN - | mapa PUNTO VARIABLE LPAREN valores - | VARIABLE PUNTO VARIABLE LPAREN RPAREN + '''mapaFunciones : VARIABLE PUNTO VARIABLE LPAREN RPAREN | VARIABLE PUNTO VARIABLE LPAREN valores RPAREN''' def p_creacion_mapa(p): @@ -98,10 +93,10 @@ def p_pares_clave_valor(p): | paresClaveValor COMA valores DOSPUNTOS valores''' def p_valores(p): - '''valores : VARIABLE - | NUMERO + '''valores : NUMERO | CADENA - | booleano ''' + | booleano + | VARIABLE ''' def p_booleano(p): '''booleano : TRUE @@ -118,54 +113,52 @@ def p_tipo_dato(p): #Estructuras if, for y while #If -def p_estructuras(p): - ''' estructuras : estructuraIf - | estructuraWhile - | estructuraFor''' - -def p_estructuraIf(p): - ''' estructuraIf : IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - | IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA - | estructuraIfElse - ''' - -def p_estructuraIfElse(p): - ''' estructuraIfElse : estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA - | estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA - ''' - -def p_estructuraWhile(p): - ''' estructuraWhile : WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA - ''' - - -def p_estructuraFor(p): - ''' estructuraFor : FOR LPAREN asignacionVacio PUNTOCOMA comparacionVacio PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA''' - -def p_asignacionVacio(p): - ''' asignacionVacio : asignacion - | empty''' - -def p_comparacionVacio(p): - ''' comparacionVacio : comparacion - | booleano - | empty''' - - -def p_aumento(p): - ''' aumento : VARIABLE IGUAL operacion_aritmetica - | VARIABLE operadores_asignacion NUMERO - | VARIABLE operadores_asignacion VARIABLE - | empty ''' - -def p_argumentoEstructura(p): - ''' argumentoEstructura : VARIABLE - | booleano - | comparacion - ''' - -def p_empty(p): - 'empty :' +# def p_estructuras(p): +# ''' estructuras : estructuraIf +# | estructuraWhile +# | estructuraFor''' + +# def p_estructuraIf(p): +# ''' estructuraIf : IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA +# | IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA +# | estructuraIfElse +# ''' + +# def p_estructuraIfElse(p): +# ''' estructuraIfElse : estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA +# | estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA +# ''' + +# def p_estructuraWhile(p): +# ''' estructuraWhile : WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA +# ''' + + +# def p_estructuraFor(p): +# ''' estructuraFor : FOR LPAREN asignacion PUNTOCOMA comparacion PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA''' + +# def p_asignacionVacio(p): +# ''' asignacionVacio : asignacion +# | empty''' + +# def p_comparacionVacio(p): +# ''' comparacionVacio : comparacion +# | booleano''' + + +# def p_aumento(p): +# ''' aumento : VARIABLE IGUAL operacion_aritmetica +# | VARIABLE operadores_asignacion NUMERO +# | VARIABLE operadores_asignacion VARIABLE''' + +# def p_argumentoEstructura(p): +# ''' argumentoEstructura : VARIABLE +# | booleano +# | comparacion +# ''' + +# def p_empty(p): +# 'empty :' # Error rule for syntax errors def p_error(p): print("Syntax error in input!") From 00302bbcbdd4444ffef1146fea75f568a8ad6503 Mon Sep 17 00:00:00 2001 From: Miguel Licea <66740053+miglcesp01@users.noreply.github.com> Date: Fri, 19 Nov 2021 12:06:44 -0500 Subject: [PATCH 2/2] Arreglo de estructuras --- Terminado.txt | 9 + parser.out | 1919 ++++++++++++++++++++++++++++++++++++------------- parsetab.py | 117 +-- sintactico.py | 119 +-- 4 files changed, 1557 insertions(+), 607 deletions(-) diff --git a/Terminado.txt b/Terminado.txt index 6f2f23a..d7681bd 100644 --- a/Terminado.txt +++ b/Terminado.txt @@ -6,6 +6,15 @@ Trabajo terminado > operadores_asignacion : =,+=,-= > operadores_aritmeticos : Operadores para operaciones aritmeticas > operacion_aritmetica : Operaciones +> asignacion : Darle valor a una variable +> import : Importar libreria +> funcion : Definicion de funciones +> parametros : Parametros para las funciones +> expresion : Una sentencia terminada con punto y coma +> bloque : Conjunto de sentencias +> estructuraIf : if +> estructuraIfElse : if else +> estructura While : while #Estructura de Dato Mapa diff --git a/parser.out b/parser.out index bd8c87d..1f9682c 100644 --- a/parser.out +++ b/parser.out @@ -8,13 +8,9 @@ Unused terminals: CORCHETEABRE CORCHETECIERRA DO - ELSE EXPORT FINAL FLECHA - FOR - IF - IMPORT IN IS LIST @@ -22,768 +18,1671 @@ Unused terminals: NOT NULL PRINT - PUNTOCOMA REQUIRED - RETURN SET SUPER THIS - VOID - WHILE Grammar -Rule 0 S' -> asignacion -Rule 1 asignacion -> VARIABLE operadores_asignacion valores -Rule 2 asignacion -> tipoDato VARIABLE IGUAL valores -Rule 3 asignacion -> BOOL VARIABLE IGUAL comparacion -Rule 4 asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica -Rule 5 operacion_aritmetica -> valores operadores_aritmeticos valores -Rule 6 operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores -Rule 7 operadores_aritmeticos -> SUMA -Rule 8 operadores_aritmeticos -> RESTA -Rule 9 operadores_aritmeticos -> MULTIPLICACION -Rule 10 operadores_aritmeticos -> DIVISION -Rule 11 operadores_aritmeticos -> DIVENTERA -Rule 12 operadores_aritmeticos -> RESIDUO -Rule 13 operadores_asignacion -> IGUAL -Rule 14 operadores_asignacion -> ASIGNACIONAUMENTADA -Rule 15 operadores_asignacion -> ASIGNACIONDISMINUIDA -Rule 16 comparacion -> valores comparador valores -Rule 17 comparacion -> comparacion comparador valores -Rule 18 comparador -> MENORQUE -Rule 19 comparador -> MAYORQUE -Rule 20 comparador -> IGUALQUE -Rule 21 comparador -> DIFERENTEQUE -Rule 22 mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa -Rule 23 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN -Rule 24 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN -Rule 25 creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA -Rule 26 creacionMapa -> VARIABLE -Rule 27 paresClaveValor -> valores DOSPUNTOS valores -Rule 28 paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores -Rule 29 valores -> NUMERO -Rule 30 valores -> CADENA -Rule 31 valores -> booleano -Rule 32 valores -> VARIABLE -Rule 33 booleano -> TRUE -Rule 34 booleano -> FALSE -Rule 35 tipoDato -> STRING -Rule 36 tipoDato -> INT -Rule 37 tipoDato -> BOOL -Rule 38 tipoDato -> DOUBLE -Rule 39 tipoDato -> DYNAMIC -Rule 40 tipoDato -> VAR +Rule 0 S' -> funcion +Rule 1 funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA +Rule 2 funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA +Rule 3 funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA +Rule 4 estructuras -> estructuraFor +Rule 5 estructuras -> estructuraWhile +Rule 6 estructuras -> estructuraIf +Rule 7 estructuraFor -> FOR LPAREN asignacion PUNTOCOMA comparacion PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA +Rule 8 estructuraFor -> estructuraWhile +Rule 9 aumento -> VARIABLE IGUAL operacion_aritmetica +Rule 10 aumento -> VARIABLE operadores_asignacion valores +Rule 11 estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA +Rule 12 estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA +Rule 13 estructuraIf -> estructuraIfElse +Rule 14 estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA +Rule 15 argumentoEstructura -> VARIABLE +Rule 16 argumentoEstructura -> booleano +Rule 17 argumentoEstructura -> comparacion +Rule 18 bloque -> expresiones +Rule 19 bloque -> bloque expresiones +Rule 20 expresiones -> asignacion PUNTOCOMA +Rule 21 expresiones -> mapa PUNTOCOMA +Rule 22 expresiones -> mapaFunciones PUNTOCOMA +Rule 23 parametros -> parametros COMA tipoDato VARIABLE +Rule 24 parametros -> tipoDato VARIABLE +Rule 25 parametros -> empty +Rule 26 import -> IMPORT CADENA PUNTOCOMA +Rule 27 asignacion -> VARIABLE IGUAL valores +Rule 28 asignacion -> tipoDato VARIABLE IGUAL valores +Rule 29 asignacion -> VARIABLE IGUAL comparacion +Rule 30 asignacion -> BOOL VARIABLE IGUAL comparacion +Rule 31 asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica +Rule 32 asignacion -> VARIABLE IGUAL operacion_aritmetica +Rule 33 operadores_asignacion -> IGUAL +Rule 34 operadores_asignacion -> ASIGNACIONAUMENTADA +Rule 35 operadores_asignacion -> ASIGNACIONDISMINUIDA +Rule 36 operacion_aritmetica -> valores operadores_aritmeticos valores +Rule 37 operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores +Rule 38 operadores_aritmeticos -> SUMA +Rule 39 operadores_aritmeticos -> RESTA +Rule 40 operadores_aritmeticos -> MULTIPLICACION +Rule 41 operadores_aritmeticos -> DIVISION +Rule 42 operadores_aritmeticos -> DIVENTERA +Rule 43 operadores_aritmeticos -> RESIDUO +Rule 44 comparacion -> valores comparador valores +Rule 45 comparacion -> comparacion comparador valores +Rule 46 comparador -> MENORQUE +Rule 47 comparador -> MAYORQUE +Rule 48 comparador -> IGUALQUE +Rule 49 comparador -> DIFERENTEQUE +Rule 50 mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa +Rule 51 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN +Rule 52 mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN +Rule 53 creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA +Rule 54 creacionMapa -> VARIABLE +Rule 55 paresClaveValor -> valores DOSPUNTOS valores +Rule 56 paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores +Rule 57 valores -> NUMERO +Rule 58 valores -> CADENA +Rule 59 valores -> booleano +Rule 60 valores -> VARIABLE +Rule 61 booleano -> TRUE +Rule 62 booleano -> FALSE +Rule 63 tipoDato -> STRING +Rule 64 tipoDato -> INT +Rule 65 tipoDato -> BOOL +Rule 66 tipoDato -> DOUBLE +Rule 67 tipoDato -> DYNAMIC +Rule 68 tipoDato -> VAR +Rule 69 empty -> Terminals, with rules where they appear ADD : -ASIGNACIONAUMENTADA : 14 -ASIGNACIONDISMINUIDA : 15 -BOOL : 3 37 -CADENA : 30 -COMA : 22 28 +ASIGNACIONAUMENTADA : 34 +ASIGNACIONDISMINUIDA : 35 +BOOL : 30 65 +CADENA : 26 58 +COMA : 23 50 56 COMILLASDOBLES : COMILLASSIMPLES : CORCHETEABRE : CORCHETECIERRA : -DIFERENTEQUE : 21 -DIVENTERA : 11 -DIVISION : 10 +DIFERENTEQUE : 49 +DIVENTERA : 42 +DIVISION : 41 DO : -DOSPUNTOS : 27 28 -DOUBLE : 38 -DYNAMIC : 39 -ELSE : +DOSPUNTOS : 55 56 +DOUBLE : 66 +DYNAMIC : 67 +ELSE : 14 EXPORT : -FALSE : 34 +FALSE : 62 FINAL : FLECHA : -FOR : -IF : -IGUAL : 2 3 4 13 22 -IGUALQUE : 20 -IMPORT : +FOR : 7 +IF : 12 +IGUAL : 9 27 28 29 30 31 32 33 50 +IGUALQUE : 48 +IMPORT : 26 IN : -INT : 36 +INT : 64 IS : LIST : -LLAVEABRE : 25 -LLAVECIERRA : 25 -LPAREN : 23 24 -MAP : 22 -MAYORQUE : 19 22 -MENORQUE : 18 22 -MULTIPLICACION : 9 +LLAVEABRE : 1 2 3 7 11 12 14 53 +LLAVECIERRA : 1 2 3 7 11 12 14 53 +LPAREN : 1 2 3 7 11 12 51 52 +MAP : 50 +MAYORQUE : 47 50 +MENORQUE : 46 50 +MULTIPLICACION : 40 NEW : NOT : NULL : -NUMERO : 29 +NUMERO : 57 PRINT : -PUNTO : 23 24 -PUNTOCOMA : +PUNTO : 51 52 +PUNTOCOMA : 1 3 7 7 20 21 22 26 REQUIRED : -RESIDUO : 12 -RESTA : 8 -RETURN : -RPAREN : 23 24 +RESIDUO : 43 +RESTA : 39 +RETURN : 1 3 +RPAREN : 1 2 3 7 11 12 51 52 SET : -STRING : 35 -SUMA : 7 +STRING : 63 +SUMA : 38 SUPER : THIS : -TRUE : 33 -VAR : 40 -VARIABLE : 1 2 3 4 22 23 23 24 24 26 32 -VOID : -WHILE : +TRUE : 61 +VAR : 68 +VARIABLE : 1 2 3 9 10 15 23 24 27 28 29 30 31 32 50 51 51 52 52 54 60 +VOID : 2 3 +WHILE : 11 error : Nonterminals, with rules where they appear -asignacion : 0 -booleano : 31 -comparacion : 3 17 -comparador : 16 17 -creacionMapa : 22 -mapa : -mapaFunciones : -operacion_aritmetica : 4 6 -operadores_aritmeticos : 5 6 -operadores_asignacion : 1 -paresClaveValor : 25 28 -tipoDato : 2 4 22 22 -valores : 1 2 5 5 6 16 16 17 24 27 27 28 28 +argumentoEstructura : 11 12 +asignacion : 7 20 +aumento : 7 +bloque : 1 2 3 7 11 12 14 19 +booleano : 16 59 +comparacion : 7 17 29 30 45 +comparador : 44 45 +creacionMapa : 50 +empty : 25 +estructuraFor : 4 +estructuraIf : 6 14 +estructuraIfElse : 13 +estructuraWhile : 5 8 +estructuras : +expresiones : 18 19 +funcion : 0 +import : +mapa : 21 +mapaFunciones : 22 +operacion_aritmetica : 9 31 32 37 +operadores_aritmeticos : 36 37 +operadores_asignacion : 10 +parametros : 1 2 3 23 +paresClaveValor : 53 56 +tipoDato : 1 23 24 28 31 50 50 +valores : 1 10 27 28 36 36 37 44 44 45 52 55 55 56 56 Parsing method: LALR state 0 - (0) S' -> . asignacion - (1) asignacion -> . VARIABLE operadores_asignacion valores - (2) asignacion -> . tipoDato VARIABLE IGUAL valores - (3) asignacion -> . BOOL VARIABLE IGUAL comparacion - (4) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica - (35) tipoDato -> . STRING - (36) tipoDato -> . INT - (37) tipoDato -> . BOOL - (38) tipoDato -> . DOUBLE - (39) tipoDato -> . DYNAMIC - (40) tipoDato -> . VAR - - VARIABLE shift and go to state 2 - BOOL shift and go to state 4 - STRING shift and go to state 5 - INT shift and go to state 6 + (0) S' -> . funcion + (1) funcion -> . tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA + (2) funcion -> . VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA + (3) funcion -> . VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + VOID shift and go to state 3 + STRING shift and go to state 4 + INT shift and go to state 5 + BOOL shift and go to state 6 DOUBLE shift and go to state 7 DYNAMIC shift and go to state 8 VAR shift and go to state 9 - asignacion shift and go to state 1 - tipoDato shift and go to state 3 + funcion shift and go to state 1 + tipoDato shift and go to state 2 state 1 - (0) S' -> asignacion . + (0) S' -> funcion . state 2 - (1) asignacion -> VARIABLE . operadores_asignacion valores - (13) operadores_asignacion -> . IGUAL - (14) operadores_asignacion -> . ASIGNACIONAUMENTADA - (15) operadores_asignacion -> . ASIGNACIONDISMINUIDA + (1) funcion -> tipoDato . VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA - IGUAL shift and go to state 11 - ASIGNACIONAUMENTADA shift and go to state 12 - ASIGNACIONDISMINUIDA shift and go to state 13 + VARIABLE shift and go to state 10 - operadores_asignacion shift and go to state 10 state 3 - (2) asignacion -> tipoDato . VARIABLE IGUAL valores - (4) asignacion -> tipoDato . VARIABLE IGUAL operacion_aritmetica + (2) funcion -> VOID . VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA + (3) funcion -> VOID . VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA - VARIABLE shift and go to state 14 + VARIABLE shift and go to state 11 state 4 - (3) asignacion -> BOOL . VARIABLE IGUAL comparacion - (37) tipoDato -> BOOL . + (63) tipoDato -> STRING . - ! shift/reduce conflict for VARIABLE resolved as shift - VARIABLE shift and go to state 15 - - ! VARIABLE [ reduce using rule 37 (tipoDato -> BOOL .) ] + VARIABLE reduce using rule 63 (tipoDato -> STRING .) + COMA reduce using rule 63 (tipoDato -> STRING .) + MAYORQUE reduce using rule 63 (tipoDato -> STRING .) state 5 - (35) tipoDato -> STRING . + (64) tipoDato -> INT . - VARIABLE reduce using rule 35 (tipoDato -> STRING .) + VARIABLE reduce using rule 64 (tipoDato -> INT .) + COMA reduce using rule 64 (tipoDato -> INT .) + MAYORQUE reduce using rule 64 (tipoDato -> INT .) state 6 - (36) tipoDato -> INT . + (65) tipoDato -> BOOL . - VARIABLE reduce using rule 36 (tipoDato -> INT .) + VARIABLE reduce using rule 65 (tipoDato -> BOOL .) + COMA reduce using rule 65 (tipoDato -> BOOL .) + MAYORQUE reduce using rule 65 (tipoDato -> BOOL .) state 7 - (38) tipoDato -> DOUBLE . + (66) tipoDato -> DOUBLE . - VARIABLE reduce using rule 38 (tipoDato -> DOUBLE .) + VARIABLE reduce using rule 66 (tipoDato -> DOUBLE .) + COMA reduce using rule 66 (tipoDato -> DOUBLE .) + MAYORQUE reduce using rule 66 (tipoDato -> DOUBLE .) state 8 - (39) tipoDato -> DYNAMIC . + (67) tipoDato -> DYNAMIC . - VARIABLE reduce using rule 39 (tipoDato -> DYNAMIC .) + VARIABLE reduce using rule 67 (tipoDato -> DYNAMIC .) + COMA reduce using rule 67 (tipoDato -> DYNAMIC .) + MAYORQUE reduce using rule 67 (tipoDato -> DYNAMIC .) state 9 - (40) tipoDato -> VAR . + (68) tipoDato -> VAR . - VARIABLE reduce using rule 40 (tipoDato -> VAR .) + VARIABLE reduce using rule 68 (tipoDato -> VAR .) + COMA reduce using rule 68 (tipoDato -> VAR .) + MAYORQUE reduce using rule 68 (tipoDato -> VAR .) state 10 - (1) asignacion -> VARIABLE operadores_asignacion . valores - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (33) booleano -> . TRUE - (34) booleano -> . FALSE + (1) funcion -> tipoDato VARIABLE . LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 + LPAREN shift and go to state 12 - valores shift and go to state 17 - booleano shift and go to state 20 state 11 - (13) operadores_asignacion -> IGUAL . + (2) funcion -> VOID VARIABLE . LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA + (3) funcion -> VOID VARIABLE . LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA - NUMERO reduce using rule 13 (operadores_asignacion -> IGUAL .) - CADENA reduce using rule 13 (operadores_asignacion -> IGUAL .) - VARIABLE reduce using rule 13 (operadores_asignacion -> IGUAL .) - TRUE reduce using rule 13 (operadores_asignacion -> IGUAL .) - FALSE reduce using rule 13 (operadores_asignacion -> IGUAL .) + LPAREN shift and go to state 13 state 12 - (14) operadores_asignacion -> ASIGNACIONAUMENTADA . - - NUMERO reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - CADENA reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - VARIABLE reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - TRUE reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) - FALSE reduce using rule 14 (operadores_asignacion -> ASIGNACIONAUMENTADA .) + (1) funcion -> tipoDato VARIABLE LPAREN . parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA + (23) parametros -> . parametros COMA tipoDato VARIABLE + (24) parametros -> . tipoDato VARIABLE + (25) parametros -> . empty + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + (69) empty -> . + + STRING shift and go to state 4 + INT shift and go to state 5 + BOOL shift and go to state 6 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + RPAREN reduce using rule 69 (empty -> .) + COMA reduce using rule 69 (empty -> .) + tipoDato shift and go to state 14 + parametros shift and go to state 15 + empty shift and go to state 16 state 13 - (15) operadores_asignacion -> ASIGNACIONDISMINUIDA . - - NUMERO reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - CADENA reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - VARIABLE reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - TRUE reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) - FALSE reduce using rule 15 (operadores_asignacion -> ASIGNACIONDISMINUIDA .) + (2) funcion -> VOID VARIABLE LPAREN . parametros RPAREN LLAVEABRE bloque LLAVECIERRA + (3) funcion -> VOID VARIABLE LPAREN . parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA + (23) parametros -> . parametros COMA tipoDato VARIABLE + (24) parametros -> . tipoDato VARIABLE + (25) parametros -> . empty + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + (69) empty -> . + + STRING shift and go to state 4 + INT shift and go to state 5 + BOOL shift and go to state 6 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + RPAREN reduce using rule 69 (empty -> .) + COMA reduce using rule 69 (empty -> .) + parametros shift and go to state 17 + tipoDato shift and go to state 14 + empty shift and go to state 16 state 14 - (2) asignacion -> tipoDato VARIABLE . IGUAL valores - (4) asignacion -> tipoDato VARIABLE . IGUAL operacion_aritmetica + (24) parametros -> tipoDato . VARIABLE - IGUAL shift and go to state 23 + VARIABLE shift and go to state 18 state 15 - (3) asignacion -> BOOL VARIABLE . IGUAL comparacion + (1) funcion -> tipoDato VARIABLE LPAREN parametros . RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA + (23) parametros -> parametros . COMA tipoDato VARIABLE - IGUAL shift and go to state 24 + RPAREN shift and go to state 19 + COMA shift and go to state 20 state 16 - (32) valores -> VARIABLE . + (25) parametros -> empty . - $end reduce using rule 32 (valores -> VARIABLE .) - SUMA reduce using rule 32 (valores -> VARIABLE .) - RESTA reduce using rule 32 (valores -> VARIABLE .) - MULTIPLICACION reduce using rule 32 (valores -> VARIABLE .) - DIVISION reduce using rule 32 (valores -> VARIABLE .) - DIVENTERA reduce using rule 32 (valores -> VARIABLE .) - RESIDUO reduce using rule 32 (valores -> VARIABLE .) - MENORQUE reduce using rule 32 (valores -> VARIABLE .) - MAYORQUE reduce using rule 32 (valores -> VARIABLE .) - IGUALQUE reduce using rule 32 (valores -> VARIABLE .) - DIFERENTEQUE reduce using rule 32 (valores -> VARIABLE .) + RPAREN reduce using rule 25 (parametros -> empty .) + COMA reduce using rule 25 (parametros -> empty .) state 17 - (1) asignacion -> VARIABLE operadores_asignacion valores . + (2) funcion -> VOID VARIABLE LPAREN parametros . RPAREN LLAVEABRE bloque LLAVECIERRA + (3) funcion -> VOID VARIABLE LPAREN parametros . RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA + (23) parametros -> parametros . COMA tipoDato VARIABLE - $end reduce using rule 1 (asignacion -> VARIABLE operadores_asignacion valores .) + RPAREN shift and go to state 21 + COMA shift and go to state 20 state 18 - (29) valores -> NUMERO . + (24) parametros -> tipoDato VARIABLE . - $end reduce using rule 29 (valores -> NUMERO .) - SUMA reduce using rule 29 (valores -> NUMERO .) - RESTA reduce using rule 29 (valores -> NUMERO .) - MULTIPLICACION reduce using rule 29 (valores -> NUMERO .) - DIVISION reduce using rule 29 (valores -> NUMERO .) - DIVENTERA reduce using rule 29 (valores -> NUMERO .) - RESIDUO reduce using rule 29 (valores -> NUMERO .) - MENORQUE reduce using rule 29 (valores -> NUMERO .) - MAYORQUE reduce using rule 29 (valores -> NUMERO .) - IGUALQUE reduce using rule 29 (valores -> NUMERO .) - DIFERENTEQUE reduce using rule 29 (valores -> NUMERO .) + RPAREN reduce using rule 24 (parametros -> tipoDato VARIABLE .) + COMA reduce using rule 24 (parametros -> tipoDato VARIABLE .) state 19 - (30) valores -> CADENA . + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN . LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA - $end reduce using rule 30 (valores -> CADENA .) - SUMA reduce using rule 30 (valores -> CADENA .) - RESTA reduce using rule 30 (valores -> CADENA .) - MULTIPLICACION reduce using rule 30 (valores -> CADENA .) - DIVISION reduce using rule 30 (valores -> CADENA .) - DIVENTERA reduce using rule 30 (valores -> CADENA .) - RESIDUO reduce using rule 30 (valores -> CADENA .) - MENORQUE reduce using rule 30 (valores -> CADENA .) - MAYORQUE reduce using rule 30 (valores -> CADENA .) - IGUALQUE reduce using rule 30 (valores -> CADENA .) - DIFERENTEQUE reduce using rule 30 (valores -> CADENA .) + LLAVEABRE shift and go to state 22 state 20 - (31) valores -> booleano . - - $end reduce using rule 31 (valores -> booleano .) - SUMA reduce using rule 31 (valores -> booleano .) - RESTA reduce using rule 31 (valores -> booleano .) - MULTIPLICACION reduce using rule 31 (valores -> booleano .) - DIVISION reduce using rule 31 (valores -> booleano .) - DIVENTERA reduce using rule 31 (valores -> booleano .) - RESIDUO reduce using rule 31 (valores -> booleano .) - MENORQUE reduce using rule 31 (valores -> booleano .) - MAYORQUE reduce using rule 31 (valores -> booleano .) - IGUALQUE reduce using rule 31 (valores -> booleano .) - DIFERENTEQUE reduce using rule 31 (valores -> booleano .) + (23) parametros -> parametros COMA . tipoDato VARIABLE + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + STRING shift and go to state 4 + INT shift and go to state 5 + BOOL shift and go to state 6 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + tipoDato shift and go to state 23 state 21 - (33) booleano -> TRUE . + (2) funcion -> VOID VARIABLE LPAREN parametros RPAREN . LLAVEABRE bloque LLAVECIERRA + (3) funcion -> VOID VARIABLE LPAREN parametros RPAREN . LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA - $end reduce using rule 33 (booleano -> TRUE .) - SUMA reduce using rule 33 (booleano -> TRUE .) - RESTA reduce using rule 33 (booleano -> TRUE .) - MULTIPLICACION reduce using rule 33 (booleano -> TRUE .) - DIVISION reduce using rule 33 (booleano -> TRUE .) - DIVENTERA reduce using rule 33 (booleano -> TRUE .) - RESIDUO reduce using rule 33 (booleano -> TRUE .) - MENORQUE reduce using rule 33 (booleano -> TRUE .) - MAYORQUE reduce using rule 33 (booleano -> TRUE .) - IGUALQUE reduce using rule 33 (booleano -> TRUE .) - DIFERENTEQUE reduce using rule 33 (booleano -> TRUE .) + LLAVEABRE shift and go to state 24 state 22 - (34) booleano -> FALSE . - - $end reduce using rule 34 (booleano -> FALSE .) - SUMA reduce using rule 34 (booleano -> FALSE .) - RESTA reduce using rule 34 (booleano -> FALSE .) - MULTIPLICACION reduce using rule 34 (booleano -> FALSE .) - DIVISION reduce using rule 34 (booleano -> FALSE .) - DIVENTERA reduce using rule 34 (booleano -> FALSE .) - RESIDUO reduce using rule 34 (booleano -> FALSE .) - MENORQUE reduce using rule 34 (booleano -> FALSE .) - MAYORQUE reduce using rule 34 (booleano -> FALSE .) - IGUALQUE reduce using rule 34 (booleano -> FALSE .) - DIFERENTEQUE reduce using rule 34 (booleano -> FALSE .) + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE . bloque RETURN valores PUNTOCOMA LLAVECIERRA + (18) bloque -> . expresiones + (19) bloque -> . bloque expresiones + (20) expresiones -> . asignacion PUNTOCOMA + (21) expresiones -> . mapa PUNTOCOMA + (22) expresiones -> . mapaFunciones PUNTOCOMA + (27) asignacion -> . VARIABLE IGUAL valores + (28) asignacion -> . tipoDato VARIABLE IGUAL valores + (29) asignacion -> . VARIABLE IGUAL comparacion + (30) asignacion -> . BOOL VARIABLE IGUAL comparacion + (31) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica + (32) asignacion -> . VARIABLE IGUAL operacion_aritmetica + (50) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (51) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN + (52) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + VARIABLE shift and go to state 26 + BOOL shift and go to state 32 + MAP shift and go to state 33 + STRING shift and go to state 4 + INT shift and go to state 5 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + tipoDato shift and go to state 25 + bloque shift and go to state 27 + expresiones shift and go to state 28 + asignacion shift and go to state 29 + mapa shift and go to state 30 + mapaFunciones shift and go to state 31 state 23 - (2) asignacion -> tipoDato VARIABLE IGUAL . valores - (4) asignacion -> tipoDato VARIABLE IGUAL . operacion_aritmetica - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (5) operacion_aritmetica -> . valores operadores_aritmeticos valores - (6) operacion_aritmetica -> . operacion_aritmetica operadores_aritmeticos valores - (33) booleano -> . TRUE - (34) booleano -> . FALSE - - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 - - valores shift and go to state 25 - operacion_aritmetica shift and go to state 26 - booleano shift and go to state 20 + (23) parametros -> parametros COMA tipoDato . VARIABLE + + VARIABLE shift and go to state 34 + state 24 - (3) asignacion -> BOOL VARIABLE IGUAL . comparacion - (16) comparacion -> . valores comparador valores - (17) comparacion -> . comparacion comparador valores - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (33) booleano -> . TRUE - (34) booleano -> . FALSE - - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 - - comparacion shift and go to state 27 - valores shift and go to state 28 - booleano shift and go to state 20 + (2) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE . bloque LLAVECIERRA + (3) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE . bloque RETURN PUNTOCOMA LLAVECIERRA + (18) bloque -> . expresiones + (19) bloque -> . bloque expresiones + (20) expresiones -> . asignacion PUNTOCOMA + (21) expresiones -> . mapa PUNTOCOMA + (22) expresiones -> . mapaFunciones PUNTOCOMA + (27) asignacion -> . VARIABLE IGUAL valores + (28) asignacion -> . tipoDato VARIABLE IGUAL valores + (29) asignacion -> . VARIABLE IGUAL comparacion + (30) asignacion -> . BOOL VARIABLE IGUAL comparacion + (31) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica + (32) asignacion -> . VARIABLE IGUAL operacion_aritmetica + (50) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (51) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN + (52) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + VARIABLE shift and go to state 26 + BOOL shift and go to state 32 + MAP shift and go to state 33 + STRING shift and go to state 4 + INT shift and go to state 5 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + + bloque shift and go to state 35 + expresiones shift and go to state 28 + asignacion shift and go to state 29 + mapa shift and go to state 30 + mapaFunciones shift and go to state 31 + tipoDato shift and go to state 25 state 25 - (2) asignacion -> tipoDato VARIABLE IGUAL valores . - (5) operacion_aritmetica -> valores . operadores_aritmeticos valores - (7) operadores_aritmeticos -> . SUMA - (8) operadores_aritmeticos -> . RESTA - (9) operadores_aritmeticos -> . MULTIPLICACION - (10) operadores_aritmeticos -> . DIVISION - (11) operadores_aritmeticos -> . DIVENTERA - (12) operadores_aritmeticos -> . RESIDUO - - $end reduce using rule 2 (asignacion -> tipoDato VARIABLE IGUAL valores .) - SUMA shift and go to state 30 - RESTA shift and go to state 31 - MULTIPLICACION shift and go to state 32 - DIVISION shift and go to state 33 - DIVENTERA shift and go to state 34 - RESIDUO shift and go to state 35 - - operadores_aritmeticos shift and go to state 29 + (28) asignacion -> tipoDato . VARIABLE IGUAL valores + (31) asignacion -> tipoDato . VARIABLE IGUAL operacion_aritmetica + + VARIABLE shift and go to state 36 + state 26 - (4) asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica . - (6) operacion_aritmetica -> operacion_aritmetica . operadores_aritmeticos valores - (7) operadores_aritmeticos -> . SUMA - (8) operadores_aritmeticos -> . RESTA - (9) operadores_aritmeticos -> . MULTIPLICACION - (10) operadores_aritmeticos -> . DIVISION - (11) operadores_aritmeticos -> . DIVENTERA - (12) operadores_aritmeticos -> . RESIDUO - - $end reduce using rule 4 (asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica .) - SUMA shift and go to state 30 - RESTA shift and go to state 31 - MULTIPLICACION shift and go to state 32 - DIVISION shift and go to state 33 - DIVENTERA shift and go to state 34 - RESIDUO shift and go to state 35 - - operadores_aritmeticos shift and go to state 36 + (27) asignacion -> VARIABLE . IGUAL valores + (29) asignacion -> VARIABLE . IGUAL comparacion + (32) asignacion -> VARIABLE . IGUAL operacion_aritmetica + (51) mapaFunciones -> VARIABLE . PUNTO VARIABLE LPAREN RPAREN + (52) mapaFunciones -> VARIABLE . PUNTO VARIABLE LPAREN valores RPAREN -state 27 + IGUAL shift and go to state 37 + PUNTO shift and go to state 38 - (3) asignacion -> BOOL VARIABLE IGUAL comparacion . - (17) comparacion -> comparacion . comparador valores - (18) comparador -> . MENORQUE - (19) comparador -> . MAYORQUE - (20) comparador -> . IGUALQUE - (21) comparador -> . DIFERENTEQUE - $end reduce using rule 3 (asignacion -> BOOL VARIABLE IGUAL comparacion .) - MENORQUE shift and go to state 38 - MAYORQUE shift and go to state 39 - IGUALQUE shift and go to state 40 - DIFERENTEQUE shift and go to state 41 +state 27 + + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque . RETURN valores PUNTOCOMA LLAVECIERRA + (19) bloque -> bloque . expresiones + (20) expresiones -> . asignacion PUNTOCOMA + (21) expresiones -> . mapa PUNTOCOMA + (22) expresiones -> . mapaFunciones PUNTOCOMA + (27) asignacion -> . VARIABLE IGUAL valores + (28) asignacion -> . tipoDato VARIABLE IGUAL valores + (29) asignacion -> . VARIABLE IGUAL comparacion + (30) asignacion -> . BOOL VARIABLE IGUAL comparacion + (31) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica + (32) asignacion -> . VARIABLE IGUAL operacion_aritmetica + (50) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (51) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN + (52) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + RETURN shift and go to state 39 + VARIABLE shift and go to state 26 + BOOL shift and go to state 32 + MAP shift and go to state 33 + STRING shift and go to state 4 + INT shift and go to state 5 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 - comparador shift and go to state 37 + tipoDato shift and go to state 25 + expresiones shift and go to state 40 + asignacion shift and go to state 29 + mapa shift and go to state 30 + mapaFunciones shift and go to state 31 state 28 - (16) comparacion -> valores . comparador valores - (18) comparador -> . MENORQUE - (19) comparador -> . MAYORQUE - (20) comparador -> . IGUALQUE - (21) comparador -> . DIFERENTEQUE + (18) bloque -> expresiones . - MENORQUE shift and go to state 38 - MAYORQUE shift and go to state 39 - IGUALQUE shift and go to state 40 - DIFERENTEQUE shift and go to state 41 + RETURN reduce using rule 18 (bloque -> expresiones .) + VARIABLE reduce using rule 18 (bloque -> expresiones .) + BOOL reduce using rule 18 (bloque -> expresiones .) + MAP reduce using rule 18 (bloque -> expresiones .) + STRING reduce using rule 18 (bloque -> expresiones .) + INT reduce using rule 18 (bloque -> expresiones .) + DOUBLE reduce using rule 18 (bloque -> expresiones .) + DYNAMIC reduce using rule 18 (bloque -> expresiones .) + VAR reduce using rule 18 (bloque -> expresiones .) + LLAVECIERRA reduce using rule 18 (bloque -> expresiones .) - comparador shift and go to state 42 state 29 - (5) operacion_aritmetica -> valores operadores_aritmeticos . valores - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (33) booleano -> . TRUE - (34) booleano -> . FALSE + (20) expresiones -> asignacion . PUNTOCOMA - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 + PUNTOCOMA shift and go to state 41 - valores shift and go to state 43 - booleano shift and go to state 20 state 30 - (7) operadores_aritmeticos -> SUMA . + (21) expresiones -> mapa . PUNTOCOMA - NUMERO reduce using rule 7 (operadores_aritmeticos -> SUMA .) - CADENA reduce using rule 7 (operadores_aritmeticos -> SUMA .) - VARIABLE reduce using rule 7 (operadores_aritmeticos -> SUMA .) - TRUE reduce using rule 7 (operadores_aritmeticos -> SUMA .) - FALSE reduce using rule 7 (operadores_aritmeticos -> SUMA .) + PUNTOCOMA shift and go to state 42 state 31 - (8) operadores_aritmeticos -> RESTA . + (22) expresiones -> mapaFunciones . PUNTOCOMA - NUMERO reduce using rule 8 (operadores_aritmeticos -> RESTA .) - CADENA reduce using rule 8 (operadores_aritmeticos -> RESTA .) - VARIABLE reduce using rule 8 (operadores_aritmeticos -> RESTA .) - TRUE reduce using rule 8 (operadores_aritmeticos -> RESTA .) - FALSE reduce using rule 8 (operadores_aritmeticos -> RESTA .) + PUNTOCOMA shift and go to state 43 state 32 - (9) operadores_aritmeticos -> MULTIPLICACION . + (30) asignacion -> BOOL . VARIABLE IGUAL comparacion + (65) tipoDato -> BOOL . + + ! shift/reduce conflict for VARIABLE resolved as shift + VARIABLE shift and go to state 44 - NUMERO reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) - CADENA reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) - VARIABLE reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) - TRUE reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) - FALSE reduce using rule 9 (operadores_aritmeticos -> MULTIPLICACION .) + ! VARIABLE [ reduce using rule 65 (tipoDato -> BOOL .) ] state 33 - (10) operadores_aritmeticos -> DIVISION . + (50) mapa -> MAP . MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa - NUMERO reduce using rule 10 (operadores_aritmeticos -> DIVISION .) - CADENA reduce using rule 10 (operadores_aritmeticos -> DIVISION .) - VARIABLE reduce using rule 10 (operadores_aritmeticos -> DIVISION .) - TRUE reduce using rule 10 (operadores_aritmeticos -> DIVISION .) - FALSE reduce using rule 10 (operadores_aritmeticos -> DIVISION .) + MENORQUE shift and go to state 45 state 34 - (11) operadores_aritmeticos -> DIVENTERA . + (23) parametros -> parametros COMA tipoDato VARIABLE . - NUMERO reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) - CADENA reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) - VARIABLE reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) - TRUE reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) - FALSE reduce using rule 11 (operadores_aritmeticos -> DIVENTERA .) + RPAREN reduce using rule 23 (parametros -> parametros COMA tipoDato VARIABLE .) + COMA reduce using rule 23 (parametros -> parametros COMA tipoDato VARIABLE .) state 35 - (12) operadores_aritmeticos -> RESIDUO . - - NUMERO reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) - CADENA reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) - VARIABLE reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) - TRUE reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) - FALSE reduce using rule 12 (operadores_aritmeticos -> RESIDUO .) + (2) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque . LLAVECIERRA + (3) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque . RETURN PUNTOCOMA LLAVECIERRA + (19) bloque -> bloque . expresiones + (20) expresiones -> . asignacion PUNTOCOMA + (21) expresiones -> . mapa PUNTOCOMA + (22) expresiones -> . mapaFunciones PUNTOCOMA + (27) asignacion -> . VARIABLE IGUAL valores + (28) asignacion -> . tipoDato VARIABLE IGUAL valores + (29) asignacion -> . VARIABLE IGUAL comparacion + (30) asignacion -> . BOOL VARIABLE IGUAL comparacion + (31) asignacion -> . tipoDato VARIABLE IGUAL operacion_aritmetica + (32) asignacion -> . VARIABLE IGUAL operacion_aritmetica + (50) mapa -> . MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (51) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN RPAREN + (52) mapaFunciones -> . VARIABLE PUNTO VARIABLE LPAREN valores RPAREN + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + LLAVECIERRA shift and go to state 46 + RETURN shift and go to state 47 + VARIABLE shift and go to state 26 + BOOL shift and go to state 32 + MAP shift and go to state 33 + STRING shift and go to state 4 + INT shift and go to state 5 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + expresiones shift and go to state 40 + asignacion shift and go to state 29 + mapa shift and go to state 30 + mapaFunciones shift and go to state 31 + tipoDato shift and go to state 25 state 36 - (6) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos . valores - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (33) booleano -> . TRUE - (34) booleano -> . FALSE + (28) asignacion -> tipoDato VARIABLE . IGUAL valores + (31) asignacion -> tipoDato VARIABLE . IGUAL operacion_aritmetica - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 + IGUAL shift and go to state 48 - valores shift and go to state 44 - booleano shift and go to state 20 state 37 - (17) comparacion -> comparacion comparador . valores - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (33) booleano -> . TRUE - (34) booleano -> . FALSE - - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 - - valores shift and go to state 45 - booleano shift and go to state 20 + (27) asignacion -> VARIABLE IGUAL . valores + (29) asignacion -> VARIABLE IGUAL . comparacion + (32) asignacion -> VARIABLE IGUAL . operacion_aritmetica + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (44) comparacion -> . valores comparador valores + (45) comparacion -> . comparacion comparador valores + (36) operacion_aritmetica -> . valores operadores_aritmeticos valores + (37) operacion_aritmetica -> . operacion_aritmetica operadores_aritmeticos valores + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 50 + comparacion shift and go to state 51 + operacion_aritmetica shift and go to state 52 + booleano shift and go to state 55 state 38 - (18) comparador -> MENORQUE . + (51) mapaFunciones -> VARIABLE PUNTO . VARIABLE LPAREN RPAREN + (52) mapaFunciones -> VARIABLE PUNTO . VARIABLE LPAREN valores RPAREN - NUMERO reduce using rule 18 (comparador -> MENORQUE .) - CADENA reduce using rule 18 (comparador -> MENORQUE .) - VARIABLE reduce using rule 18 (comparador -> MENORQUE .) - TRUE reduce using rule 18 (comparador -> MENORQUE .) - FALSE reduce using rule 18 (comparador -> MENORQUE .) + VARIABLE shift and go to state 58 state 39 - (19) comparador -> MAYORQUE . + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN . valores PUNTOCOMA LLAVECIERRA + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE - NUMERO reduce using rule 19 (comparador -> MAYORQUE .) - CADENA reduce using rule 19 (comparador -> MAYORQUE .) - VARIABLE reduce using rule 19 (comparador -> MAYORQUE .) - TRUE reduce using rule 19 (comparador -> MAYORQUE .) - FALSE reduce using rule 19 (comparador -> MAYORQUE .) + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + valores shift and go to state 59 + booleano shift and go to state 55 state 40 - (20) comparador -> IGUALQUE . + (19) bloque -> bloque expresiones . - NUMERO reduce using rule 20 (comparador -> IGUALQUE .) - CADENA reduce using rule 20 (comparador -> IGUALQUE .) - VARIABLE reduce using rule 20 (comparador -> IGUALQUE .) - TRUE reduce using rule 20 (comparador -> IGUALQUE .) - FALSE reduce using rule 20 (comparador -> IGUALQUE .) + RETURN reduce using rule 19 (bloque -> bloque expresiones .) + VARIABLE reduce using rule 19 (bloque -> bloque expresiones .) + BOOL reduce using rule 19 (bloque -> bloque expresiones .) + MAP reduce using rule 19 (bloque -> bloque expresiones .) + STRING reduce using rule 19 (bloque -> bloque expresiones .) + INT reduce using rule 19 (bloque -> bloque expresiones .) + DOUBLE reduce using rule 19 (bloque -> bloque expresiones .) + DYNAMIC reduce using rule 19 (bloque -> bloque expresiones .) + VAR reduce using rule 19 (bloque -> bloque expresiones .) + LLAVECIERRA reduce using rule 19 (bloque -> bloque expresiones .) state 41 - (21) comparador -> DIFERENTEQUE . + (20) expresiones -> asignacion PUNTOCOMA . - NUMERO reduce using rule 21 (comparador -> DIFERENTEQUE .) - CADENA reduce using rule 21 (comparador -> DIFERENTEQUE .) - VARIABLE reduce using rule 21 (comparador -> DIFERENTEQUE .) - TRUE reduce using rule 21 (comparador -> DIFERENTEQUE .) - FALSE reduce using rule 21 (comparador -> DIFERENTEQUE .) + RETURN reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + VARIABLE reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + BOOL reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + MAP reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + STRING reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + INT reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + DOUBLE reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + DYNAMIC reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + VAR reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) + LLAVECIERRA reduce using rule 20 (expresiones -> asignacion PUNTOCOMA .) state 42 - (16) comparacion -> valores comparador . valores - (29) valores -> . NUMERO - (30) valores -> . CADENA - (31) valores -> . booleano - (32) valores -> . VARIABLE - (33) booleano -> . TRUE - (34) booleano -> . FALSE + (21) expresiones -> mapa PUNTOCOMA . - NUMERO shift and go to state 18 - CADENA shift and go to state 19 - VARIABLE shift and go to state 16 - TRUE shift and go to state 21 - FALSE shift and go to state 22 + RETURN reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + VARIABLE reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + BOOL reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + MAP reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + STRING reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + INT reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + DOUBLE reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + DYNAMIC reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + VAR reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) + LLAVECIERRA reduce using rule 21 (expresiones -> mapa PUNTOCOMA .) - valores shift and go to state 46 - booleano shift and go to state 20 state 43 - (5) operacion_aritmetica -> valores operadores_aritmeticos valores . + (22) expresiones -> mapaFunciones PUNTOCOMA . - SUMA reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - RESTA reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - MULTIPLICACION reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - DIVISION reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - DIVENTERA reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - RESIDUO reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) - $end reduce using rule 5 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + RETURN reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + VARIABLE reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + BOOL reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + MAP reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + STRING reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + INT reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + DOUBLE reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + DYNAMIC reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + VAR reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) + LLAVECIERRA reduce using rule 22 (expresiones -> mapaFunciones PUNTOCOMA .) state 44 - (6) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores . + (30) asignacion -> BOOL VARIABLE . IGUAL comparacion - SUMA reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - RESTA reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - MULTIPLICACION reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - DIVISION reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - DIVENTERA reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - RESIDUO reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) - $end reduce using rule 6 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + IGUAL shift and go to state 60 state 45 - (17) comparacion -> comparacion comparador valores . - - MENORQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) - MAYORQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) - IGUALQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) - DIFERENTEQUE reduce using rule 17 (comparacion -> comparacion comparador valores .) - $end reduce using rule 17 (comparacion -> comparacion comparador valores .) + (50) mapa -> MAP MENORQUE . tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + STRING shift and go to state 4 + INT shift and go to state 5 + BOOL shift and go to state 6 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + tipoDato shift and go to state 61 state 46 - (16) comparacion -> valores comparador valores . + (2) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA . + + $end reduce using rule 2 (funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA .) + + +state 47 + + (3) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN . PUNTOCOMA LLAVECIERRA + + PUNTOCOMA shift and go to state 62 + + +state 48 + + (28) asignacion -> tipoDato VARIABLE IGUAL . valores + (31) asignacion -> tipoDato VARIABLE IGUAL . operacion_aritmetica + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (36) operacion_aritmetica -> . valores operadores_aritmeticos valores + (37) operacion_aritmetica -> . operacion_aritmetica operadores_aritmeticos valores + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 63 + operacion_aritmetica shift and go to state 64 + booleano shift and go to state 55 + +state 49 + + (60) valores -> VARIABLE . + + MENORQUE reduce using rule 60 (valores -> VARIABLE .) + MAYORQUE reduce using rule 60 (valores -> VARIABLE .) + IGUALQUE reduce using rule 60 (valores -> VARIABLE .) + DIFERENTEQUE reduce using rule 60 (valores -> VARIABLE .) + SUMA reduce using rule 60 (valores -> VARIABLE .) + RESTA reduce using rule 60 (valores -> VARIABLE .) + MULTIPLICACION reduce using rule 60 (valores -> VARIABLE .) + DIVISION reduce using rule 60 (valores -> VARIABLE .) + DIVENTERA reduce using rule 60 (valores -> VARIABLE .) + RESIDUO reduce using rule 60 (valores -> VARIABLE .) + PUNTOCOMA reduce using rule 60 (valores -> VARIABLE .) + RPAREN reduce using rule 60 (valores -> VARIABLE .) + DOSPUNTOS reduce using rule 60 (valores -> VARIABLE .) + LLAVECIERRA reduce using rule 60 (valores -> VARIABLE .) + COMA reduce using rule 60 (valores -> VARIABLE .) + + +state 50 + + (27) asignacion -> VARIABLE IGUAL valores . + (44) comparacion -> valores . comparador valores + (36) operacion_aritmetica -> valores . operadores_aritmeticos valores + (46) comparador -> . MENORQUE + (47) comparador -> . MAYORQUE + (48) comparador -> . IGUALQUE + (49) comparador -> . DIFERENTEQUE + (38) operadores_aritmeticos -> . SUMA + (39) operadores_aritmeticos -> . RESTA + (40) operadores_aritmeticos -> . MULTIPLICACION + (41) operadores_aritmeticos -> . DIVISION + (42) operadores_aritmeticos -> . DIVENTERA + (43) operadores_aritmeticos -> . RESIDUO + + PUNTOCOMA reduce using rule 27 (asignacion -> VARIABLE IGUAL valores .) + MENORQUE shift and go to state 67 + MAYORQUE shift and go to state 68 + IGUALQUE shift and go to state 69 + DIFERENTEQUE shift and go to state 70 + SUMA shift and go to state 71 + RESTA shift and go to state 72 + MULTIPLICACION shift and go to state 73 + DIVISION shift and go to state 74 + DIVENTERA shift and go to state 75 + RESIDUO shift and go to state 76 + + comparador shift and go to state 65 + operadores_aritmeticos shift and go to state 66 + +state 51 + + (29) asignacion -> VARIABLE IGUAL comparacion . + (45) comparacion -> comparacion . comparador valores + (46) comparador -> . MENORQUE + (47) comparador -> . MAYORQUE + (48) comparador -> . IGUALQUE + (49) comparador -> . DIFERENTEQUE + + PUNTOCOMA reduce using rule 29 (asignacion -> VARIABLE IGUAL comparacion .) + MENORQUE shift and go to state 67 + MAYORQUE shift and go to state 68 + IGUALQUE shift and go to state 69 + DIFERENTEQUE shift and go to state 70 + + comparador shift and go to state 77 + +state 52 + + (32) asignacion -> VARIABLE IGUAL operacion_aritmetica . + (37) operacion_aritmetica -> operacion_aritmetica . operadores_aritmeticos valores + (38) operadores_aritmeticos -> . SUMA + (39) operadores_aritmeticos -> . RESTA + (40) operadores_aritmeticos -> . MULTIPLICACION + (41) operadores_aritmeticos -> . DIVISION + (42) operadores_aritmeticos -> . DIVENTERA + (43) operadores_aritmeticos -> . RESIDUO + + PUNTOCOMA reduce using rule 32 (asignacion -> VARIABLE IGUAL operacion_aritmetica .) + SUMA shift and go to state 71 + RESTA shift and go to state 72 + MULTIPLICACION shift and go to state 73 + DIVISION shift and go to state 74 + DIVENTERA shift and go to state 75 + RESIDUO shift and go to state 76 + + operadores_aritmeticos shift and go to state 78 + +state 53 + + (57) valores -> NUMERO . + + MENORQUE reduce using rule 57 (valores -> NUMERO .) + MAYORQUE reduce using rule 57 (valores -> NUMERO .) + IGUALQUE reduce using rule 57 (valores -> NUMERO .) + DIFERENTEQUE reduce using rule 57 (valores -> NUMERO .) + SUMA reduce using rule 57 (valores -> NUMERO .) + RESTA reduce using rule 57 (valores -> NUMERO .) + MULTIPLICACION reduce using rule 57 (valores -> NUMERO .) + DIVISION reduce using rule 57 (valores -> NUMERO .) + DIVENTERA reduce using rule 57 (valores -> NUMERO .) + RESIDUO reduce using rule 57 (valores -> NUMERO .) + PUNTOCOMA reduce using rule 57 (valores -> NUMERO .) + RPAREN reduce using rule 57 (valores -> NUMERO .) + DOSPUNTOS reduce using rule 57 (valores -> NUMERO .) + LLAVECIERRA reduce using rule 57 (valores -> NUMERO .) + COMA reduce using rule 57 (valores -> NUMERO .) + + +state 54 + + (58) valores -> CADENA . + + MENORQUE reduce using rule 58 (valores -> CADENA .) + MAYORQUE reduce using rule 58 (valores -> CADENA .) + IGUALQUE reduce using rule 58 (valores -> CADENA .) + DIFERENTEQUE reduce using rule 58 (valores -> CADENA .) + SUMA reduce using rule 58 (valores -> CADENA .) + RESTA reduce using rule 58 (valores -> CADENA .) + MULTIPLICACION reduce using rule 58 (valores -> CADENA .) + DIVISION reduce using rule 58 (valores -> CADENA .) + DIVENTERA reduce using rule 58 (valores -> CADENA .) + RESIDUO reduce using rule 58 (valores -> CADENA .) + PUNTOCOMA reduce using rule 58 (valores -> CADENA .) + RPAREN reduce using rule 58 (valores -> CADENA .) + DOSPUNTOS reduce using rule 58 (valores -> CADENA .) + LLAVECIERRA reduce using rule 58 (valores -> CADENA .) + COMA reduce using rule 58 (valores -> CADENA .) + + +state 55 + + (59) valores -> booleano . + + MENORQUE reduce using rule 59 (valores -> booleano .) + MAYORQUE reduce using rule 59 (valores -> booleano .) + IGUALQUE reduce using rule 59 (valores -> booleano .) + DIFERENTEQUE reduce using rule 59 (valores -> booleano .) + SUMA reduce using rule 59 (valores -> booleano .) + RESTA reduce using rule 59 (valores -> booleano .) + MULTIPLICACION reduce using rule 59 (valores -> booleano .) + DIVISION reduce using rule 59 (valores -> booleano .) + DIVENTERA reduce using rule 59 (valores -> booleano .) + RESIDUO reduce using rule 59 (valores -> booleano .) + PUNTOCOMA reduce using rule 59 (valores -> booleano .) + RPAREN reduce using rule 59 (valores -> booleano .) + DOSPUNTOS reduce using rule 59 (valores -> booleano .) + LLAVECIERRA reduce using rule 59 (valores -> booleano .) + COMA reduce using rule 59 (valores -> booleano .) + + +state 56 + + (61) booleano -> TRUE . + + MENORQUE reduce using rule 61 (booleano -> TRUE .) + MAYORQUE reduce using rule 61 (booleano -> TRUE .) + IGUALQUE reduce using rule 61 (booleano -> TRUE .) + DIFERENTEQUE reduce using rule 61 (booleano -> TRUE .) + SUMA reduce using rule 61 (booleano -> TRUE .) + RESTA reduce using rule 61 (booleano -> TRUE .) + MULTIPLICACION reduce using rule 61 (booleano -> TRUE .) + DIVISION reduce using rule 61 (booleano -> TRUE .) + DIVENTERA reduce using rule 61 (booleano -> TRUE .) + RESIDUO reduce using rule 61 (booleano -> TRUE .) + PUNTOCOMA reduce using rule 61 (booleano -> TRUE .) + RPAREN reduce using rule 61 (booleano -> TRUE .) + DOSPUNTOS reduce using rule 61 (booleano -> TRUE .) + LLAVECIERRA reduce using rule 61 (booleano -> TRUE .) + COMA reduce using rule 61 (booleano -> TRUE .) + + +state 57 + + (62) booleano -> FALSE . + + MENORQUE reduce using rule 62 (booleano -> FALSE .) + MAYORQUE reduce using rule 62 (booleano -> FALSE .) + IGUALQUE reduce using rule 62 (booleano -> FALSE .) + DIFERENTEQUE reduce using rule 62 (booleano -> FALSE .) + SUMA reduce using rule 62 (booleano -> FALSE .) + RESTA reduce using rule 62 (booleano -> FALSE .) + MULTIPLICACION reduce using rule 62 (booleano -> FALSE .) + DIVISION reduce using rule 62 (booleano -> FALSE .) + DIVENTERA reduce using rule 62 (booleano -> FALSE .) + RESIDUO reduce using rule 62 (booleano -> FALSE .) + PUNTOCOMA reduce using rule 62 (booleano -> FALSE .) + RPAREN reduce using rule 62 (booleano -> FALSE .) + DOSPUNTOS reduce using rule 62 (booleano -> FALSE .) + LLAVECIERRA reduce using rule 62 (booleano -> FALSE .) + COMA reduce using rule 62 (booleano -> FALSE .) + + +state 58 + + (51) mapaFunciones -> VARIABLE PUNTO VARIABLE . LPAREN RPAREN + (52) mapaFunciones -> VARIABLE PUNTO VARIABLE . LPAREN valores RPAREN + + LPAREN shift and go to state 79 + + +state 59 + + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores . PUNTOCOMA LLAVECIERRA + + PUNTOCOMA shift and go to state 80 + + +state 60 + + (30) asignacion -> BOOL VARIABLE IGUAL . comparacion + (44) comparacion -> . valores comparador valores + (45) comparacion -> . comparacion comparador valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + comparacion shift and go to state 81 + valores shift and go to state 82 + booleano shift and go to state 55 + +state 61 + + (50) mapa -> MAP MENORQUE tipoDato . COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + + COMA shift and go to state 83 + + +state 62 + + (3) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA . LLAVECIERRA + + LLAVECIERRA shift and go to state 84 + + +state 63 + + (28) asignacion -> tipoDato VARIABLE IGUAL valores . + (36) operacion_aritmetica -> valores . operadores_aritmeticos valores + (38) operadores_aritmeticos -> . SUMA + (39) operadores_aritmeticos -> . RESTA + (40) operadores_aritmeticos -> . MULTIPLICACION + (41) operadores_aritmeticos -> . DIVISION + (42) operadores_aritmeticos -> . DIVENTERA + (43) operadores_aritmeticos -> . RESIDUO + + PUNTOCOMA reduce using rule 28 (asignacion -> tipoDato VARIABLE IGUAL valores .) + SUMA shift and go to state 71 + RESTA shift and go to state 72 + MULTIPLICACION shift and go to state 73 + DIVISION shift and go to state 74 + DIVENTERA shift and go to state 75 + RESIDUO shift and go to state 76 + + operadores_aritmeticos shift and go to state 66 + +state 64 + + (31) asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica . + (37) operacion_aritmetica -> operacion_aritmetica . operadores_aritmeticos valores + (38) operadores_aritmeticos -> . SUMA + (39) operadores_aritmeticos -> . RESTA + (40) operadores_aritmeticos -> . MULTIPLICACION + (41) operadores_aritmeticos -> . DIVISION + (42) operadores_aritmeticos -> . DIVENTERA + (43) operadores_aritmeticos -> . RESIDUO + + PUNTOCOMA reduce using rule 31 (asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica .) + SUMA shift and go to state 71 + RESTA shift and go to state 72 + MULTIPLICACION shift and go to state 73 + DIVISION shift and go to state 74 + DIVENTERA shift and go to state 75 + RESIDUO shift and go to state 76 + + operadores_aritmeticos shift and go to state 78 + +state 65 + + (44) comparacion -> valores comparador . valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 85 + booleano shift and go to state 55 + +state 66 + + (36) operacion_aritmetica -> valores operadores_aritmeticos . valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 86 + booleano shift and go to state 55 + +state 67 + + (46) comparador -> MENORQUE . + + NUMERO reduce using rule 46 (comparador -> MENORQUE .) + CADENA reduce using rule 46 (comparador -> MENORQUE .) + VARIABLE reduce using rule 46 (comparador -> MENORQUE .) + TRUE reduce using rule 46 (comparador -> MENORQUE .) + FALSE reduce using rule 46 (comparador -> MENORQUE .) + + +state 68 + + (47) comparador -> MAYORQUE . + + NUMERO reduce using rule 47 (comparador -> MAYORQUE .) + CADENA reduce using rule 47 (comparador -> MAYORQUE .) + VARIABLE reduce using rule 47 (comparador -> MAYORQUE .) + TRUE reduce using rule 47 (comparador -> MAYORQUE .) + FALSE reduce using rule 47 (comparador -> MAYORQUE .) + + +state 69 + + (48) comparador -> IGUALQUE . + + NUMERO reduce using rule 48 (comparador -> IGUALQUE .) + CADENA reduce using rule 48 (comparador -> IGUALQUE .) + VARIABLE reduce using rule 48 (comparador -> IGUALQUE .) + TRUE reduce using rule 48 (comparador -> IGUALQUE .) + FALSE reduce using rule 48 (comparador -> IGUALQUE .) + + +state 70 + + (49) comparador -> DIFERENTEQUE . + + NUMERO reduce using rule 49 (comparador -> DIFERENTEQUE .) + CADENA reduce using rule 49 (comparador -> DIFERENTEQUE .) + VARIABLE reduce using rule 49 (comparador -> DIFERENTEQUE .) + TRUE reduce using rule 49 (comparador -> DIFERENTEQUE .) + FALSE reduce using rule 49 (comparador -> DIFERENTEQUE .) + + +state 71 + + (38) operadores_aritmeticos -> SUMA . + + NUMERO reduce using rule 38 (operadores_aritmeticos -> SUMA .) + CADENA reduce using rule 38 (operadores_aritmeticos -> SUMA .) + VARIABLE reduce using rule 38 (operadores_aritmeticos -> SUMA .) + TRUE reduce using rule 38 (operadores_aritmeticos -> SUMA .) + FALSE reduce using rule 38 (operadores_aritmeticos -> SUMA .) + + +state 72 + + (39) operadores_aritmeticos -> RESTA . + + NUMERO reduce using rule 39 (operadores_aritmeticos -> RESTA .) + CADENA reduce using rule 39 (operadores_aritmeticos -> RESTA .) + VARIABLE reduce using rule 39 (operadores_aritmeticos -> RESTA .) + TRUE reduce using rule 39 (operadores_aritmeticos -> RESTA .) + FALSE reduce using rule 39 (operadores_aritmeticos -> RESTA .) + + +state 73 + + (40) operadores_aritmeticos -> MULTIPLICACION . + + NUMERO reduce using rule 40 (operadores_aritmeticos -> MULTIPLICACION .) + CADENA reduce using rule 40 (operadores_aritmeticos -> MULTIPLICACION .) + VARIABLE reduce using rule 40 (operadores_aritmeticos -> MULTIPLICACION .) + TRUE reduce using rule 40 (operadores_aritmeticos -> MULTIPLICACION .) + FALSE reduce using rule 40 (operadores_aritmeticos -> MULTIPLICACION .) + + +state 74 + + (41) operadores_aritmeticos -> DIVISION . + + NUMERO reduce using rule 41 (operadores_aritmeticos -> DIVISION .) + CADENA reduce using rule 41 (operadores_aritmeticos -> DIVISION .) + VARIABLE reduce using rule 41 (operadores_aritmeticos -> DIVISION .) + TRUE reduce using rule 41 (operadores_aritmeticos -> DIVISION .) + FALSE reduce using rule 41 (operadores_aritmeticos -> DIVISION .) + + +state 75 + + (42) operadores_aritmeticos -> DIVENTERA . + + NUMERO reduce using rule 42 (operadores_aritmeticos -> DIVENTERA .) + CADENA reduce using rule 42 (operadores_aritmeticos -> DIVENTERA .) + VARIABLE reduce using rule 42 (operadores_aritmeticos -> DIVENTERA .) + TRUE reduce using rule 42 (operadores_aritmeticos -> DIVENTERA .) + FALSE reduce using rule 42 (operadores_aritmeticos -> DIVENTERA .) + + +state 76 + + (43) operadores_aritmeticos -> RESIDUO . + + NUMERO reduce using rule 43 (operadores_aritmeticos -> RESIDUO .) + CADENA reduce using rule 43 (operadores_aritmeticos -> RESIDUO .) + VARIABLE reduce using rule 43 (operadores_aritmeticos -> RESIDUO .) + TRUE reduce using rule 43 (operadores_aritmeticos -> RESIDUO .) + FALSE reduce using rule 43 (operadores_aritmeticos -> RESIDUO .) + + +state 77 + + (45) comparacion -> comparacion comparador . valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 87 + booleano shift and go to state 55 + +state 78 + + (37) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos . valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 88 + booleano shift and go to state 55 + +state 79 + + (51) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN . RPAREN + (52) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN . valores RPAREN + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + RPAREN shift and go to state 89 + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 90 + booleano shift and go to state 55 + +state 80 + + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA . LLAVECIERRA + + LLAVECIERRA shift and go to state 91 + + +state 81 + + (30) asignacion -> BOOL VARIABLE IGUAL comparacion . + (45) comparacion -> comparacion . comparador valores + (46) comparador -> . MENORQUE + (47) comparador -> . MAYORQUE + (48) comparador -> . IGUALQUE + (49) comparador -> . DIFERENTEQUE + + PUNTOCOMA reduce using rule 30 (asignacion -> BOOL VARIABLE IGUAL comparacion .) + MENORQUE shift and go to state 67 + MAYORQUE shift and go to state 68 + IGUALQUE shift and go to state 69 + DIFERENTEQUE shift and go to state 70 + + comparador shift and go to state 77 + +state 82 + + (44) comparacion -> valores . comparador valores + (46) comparador -> . MENORQUE + (47) comparador -> . MAYORQUE + (48) comparador -> . IGUALQUE + (49) comparador -> . DIFERENTEQUE + + MENORQUE shift and go to state 67 + MAYORQUE shift and go to state 68 + IGUALQUE shift and go to state 69 + DIFERENTEQUE shift and go to state 70 + + comparador shift and go to state 65 + +state 83 + + (50) mapa -> MAP MENORQUE tipoDato COMA . tipoDato MAYORQUE VARIABLE IGUAL creacionMapa + (63) tipoDato -> . STRING + (64) tipoDato -> . INT + (65) tipoDato -> . BOOL + (66) tipoDato -> . DOUBLE + (67) tipoDato -> . DYNAMIC + (68) tipoDato -> . VAR + + STRING shift and go to state 4 + INT shift and go to state 5 + BOOL shift and go to state 6 + DOUBLE shift and go to state 7 + DYNAMIC shift and go to state 8 + VAR shift and go to state 9 + + tipoDato shift and go to state 92 + +state 84 + + (3) funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA . + + $end reduce using rule 3 (funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA .) + + +state 85 + + (44) comparacion -> valores comparador valores . + + MENORQUE reduce using rule 44 (comparacion -> valores comparador valores .) + MAYORQUE reduce using rule 44 (comparacion -> valores comparador valores .) + IGUALQUE reduce using rule 44 (comparacion -> valores comparador valores .) + DIFERENTEQUE reduce using rule 44 (comparacion -> valores comparador valores .) + PUNTOCOMA reduce using rule 44 (comparacion -> valores comparador valores .) + + +state 86 + + (36) operacion_aritmetica -> valores operadores_aritmeticos valores . + + SUMA reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + RESTA reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + MULTIPLICACION reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + DIVISION reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + DIVENTERA reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + RESIDUO reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + PUNTOCOMA reduce using rule 36 (operacion_aritmetica -> valores operadores_aritmeticos valores .) + + +state 87 + + (45) comparacion -> comparacion comparador valores . + + MENORQUE reduce using rule 45 (comparacion -> comparacion comparador valores .) + MAYORQUE reduce using rule 45 (comparacion -> comparacion comparador valores .) + IGUALQUE reduce using rule 45 (comparacion -> comparacion comparador valores .) + DIFERENTEQUE reduce using rule 45 (comparacion -> comparacion comparador valores .) + PUNTOCOMA reduce using rule 45 (comparacion -> comparacion comparador valores .) + + +state 88 + + (37) operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores . + + SUMA reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + RESTA reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + MULTIPLICACION reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + DIVISION reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + DIVENTERA reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + RESIDUO reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + PUNTOCOMA reduce using rule 37 (operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores .) + + +state 89 + + (51) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN . + + PUNTOCOMA reduce using rule 51 (mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN .) + + +state 90 + + (52) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores . RPAREN + + RPAREN shift and go to state 93 + + +state 91 + + (1) funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA . + + $end reduce using rule 1 (funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA .) + + +state 92 + + (50) mapa -> MAP MENORQUE tipoDato COMA tipoDato . MAYORQUE VARIABLE IGUAL creacionMapa + + MAYORQUE shift and go to state 94 + + +state 93 + + (52) mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN . + + PUNTOCOMA reduce using rule 52 (mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN .) + + +state 94 + + (50) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE . VARIABLE IGUAL creacionMapa + + VARIABLE shift and go to state 95 + + +state 95 + + (50) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE . IGUAL creacionMapa + + IGUAL shift and go to state 96 + + +state 96 + + (50) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL . creacionMapa + (53) creacionMapa -> . LLAVEABRE paresClaveValor LLAVECIERRA + (54) creacionMapa -> . VARIABLE + + LLAVEABRE shift and go to state 99 + VARIABLE shift and go to state 97 + + creacionMapa shift and go to state 98 + +state 97 + + (54) creacionMapa -> VARIABLE . + + PUNTOCOMA reduce using rule 54 (creacionMapa -> VARIABLE .) + + +state 98 + + (50) mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa . + + PUNTOCOMA reduce using rule 50 (mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa .) + + +state 99 + + (53) creacionMapa -> LLAVEABRE . paresClaveValor LLAVECIERRA + (55) paresClaveValor -> . valores DOSPUNTOS valores + (56) paresClaveValor -> . paresClaveValor COMA valores DOSPUNTOS valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + paresClaveValor shift and go to state 100 + valores shift and go to state 101 + booleano shift and go to state 55 + +state 100 + + (53) creacionMapa -> LLAVEABRE paresClaveValor . LLAVECIERRA + (56) paresClaveValor -> paresClaveValor . COMA valores DOSPUNTOS valores + + LLAVECIERRA shift and go to state 102 + COMA shift and go to state 103 + + +state 101 + + (55) paresClaveValor -> valores . DOSPUNTOS valores + + DOSPUNTOS shift and go to state 104 + + +state 102 + + (53) creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA . + + PUNTOCOMA reduce using rule 53 (creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA .) + + +state 103 + + (56) paresClaveValor -> paresClaveValor COMA . valores DOSPUNTOS valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 105 + booleano shift and go to state 55 + +state 104 + + (55) paresClaveValor -> valores DOSPUNTOS . valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 106 + booleano shift and go to state 55 + +state 105 + + (56) paresClaveValor -> paresClaveValor COMA valores . DOSPUNTOS valores + + DOSPUNTOS shift and go to state 107 + + +state 106 + + (55) paresClaveValor -> valores DOSPUNTOS valores . + + LLAVECIERRA reduce using rule 55 (paresClaveValor -> valores DOSPUNTOS valores .) + COMA reduce using rule 55 (paresClaveValor -> valores DOSPUNTOS valores .) + + +state 107 + + (56) paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS . valores + (57) valores -> . NUMERO + (58) valores -> . CADENA + (59) valores -> . booleano + (60) valores -> . VARIABLE + (61) booleano -> . TRUE + (62) booleano -> . FALSE + + NUMERO shift and go to state 53 + CADENA shift and go to state 54 + VARIABLE shift and go to state 49 + TRUE shift and go to state 56 + FALSE shift and go to state 57 + + valores shift and go to state 108 + booleano shift and go to state 55 + +state 108 + + (56) paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores . - MENORQUE reduce using rule 16 (comparacion -> valores comparador valores .) - MAYORQUE reduce using rule 16 (comparacion -> valores comparador valores .) - IGUALQUE reduce using rule 16 (comparacion -> valores comparador valores .) - DIFERENTEQUE reduce using rule 16 (comparacion -> valores comparador valores .) - $end reduce using rule 16 (comparacion -> valores comparador valores .) + LLAVECIERRA reduce using rule 56 (paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores .) + COMA reduce using rule 56 (paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores .) WARNING: WARNING: Conflicts: WARNING: -WARNING: shift/reduce conflict for VARIABLE in state 4 resolved as shift +WARNING: shift/reduce conflict for VARIABLE in state 32 resolved as shift diff --git a/parsetab.py b/parsetab.py index 2efba04..68b731e 100644 --- a/parsetab.py +++ b/parsetab.py @@ -6,9 +6,9 @@ _lr_method = 'LALR' -_lr_signature = 'ADD ASIGNACIONAUMENTADA ASIGNACIONDISMINUIDA BOOL CADENA COMA COMILLASDOBLES COMILLASSIMPLES CORCHETEABRE CORCHETECIERRA DIFERENTEQUE DIVENTERA DIVISION DO DOSPUNTOS DOUBLE DYNAMIC ELSE EXPORT FALSE FINAL FLECHA FOR IF IGUAL IGUALQUE IMPORT IN INT IS LIST LLAVEABRE LLAVECIERRA LPAREN MAP MAYORQUE MENORQUE MULTIPLICACION NEW NOT NULL NUMERO PRINT PUNTO PUNTOCOMA REQUIRED RESIDUO RESTA RETURN RPAREN SET STRING SUMA SUPER THIS TRUE VAR VARIABLE VOID WHILEasignacion : VARIABLE operadores_asignacion valores\n | tipoDato VARIABLE IGUAL valores\n | BOOL VARIABLE IGUAL comparacion\n | tipoDato VARIABLE IGUAL operacion_aritmeticaoperacion_aritmetica : valores operadores_aritmeticos valores\n | operacion_aritmetica operadores_aritmeticos valoresoperadores_aritmeticos : SUMA\n | RESTA\n | MULTIPLICACION\n | DIVISION\n | DIVENTERA\n | RESIDUOoperadores_asignacion : IGUAL\n | ASIGNACIONAUMENTADA\n | ASIGNACIONDISMINUIDAcomparacion : valores comparador valores\n | comparacion comparador valores comparador : MENORQUE\n | MAYORQUE\n | IGUALQUE\n | DIFERENTEQUEmapa : MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapamapaFunciones : VARIABLE PUNTO VARIABLE LPAREN RPAREN\n | VARIABLE PUNTO VARIABLE LPAREN valores RPARENcreacionMapa : LLAVEABRE paresClaveValor LLAVECIERRA\n | VARIABLEparesClaveValor : valores DOSPUNTOS valores\n | paresClaveValor COMA valores DOSPUNTOS valoresvalores : NUMERO\n | CADENA\n | booleano\n | VARIABLE booleano : TRUE\n | FALSEtipoDato : STRING\n | INT\n | BOOL\n | DOUBLE\n | DYNAMIC\n | VAR ' +_lr_signature = 'ADD ASIGNACIONAUMENTADA ASIGNACIONDISMINUIDA BOOL CADENA COMA COMILLASDOBLES COMILLASSIMPLES CORCHETEABRE CORCHETECIERRA DIFERENTEQUE DIVENTERA DIVISION DO DOSPUNTOS DOUBLE DYNAMIC ELSE EXPORT FALSE FINAL FLECHA FOR IF IGUAL IGUALQUE IMPORT IN INT IS LIST LLAVEABRE LLAVECIERRA LPAREN MAP MAYORQUE MENORQUE MULTIPLICACION NEW NOT NULL NUMERO PRINT PUNTO PUNTOCOMA REQUIRED RESIDUO RESTA RETURN RPAREN SET STRING SUMA SUPER THIS TRUE VAR VARIABLE VOID WHILEfuncion : tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA\n | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA\n | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA estructuras : estructuraFor\n | estructuraWhile\n | estructuraIf estructuraFor : FOR LPAREN asignacion PUNTOCOMA comparacion PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA\n | estructuraWhile aumento : VARIABLE IGUAL operacion_aritmetica\n | VARIABLE operadores_asignacion valores estructuraWhile : WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA\n estructuraIf : IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA\n | estructuraIfElse estructuraIfElse : estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA argumentoEstructura : VARIABLE\n | booleano\n | comparacionbloque : expresiones\n | bloque expresionesexpresiones : asignacion PUNTOCOMA\n | mapa PUNTOCOMA\n | mapaFunciones PUNTOCOMAparametros : parametros COMA tipoDato VARIABLE\n | tipoDato VARIABLE\n | emptyimport : IMPORT CADENA PUNTOCOMAasignacion : VARIABLE IGUAL valores\n | tipoDato VARIABLE IGUAL valores\n | VARIABLE IGUAL comparacion\n | BOOL VARIABLE IGUAL comparacion\n | tipoDato VARIABLE IGUAL operacion_aritmetica\n | VARIABLE IGUAL operacion_aritmetica\n operadores_asignacion : IGUAL\n | ASIGNACIONAUMENTADA\n | ASIGNACIONDISMINUIDAoperacion_aritmetica : valores operadores_aritmeticos valores\n | operacion_aritmetica operadores_aritmeticos valoresoperadores_aritmeticos : SUMA\n | RESTA\n | MULTIPLICACION\n | DIVISION\n | DIVENTERA\n | RESIDUOcomparacion : valores comparador valores\n | comparacion comparador valores comparador : MENORQUE\n | MAYORQUE\n | IGUALQUE\n | DIFERENTEQUEmapa : MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapamapaFunciones : VARIABLE PUNTO VARIABLE LPAREN RPAREN\n | VARIABLE PUNTO VARIABLE LPAREN valores RPARENcreacionMapa : LLAVEABRE paresClaveValor LLAVECIERRA\n | VARIABLEparesClaveValor : valores DOSPUNTOS valores\n | paresClaveValor COMA valores DOSPUNTOS valoresvalores : NUMERO\n | CADENA\n | booleano\n | VARIABLE booleano : TRUE\n | FALSEtipoDato : STRING\n | INT\n | BOOL\n | DOUBLE\n | DYNAMIC\n | VAR empty :' -_lr_action_items = {'VARIABLE':([0,3,4,5,6,7,8,9,10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[2,14,15,-35,-36,-38,-39,-40,16,-13,-14,-15,16,16,16,-7,-8,-9,-10,-11,-12,16,16,-18,-19,-20,-21,16,]),'BOOL':([0,],[4,]),'STRING':([0,],[5,]),'INT':([0,],[6,]),'DOUBLE':([0,],[7,]),'DYNAMIC':([0,],[8,]),'VAR':([0,],[9,]),'$end':([1,16,17,18,19,20,21,22,25,26,27,43,44,45,46,],[0,-32,-1,-29,-30,-31,-33,-34,-2,-4,-3,-5,-6,-17,-16,]),'IGUAL':([2,14,15,],[11,23,24,]),'ASIGNACIONAUMENTADA':([2,],[12,]),'ASIGNACIONDISMINUIDA':([2,],[13,]),'NUMERO':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[18,-13,-14,-15,18,18,18,-7,-8,-9,-10,-11,-12,18,18,-18,-19,-20,-21,18,]),'CADENA':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[19,-13,-14,-15,19,19,19,-7,-8,-9,-10,-11,-12,19,19,-18,-19,-20,-21,19,]),'TRUE':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[21,-13,-14,-15,21,21,21,-7,-8,-9,-10,-11,-12,21,21,-18,-19,-20,-21,21,]),'FALSE':([10,11,12,13,23,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,],[22,-13,-14,-15,22,22,22,-7,-8,-9,-10,-11,-12,22,22,-18,-19,-20,-21,22,]),'SUMA':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,30,30,-5,-6,]),'RESTA':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,31,31,-5,-6,]),'MULTIPLICACION':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,32,32,-5,-6,]),'DIVISION':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,33,33,-5,-6,]),'DIVENTERA':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,34,34,-5,-6,]),'RESIDUO':([16,18,19,20,21,22,25,26,43,44,],[-32,-29,-30,-31,-33,-34,35,35,-5,-6,]),'MENORQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,38,38,-17,-16,]),'MAYORQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,39,39,-17,-16,]),'IGUALQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,40,40,-17,-16,]),'DIFERENTEQUE':([16,18,19,20,21,22,27,28,45,46,],[-32,-29,-30,-31,-33,-34,41,41,-17,-16,]),} +_lr_action_items = {'VOID':([0,],[3,]),'STRING':([0,12,13,20,22,24,27,28,35,40,41,42,43,45,83,],[4,4,4,4,4,4,4,-18,4,-19,-20,-21,-22,4,4,]),'INT':([0,12,13,20,22,24,27,28,35,40,41,42,43,45,83,],[5,5,5,5,5,5,5,-18,5,-19,-20,-21,-22,5,5,]),'BOOL':([0,12,13,20,22,24,27,28,35,40,41,42,43,45,83,],[6,6,6,6,32,32,32,-18,32,-19,-20,-21,-22,6,6,]),'DOUBLE':([0,12,13,20,22,24,27,28,35,40,41,42,43,45,83,],[7,7,7,7,7,7,7,-18,7,-19,-20,-21,-22,7,7,]),'DYNAMIC':([0,12,13,20,22,24,27,28,35,40,41,42,43,45,83,],[8,8,8,8,8,8,8,-18,8,-19,-20,-21,-22,8,8,]),'VAR':([0,12,13,20,22,24,27,28,35,40,41,42,43,45,83,],[9,9,9,9,9,9,9,-18,9,-19,-20,-21,-22,9,9,]),'$end':([1,46,84,91,],[0,-2,-3,-1,]),'VARIABLE':([2,3,4,5,6,7,8,9,14,22,23,24,25,27,28,32,35,37,38,39,40,41,42,43,48,60,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,94,96,99,103,104,107,],[10,11,-63,-64,-65,-66,-67,-68,18,26,34,26,36,26,-18,44,26,49,58,49,-19,-20,-21,-22,49,49,49,49,-46,-47,-48,-49,-38,-39,-40,-41,-42,-43,49,49,49,95,97,49,49,49,49,]),'COMA':([4,5,6,7,8,9,12,13,15,16,17,18,34,49,53,54,55,56,57,61,100,106,108,],[-63,-64,-65,-66,-67,-68,-69,-69,20,-25,20,-24,-23,-60,-57,-58,-59,-61,-62,83,103,-55,-56,]),'MAYORQUE':([4,5,6,7,8,9,49,50,51,53,54,55,56,57,81,82,85,87,92,],[-63,-64,-65,-66,-67,-68,-60,68,68,-57,-58,-59,-61,-62,68,68,-44,-45,94,]),'LPAREN':([10,11,58,],[12,13,79,]),'RPAREN':([12,13,15,16,17,18,34,49,53,54,55,56,57,79,90,],[-69,-69,19,-25,21,-24,-23,-60,-57,-58,-59,-61,-62,89,93,]),'LLAVEABRE':([19,21,96,],[22,24,99,]),'MAP':([22,24,27,28,35,40,41,42,43,],[33,33,33,-18,33,-19,-20,-21,-22,]),'IGUAL':([26,36,44,95,],[37,48,60,96,]),'PUNTO':([26,],[38,]),'RETURN':([27,28,35,40,41,42,43,],[39,-18,47,-19,-20,-21,-22,]),'LLAVECIERRA':([28,35,40,41,42,43,49,53,54,55,56,57,62,80,100,106,108,],[-18,46,-19,-20,-21,-22,-60,-57,-58,-59,-61,-62,84,91,102,-55,-56,]),'PUNTOCOMA':([29,30,31,47,49,50,51,52,53,54,55,56,57,59,63,64,81,85,86,87,88,89,93,97,98,102,],[41,42,43,62,-60,-27,-29,-32,-57,-58,-59,-61,-62,80,-28,-31,-30,-44,-36,-45,-37,-51,-52,-54,-50,-53,]),'MENORQUE':([33,49,50,51,53,54,55,56,57,81,82,85,87,],[45,-60,67,67,-57,-58,-59,-61,-62,67,67,-44,-45,]),'NUMERO':([37,39,48,60,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,99,103,104,107,],[53,53,53,53,53,53,-46,-47,-48,-49,-38,-39,-40,-41,-42,-43,53,53,53,53,53,53,53,]),'CADENA':([37,39,48,60,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,99,103,104,107,],[54,54,54,54,54,54,-46,-47,-48,-49,-38,-39,-40,-41,-42,-43,54,54,54,54,54,54,54,]),'TRUE':([37,39,48,60,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,99,103,104,107,],[56,56,56,56,56,56,-46,-47,-48,-49,-38,-39,-40,-41,-42,-43,56,56,56,56,56,56,56,]),'FALSE':([37,39,48,60,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,99,103,104,107,],[57,57,57,57,57,57,-46,-47,-48,-49,-38,-39,-40,-41,-42,-43,57,57,57,57,57,57,57,]),'IGUALQUE':([49,50,51,53,54,55,56,57,81,82,85,87,],[-60,69,69,-57,-58,-59,-61,-62,69,69,-44,-45,]),'DIFERENTEQUE':([49,50,51,53,54,55,56,57,81,82,85,87,],[-60,70,70,-57,-58,-59,-61,-62,70,70,-44,-45,]),'SUMA':([49,50,52,53,54,55,56,57,63,64,86,88,],[-60,71,71,-57,-58,-59,-61,-62,71,71,-36,-37,]),'RESTA':([49,50,52,53,54,55,56,57,63,64,86,88,],[-60,72,72,-57,-58,-59,-61,-62,72,72,-36,-37,]),'MULTIPLICACION':([49,50,52,53,54,55,56,57,63,64,86,88,],[-60,73,73,-57,-58,-59,-61,-62,73,73,-36,-37,]),'DIVISION':([49,50,52,53,54,55,56,57,63,64,86,88,],[-60,74,74,-57,-58,-59,-61,-62,74,74,-36,-37,]),'DIVENTERA':([49,50,52,53,54,55,56,57,63,64,86,88,],[-60,75,75,-57,-58,-59,-61,-62,75,75,-36,-37,]),'RESIDUO':([49,50,52,53,54,55,56,57,63,64,86,88,],[-60,76,76,-57,-58,-59,-61,-62,76,76,-36,-37,]),'DOSPUNTOS':([49,53,54,55,56,57,101,105,],[-60,-57,-58,-59,-61,-62,104,107,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -17,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'asignacion':([0,],[1,]),'tipoDato':([0,],[3,]),'operadores_asignacion':([2,],[10,]),'valores':([10,23,24,29,36,37,42,],[17,25,28,43,44,45,46,]),'booleano':([10,23,24,29,36,37,42,],[20,20,20,20,20,20,20,]),'operacion_aritmetica':([23,],[26,]),'comparacion':([24,],[27,]),'operadores_aritmeticos':([25,26,],[29,36,]),'comparador':([27,28,],[37,42,]),} +_lr_goto_items = {'funcion':([0,],[1,]),'tipoDato':([0,12,13,20,22,24,27,35,45,83,],[2,14,14,23,25,25,25,25,61,92,]),'parametros':([12,13,],[15,17,]),'empty':([12,13,],[16,16,]),'bloque':([22,24,],[27,35,]),'expresiones':([22,24,27,35,],[28,28,40,40,]),'asignacion':([22,24,27,35,],[29,29,29,29,]),'mapa':([22,24,27,35,],[30,30,30,30,]),'mapaFunciones':([22,24,27,35,],[31,31,31,31,]),'valores':([37,39,48,60,65,66,77,78,79,99,103,104,107,],[50,59,63,82,85,86,87,88,90,101,105,106,108,]),'comparacion':([37,60,],[51,81,]),'operacion_aritmetica':([37,48,],[52,64,]),'booleano':([37,39,48,60,65,66,77,78,79,99,103,104,107,],[55,55,55,55,55,55,55,55,55,55,55,55,55,]),'comparador':([50,51,81,82,],[65,77,77,65,]),'operadores_aritmeticos':([50,52,63,64,],[66,78,66,78,]),'creacionMapa':([96,],[98,]),'paresClaveValor':([99,],[100,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): @@ -26,45 +26,74 @@ _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ - ("S' -> asignacion","S'",1,None,None,None), - ('asignacion -> VARIABLE operadores_asignacion valores','asignacion',3,'p_asignacion','sintactico.py',44), - ('asignacion -> tipoDato VARIABLE IGUAL valores','asignacion',4,'p_asignacion','sintactico.py',45), - ('asignacion -> BOOL VARIABLE IGUAL comparacion','asignacion',4,'p_asignacion','sintactico.py',46), - ('asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica','asignacion',4,'p_asignacion','sintactico.py',47), - ('operacion_aritmetica -> valores operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',52), - ('operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',53), - ('operadores_aritmeticos -> SUMA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',57), - ('operadores_aritmeticos -> RESTA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',58), - ('operadores_aritmeticos -> MULTIPLICACION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',59), - ('operadores_aritmeticos -> DIVISION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',60), - ('operadores_aritmeticos -> DIVENTERA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',61), - ('operadores_aritmeticos -> RESIDUO','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',62), - ('operadores_asignacion -> IGUAL','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',65), - ('operadores_asignacion -> ASIGNACIONAUMENTADA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',66), - ('operadores_asignacion -> ASIGNACIONDISMINUIDA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',67), - ('comparacion -> valores comparador valores','comparacion',3,'p_comparacion','sintactico.py',70), - ('comparacion -> comparacion comparador valores','comparacion',3,'p_comparacion','sintactico.py',71), - ('comparador -> MENORQUE','comparador',1,'p_comparador','sintactico.py',74), - ('comparador -> MAYORQUE','comparador',1,'p_comparador','sintactico.py',75), - ('comparador -> IGUALQUE','comparador',1,'p_comparador','sintactico.py',76), - ('comparador -> DIFERENTEQUE','comparador',1,'p_comparador','sintactico.py',77), - ('mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa','mapa',9,'p_mapa','sintactico.py',81), - ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN','mapaFunciones',5,'p_mapa_funciones','sintactico.py',84), - ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN','mapaFunciones',6,'p_mapa_funciones','sintactico.py',85), - ('creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA','creacionMapa',3,'p_creacion_mapa','sintactico.py',88), - ('creacionMapa -> VARIABLE','creacionMapa',1,'p_creacion_mapa','sintactico.py',89), - ('paresClaveValor -> valores DOSPUNTOS valores','paresClaveValor',3,'p_pares_clave_valor','sintactico.py',92), - ('paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores','paresClaveValor',5,'p_pares_clave_valor','sintactico.py',93), - ('valores -> NUMERO','valores',1,'p_valores','sintactico.py',96), - ('valores -> CADENA','valores',1,'p_valores','sintactico.py',97), - ('valores -> booleano','valores',1,'p_valores','sintactico.py',98), - ('valores -> VARIABLE','valores',1,'p_valores','sintactico.py',99), - ('booleano -> TRUE','booleano',1,'p_booleano','sintactico.py',102), - ('booleano -> FALSE','booleano',1,'p_booleano','sintactico.py',103), - ('tipoDato -> STRING','tipoDato',1,'p_tipo_dato','sintactico.py',106), - ('tipoDato -> INT','tipoDato',1,'p_tipo_dato','sintactico.py',107), - ('tipoDato -> BOOL','tipoDato',1,'p_tipo_dato','sintactico.py',108), - ('tipoDato -> DOUBLE','tipoDato',1,'p_tipo_dato','sintactico.py',109), - ('tipoDato -> DYNAMIC','tipoDato',1,'p_tipo_dato','sintactico.py',110), - ('tipoDato -> VAR','tipoDato',1,'p_tipo_dato','sintactico.py',111), + ("S' -> funcion","S'",1,None,None,None), + ('funcion -> tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA','funcion',11,'p_funciones','sintactico.py',23), + ('funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA','funcion',8,'p_funciones','sintactico.py',24), + ('funcion -> VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA','funcion',10,'p_funciones','sintactico.py',25), + ('estructuras -> estructuraFor','estructuras',1,'p_estructuras','sintactico.py',28), + ('estructuras -> estructuraWhile','estructuras',1,'p_estructuras','sintactico.py',29), + ('estructuras -> estructuraIf','estructuras',1,'p_estructuras','sintactico.py',30), + ('estructuraFor -> FOR LPAREN asignacion PUNTOCOMA comparacion PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA','estructuraFor',11,'p_estructuraFor','sintactico.py',33), + ('estructuraFor -> estructuraWhile','estructuraFor',1,'p_estructuraFor','sintactico.py',34), + ('aumento -> VARIABLE IGUAL operacion_aritmetica','aumento',3,'p_aumento','sintactico.py',37), + ('aumento -> VARIABLE operadores_asignacion valores','aumento',3,'p_aumento','sintactico.py',38), + ('estructuraWhile -> WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA','estructuraWhile',7,'p_estructuraWhile','sintactico.py',41), + ('estructuraIf -> IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA','estructuraIf',7,'p_estructuraIf','sintactico.py',45), + ('estructuraIf -> estructuraIfElse','estructuraIf',1,'p_estructuraIf','sintactico.py',46), + ('estructuraIfElse -> estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA','estructuraIfElse',5,'p_estructuraIfElse','sintactico.py',49), + ('argumentoEstructura -> VARIABLE','argumentoEstructura',1,'p_argumentoEstructura','sintactico.py',52), + ('argumentoEstructura -> booleano','argumentoEstructura',1,'p_argumentoEstructura','sintactico.py',53), + ('argumentoEstructura -> comparacion','argumentoEstructura',1,'p_argumentoEstructura','sintactico.py',54), + ('bloque -> expresiones','bloque',1,'p_bloque','sintactico.py',57), + ('bloque -> bloque expresiones','bloque',2,'p_bloque','sintactico.py',58), + ('expresiones -> asignacion PUNTOCOMA','expresiones',2,'p_expresiones','sintactico.py',61), + ('expresiones -> mapa PUNTOCOMA','expresiones',2,'p_expresiones','sintactico.py',62), + ('expresiones -> mapaFunciones PUNTOCOMA','expresiones',2,'p_expresiones','sintactico.py',63), + ('parametros -> parametros COMA tipoDato VARIABLE','parametros',4,'p_parametros','sintactico.py',66), + ('parametros -> tipoDato VARIABLE','parametros',2,'p_parametros','sintactico.py',67), + ('parametros -> empty','parametros',1,'p_parametros','sintactico.py',68), + ('import -> IMPORT CADENA PUNTOCOMA','import',3,'p_import','sintactico.py',71), + ('asignacion -> VARIABLE IGUAL valores','asignacion',3,'p_asignacion','sintactico.py',74), + ('asignacion -> tipoDato VARIABLE IGUAL valores','asignacion',4,'p_asignacion','sintactico.py',75), + ('asignacion -> VARIABLE IGUAL comparacion','asignacion',3,'p_asignacion','sintactico.py',76), + ('asignacion -> BOOL VARIABLE IGUAL comparacion','asignacion',4,'p_asignacion','sintactico.py',77), + ('asignacion -> tipoDato VARIABLE IGUAL operacion_aritmetica','asignacion',4,'p_asignacion','sintactico.py',78), + ('asignacion -> VARIABLE IGUAL operacion_aritmetica','asignacion',3,'p_asignacion','sintactico.py',79), + ('operadores_asignacion -> IGUAL','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',83), + ('operadores_asignacion -> ASIGNACIONAUMENTADA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',84), + ('operadores_asignacion -> ASIGNACIONDISMINUIDA','operadores_asignacion',1,'p_operadores_asignacion','sintactico.py',85), + ('operacion_aritmetica -> valores operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',88), + ('operacion_aritmetica -> operacion_aritmetica operadores_aritmeticos valores','operacion_aritmetica',3,'p_operacion_aritmetica','sintactico.py',89), + ('operadores_aritmeticos -> SUMA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',93), + ('operadores_aritmeticos -> RESTA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',94), + ('operadores_aritmeticos -> MULTIPLICACION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',95), + ('operadores_aritmeticos -> DIVISION','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',96), + ('operadores_aritmeticos -> DIVENTERA','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',97), + ('operadores_aritmeticos -> RESIDUO','operadores_aritmeticos',1,'p_operadores_aritmeticos','sintactico.py',98), + ('comparacion -> valores comparador valores','comparacion',3,'p_comparacion','sintactico.py',103), + ('comparacion -> comparacion comparador valores','comparacion',3,'p_comparacion','sintactico.py',104), + ('comparador -> MENORQUE','comparador',1,'p_comparador','sintactico.py',107), + ('comparador -> MAYORQUE','comparador',1,'p_comparador','sintactico.py',108), + ('comparador -> IGUALQUE','comparador',1,'p_comparador','sintactico.py',109), + ('comparador -> DIFERENTEQUE','comparador',1,'p_comparador','sintactico.py',110), + ('mapa -> MAP MENORQUE tipoDato COMA tipoDato MAYORQUE VARIABLE IGUAL creacionMapa','mapa',9,'p_mapa','sintactico.py',114), + ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN RPAREN','mapaFunciones',5,'p_mapa_funciones','sintactico.py',117), + ('mapaFunciones -> VARIABLE PUNTO VARIABLE LPAREN valores RPAREN','mapaFunciones',6,'p_mapa_funciones','sintactico.py',118), + ('creacionMapa -> LLAVEABRE paresClaveValor LLAVECIERRA','creacionMapa',3,'p_creacion_mapa','sintactico.py',121), + ('creacionMapa -> VARIABLE','creacionMapa',1,'p_creacion_mapa','sintactico.py',122), + ('paresClaveValor -> valores DOSPUNTOS valores','paresClaveValor',3,'p_pares_clave_valor','sintactico.py',125), + ('paresClaveValor -> paresClaveValor COMA valores DOSPUNTOS valores','paresClaveValor',5,'p_pares_clave_valor','sintactico.py',126), + ('valores -> NUMERO','valores',1,'p_valores','sintactico.py',129), + ('valores -> CADENA','valores',1,'p_valores','sintactico.py',130), + ('valores -> booleano','valores',1,'p_valores','sintactico.py',131), + ('valores -> VARIABLE','valores',1,'p_valores','sintactico.py',132), + ('booleano -> TRUE','booleano',1,'p_booleano','sintactico.py',135), + ('booleano -> FALSE','booleano',1,'p_booleano','sintactico.py',136), + ('tipoDato -> STRING','tipoDato',1,'p_tipo_dato','sintactico.py',139), + ('tipoDato -> INT','tipoDato',1,'p_tipo_dato','sintactico.py',140), + ('tipoDato -> BOOL','tipoDato',1,'p_tipo_dato','sintactico.py',141), + ('tipoDato -> DOUBLE','tipoDato',1,'p_tipo_dato','sintactico.py',142), + ('tipoDato -> DYNAMIC','tipoDato',1,'p_tipo_dato','sintactico.py',143), + ('tipoDato -> VAR','tipoDato',1,'p_tipo_dato','sintactico.py',144), + ('empty -> ','empty',0,'p_empty','sintactico.py',174), ] diff --git a/sintactico.py b/sintactico.py index 3c24b9e..a869bc5 100644 --- a/sintactico.py +++ b/sintactico.py @@ -18,35 +18,71 @@ # | bloque estructuras # ''' # ####AQUI AÑADI ESTRUCTURAS PARA HACER PRUEBAS ^ <------------- - - -# def p_funciones(p): -# '''funcion : tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA -# | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA -# | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA''' - -# def p_parametros(p): -# '''parametros : tipoDato VARIABLE -# | parametros COMA tipoDato VARIABLE -# | empty''' - - - -# def p_expresion(p): -# '''expresion : mapa PUNTOCOMA -# | mapaFunciones PUNTOCOMA -# | asignacion PUNTOCOMA''' - -# def p_import(p): -# '''import : IMPORT CADENA PUNTOCOMA''' + +def p_funciones(p): + '''funcion : tipoDato VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN valores PUNTOCOMA LLAVECIERRA + | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque LLAVECIERRA + | VOID VARIABLE LPAREN parametros RPAREN LLAVEABRE bloque RETURN PUNTOCOMA LLAVECIERRA''' + +def p_estructuras(p): + ''' estructuras : estructuraFor + | estructuraWhile + | estructuraIf''' + +def p_estructuraFor(p): + ''' estructuraFor : FOR LPAREN asignacion PUNTOCOMA comparacion PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA + | estructuraWhile''' + +def p_aumento(p): + ''' aumento : VARIABLE IGUAL operacion_aritmetica + | VARIABLE operadores_asignacion valores''' + +def p_estructuraWhile(p): + ''' estructuraWhile : WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA + ''' + +def p_estructuraIf(p): + ''' estructuraIf : IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA + | estructuraIfElse''' + +def p_estructuraIfElse(p): + ''' estructuraIfElse : estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA''' + +def p_argumentoEstructura(p): + ''' argumentoEstructura : VARIABLE + | booleano + | comparacion''' + +def p_bloque(p): + '''bloque : expresiones + | bloque expresiones''' + +def p_expresiones(p): + '''expresiones : asignacion PUNTOCOMA + | mapa PUNTOCOMA + | mapaFunciones PUNTOCOMA''' + +def p_parametros(p): + '''parametros : parametros COMA tipoDato VARIABLE + | tipoDato VARIABLE + | empty''' + +def p_import(p): + '''import : IMPORT CADENA PUNTOCOMA''' def p_asignacion(p): - '''asignacion : VARIABLE operadores_asignacion valores + '''asignacion : VARIABLE IGUAL valores | tipoDato VARIABLE IGUAL valores + | VARIABLE IGUAL comparacion | BOOL VARIABLE IGUAL comparacion - | tipoDato VARIABLE IGUAL operacion_aritmetica''' + | tipoDato VARIABLE IGUAL operacion_aritmetica + | VARIABLE IGUAL operacion_aritmetica + ''' -#EN ^ ESTA REGLAS ELIMINÉ LO SIGUIENTE PORQUE DABA PROBLEMAS: VARIABLE IGUAL comparacion , VARIABLE operadores_asignacion operacion_aritmetica +def p_operadores_asignacion(p): + '''operadores_asignacion : IGUAL + | ASIGNACIONAUMENTADA + | ASIGNACIONDISMINUIDA''' def p_operacion_aritmetica(p): '''operacion_aritmetica : valores operadores_aritmeticos valores @@ -61,10 +97,7 @@ def p_operadores_aritmeticos(p): | DIVENTERA | RESIDUO''' -def p_operadores_asignacion(p): - '''operadores_asignacion : IGUAL - | ASIGNACIONAUMENTADA - | ASIGNACIONDISMINUIDA''' + def p_comparacion(p): '''comparacion : valores comparador valores @@ -118,24 +151,11 @@ def p_tipo_dato(p): # | estructuraWhile # | estructuraFor''' -# def p_estructuraIf(p): -# ''' estructuraIf : IF LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA -# | IF LPAREN argumentoEstructura RPAREN LLAVEABRE estructuraIf LLAVECIERRA -# | estructuraIfElse -# ''' -# def p_estructuraIfElse(p): -# ''' estructuraIfElse : estructuraIf ELSE LLAVEABRE bloque LLAVECIERRA -# | estructuraIf ELSE LLAVEABRE estructuraIf LLAVECIERRA -# ''' -# def p_estructuraWhile(p): -# ''' estructuraWhile : WHILE LPAREN argumentoEstructura RPAREN LLAVEABRE bloque LLAVECIERRA -# ''' -# def p_estructuraFor(p): -# ''' estructuraFor : FOR LPAREN asignacion PUNTOCOMA comparacion PUNTOCOMA aumento RPAREN LLAVEABRE bloque LLAVECIERRA''' + # def p_asignacionVacio(p): # ''' asignacionVacio : asignacion @@ -146,19 +166,12 @@ def p_tipo_dato(p): # | booleano''' -# def p_aumento(p): -# ''' aumento : VARIABLE IGUAL operacion_aritmetica -# | VARIABLE operadores_asignacion NUMERO -# | VARIABLE operadores_asignacion VARIABLE''' -# def p_argumentoEstructura(p): -# ''' argumentoEstructura : VARIABLE -# | booleano -# | comparacion -# ''' -# def p_empty(p): -# 'empty :' + + +def p_empty(p): + 'empty :' # Error rule for syntax errors def p_error(p): print("Syntax error in input!")