public static Expresion Analiza(string fuente) { Expresion.Fuente = fuente; Indice = 0; SiguientePieza(); return OperadorO.Parsea(); }
public static Expresion Parsea() { Expresion resultado; if (Pieza == "(") { SiguientePieza(); resultado = OperadorO.Parsea(); if (Pieza == null) { throw new Exception("Error de sintaxis"); } if (Pieza != ")") { throw new Exception("Error de sintaxis"); } SiguientePieza(); } else { resultado = PalabraClave.Parsea(); } return resultado; }