diff --git a/src/org/nwapw/abacus/tree/OperatorAssociativity.java b/src/org/nwapw/abacus/tree/OperatorAssociativity.java new file mode 100644 index 0000000..78b633b --- /dev/null +++ b/src/org/nwapw/abacus/tree/OperatorAssociativity.java @@ -0,0 +1,5 @@ +package org.nwapw.abacus.tree; + +public enum OperatorAssociativity { + LEFT, RIGHT +} diff --git a/src/org/nwapw/abacus/tree/TokenType.java b/src/org/nwapw/abacus/tree/TokenType.java new file mode 100644 index 0000000..e0d7d97 --- /dev/null +++ b/src/org/nwapw/abacus/tree/TokenType.java @@ -0,0 +1,13 @@ +package org.nwapw.abacus.tree; + +public enum TokenType { + + ANY(0), OP(1), NUM(2), WORD(3), OPEN_PARENTH(4), CLOSE_PARENTH(5); + + public final int priority; + + TokenType(int priority){ + this.priority = priority; + } + +}