AƱadido el numero de linea a los errores de resoluciĆ³n de nombres
authordanigm <danigm@arch_box>
Sun, 30 Mar 2008 18:03:20 +0000 (20:03 +0200)
committerdanigm <danigm@arch_box>
Sun, 30 Mar 2008 18:03:20 +0000 (20:03 +0200)
22 files changed:
Acceso.java
AnaSem.java [deleted file]
AnaSem.smap [deleted file]
AnaSem2.java [deleted file]
AnaSemTokenTypes.java [deleted file]
AnaSemTokenTypes.txt [deleted file]
Analex.g
Analex.java [deleted file]
Analex.smap [deleted file]
AnalexTokenTypes.java [deleted file]
AnalexTokenTypes.txt [deleted file]
Anasint.g
Anasint.java [deleted file]
Anasint.smap [deleted file]
AnasintTokenTypes.java [deleted file]
AnasintTokenTypes.txt [deleted file]
ArbolLineas.java [new file with mode: 0644]
Identificador_Tipo.java
Lista_Accesos.java
Principal.java
ResNom.g
pila.mod

index 89849d1..d61094a 100644 (file)
@@ -3,7 +3,14 @@ public class Acceso {
        int numero; //identificador unico para cada acceso simple en un ambito
        String nombre; //nombre del acceso simple
        Ambito contenedor; //ambito contenedor del acceso simple
+       int linea;
        
+       public int getLinea() {
+               return linea;
+       }
+       public void setLinea(int linea) {
+               this.linea = linea;
+       }
        public Acceso(int numero, String nombre, Ambito contenedor){
                this.numero = numero;
                this.nombre = nombre;
diff --git a/AnaSem.java b/AnaSem.java
deleted file mode 100644 (file)
index baf0801..0000000
+++ /dev/null
@@ -1,5510 +0,0 @@
-// $ANTLR : "AnaSem.g" -> "AnaSem.java"$
\r
-       \r
-       import java.util.*; \r
-\r
-
-import antlr.TreeParser;
-import antlr.Token;
-import antlr.collections.AST;
-import antlr.RecognitionException;
-import antlr.ANTLRException;
-import antlr.NoViableAltException;
-import antlr.MismatchedTokenException;
-import antlr.SemanticException;
-import antlr.collections.impl.BitSet;
-import antlr.ASTPair;
-import antlr.collections.impl.ASTArray;
-
-
-public class AnaSem extends antlr.TreeParser       implements AnaSemTokenTypes
- {
\r
-  int cont_dev; // variable contador del numero de instrucciones DEV en un metodo\r
-       \r
-       \r
-       Atr_Expr AS_Literal(AST lit){\r
-               Atr_Expr result = new Atr_Expr();\r
-               AST tipo;\r
-               if(lit == null) return null;\r
-               switch(lit.getType()){\r
-               case LIT_ENTERO: \r
-                       tipo = (AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(ENTERO,"entero")));\r
-                       break;\r
-               case LIT_REAL:\r
-                       tipo = (AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(REAL,"real")));\r
-                       break;\r
-               case LIT_CAR: \r
-                       tipo = (AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(CARACTER,"caracter")));\r
-                       break;\r
-               case CIERTO:\r
-               case FALSO:\r
-                       tipo = (AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(LOGICO,"logico")));\r
-                       break;\r
-               default:\r
-                       return null;\r
-               }\r
-               result.setTipo(tipo);\r
-               result.setLVal(false);\r
-               result.setRVal(true);\r
-               return result;\r
-       }\r
-       \r
-       Atr_Expr AS_Acceso_Simple(AST dec){\r
-               Atr_Expr result = new Atr_Expr();\r
-               AST tipo = null;\r
-               if (dec == null) return null;\r
-               switch(dec.getType()){\r
-               case MODULO:\r
-                       System.out.println("ERROR CT: el tipo es modulo");\r
-                       return null;\r
-               case CLASE: //acceso a clase no instanciable\r
-                       tipo = dec;\r
-                       result.setLVal(false);\r
-                       result.setRVal(false);\r
-                       break;\r
-               case ATRIBUTO://acceso a un atributo de la propia clase\r
-                       tipo = dec.getFirstChild().getNextSibling();\r
-                       result.setLVal(true);\r
-                       result.setRVal(true);\r
-                       break;\r
-               case METODO: //acceso a un metodo de la propia clase\r
-                       tipo = dec.getFirstChild();\r
-                       result.setLVal(false);\r
-                       result.setRVal(false);\r
-                       break;\r
-               case PARAMETRO:\r
-                       tipo = dec.getFirstChild().getNextSibling();\r
-                       result.setLVal(false);\r
-                       result.setRVal(true);\r
-                       break;\r
-               case VARIABLE_LOCAL:\r
-                       tipo = dec.getFirstChild().getNextSibling();\r
-                       result.setLVal(true);\r
-                       result.setRVal(true);\r
-                       break;\r
-               case ERROR:\r
-                       return null;\r
-               }\r
-               result.setTipo(tipo);\r
-               return result;\r
-       }\r
-       \r
-       Atr_Expr AS_Acceso_Objeto(Atr_Expr atr_raiz, AST raiz, AST atrib){\r
-               Atr_Expr result = new Atr_Expr();\r
-               AST tipo, tipo_raiz, aux;\r
-               if(atr_raiz == null || raiz == null || atrib ==null) return null;\r
-               //comprobar que el tipo de la raiz sea clase\r
-               tipo_raiz = atr_raiz.getTipo();\r
-               if(tipo_raiz.getType() != CLASE){\r
-                       System.out.println("ERROR CT: "+raiz.getFirstChild().getText()+" no es una clase");\r
-                       return null;\r
-               }\r
-               //si la raiz es una clase instanciable\r
-               if(raiz.getFirstChild().getNextSibling().getType() == CLASE){\r
-                       if(tipo_raiz.getFirstChild().getNextSibling().getType() != NO_INST){\r
-                               System.out.println("ERROR CT: "+raiz.getFirstChild().getText()+" es una clase instanciable");\r
-                               return null;\r
-                       }\r
-               }\r
-               //si la raiz es un objeto\r
-               else{\r
-                       if(tipo_raiz.getFirstChild().getNextSibling().getType() != INST){\r
-                               System.out.println("ERROR CT: "+raiz.getFirstChild().getText()+" es un objeto de clase no instanciable");\r
-                               return null;\r
-                       }\r
-               }\r
-               //comprobar que "atrib" sea un atributo o metodo de la clase y ademas sea visible\r
-               aux = tipo_raiz.getFirstChild().getNextSibling().getNextSibling();\r
-               while(aux!= null){\r
-                       if(aux.getType() == METODO){\r
-                               if(aux.getFirstChild().getFirstChild().equals(atrib))\r
-                                       break;\r
-                       }else{ //atributo\r
-                               if(aux.getFirstChild().equals(atrib))\r
-                                       break;\r
-                       }\r
-                       aux = aux.getNextSibling();\r
-               }\r
-               if(aux == null){\r
-                       System.out.println("ERROR CT: el atributo "+atrib.getText()+" no pertenece a la clase "+raiz.getFirstChild().getText());\r
-                       return null;\r
-               }\r
-               if(aux.getFirstChild().getNextSibling().getNextSibling().getType() != VISIBLE){\r
-                       System.out.println("ERROR CT: el atributo "+atrib.getText()+" no es visible");\r
-                       return null;\r
-               }\r
-               \r
-               //tipo de la expresion\r
-               if(aux.getType() == METODO){\r
-                       tipo = aux.getFirstChild();\r
-                       result.setLVal(false);\r
-                       result.setRVal(false);\r
-               }else{ //atributo\r
-                       tipo = aux.getFirstChild().getNextSibling();\r
-                       result.setLVal(true);\r
-                       result.setRVal(true);\r
-               }\r
-               result.setTipo(tipo);\r
-               return result;\r
-       \r
-       }\r
-       \r
-       //hay que pasarle la raiz para saber el nombre de la raiz cuando no es un metodo\r
-       Atr_Expr AS_Llamada(Atr_Expr atr_raiz, LinkedList expresiones){\r
-               ListIterator it = expresiones.listIterator();\r
-               Atr_Expr result = new Atr_Expr();\r
-               AST pars, par_f, tipo;\r
-               Atr_Expr par_r;\r
-               \r
-               //comprobar que atr_raiz no se a null\r
-               if(atr_raiz == null || expresiones == null){\r
-                       return null;\r
-               }\r
-               //comprobar que la raiz sea de tipo prototipo\r
-               if(atr_raiz.getTipo().getType() != PROTOTIPO){\r
-                       System.out.println("ERROR CT: "+atr_raiz.getTipo().getText()+" no es un metodo.");\r
-                       return null;\r
-               }\r
-               //comprobar que los parametros reales coinciden con los formales\r
-               pars = atr_raiz.getTipo().getFirstChild().getNextSibling();\r
-               par_f = pars.getFirstChild();\r
-               while (it.hasNext() && (par_f != null)){\r
-                       par_r = (Atr_Expr)it.next();\r
-                       if(! par_f.getFirstChild().getNextSibling().equalsTree(par_r.getTipo())){\r
-                               System.out.println("ERROR CT: El numero de parametros en el metodo \""+atr_raiz.getTipo().getFirstChild().getText()+"\" es incorrecto.");\r
-                               return null;\r
-                       }\r
-                       par_f = par_f.getNextSibling();\r
-               }\r
-               if(it.hasNext() && (par_f == null)){\r
-                       System.out.println("ERROR CT: El numero de parametros en el metodo \""+atr_raiz.getTipo().getFirstChild().getText()+"\" es incorrecto.");\r
-                       return null;\r
-               }\r
-               if(!it.hasNext() && (par_f != null)){\r
-                       System.out.println("ERROR CT: El numero de parametros en el metodo \""+atr_raiz.getTipo().getFirstChild().getText()+"\" es incorrecto.");\r
-                       return null;\r
-               }\r
-               //el tipo de la expresion es el rango del metodo\r
-               tipo = atr_raiz.getTipo().getFirstChild().getNextSibling().getNextSibling().getFirstChild();\r
-               result.setLVal(false);\r
-               result.setRVal(true);\r
-               result.setTipo(tipo);\r
-               return result;\r
-       }\r
-       \r
-       Atr_Expr AS_Acceso_Tabla(Atr_Expr atr_raiz, LinkedList expresiones){\r
-               if(atr_raiz == null || expresiones == null) return null;\r
-               ListIterator it = expresiones.listIterator();\r
-               Atr_Expr result = new Atr_Expr();\r
-               Atr_Expr aux;\r
-               AST tipo;\r
-               int tam = 0;\r
-               //comprobar que el tipo de la raizes una formacion\r
-               //TODO\r
-               if(atr_raiz.getTipo().getType() != FORMACION){\r
-                       System.out.println("ERROR CT: intentando acceder a \""+atr_raiz.getTipo().getText()+"\" como formacion");\r
-                       return null;\r
-               }\r
-               //comprobar que el numero de expresiones coincida con el numero  de dimensiones\r
-               while(it.hasNext()){\r
-                       tam++;\r
-                       aux = (Atr_Expr) it.next();\r
-                       if(aux == null) return null;\r
-                       if(aux.getTipo().getType() != ENTERO){\r
-                               System.out.println("ERROR CT: no coinciden el numero de expresiones en el acceso a formacion");\r
-                               return null;\r
-                       }\r
-               }\r
-               if(tam != atr_raiz.getTipo().getFirstChild().getNumberOfChildren()){\r
-                       System.out.println("ERROR CT: no coinciden el numero de expresiones en el acceso a formacion");\r
-                       return null;\r
-               }\r
-               tipo = atr_raiz.getTipo().getFirstChild().getNextSibling();\r
-               result.setTipo(tipo);\r
-               result.setLVal(atr_raiz.getLVal());\r
-               result.setRVal(atr_raiz.getRVal());\r
-               return result;\r
-       }\r
-       \r
-       \r
-       \r
-       //AS DE EXPRESIONES\r
-  \r
-  //Expresiones binarias aritmeticas\r
-  Atr_Expr AS_Exp_Bin_Arit(Atr_Expr e1, Atr_Expr e2){\r
-       Atr_Expr result = new Atr_Expr();\r
-       String men="";\r
-       if(e1 == null || e2 == null) return null;\r
-       \r
-       //Comprobamos que e1 y e2 sean consultables\r
-       if(!e1.getLVal() || !e2.getRVal()){\r
-               if (!e2.getRVal()) men="ERROR LR: la expresion no puede aparecer a la derecha de una expresion binaria" ;\r
-               if (!e1.getLVal()) men="ERROR LR: la expresion no puede aparecer a la izquierda de una expresion binaria" ;\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-       \r
-       //Comprobamos que e1 y e2 sean numericas y compatibles\r
-       if((e1.getTipo().getType()!=ENTERO) && (e1.getTipo().getType()!=REAL) ||\r
-       (e2.getTipo().getType()!=ENTERO) && (e2.getTipo().getType()!=REAL)){\r
-               System.out.println("ERROR CT: no son expresiones numericas ("+e1.getTipo().getText()+" y "+e2.getTipo().getText()+")");\r
-               return null;\r
-       }\r
-       if(!e1.getTipo().equals(e2.getTipo())){\r
-               System.out.println("ERROR CT: Los tipos no son compatibles ("+e1.getTipo().getText()+" y "+e2.getTipo().getText()+")");\r
-               return null;\r
-       }\r
-       \r
-       //Calculamos el tipo\r
-       result.setTipo(e1.getTipo());\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       \r
-       return result;\r
-  }\r
-  \r
-  \r
-  //Expresiones binarias logicas\r
-  Atr_Expr AS_Exp_Bin_Log(Atr_Expr e1, Atr_Expr e2){\r
-       Atr_Expr result = new Atr_Expr();\r
-       String men = "";\r
-       \r
-       if(e1 == null || e2 == null) return null;\r
-       //Comprobar que las expresiones son consultables\r
-       if(!e1.getLVal() || !e2.getRVal()){\r
-               if (!e2.getRVal()) men ="ERROR LR: la expresion no puede aparecer a la derecha de la expresion" ;\r
-               if (!e1.getLVal()) men ="ERROR LR: la expresion "+e1.getTipo().getFirstChild().getText()+" no puede aparecer a la izquierda de la expresion" ;\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-       \r
-       //Comprobamos que sean de tipo logico\r
-       if((e1.getTipo().getType()!=LOGICO) || (e2.getTipo().getType()!=LOGICO)){\r
-               if (e1.getTipo().getType()!=LOGICO)\r
-                       men = "ERROR CT: la expresion "+e1.getTipo().getFirstChild().getText()+"no es de tipo logico";\r
-               if (e2.getTipo().getType()!=LOGICO)\r
-                       men = "ERROR CT: la expresion "+e2.getTipo().getFirstChild().getText()+"no es de tipo logico";\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-       \r
-       //Calculamos el tipo\r
-       result.setTipo(e1.getTipo());\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       \r
-       return result;\r
-  }\r
-  \r
-  //Expresiones binarias relacionales\r
-  Atr_Expr AS_Exp_Bin_Rel(Atr_Expr e1, Atr_Expr e2, AST operador){\r
-       Atr_Expr result = new Atr_Expr();\r
-       AST tipo;\r
-       String men = "";\r
-       \r
-       if(e1 == null || e2 == null || operador == null) return null;\r
-       //Comprobamos que las expresiones son consultables\r
-       if(!e1.getLVal() || !e2.getRVal()){\r
-               if (!e2.getRVal()) men ="ERROR LR: la expresion no se puede consultar en la expresion binaria" ;\r
-               if (!e1.getLVal()) men ="ERROR LR: la expresion "+e1.getTipo().getFirstChild().getText()+" no puede aparecer a la izquierda en la expresion";\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-       \r
-       //No dejamos que se utilicen formaciones y comprobamos la compatibilidad de las expresiones\r
-       if(e1.getTipo().getType()==FORMACION){\r
-               System.out.println("ERROR CT: no puede tener formaciones en expresiones relacionales");\r
-               return null;\r
-       }\r
-       men = "ERROR CT: Los tipos no son compatibles ("+e1.getTipo().getText()+" y "+e2.getTipo().getText()+")";\r
-       if(!e1.getTipo().equals(e2.getTipo())){\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-\r
-       if((e1.getTipo().getType() == CLASE) && (!e1.getTipo().getFirstChild().equals(e2.getTipo().getFirstChild()))){ //Comparamos las clases por nombre\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-       \r
-       //Miramos los grupos de operadores\r
-       if((operador.getType()!=IGUAL && operador.getType()!=DISTINTO) && (e1.getTipo().getType()==CLASE || e1.getTipo().getType()==LOGICO)){\r
-               System.out.println("ERROR CT: el operador \""+operador.getText()+"\" no esta permitido para los tipos usados ("+e1.getTipo().getText()+" y "+e2.getTipo().getText()+")");\r
-               return null;\r
-       }\r
-       \r
-       //Establecemos el tipo\r
-       tipo = (AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(LOGICO,"logico")));\r
-       result.setTipo(tipo);\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       \r
-       return result;\r
-  }\r
-  \r
-  //Expresiones unarias aritmeticas == MENOS UNARIO\r
-  Atr_Expr AS_Exp_Una_Arit(Atr_Expr e){\r
-       Atr_Expr result = new Atr_Expr();\r
-       String men="";\r
-       \r
-       if(e == null) return null;\r
-       //e tiene que ser consultable\r
-       if(!e.getRVal()){\r
-               men ="ERROR LR: la expresion no es consultable" ;\r
-               System.out.println(men);\r
-               return null;\r
-       }\r
-       \r
-       //comprobar que e es de tipo numerico\r
-       if( e.getTipo().getType()!=ENTERO && e.getTipo().getType()!=REAL){\r
-               System.out.println("ERROR CT: el menos unario solo puede ser utilizado en expresiones numericas");\r
-               return null;\r
-       }\r
-       \r
-       //Establecemos el tipo\r
-       result.setTipo(e.getTipo());\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       \r
-       return result;\r
-  }\r
-  \r
-  //Expresiones unarias logicas == NEGACION\r
-  //Identica a la anterior\r
-  Atr_Expr AS_Exp_Una_Log(Atr_Expr e){\r
-       Atr_Expr result = new Atr_Expr();\r
-       \r
-       if(e == null) return null;\r
-       //e tiene que ser consultable\r
-       if(!e.getRVal()){\r
-               System.out.println("ERROR LR: la expresion no es consultable" );\r
-               return null;\r
-       }\r
-       \r
-       //comprobar que e es de tipo numerico\r
-       if( e.getTipo().getType()!=LOGICO){\r
-               System.out.println("ERROR CT: la negacion solo se puede utilizar con expresiones logicas");\r
-               return null;\r
-       }\r
-       \r
-       //Establecemos el tipo\r
-       result.setTipo(e.getTipo());\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       \r
-       return result;\r
-  }\r
-  \r
-  //Instrucciones\r
-  //Asignacion\r
-  void AS_Asignacion(Atr_Expr e1, Atr_Expr e2, AST e3, AST e4){\r
-       //comprobar si alguno es null\r
-       String men = "";\r
-       if(e1==null || e2 == null) return;\r
-               \r
-       //Comprobamos la consultabilidad de las expresiones\r
-       if(!e1.getLVal() || !e2.getRVal()){\r
-               if (!e2.getRVal())\r
-                       men ="ERROR LR: la expresion "+e4.getFirstChild().getText()+" no puede aparecer a la derecha de una asignacion." ;\r
-               if (!e1.getLVal()) men ="ERROR LR: el "+e3.getFirstChild().getNextSibling().getText()+" "+e3.getFirstChild().getText()+" no puede aparecer a la izquierda de una asignacion." ;\r
-               System.out.println(men);\r
-               return;\r
-       }\r
-       \r
-       //No dejamos asignar formaciones y comprobamos la compatibilidad de tipos\r
-       if(e1.getTipo().getType()==FORMACION){\r
-               System.out.println("ERROR CT: no dejamos asignar formaciones");\r
-       }\r
-       men = "ERROR CT: Los tipos no son compatibles ("+e1.getTipo().getText()+" y "+e2.getTipo().getText()+")";\r
-       if(!e1.getTipo().equals(e2.getTipo())){\r
-               System.out.println(men);\r
-       }\r
-       if((e1.getTipo().getType() == CLASE) && (!e1.getTipo().getFirstChild().equals(e2.getTipo().getFirstChild()))){ //Comparamos las clases por nombre\r
-               System.out.println(men);\r
-       }\r
-  }\r
-  \r
-  //Condiciones\r
-  void AS_Condicional(Atr_Expr e){\r
-       String men = "";\r
-       if (e == null) return;\r
-       if(!e.getRVal()){\r
-               men ="ERROR LR: la expresion no es consultable" ;\r
-               System.out.println(men);\r
-               return;\r
-       }\r
-       \r
-       //Comprobamos que es de tipo logico\r
-       if(e.getTipo().getType()!=LOGICO){\r
-               System.out.println("ERROR CT: no es un tipo logico");\r
-       }\r
-  }\r
-  \r
-  //Instruccion de devolucion\r
-  int AS_Devolucion(AST tipo_dev, Atr_Expr e, int cont){\r
-       String men = "";\r
-//  String men = "ERROR CT: Los tipos no son compatibles (entero y real)"\r
-       if(tipo_dev == null || e == null) return cont+1;\r
-       //Comprobamos que el metodo sea funcional\r
-\r
-       if(cont == -1){\r
-               System.out.println("ERROR CT: el metodo no es funcional");\r
-               return -1;\r
-       }\r
-\r
-       //Comprobar que la expresion e es consultable\r
-       if(!e.getRVal()){\r
-               System.out.println("ERROR CT: la expresion no es consultable, no se puede devolver");\r
-       }\r
-       \r
-       men = "ERROR CT: Los tipos no son compatibles ("+e.getTipo().getText()+" y "+tipo_dev.getText()+")";\r
-       //Comprobamos que el tipo de la expresion es compatible con el tipo que se devuelve\r
-       if(!e.getTipo().equals(tipo_dev)){\r
-               System.out.println(men);\r
-       }\r
-       if(tipo_dev.getType()==CLASE && (!tipo_dev.getFirstChild().equals(e.getTipo().getFirstChild()))){\r
-               System.out.println(men);\r
-       }\r
-       \r
-       if(tipo_dev.getType()==FORMACION && (!tipo_dev.equals(e.getTipo()))){\r
-               System.out.println(men);\r
-       }\r
-       \r
-       return cont + 1;\r
-  }\r
-  \r
-  \r
-  Atr_Expr AS_Crear(Atr_Expr as, AST clase){\r
-               if (as == null || clase == null){\r
-                       System.out.println("ERROR CT: no se puede crear");\r
-                        return null;\r
-               }\r
-               //comprobar que el tipo de la variable es el mismo que el del interior de crear\r
-               Atr_Expr result = new Atr_Expr();\r
-               AST tipo = as.getTipo();\r
-               if(tipo.getType() != CLASE){\r
-                       System.out.println("ERROR CT: no es una clase");\r
-                       return null;\r
-               }\r
-               if(!(tipo.getFirstChild().getNextSibling().getType() == INST)){\r
-                       System.out.println("ERROR CT: la clase no es instanciable");\r
-                       return null;\r
-               }\r
-               AST tipo_var = tipo.getFirstChild();\r
-               AST interior = clase;\r
-               if(!tipo_var.getText().equals(interior.getText())){\r
-                       if(interior.getType() == ACCESO_SIMPLE)\r
-                               System.out.println("ERROR CT: Los tipos no son compatibles ("+tipo_var.getText()+" y "+interior.getFirstChild().getText()+")");\r
-                       else\r
-                               System.out.println("ERROR CT: Los tipos no son compatibles ("+tipo_var.getText()+" y "+interior.getText()+")");\r
-                       return null;\r
-               }\r
-               //hay que comprobar que la clase es instanciable, y que el tipo es clase\r
-\r
-               result.setLVal(false);\r
-               result.setRVal(false);\r
-               //el tipo es el de la variable\r
-               result.setTipo(tipo);\r
-               \r
-               return result;\r
-       }       \r
-       \r
-       //AS Escribir\r
-       void AS_Escribir(Atr_Expr e, AST exp){\r
-               if (e == null){\r
-                       if(exp.getType() == ACCESO_SIMPLE)\r
-                               System.out.println("ERROR CT: no se puede escribir "+ exp.getFirstChild().getText());\r
-                       else\r
-                               System.out.println("ERROR CT: no se puede escribir "+ exp.getText());\r
-                       return;\r
-               }\r
-               //Comprobamos que la expresion se pueda consultar\r
-               if(!e.getRVal()){\r
-                       System.out.println("ERROR CT: la expresion no es consultable, no se puede escribir");\r
-               }\r
-       }\r
-\r
-  \r
-  //AS Entero A Real\r
-  Atr_Expr AS_Entero_A_Real(Atr_Expr e1){\r
-       Atr_Expr result = new Atr_Expr();\r
-       if (e1 == null) return null;\r
-       AST tipo = e1.getTipo();\r
-       if(tipo.getType() != ENTERO){\r
-               System.out.println("ERROR CT: El tipo del parametro del operador enteroareal es incorrecto.");\r
-               return null;\r
-         }\r
-       result.setTipo((AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(REAL,"real"))));\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       return result;\r
-  }\r
-  Atr_Expr AS_Real_A_Entero(Atr_Expr e1){\r
-       Atr_Expr result = new Atr_Expr();\r
-       \r
-       if (e1 == null) return null;\r
-       AST tipo = e1.getTipo();\r
-       if(tipo.getType() != REAL){\r
-               System.out.println("ERROR CT: El tipo del parametro del operador realaentero es incorrecto.");\r
-               return null;\r
-       }\r
-       result.setTipo((AST)astFactory.make( (new ASTArray(1)).add(astFactory.create(ENTERO,"entero"))));\r
-       result.setLVal(false);\r
-       result.setRVal(true);\r
-       return result;\r
-  }\r
-  \r
-  \r
-public AnaSem() {
-       tokenNames = _tokenNames;
-}
-
-       public final void declaracion_modulo(AST _t) throws RecognitionException {
-               
-               AST declaracion_modulo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_modulo_AST = null;
-               
-               try {      // for error handling
-                       AST __t9810 = _t;
-                       AST tmp1_AST = null;
-                       AST tmp1_AST_in = null;
-                       tmp1_AST = astFactory.create((AST)_t);
-                       tmp1_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp1_AST);
-                       ASTPair __currentAST9810 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,MODULO);
-                       _t = _t.getFirstChild();
-                       nombre_modulo(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_modulo(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9810;
-                       _t = __t9810;
-                       _t = _t.getNextSibling();
-                       declaracion_modulo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_modulo_AST;
-               _retTree = _t;
-       }
-       
-       public final void nombre_modulo(AST _t) throws RecognitionException {
-               
-               AST nombre_modulo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST nombre_modulo_AST = null;
-               
-               try {      // for error handling
-                       AST tmp2_AST = null;
-                       AST tmp2_AST_in = null;
-                       tmp2_AST = astFactory.create((AST)_t);
-                       tmp2_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp2_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       nombre_modulo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = nombre_modulo_AST;
-               _retTree = _t;
-       }
-       
-       public final void definicion_modulo(AST _t) throws RecognitionException {
-               
-               AST definicion_modulo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST definicion_modulo_AST = null;
-               
-               try {      // for error handling
-                       lista_declaraciones_clases(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_modulo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = definicion_modulo_AST;
-               _retTree = _t;
-       }
-       
-       public final void lista_declaraciones_clases(AST _t) throws RecognitionException {
-               
-               AST lista_declaraciones_clases_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST lista_declaraciones_clases_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9815:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==CLASE)) {
-                                       declaracion_clase(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9815;
-                               }
-                               
-                       } while (true);
-                       }
-                       lista_declaraciones_clases_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = lista_declaraciones_clases_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_clase(AST _t) throws RecognitionException {
-               
-               AST declaracion_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_clase_AST = null;
-               
-               try {      // for error handling
-                       AST __t9817 = _t;
-                       AST tmp3_AST = null;
-                       AST tmp3_AST_in = null;
-                       tmp3_AST = astFactory.create((AST)_t);
-                       tmp3_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp3_AST);
-                       ASTPair __currentAST9817 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,CLASE);
-                       _t = _t.getFirstChild();
-                       nombre_clase(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       cualificador_clase(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_clase(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9817;
-                       _t = __t9817;
-                       _t = _t.getNextSibling();
-                       declaracion_clase_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void nombre_clase(AST _t) throws RecognitionException {
-               
-               AST nombre_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST nombre_clase_AST = null;
-               
-               try {      // for error handling
-                       AST tmp4_AST = null;
-                       AST tmp4_AST_in = null;
-                       tmp4_AST = astFactory.create((AST)_t);
-                       tmp4_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp4_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       nombre_clase_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = nombre_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void cualificador_clase(AST _t) throws RecognitionException {
-               
-               AST cualificador_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST cualificador_clase_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case INST:
-                       {
-                               AST tmp5_AST = null;
-                               AST tmp5_AST_in = null;
-                               tmp5_AST = astFactory.create((AST)_t);
-                               tmp5_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp5_AST);
-                               match(_t,INST);
-                               _t = _t.getNextSibling();
-                               cualificador_clase_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case NO_INST:
-                       {
-                               AST tmp6_AST = null;
-                               AST tmp6_AST_in = null;
-                               tmp6_AST = astFactory.create((AST)_t);
-                               tmp6_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp6_AST);
-                               match(_t,NO_INST);
-                               _t = _t.getNextSibling();
-                               cualificador_clase_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = cualificador_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void definicion_clase(AST _t) throws RecognitionException {
-               
-               AST definicion_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST definicion_clase_AST = null;
-               
-               try {      // for error handling
-                       declaraciones_elementos_clase(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_clase_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = definicion_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaraciones_elementos_clase(AST _t) throws RecognitionException {
-               
-               AST declaraciones_elementos_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaraciones_elementos_clase_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9823:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==ATRIBUTO||_t.getType()==METODO)) {
-                                       declaracion_elemento_clase(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9823;
-                               }
-                               
-                       } while (true);
-                       }
-                       declaraciones_elementos_clase_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaraciones_elementos_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_elemento_clase(AST _t) throws RecognitionException {
-               
-               AST declaracion_elemento_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_elemento_clase_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case METODO:
-                       {
-                               AST __t9825 = _t;
-                               AST tmp7_AST = null;
-                               AST tmp7_AST_in = null;
-                               tmp7_AST = astFactory.create((AST)_t);
-                               tmp7_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp7_AST);
-                               ASTPair __currentAST9825 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,METODO);
-                               _t = _t.getFirstChild();
-                               declaracion_metodo(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               cualificador_elemento_clase(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9825;
-                               _t = __t9825;
-                               _t = _t.getNextSibling();
-                               declaracion_elemento_clase_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ATRIBUTO:
-                       {
-                               AST __t9826 = _t;
-                               AST tmp8_AST = null;
-                               AST tmp8_AST_in = null;
-                               tmp8_AST = astFactory.create((AST)_t);
-                               tmp8_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp8_AST);
-                               ASTPair __currentAST9826 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ATRIBUTO);
-                               _t = _t.getFirstChild();
-                               AST tmp9_AST = null;
-                               AST tmp9_AST_in = null;
-                               tmp9_AST = astFactory.create((AST)_t);
-                               tmp9_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp9_AST);
-                               match(_t,IDENT);
-                               _t = _t.getNextSibling();
-                               tipo(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               cualificador_elemento_clase(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9826;
-                               _t = __t9826;
-                               _t = _t.getNextSibling();
-                               declaracion_elemento_clase_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_elemento_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_metodo(AST _t) throws RecognitionException {
-               
-               AST declaracion_metodo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_metodo_AST = null;
-               AST tipodev;
-               
-               try {      // for error handling
-                       tipodev=prototipo_metodo(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_metodo(_t,tipodev);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       if (cont_dev == 0){
-                               System.out.println("ERROR: Metodo funcional que no devuelve nada");
-                               System.exit(-1);
-                       }
-                       
-                       declaracion_metodo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_metodo_AST;
-               _retTree = _t;
-       }
-       
-       public final void cualificador_elemento_clase(AST _t) throws RecognitionException {
-               
-               AST cualificador_elemento_clase_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST cualificador_elemento_clase_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case OCULTO:
-                       {
-                               AST tmp10_AST = null;
-                               AST tmp10_AST_in = null;
-                               tmp10_AST = astFactory.create((AST)_t);
-                               tmp10_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp10_AST);
-                               match(_t,OCULTO);
-                               _t = _t.getNextSibling();
-                               cualificador_elemento_clase_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case VISIBLE:
-                       {
-                               AST tmp11_AST = null;
-                               AST tmp11_AST_in = null;
-                               tmp11_AST = astFactory.create((AST)_t);
-                               tmp11_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp11_AST);
-                               match(_t,VISIBLE);
-                               _t = _t.getNextSibling();
-                               cualificador_elemento_clase_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = cualificador_elemento_clase_AST;
-               _retTree = _t;
-       }
-       
-       public final void tipo(AST _t) throws RecognitionException {
-               
-               AST tipo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST tipo_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ENTERO:
-                       case REAL:
-                       case LOGICO:
-                       case CARACTER:
-                       {
-                               tipo_predefinido_simple(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case FORMACION:
-                       {
-                               tipo_predefinido_compuesto(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case CLASE:
-                       {
-                               declaracion_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ERROR:
-                       {
-                               declaracion_error(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = tipo_AST;
-               _retTree = _t;
-       }
-       
-       public final AST  prototipo_metodo(AST _t) throws RecognitionException {
-               AST tipodev=null;
-               
-               AST prototipo_metodo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST prototipo_metodo_AST = null;
-               AST t_AST = null;
-               AST t = null;
-               AST v = null;
-               AST v_AST = null;
-               
-               try {      // for error handling
-                       AST __t9830 = _t;
-                       AST tmp12_AST = null;
-                       AST tmp12_AST_in = null;
-                       tmp12_AST = astFactory.create((AST)_t);
-                       tmp12_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp12_AST);
-                       ASTPair __currentAST9830 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,PROTOTIPO);
-                       _t = _t.getFirstChild();
-                       AST tmp13_AST = null;
-                       AST tmp13_AST_in = null;
-                       tmp13_AST = astFactory.create((AST)_t);
-                       tmp13_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp13_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       AST __t9831 = _t;
-                       AST tmp14_AST = null;
-                       AST tmp14_AST_in = null;
-                       tmp14_AST = astFactory.create((AST)_t);
-                       tmp14_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp14_AST);
-                       ASTPair __currentAST9831 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,PARAMETROS);
-                       _t = _t.getFirstChild();
-                       declaracion_parametros(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9831;
-                       _t = __t9831;
-                       _t = _t.getNextSibling();
-                       AST __t9832 = _t;
-                       AST tmp15_AST = null;
-                       AST tmp15_AST_in = null;
-                       tmp15_AST = astFactory.create((AST)_t);
-                       tmp15_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp15_AST);
-                       ASTPair __currentAST9832 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,RESULTADO);
-                       _t = _t.getFirstChild();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ERROR:
-                       case CLASE:
-                       case ENTERO:
-                       case REAL:
-                       case LOGICO:
-                       case CARACTER:
-                       case FORMACION:
-                       {
-                               t = _t==ASTNULL ? null : (AST)_t;
-                               tipo(_t);
-                               _t = _retTree;
-                               t_AST = (AST)returnAST;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               cont_dev = 0; // inicializa el contador de instrucciones DEV
-                               tipodev = t;
-                               break;
-                       }
-                       case VACIO:
-                       {
-                               v = (AST)_t;
-                               AST v_AST_in = null;
-                               v_AST = astFactory.create(v);
-                               astFactory.addASTChild(currentAST, v_AST);
-                               match(_t,VACIO);
-                               _t = _t.getNextSibling();
-                               cont_dev = -1; // marca a -1 para indicar que es un procedimiento
-                               tipodev = v;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9832;
-                       _t = __t9832;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9830;
-                       _t = __t9830;
-                       _t = _t.getNextSibling();
-                       prototipo_metodo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = prototipo_metodo_AST;
-               _retTree = _t;
-               return tipodev;
-       }
-       
-       public final void definicion_metodo(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST definicion_metodo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST definicion_metodo_AST = null;
-               
-               try {      // for error handling
-                       AST __t9840 = _t;
-                       AST tmp16_AST = null;
-                       AST tmp16_AST_in = null;
-                       tmp16_AST = astFactory.create((AST)_t);
-                       tmp16_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp16_AST);
-                       ASTPair __currentAST9840 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,DEFINICION);
-                       _t = _t.getFirstChild();
-                       AST __t9841 = _t;
-                       AST tmp17_AST = null;
-                       AST tmp17_AST_in = null;
-                       tmp17_AST = astFactory.create((AST)_t);
-                       tmp17_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp17_AST);
-                       ASTPair __currentAST9841 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,VARIABLES_LOCALES);
-                       _t = _t.getFirstChild();
-                       declaracion_variables_locales(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9841;
-                       _t = __t9841;
-                       _t = _t.getNextSibling();
-                       AST __t9842 = _t;
-                       AST tmp18_AST = null;
-                       AST tmp18_AST_in = null;
-                       tmp18_AST = astFactory.create((AST)_t);
-                       tmp18_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp18_AST);
-                       ASTPair __currentAST9842 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCIONES);
-                       _t = _t.getFirstChild();
-                       instrucciones(_t,tipodev);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9842;
-                       _t = __t9842;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9840;
-                       _t = __t9840;
-                       _t = _t.getNextSibling();
-                       definicion_metodo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = definicion_metodo_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_parametros(AST _t) throws RecognitionException {
-               
-               AST declaracion_parametros_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_parametros_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9836:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==PARAMETRO)) {
-                                       declaracion_parametro(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9836;
-                               }
-                               
-                       } while (true);
-                       }
-                       declaracion_parametros_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_parametros_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_parametro(AST _t) throws RecognitionException {
-               
-               AST declaracion_parametro_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_parametro_AST = null;
-               
-               try {      // for error handling
-                       AST __t9838 = _t;
-                       AST tmp19_AST = null;
-                       AST tmp19_AST_in = null;
-                       tmp19_AST = astFactory.create((AST)_t);
-                       tmp19_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp19_AST);
-                       ASTPair __currentAST9838 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,PARAMETRO);
-                       _t = _t.getFirstChild();
-                       AST tmp20_AST = null;
-                       AST tmp20_AST_in = null;
-                       tmp20_AST = astFactory.create((AST)_t);
-                       tmp20_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp20_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       tipo(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9838;
-                       _t = __t9838;
-                       _t = _t.getNextSibling();
-                       declaracion_parametro_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_parametro_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_variables_locales(AST _t) throws RecognitionException {
-               
-               AST declaracion_variables_locales_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_variables_locales_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9845:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==VARIABLE_LOCAL)) {
-                                       declaracion_variable_local(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9845;
-                               }
-                               
-                       } while (true);
-                       }
-                       declaracion_variables_locales_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_variables_locales_AST;
-               _retTree = _t;
-       }
-       
-       public final void instrucciones(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST instrucciones_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instrucciones_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9851:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==INSTRUCCION)) {
-                                       instruccion(_t,tipodev);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9851;
-                               }
-                               
-                       } while (true);
-                       }
-                       instrucciones_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instrucciones_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_variable_local(AST _t) throws RecognitionException {
-               
-               AST declaracion_variable_local_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_variable_local_AST = null;
-               
-               try {      // for error handling
-                       AST __t9847 = _t;
-                       AST tmp21_AST = null;
-                       AST tmp21_AST_in = null;
-                       tmp21_AST = astFactory.create((AST)_t);
-                       tmp21_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp21_AST);
-                       ASTPair __currentAST9847 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,VARIABLE_LOCAL);
-                       _t = _t.getFirstChild();
-                       AST tmp22_AST = null;
-                       AST tmp22_AST_in = null;
-                       tmp22_AST = astFactory.create((AST)_t);
-                       tmp22_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp22_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       tipo(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9847;
-                       _t = __t9847;
-                       _t = _t.getNextSibling();
-                       declaracion_variable_local_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_variable_local_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_error(AST _t) throws RecognitionException {
-               
-               AST declaracion_error_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_error_AST = null;
-               
-               try {      // for error handling
-                       AST tmp23_AST = null;
-                       AST tmp23_AST_in = null;
-                       tmp23_AST = astFactory.create((AST)_t);
-                       tmp23_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp23_AST);
-                       match(_t,ERROR);
-                       _t = _t.getNextSibling();
-                       declaracion_error_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_error_AST;
-               _retTree = _t;
-       }
-       
-       public final void instruccion(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST instruccion_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instruccion_AST = null;
-               
-               try {      // for error handling
-                       AST __t9853 = _t;
-                       AST tmp24_AST = null;
-                       AST tmp24_AST_in = null;
-                       tmp24_AST = astFactory.create((AST)_t);
-                       tmp24_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp24_AST);
-                       ASTPair __currentAST9853 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCION);
-                       _t = _t.getFirstChild();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case LLAMADA:
-                       case DEV:
-                       case ASIGNACION:
-                       case CREAR:
-                       case ESCRIBIR:
-                       {
-                               instruccion_simple(_t,tipodev);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       case SI:
-                       case MIENTRAS:
-                       {
-                               instruccion_compuesta(_t,tipodev);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9853;
-                       _t = __t9853;
-                       _t = _t.getNextSibling();
-                       instruccion_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instruccion_AST;
-               _retTree = _t;
-       }
-       
-       public final void instruccion_simple(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST instruccion_simple_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instruccion_simple_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case CREAR:
-                       {
-                               crear(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LLAMADA:
-                       {
-                               llamada_metodo(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ESCRIBIR:
-                       {
-                               escribir(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ASIGNACION:
-                       {
-                               asignacion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case DEV:
-                       {
-                               retorno(_t,tipodev);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instruccion_simple_AST;
-               _retTree = _t;
-       }
-       
-       public final void instruccion_compuesta(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST instruccion_compuesta_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instruccion_compuesta_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case SI:
-                       {
-                               condicion(_t,tipodev);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_compuesta_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MIENTRAS:
-                       {
-                               iteracion(_t,tipodev);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_compuesta_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instruccion_compuesta_AST;
-               _retTree = _t;
-       }
-       
-       public final void crear(AST _t) throws RecognitionException {
-               
-               AST crear_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST crear_AST = null;
-               AST e2_AST = null;
-               AST e2 = null;
-               Atr_Expr e1;
-               
-               try {      // for error handling
-                       AST __t9857 = _t;
-                       AST tmp25_AST = null;
-                       AST tmp25_AST_in = null;
-                       tmp25_AST = astFactory.create((AST)_t);
-                       tmp25_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp25_AST);
-                       ASTPair __currentAST9857 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,CREAR);
-                       _t = _t.getFirstChild();
-                       e1=expresion(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       e2 = _t==ASTNULL ? null : (AST)_t;
-                       expresion(_t);
-                       _t = _retTree;
-                       e2_AST = (AST)returnAST;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9857;
-                       _t = __t9857;
-                       _t = _t.getNextSibling();
-                       AS_Crear(e1,e2_AST);
-                       crear_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = crear_AST;
-               _retTree = _t;
-       }
-       
-       public final void llamada_metodo(AST _t) throws RecognitionException {
-               
-               AST llamada_metodo_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST llamada_metodo_AST = null;
-               Atr_Expr a, res; LinkedList l;
-               
-               try {      // for error handling
-                       AST __t9866 = _t;
-                       AST tmp26_AST = null;
-                       AST tmp26_AST_in = null;
-                       tmp26_AST = astFactory.create((AST)_t);
-                       tmp26_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp26_AST);
-                       ASTPair __currentAST9866 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,LLAMADA);
-                       _t = _t.getFirstChild();
-                       a=acceso(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       AST __t9867 = _t;
-                       AST tmp27_AST = null;
-                       AST tmp27_AST_in = null;
-                       tmp27_AST = astFactory.create((AST)_t);
-                       tmp27_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp27_AST);
-                       ASTPair __currentAST9867 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,EXPRESIONES);
-                       _t = _t.getFirstChild();
-                       l=lista_expresiones(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9867;
-                       _t = __t9867;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9866;
-                       _t = __t9866;
-                       _t = _t.getNextSibling();
-                       res=AS_Llamada(a,l);
-                       if (res != null && res.getTipo().getType() != VACIO){
-                               System.out.println("ERROR: Llamada a funcion sin asignar valor devuelto.");
-                               System.exit(1); 
-                       } 
-                       
-                       llamada_metodo_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = llamada_metodo_AST;
-               _retTree = _t;
-       }
-       
-       public final void escribir(AST _t) throws RecognitionException {
-               
-               AST escribir_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST escribir_AST = null;
-               AST e_AST = null;
-               AST e = null;
-               Atr_Expr e1;
-               
-               try {      // for error handling
-                       AST __t9859 = _t;
-                       AST tmp28_AST = null;
-                       AST tmp28_AST_in = null;
-                       tmp28_AST = astFactory.create((AST)_t);
-                       tmp28_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp28_AST);
-                       ASTPair __currentAST9859 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,ESCRIBIR);
-                       _t = _t.getFirstChild();
-                       e = _t==ASTNULL ? null : (AST)_t;
-                       e1=expresion(_t);
-                       _t = _retTree;
-                       e_AST = (AST)returnAST;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9859;
-                       _t = __t9859;
-                       _t = _t.getNextSibling();
-                       AS_Escribir(e1, e_AST);
-                       escribir_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = escribir_AST;
-               _retTree = _t;
-       }
-       
-       public final void asignacion(AST _t) throws RecognitionException {
-               
-               AST asignacion_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST asignacion_AST = null;
-               AST e3_AST = null;
-               AST e3 = null;
-               AST e4_AST = null;
-               AST e4 = null;
-               Atr_Expr e1, e2;
-               
-               try {      // for error handling
-                       AST __t9862 = _t;
-                       AST tmp29_AST = null;
-                       AST tmp29_AST_in = null;
-                       tmp29_AST = astFactory.create((AST)_t);
-                       tmp29_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp29_AST);
-                       ASTPair __currentAST9862 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,ASIGNACION);
-                       _t = _t.getFirstChild();
-                       e3 = _t==ASTNULL ? null : (AST)_t;
-                       e1=expresion(_t);
-                       _t = _retTree;
-                       e3_AST = (AST)returnAST;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       e4 = _t==ASTNULL ? null : (AST)_t;
-                       e2=expresion(_t);
-                       _t = _retTree;
-                       e4_AST = (AST)returnAST;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9862;
-                       _t = __t9862;
-                       _t = _t.getNextSibling();
-                               AS_Asignacion(e1,e2,e3_AST,e4_AST);
-                       
-                       asignacion_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = asignacion_AST;
-               _retTree = _t;
-       }
-       
-       public final void retorno(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST retorno_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST retorno_AST = null;
-               Atr_Expr e;
-               
-               try {      // for error handling
-                       AST __t9864 = _t;
-                       AST tmp30_AST = null;
-                       AST tmp30_AST_in = null;
-                       tmp30_AST = astFactory.create((AST)_t);
-                       tmp30_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp30_AST);
-                       ASTPair __currentAST9864 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,DEV);
-                       _t = _t.getFirstChild();
-                       e=expresion(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9864;
-                       _t = __t9864;
-                       _t = _t.getNextSibling();
-                       /*AS_Devolucion(tipodev, e);
-                       cont_dev++;*/
-                       cont_dev=AS_Devolucion(tipodev,e,cont_dev);
-                       
-                       retorno_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = retorno_AST;
-               _retTree = _t;
-       }
-       
-       public final Atr_Expr  expresion(AST _t) throws RecognitionException {
-               Atr_Expr res=null;
-               
-               AST expresion_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST expresion_AST = null;
-               AST op1 = null;
-               AST op1_AST = null;
-               AST op2 = null;
-               AST op2_AST = null;
-               AST op3 = null;
-               AST op3_AST = null;
-               AST op4 = null;
-               AST op4_AST = null;
-               AST op5 = null;
-               AST op5_AST = null;
-               AST op6 = null;
-               AST op6_AST = null;
-               AST i = null;
-               AST i_AST = null;
-               AST j = null;
-               AST j_AST = null;
-               AST k = null;
-               AST k_AST = null;
-               AST m = null;
-               AST m_AST = null;
-               AST n = null;
-               AST n_AST = null;
-               Atr_Expr e1,e2; LinkedList l;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case O:
-                       {
-                               AST __t9880 = _t;
-                               AST tmp31_AST = null;
-                               AST tmp31_AST_in = null;
-                               tmp31_AST = astFactory.create((AST)_t);
-                               tmp31_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp31_AST);
-                               ASTPair __currentAST9880 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,O);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9880;
-                               _t = __t9880;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Log( e1, e2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case Y:
-                       {
-                               AST __t9881 = _t;
-                               AST tmp32_AST = null;
-                               AST tmp32_AST_in = null;
-                               tmp32_AST = astFactory.create((AST)_t);
-                               tmp32_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp32_AST);
-                               ASTPair __currentAST9881 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,Y);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9881;
-                               _t = __t9881;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Log( e1, e2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case NO:
-                       {
-                               AST __t9882 = _t;
-                               AST tmp33_AST = null;
-                               AST tmp33_AST_in = null;
-                               tmp33_AST = astFactory.create((AST)_t);
-                               tmp33_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp33_AST);
-                               ASTPair __currentAST9882 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,NO);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9882;
-                               _t = __t9882;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Una_Log( e1);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MAYOR:
-                       {
-                               AST __t9883 = _t;
-                               op1 = _t==ASTNULL ? null :(AST)_t;
-                               AST op1_AST_in = null;
-                               op1_AST = astFactory.create(op1);
-                               astFactory.addASTChild(currentAST, op1_AST);
-                               ASTPair __currentAST9883 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MAYOR);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9883;
-                               _t = __t9883;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Rel( e1, e2, op1);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MAYOR_IGUAL:
-                       {
-                               AST __t9884 = _t;
-                               op2 = _t==ASTNULL ? null :(AST)_t;
-                               AST op2_AST_in = null;
-                               op2_AST = astFactory.create(op2);
-                               astFactory.addASTChild(currentAST, op2_AST);
-                               ASTPair __currentAST9884 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MAYOR_IGUAL);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9884;
-                               _t = __t9884;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Rel( e1, e2, op2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOR:
-                       {
-                               AST __t9885 = _t;
-                               op3 = _t==ASTNULL ? null :(AST)_t;
-                               AST op3_AST_in = null;
-                               op3_AST = astFactory.create(op3);
-                               astFactory.addASTChild(currentAST, op3_AST);
-                               ASTPair __currentAST9885 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOR);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9885;
-                               _t = __t9885;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Rel( e1, e2, op3);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOR_IGUAL:
-                       {
-                               AST __t9886 = _t;
-                               op4 = _t==ASTNULL ? null :(AST)_t;
-                               AST op4_AST_in = null;
-                               op4_AST = astFactory.create(op4);
-                               astFactory.addASTChild(currentAST, op4_AST);
-                               ASTPair __currentAST9886 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOR_IGUAL);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9886;
-                               _t = __t9886;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Rel( e1, e2, op4);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case IGUAL:
-                       {
-                               AST __t9887 = _t;
-                               op5 = _t==ASTNULL ? null :(AST)_t;
-                               AST op5_AST_in = null;
-                               op5_AST = astFactory.create(op5);
-                               astFactory.addASTChild(currentAST, op5_AST);
-                               ASTPair __currentAST9887 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,IGUAL);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9887;
-                               _t = __t9887;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Rel( e1, e2, op5);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case DISTINTO:
-                       {
-                               AST __t9888 = _t;
-                               op6 = _t==ASTNULL ? null :(AST)_t;
-                               AST op6_AST_in = null;
-                               op6_AST = astFactory.create(op6);
-                               astFactory.addASTChild(currentAST, op6_AST);
-                               ASTPair __currentAST9888 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,DISTINTO);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9888;
-                               _t = __t9888;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Rel( e1, e2, op6);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MAS:
-                       {
-                               AST __t9889 = _t;
-                               AST tmp34_AST = null;
-                               AST tmp34_AST_in = null;
-                               tmp34_AST = astFactory.create((AST)_t);
-                               tmp34_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp34_AST);
-                               ASTPair __currentAST9889 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MAS);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9889;
-                               _t = __t9889;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Arit( e1, e2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOS:
-                       {
-                               AST __t9890 = _t;
-                               AST tmp35_AST = null;
-                               AST tmp35_AST_in = null;
-                               tmp35_AST = astFactory.create((AST)_t);
-                               tmp35_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp35_AST);
-                               ASTPair __currentAST9890 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOS);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9890;
-                               _t = __t9890;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Arit( e1, e2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOSUNARIO:
-                       {
-                               AST __t9891 = _t;
-                               AST tmp36_AST = null;
-                               AST tmp36_AST_in = null;
-                               tmp36_AST = astFactory.create((AST)_t);
-                               tmp36_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp36_AST);
-                               ASTPair __currentAST9891 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOSUNARIO);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9891;
-                               _t = __t9891;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Una_Arit( e1);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case POR:
-                       {
-                               AST __t9892 = _t;
-                               AST tmp37_AST = null;
-                               AST tmp37_AST_in = null;
-                               tmp37_AST = astFactory.create((AST)_t);
-                               tmp37_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp37_AST);
-                               ASTPair __currentAST9892 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,POR);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9892;
-                               _t = __t9892;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Arit( e1, e2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case DIVISION:
-                       {
-                               AST __t9893 = _t;
-                               AST tmp38_AST = null;
-                               AST tmp38_AST_in = null;
-                               tmp38_AST = astFactory.create((AST)_t);
-                               tmp38_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp38_AST);
-                               ASTPair __currentAST9893 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,DIVISION);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               e2=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9893;
-                               _t = __t9893;
-                               _t = _t.getNextSibling();
-                               res=AS_Exp_Bin_Arit( e1, e2);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LLAMADA:
-                       {
-                               AST __t9894 = _t;
-                               AST tmp39_AST = null;
-                               AST tmp39_AST_in = null;
-                               tmp39_AST = astFactory.create((AST)_t);
-                               tmp39_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp39_AST);
-                               ASTPair __currentAST9894 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,LLAMADA);
-                               _t = _t.getFirstChild();
-                               e1=acceso(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               AST __t9895 = _t;
-                               AST tmp40_AST = null;
-                               AST tmp40_AST_in = null;
-                               tmp40_AST = astFactory.create((AST)_t);
-                               tmp40_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp40_AST);
-                               ASTPair __currentAST9895 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,EXPRESIONES);
-                               _t = _t.getFirstChild();
-                               l=lista_expresiones(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9895;
-                               _t = __t9895;
-                               _t = _t.getNextSibling();
-                               currentAST = __currentAST9894;
-                               _t = __t9894;
-                               _t = _t.getNextSibling();
-                               res=AS_Llamada( e1, l);
-                               if (res != null){
-                                       if (res.getTipo().getType() == VACIO){
-                                               System.out.println("ERROR: No se puede recoger el valor devuelto por un procedimiento (no devuelve nada).");
-                                               System.exit(1);
-                                       }
-                               }
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ACCESO_TABLA:
-                       {
-                               AST __t9896 = _t;
-                               AST tmp41_AST = null;
-                               AST tmp41_AST_in = null;
-                               tmp41_AST = astFactory.create((AST)_t);
-                               tmp41_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp41_AST);
-                               ASTPair __currentAST9896 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ACCESO_TABLA);
-                               _t = _t.getFirstChild();
-                               e1=acceso(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               AST __t9897 = _t;
-                               AST tmp42_AST = null;
-                               AST tmp42_AST_in = null;
-                               tmp42_AST = astFactory.create((AST)_t);
-                               tmp42_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp42_AST);
-                               ASTPair __currentAST9897 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,EXPRESIONES);
-                               _t = _t.getFirstChild();
-                               l=lista_expresiones_nv(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9897;
-                               _t = __t9897;
-                               _t = _t.getNextSibling();
-                               currentAST = __currentAST9896;
-                               _t = __t9896;
-                               _t = _t.getNextSibling();
-                               res=AS_Acceso_Tabla( e1, l);
-                               
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ACCESO_OBJETO:
-                       case ACCESO_SIMPLE:
-                       {
-                               e1=acceso(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               res=e1;
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LIT_ENTERO:
-                       {
-                               i = (AST)_t;
-                               AST i_AST_in = null;
-                               i_AST = astFactory.create(i);
-                               astFactory.addASTChild(currentAST, i_AST);
-                               match(_t,LIT_ENTERO);
-                               _t = _t.getNextSibling();
-                               res=AS_Literal( i);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LIT_REAL:
-                       {
-                               j = (AST)_t;
-                               AST j_AST_in = null;
-                               j_AST = astFactory.create(j);
-                               astFactory.addASTChild(currentAST, j_AST);
-                               match(_t,LIT_REAL);
-                               _t = _t.getNextSibling();
-                               res=AS_Literal( j);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LIT_CAR:
-                       {
-                               k = (AST)_t;
-                               AST k_AST_in = null;
-                               k_AST = astFactory.create(k);
-                               astFactory.addASTChild(currentAST, k_AST);
-                               match(_t,LIT_CAR);
-                               _t = _t.getNextSibling();
-                               res=AS_Literal( k);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case CIERTO:
-                       {
-                               m = (AST)_t;
-                               AST m_AST_in = null;
-                               m_AST = astFactory.create(m);
-                               astFactory.addASTChild(currentAST, m_AST);
-                               match(_t,CIERTO);
-                               _t = _t.getNextSibling();
-                               res=AS_Literal( m);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case FALSO:
-                       {
-                               n = (AST)_t;
-                               AST n_AST_in = null;
-                               n_AST = astFactory.create(n);
-                               astFactory.addASTChild(currentAST, n_AST);
-                               match(_t,FALSO);
-                               _t = _t.getNextSibling();
-                               res=AS_Literal( n);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ENTERO_A_REAL:
-                       {
-                               AST __t9898 = _t;
-                               AST tmp43_AST = null;
-                               AST tmp43_AST_in = null;
-                               tmp43_AST = astFactory.create((AST)_t);
-                               tmp43_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp43_AST);
-                               ASTPair __currentAST9898 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ENTERO_A_REAL);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9898;
-                               _t = __t9898;
-                               _t = _t.getNextSibling();
-                               res = AS_Entero_A_Real(e1);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case REAL_A_ENTERO:
-                       {
-                               AST __t9899 = _t;
-                               AST tmp44_AST = null;
-                               AST tmp44_AST_in = null;
-                               tmp44_AST = astFactory.create((AST)_t);
-                               tmp44_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp44_AST);
-                               ASTPair __currentAST9899 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,REAL_A_ENTERO);
-                               _t = _t.getFirstChild();
-                               e1=expresion(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9899;
-                               _t = __t9899;
-                               _t = _t.getNextSibling();
-                               res = AS_Real_A_Entero(e1);
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ERROR:
-                       {
-                               AST tmp45_AST = null;
-                               AST tmp45_AST_in = null;
-                               tmp45_AST = astFactory.create((AST)_t);
-                               tmp45_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp45_AST);
-                               match(_t,ERROR);
-                               _t = _t.getNextSibling();
-                               expresion_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = expresion_AST;
-               _retTree = _t;
-               return res;
-       }
-       
-       public final void condicion(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST condicion_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST condicion_AST = null;
-               Atr_Expr e;
-               
-               try {      // for error handling
-                       AST __t9872 = _t;
-                       AST tmp46_AST = null;
-                       AST tmp46_AST_in = null;
-                       tmp46_AST = astFactory.create((AST)_t);
-                       tmp46_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp46_AST);
-                       ASTPair __currentAST9872 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,SI);
-                       _t = _t.getFirstChild();
-                       e=expresion(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       AST __t9873 = _t;
-                       AST tmp47_AST = null;
-                       AST tmp47_AST_in = null;
-                       tmp47_AST = astFactory.create((AST)_t);
-                       tmp47_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp47_AST);
-                       ASTPair __currentAST9873 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCIONES);
-                       _t = _t.getFirstChild();
-                       instrucciones(_t,tipodev);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9873;
-                       _t = __t9873;
-                       _t = _t.getNextSibling();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case INSTRUCCIONES:
-                       {
-                               AST __t9875 = _t;
-                               AST tmp48_AST = null;
-                               AST tmp48_AST_in = null;
-                               tmp48_AST = astFactory.create((AST)_t);
-                               tmp48_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp48_AST);
-                               ASTPair __currentAST9875 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,INSTRUCCIONES);
-                               _t = _t.getFirstChild();
-                               instrucciones(_t,tipodev);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9875;
-                               _t = __t9875;
-                               _t = _t.getNextSibling();
-                               break;
-                       }
-                       case 3:
-                       {
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9872;
-                       _t = __t9872;
-                       _t = _t.getNextSibling();
-                       AS_Condicional(e);
-                       
-                       condicion_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = condicion_AST;
-               _retTree = _t;
-       }
-       
-       public final void iteracion(AST _t,
-               AST tipodev
-       ) throws RecognitionException {
-               
-               AST iteracion_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST iteracion_AST = null;
-               Atr_Expr e;
-               
-               try {      // for error handling
-                       AST __t9877 = _t;
-                       AST tmp49_AST = null;
-                       AST tmp49_AST_in = null;
-                       tmp49_AST = astFactory.create((AST)_t);
-                       tmp49_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp49_AST);
-                       ASTPair __currentAST9877 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,MIENTRAS);
-                       _t = _t.getFirstChild();
-                       e=expresion(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       AST __t9878 = _t;
-                       AST tmp50_AST = null;
-                       AST tmp50_AST_in = null;
-                       tmp50_AST = astFactory.create((AST)_t);
-                       tmp50_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp50_AST);
-                       ASTPair __currentAST9878 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCIONES);
-                       _t = _t.getFirstChild();
-                       instrucciones(_t,tipodev);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9878;
-                       _t = __t9878;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9877;
-                       _t = __t9877;
-                       _t = _t.getNextSibling();
-                       AS_Condicional(e);
-                       
-                       iteracion_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = iteracion_AST;
-               _retTree = _t;
-       }
-       
-       public final Atr_Expr  acceso(AST _t) throws RecognitionException {
-               Atr_Expr res=null;
-               
-               AST acceso_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST acceso_AST = null;
-               AST r_AST = null;
-               AST r = null;
-               AST a = null;
-               AST a_AST = null;
-               Atr_Expr e;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ACCESO_SIMPLE:
-                       {
-                               e=acceso_simple(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               res=e;
-                               acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ACCESO_OBJETO:
-                       {
-                               AST __t9901 = _t;
-                               AST tmp51_AST = null;
-                               AST tmp51_AST_in = null;
-                               tmp51_AST = astFactory.create((AST)_t);
-                               tmp51_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp51_AST);
-                               ASTPair __currentAST9901 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ACCESO_OBJETO);
-                               _t = _t.getFirstChild();
-                               r = _t==ASTNULL ? null : (AST)_t;
-                               e=acceso_simple(_t);
-                               _t = _retTree;
-                               r_AST = (AST)returnAST;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               a = (AST)_t;
-                               AST a_AST_in = null;
-                               a_AST = astFactory.create(a);
-                               astFactory.addASTChild(currentAST, a_AST);
-                               match(_t,IDENT);
-                               _t = _t.getNextSibling();
-                               currentAST = __currentAST9901;
-                               _t = __t9901;
-                               _t = _t.getNextSibling();
-                               
-                                       res=AS_Acceso_Objeto( e, r, a);
-                               
-                               acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = acceso_AST;
-               _retTree = _t;
-               return res;
-       }
-       
-       public final LinkedList  lista_expresiones(AST _t) throws RecognitionException {
-               LinkedList l= new LinkedList();
-               
-               AST lista_expresiones_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST lista_expresiones_AST = null;
-               Atr_Expr e;
-               
-               try {      // for error handling
-                       {
-                       _loop9870:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_tokenSet_0.member(_t.getType()))) {
-                                       e=expresion(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                                       l.add(e);
-                               }
-                               else {
-                                       break _loop9870;
-                               }
-                               
-                       } while (true);
-                       }
-                       lista_expresiones_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = lista_expresiones_AST;
-               _retTree = _t;
-               return l;
-       }
-       
-       public final LinkedList  lista_expresiones_nv(AST _t) throws RecognitionException {
-               LinkedList l= new LinkedList();
-               
-               AST lista_expresiones_nv_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST lista_expresiones_nv_AST = null;
-               Atr_Expr e;
-               
-               try {      // for error handling
-                       {
-                       int _cnt9907=0;
-                       _loop9907:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_tokenSet_0.member(_t.getType()))) {
-                                       e=expresion(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                                       l.add(e);
-                               }
-                               else {
-                                       if ( _cnt9907>=1 ) { break _loop9907; } else {throw new NoViableAltException(_t);}
-                               }
-                               
-                               _cnt9907++;
-                       } while (true);
-                       }
-                       lista_expresiones_nv_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = lista_expresiones_nv_AST;
-               _retTree = _t;
-               return l;
-       }
-       
-       public final Atr_Expr  acceso_simple(AST _t) throws RecognitionException {
-               Atr_Expr res=null;
-               
-               AST acceso_simple_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST acceso_simple_AST = null;
-               AST d_AST = null;
-               AST d = null;
-               
-               try {      // for error handling
-                       AST __t9903 = _t;
-                       AST tmp52_AST = null;
-                       AST tmp52_AST_in = null;
-                       tmp52_AST = astFactory.create((AST)_t);
-                       tmp52_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp52_AST);
-                       ASTPair __currentAST9903 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,ACCESO_SIMPLE);
-                       _t = _t.getFirstChild();
-                       AST tmp53_AST = null;
-                       AST tmp53_AST_in = null;
-                       tmp53_AST = astFactory.create((AST)_t);
-                       tmp53_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp53_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       d = _t==ASTNULL ? null : (AST)_t;
-                       declaracion_acceso(_t);
-                       _t = _retTree;
-                       d_AST = (AST)returnAST;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9903;
-                       _t = __t9903;
-                       _t = _t.getNextSibling();
-                       res=AS_Acceso_Simple(d_AST);
-                       acceso_simple_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = acceso_simple_AST;
-               _retTree = _t;
-               return res;
-       }
-       
-       public final void declaracion_acceso(AST _t) throws RecognitionException {
-               
-               AST declaracion_acceso_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_acceso_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case MODULO:
-                       {
-                               declaracion_modulo(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               declaracion_acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case CLASE:
-                       {
-                               declaracion_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               declaracion_acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ATRIBUTO:
-                       case METODO:
-                       {
-                               declaracion_elemento_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               declaracion_acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case PARAMETRO:
-                       {
-                               declaracion_parametro1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               declaracion_acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case VARIABLE_LOCAL:
-                       {
-                               declaracion_variable_local1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               declaracion_acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ERROR:
-                       {
-                               declaracion_error(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               declaracion_acceso_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_acceso_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_clase1(AST _t) throws RecognitionException {
-               
-               AST declaracion_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_clase1_AST = null;
-               AST n_AST = null;
-               AST n = null;
-               
-               try {      // for error handling
-                       AST __t9919 = _t;
-                       AST tmp54_AST = null;
-                       AST tmp54_AST_in = null;
-                       tmp54_AST = astFactory.create((AST)_t);
-                       tmp54_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp54_AST);
-                       ASTPair __currentAST9919 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,CLASE);
-                       _t = _t.getFirstChild();
-                       n = _t==ASTNULL ? null : (AST)_t;
-                       nombre_clase1(_t);
-                       _t = _retTree;
-                       n_AST = (AST)returnAST;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       cualificador_clase1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_clase1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9919;
-                       _t = __t9919;
-                       _t = _t.getNextSibling();
-                       declaracion_clase1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_elemento_clase1(AST _t) throws RecognitionException {
-               
-               AST declaracion_elemento_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_elemento_clase1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case METODO:
-                       {
-                               AST __t9927 = _t;
-                               AST tmp55_AST = null;
-                               AST tmp55_AST_in = null;
-                               tmp55_AST = astFactory.create((AST)_t);
-                               tmp55_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp55_AST);
-                               ASTPair __currentAST9927 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,METODO);
-                               _t = _t.getFirstChild();
-                               declaracion_metodo1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               cualificador_elemento_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9927;
-                               _t = __t9927;
-                               _t = _t.getNextSibling();
-                               declaracion_elemento_clase1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ATRIBUTO:
-                       {
-                               AST __t9928 = _t;
-                               AST tmp56_AST = null;
-                               AST tmp56_AST_in = null;
-                               tmp56_AST = astFactory.create((AST)_t);
-                               tmp56_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp56_AST);
-                               ASTPair __currentAST9928 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ATRIBUTO);
-                               _t = _t.getFirstChild();
-                               AST tmp57_AST = null;
-                               AST tmp57_AST_in = null;
-                               tmp57_AST = astFactory.create((AST)_t);
-                               tmp57_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp57_AST);
-                               match(_t,IDENT);
-                               _t = _t.getNextSibling();
-                               tipo1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               cualificador_elemento_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9928;
-                               _t = __t9928;
-                               _t = _t.getNextSibling();
-                               declaracion_elemento_clase1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_elemento_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_parametro1(AST _t) throws RecognitionException {
-               
-               AST declaracion_parametro1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_parametro1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9940 = _t;
-                       AST tmp58_AST = null;
-                       AST tmp58_AST_in = null;
-                       tmp58_AST = astFactory.create((AST)_t);
-                       tmp58_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp58_AST);
-                       ASTPair __currentAST9940 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,PARAMETRO);
-                       _t = _t.getFirstChild();
-                       AST tmp59_AST = null;
-                       AST tmp59_AST_in = null;
-                       tmp59_AST = astFactory.create((AST)_t);
-                       tmp59_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp59_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       tipo1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9940;
-                       _t = __t9940;
-                       _t = _t.getNextSibling();
-                       declaracion_parametro1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_parametro1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_variable_local1(AST _t) throws RecognitionException {
-               
-               AST declaracion_variable_local1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_variable_local1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9949 = _t;
-                       AST tmp60_AST = null;
-                       AST tmp60_AST_in = null;
-                       tmp60_AST = astFactory.create((AST)_t);
-                       tmp60_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp60_AST);
-                       ASTPair __currentAST9949 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,VARIABLE_LOCAL);
-                       _t = _t.getFirstChild();
-                       AST tmp61_AST = null;
-                       AST tmp61_AST_in = null;
-                       tmp61_AST = astFactory.create((AST)_t);
-                       tmp61_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp61_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       tipo1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9949;
-                       _t = __t9949;
-                       _t = _t.getNextSibling();
-                       declaracion_variable_local1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_variable_local1_AST;
-               _retTree = _t;
-       }
-       
-       public final void tipo_predefinido_simple(AST _t) throws RecognitionException {
-               
-               AST tipo_predefinido_simple_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST tipo_predefinido_simple_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ENTERO:
-                       {
-                               AST tmp62_AST = null;
-                               AST tmp62_AST_in = null;
-                               tmp62_AST = astFactory.create((AST)_t);
-                               tmp62_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp62_AST);
-                               match(_t,ENTERO);
-                               _t = _t.getNextSibling();
-                               tipo_predefinido_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case REAL:
-                       {
-                               AST tmp63_AST = null;
-                               AST tmp63_AST_in = null;
-                               tmp63_AST = astFactory.create((AST)_t);
-                               tmp63_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp63_AST);
-                               match(_t,REAL);
-                               _t = _t.getNextSibling();
-                               tipo_predefinido_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LOGICO:
-                       {
-                               AST tmp64_AST = null;
-                               AST tmp64_AST_in = null;
-                               tmp64_AST = astFactory.create((AST)_t);
-                               tmp64_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp64_AST);
-                               match(_t,LOGICO);
-                               _t = _t.getNextSibling();
-                               tipo_predefinido_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case CARACTER:
-                       {
-                               AST tmp65_AST = null;
-                               AST tmp65_AST_in = null;
-                               tmp65_AST = astFactory.create((AST)_t);
-                               tmp65_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp65_AST);
-                               match(_t,CARACTER);
-                               _t = _t.getNextSibling();
-                               tipo_predefinido_simple_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = tipo_predefinido_simple_AST;
-               _retTree = _t;
-       }
-       
-       public final void tipo_predefinido_compuesto(AST _t) throws RecognitionException {
-               
-               AST tipo_predefinido_compuesto_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST tipo_predefinido_compuesto_AST = null;
-               
-               try {      // for error handling
-                       formacion(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       tipo_predefinido_compuesto_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = tipo_predefinido_compuesto_AST;
-               _retTree = _t;
-       }
-       
-       public final void formacion(AST _t) throws RecognitionException {
-               
-               AST formacion_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST formacion_AST = null;
-               AST t=null;
-               
-               try {      // for error handling
-                       AST __t9912 = _t;
-                       AST tmp66_AST = null;
-                       AST tmp66_AST_in = null;
-                       tmp66_AST = astFactory.create((AST)_t);
-                       tmp66_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp66_AST);
-                       ASTPair __currentAST9912 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,FORMACION);
-                       _t = _t.getFirstChild();
-                       AST __t9913 = _t;
-                       AST tmp67_AST = null;
-                       AST tmp67_AST_in = null;
-                       tmp67_AST = astFactory.create((AST)_t);
-                       tmp67_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp67_AST);
-                       ASTPair __currentAST9913 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,LISTA_ENTEROS);
-                       _t = _t.getFirstChild();
-                       lista_enteros(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9913;
-                       _t = __t9913;
-                       _t = _t.getNextSibling();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ENTERO:
-                       case REAL:
-                       case LOGICO:
-                       case CARACTER:
-                       {
-                               tipo_predefinido_simple(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       case CLASE:
-                       {
-                               declaracion_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9912;
-                       _t = __t9912;
-                       _t = _t.getNextSibling();
-                       formacion_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = formacion_AST;
-               _retTree = _t;
-       }
-       
-       public final void lista_enteros(AST _t) throws RecognitionException {
-               
-               AST lista_enteros_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST lista_enteros_AST = null;
-               
-               try {      // for error handling
-                       {
-                       int _cnt9917=0;
-                       _loop9917:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==LIT_ENTERO)) {
-                                       AST tmp68_AST = null;
-                                       AST tmp68_AST_in = null;
-                                       tmp68_AST = astFactory.create((AST)_t);
-                                       tmp68_AST_in = (AST)_t;
-                                       astFactory.addASTChild(currentAST, tmp68_AST);
-                                       match(_t,LIT_ENTERO);
-                                       _t = _t.getNextSibling();
-                               }
-                               else {
-                                       if ( _cnt9917>=1 ) { break _loop9917; } else {throw new NoViableAltException(_t);}
-                               }
-                               
-                               _cnt9917++;
-                       } while (true);
-                       }
-                       lista_enteros_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = lista_enteros_AST;
-               _retTree = _t;
-       }
-       
-       public final void nombre_clase1(AST _t) throws RecognitionException {
-               
-               AST nombre_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST nombre_clase1_AST = null;
-               
-               try {      // for error handling
-                       AST tmp69_AST = null;
-                       AST tmp69_AST_in = null;
-                       tmp69_AST = astFactory.create((AST)_t);
-                       tmp69_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp69_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       nombre_clase1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = nombre_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void cualificador_clase1(AST _t) throws RecognitionException {
-               
-               AST cualificador_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST cualificador_clase1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case INST:
-                       {
-                               AST tmp70_AST = null;
-                               AST tmp70_AST_in = null;
-                               tmp70_AST = astFactory.create((AST)_t);
-                               tmp70_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp70_AST);
-                               match(_t,INST);
-                               _t = _t.getNextSibling();
-                               cualificador_clase1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case NO_INST:
-                       {
-                               AST tmp71_AST = null;
-                               AST tmp71_AST_in = null;
-                               tmp71_AST = astFactory.create((AST)_t);
-                               tmp71_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp71_AST);
-                               match(_t,NO_INST);
-                               _t = _t.getNextSibling();
-                               cualificador_clase1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = cualificador_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void definicion_clase1(AST _t) throws RecognitionException {
-               
-               AST definicion_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST definicion_clase1_AST = null;
-               
-               try {      // for error handling
-                       declaraciones_elementos_clase1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_clase1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = definicion_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaraciones_elementos_clase1(AST _t) throws RecognitionException {
-               
-               AST declaraciones_elementos_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaraciones_elementos_clase1_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9925:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==ATRIBUTO||_t.getType()==METODO)) {
-                                       declaracion_elemento_clase1(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9925;
-                               }
-                               
-                       } while (true);
-                       }
-                       declaraciones_elementos_clase1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaraciones_elementos_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_metodo1(AST _t) throws RecognitionException {
-               
-               AST declaracion_metodo1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_metodo1_AST = null;
-               
-               try {      // for error handling
-                       prototipo_metodo1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       definicion_metodo1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       declaracion_metodo1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_metodo1_AST;
-               _retTree = _t;
-       }
-       
-       public final void cualificador_elemento_clase1(AST _t) throws RecognitionException {
-               
-               AST cualificador_elemento_clase1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST cualificador_elemento_clase1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case OCULTO:
-                       {
-                               AST tmp72_AST = null;
-                               AST tmp72_AST_in = null;
-                               tmp72_AST = astFactory.create((AST)_t);
-                               tmp72_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp72_AST);
-                               match(_t,OCULTO);
-                               _t = _t.getNextSibling();
-                               cualificador_elemento_clase1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case VISIBLE:
-                       {
-                               AST tmp73_AST = null;
-                               AST tmp73_AST_in = null;
-                               tmp73_AST = astFactory.create((AST)_t);
-                               tmp73_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp73_AST);
-                               match(_t,VISIBLE);
-                               _t = _t.getNextSibling();
-                               cualificador_elemento_clase1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = cualificador_elemento_clase1_AST;
-               _retTree = _t;
-       }
-       
-       public final void tipo1(AST _t) throws RecognitionException {
-               
-               AST tipo1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST tipo1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ENTERO:
-                       case REAL:
-                       case LOGICO:
-                       case CARACTER:
-                       {
-                               tipo_predefinido_simple1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case FORMACION:
-                       {
-                               tipo_predefinido_compuesto1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case CLASE:
-                       {
-                               declaracion_clase1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ERROR:
-                       {
-                               declaracion_error1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               tipo1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = tipo1_AST;
-               _retTree = _t;
-       }
-       
-       public final void prototipo_metodo1(AST _t) throws RecognitionException {
-               
-               AST prototipo_metodo1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST prototipo_metodo1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9932 = _t;
-                       AST tmp74_AST = null;
-                       AST tmp74_AST_in = null;
-                       tmp74_AST = astFactory.create((AST)_t);
-                       tmp74_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp74_AST);
-                       ASTPair __currentAST9932 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,PROTOTIPO);
-                       _t = _t.getFirstChild();
-                       AST tmp75_AST = null;
-                       AST tmp75_AST_in = null;
-                       tmp75_AST = astFactory.create((AST)_t);
-                       tmp75_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp75_AST);
-                       match(_t,IDENT);
-                       _t = _t.getNextSibling();
-                       AST __t9933 = _t;
-                       AST tmp76_AST = null;
-                       AST tmp76_AST_in = null;
-                       tmp76_AST = astFactory.create((AST)_t);
-                       tmp76_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp76_AST);
-                       ASTPair __currentAST9933 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,PARAMETROS);
-                       _t = _t.getFirstChild();
-                       declaracion_parametros1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9933;
-                       _t = __t9933;
-                       _t = _t.getNextSibling();
-                       AST __t9934 = _t;
-                       AST tmp77_AST = null;
-                       AST tmp77_AST_in = null;
-                       tmp77_AST = astFactory.create((AST)_t);
-                       tmp77_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp77_AST);
-                       ASTPair __currentAST9934 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,RESULTADO);
-                       _t = _t.getFirstChild();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ERROR:
-                       case CLASE:
-                       case ENTERO:
-                       case REAL:
-                       case LOGICO:
-                       case CARACTER:
-                       case FORMACION:
-                       {
-                               tipo1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       case VACIO:
-                       {
-                               AST tmp78_AST = null;
-                               AST tmp78_AST_in = null;
-                               tmp78_AST = astFactory.create((AST)_t);
-                               tmp78_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp78_AST);
-                               match(_t,VACIO);
-                               _t = _t.getNextSibling();
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9934;
-                       _t = __t9934;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9932;
-                       _t = __t9932;
-                       _t = _t.getNextSibling();
-                       prototipo_metodo1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = prototipo_metodo1_AST;
-               _retTree = _t;
-       }
-       
-       public final void definicion_metodo1(AST _t) throws RecognitionException {
-               
-               AST definicion_metodo1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST definicion_metodo1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9942 = _t;
-                       AST tmp79_AST = null;
-                       AST tmp79_AST_in = null;
-                       tmp79_AST = astFactory.create((AST)_t);
-                       tmp79_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp79_AST);
-                       ASTPair __currentAST9942 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,DEFINICION);
-                       _t = _t.getFirstChild();
-                       AST __t9943 = _t;
-                       AST tmp80_AST = null;
-                       AST tmp80_AST_in = null;
-                       tmp80_AST = astFactory.create((AST)_t);
-                       tmp80_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp80_AST);
-                       ASTPair __currentAST9943 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,VARIABLES_LOCALES);
-                       _t = _t.getFirstChild();
-                       declaracion_variables_locales1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9943;
-                       _t = __t9943;
-                       _t = _t.getNextSibling();
-                       AST __t9944 = _t;
-                       AST tmp81_AST = null;
-                       AST tmp81_AST_in = null;
-                       tmp81_AST = astFactory.create((AST)_t);
-                       tmp81_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp81_AST);
-                       ASTPair __currentAST9944 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCIONES);
-                       _t = _t.getFirstChild();
-                       instrucciones1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9944;
-                       _t = __t9944;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9942;
-                       _t = __t9942;
-                       _t = _t.getNextSibling();
-                       definicion_metodo1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = definicion_metodo1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_parametros1(AST _t) throws RecognitionException {
-               
-               AST declaracion_parametros1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_parametros1_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9938:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==PARAMETRO)) {
-                                       declaracion_parametro1(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9938;
-                               }
-                               
-                       } while (true);
-                       }
-                       declaracion_parametros1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_parametros1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_variables_locales1(AST _t) throws RecognitionException {
-               
-               AST declaracion_variables_locales1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_variables_locales1_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9947:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==VARIABLE_LOCAL)) {
-                                       declaracion_variable_local1(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9947;
-                               }
-                               
-                       } while (true);
-                       }
-                       declaracion_variables_locales1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_variables_locales1_AST;
-               _retTree = _t;
-       }
-       
-       public final void instrucciones1(AST _t) throws RecognitionException {
-               
-               AST instrucciones1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instrucciones1_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9953:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_t.getType()==INSTRUCCION)) {
-                                       instruccion1(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9953;
-                               }
-                               
-                       } while (true);
-                       }
-                       instrucciones1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instrucciones1_AST;
-               _retTree = _t;
-       }
-       
-       public final void declaracion_error1(AST _t) throws RecognitionException {
-               
-               AST declaracion_error1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST declaracion_error1_AST = null;
-               
-               try {      // for error handling
-                       AST tmp82_AST = null;
-                       AST tmp82_AST_in = null;
-                       tmp82_AST = astFactory.create((AST)_t);
-                       tmp82_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp82_AST);
-                       match(_t,ERROR);
-                       _t = _t.getNextSibling();
-                       declaracion_error1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = declaracion_error1_AST;
-               _retTree = _t;
-       }
-       
-       public final void instruccion1(AST _t) throws RecognitionException {
-               
-               AST instruccion1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instruccion1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9955 = _t;
-                       AST tmp83_AST = null;
-                       AST tmp83_AST_in = null;
-                       tmp83_AST = astFactory.create((AST)_t);
-                       tmp83_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp83_AST);
-                       ASTPair __currentAST9955 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCION);
-                       _t = _t.getFirstChild();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case LLAMADA:
-                       case DEV:
-                       case ASIGNACION:
-                       case CREAR:
-                       case ESCRIBIR:
-                       {
-                               instruccion_simple1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       case SI:
-                       case MIENTRAS:
-                       {
-                               instruccion_compuesta1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9955;
-                       _t = __t9955;
-                       _t = _t.getNextSibling();
-                       instruccion1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instruccion1_AST;
-               _retTree = _t;
-       }
-       
-       public final void instruccion_simple1(AST _t) throws RecognitionException {
-               
-               AST instruccion_simple1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instruccion_simple1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case CREAR:
-                       {
-                               crear1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LLAMADA:
-                       {
-                               llamada_metodo1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ESCRIBIR:
-                       {
-                               escribir1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ASIGNACION:
-                       {
-                               asignacion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case DEV:
-                       {
-                               retorno1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_simple1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instruccion_simple1_AST;
-               _retTree = _t;
-       }
-       
-       public final void instruccion_compuesta1(AST _t) throws RecognitionException {
-               
-               AST instruccion_compuesta1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST instruccion_compuesta1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case SI:
-                       {
-                               condicion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_compuesta1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MIENTRAS:
-                       {
-                               iteracion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               instruccion_compuesta1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = instruccion_compuesta1_AST;
-               _retTree = _t;
-       }
-       
-       public final void crear1(AST _t) throws RecognitionException {
-               
-               AST crear1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST crear1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9959 = _t;
-                       AST tmp84_AST = null;
-                       AST tmp84_AST_in = null;
-                       tmp84_AST = astFactory.create((AST)_t);
-                       tmp84_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp84_AST);
-                       ASTPair __currentAST9959 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,CREAR);
-                       _t = _t.getFirstChild();
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9959;
-                       _t = __t9959;
-                       _t = _t.getNextSibling();
-                       crear1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = crear1_AST;
-               _retTree = _t;
-       }
-       
-       public final void llamada_metodo1(AST _t) throws RecognitionException {
-               
-               AST llamada_metodo1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST llamada_metodo1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9968 = _t;
-                       AST tmp85_AST = null;
-                       AST tmp85_AST_in = null;
-                       tmp85_AST = astFactory.create((AST)_t);
-                       tmp85_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp85_AST);
-                       ASTPair __currentAST9968 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,LLAMADA);
-                       _t = _t.getFirstChild();
-                       acceso1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       AST __t9969 = _t;
-                       AST tmp86_AST = null;
-                       AST tmp86_AST_in = null;
-                       tmp86_AST = astFactory.create((AST)_t);
-                       tmp86_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp86_AST);
-                       ASTPair __currentAST9969 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,EXPRESIONES);
-                       _t = _t.getFirstChild();
-                       lista_expresiones1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9969;
-                       _t = __t9969;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9968;
-                       _t = __t9968;
-                       _t = _t.getNextSibling();
-                       llamada_metodo1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = llamada_metodo1_AST;
-               _retTree = _t;
-       }
-       
-       public final void escribir1(AST _t) throws RecognitionException {
-               
-               AST escribir1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST escribir1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9961 = _t;
-                       AST tmp87_AST = null;
-                       AST tmp87_AST_in = null;
-                       tmp87_AST = astFactory.create((AST)_t);
-                       tmp87_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp87_AST);
-                       ASTPair __currentAST9961 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,ESCRIBIR);
-                       _t = _t.getFirstChild();
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9961;
-                       _t = __t9961;
-                       _t = _t.getNextSibling();
-                       escribir1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = escribir1_AST;
-               _retTree = _t;
-       }
-       
-       public final void asignacion1(AST _t) throws RecognitionException {
-               
-               AST asignacion1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST asignacion1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9964 = _t;
-                       AST tmp88_AST = null;
-                       AST tmp88_AST_in = null;
-                       tmp88_AST = astFactory.create((AST)_t);
-                       tmp88_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp88_AST);
-                       ASTPair __currentAST9964 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,ASIGNACION);
-                       _t = _t.getFirstChild();
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9964;
-                       _t = __t9964;
-                       _t = _t.getNextSibling();
-                       asignacion1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = asignacion1_AST;
-               _retTree = _t;
-       }
-       
-       public final void retorno1(AST _t) throws RecognitionException {
-               
-               AST retorno1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST retorno1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9966 = _t;
-                       AST tmp89_AST = null;
-                       AST tmp89_AST_in = null;
-                       tmp89_AST = astFactory.create((AST)_t);
-                       tmp89_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp89_AST);
-                       ASTPair __currentAST9966 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,DEV);
-                       _t = _t.getFirstChild();
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9966;
-                       _t = __t9966;
-                       _t = _t.getNextSibling();
-                       retorno1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = retorno1_AST;
-               _retTree = _t;
-       }
-       
-       public final void expresion1(AST _t) throws RecognitionException {
-               
-               AST expresion1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST expresion1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case O:
-                       {
-                               AST __t9982 = _t;
-                               AST tmp90_AST = null;
-                               AST tmp90_AST_in = null;
-                               tmp90_AST = astFactory.create((AST)_t);
-                               tmp90_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp90_AST);
-                               ASTPair __currentAST9982 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,O);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9982;
-                               _t = __t9982;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case Y:
-                       {
-                               AST __t9983 = _t;
-                               AST tmp91_AST = null;
-                               AST tmp91_AST_in = null;
-                               tmp91_AST = astFactory.create((AST)_t);
-                               tmp91_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp91_AST);
-                               ASTPair __currentAST9983 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,Y);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9983;
-                               _t = __t9983;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case NO:
-                       {
-                               AST __t9984 = _t;
-                               AST tmp92_AST = null;
-                               AST tmp92_AST_in = null;
-                               tmp92_AST = astFactory.create((AST)_t);
-                               tmp92_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp92_AST);
-                               ASTPair __currentAST9984 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,NO);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9984;
-                               _t = __t9984;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MAYOR:
-                       {
-                               AST __t9985 = _t;
-                               AST tmp93_AST = null;
-                               AST tmp93_AST_in = null;
-                               tmp93_AST = astFactory.create((AST)_t);
-                               tmp93_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp93_AST);
-                               ASTPair __currentAST9985 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MAYOR);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9985;
-                               _t = __t9985;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MAYOR_IGUAL:
-                       {
-                               AST __t9986 = _t;
-                               AST tmp94_AST = null;
-                               AST tmp94_AST_in = null;
-                               tmp94_AST = astFactory.create((AST)_t);
-                               tmp94_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp94_AST);
-                               ASTPair __currentAST9986 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MAYOR_IGUAL);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9986;
-                               _t = __t9986;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOR:
-                       {
-                               AST __t9987 = _t;
-                               AST tmp95_AST = null;
-                               AST tmp95_AST_in = null;
-                               tmp95_AST = astFactory.create((AST)_t);
-                               tmp95_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp95_AST);
-                               ASTPair __currentAST9987 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOR);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9987;
-                               _t = __t9987;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOR_IGUAL:
-                       {
-                               AST __t9988 = _t;
-                               AST tmp96_AST = null;
-                               AST tmp96_AST_in = null;
-                               tmp96_AST = astFactory.create((AST)_t);
-                               tmp96_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp96_AST);
-                               ASTPair __currentAST9988 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOR_IGUAL);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9988;
-                               _t = __t9988;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case IGUAL:
-                       {
-                               AST __t9989 = _t;
-                               AST tmp97_AST = null;
-                               AST tmp97_AST_in = null;
-                               tmp97_AST = astFactory.create((AST)_t);
-                               tmp97_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp97_AST);
-                               ASTPair __currentAST9989 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,IGUAL);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9989;
-                               _t = __t9989;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case DISTINTO:
-                       {
-                               AST __t9990 = _t;
-                               AST tmp98_AST = null;
-                               AST tmp98_AST_in = null;
-                               tmp98_AST = astFactory.create((AST)_t);
-                               tmp98_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp98_AST);
-                               ASTPair __currentAST9990 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,DISTINTO);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9990;
-                               _t = __t9990;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MAS:
-                       {
-                               AST __t9991 = _t;
-                               AST tmp99_AST = null;
-                               AST tmp99_AST_in = null;
-                               tmp99_AST = astFactory.create((AST)_t);
-                               tmp99_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp99_AST);
-                               ASTPair __currentAST9991 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MAS);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9991;
-                               _t = __t9991;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOS:
-                       {
-                               AST __t9992 = _t;
-                               AST tmp100_AST = null;
-                               AST tmp100_AST_in = null;
-                               tmp100_AST = astFactory.create((AST)_t);
-                               tmp100_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp100_AST);
-                               ASTPair __currentAST9992 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOS);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9992;
-                               _t = __t9992;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case MENOSUNARIO:
-                       {
-                               AST __t9993 = _t;
-                               AST tmp101_AST = null;
-                               AST tmp101_AST_in = null;
-                               tmp101_AST = astFactory.create((AST)_t);
-                               tmp101_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp101_AST);
-                               ASTPair __currentAST9993 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,MENOSUNARIO);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9993;
-                               _t = __t9993;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case POR:
-                       {
-                               AST __t9994 = _t;
-                               AST tmp102_AST = null;
-                               AST tmp102_AST_in = null;
-                               tmp102_AST = astFactory.create((AST)_t);
-                               tmp102_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp102_AST);
-                               ASTPair __currentAST9994 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,POR);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9994;
-                               _t = __t9994;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case DIVISION:
-                       {
-                               AST __t9995 = _t;
-                               AST tmp103_AST = null;
-                               AST tmp103_AST_in = null;
-                               tmp103_AST = astFactory.create((AST)_t);
-                               tmp103_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp103_AST);
-                               ASTPair __currentAST9995 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,DIVISION);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9995;
-                               _t = __t9995;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LLAMADA:
-                       {
-                               AST __t9996 = _t;
-                               AST tmp104_AST = null;
-                               AST tmp104_AST_in = null;
-                               tmp104_AST = astFactory.create((AST)_t);
-                               tmp104_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp104_AST);
-                               ASTPair __currentAST9996 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,LLAMADA);
-                               _t = _t.getFirstChild();
-                               acceso1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               AST __t9997 = _t;
-                               AST tmp105_AST = null;
-                               AST tmp105_AST_in = null;
-                               tmp105_AST = astFactory.create((AST)_t);
-                               tmp105_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp105_AST);
-                               ASTPair __currentAST9997 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,EXPRESIONES);
-                               _t = _t.getFirstChild();
-                               lista_expresiones1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9997;
-                               _t = __t9997;
-                               _t = _t.getNextSibling();
-                               currentAST = __currentAST9996;
-                               _t = __t9996;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ACCESO_TABLA:
-                       {
-                               AST __t9998 = _t;
-                               AST tmp106_AST = null;
-                               AST tmp106_AST_in = null;
-                               tmp106_AST = astFactory.create((AST)_t);
-                               tmp106_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp106_AST);
-                               ASTPair __currentAST9998 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ACCESO_TABLA);
-                               _t = _t.getFirstChild();
-                               acceso1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               AST __t9999 = _t;
-                               AST tmp107_AST = null;
-                               AST tmp107_AST_in = null;
-                               tmp107_AST = astFactory.create((AST)_t);
-                               tmp107_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp107_AST);
-                               ASTPair __currentAST9999 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,EXPRESIONES);
-                               _t = _t.getFirstChild();
-                               lista_expresiones_nv1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9999;
-                               _t = __t9999;
-                               _t = _t.getNextSibling();
-                               currentAST = __currentAST9998;
-                               _t = __t9998;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ACCESO_OBJETO:
-                       case ACCESO_SIMPLE:
-                       {
-                               acceso1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LIT_ENTERO:
-                       {
-                               AST tmp108_AST = null;
-                               AST tmp108_AST_in = null;
-                               tmp108_AST = astFactory.create((AST)_t);
-                               tmp108_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp108_AST);
-                               match(_t,LIT_ENTERO);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LIT_REAL:
-                       {
-                               AST tmp109_AST = null;
-                               AST tmp109_AST_in = null;
-                               tmp109_AST = astFactory.create((AST)_t);
-                               tmp109_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp109_AST);
-                               match(_t,LIT_REAL);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case LIT_CAR:
-                       {
-                               AST tmp110_AST = null;
-                               AST tmp110_AST_in = null;
-                               tmp110_AST = astFactory.create((AST)_t);
-                               tmp110_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp110_AST);
-                               match(_t,LIT_CAR);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case CIERTO:
-                       {
-                               AST tmp111_AST = null;
-                               AST tmp111_AST_in = null;
-                               tmp111_AST = astFactory.create((AST)_t);
-                               tmp111_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp111_AST);
-                               match(_t,CIERTO);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case FALSO:
-                       {
-                               AST tmp112_AST = null;
-                               AST tmp112_AST_in = null;
-                               tmp112_AST = astFactory.create((AST)_t);
-                               tmp112_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp112_AST);
-                               match(_t,FALSO);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case NULO:
-                       {
-                               AST tmp113_AST = null;
-                               AST tmp113_AST_in = null;
-                               tmp113_AST = astFactory.create((AST)_t);
-                               tmp113_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp113_AST);
-                               match(_t,NULO);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ENTERO_A_REAL:
-                       {
-                               AST __t10000 = _t;
-                               AST tmp114_AST = null;
-                               AST tmp114_AST_in = null;
-                               tmp114_AST = astFactory.create((AST)_t);
-                               tmp114_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp114_AST);
-                               ASTPair __currentAST10000 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ENTERO_A_REAL);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST10000;
-                               _t = __t10000;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case REAL_A_ENTERO:
-                       {
-                               AST __t10001 = _t;
-                               AST tmp115_AST = null;
-                               AST tmp115_AST_in = null;
-                               tmp115_AST = astFactory.create((AST)_t);
-                               tmp115_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp115_AST);
-                               ASTPair __currentAST10001 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,REAL_A_ENTERO);
-                               _t = _t.getFirstChild();
-                               expresion1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST10001;
-                               _t = __t10001;
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ERROR:
-                       {
-                               AST tmp116_AST = null;
-                               AST tmp116_AST_in = null;
-                               tmp116_AST = astFactory.create((AST)_t);
-                               tmp116_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp116_AST);
-                               match(_t,ERROR);
-                               _t = _t.getNextSibling();
-                               expresion1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = expresion1_AST;
-               _retTree = _t;
-       }
-       
-       public final void condicion1(AST _t) throws RecognitionException {
-               
-               AST condicion1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST condicion1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9974 = _t;
-                       AST tmp117_AST = null;
-                       AST tmp117_AST_in = null;
-                       tmp117_AST = astFactory.create((AST)_t);
-                       tmp117_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp117_AST);
-                       ASTPair __currentAST9974 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,SI);
-                       _t = _t.getFirstChild();
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       AST __t9975 = _t;
-                       AST tmp118_AST = null;
-                       AST tmp118_AST_in = null;
-                       tmp118_AST = astFactory.create((AST)_t);
-                       tmp118_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp118_AST);
-                       ASTPair __currentAST9975 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCIONES);
-                       _t = _t.getFirstChild();
-                       instrucciones1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9975;
-                       _t = __t9975;
-                       _t = _t.getNextSibling();
-                       {
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case INSTRUCCIONES:
-                       {
-                               AST __t9977 = _t;
-                               AST tmp119_AST = null;
-                               AST tmp119_AST_in = null;
-                               tmp119_AST = astFactory.create((AST)_t);
-                               tmp119_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp119_AST);
-                               ASTPair __currentAST9977 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,INSTRUCCIONES);
-                               _t = _t.getFirstChild();
-                               instrucciones1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST9977;
-                               _t = __t9977;
-                               _t = _t.getNextSibling();
-                               break;
-                       }
-                       case 3:
-                       {
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-                       }
-                       currentAST = __currentAST9974;
-                       _t = __t9974;
-                       _t = _t.getNextSibling();
-                       condicion1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = condicion1_AST;
-               _retTree = _t;
-       }
-       
-       public final void iteracion1(AST _t) throws RecognitionException {
-               
-               AST iteracion1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST iteracion1_AST = null;
-               
-               try {      // for error handling
-                       AST __t9979 = _t;
-                       AST tmp120_AST = null;
-                       AST tmp120_AST_in = null;
-                       tmp120_AST = astFactory.create((AST)_t);
-                       tmp120_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp120_AST);
-                       ASTPair __currentAST9979 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,MIENTRAS);
-                       _t = _t.getFirstChild();
-                       expresion1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       AST __t9980 = _t;
-                       AST tmp121_AST = null;
-                       AST tmp121_AST_in = null;
-                       tmp121_AST = astFactory.create((AST)_t);
-                       tmp121_AST_in = (AST)_t;
-                       astFactory.addASTChild(currentAST, tmp121_AST);
-                       ASTPair __currentAST9980 = currentAST.copy();
-                       currentAST.root = currentAST.child;
-                       currentAST.child = null;
-                       match(_t,INSTRUCCIONES);
-                       _t = _t.getFirstChild();
-                       instrucciones1(_t);
-                       _t = _retTree;
-                       astFactory.addASTChild(currentAST, returnAST);
-                       currentAST = __currentAST9980;
-                       _t = __t9980;
-                       _t = _t.getNextSibling();
-                       currentAST = __currentAST9979;
-                       _t = __t9979;
-                       _t = _t.getNextSibling();
-                       iteracion1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = iteracion1_AST;
-               _retTree = _t;
-       }
-       
-       public final void acceso1(AST _t) throws RecognitionException {
-               
-               AST acceso1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST acceso1_AST = null;
-               
-               try {      // for error handling
-                       if (_t==null) _t=ASTNULL;
-                       switch ( _t.getType()) {
-                       case ACCESO_SIMPLE:
-                       {
-                               AST __t10003 = _t;
-                               AST tmp122_AST = null;
-                               AST tmp122_AST_in = null;
-                               tmp122_AST = astFactory.create((AST)_t);
-                               tmp122_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp122_AST);
-                               ASTPair __currentAST10003 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ACCESO_SIMPLE);
-                               _t = _t.getFirstChild();
-                               AST tmp123_AST = null;
-                               AST tmp123_AST_in = null;
-                               tmp123_AST = astFactory.create((AST)_t);
-                               tmp123_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp123_AST);
-                               match(_t,IDENT);
-                               _t = _t.getNextSibling();
-                               declaracion_acceso1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST10003;
-                               _t = __t10003;
-                               _t = _t.getNextSibling();
-                               acceso1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       case ACCESO_OBJETO:
-                       {
-                               AST __t10004 = _t;
-                               AST tmp124_AST = null;
-                               AST tmp124_AST_in = null;
-                               tmp124_AST = astFactory.create((AST)_t);
-                               tmp124_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp124_AST);
-                               ASTPair __currentAST10004 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ACCESO_OBJETO);
-                               _t = _t.getFirstChild();
-                               AST __t10005 = _t;
-                               AST tmp125_AST = null;
-                               AST tmp125_AST_in = null;
-                               tmp125_AST = astFactory.create((AST)_t);
-                               tmp125_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp125_AST);
-                               ASTPair __currentAST10005 = currentAST.copy();
-                               currentAST.root = currentAST.child;
-                               currentAST.child = null;
-                               match(_t,ACCESO_SIMPLE);
-                               _t = _t.getFirstChild();
-                               AST tmp126_AST = null;
-                               AST tmp126_AST_in = null;
-                               tmp126_AST = astFactory.create((AST)_t);
-                               tmp126_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp126_AST);
-                               match(_t,IDENT);
-                               _t = _t.getNextSibling();
-                               declaracion_acceso1(_t);
-                               _t = _retTree;
-                               astFactory.addASTChild(currentAST, returnAST);
-                               currentAST = __currentAST10005;
-                               _t = __t10005;
-                               _t = _t.getNextSibling();
-                               AST tmp127_AST = null;
-                               AST tmp127_AST_in = null;
-                               tmp127_AST = astFactory.create((AST)_t);
-                               tmp127_AST_in = (AST)_t;
-                               astFactory.addASTChild(currentAST, tmp127_AST);
-                               match(_t,IDENT);
-                               _t = _t.getNextSibling();
-                               currentAST = __currentAST10004;
-                               _t = __t10004;
-                               _t = _t.getNextSibling();
-                               acceso1_AST = (AST)currentAST.root;
-                               break;
-                       }
-                       default:
-                       {
-                               throw new NoViableAltException(_t);
-                       }
-                       }
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = acceso1_AST;
-               _retTree = _t;
-       }
-       
-       public final void lista_expresiones1(AST _t) throws RecognitionException {
-               
-               AST lista_expresiones1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST lista_expresiones1_AST = null;
-               
-               try {      // for error handling
-                       {
-                       _loop9972:
-                       do {
-                               if (_t==null) _t=ASTNULL;
-                               if ((_tokenSet_1.member(_t.getType()))) {
-                                       expresion1(_t);
-                                       _t = _retTree;
-                                       astFactory.addASTChild(currentAST, returnAST);
-                               }
-                               else {
-                                       break _loop9972;
-                               }
-                               
-                       } while (true);
-                       }
-                       lista_expresiones1_AST = (AST)currentAST.root;
-               }
-               catch (RecognitionException ex) {
-                       reportError(ex);
-                       if (_t!=null) {_t = _t.getNextSibling();}
-               }
-               returnAST = lista_expresiones1_AST;
-               _retTree = _t;
-       }
-       
-       public final void lista_expresiones_nv1(AST _t) throws RecognitionException {
-               
-               AST lista_expresiones_nv1_AST_in = (_t == ASTNULL) ? null : (AST)_t;
-               returnAST = null;
-               ASTPair currentAST = new ASTPair();
-               AST lista_expresiones_nv1_AST = null;
-               
-               try {      // for error handling
-                       {
-                       int _cnt10009=0;
-                       _loop10009:
-                       do {
-