summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/parserutils/ShuntingYard.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/parserutils/ShuntingYard.java')
-rw-r--r--base/src/main/java/bjc/utils/parserutils/ShuntingYard.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/src/main/java/bjc/utils/parserutils/ShuntingYard.java b/base/src/main/java/bjc/utils/parserutils/ShuntingYard.java
index a0b1249..352ad04 100644
--- a/base/src/main/java/bjc/utils/parserutils/ShuntingYard.java
+++ b/base/src/main/java/bjc/utils/parserutils/ShuntingYard.java
@@ -181,7 +181,8 @@ public class ShuntingYard<TokenType> {
*/
if(operator == null)
throw new NullPointerException("Operator must not be null");
- else if(precedence == null) throw new NullPointerException("Precedence must not be null");
+ else if (precedence == null)
+ throw new NullPointerException("Precedence must not be null");
/*
* Add the operator to the ones we handle
@@ -189,6 +190,7 @@ public class ShuntingYard<TokenType> {
operators.put(operator, precedence);
}
+ /* Check if one operator is higher precedence than another. */
private boolean isHigherPrec(final String left, final String right) {
/*
* Check if the right operator exists
@@ -229,7 +231,8 @@ public class ShuntingYard<TokenType> {
*/
if(input == null)
throw new NullPointerException("Input must not be null");
- else if(transformer == null) throw new NullPointerException("Transformer must not be null");
+ else if (transformer == null)
+ throw new NullPointerException("Transformer must not be null");
/*
* Here's what we're handing back