From 01cb9f504c860bc1c037a44f3a76bf342a293d46 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Tue, 22 Mar 2016 12:28:35 -0400 Subject: General formatting cleanup and documentation update --- .../java/bjc/utils/parserutils/ShuntingYard.java | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/ShuntingYard.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/ShuntingYard.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/ShuntingYard.java index 8a036ce..b5f48e7 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/ShuntingYard.java +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/ShuntingYard.java @@ -19,8 +19,29 @@ import bjc.utils.funcdata.FunctionalList; */ public class ShuntingYard { + /** + * A enum representing the fundamental operator types + * + * @author ben + * + */ public static enum Operator implements IPrecedent { - ADD(1), DIVIDE(4), MULTIPLY(3), SUBTRACT(2); + /** + * Represents addition + */ + ADD(1), + /** + * Represents division + */ + DIVIDE(4), + /** + * Represents multiplication + */ + MULTIPLY(3), + /** + * Represents subtraction + */ + SUBTRACT(2); private final int precedence; @@ -61,6 +82,7 @@ public class ShuntingYard { * * @param tok * The token representing the operator + * @param i The precedence of the operator to add */ public void addOp(String tok, int i) { this.addOp(tok, IPrecedent.newSimplePrecedent(i)); -- cgit v1.2.3