Commit 22ab88d6 authored by LucasDANIELE's avatar LucasDANIELE
Browse files

Ajout operateur logique

parent c9a4564b
......@@ -103,13 +103,39 @@ void lire() throws IdentifiantException,TypeIncompatibleException,TypeIncompatib
}
{
(
e=comparaison()
e=operateurLogique()
)
{
System.out.println(e.evaluer(mem));
}
}
Expression operateurLogique() throws IdentifiantException:
{
Expression g,d;
Token t;
}
{
g = comparaison()
(
(t=<ET> | t=<OU>)
d=operateurLogique(){
switch (t.kind) {
case ET:
return new Et(g,d);
break;
case OU:
return new Ou(g,d);
break;
}
}
)?
{
return g;
}
}
Expression comparaison() throws IdentifiantException:
{
Expression g,d;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment