// partie analyse syntaxique public static new Expression parse() { Expression resultat; resultat = new MotCle(jeton); prochainJeton(); return(resultat); }
public static Expression parse() { Expression resultat; if (jeton == "(") { prochainJeton(); resultat = OperateurOu.parse(); if (jeton == null) { throw new Exception("Erreur de syntaxe"); } if (jeton != ")") { throw new Exception("Erreur de syntaxe"); } prochainJeton(); } else { resultat = MotCle.parse(); } return(resultat); }