Exemplo n.º 1
0
        /** Invoke a user supplied parse action. */
        public override TUVienna.CS_CUP.Runtime.Symbol do_action(
            int act_num,
            TUVienna.CS_CUP.Runtime.lr_parser parser,
            System.Collections.Stack xstack1,
            int top)
        {
            mStack CUP_parser_stack = new mStack(xstack1);

            /* call code in generated class */
            return(action_obj.CUP_TinyParser_do_action(act_num, parser, stack, top));
        }
Exemplo n.º 2
0
     /*-----------------------------------------------------------*/
     /*--- General Methods ---------------------------------------*/
     /*-----------------------------------------------------------*/
     /** Perform a bit of user supplied action code (supplied by generated
        *  subclass).  Actions are indexed by an internal action number assigned
        *  at parser generation time.
        *
        * @param act_num   the internal index of the action to be performed.
        * @param parser    the parser object we are acting for.
        * @param stack     the parse stack of that object.
        * @param top       the index of the top element of the parse stack.
        */
     public abstract Symbol do_action(
 int       act_num, 
 lr_parser parser, 
 Stack     stack, 
 int       top);
Exemplo n.º 3
0
        /** Method with the actual generated action code. */
        public TUVienna.CS_CUP.Runtime.Symbol CUP_TinyParser_do_action(
            int CUP_TinyParser_act_num,
            TUVienna.CS_CUP.Runtime.lr_parser CUP_TinyParser_parser,
            System.Collections.Stack xstack1,
            int CUP_TinyParser_top)
        {
            /* Symbol object for return from actions */
            mStack CUP_TinyParser_stack = new mStack(xstack1);

            TUVienna.CS_CUP.Runtime.Symbol CUP_TinyParser_result;

            /* select the action based on the action number */
            switch (CUP_TinyParser_act_num)
            {
            /*. . . . . . . . . . . . . . . . . . . .*/
            case 30: // factor ::= error
            {
                Expresion RESULT = null;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(13 /*factor*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 29: // factor ::= IDENTIFICADOR
            {
                Expresion        RESULT = null;
                SimboloAbstracto id     = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Variable(id, id.Linea, id.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(13 /*factor*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 28: // factor ::= LIT_ENTERO
            {
                Expresion        RESULT = null;
                SimboloAbstracto val    = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new NumeroEntero(val, val.Linea, val.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(13 /*factor*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 27: // factor ::= PARENT_IZQ exp PARENT_DER
            {
                Expresion RESULT = null;
                Expresion e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;

                RESULT = e;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(13 /*factor*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 26: // term ::= factor
            {
                Expresion RESULT = null;
                Expresion e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = e;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(12 /*term*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 25: // term ::= term DIVISION factor
            {
                Expresion        RESULT = null;
                Expresion        e1     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto d      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e2     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Division(e1, e2, d.Linea, d.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(12 /*term*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 24: // term ::= term MULTIPLICACION factor
            {
                Expresion        RESULT = null;
                Expresion        e1     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto m      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e2     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Multiplicacion(e1, e2, m.Linea, m.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(12 /*term*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 23: // exp_simple ::= term
            {
                Expresion RESULT = null;
                Expresion e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = e;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(11 /*exp_simple*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 22: // exp_simple ::= exp_simple RESTA term
            {
                Expresion        RESULT = null;
                Expresion        e1     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto r      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e2     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Resta(e1, e2, r.Linea, r.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(11 /*exp_simple*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 21: // exp_simple ::= exp_simple SUMA term
            {
                Expresion        RESULT = null;
                Expresion        e1     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto s      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e2     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Suma(e1, e2, s.Linea, s.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(11 /*exp_simple*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 20: // exp ::= exp_simple
            {
                Expresion RESULT = null;
                Expresion e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = e;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(10 /*exp*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 19: // exp ::= exp_simple IGUAL exp_simple
            {
                Expresion        RESULT = null;
                Expresion        e1     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto i      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e2     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Igual(e1, e2, i.Linea, i.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(10 /*exp*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 18: // exp ::= exp_simple MENOR exp_simple
            {
                Expresion        RESULT = null;
                Expresion        e1     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto m      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e2     = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Menor(e1, e2, m.Linea, m.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(10 /*exp*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 17: // args ::= args COMA exp
            {
                ListaParametros RESULT = null;
                ListaParametros p      = (ListaParametros)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                Expresion       e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                p.agregarElemento(e);
                RESULT = p;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(9 /*args*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 16: // args ::= exp
            {
                ListaParametros RESULT = null;
                Expresion       e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new ListaParametros();
                RESULT.agregarElemento(e);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(9 /*args*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 15: // opt_args ::=
            {
                ListaParametros RESULT = null;

                RESULT = new ListaParametros();

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(8 /*opt_args*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 14: // opt_args ::= args
            {
                ListaParametros RESULT = null;
                ListaParametros p      = (ListaParametros)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = p;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(8 /*opt_args*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 13: // fuction_call ::= IDENTIFICADOR opt_args
            {
                Sentencia        RESULT = null;
                SimboloAbstracto id     = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                ListaParametros  p      = (ListaParametros)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new LLamadaFuncion(id, p, id.Linea, id.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(7 /*fuction_call*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 12: // sent_assign ::= IDENTIFICADOR ASIGNACION exp
            {
                Sentencia        RESULT = null;
                SimboloAbstracto id     = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                SimboloAbstracto a      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                Expresion        e      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Asignacion(new Variable(id, id.Linea, id.Columna), e, a.Linea, a.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(6 /*sent_assign*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 11: // sent_repeat ::= REPITA secuencia_sent HASTA exp
            {
                Sentencia        RESULT = null;
                SimboloAbstracto r      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 3)).value;
                ListaSentencia   s      = (ListaSentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                Expresion        c      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new RepitaHasta(c, s, r.Linea, r.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sent_repeat*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 10: // sent_if ::= SI exp ENTONCES secuencia_sent SINO secuencia_sent FIN
            {
                Sentencia        RESULT = null;
                SimboloAbstracto s      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 6)).value;
                Expresion        c      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 5)).value;
                ListaSentencia   en     = (ListaSentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 3)).value;
                ListaSentencia   sn     = (ListaSentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;

                RESULT = new Condicional(c, en, sn, s.Linea, s.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sent_if*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 9: // sent_if ::= SI exp ENTONCES secuencia_sent FIN
            {
                Sentencia        RESULT = null;
                SimboloAbstracto s      = (SimboloAbstracto)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 4)).value;
                Expresion        c      = (Expresion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 3)).value;
                ListaSentencia   en     = (ListaSentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;

                RESULT = new Condicional(c, en, null, s.Linea, s.Columna);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sent_if*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 8: // sent ::= error
            {
                Sentencia RESULT = null;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 7: // sent ::= fuction_call
            {
                Sentencia RESULT = null;
                Sentencia s      = (Sentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;
                RESULT = s;
                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 6: // sent ::= sent_assign
            {
                Sentencia RESULT = null;
                Sentencia s      = (Sentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;
                RESULT = s;
                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 5: // sent ::= sent_repeat
            {
                Sentencia RESULT = null;
                Sentencia s      = (Sentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;
                RESULT = s;
                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 4: // sent ::= sent_if
            {
                Sentencia RESULT = null;
                Sentencia s      = (Sentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;
                RESULT = s;
                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 3: // secuencia_sent ::= sent
            {
                ListaSentencia RESULT = null;
                Sentencia      s      = (Sentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new ListaSentencia();
                RESULT.agregarElemento(s);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(2 /*secuencia_sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 2: // secuencia_sent ::= secuencia_sent PUNTO_Y_COMA sent
            {
                ListaSentencia RESULT = null;
                ListaSentencia sc     = (ListaSentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 2)).value;
                Sentencia      s      = (Sentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                sc.agregarElemento(s);
                RESULT = sc;

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(2 /*secuencia_sent*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 1: // programa ::= secuencia_sent
            {
                Programa       RESULT = null;
                ListaSentencia sc     = (ListaSentencia)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 0)).value;

                RESULT = new Programa(sc, 1, 0);

                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(1 /*programa*/, RESULT);
            }
                return(CUP_TinyParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 0: // $START ::= programa EOF
            {
                object   RESULT    = null;
                Programa start_val = (Programa)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyParser_stack.elementAt(CUP_TinyParser_top - 1)).value;
                RESULT = start_val;
                CUP_TinyParser_result = new TUVienna.CS_CUP.Runtime.Symbol(0 /*$START*/, RESULT);
            }
                /* ACCEPT */
                CUP_TinyParser_parser.done_parsing();
                return(CUP_TinyParser_result);

            /* . . . . . .*/
            default:
                throw new System.Exception(
                          "Invalid action number found in internal parse table");
            }
        }
