public Expresiones Multexp_prime(Expresiones E) { try { if (currentToken.Tipo == Lexico.TipoToken.TK_MULT) { currentToken = lex.NextToken(); Multiplicacion mult = new Multiplicacion(E, Multexp_prime(Multexp())); return mult; } else if (currentToken.Tipo == Lexico.TipoToken.TK_DIV) { currentToken = lex.NextToken(); Division div = new Division(E, Multexp_prime(Multexp())); return div; } else if (currentToken.Tipo == Lexico.TipoToken.TK_MOD) { currentToken = lex.NextToken(); Mod mod = new Mod(E, Multexp_prime(Multexp())); return mod; } return E; } catch (Exception ex) { throw ex; } }
public Expresiones MultExprP(Expresiones E) { try { if (currentToken.Tipo == TipoToken.TK_MULT) { currentToken = lex.NextToken(); Multiplicacion Mult = new Multiplicacion(E, MultExprP(MultExpr())); return Mult; } else if (currentToken.Tipo == TipoToken.TK_DIVISION) { currentToken = lex.NextToken(); Division Div = new Division(E, MultExprP(MultExpr())); return Div; } else if (currentToken.Tipo == TipoToken.TK_MOD) { currentToken = lex.NextToken(); Mod Md = new Mod(E, MultExprP(MultExpr())); return Md; } else { return E; } } catch (Exception ex) { throw ex; } }