From 0b8d2b0459ec62efad52a81760ac337f289eb49f Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 27 Jul 2017 09:23:07 -0700 Subject: [PATCH] Remove the caret operator as it is not implemented. --- src/org/nwapw/abacus/tree/TreeNode.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/org/nwapw/abacus/tree/TreeNode.java b/src/org/nwapw/abacus/tree/TreeNode.java index 0cc5446..d2d560b 100644 --- a/src/org/nwapw/abacus/tree/TreeNode.java +++ b/src/org/nwapw/abacus/tree/TreeNode.java @@ -15,7 +15,7 @@ public abstract class TreeNode { */ protected static Lexer lexer = new Lexer(){{ register(",", TokenType.COMMA); - register("\\+|-|\\*|/|^", TokenType.OP); + register("\\+|-|\\*|/", TokenType.OP); register("[0-9]+(\\.[0-9]+)?", TokenType.NUM); register("[a-zA-Z]+", TokenType.WORD); register("\\(", TokenType.OPEN_PARENTH); @@ -29,7 +29,6 @@ public abstract class TreeNode { put("-", 0); put("*", 1); put("/", 1); - put("^", 2); }}; /** * A map that maps operations to their associativity. @@ -40,7 +39,6 @@ public abstract class TreeNode { put("-", OperatorAssociativity.LEFT); put("*", OperatorAssociativity.LEFT); put("/", OperatorAssociativity.LEFT); - put("^", OperatorAssociativity.RIGHT); }}; /**