diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-12-01 20:20:53 -0500 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-12-01 20:20:53 -0500 |
| commit | b90f1ea0f1a35d04bd1d5ec2741dc8d45c1f3c0f (patch) | |
| tree | 45a3779b1d41fa2b72bcb063bf64be002569c01b | |
| parent | 747bff446547120d3045685c0c1878251d24c382 (diff) | |
Add some comments
4 files changed, 69 insertions, 1 deletions
diff --git a/JPratt/src/main/java/bjc/pratt/blocks/GrammarParseBlock.java b/JPratt/src/main/java/bjc/pratt/blocks/GrammarParseBlock.java index 707bedd..0b1fb36 100644 --- a/JPratt/src/main/java/bjc/pratt/blocks/GrammarParseBlock.java +++ b/JPratt/src/main/java/bjc/pratt/blocks/GrammarParseBlock.java @@ -7,7 +7,7 @@ import bjc.pratt.PrattParser; import bjc.pratt.tokens.Token; import bjc.pratt.tokens.TokenStream; import bjc.data.ITree; -import bjc.utils.funcutils.Isomorphism; +import bjc.functypes.*; import bjc.utils.parserutils.ParserException; /** diff --git a/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java b/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java index e13c3c0..e0d63f3 100644 --- a/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java +++ b/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java @@ -20,6 +20,10 @@ public class ParseBlocks { /** * Create a new repeating parse block. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param inner * The parse block to repeat. * @@ -45,6 +49,10 @@ public class ParseBlocks { /** * Create a new triggered parse block. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param source * The block to trigger around. * @@ -65,6 +73,10 @@ public class ParseBlocks { /** * Create a new simple parse block. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the expression inside the block. * 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 ed21b19..dc8009e 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java +++ b/JPratt/src/main/java/bjc/pratt/commands/impls/InitialCommands.java @@ -21,6 +21,10 @@ import bjc.data.ITree; public class InitialCommands { /** * Create a new unary operator. + * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. * * @param precedence * The precedence of the operator. @@ -34,6 +38,10 @@ public class InitialCommands { /** * Create a new grouping operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the expression in the operator. * @@ -54,6 +62,10 @@ public class InitialCommands { /** * Create a new leaf operator. + * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. * * @return A command implementing the operator. */ @@ -64,6 +76,10 @@ public class InitialCommands { /** * Create a new pre-ternary operator, like an if-then-else statement. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param cond1 * The priority of the first block. * @@ -96,6 +112,10 @@ public class InitialCommands { /** * Create a new named constant. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param val * The value of the constant. * @@ -108,6 +128,10 @@ public class InitialCommands { /** * Create a new delimited command. This is for block-like constructs. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param inner * The precedence of the inner blocks. * @@ -156,6 +180,10 @@ public class InitialCommands { * This removes one tree-level, and is useful when combining complex * parse blocks with commands. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param comm * The command to denest. * 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 82110b2..6019ffe 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java +++ b/JPratt/src/main/java/bjc/pratt/commands/impls/NonInitialCommands.java @@ -18,6 +18,10 @@ public class NonInitialCommands { /** * Create a left-associative infix operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the operator. * @@ -30,6 +34,10 @@ public class NonInitialCommands { /** * Create a right-associative infix operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the operator. * @@ -42,6 +50,10 @@ public class NonInitialCommands { /** * Create a non-associative infix operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the operator. * @@ -54,6 +66,10 @@ public class NonInitialCommands { /** * Create a chained operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the operator. * @@ -73,6 +89,10 @@ public class NonInitialCommands { /** * Create a postfix operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the operator. * @@ -87,6 +107,10 @@ public class NonInitialCommands { * * This is an operator in form similar to array indexing. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of this operator * @@ -113,6 +137,10 @@ public class NonInitialCommands { * * This is like C's ?: operator. * + * @param <K> The key type for the tokens. + * @param <V> The value type for the tokens. + * @param <C> The context type for the tokens. + * * @param precedence * The precedence of the operator. * |
