summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2017-03-25 19:13:42 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2017-03-25 19:13:42 -0400
commit42990231fee502552b769b9af4c04ac0dcaeb195 (patch)
tree4dbe0ba0bc54fffafacc9ab12349efd76c52041c /BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java
parent674d9769821775484fe6913b93c650189fbedfed (diff)
Update Pratt parser
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java
index 87fe7c1..3937f5f 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/LeafCommand.java
@@ -7,11 +7,23 @@ import bjc.utils.parserutils.pratt.InitialCommand;
import bjc.utils.parserutils.pratt.ParserContext;
import bjc.utils.parserutils.pratt.Token;
+/**
+ * A operator that stands for itself.
+ *
+ * @author bjculkin
+ *
+ * @param <K>
+ * The key type of the tokens.
+ *
+ * @param <V>
+ * The value type of the tokens.
+ *
+ * @param <C>
+ * The state type of the parser.
+ */
public class LeafCommand<K, V, C> implements InitialCommand<K, V, C> {
@Override
- public ITree<Token<K, V>> denote(Token<K, V> operator, ParserContext<K, V, C> ctx)
- throws ParserException {
-
+ public ITree<Token<K, V>> denote(Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException {
return new Tree<>(operator);
}
} \ No newline at end of file