Exemplo n.º 4
0
 public abstract Symbol do_action(int act_num, lr_parser parser, Stack stack, int top);
        /** Method with the actual generated action code. */
        public TUVienna.CS_CUP.Runtime.Symbol CUP_TinyMachineParser_do_action(
            int CUP_TinyMachineParser_act_num,
            TUVienna.CS_CUP.Runtime.lr_parser CUP_TinyMachineParser_parser,
            System.Collections.Stack xstack1,
            int CUP_TinyMachineParser_top)
        {
            /* Symbol object for return from actions */
            mStack CUP_TinyMachineParser_stack = new mStack(xstack1);

            TUVienna.CS_CUP.Runtime.Symbol CUP_TinyMachineParser_result;

            /* select the action based on the action number */
            switch (CUP_TinyMachineParser_act_num)
            {
            /*. . . . . . . . . . . . . . . . . . . .*/
            case 30: // argRO ::= ENTERO COMA ENTERO PARENT_IZQ ENTERO PARENT_DER
            {
                Operacion RESULT = null;
                Symbol    r      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 5)).value;
                Symbol    s      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 3)).value;
                Symbol    t      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                RESULT = new Operacion(r, s, t);
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(7 /*argRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 29: // sentenciaRO ::= JNE argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 28: // sentenciaRO ::= JEQ argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 27: // sentenciaRO ::= JGT argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 26: // sentenciaRO ::= JGE argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 25: // sentenciaRO ::= JLE argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 24: // sentenciaRO ::= JLT argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 23: // sentenciaRO ::= ST argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 22: // sentenciaRO ::= LDC argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 21: // sentenciaRO ::= LDA argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 20: // sentenciaRO ::= LD argRO
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(5 /*sentenciaRO*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 19: // argRM ::= ENTERO COMA ENTERO COMA ENTERO
            {
                Operacion RESULT = null;
                Symbol    r      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 4)).value;
                Symbol    s      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 2)).value;
                Symbol    t      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                RESULT = new Operacion(r, s, t);
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(6 /*argRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 18: // sentenciaRM ::= DIV argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 17: // sentenciaRM ::= MUL argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 16: // sentenciaRM ::= SUB argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 15: // sentenciaRM ::= ADD argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 14: // sentenciaRM ::= OUT argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 13: // sentenciaRM ::= IN argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 12: // sentenciaRM ::= HALT argRM
            {
                Operacion RESULT = null;
                Symbol    op     = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.Opcode = op; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(4 /*sentenciaRM*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 11: // fin_sent ::=
            {
                string RESULT = null;

                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(8 /*fin_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 10: // fin_sent ::= COMENTARIO_LINEA
            {
                string RESULT = null;
                string c      = (string)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                RESULT = c;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(8 /*fin_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 9: // fin_sent ::= COMENTARIO_FIN
            {
                string RESULT = null;
                string c      = (string)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                RESULT = c;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(8 /*fin_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 8: // fin_sent ::= FIN_LINEA
            {
                string RESULT = null;
                RESULT = "";
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(8 /*fin_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 7: // sent ::= ENTERO COLON sentenciaRO fin_sent
            {
                Operacion RESULT = null;
                Symbol    l      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 3)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                string    c      = (string)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.NumeroOp = (int)l.value; i.Comentario = c; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 6: // sent ::= ENTERO COLON sentenciaRM fin_sent
            {
                Operacion RESULT = null;
                Symbol    l      = (Symbol)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 3)).value;
                Operacion i      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                string    c      = (string)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                i.NumeroOp = (int)l.value; i.Comentario = c; RESULT = i;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 5: // sent ::= COMENTARIO_LINEA
            {
                Operacion RESULT = null;
                RESULT = null;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(3 /*sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 4: // secuencia_sent ::= error
            {
                Programa RESULT = null;

                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(2 /*secuencia_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 3: // secuencia_sent ::= sent
            {
                Programa  RESULT = null;
                Operacion s      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                RESULT = new Programa(); if (s != null)
                {
                    RESULT.Instrucciones[s.NumeroOp] = s;
                }
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(2 /*secuencia_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 2: // secuencia_sent ::= secuencia_sent sent
            {
                Programa  RESULT = null;
                Programa  sc     = (Programa)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                Operacion s      = (Operacion)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                if (s != null)
                {
                    sc.Instrucciones[s.NumeroOp] = s;
                }
                RESULT = sc;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(2 /*secuencia_sent*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 1: // programa ::= secuencia_sent
            {
                Programa RESULT = null;
                Programa sc     = (Programa)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 0)).value;
                RESULT = sc;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(1 /*programa*/, RESULT);
            }
                return(CUP_TinyMachineParser_result);

            /*. . . . . . . . . . . . . . . . . . . .*/
            case 0: // $START ::= programa EOF
            {
                object   RESULT    = null;
                Programa start_val = (Programa)((TUVienna.CS_CUP.Runtime.Symbol)CUP_TinyMachineParser_stack.elementAt(CUP_TinyMachineParser_top - 1)).value;
                RESULT = start_val;
                CUP_TinyMachineParser_result = new TUVienna.CS_CUP.Runtime.Symbol(0 /*$START*/, RESULT);
            }
                /* ACCEPT */
                CUP_TinyMachineParser_parser.done_parsing();
                return(CUP_TinyMachineParser_result);

            /* . . . . . .*/
            default:
                throw new System.Exception(
                          "Invalid action number found in internal parse table");
            }
        }