summaryrefslogtreecommitdiff
path: root/src/kanga/syntaxtree/NodeChoice.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/kanga/syntaxtree/NodeChoice.java')
-rw-r--r--src/kanga/syntaxtree/NodeChoice.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/kanga/syntaxtree/NodeChoice.java b/src/kanga/syntaxtree/NodeChoice.java
new file mode 100644
index 0000000..4230240
--- /dev/null
+++ b/src/kanga/syntaxtree/NodeChoice.java
@@ -0,0 +1,36 @@
+//
+// Generated by JTB 1.3.2
+//
+
+package kanga.syntaxtree;
+
+/**
+ * Represents a grammar choice, e.g. ( A | B )
+ */
+public class NodeChoice implements Node {
+ public NodeChoice(Node node) {
+ this(node, -1);
+ }
+
+ public NodeChoice(Node node, int whichChoice) {
+ choice = node;
+ which = whichChoice;
+ }
+
+ public void accept(kanga.visitor.Visitor v) {
+ choice.accept(v);
+ }
+ public <R,A> R accept(kanga.visitor.GJVisitor<R,A> v, A argu) {
+ return choice.accept(v,argu);
+ }
+ public <R> R accept(kanga.visitor.GJNoArguVisitor<R> v) {
+ return choice.accept(v);
+ }
+ public <A> void accept(kanga.visitor.GJVoidVisitor<A> v, A argu) {
+ choice.accept(v,argu);
+ }
+
+ public Node choice;
+ public int which;
+}
+