summaryrefslogtreecommitdiff
path: root/JPratt/src/main/java/bjc/pratt/commands/impls
diff options
context:
space:
mode:
Diffstat (limited to 'JPratt/src/main/java/bjc/pratt/commands/impls')
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/BlockInitialCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/ChainCommand.java14
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/ConstantCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java6
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java6
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/DenestingCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/GroupingCommand.java10
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java44
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/LeafCommand.java6
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/LeftBinaryCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/NonBinaryCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java34
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/PostCircumfixCommand.java14
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/PostfixCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/PreTernaryCommand.java20
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/RightBinaryCommand.java8
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java21
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/TransformingInitialCommand.java10
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/UnaryCommand.java10
19 files changed, 122 insertions, 129 deletions
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/BlockInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/BlockInitialCommand.java
index 3e8c8c2..1135ba0 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/BlockInitialCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/BlockInitialCommand.java
@@ -12,13 +12,13 @@ import bjc.utils.parserutils.ParserException;
*
* @author bjculkin
* @param <K>
- * The token key type.
+ * The token key type.
*
* @param <V>
- * The token value type.
+ * The token value type.
*
* @param <C>
- * The parser state type.
+ * The parser state type.
*
*/
public class BlockInitialCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
@@ -28,7 +28,7 @@ public class BlockInitialCommand<K, V, C> extends AbstractInitialCommand<K, V, C
* Create a new block initial command.
*
* @param block
- * The block to delegate to.
+ * The block to delegate to.
*/
public BlockInitialCommand(final ParseBlock<K, V, C> block) {
blck = block;
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/ChainCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/ChainCommand.java
index 2a9bf35..e971586 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/ChainCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/ChainCommand.java
@@ -15,13 +15,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class ChainCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
private final Set<K> chainWith;
@@ -32,13 +32,13 @@ public class ChainCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
* Create a new chained operator.
*
* @param precedence
- * The precedence of this operator.
+ * The precedence of this operator.
*
* @param chainSet
- * The operators to chain with.
+ * The operators to chain with.
*
* @param chainMarker
- * The token to use as the node in the AST.
+ * The token to use as the node in the AST.
*/
public ChainCommand(final int precedence, final Set<K> chainSet, final Token<K, V> chainMarker) {
super(precedence);
@@ -55,7 +55,7 @@ public class ChainCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
final ITree<Token<K, V>> res = new Tree<>(operator, operand, tree);
- if (chainWith.contains(ctx.tokens.current().getKey())) {
+ if(chainWith.contains(ctx.tokens.current().getKey())) {
final Token<K, V> tok = ctx.tokens.current();
ctx.tokens.next();
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/ConstantCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/ConstantCommand.java
index 16af5aa..a3a8526 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/ConstantCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/ConstantCommand.java
@@ -12,13 +12,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class ConstantCommand<K, V, C> implements InitialCommand<K, V, C> {
private final ITree<Token<K, V>> val;
@@ -27,7 +27,7 @@ public class ConstantCommand<K, V, C> implements InitialCommand<K, V, C> {
* Create a new constant.
*
* @param con
- * The tree this constant represents.
+ * The tree this constant represents.
*/
public ConstantCommand(final ITree<Token<K, V>> con) {
val = con;
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java
index 16d2e59..bc00887 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java
@@ -12,13 +12,13 @@ import bjc.utils.parserutils.ParserException;
* @author EVE
*
* @param <K>
- * The key type of the token.
+ * The key type of the token.
*
* @param <V>
- * The value type of the token.
+ * The value type of the token.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class DefaultInitialCommand<K, V, C> implements InitialCommand<K, V, C> {
@Override
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java
index 48aab29..542c8cc 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java
@@ -11,13 +11,13 @@ import bjc.utils.data.ITree;
* @author EVE
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class DefaultNonInitialCommand<K, V, C> extends NonInitialCommand<K, V, C> {
@Override
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/DenestingCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/DenestingCommand.java
index 220e4cc..b01c413 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/DenestingCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/DenestingCommand.java
@@ -16,13 +16,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*
*/
public class DenestingCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
@@ -32,7 +32,7 @@ public class DenestingCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
* Create a new transforming initial command.
*
* @param internal
- * The initial command to delegate to.
+ * The initial command to delegate to.
*/
public DenestingCommand(final InitialCommand<K, V, C> internal) {
wrapped = internal;
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/GroupingCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/GroupingCommand.java
index 28f1299..868260c 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/GroupingCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/GroupingCommand.java
@@ -14,13 +14,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class GroupingCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
private final ParseBlock<K, V, C> innerBlock;
@@ -31,10 +31,10 @@ public class GroupingCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
* Create a new grouping command.
*
* @param inner
- * The inner block.
+ * The inner block.
*
* @param marker
- * The token to use as the node in the AST.
+ * The token to use as the node in the AST.
*/
public GroupingCommand(final ParseBlock<K, V, C> inner, final Token<K, V> marker) {
innerBlock = inner;
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java b/JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java
index 8da758a..8967527 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java
@@ -23,7 +23,7 @@ public class InitialCommands {
* Create a new unary operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @return A command implementing that operator.
*/
@@ -35,13 +35,13 @@ public class InitialCommands {
* Create a new grouping operator.
*
* @param precedence
- * The precedence of the expression in the operator.
+ * The precedence of the expression in the operator.
*
* @param term
- * The type that closes the group.
+ * The type that closes the group.
*
* @param mark
- * The token for the AST node of the group.
+ * The token for the AST node of the group.
*
* @return A command implementing the operator.
*/
@@ -65,22 +65,22 @@ public class InitialCommands {
* Create a new pre-ternary operator, like an if-then-else statement.
*
* @param cond1
- * The priority of the first block.
+ * The priority of the first block.
*
* @param block1
- * The priority of the second block.
+ * The priority of the second block.
*
* @param block2
- * The priority of the third block.
+ * The priority of the third block.
*
* @param mark1
- * The marker that ends the first block.
+ * The marker that ends the first block.
*
* @param mark2
- * The marker that ends the second block.
+ * The marker that ends the second block.
*
* @param term
- * The token for the AST node of the group.
+ * The token for the AST node of the group.
*
* @return A command implementing the operator.
*/
@@ -97,7 +97,7 @@ public class InitialCommands {
* Create a new named constant.
*
* @param val
- * The value of the constant.
+ * The value of the constant.
*
* @return A command implementing the constant.
*/
@@ -109,32 +109,28 @@ public class InitialCommands {
* Create a new delimited command. This is for block-like constructs.
*
* @param inner
- * The precedence of the inner blocks.
+ * The precedence of the inner blocks.
*
* @param delim
- * The marker between sub-blocks.
+ * The marker between sub-blocks.
*
* @param mark
- * The block terminator.
+ * The block terminator.
*
* @param term
- * The token for the AST node of the group.
+ * The token for the AST node of the group.
*
* @param onEnter
- * The function to apply to the state on entering the
- * block.
+ * The function to apply to the state on entering the block.
*
* @param onDelim
- * The function to apply to the state on finishing a
- * sub-block.
+ * The function to apply to the state on finishing a sub-block.
*
* @param onExit
- * The function to apply to the state on exiting the
- * block.
+ * The function to apply to the state on exiting the block.
*
* @param statement
- * Whether or not the sub-blocks are statements or
- * expressions.
+ * Whether or not the sub-blocks are statements or expressions.
*
* @return A command implementing the operator.
*/
@@ -161,7 +157,7 @@ public class InitialCommands {
* parse blocks with commands.
*
* @param comm
- * The command to denest.
+ * The command to denest.
*
* @return A command that denests the result of the provided command.
*/
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/LeafCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/LeafCommand.java
index bb999f6..f0f1b55 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/LeafCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/LeafCommand.java
@@ -13,13 +13,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class LeafCommand<K, V, C> implements InitialCommand<K, V, C> {
@Override
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/LeftBinaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/LeftBinaryCommand.java
index 9727dcb..9a72859 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/LeftBinaryCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/LeftBinaryCommand.java
@@ -8,20 +8,20 @@ import bjc.pratt.commands.BinaryCommand;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class LeftBinaryCommand<K, V, C> extends BinaryCommand<K, V, C> {
/**
* Create a new left-associative operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*/
public LeftBinaryCommand(final int precedence) {
super(precedence);
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/NonBinaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/NonBinaryCommand.java
index 2d92780..d303663 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/NonBinaryCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/NonBinaryCommand.java
@@ -8,20 +8,20 @@ import bjc.pratt.commands.BinaryCommand;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class NonBinaryCommand<K, V, C> extends BinaryCommand<K, V, C> {
/**
* Create a new non-associative operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*/
public NonBinaryCommand(final int precedence) {
super(precedence);
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java b/JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java
index a2c158c..82110b2 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java
@@ -19,7 +19,7 @@ public class NonInitialCommands {
* Create a left-associative infix operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @return A command implementing that operator.
*/
@@ -31,7 +31,7 @@ public class NonInitialCommands {
* Create a right-associative infix operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @return A command implementing that operator.
*/
@@ -43,7 +43,7 @@ public class NonInitialCommands {
* Create a non-associative infix operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @return A command implementing that operator.
*/
@@ -55,14 +55,13 @@ public class NonInitialCommands {
* Create a chained operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @param chainSet
- * The operators it forms a chain with.
+ * The operators it forms a chain with.
*
* @param marker
- * The token to use as the AST node for the chained
- * operators.
+ * The token to use as the AST node for the chained operators.
*
* @return A command implementing that operator.
*/
@@ -75,7 +74,7 @@ public class NonInitialCommands {
* Create a postfix operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @return A command implementing that operator.
*/
@@ -89,16 +88,16 @@ public class NonInitialCommands {
* This is an operator in form similar to array indexing.
*
* @param precedence
- * The precedence of this operator
+ * The precedence of this operator
*
* @param insidePrecedence
- * The precedence of the expression inside the operator
+ * The precedence of the expression inside the operator
*
* @param closer
- * The token that closes the circumfix.
+ * The token that closes the circumfix.
*
* @param marker
- * The token to use as the AST node for the operator.
+ * The token to use as the AST node for the operator.
*
* @return A command implementing that operator.
*/
@@ -115,20 +114,19 @@ public class NonInitialCommands {
* This is like C's ?: operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @param insidePrecedence
- * The precedence of the inner section of the operator.
+ * The precedence of the inner section of the operator.
*
* @param closer
- * The token that marks the end of the inner section.
+ * The token that marks the end of the inner section.
*
* @param marker
- * The token to use as the AST node for the operator.
+ * The token to use as the AST node for the operator.
*
* @param nonassoc
- * True if the command is non-associative, false
- * otherwise.
+ * True if the command is non-associative, false otherwise.
*
* @return A command implementing this operator.
*/
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/PostCircumfixCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/PostCircumfixCommand.java
index c1d70b8..c6ccd2d 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/PostCircumfixCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/PostCircumfixCommand.java
@@ -14,13 +14,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class PostCircumfixCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
private final ParseBlock<K, V, C> innerBlock;
@@ -31,18 +31,18 @@ public class PostCircumfixCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
* Create a new post-circumfix operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*
* @param inner
- * The block inside the expression.
+ * The block inside the expression.
*
* @param marker
- * The token to use as the node for the AST.
+ * The token to use as the node for the AST.
*/
public PostCircumfixCommand(final int precedence, final ParseBlock<K, V, C> inner, final Token<K, V> marker) {
super(precedence);
- if (inner == null) throw new NullPointerException("Inner block must not be null");
+ if(inner == null) throw new NullPointerException("Inner block must not be null");
innerBlock = inner;
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/PostfixCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/PostfixCommand.java
index 00c7ad2..30ad9b4 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/PostfixCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/PostfixCommand.java
@@ -13,20 +13,20 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class PostfixCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
/**
* Create a new postfix operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*/
public PostfixCommand(final int precedence) {
super(precedence);
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/PreTernaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/PreTernaryCommand.java
index fa63c9c..7b33c84 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/PreTernaryCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/PreTernaryCommand.java
@@ -14,13 +14,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class PreTernaryCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
private final Token<K, V> trm;
@@ -34,26 +34,26 @@ public class PreTernaryCommand<K, V, C> extends AbstractInitialCommand<K, V, C>
* Create a new ternary statement.
*
* @param cond
- * The block for handling the condition.
+ * The block for handling the condition.
*
* @param op1
- * The block for handling the first operator.
+ * The block for handling the first operator.
*
* @param op2
- * The block for handling the second operator.
+ * The block for handling the second operator.
*
* @param term
- * The token to use as the node for the AST.
+ * The token to use as the node for the AST.
*/
public PreTernaryCommand(final ParseBlock<K, V, C> cond, final ParseBlock<K, V, C> op1,
final ParseBlock<K, V, C> op2, final Token<K, V> term) {
super();
- if (cond == null)
+ if(cond == null)
throw new NullPointerException("Cond block must not be null");
- else if (op1 == null)
+ else if(op1 == null)
throw new NullPointerException("Op block #1 must not be null");
- else if (op2 == null) throw new NullPointerException("Op block #2 must not be null");
+ else if(op2 == null) throw new NullPointerException("Op block #2 must not be null");
condBlock = cond;
opblock1 = op1;
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/RightBinaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/RightBinaryCommand.java
index c3887ee..4439930 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/RightBinaryCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/RightBinaryCommand.java
@@ -8,18 +8,18 @@ import bjc.pratt.commands.BinaryCommand;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class RightBinaryCommand<K, V, C> extends BinaryCommand<K, V, C> {
/**
* Create a new right-associative operator.
*
* @param precedence
- * The precedence of the operator.
+ * The precedence of the operator.
*/
public RightBinaryCommand(final int precedence) {
super(precedence);
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java
index 92355c0..988869e 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java
@@ -14,13 +14,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class TernaryCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
private final ParseBlock<K, V, C> innerBlck;
@@ -33,25 +33,24 @@ public class TernaryCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
* Create a new ternary command.
*
* @param precedence
- * The precedence of this operator.
+ * The precedence of this operator.
*
* @param innerBlock
- * The representation of the inner block of the
- * expression.
+ * The representation of the inner block of the expression.
*
* @param marker
- * The token to use as the root of the AST node.
+ * The token to use as the root of the AST node.
*
* @param isNonassoc
- * Whether or not the conditional is associative.
+ * Whether or not the conditional is associative.
*/
public TernaryCommand(final int precedence, final ParseBlock<K, V, C> innerBlock, final Token<K, V> marker,
final boolean isNonassoc) {
super(precedence);
- if (innerBlock == null)
+ if(innerBlock == null)
throw new NullPointerException("Inner block must not be null");
- else if (marker == null) throw new NullPointerException("Marker must not be null");
+ else if(marker == null) throw new NullPointerException("Marker must not be null");
innerBlck = innerBlock;
mark = marker;
@@ -71,7 +70,7 @@ public class TernaryCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
@Override
public int nextBinding() {
- if (nonassoc) return leftBinding() - 1;
+ if(nonassoc) return leftBinding() - 1;
return leftBinding();
}
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/TransformingInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/TransformingInitialCommand.java
index e6c509c..f09658e 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/TransformingInitialCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/TransformingInitialCommand.java
@@ -15,13 +15,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class TransformingInitialCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
private final InitialCommand<K, V, C> internl;
@@ -32,10 +32,10 @@ public class TransformingInitialCommand<K, V, C> extends AbstractInitialCommand<
* Create a new transforming initial command.
*
* @param internal
- * The initial command to delegate to.
+ * The initial command to delegate to.
*
* @param transform
- * The transform to apply to the returned tree.
+ * The transform to apply to the returned tree.
*/
public TransformingInitialCommand(final InitialCommand<K, V, C> internal,
final UnaryOperator<ITree<Token<K, V>>> transform) {
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/UnaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/UnaryCommand.java
index 156dee0..15d246d 100644
--- a/JPratt/src/main/java/bjc/pratt/commands/impls/UnaryCommand.java
+++ b/JPratt/src/main/java/bjc/pratt/commands/impls/UnaryCommand.java
@@ -13,13 +13,13 @@ import bjc.utils.parserutils.ParserException;
* @author bjculkin
*
* @param <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class UnaryCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
private final int nullPwer;
@@ -28,10 +28,10 @@ public class UnaryCommand<K, V, C> extends AbstractInitialCommand<K, V, C> {
* Create a new unary command.
*
* @param precedence
- * The precedence of this operator.
+ * The precedence of this operator.
*/
public UnaryCommand(final int precedence) {
- if (precedence < 0) throw new IllegalArgumentException("Precedence must be non-negative");
+ if(precedence < 0) throw new IllegalArgumentException("Precedence must be non-negative");
nullPwer = precedence;
}