summaryrefslogtreecommitdiff
path: root/dice-lang
diff options
context:
space:
mode:
Diffstat (limited to 'dice-lang')
-rw-r--r--dice-lang/src/bjc/dicelang/CompilerTweaker.java2
-rw-r--r--dice-lang/src/bjc/dicelang/Define.java18
-rw-r--r--dice-lang/src/bjc/dicelang/DiceLangConsole.java6
-rw-r--r--dice-lang/src/bjc/dicelang/Errors.java10
-rw-r--r--dice-lang/src/bjc/dicelang/Evaluator.java10
-rw-r--r--dice-lang/src/bjc/dicelang/EvaluatorResult.java28
-rw-r--r--dice-lang/src/bjc/dicelang/Parser.java8
-rw-r--r--dice-lang/src/bjc/dicelang/Shunter.java8
-rw-r--r--dice-lang/src/bjc/dicelang/dice/DiceBox.java2
-rw-r--r--dice-lang/src/bjc/dicelang/dice/DieExpression.java2
-rw-r--r--dice-lang/src/bjc/dicelang/dice/FudgeDie.java6
-rw-r--r--dice-lang/src/bjc/dicelang/dice/MathDie.java10
-rw-r--r--dice-lang/src/bjc/dicelang/dice/ScalarDie.java4
-rw-r--r--dice-lang/src/bjc/dicelang/dice/SimpleDie.java18
-rw-r--r--dice-lang/src/bjc/dicelang/dice/SimpleDieList.java6
-rw-r--r--dice-lang/src/bjc/dicelang/expr/Lexer.java8
-rw-r--r--dice-lang/src/bjc/dicelang/expr/Shunter.java10
-rw-r--r--dice-lang/src/bjc/dicelang/expr/Token.java4
-rw-r--r--dice-lang/src/bjc/dicelang/scl/StreamControlEngine.java2
-rw-r--r--dice-lang/src/bjc/dicelang/scl/StreamEngine.java10
20 files changed, 87 insertions, 85 deletions
diff --git a/dice-lang/src/bjc/dicelang/CompilerTweaker.java b/dice-lang/src/bjc/dicelang/CompilerTweaker.java
index f622518..cbc7577 100644
--- a/dice-lang/src/bjc/dicelang/CompilerTweaker.java
+++ b/dice-lang/src/bjc/dicelang/CompilerTweaker.java
@@ -16,7 +16,7 @@ public class CompilerTweaker {
/**
* Create a new compiler tweaker.
- *
+ *
* @param eng
* The engine to tweak.
*/
diff --git a/dice-lang/src/bjc/dicelang/Define.java b/dice-lang/src/bjc/dicelang/Define.java
index dbc349d..89618e4 100644
--- a/dice-lang/src/bjc/dicelang/Define.java
+++ b/dice-lang/src/bjc/dicelang/Define.java
@@ -14,14 +14,14 @@ import static bjc.dicelang.Errors.ErrorKey.EK_DFN_SRCSYN;
/**
* A regular expression based pre-processor define.
- *
+ *
* @author EVE
*
*/
public class Define implements UnaryOperator<String>, Comparable<Define> {
/**
* The define type.
- *
+ *
* @author EVE
*
*/
@@ -61,25 +61,25 @@ public class Define implements UnaryOperator<String>, Comparable<Define> {
/**
* Create a new define.
- *
+ *
* @param priorty
* The priority of the define.
- *
+ *
* @param isSub
* Whether or not this is a 'sub-define'
- *
+ *
* @param recur
* Whether this define is recursive or not.
- *
+ *
* @param isCircular
* Whether this define is circular or not.
- *
+ *
* @param predicte
* The string to use as a predicate.
- *
+ *
* @param searchr
* The string to use as a search.
- *
+ *
* @param replacrs
* The source for replacement strings.
*/
diff --git a/dice-lang/src/bjc/dicelang/DiceLangConsole.java b/dice-lang/src/bjc/dicelang/DiceLangConsole.java
index c45d772..5f1d3f9 100644
--- a/dice-lang/src/bjc/dicelang/DiceLangConsole.java
+++ b/dice-lang/src/bjc/dicelang/DiceLangConsole.java
@@ -14,7 +14,7 @@ import jline.Terminal;
/**
* CLI interface to DiceLang
- *
+ *
* @author EVE
*
*/
@@ -27,7 +27,7 @@ public class DiceLangConsole {
/**
* Create a new console.
- *
+ *
* @param args
* The CLI args for the console.
*/
@@ -275,7 +275,7 @@ public class DiceLangConsole {
/**
* Main method.
- *
+ *
* @param args
* CLI arguments.
*/
diff --git a/dice-lang/src/bjc/dicelang/Errors.java b/dice-lang/src/bjc/dicelang/Errors.java
index 7d85242..55a8530 100644
--- a/dice-lang/src/bjc/dicelang/Errors.java
+++ b/dice-lang/src/bjc/dicelang/Errors.java
@@ -2,14 +2,14 @@ package bjc.dicelang;
/**
* Repository for error messages.
- *
+ *
* @author EVE
*
*/
public class Errors {
/**
* The types of error message.
- *
+ *
* @author EVE
*
*/
@@ -243,7 +243,7 @@ public class Errors {
/**
* The mode for the type of error messages to print out.
- *
+ *
* @author EVE
*
*/
@@ -262,10 +262,10 @@ public class Errors {
/**
* Print an error.
- *
+ *
* @param key
* The key of the error.
- *
+ *
* @param args
* The arguments for the error.
*/
diff --git a/dice-lang/src/bjc/dicelang/Evaluator.java b/dice-lang/src/bjc/dicelang/Evaluator.java
index 87c2153..41e7e52 100644
--- a/dice-lang/src/bjc/dicelang/Evaluator.java
+++ b/dice-lang/src/bjc/dicelang/Evaluator.java
@@ -22,7 +22,7 @@ import static bjc.dicelang.EvaluatorResult.Type.*;
/**
* Evaluate DiceLang ASTs
- *
+ *
* @author EVE
*
*/
@@ -58,7 +58,7 @@ public class Evaluator {
/**
* Create a new evaluator.
- *
+ *
* @param en
* The engine.
*/
@@ -68,10 +68,10 @@ public class Evaluator {
/**
* Evaluate a AST.
- *
+ *
* @param comm
* The AST to evaluate.
- *
+ *
* @return The result of the tree.
*/
public EvaluatorResult evaluate(ITree<Node> comm) {
@@ -201,7 +201,7 @@ public class Evaluator {
}
default:
/*
- * Do nothing
+ * Do nothing
*/
break;
}
diff --git a/dice-lang/src/bjc/dicelang/EvaluatorResult.java b/dice-lang/src/bjc/dicelang/EvaluatorResult.java
index 09d7687..f21cd6f 100644
--- a/dice-lang/src/bjc/dicelang/EvaluatorResult.java
+++ b/dice-lang/src/bjc/dicelang/EvaluatorResult.java
@@ -8,14 +8,14 @@ import bjc.utils.data.Tree;
/**
* The result from the evaluator.
- *
+ *
* @author EVE
*
*/
public class EvaluatorResult {
/**
* The type of the result.
- *
+ *
* @author EVE
*
*/
@@ -73,7 +73,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* The type of the result.
*/
@@ -83,10 +83,10 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* The type of the result.
- *
+ *
* @param orig
* The original value of the result.
*/
@@ -98,10 +98,10 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* The type of the result.
- *
+ *
* @param orig
* The original value of the result.
*/
@@ -111,7 +111,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param orig
*/
@@ -121,7 +121,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param iVal
*/
@@ -133,7 +133,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param dVal
*/
@@ -145,7 +145,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param dVal
*/
@@ -157,7 +157,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param dVal
*/
@@ -169,7 +169,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param dVal
*/
@@ -181,7 +181,7 @@ public class EvaluatorResult {
/**
* Create a new result.
- *
+ *
* @param typ
* @param strang
*/
diff --git a/dice-lang/src/bjc/dicelang/Parser.java b/dice-lang/src/bjc/dicelang/Parser.java
index bef4072..7907137 100644
--- a/dice-lang/src/bjc/dicelang/Parser.java
+++ b/dice-lang/src/bjc/dicelang/Parser.java
@@ -14,7 +14,7 @@ import static bjc.dicelang.Token.Type.CBRACKET;
/**
* Parse a series of tree into tokens.
- *
+ *
* @author EVE
*
*/
@@ -28,13 +28,13 @@ public class Parser {
/**
* Parse a series of tokens to a forest of ASTs.
- *
+ *
* @param tokens
* The list of tokens to parse.
- *
+ *
* @param results
* The place to set results.
- *
+ *
* @return Whether or not the parse was successful.
*/
public boolean parseTokens(IList<Token> tokens, IList<ITree<Node>> results) {
diff --git a/dice-lang/src/bjc/dicelang/Shunter.java b/dice-lang/src/bjc/dicelang/Shunter.java
index 3adfd5b..5ac4614 100644
--- a/dice-lang/src/bjc/dicelang/Shunter.java
+++ b/dice-lang/src/bjc/dicelang/Shunter.java
@@ -15,7 +15,7 @@ import static bjc.dicelang.Token.Type.*;
/**
* Shunt a set of infix tokens to postfix tokens.
- *
+ *
* @author EVE
*
*/
@@ -101,13 +101,13 @@ public class Shunter {
/**
* Shunt a set of tokens from infix to postfix.
- *
+ *
* @param tks
* The tokens to input.
- *
+ *
* @param returned
* The postfix tokens.
- *
+ *
* @return Whether or not the shunt succeeded.
*/
public boolean shuntTokens(IList<Token> tks, IList<Token> returned) {
diff --git a/dice-lang/src/bjc/dicelang/dice/DiceBox.java b/dice-lang/src/bjc/dicelang/dice/DiceBox.java
index 2147a06..168dda1 100644
--- a/dice-lang/src/bjc/dicelang/dice/DiceBox.java
+++ b/dice-lang/src/bjc/dicelang/dice/DiceBox.java
@@ -17,7 +17,7 @@ public class DiceBox {
*
* @param expString
* The string to parse.
- *
+ *
* @return The die expression from the string, or null if it wasn't one
*/
public static DieExpression parseExpression(String expString) {
diff --git a/dice-lang/src/bjc/dicelang/dice/DieExpression.java b/dice-lang/src/bjc/dicelang/dice/DieExpression.java
index 92625eb..a8d793a 100644
--- a/dice-lang/src/bjc/dicelang/dice/DieExpression.java
+++ b/dice-lang/src/bjc/dicelang/dice/DieExpression.java
@@ -54,7 +54,7 @@ public class DieExpression {
/**
* Get the value of this expression as a string.
- *
+ *
* @return The value of the expression as a string.
*/
public String value() {
diff --git a/dice-lang/src/bjc/dicelang/dice/FudgeDie.java b/dice-lang/src/bjc/dicelang/dice/FudgeDie.java
index 5e5125f..2064a39 100644
--- a/dice-lang/src/bjc/dicelang/dice/FudgeDie.java
+++ b/dice-lang/src/bjc/dicelang/dice/FudgeDie.java
@@ -2,7 +2,7 @@ package bjc.dicelang.dice;
/**
* A fudge die, one that has -1, 0 and 1 as its sides.
- *
+ *
* @author EVE
*
*/
@@ -11,7 +11,7 @@ public class FudgeDie implements Die {
/**
* Create a new fudge die.
- *
+ *
* @param nDice
* The number of dice to roll.
*/
@@ -21,7 +21,7 @@ public class FudgeDie implements Die {
/**
* Create a new fudge die.
- *
+ *
* @param nDice
* The number of dice to roll.
*/
diff --git a/dice-lang/src/bjc/dicelang/dice/MathDie.java b/dice-lang/src/bjc/dicelang/dice/MathDie.java
index aba58a3..07150cb 100644
--- a/dice-lang/src/bjc/dicelang/dice/MathDie.java
+++ b/dice-lang/src/bjc/dicelang/dice/MathDie.java
@@ -2,14 +2,14 @@ package bjc.dicelang.dice;
/**
* A die that represents two dice with an applied math operator.
- *
+ *
* @author EVE
*
*/
public class MathDie implements Die {
/**
* The types of a math operator.
- *
+ *
* @author EVE
*
*/
@@ -49,13 +49,13 @@ public class MathDie implements Die {
/**
* Create a new math die.
- *
+ *
* @param op
* The operator to apply.
- *
+ *
* @param lft
* The left operand.
- *
+ *
* @param rght
* The right operand.
*/
diff --git a/dice-lang/src/bjc/dicelang/dice/ScalarDie.java b/dice-lang/src/bjc/dicelang/dice/ScalarDie.java
index 0cb9af1..3fed00c 100644
--- a/dice-lang/src/bjc/dicelang/dice/ScalarDie.java
+++ b/dice-lang/src/bjc/dicelang/dice/ScalarDie.java
@@ -2,7 +2,7 @@ package bjc.dicelang.dice;
/**
* A scalar die, that always returns a given number.
- *
+ *
* @author EVE
*
*/
@@ -11,7 +11,7 @@ public class ScalarDie implements Die {
/**
* Create a new scalar die with a set value.
- *
+ *
* @param vl
* The value to use.
*/
diff --git a/dice-lang/src/bjc/dicelang/dice/SimpleDie.java b/dice-lang/src/bjc/dicelang/dice/SimpleDie.java
index 68050e0..35921d0 100644
--- a/dice-lang/src/bjc/dicelang/dice/SimpleDie.java
+++ b/dice-lang/src/bjc/dicelang/dice/SimpleDie.java
@@ -2,7 +2,7 @@ package bjc.dicelang.dice;
/**
* A simple group of dice.
- *
+ *
* @author EVE
*
*/
@@ -12,10 +12,10 @@ public class SimpleDie implements Die {
/**
* Create a new dice group.
- *
+ *
* @param nDice
* The number of dice.
- *
+ *
* @param size
* The size of the dice.
*/
@@ -25,10 +25,10 @@ public class SimpleDie implements Die {
/**
* Create a new dice group.
- *
+ *
* @param nDice
* The number of dice.
- *
+ *
* @param size
* The size of the dice.
*/
@@ -38,10 +38,10 @@ public class SimpleDie implements Die {
/**
* Create a new dice group.
- *
+ *
* @param nDice
* The number of dice.
- *
+ *
* @param size
* The size of the dice.
*/
@@ -51,10 +51,10 @@ public class SimpleDie implements Die {
/**
* Create a new dice group.
- *
+ *
* @param nDice
* The number of dice.
- *
+ *
* @param size
* The size of the dice.
*/
diff --git a/dice-lang/src/bjc/dicelang/dice/SimpleDieList.java b/dice-lang/src/bjc/dicelang/dice/SimpleDieList.java
index d5d8364..7b1ac76 100644
--- a/dice-lang/src/bjc/dicelang/dice/SimpleDieList.java
+++ b/dice-lang/src/bjc/dicelang/dice/SimpleDieList.java
@@ -2,7 +2,7 @@ package bjc.dicelang.dice;
/**
* A simple list of dice.
- *
+ *
* @author EVE
*
*/
@@ -12,10 +12,10 @@ public class SimpleDieList implements DieList {
/**
* Create a new list of dice.
- *
+ *
* @param nDice
* The number of dice in the list.
- *
+ *
* @param sze
* The size of dice in the list.
*/
diff --git a/dice-lang/src/bjc/dicelang/expr/Lexer.java b/dice-lang/src/bjc/dicelang/expr/Lexer.java
index 3147463..52be56c 100644
--- a/dice-lang/src/bjc/dicelang/expr/Lexer.java
+++ b/dice-lang/src/bjc/dicelang/expr/Lexer.java
@@ -1,11 +1,11 @@
package bjc.dicelang.expr;
-import java.util.LinkedList;
-import java.util.List;
-
import bjc.utils.funcdata.IList;
import bjc.utils.parserutils.splitter.ConfigurableTokenSplitter;
+import java.util.LinkedList;
+import java.util.List;
+
/**
* Implements the lexer for simple expression operations.
*
@@ -32,7 +32,7 @@ public class Lexer {
*
* @param inp
* The input command.
- *
+ *
* @param tks
* The token state.
*
diff --git a/dice-lang/src/bjc/dicelang/expr/Shunter.java b/dice-lang/src/bjc/dicelang/expr/Shunter.java
index bbece0f..3b2bee2 100644
--- a/dice-lang/src/bjc/dicelang/expr/Shunter.java
+++ b/dice-lang/src/bjc/dicelang/expr/Shunter.java
@@ -41,10 +41,11 @@ public class Shunter {
int leftPriority = tok.type.operatorPriority;
int rightPriority;
- if(curOp == null)
+ if(curOp == null) {
rightPriority = 0;
- else
+ } else {
rightPriority = curOp.type.operatorPriority;
+ }
boolean isHigherPrec = leftPriority >= rightPriority;
@@ -59,10 +60,11 @@ public class Shunter {
leftPriority = tok.type.operatorPriority;
- if(curOp == null)
+ if(curOp == null) {
rightPriority = 0;
- else
+ } else {
rightPriority = curOp.type.operatorPriority;
+ }
isHigherPrec = leftPriority >= rightPriority;
}
diff --git a/dice-lang/src/bjc/dicelang/expr/Token.java b/dice-lang/src/bjc/dicelang/expr/Token.java
index 2a73d0b..dac90aa 100644
--- a/dice-lang/src/bjc/dicelang/expr/Token.java
+++ b/dice-lang/src/bjc/dicelang/expr/Token.java
@@ -33,10 +33,10 @@ public class Token {
*
* @param type
* The type of this token.
- *
+ *
* @param raw
* The string this token came from.
- *
+ *
* @param toks
* The state for this token
*/
diff --git a/dice-lang/src/bjc/dicelang/scl/StreamControlEngine.java b/dice-lang/src/bjc/dicelang/scl/StreamControlEngine.java
index 7efcaf7..76133e7 100644
--- a/dice-lang/src/bjc/dicelang/scl/StreamControlEngine.java
+++ b/dice-lang/src/bjc/dicelang/scl/StreamControlEngine.java
@@ -184,7 +184,7 @@ public class StreamControlEngine {
/**
* Create a new stream control engine.
- *
+ *
* @param eng
* The engine to control.
*/
diff --git a/dice-lang/src/bjc/dicelang/scl/StreamEngine.java b/dice-lang/src/bjc/dicelang/scl/StreamEngine.java
index 26b99c4..c79d054 100644
--- a/dice-lang/src/bjc/dicelang/scl/StreamEngine.java
+++ b/dice-lang/src/bjc/dicelang/scl/StreamEngine.java
@@ -75,7 +75,7 @@ public class StreamEngine {
*
* @param toks
* The raw token to read streams from.
- *
+ *
* @param dest
* The list to write the final stream to.
*
@@ -130,7 +130,7 @@ public class StreamEngine {
/**
* Move to a stream to the right.
- *
+ *
* @return Whether or not the move was successful.
*/
public boolean rightStream() {
@@ -145,7 +145,7 @@ public class StreamEngine {
/**
* Move to a stream to the left.
- *
+ *
* @return Whether or not the move was successful.
*/
public boolean leftStream() {
@@ -160,7 +160,7 @@ public class StreamEngine {
/**
* Delete the current stream.
- *
+ *
* @return Whether or not the delete succeeded.
*/
public boolean deleteStream() {
@@ -177,7 +177,7 @@ public class StreamEngine {
/**
* Merge the current stream into the previous stream.
- *
+ *
* @return Whether or not the merge succeded.
*/
public boolean mergeStream() {