Examples of VT


Examples of Dependencies.PR1.Symbols.VT

        throw new OperatorException("Esperaba comparador");
    }
   
    void COLOR () {
        if (esNegro()) {
            Match(new VT("TK_NEGRO"));
            return;
        }
        if (esVerde()) {
            Match(new VT("TK_VERDE"));
            return;
        }
        if (esNaranja()) {
            Match(new VT("TK_NARANJA"));
            return;
        }
        if (esRosa()) {
            Match(new VT("TK_ROSA"));
            return;
        }
        if (esRojo()) {
            Match(new VT("TK_ROJO"));
            return;
        }
        if (esBlanco()) {
            Match(new VT("TK_BLANCO"));
            return;
        }
        if (esAmarillo()) {
            Match(new VT("TK_AMARILLO"));
            return;
        }
        if (esMagenta()) {
            Match(new VT("TK_MAGENTA"));
            return;
        }
        throw new ColorException("Esperaba color");
    }
View Full Code Here

Examples of Dependencies.PR1.Symbols.VT

        }
    }
   
    void E_PRIMA() {
        if (esSuma()) {
            Match(new VT("TK_MAS"));
            T();
            if (esSumaResta()) {
                E_PRIMA();
            }
            return;
        }
        else if (esResta()) {
            Match(new VT("TK_MENOS"));
            T();
            if (esSumaResta()) {
                E_PRIMA();
            }
            return;
View Full Code Here

Examples of Dependencies.PR1.Symbols.VT

        }
    }
   
    void T_PRIMA() {
        if (esMultiplicacion()){
            Match(new VT("TK_PROD"));
            F();
            if (esMultiplicacionDivision()) {
                T_PRIMA();
            }
            return;
        }
        else if (esDivision()) {
            Match(new VT("TK_DIV"));
            F();
            if (esMultiplicacionDivision()) {
                T_PRIMA();
            }
            return;
View Full Code Here

Examples of Dependencies.PR1.Symbols.VT

        throw new ArithmeticException ("Esperaba * o /");
    }
   
    void F () {
        if (esParentesisAbierto()) {
            Match(new VT("TK_PAR_ABR"));
            E();
            Match(new VT("TK_PAR_CER"));
            return;
        }
        else if (esID()) {
            Match(new VT("TK_ID"));
            return;
        }
        else if (esNumero()) {
            Match(new VT("TK_CTE_NUM"));
            return;
        }
        else if (esNumeroD()) {
            Match(new VT("TK_NOTCNTF"));
            return;
        }
        else if (esMasMenos()) {
            MAS_MENOS();
            F();
View Full Code Here

Examples of Dependencies.PR1.Symbols.VT

        throw new SyntaxException("Línea " + nLinea + ": Esperaba paréntesis abierto, identificador o número.");
    }
   
    void MAS_MENOS () {
        if (esMas()) {
            Match(new VT("TK_MAS"));
            return;
        }
        else if (esMenos()) {
            Match(new VT("TK_MENOS"));
            return;
        }
        throw new ArithmeticException ("Espera + o -");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.