diff options
| author | bjculkin <bjculkin@WIT-136XG42.wvu-ad.wvu.edu> | 2017-04-12 10:45:46 -0400 |
|---|---|---|
| committer | bjculkin <bjculkin@WIT-136XG42.wvu-ad.wvu.edu> | 2017-04-12 10:45:46 -0400 |
| commit | 694bed833470393ee00eae0a85bff0c6c90e692a (patch) | |
| tree | 345ddcc9c03c5850ca74051d3c0d49420f508d3d /JPratt/src/main/java/bjc/pratt/MetaNonInitialCommand.java | |
| parent | 6b881e8833596d669fdee9525e064aea0c8946dc (diff) | |
Add support for meta-commands
Meta-commands allow you to implement meta-operators, whose behavior
changes based off of tokens that follow.
Diffstat (limited to 'JPratt/src/main/java/bjc/pratt/MetaNonInitialCommand.java')
| -rw-r--r-- | JPratt/src/main/java/bjc/pratt/MetaNonInitialCommand.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/JPratt/src/main/java/bjc/pratt/MetaNonInitialCommand.java b/JPratt/src/main/java/bjc/pratt/MetaNonInitialCommand.java new file mode 100644 index 0000000..444c0e4 --- /dev/null +++ b/JPratt/src/main/java/bjc/pratt/MetaNonInitialCommand.java @@ -0,0 +1,19 @@ +package bjc.pratt;
+
+/**
+ * A 'meta-command' for non-initial commands.
+ *
+ * @author bjculkin
+ *
+ * @param <K>
+ * The token key type.
+ *
+ * @param <V>
+ * The token value type.
+ *
+ * @param <C>
+ * The parser state type.
+ */
+public interface MetaNonInitialCommand<K, V, C> {
+ NonInitialCommand<K, V, C> getCommand(ParserContext<K, V, C> ctx);
+}
|
