Maj du git depuis la derniere fois

This commit is contained in:
2025-11-27 13:53:52 +01:00
parent ffdd031bc1
commit 6f13bae4f8
18 changed files with 1838 additions and 74 deletions

View File

@@ -0,0 +1,39 @@
public class Prefixe {
String value;
Prefixe left;
Prefixe right;
public Prefixe(String v) {
this.value = v;
}
public boolean isOperator() {
return "+-*/".contains(value);
}
public static int index = 0;
public static Prefixe build(String[] t) {
String token = t[index++];
Prefixe p = new Prefixe(token);
if (p.isOperator()) {
p.left = build(t);
p.right = build(t);
}
return p;
}
}