aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/javacc14
-rwxr-xr-xbin/jtb6
-rw-r--r--contrib/antlr-runtime-3.1.3.jarbin0 -> 150774 bytes
-rwxr-xr-xcontrib/gnunet-tree-builder/gtb6
-rwxr-xr-xcontrib/gnunet-tree-builder/regenerate20
-rw-r--r--contrib/jtb.jarbin0 -> 529942 bytes
-rw-r--r--contrib/sqljet.1.0.3.b914.jarbin0 -> 773565 bytes
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/CParserConstants.java209
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/CParserTokenManager.java1413
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/ExpressionDatabaseHandler.java75
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetDepthFirstVisitor.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetParser.java (renamed from contrib/gnunet-tree-builder/GNUnetParser.java)25
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/ParseException.java186
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/SimpleCharStream.java470
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/Token.java130
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/TokenMgrError.java146
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ANDExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AdditiveExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ArgumentExpressionList.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Array.java45
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentExpression.java34
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOperator.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOrTypeExpression.java34
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CastExpression.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CompoundStatement.java45
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConditionalExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Constant.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConstantExpression.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/DataType.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumSpecifier.java41
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Enumerator.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumeratorList.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EqualityExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExclusiveORExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Expression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExpressionStatement.java41
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExternalDeclaration.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionDeclaration.java57
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionType.java65
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IdentifierList.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InclusiveORExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclarator.java39
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclaratorList.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Initializer.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitializerList.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IterationStatement.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/JumpStatement.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LabeledStatement.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LocalVariableDeclaration.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalANDExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalORExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/MultiplicativeExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NoIdentifierTypeSpecifier.java42
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Node.java16
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeChoice.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeList.java44
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListInterface.java22
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListOptional.java45
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeOptional.java41
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeSequence.java45
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeToken.java87
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterDeclaration.java39
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterList.java39
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Pointer.java45
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PostfixExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PrimaryExpression.java35
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/RelationalExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/SelectionStatement.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ShiftExpression.java36
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Statement.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StorageClassSpecifier.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclaration.java53
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclarationList.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnion.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnionSpecifier.java34
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TranslationUnit.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeDeclaration.java45
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeSpecifier.java42
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryExpression.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryOperator.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableClassSpecifier.java33
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableDeclaration.java49
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/DepthFirstVisitor.java701
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJDepthFirst.java837
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguDepthFirst.java837
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguVisitor.java508
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVisitor.java507
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidDepthFirst.java711
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidVisitor.java508
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeDumper.java132
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeFormatter.java980
-rw-r--r--src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/Visitor.java508
92 files changed, 11450 insertions, 31 deletions
diff --git a/bin/javacc b/bin/javacc
new file mode 100755
index 000000000..12bd47d3f
--- /dev/null
+++ b/bin/javacc
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3cd "$@"/org/gnunet/seaspider/parser
4javacc -STATIC=false C.out.jj
5echo 'package org.gnunet.monkey.parser;' > PACKAGE
6for n in *.java
7do
8 cat $n >> PACKAGE
9 mv PACKAGE $n
10 echo 'package org.gnunet.monkey.parser;' > PACKAGE
11done
12
13rm -f PACKAGE
14 \ No newline at end of file
diff --git a/bin/jtb b/bin/jtb
index baa6bf461..8f23675ce 100755
--- a/bin/jtb
+++ b/bin/jtb
@@ -1,4 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2
2MYDIR=`dirname $0` 3MYDIR=`dirname $0`
3JTB_JAR=`echo ${MYDIR}/../contrib/jtb.jar` 4JTB_JAR=`echo ${MYDIR}/../contrib/jtb.jar`
4java -jar $JTB_JAR "$@" 5cd "$@"
6mkdir -p org/gnunet/seaspider/parser
7cd org/gnunet/seaspider/parser
8java -jar $JTB_JAR -printer -jd -np org.gnunet.seaspider.parser.nodes -vp org.gnunet.seaspider.parser.visitors -o C.out.jj "$@/C.jj" \ No newline at end of file
diff --git a/contrib/antlr-runtime-3.1.3.jar b/contrib/antlr-runtime-3.1.3.jar
new file mode 100644
index 000000000..b0a9ea69f
--- /dev/null
+++ b/contrib/antlr-runtime-3.1.3.jar
Binary files differ
diff --git a/contrib/gnunet-tree-builder/gtb b/contrib/gnunet-tree-builder/gtb
deleted file mode 100755
index d57dfdc3f..000000000
--- a/contrib/gnunet-tree-builder/gtb
+++ /dev/null
@@ -1,6 +0,0 @@
1#!/bin/sh
2# gtb: gnunet tree builder
3# Script for automating the generation of GNUnet syntax tree
4# MAINDIR: GNUnet workspace
5
6$MAINDIR/contrib/gnunet-tree-builder/regenerate \ No newline at end of file
diff --git a/contrib/gnunet-tree-builder/regenerate b/contrib/gnunet-tree-builder/regenerate
deleted file mode 100755
index fd5696a2a..000000000
--- a/contrib/gnunet-tree-builder/regenerate
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2# MAINDIR: Environment Variable for GNUnet workspace
3# Note: The script will generate the grammar file C.out.jj under src/monkey
4
5rm -f *.java
6mkdir -p org/gnunet/monkey/parser
7cd org/gnunet/monkey/parser
8jtb -printer -jd -np org.gnunet.monkey.parser.nodes -vp org.gnunet.monkey.parser.visitors -o $MAINDIR/src/monkey/C.out.jj $MAINDIR/src/monkey/C.jj
9javacc -STATIC=false $MAINDIR/src/monkey/C.out.jj
10
11echo 'package org.gnunet.monkey.parser;' > PACKAGE
12for n in *.java
13do
14 cat $n >> PACKAGE
15 mv PACKAGE $n
16 echo 'package org.gnunet.monkey.parser;' > PACKAGE
17done
18
19rm -f PACKAGE
20 \ No newline at end of file
diff --git a/contrib/jtb.jar b/contrib/jtb.jar
new file mode 100644
index 000000000..f10eb0078
--- /dev/null
+++ b/contrib/jtb.jar
Binary files differ
diff --git a/contrib/sqljet.1.0.3.b914.jar b/contrib/sqljet.1.0.3.b914.jar
new file mode 100644
index 000000000..0b76cc1c1
--- /dev/null
+++ b/contrib/sqljet.1.0.3.b914.jar
Binary files differ
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/CParserConstants.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/CParserConstants.java
new file mode 100644
index 000000000..44bd0d411
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/CParserConstants.java
@@ -0,0 +1,209 @@
1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. CParserConstants.java */
3
4/**
5 * Token literal values and constants.
6 * Generated by org.javacc.parser.OtherFilesGen#start()
7 */
8public interface CParserConstants {
9
10 /** End of File. */
11 int EOF = 0;
12 /** RegularExpression Id. */
13 int INTEGER_LITERAL = 12;
14 /** RegularExpression Id. */
15 int DECIMAL_LITERAL = 13;
16 /** RegularExpression Id. */
17 int HEX_LITERAL = 14;
18 /** RegularExpression Id. */
19 int OCTAL_LITERAL = 15;
20 /** RegularExpression Id. */
21 int FLOATING_POINT_LITERAL = 16;
22 /** RegularExpression Id. */
23 int EXPONENT = 17;
24 /** RegularExpression Id. */
25 int CHARACTER_LITERAL = 18;
26 /** RegularExpression Id. */
27 int STRING_LITERAL = 19;
28 /** RegularExpression Id. */
29 int CONTINUE = 20;
30 /** RegularExpression Id. */
31 int VOLATILE = 21;
32 /** RegularExpression Id. */
33 int REGISTER = 22;
34 /** RegularExpression Id. */
35 int UNSIGNED = 23;
36 /** RegularExpression Id. */
37 int TYPEDEF = 24;
38 /** RegularExpression Id. */
39 int DFLT = 25;
40 /** RegularExpression Id. */
41 int DOUBLE = 26;
42 /** RegularExpression Id. */
43 int SIZEOF = 27;
44 /** RegularExpression Id. */
45 int SWITCH = 28;
46 /** RegularExpression Id. */
47 int RETURN = 29;
48 /** RegularExpression Id. */
49 int EXTERN = 30;
50 /** RegularExpression Id. */
51 int STRUCT = 31;
52 /** RegularExpression Id. */
53 int STATIC = 32;
54 /** RegularExpression Id. */
55 int SIGNED = 33;
56 /** RegularExpression Id. */
57 int WHILE = 34;
58 /** RegularExpression Id. */
59 int BREAK = 35;
60 /** RegularExpression Id. */
61 int UNION = 36;
62 /** RegularExpression Id. */
63 int CONST = 37;
64 /** RegularExpression Id. */
65 int FLOAT = 38;
66 /** RegularExpression Id. */
67 int SHORT = 39;
68 /** RegularExpression Id. */
69 int ELSE = 40;
70 /** RegularExpression Id. */
71 int CASE = 41;
72 /** RegularExpression Id. */
73 int LONG = 42;
74 /** RegularExpression Id. */
75 int ENUM = 43;
76 /** RegularExpression Id. */
77 int AUTO = 44;
78 /** RegularExpression Id. */
79 int VOID = 45;
80 /** RegularExpression Id. */
81 int CHAR = 46;
82 /** RegularExpression Id. */
83 int GOTO = 47;
84 /** RegularExpression Id. */
85 int FOR = 48;
86 /** RegularExpression Id. */
87 int INT = 49;
88 /** RegularExpression Id. */
89 int IF = 50;
90 /** RegularExpression Id. */
91 int DO = 51;
92 /** RegularExpression Id. */
93 int IDENTIFIER = 52;
94 /** RegularExpression Id. */
95 int LETTER = 53;
96 /** RegularExpression Id. */
97 int DIGIT = 54;
98
99 /** Lexical state. */
100 int DEFAULT = 0;
101 /** Lexical state. */
102 int PREPROCESSOR_OUTPUT = 1;
103
104 /** Literal token values. */
105 String[] tokenImage = {
106 "<EOF>",
107 "\" \"",
108 "\"\\t\"",
109 "\"\\n\"",
110 "\"\\r\"",
111 "<token of kind 5>",
112 "<token of kind 6>",
113 "\"#\"",
114 "\"\\n\"",
115 "\"\\\\\\n\"",
116 "\"\\\\\\r\\n\"",
117 "<token of kind 11>",
118 "<INTEGER_LITERAL>",
119 "<DECIMAL_LITERAL>",
120 "<HEX_LITERAL>",
121 "<OCTAL_LITERAL>",
122 "<FLOATING_POINT_LITERAL>",
123 "<EXPONENT>",
124 "<CHARACTER_LITERAL>",
125 "<STRING_LITERAL>",
126 "\"continue\"",
127 "\"volatile\"",
128 "\"register\"",
129 "\"unsigned\"",
130 "\"typedef\"",
131 "\"default\"",
132 "\"double\"",
133 "\"sizeof\"",
134 "\"switch\"",
135 "\"return\"",
136 "\"extern\"",
137 "\"struct\"",
138 "\"static\"",
139 "\"signed\"",
140 "\"while\"",
141 "\"break\"",
142 "\"union\"",
143 "\"const\"",
144 "\"float\"",
145 "\"short\"",
146 "\"else\"",
147 "\"case\"",
148 "\"long\"",
149 "\"enum\"",
150 "\"auto\"",
151 "\"void\"",
152 "\"char\"",
153 "\"goto\"",
154 "\"for\"",
155 "\"int\"",
156 "\"if\"",
157 "\"do\"",
158 "<IDENTIFIER>",
159 "<LETTER>",
160 "<DIGIT>",
161 "\"(\"",
162 "\")\"",
163 "\";\"",
164 "\"*\"",
165 "\",\"",
166 "\"...\"",
167 "\"{\"",
168 "\"}\"",
169 "\"=\"",
170 "\":\"",
171 "\"[\"",
172 "\"]\"",
173 "\"*=\"",
174 "\"/=\"",
175 "\"%=\"",
176 "\"+=\"",
177 "\"-=\"",
178 "\"<<=\"",
179 "\">>=\"",
180 "\"&=\"",
181 "\"^=\"",
182 "\"|=\"",
183 "\"?\"",
184 "\"||\"",
185 "\"&&\"",
186 "\"|\"",
187 "\"^\"",
188 "\"&\"",
189 "\"==\"",
190 "\"!=\"",
191 "\"<\"",
192 "\">\"",
193 "\"<=\"",
194 "\">=\"",
195 "\"<<\"",
196 "\">>\"",
197 "\"+\"",
198 "\"-\"",
199 "\"/\"",
200 "\"%\"",
201 "\"++\"",
202 "\"--\"",
203 "\"~\"",
204 "\"!\"",
205 "\".\"",
206 "\"->\"",
207 };
208
209}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/CParserTokenManager.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/CParserTokenManager.java
new file mode 100644
index 000000000..41930bf36
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/CParserTokenManager.java
@@ -0,0 +1,1413 @@
1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. CParserTokenManager.java */
3import java.util.*;
4
5import org.gnunet.seaspider.parser.nodes.*;
6
7import java.util.Vector;
8
9/** Token Manager. */
10public class CParserTokenManager implements CParserConstants
11{
12
13 /** Debug output. */
14 public java.io.PrintStream debugStream = System.out;
15 /** Set debug output. */
16 public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
17private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
18{
19 switch (pos)
20 {
21 case 0:
22 if ((active1 & 0x20000010L) != 0L)
23 return 65;
24 if ((active0 & 0xffffffff00000L) != 0L)
25 {
26 jjmatchedKind = 52;
27 return 42;
28 }
29 if ((active0 & 0x1000000000000000L) != 0L || (active1 & 0x800000000L) != 0L)
30 return 5;
31 return -1;
32 case 1:
33 if ((active0 & 0xc000004000000L) != 0L)
34 return 42;
35 if ((active0 & 0x3fffffbf00000L) != 0L)
36 {
37 if (jjmatchedPos != 1)
38 {
39 jjmatchedKind = 52;
40 jjmatchedPos = 1;
41 }
42 return 42;
43 }
44 return -1;
45 case 2:
46 if ((active0 & 0xfffffff00000L) != 0L)
47 {
48 jjmatchedKind = 52;
49 jjmatchedPos = 2;
50 return 42;
51 }
52 if ((active0 & 0x3000000000000L) != 0L)
53 return 42;
54 return -1;
55 case 3:
56 if ((active0 & 0xfffff00000L) != 0L)
57 {
58 jjmatchedKind = 52;
59 jjmatchedPos = 3;
60 return 42;
61 }
62 if ((active0 & 0xff0000000000L) != 0L)
63 return 42;
64 return -1;
65 case 4:
66 if ((active0 & 0x3fff00000L) != 0L)
67 {
68 jjmatchedKind = 52;
69 jjmatchedPos = 4;
70 return 42;
71 }
72 if ((active0 & 0xfc00000000L) != 0L)
73 return 42;
74 return -1;
75 case 5:
76 if ((active0 & 0x3fc000000L) != 0L)
77 return 42;
78 if ((active0 & 0x3f00000L) != 0L)
79 {
80 jjmatchedKind = 52;
81 jjmatchedPos = 5;
82 return 42;
83 }
84 return -1;
85 case 6:
86 if ((active0 & 0xf00000L) != 0L)
87 {
88 jjmatchedKind = 52;
89 jjmatchedPos = 6;
90 return 42;
91 }
92 if ((active0 & 0x3000000L) != 0L)
93 return 42;
94 return -1;
95 default :
96 return -1;
97 }
98}
99private final int jjStartNfa_0(int pos, long active0, long active1)
100{
101 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
102}
103private int jjStopAtPos(int pos, int kind)
104{
105 jjmatchedKind = kind;
106 jjmatchedPos = pos;
107 return pos + 1;
108}
109private int jjMoveStringLiteralDfa0_0()
110{
111 switch(curChar)
112 {
113 case 33:
114 jjmatchedKind = 98;
115 return jjMoveStringLiteralDfa1_0(0x0L, 0x100000L);
116 case 35:
117 return jjStopAtPos(0, 7);
118 case 37:
119 jjmatchedKind = 94;
120 return jjMoveStringLiteralDfa1_0(0x0L, 0x20L);
121 case 38:
122 jjmatchedKind = 82;
123 return jjMoveStringLiteralDfa1_0(0x0L, 0x8400L);
124 case 40:
125 return jjStopAtPos(0, 55);
126 case 41:
127 return jjStopAtPos(0, 56);
128 case 42:
129 jjmatchedKind = 58;
130 return jjMoveStringLiteralDfa1_0(0x0L, 0x8L);
131 case 43:
132 jjmatchedKind = 91;
133 return jjMoveStringLiteralDfa1_0(0x0L, 0x80000040L);
134 case 44:
135 return jjStopAtPos(0, 59);
136 case 45:
137 jjmatchedKind = 92;
138 return jjMoveStringLiteralDfa1_0(0x0L, 0x1100000080L);
139 case 46:
140 jjmatchedKind = 99;
141 return jjMoveStringLiteralDfa1_0(0x1000000000000000L, 0x0L);
142 case 47:
143 jjmatchedKind = 93;
144 return jjMoveStringLiteralDfa1_0(0x0L, 0x10L);
145 case 58:
146 return jjStopAtPos(0, 64);
147 case 59:
148 return jjStopAtPos(0, 57);
149 case 60:
150 jjmatchedKind = 85;
151 return jjMoveStringLiteralDfa1_0(0x0L, 0x2800100L);
152 case 61:
153 jjmatchedKind = 63;
154 return jjMoveStringLiteralDfa1_0(0x0L, 0x80000L);
155 case 62:
156 jjmatchedKind = 86;
157 return jjMoveStringLiteralDfa1_0(0x0L, 0x5000200L);
158 case 63:
159 return jjStopAtPos(0, 77);
160 case 91:
161 return jjStopAtPos(0, 65);
162 case 93:
163 return jjStopAtPos(0, 66);
164 case 94:
165 jjmatchedKind = 81;
166 return jjMoveStringLiteralDfa1_0(0x0L, 0x800L);
167 case 97:
168 return jjMoveStringLiteralDfa1_0(0x100000000000L, 0x0L);
169 case 98:
170 return jjMoveStringLiteralDfa1_0(0x800000000L, 0x0L);
171 case 99:
172 return jjMoveStringLiteralDfa1_0(0x422000100000L, 0x0L);
173 case 100:
174 return jjMoveStringLiteralDfa1_0(0x8000006000000L, 0x0L);
175 case 101:
176 return jjMoveStringLiteralDfa1_0(0x90040000000L, 0x0L);
177 case 102:
178 return jjMoveStringLiteralDfa1_0(0x1004000000000L, 0x0L);
179 case 103:
180 return jjMoveStringLiteralDfa1_0(0x800000000000L, 0x0L);
181 case 105:
182 return jjMoveStringLiteralDfa1_0(0x6000000000000L, 0x0L);
183 case 108:
184 return jjMoveStringLiteralDfa1_0(0x40000000000L, 0x0L);
185 case 114:
186 return jjMoveStringLiteralDfa1_0(0x20400000L, 0x0L);
187 case 115:
188 return jjMoveStringLiteralDfa1_0(0x8398000000L, 0x0L);
189 case 116:
190 return jjMoveStringLiteralDfa1_0(0x1000000L, 0x0L);
191 case 117:
192 return jjMoveStringLiteralDfa1_0(0x1000800000L, 0x0L);
193 case 118:
194 return jjMoveStringLiteralDfa1_0(0x200000200000L, 0x0L);
195 case 119:
196 return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L);
197 case 123:
198 return jjStopAtPos(0, 61);
199 case 124:
200 jjmatchedKind = 80;
201 return jjMoveStringLiteralDfa1_0(0x0L, 0x5000L);
202 case 125:
203 return jjStopAtPos(0, 62);
204 case 126:
205 return jjStopAtPos(0, 97);
206 default :
207 return jjMoveNfa_0(0, 0);
208 }
209}
210private int jjMoveStringLiteralDfa1_0(long active0, long active1)
211{
212 try { curChar = input_stream.readChar(); }
213 catch(java.io.IOException e) {
214 jjStopStringLiteralDfa_0(0, active0, active1);
215 return 1;
216 }
217 switch(curChar)
218 {
219 case 38:
220 if ((active1 & 0x8000L) != 0L)
221 return jjStopAtPos(1, 79);
222 break;
223 case 43:
224 if ((active1 & 0x80000000L) != 0L)
225 return jjStopAtPos(1, 95);
226 break;
227 case 45:
228 if ((active1 & 0x100000000L) != 0L)
229 return jjStopAtPos(1, 96);
230 break;
231 case 46:
232 return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000000L, active1, 0L);
233 case 60:
234 if ((active1 & 0x2000000L) != 0L)
235 {
236 jjmatchedKind = 89;
237 jjmatchedPos = 1;
238 }
239 return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100L);
240 case 61:
241 if ((active1 & 0x8L) != 0L)
242 return jjStopAtPos(1, 67);
243 else if ((active1 & 0x10L) != 0L)
244 return jjStopAtPos(1, 68);
245 else if ((active1 & 0x20L) != 0L)
246 return jjStopAtPos(1, 69);
247 else if ((active1 & 0x40L) != 0L)
248 return jjStopAtPos(1, 70);
249 else if ((active1 & 0x80L) != 0L)
250 return jjStopAtPos(1, 71);
251 else if ((active1 & 0x400L) != 0L)
252 return jjStopAtPos(1, 74);
253 else if ((active1 & 0x800L) != 0L)
254 return jjStopAtPos(1, 75);
255 else if ((active1 & 0x1000L) != 0L)
256 return jjStopAtPos(1, 76);
257 else if ((active1 & 0x80000L) != 0L)
258 return jjStopAtPos(1, 83);
259 else if ((active1 & 0x100000L) != 0L)
260 return jjStopAtPos(1, 84);
261 else if ((active1 & 0x800000L) != 0L)
262 return jjStopAtPos(1, 87);
263 else if ((active1 & 0x1000000L) != 0L)
264 return jjStopAtPos(1, 88);
265 break;
266 case 62:
267 if ((active1 & 0x4000000L) != 0L)
268 {
269 jjmatchedKind = 90;
270 jjmatchedPos = 1;
271 }
272 else if ((active1 & 0x1000000000L) != 0L)
273 return jjStopAtPos(1, 100);
274 return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x200L);
275 case 97:
276 return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L, active1, 0L);
277 case 101:
278 return jjMoveStringLiteralDfa2_0(active0, 0x22400000L, active1, 0L);
279 case 102:
280 if ((active0 & 0x4000000000000L) != 0L)
281 return jjStartNfaWithStates_0(1, 50, 42);
282 break;
283 case 104:
284 return jjMoveStringLiteralDfa2_0(active0, 0x408400000000L, active1, 0L);
285 case 105:
286 return jjMoveStringLiteralDfa2_0(active0, 0x208000000L, active1, 0L);
287 case 108:
288 return jjMoveStringLiteralDfa2_0(active0, 0x14000000000L, active1, 0L);
289 case 110:
290 return jjMoveStringLiteralDfa2_0(active0, 0x2081000800000L, active1, 0L);
291 case 111:
292 if ((active0 & 0x8000000000000L) != 0L)
293 {
294 jjmatchedKind = 51;
295 jjmatchedPos = 1;
296 }
297 return jjMoveStringLiteralDfa2_0(active0, 0x1a42004300000L, active1, 0L);
298 case 114:
299 return jjMoveStringLiteralDfa2_0(active0, 0x800000000L, active1, 0L);
300 case 116:
301 return jjMoveStringLiteralDfa2_0(active0, 0x180000000L, active1, 0L);
302 case 117:
303 return jjMoveStringLiteralDfa2_0(active0, 0x100000000000L, active1, 0L);
304 case 119:
305 return jjMoveStringLiteralDfa2_0(active0, 0x10000000L, active1, 0L);
306 case 120:
307 return jjMoveStringLiteralDfa2_0(active0, 0x40000000L, active1, 0L);
308 case 121:
309 return jjMoveStringLiteralDfa2_0(active0, 0x1000000L, active1, 0L);
310 case 124:
311 if ((active1 & 0x4000L) != 0L)
312 return jjStopAtPos(1, 78);
313 break;
314 default :
315 break;
316 }
317 return jjStartNfa_0(0, active0, active1);
318}
319private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
320{
321 if (((active0 &= old0) | (active1 &= old1)) == 0L)
322 return jjStartNfa_0(0, old0, old1);
323 try { curChar = input_stream.readChar(); }
324 catch(java.io.IOException e) {
325 jjStopStringLiteralDfa_0(1, active0, active1);
326 return 2;
327 }
328 switch(curChar)
329 {
330 case 46:
331 if ((active0 & 0x1000000000000000L) != 0L)
332 return jjStopAtPos(2, 60);
333 break;
334 case 61:
335 if ((active1 & 0x100L) != 0L)
336 return jjStopAtPos(2, 72);
337 else if ((active1 & 0x200L) != 0L)
338 return jjStopAtPos(2, 73);
339 break;
340 case 97:
341 return jjMoveStringLiteralDfa3_0(active0, 0x400100000000L, active1, 0L);
342 case 101:
343 return jjMoveStringLiteralDfa3_0(active0, 0x800000000L, active1, 0L);
344 case 102:
345 return jjMoveStringLiteralDfa3_0(active0, 0x2000000L, active1, 0L);
346 case 103:
347 return jjMoveStringLiteralDfa3_0(active0, 0x200400000L, active1, 0L);
348 case 105:
349 return jjMoveStringLiteralDfa3_0(active0, 0x201410000000L, active1, 0L);
350 case 108:
351 return jjMoveStringLiteralDfa3_0(active0, 0x200000L, active1, 0L);
352 case 110:
353 return jjMoveStringLiteralDfa3_0(active0, 0x42000100000L, active1, 0L);
354 case 111:
355 return jjMoveStringLiteralDfa3_0(active0, 0xc000000000L, active1, 0L);
356 case 112:
357 return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L);
358 case 114:
359 if ((active0 & 0x1000000000000L) != 0L)
360 return jjStartNfaWithStates_0(2, 48, 42);
361 return jjMoveStringLiteralDfa3_0(active0, 0x80000000L, active1, 0L);
362 case 115:
363 return jjMoveStringLiteralDfa3_0(active0, 0x30000800000L, active1, 0L);
364 case 116:
365 if ((active0 & 0x2000000000000L) != 0L)
366 return jjStartNfaWithStates_0(2, 49, 42);
367 return jjMoveStringLiteralDfa3_0(active0, 0x900060000000L, active1, 0L);
368 case 117:
369 return jjMoveStringLiteralDfa3_0(active0, 0x80004000000L, active1, 0L);
370 case 122:
371 return jjMoveStringLiteralDfa3_0(active0, 0x8000000L, active1, 0L);
372 default :
373 break;
374 }
375 return jjStartNfa_0(1, active0, active1);
376}
377private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
378{
379 if (((active0 &= old0) | (active1 &= old1)) == 0L)
380 return jjStartNfa_0(1, old0, old1);
381 try { curChar = input_stream.readChar(); }
382 catch(java.io.IOException e) {
383 jjStopStringLiteralDfa_0(2, active0, 0L);
384 return 3;
385 }
386 switch(curChar)
387 {
388 case 97:
389 return jjMoveStringLiteralDfa4_0(active0, 0x4802200000L);
390 case 98:
391 return jjMoveStringLiteralDfa4_0(active0, 0x4000000L);
392 case 100:
393 if ((active0 & 0x200000000000L) != 0L)
394 return jjStartNfaWithStates_0(3, 45, 42);
395 break;
396 case 101:
397 if ((active0 & 0x10000000000L) != 0L)
398 return jjStartNfaWithStates_0(3, 40, 42);
399 else if ((active0 & 0x20000000000L) != 0L)
400 return jjStartNfaWithStates_0(3, 41, 42);
401 return jjMoveStringLiteralDfa4_0(active0, 0x49000000L);
402 case 103:
403 if ((active0 & 0x40000000000L) != 0L)
404 return jjStartNfaWithStates_0(3, 42, 42);
405 break;
406 case 105:
407 return jjMoveStringLiteralDfa4_0(active0, 0xc00000L);
408 case 108:
409 return jjMoveStringLiteralDfa4_0(active0, 0x400000000L);
410 case 109:
411 if ((active0 & 0x80000000000L) != 0L)
412 return jjStartNfaWithStates_0(3, 43, 42);
413 break;
414 case 110:
415 return jjMoveStringLiteralDfa4_0(active0, 0x200000000L);
416 case 111:
417 if ((active0 & 0x100000000000L) != 0L)
418 return jjStartNfaWithStates_0(3, 44, 42);
419 else if ((active0 & 0x800000000000L) != 0L)
420 return jjStartNfaWithStates_0(3, 47, 42);
421 return jjMoveStringLiteralDfa4_0(active0, 0x1000000000L);
422 case 114:
423 if ((active0 & 0x400000000000L) != 0L)
424 return jjStartNfaWithStates_0(3, 46, 42);
425 return jjMoveStringLiteralDfa4_0(active0, 0x8000000000L);
426 case 115:
427 return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L);
428 case 116:
429 return jjMoveStringLiteralDfa4_0(active0, 0x110100000L);
430 case 117:
431 return jjMoveStringLiteralDfa4_0(active0, 0xa0000000L);
432 default :
433 break;
434 }
435 return jjStartNfa_0(2, active0, 0L);
436}
437private int jjMoveStringLiteralDfa4_0(long old0, long active0)
438{
439 if (((active0 &= old0)) == 0L)
440 return jjStartNfa_0(2, old0, 0L);
441 try { curChar = input_stream.readChar(); }
442 catch(java.io.IOException e) {
443 jjStopStringLiteralDfa_0(3, active0, 0L);
444 return 4;
445 }
446 switch(curChar)
447 {
448 case 99:
449 return jjMoveStringLiteralDfa5_0(active0, 0x90000000L);
450 case 100:
451 return jjMoveStringLiteralDfa5_0(active0, 0x1000000L);
452 case 101:
453 if ((active0 & 0x400000000L) != 0L)
454 return jjStartNfaWithStates_0(4, 34, 42);
455 return jjMoveStringLiteralDfa5_0(active0, 0x200000000L);
456 case 103:
457 return jjMoveStringLiteralDfa5_0(active0, 0x800000L);
458 case 105:
459 return jjMoveStringLiteralDfa5_0(active0, 0x100100000L);
460 case 107:
461 if ((active0 & 0x800000000L) != 0L)
462 return jjStartNfaWithStates_0(4, 35, 42);
463 break;
464 case 108:
465 return jjMoveStringLiteralDfa5_0(active0, 0x4000000L);
466 case 110:
467 if ((active0 & 0x1000000000L) != 0L)
468 return jjStartNfaWithStates_0(4, 36, 42);
469 break;
470 case 111:
471 return jjMoveStringLiteralDfa5_0(active0, 0x8000000L);
472 case 114:
473 return jjMoveStringLiteralDfa5_0(active0, 0x60000000L);
474 case 115:
475 return jjMoveStringLiteralDfa5_0(active0, 0x400000L);
476 case 116:
477 if ((active0 & 0x2000000000L) != 0L)
478 return jjStartNfaWithStates_0(4, 37, 42);
479 else if ((active0 & 0x4000000000L) != 0L)
480 return jjStartNfaWithStates_0(4, 38, 42);
481 else if ((active0 & 0x8000000000L) != 0L)
482 return jjStartNfaWithStates_0(4, 39, 42);
483 return jjMoveStringLiteralDfa5_0(active0, 0x200000L);
484 case 117:
485 return jjMoveStringLiteralDfa5_0(active0, 0x2000000L);
486 default :
487 break;
488 }
489 return jjStartNfa_0(3, active0, 0L);
490}
491private int jjMoveStringLiteralDfa5_0(long old0, long active0)
492{
493 if (((active0 &= old0)) == 0L)
494 return jjStartNfa_0(3, old0, 0L);
495 try { curChar = input_stream.readChar(); }
496 catch(java.io.IOException e) {
497 jjStopStringLiteralDfa_0(4, active0, 0L);
498 return 5;
499 }
500 switch(curChar)
501 {
502 case 99:
503 if ((active0 & 0x100000000L) != 0L)
504 return jjStartNfaWithStates_0(5, 32, 42);
505 break;
506 case 100:
507 if ((active0 & 0x200000000L) != 0L)
508 return jjStartNfaWithStates_0(5, 33, 42);
509 break;
510 case 101:
511 if ((active0 & 0x4000000L) != 0L)
512 return jjStartNfaWithStates_0(5, 26, 42);
513 return jjMoveStringLiteralDfa6_0(active0, 0x1000000L);
514 case 102:
515 if ((active0 & 0x8000000L) != 0L)
516 return jjStartNfaWithStates_0(5, 27, 42);
517 break;
518 case 104:
519 if ((active0 & 0x10000000L) != 0L)
520 return jjStartNfaWithStates_0(5, 28, 42);
521 break;
522 case 105:
523 return jjMoveStringLiteralDfa6_0(active0, 0x200000L);
524 case 108:
525 return jjMoveStringLiteralDfa6_0(active0, 0x2000000L);
526 case 110:
527 if ((active0 & 0x20000000L) != 0L)
528 return jjStartNfaWithStates_0(5, 29, 42);
529 else if ((active0 & 0x40000000L) != 0L)
530 return jjStartNfaWithStates_0(5, 30, 42);
531 return jjMoveStringLiteralDfa6_0(active0, 0x900000L);
532 case 116:
533 if ((active0 & 0x80000000L) != 0L)
534 return jjStartNfaWithStates_0(5, 31, 42);
535 return jjMoveStringLiteralDfa6_0(active0, 0x400000L);
536 default :
537 break;
538 }
539 return jjStartNfa_0(4, active0, 0L);
540}
541private int jjMoveStringLiteralDfa6_0(long old0, long active0)
542{
543 if (((active0 &= old0)) == 0L)
544 return jjStartNfa_0(4, old0, 0L);
545 try { curChar = input_stream.readChar(); }
546 catch(java.io.IOException e) {
547 jjStopStringLiteralDfa_0(5, active0, 0L);
548 return 6;
549 }
550 switch(curChar)
551 {
552 case 101:
553 return jjMoveStringLiteralDfa7_0(active0, 0xc00000L);
554 case 102:
555 if ((active0 & 0x1000000L) != 0L)
556 return jjStartNfaWithStates_0(6, 24, 42);
557 break;
558 case 108:
559 return jjMoveStringLiteralDfa7_0(active0, 0x200000L);
560 case 116:
561 if ((active0 & 0x2000000L) != 0L)
562 return jjStartNfaWithStates_0(6, 25, 42);
563 break;
564 case 117:
565 return jjMoveStringLiteralDfa7_0(active0, 0x100000L);
566 default :
567 break;
568 }
569 return jjStartNfa_0(5, active0, 0L);
570}
571private int jjMoveStringLiteralDfa7_0(long old0, long active0)
572{
573 if (((active0 &= old0)) == 0L)
574 return jjStartNfa_0(5, old0, 0L);
575 try { curChar = input_stream.readChar(); }
576 catch(java.io.IOException e) {
577 jjStopStringLiteralDfa_0(6, active0, 0L);
578 return 7;
579 }
580 switch(curChar)
581 {
582 case 100:
583 if ((active0 & 0x800000L) != 0L)
584 return jjStartNfaWithStates_0(7, 23, 42);
585 break;
586 case 101:
587 if ((active0 & 0x100000L) != 0L)
588 return jjStartNfaWithStates_0(7, 20, 42);
589 else if ((active0 & 0x200000L) != 0L)
590 return jjStartNfaWithStates_0(7, 21, 42);
591 break;
592 case 114:
593 if ((active0 & 0x400000L) != 0L)
594 return jjStartNfaWithStates_0(7, 22, 42);
595 break;
596 default :
597 break;
598 }
599 return jjStartNfa_0(6, active0, 0L);
600}
601private int jjStartNfaWithStates_0(int pos, int kind, int state)
602{
603 jjmatchedKind = kind;
604 jjmatchedPos = pos;
605 try { curChar = input_stream.readChar(); }
606 catch(java.io.IOException e) { return pos + 1; }
607 return jjMoveNfa_0(state, pos + 1);
608}
609static final long[] jjbitVec0 = {
610 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
611};
612private int jjMoveNfa_0(int startState, int curPos)
613{
614 int startsAt = 0;
615 jjnewStateCnt = 76;
616 int i = 1;
617 jjstateSet[0] = startState;
618 int kind = 0x7fffffff;
619 for (;;)
620 {
621 if (++jjround == 0x7fffffff)
622 ReInitRounds();
623 if (curChar < 64)
624 {
625 long l = 1L << curChar;
626 do
627 {
628 switch(jjstateSet[--i])
629 {
630 case 65:
631 if (curChar == 42)
632 jjCheckNAddTwoStates(71, 72);
633 else if (curChar == 47)
634 jjCheckNAddStates(0, 2);
635 break;
636 case 0:
637 if ((0x3ff000000000000L & l) != 0L)
638 jjCheckNAddStates(3, 9);
639 else if (curChar == 47)
640 jjAddStates(10, 11);
641 else if (curChar == 36)
642 {
643 if (kind > 52)
644 kind = 52;
645 jjCheckNAdd(42);
646 }
647 else if (curChar == 34)
648 jjCheckNAddStates(12, 14);
649 else if (curChar == 39)
650 jjAddStates(15, 16);
651 else if (curChar == 46)
652 jjCheckNAdd(5);
653 if ((0x3fe000000000000L & l) != 0L)
654 {
655 if (kind > 12)
656 kind = 12;
657 jjCheckNAddTwoStates(1, 2);
658 }
659 else if (curChar == 48)
660 {
661 if (kind > 12)
662 kind = 12;
663 jjCheckNAddStates(17, 19);
664 }
665 break;
666 case 1:
667 if ((0x3ff000000000000L & l) == 0L)
668 break;
669 if (kind > 12)
670 kind = 12;
671 jjCheckNAddTwoStates(1, 2);
672 break;
673 case 4:
674 if (curChar == 46)
675 jjCheckNAdd(5);
676 break;
677 case 5:
678 if ((0x3ff000000000000L & l) == 0L)
679 break;
680 if (kind > 16)
681 kind = 16;
682 jjCheckNAddStates(20, 22);
683 break;
684 case 7:
685 if ((0x280000000000L & l) != 0L)
686 jjCheckNAdd(8);
687 break;
688 case 8:
689 if ((0x3ff000000000000L & l) == 0L)
690 break;
691 if (kind > 16)
692 kind = 16;
693 jjCheckNAddTwoStates(8, 9);
694 break;
695 case 10:
696 if (curChar == 39)
697 jjAddStates(15, 16);
698 break;
699 case 11:
700 if ((0xffffff7fffffdbffL & l) != 0L)
701 jjCheckNAdd(12);
702 break;
703 case 12:
704 if (curChar == 39 && kind > 18)
705 kind = 18;
706 break;
707 case 14:
708 if ((0x8400000000L & l) != 0L)
709 jjCheckNAdd(12);
710 break;
711 case 15:
712 if ((0xff000000000000L & l) != 0L)
713 jjCheckNAddTwoStates(16, 12);
714 break;
715 case 16:
716 if ((0xff000000000000L & l) != 0L)
717 jjCheckNAdd(12);
718 break;
719 case 17:
720 if ((0xf000000000000L & l) != 0L)
721 jjstateSet[jjnewStateCnt++] = 18;
722 break;
723 case 18:
724 if ((0xff000000000000L & l) != 0L)
725 jjCheckNAdd(16);
726 break;
727 case 19:
728 if (curChar == 34)
729 jjCheckNAddStates(12, 14);
730 break;
731 case 20:
732 if ((0xfffffffbffffdbffL & l) != 0L)
733 jjCheckNAddStates(12, 14);
734 break;
735 case 22:
736 if ((0x8400002400L & l) != 0L)
737 jjCheckNAddStates(12, 14);
738 break;
739 case 23:
740 if (curChar != 34)
741 break;
742 if (kind > 19)
743 kind = 19;
744 jjCheckNAddTwoStates(24, 25);
745 break;
746 case 24:
747 if ((0x100002400L & l) != 0L)
748 jjCheckNAddTwoStates(24, 25);
749 break;
750 case 25:
751 if (curChar == 34)
752 jjCheckNAddStates(23, 25);
753 break;
754 case 26:
755 if ((0xfffffffbffffdbffL & l) != 0L)
756 jjCheckNAddStates(23, 25);
757 break;
758 case 28:
759 if ((0x8400002400L & l) != 0L)
760 jjCheckNAddStates(23, 25);
761 break;
762 case 29:
763 if ((0xff000000000000L & l) != 0L)
764 jjCheckNAddStates(26, 29);
765 break;
766 case 30:
767 if ((0xff000000000000L & l) != 0L)
768 jjCheckNAddStates(23, 25);
769 break;
770 case 31:
771 if ((0xf000000000000L & l) != 0L)
772 jjstateSet[jjnewStateCnt++] = 32;
773 break;
774 case 32:
775 if ((0xff000000000000L & l) != 0L)
776 jjCheckNAdd(30);
777 break;
778 case 33:
779 if (curChar == 10)
780 jjCheckNAddStates(23, 25);
781 break;
782 case 34:
783 if (curChar == 13)
784 jjstateSet[jjnewStateCnt++] = 33;
785 break;
786 case 35:
787 if ((0xff000000000000L & l) != 0L)
788 jjCheckNAddStates(30, 33);
789 break;
790 case 36:
791 if ((0xff000000000000L & l) != 0L)
792 jjCheckNAddStates(12, 14);
793 break;
794 case 37:
795 if ((0xf000000000000L & l) != 0L)
796 jjstateSet[jjnewStateCnt++] = 38;
797 break;
798 case 38:
799 if ((0xff000000000000L & l) != 0L)
800 jjCheckNAdd(36);
801 break;
802 case 39:
803 if (curChar == 10)
804 jjCheckNAddStates(12, 14);
805 break;
806 case 40:
807 if (curChar == 13)
808 jjstateSet[jjnewStateCnt++] = 39;
809 break;
810 case 41:
811 if (curChar != 36)
812 break;
813 if (kind > 52)
814 kind = 52;
815 jjCheckNAdd(42);
816 break;
817 case 42:
818 if ((0x3ff001000000000L & l) == 0L)
819 break;
820 if (kind > 52)
821 kind = 52;
822 jjCheckNAdd(42);
823 break;
824 case 43:
825 if ((0x3ff000000000000L & l) != 0L)
826 jjCheckNAddStates(3, 9);
827 break;
828 case 44:
829 if ((0x3ff000000000000L & l) != 0L)
830 jjCheckNAddTwoStates(44, 45);
831 break;
832 case 45:
833 if (curChar != 46)
834 break;
835 if (kind > 16)
836 kind = 16;
837 jjCheckNAddStates(34, 36);
838 break;
839 case 46:
840 if ((0x3ff000000000000L & l) == 0L)
841 break;
842 if (kind > 16)
843 kind = 16;
844 jjCheckNAddStates(34, 36);
845 break;
846 case 48:
847 if ((0x280000000000L & l) != 0L)
848 jjCheckNAdd(49);
849 break;
850 case 49:
851 if ((0x3ff000000000000L & l) == 0L)
852 break;
853 if (kind > 16)
854 kind = 16;
855 jjCheckNAddTwoStates(49, 9);
856 break;
857 case 50:
858 if ((0x3ff000000000000L & l) != 0L)
859 jjCheckNAddTwoStates(50, 51);
860 break;
861 case 52:
862 if ((0x280000000000L & l) != 0L)
863 jjCheckNAdd(53);
864 break;
865 case 53:
866 if ((0x3ff000000000000L & l) == 0L)
867 break;
868 if (kind > 16)
869 kind = 16;
870 jjCheckNAddTwoStates(53, 9);
871 break;
872 case 54:
873 if ((0x3ff000000000000L & l) != 0L)
874 jjCheckNAddStates(37, 39);
875 break;
876 case 56:
877 if ((0x280000000000L & l) != 0L)
878 jjCheckNAdd(57);
879 break;
880 case 57:
881 if ((0x3ff000000000000L & l) != 0L)
882 jjCheckNAddTwoStates(57, 9);
883 break;
884 case 58:
885 if (curChar != 48)
886 break;
887 if (kind > 12)
888 kind = 12;
889 jjCheckNAddStates(17, 19);
890 break;
891 case 60:
892 if ((0x3ff000000000000L & l) == 0L)
893 break;
894 if (kind > 12)
895 kind = 12;
896 jjAddStates(40, 41);
897 break;
898 case 62:
899 if ((0xff000000000000L & l) == 0L)
900 break;
901 if (kind > 12)
902 kind = 12;
903 jjCheckNAddTwoStates(62, 63);
904 break;
905 case 64:
906 if (curChar == 47)
907 jjAddStates(10, 11);
908 break;
909 case 66:
910 if ((0xffffffffffffdbffL & l) != 0L)
911 jjCheckNAddStates(0, 2);
912 break;
913 case 67:
914 if ((0x2400L & l) != 0L && kind > 5)
915 kind = 5;
916 break;
917 case 68:
918 if (curChar == 10 && kind > 5)
919 kind = 5;
920 break;
921 case 69:
922 if (curChar == 13)
923 jjstateSet[jjnewStateCnt++] = 68;
924 break;
925 case 70:
926 if (curChar == 42)
927 jjCheckNAddTwoStates(71, 72);
928 break;
929 case 71:
930 if ((0xfffffbffffffffffL & l) != 0L)
931 jjCheckNAddTwoStates(71, 72);
932 break;
933 case 72:
934 if (curChar == 42)
935 jjCheckNAddStates(42, 44);
936 break;
937 case 73:
938 if ((0xffff7bffffffffffL & l) != 0L)
939 jjCheckNAddTwoStates(74, 72);
940 break;
941 case 74:
942 if ((0xfffffbffffffffffL & l) != 0L)
943 jjCheckNAddTwoStates(74, 72);
944 break;
945 case 75:
946 if (curChar == 47 && kind > 6)
947 kind = 6;
948 break;
949 default : break;
950 }
951 } while(i != startsAt);
952 }
953 else if (curChar < 128)
954 {
955 long l = 1L << (curChar & 077);
956 do
957 {
958 switch(jjstateSet[--i])
959 {
960 case 0:
961 case 42:
962 if ((0x7fffffe87fffffeL & l) == 0L)
963 break;
964 if (kind > 52)
965 kind = 52;
966 jjCheckNAdd(42);
967 break;
968 case 2:
969 case 61:
970 case 63:
971 if ((0x100000001000L & l) == 0L)
972 break;
973 if (kind > 12)
974 kind = 12;
975 jjCheckNAdd(3);
976 break;
977 case 3:
978 if ((0x100000001000L & l) != 0L && kind > 12)
979 kind = 12;
980 break;
981 case 6:
982 if ((0x2000000020L & l) != 0L)
983 jjAddStates(45, 46);
984 break;
985 case 9:
986 if ((0x5000000050L & l) != 0L && kind > 16)
987 kind = 16;
988 break;
989 case 11:
990 if ((0xffffffffefffffffL & l) != 0L)
991 jjCheckNAdd(12);
992 break;
993 case 13:
994 if (curChar == 92)
995 jjAddStates(47, 49);
996 break;
997 case 14:
998 if ((0x14404410000000L & l) != 0L)
999 jjCheckNAdd(12);
1000 break;
1001 case 20:
1002 if ((0xffffffffefffffffL & l) != 0L)
1003 jjCheckNAddStates(12, 14);
1004 break;
1005 case 21:
1006 if (curChar == 92)
1007 jjAddStates(50, 53);
1008 break;
1009 case 22:
1010 if ((0x14404410000000L & l) != 0L)
1011 jjCheckNAddStates(12, 14);
1012 break;
1013 case 26:
1014 if ((0xffffffffefffffffL & l) != 0L)
1015 jjCheckNAddStates(23, 25);
1016 break;
1017 case 27:
1018 if (curChar == 92)
1019 jjAddStates(54, 57);
1020 break;
1021 case 28:
1022 if ((0x14404410000000L & l) != 0L)
1023 jjCheckNAddStates(23, 25);
1024 break;
1025 case 47:
1026 if ((0x2000000020L & l) != 0L)
1027 jjAddStates(58, 59);
1028 break;
1029 case 51:
1030 if ((0x2000000020L & l) != 0L)
1031 jjAddStates(60, 61);
1032 break;
1033 case 55:
1034 if ((0x2000000020L & l) != 0L)
1035 jjAddStates(62, 63);
1036 break;
1037 case 59:
1038 if ((0x100000001000000L & l) != 0L)
1039 jjCheckNAdd(60);
1040 break;
1041 case 60:
1042 if ((0x7e0000007eL & l) == 0L)
1043 break;
1044 if (kind > 12)
1045 kind = 12;
1046 jjCheckNAddTwoStates(60, 61);
1047 break;
1048 case 66:
1049 jjAddStates(0, 2);
1050 break;
1051 case 71:
1052 jjCheckNAddTwoStates(71, 72);
1053 break;
1054 case 73:
1055 case 74:
1056 jjCheckNAddTwoStates(74, 72);
1057 break;
1058 default : break;
1059 }
1060 } while(i != startsAt);
1061 }
1062 else
1063 {
1064 int i2 = (curChar & 0xff) >> 6;
1065 long l2 = 1L << (curChar & 077);
1066 do
1067 {
1068 switch(jjstateSet[--i])
1069 {
1070 case 11:
1071 if ((jjbitVec0[i2] & l2) != 0L)
1072 jjstateSet[jjnewStateCnt++] = 12;
1073 break;
1074 case 20:
1075 if ((jjbitVec0[i2] & l2) != 0L)
1076 jjCheckNAddStates(12, 14);
1077 break;
1078 case 26:
1079 if ((jjbitVec0[i2] & l2) != 0L)
1080 jjCheckNAddStates(23, 25);
1081 break;
1082 case 66:
1083 if ((jjbitVec0[i2] & l2) != 0L)
1084 jjAddStates(0, 2);
1085 break;
1086 case 71:
1087 if ((jjbitVec0[i2] & l2) != 0L)
1088 jjCheckNAddTwoStates(71, 72);
1089 break;
1090 case 73:
1091 case 74:
1092 if ((jjbitVec0[i2] & l2) != 0L)
1093 jjCheckNAddTwoStates(74, 72);
1094 break;
1095 default : break;
1096 }
1097 } while(i != startsAt);
1098 }
1099 if (kind != 0x7fffffff)
1100 {
1101 jjmatchedKind = kind;
1102 jjmatchedPos = curPos;
1103 kind = 0x7fffffff;
1104 }
1105 ++curPos;
1106 if ((i = jjnewStateCnt) == (startsAt = 76 - (jjnewStateCnt = startsAt)))
1107 return curPos;
1108 try { curChar = input_stream.readChar(); }
1109 catch(java.io.IOException e) { return curPos; }
1110 }
1111}
1112private int jjMoveStringLiteralDfa0_1()
1113{
1114 switch(curChar)
1115 {
1116 case 10:
1117 return jjStopAtPos(0, 8);
1118 case 92:
1119 return jjMoveStringLiteralDfa1_1(0x600L);
1120 default :
1121 return 1;
1122 }
1123}
1124private int jjMoveStringLiteralDfa1_1(long active0)
1125{
1126 try { curChar = input_stream.readChar(); }
1127 catch(java.io.IOException e) {
1128 return 1;
1129 }
1130 switch(curChar)
1131 {
1132 case 10:
1133 if ((active0 & 0x200L) != 0L)
1134 return jjStopAtPos(1, 9);
1135 break;
1136 case 13:
1137 return jjMoveStringLiteralDfa2_1(active0, 0x400L);
1138 default :
1139 return 2;
1140 }
1141 return 2;
1142}
1143private int jjMoveStringLiteralDfa2_1(long old0, long active0)
1144{
1145 if (((active0 &= old0)) == 0L)
1146 return 2;
1147 try { curChar = input_stream.readChar(); }
1148 catch(java.io.IOException e) {
1149 return 2;
1150 }
1151 switch(curChar)
1152 {
1153 case 10:
1154 if ((active0 & 0x400L) != 0L)
1155 return jjStopAtPos(2, 10);
1156 break;
1157 default :
1158 return 3;
1159 }
1160 return 3;
1161}
1162static final int[] jjnextStates = {
1163 66, 67, 69, 44, 45, 50, 51, 54, 55, 9, 65, 70, 20, 21, 23, 11,
1164 13, 59, 62, 63, 5, 6, 9, 26, 27, 23, 26, 27, 30, 23, 20, 21,
1165 36, 23, 46, 47, 9, 54, 55, 9, 60, 61, 72, 73, 75, 7, 8, 14,
1166 15, 17, 22, 35, 37, 40, 28, 29, 31, 34, 48, 49, 52, 53, 56, 57,
1167};
1168
1169/** Token literal values. */
1170public static final String[] jjstrLiteralImages = {
1171"", null, null, null, null, null, null, null, null, null, null, null, null,
1172null, null, null, null, null, null, null, "\143\157\156\164\151\156\165\145",
1173"\166\157\154\141\164\151\154\145", "\162\145\147\151\163\164\145\162", "\165\156\163\151\147\156\145\144",
1174"\164\171\160\145\144\145\146", "\144\145\146\141\165\154\164", "\144\157\165\142\154\145",
1175"\163\151\172\145\157\146", "\163\167\151\164\143\150", "\162\145\164\165\162\156",
1176"\145\170\164\145\162\156", "\163\164\162\165\143\164", "\163\164\141\164\151\143",
1177"\163\151\147\156\145\144", "\167\150\151\154\145", "\142\162\145\141\153", "\165\156\151\157\156",
1178"\143\157\156\163\164", "\146\154\157\141\164", "\163\150\157\162\164", "\145\154\163\145",
1179"\143\141\163\145", "\154\157\156\147", "\145\156\165\155", "\141\165\164\157",
1180"\166\157\151\144", "\143\150\141\162", "\147\157\164\157", "\146\157\162", "\151\156\164",
1181"\151\146", "\144\157", null, null, null, "\50", "\51", "\73", "\52", "\54", "\56\56\56",
1182"\173", "\175", "\75", "\72", "\133", "\135", "\52\75", "\57\75", "\45\75", "\53\75",
1183"\55\75", "\74\74\75", "\76\76\75", "\46\75", "\136\75", "\174\75", "\77", "\174\174",
1184"\46\46", "\174", "\136", "\46", "\75\75", "\41\75", "\74", "\76", "\74\75", "\76\75",
1185"\74\74", "\76\76", "\53", "\55", "\57", "\45", "\53\53", "\55\55", "\176", "\41",
1186"\56", "\55\76", };
1187
1188/** Lexer state names. */
1189public static final String[] lexStateNames = {
1190 "DEFAULT",
1191 "PREPROCESSOR_OUTPUT",
1192};
1193
1194/** Lex State array. */
1195public static final int[] jjnewLexState = {
1196 -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1198 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1199 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1200 -1,
1201};
1202static final long[] jjtoToken = {
1203 0xff9ffffffffd1001L, 0x1fffffffffL,
1204};
1205static final long[] jjtoSkip = {
1206 0x1feL, 0x0L,
1207};
1208static final long[] jjtoMore = {
1209 0xe00L, 0x0L,
1210};
1211protected SimpleCharStream input_stream;
1212private final int[] jjrounds = new int[76];
1213private final int[] jjstateSet = new int[152];
1214protected char curChar;
1215/** Constructor. */
1216public CParserTokenManager(SimpleCharStream stream){
1217 if (SimpleCharStream.staticFlag)
1218 throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1219 input_stream = stream;
1220}
1221
1222/** Constructor. */
1223public CParserTokenManager(SimpleCharStream stream, int lexState){
1224 this(stream);
1225 SwitchTo(lexState);
1226}
1227
1228/** Reinitialise parser. */
1229public void ReInit(SimpleCharStream stream)
1230{
1231 jjmatchedPos = jjnewStateCnt = 0;
1232 curLexState = defaultLexState;
1233 input_stream = stream;
1234 ReInitRounds();
1235}
1236private void ReInitRounds()
1237{
1238 int i;
1239 jjround = 0x80000001;
1240 for (i = 76; i-- > 0;)
1241 jjrounds[i] = 0x80000000;
1242}
1243
1244/** Reinitialise parser. */
1245public void ReInit(SimpleCharStream stream, int lexState)
1246{
1247 ReInit(stream);
1248 SwitchTo(lexState);
1249}
1250
1251/** Switch to specified lex state. */
1252public void SwitchTo(int lexState)
1253{
1254 if (lexState >= 2 || lexState < 0)
1255 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1256 else
1257 curLexState = lexState;
1258}
1259
1260protected Token jjFillToken()
1261{
1262 final Token t;
1263 final String curTokenImage;
1264 final int beginLine;
1265 final int endLine;
1266 final int beginColumn;
1267 final int endColumn;
1268 String im = jjstrLiteralImages[jjmatchedKind];
1269 curTokenImage = (im == null) ? input_stream.GetImage() : im;
1270 beginLine = input_stream.getBeginLine();
1271 beginColumn = input_stream.getBeginColumn();
1272 endLine = input_stream.getEndLine();
1273 endColumn = input_stream.getEndColumn();
1274 t = Token.newToken(jjmatchedKind, curTokenImage);
1275
1276 t.beginLine = beginLine;
1277 t.endLine = endLine;
1278 t.beginColumn = beginColumn;
1279 t.endColumn = endColumn;
1280
1281 return t;
1282}
1283
1284int curLexState = 0;
1285int defaultLexState = 0;
1286int jjnewStateCnt;
1287int jjround;
1288int jjmatchedPos;
1289int jjmatchedKind;
1290
1291/** Get the next Token. */
1292public Token getNextToken()
1293{
1294 Token matchedToken;
1295 int curPos = 0;
1296
1297 EOFLoop :
1298 for (;;)
1299 {
1300 try
1301 {
1302 curChar = input_stream.BeginToken();
1303 }
1304 catch(java.io.IOException e)
1305 {
1306 jjmatchedKind = 0;
1307 matchedToken = jjFillToken();
1308 return matchedToken;
1309 }
1310
1311 for (;;)
1312 {
1313 switch(curLexState)
1314 {
1315 case 0:
1316 try { input_stream.backup(0);
1317 while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
1318 curChar = input_stream.BeginToken();
1319 }
1320 catch (java.io.IOException e1) { continue EOFLoop; }
1321 jjmatchedKind = 0x7fffffff;
1322 jjmatchedPos = 0;
1323 curPos = jjMoveStringLiteralDfa0_0();
1324 break;
1325 case 1:
1326 jjmatchedKind = 0x7fffffff;
1327 jjmatchedPos = 0;
1328 curPos = jjMoveStringLiteralDfa0_1();
1329 if (jjmatchedPos == 0 && jjmatchedKind > 11)
1330 {
1331 jjmatchedKind = 11;
1332 }
1333 break;
1334 }
1335 if (jjmatchedKind != 0x7fffffff)
1336 {
1337 if (jjmatchedPos + 1 < curPos)
1338 input_stream.backup(curPos - jjmatchedPos - 1);
1339 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1340 {
1341 matchedToken = jjFillToken();
1342 if (jjnewLexState[jjmatchedKind] != -1)
1343 curLexState = jjnewLexState[jjmatchedKind];
1344 return matchedToken;
1345 }
1346 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1347 {
1348 if (jjnewLexState[jjmatchedKind] != -1)
1349 curLexState = jjnewLexState[jjmatchedKind];
1350 continue EOFLoop;
1351 }
1352 if (jjnewLexState[jjmatchedKind] != -1)
1353 curLexState = jjnewLexState[jjmatchedKind];
1354 curPos = 0;
1355 jjmatchedKind = 0x7fffffff;
1356 try {
1357 curChar = input_stream.readChar();
1358 continue;
1359 }
1360 catch (java.io.IOException e1) { }
1361 }
1362 int error_line = input_stream.getEndLine();
1363 int error_column = input_stream.getEndColumn();
1364 String error_after = null;
1365 boolean EOFSeen = false;
1366 try { input_stream.readChar(); input_stream.backup(1); }
1367 catch (java.io.IOException e1) {
1368 EOFSeen = true;
1369 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1370 if (curChar == '\n' || curChar == '\r') {
1371 error_line++;
1372 error_column = 0;
1373 }
1374 else
1375 error_column++;
1376 }
1377 if (!EOFSeen) {
1378 input_stream.backup(1);
1379 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1380 }
1381 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1382 }
1383 }
1384}
1385
1386private void jjCheckNAdd(int state)
1387{
1388 if (jjrounds[state] != jjround)
1389 {
1390 jjstateSet[jjnewStateCnt++] = state;
1391 jjrounds[state] = jjround;
1392 }
1393}
1394private void jjAddStates(int start, int end)
1395{
1396 do {
1397 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
1398 } while (start++ != end);
1399}
1400private void jjCheckNAddTwoStates(int state1, int state2)
1401{
1402 jjCheckNAdd(state1);
1403 jjCheckNAdd(state2);
1404}
1405
1406private void jjCheckNAddStates(int start, int end)
1407{
1408 do {
1409 jjCheckNAdd(jjnextStates[start]);
1410 } while (start++ != end);
1411}
1412
1413}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/ExpressionDatabaseHandler.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/ExpressionDatabaseHandler.java
new file mode 100644
index 000000000..36c34d1de
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/ExpressionDatabaseHandler.java
@@ -0,0 +1,75 @@
1package org.gnunet.seaspider.parser;
2
3import java.io.File;
4
5import org.tmatesoft.sqljet.core.SqlJetException;
6import org.tmatesoft.sqljet.core.SqlJetTransactionMode;
7import org.tmatesoft.sqljet.core.table.ISqlJetTable;
8import org.tmatesoft.sqljet.core.table.SqlJetDb;
9
10public class ExpressionDatabaseHandler {
11
12 private static SqlJetDb db = null;
13
14 public static void createExpressionDatabase(String databasePath) {
15 String createTableQuery = "CREATE TABLE Expression ( expr_ID INT NOT NULL PRIMARY KEY , " +
16 "file_name TEXT NOT NULL , expr_syntax TEXT NOT NULL ," +
17 " start_lineno INT NOT NULL , end_lineno INT NOT NULL , " +
18 "scope_start_lineno INT NOT NULL , scope_end_lineno INT NOT NULL)";
19
20 File dbFile = new File(databasePath + "/GNUnetExpressions.db");
21 dbFile.delete();/* Delete it if already existent */
22
23 /* Create Expressions database */
24 try {
25 db = SqlJetDb.open(dbFile, true);
26 db.getOptions().setAutovacuum(true);
27 db.beginTransaction(SqlJetTransactionMode.WRITE);
28 try {
29 db.getOptions().setUserVersion(1);/* Sets the user's cookie */
30 } finally {
31 db.commit();
32 }
33 /* Create table Expression */
34 db.createTable(createTableQuery);
35 }
36 catch (SqlJetException e) {
37 e.printStackTrace();
38 }
39 }
40
41
42 public static void closeDatabase()
43 {
44 try {
45 db.close();
46 } catch (SqlJetException e) {
47 e.printStackTrace();
48 }
49 }
50
51
52 public static void insertIntoExpressionTable(String fileName, String expressionSyntax,
53 int startLineNo, int endLineNo, int scopeStartLineNo,
54 int scopeEndLineNo)
55 {
56 if (db == null) {
57 System.out.println("Error:Database handle is not initialized. Program will exit now!");
58 System.exit(1);
59 }
60
61 ISqlJetTable table;
62 try {
63 table = db.getTable("Expression");
64 db.beginTransaction(SqlJetTransactionMode.WRITE);
65 try {
66 table.insert(fileName, expressionSyntax, startLineNo, endLineNo, scopeStartLineNo, scopeEndLineNo);
67 } finally {
68 db.commit();
69 }
70 }
71 catch (SqlJetException e) {
72 e.printStackTrace();
73 }
74 }
75}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetDepthFirstVisitor.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetDepthFirstVisitor.java
new file mode 100644
index 000000000..17592b8a8
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetDepthFirstVisitor.java
@@ -0,0 +1,36 @@
1package org.gnunet.seaspider.parser;
2import org.gnunet.seaspider.parser.nodes.AssignmentOperator;
3import org.gnunet.seaspider.parser.nodes.CompoundStatement;
4import org.gnunet.seaspider.parser.nodes.Expression;
5import org.gnunet.seaspider.parser.nodes.NodeToken;
6import org.gnunet.seaspider.parser.visitors.DepthFirstVisitor;
7
8public class GNUnetDepthFirstVisitor extends DepthFirstVisitor {
9 private int current_endline;
10 private int blockStart;
11 private int blockEnd;
12
13 public void visit(Expression n) {
14 n.f0.accept(this);
15 }
16 public void visit(AssignmentOperator n) {
17 n.f0.accept(this);
18 }
19
20 /**
21 * <PRE>
22 * f0 -> "{"
23 * f1 -> ( LocalVariableDeclaration() | Statement() )*
24 * f2 -> "}"
25 * </PRE>
26 */
27 public void visit(CompoundStatement n) {
28 int old_ll = current_endline;
29 current_endline = n.f2.endLine;
30 System.out.println("Scope starts at line:" + n.f0.endLine + " and ends at line:" + n.f2.endLine);
31 n.f0.accept(this);
32 n.f1.accept(this);
33 n.f2.accept(this);
34 current_endline = old_ll;
35 }
36}
diff --git a/contrib/gnunet-tree-builder/GNUnetParser.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetParser.java
index d1b204c7d..d0a6a94f0 100644
--- a/contrib/gnunet-tree-builder/GNUnetParser.java
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/GNUnetParser.java
@@ -1,10 +1,11 @@
1package org.gnunet.monkey.parser; 1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. CParser.java */ 2/* Generated By:JavaCC: Do not edit this line. CParser.java */
3import java.io.File; 3import java.io.File;
4import java.io.FileFilter; 4import java.io.FileFilter;
5import java.io.FileInputStream; 5import java.io.FileInputStream;
6import java.io.FileNotFoundException; 6import java.io.FileNotFoundException;
7import org.gnunet.monkey.parser.nodes.*; 7
8import org.gnunet.seaspider.parser.nodes.*;
8 9
9public class GNUnetParser implements CParserConstants { 10public class GNUnetParser implements CParserConstants {
10 private static final boolean DEBUG = false; 11 private static final boolean DEBUG = false;
@@ -16,6 +17,13 @@ public class GNUnetParser implements CParserConstants {
16 int fileNotFoundCount = 0; 17 int fileNotFoundCount = 0;
17 int successCount = 0; 18 int successCount = 0;
18 int failureCount = 0; 19 int failureCount = 0;
20 String databasePath;
21
22 if (null == (databasePath = args[0])) {
23 System.out.println("Error: Missing Database Path argument. Program will exit now!");
24 System.exit(1);
25 }
26
19 System.out.println("C Parser Version 0.1Alpha: Reading from GNUnet source directory . . ."); 27 System.out.println("C Parser Version 0.1Alpha: Reading from GNUnet source directory . . .");
20 String gnunetSourcePath = System.getenv("MAINDIR") + "/src"; 28 String gnunetSourcePath = System.getenv("MAINDIR") + "/src";
21 29
@@ -34,6 +42,9 @@ public class GNUnetParser implements CParserConstants {
34 } 42 }
35 }; 43 };
36 44
45 /* Create the Expressions Database */
46 ExpressionDatabaseHandler.createExpressionDatabase(databasePath);
47
37 File[] dirArr = (new File(gnunetSourcePath)).listFiles(filter); 48 File[] dirArr = (new File(gnunetSourcePath)).listFiles(filter);
38 for (int i = 0; i < dirArr.length; i++) { 49 for (int i = 0; i < dirArr.length; i++) {
39 File dir = dirArr[i]; 50 File dir = dirArr[i];
@@ -52,8 +63,10 @@ public class GNUnetParser implements CParserConstants {
52 e.printStackTrace(); 63 e.printStackTrace();
53 } 64 }
54 try { 65 try {
55 parser.TranslationUnit(); 66 System.out.println("Parsing file: " + dir + "/" + fileArr[j].getName());
56 System.out.println("File " + fileArr[j].getName() + " parsed successfully."); 67 Node root = parser.TranslationUnit();
68 root.accept(new GNUnetDepthFirstVisitor());
69 System.out.println("File " + dir + "/" + fileArr[j].getName() + " parsed successfully.");
57 successCount++; 70 successCount++;
58 } 71 }
59 catch (ParseException e) { 72 catch (ParseException e) {
@@ -64,6 +77,10 @@ public class GNUnetParser implements CParserConstants {
64 } 77 }
65 } 78 }
66 } 79 }
80
81 /* We're done with the Expression Database, close it */
82 ExpressionDatabaseHandler.closeDatabase();
83
67 System.out.println(successCount + " parsed successfully."); 84 System.out.println(successCount + " parsed successfully.");
68 System.out.println("Failed to parse " + failureCount + " files."); 85 System.out.println("Failed to parse " + failureCount + " files.");
69 System.out.println(fileNotFoundCount + " files not found."); 86 System.out.println(fileNotFoundCount + " files not found.");
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/ParseException.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/ParseException.java
new file mode 100644
index 000000000..44162fe6e
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/ParseException.java
@@ -0,0 +1,186 @@
1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
3/* JavaCCOptions:KEEP_LINE_COL=null */
4/**
5 * This exception is thrown when parse errors are encountered.
6 * You can explicitly create objects of this exception type by
7 * calling the method generateParseException in the generated
8 * parser.
9 *
10 * You can modify this class to customize your error reporting
11 * mechanisms so long as you retain the public fields.
12 */
13public class ParseException extends Exception {
14
15 /**
16 * The version identifier for this Serializable class.
17 * Increment only if the <i>serialized</i> form of the
18 * class changes.
19 */
20 private static final long serialVersionUID = 1L;
21
22 /**
23 * This constructor is used by the method "generateParseException"
24 * in the generated parser. Calling this constructor generates
25 * a new object of this type with the fields "currentToken",
26 * "expectedTokenSequences", and "tokenImage" set.
27 */
28 public ParseException(Token currentTokenVal,
29 int[][] expectedTokenSequencesVal,
30 String[] tokenImageVal
31 )
32 {
33 super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
34 currentToken = currentTokenVal;
35 expectedTokenSequences = expectedTokenSequencesVal;
36 tokenImage = tokenImageVal;
37 }
38
39 /**
40 * The following constructors are for use by you for whatever
41 * purpose you can think of. Constructing the exception in this
42 * manner makes the exception behave in the normal way - i.e., as
43 * documented in the class "Throwable". The fields "errorToken",
44 * "expectedTokenSequences", and "tokenImage" do not contain
45 * relevant information. The JavaCC generated code does not use
46 * these constructors.
47 */
48
49 public ParseException() {
50 super();
51 }
52
53 /** Constructor with message. */
54 public ParseException(String message) {
55 super(message);
56 }
57
58
59 /**
60 * This is the last token that has been consumed successfully. If
61 * this object has been created due to a parse error, the token
62 * followng this token will (therefore) be the first error token.
63 */
64 public Token currentToken;
65
66 /**
67 * Each entry in this array is an array of integers. Each array
68 * of integers represents a sequence of tokens (by their ordinal
69 * values) that is expected at this point of the parse.
70 */
71 public int[][] expectedTokenSequences;
72
73 /**
74 * This is a reference to the "tokenImage" array of the generated
75 * parser within which the parse error occurred. This array is
76 * defined in the generated ...Constants interface.
77 */
78 public String[] tokenImage;
79
80 /**
81 * It uses "currentToken" and "expectedTokenSequences" to generate a parse
82 * error message and returns it. If this object has been created
83 * due to a parse error, and you do not catch it (it gets thrown
84 * from the parser) the correct error message
85 * gets displayed.
86 */
87 private static String initialise(Token currentToken,
88 int[][] expectedTokenSequences,
89 String[] tokenImage) {
90 String eol = System.getProperty("line.separator", "\n");
91 StringBuffer expected = new StringBuffer();
92 int maxSize = 0;
93 for (int i = 0; i < expectedTokenSequences.length; i++) {
94 if (maxSize < expectedTokenSequences[i].length) {
95 maxSize = expectedTokenSequences[i].length;
96 }
97 for (int j = 0; j < expectedTokenSequences[i].length; j++) {
98 expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
99 }
100 if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
101 expected.append("...");
102 }
103 expected.append(eol).append(" ");
104 }
105 String retval = "Encountered \"";
106 Token tok = currentToken.next;
107 for (int i = 0; i < maxSize; i++) {
108 if (i != 0) retval += " ";
109 if (tok.kind == 0) {
110 retval += tokenImage[0];
111 break;
112 }
113 retval += " " + tokenImage[tok.kind];
114 retval += " \"";
115 retval += add_escapes(tok.image);
116 retval += " \"";
117 tok = tok.next;
118 }
119 retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
120 retval += "." + eol;
121 if (expectedTokenSequences.length == 1) {
122 retval += "Was expecting:" + eol + " ";
123 } else {
124 retval += "Was expecting one of:" + eol + " ";
125 }
126 retval += expected.toString();
127 return retval;
128 }
129
130 /**
131 * The end of line string for this machine.
132 */
133 protected String eol = System.getProperty("line.separator", "\n");
134
135 /**
136 * Used to convert raw characters to their escaped version
137 * when these raw version cannot be used as part of an ASCII
138 * string literal.
139 */
140 static String add_escapes(String str) {
141 StringBuffer retval = new StringBuffer();
142 char ch;
143 for (int i = 0; i < str.length(); i++) {
144 switch (str.charAt(i))
145 {
146 case 0 :
147 continue;
148 case '\b':
149 retval.append("\\b");
150 continue;
151 case '\t':
152 retval.append("\\t");
153 continue;
154 case '\n':
155 retval.append("\\n");
156 continue;
157 case '\f':
158 retval.append("\\f");
159 continue;
160 case '\r':
161 retval.append("\\r");
162 continue;
163 case '\"':
164 retval.append("\\\"");
165 continue;
166 case '\'':
167 retval.append("\\\'");
168 continue;
169 case '\\':
170 retval.append("\\\\");
171 continue;
172 default:
173 if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
174 String s = "0000" + Integer.toString(ch, 16);
175 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
176 } else {
177 retval.append(ch);
178 }
179 continue;
180 }
181 }
182 return retval.toString();
183 }
184
185}
186/* JavaCC - OriginalChecksum=c5a983a229aa877dc2b3b3b9933cdd6b (do not edit this line) */
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/SimpleCharStream.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/SimpleCharStream.java
new file mode 100644
index 000000000..8f115d519
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/SimpleCharStream.java
@@ -0,0 +1,470 @@
1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */
3/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
4/**
5 * An implementation of interface CharStream, where the stream is assumed to
6 * contain only ASCII characters (without unicode processing).
7 */
8
9public class SimpleCharStream
10{
11/** Whether parser is static. */
12 public static final boolean staticFlag = false;
13 int bufsize;
14 int available;
15 int tokenBegin;
16/** Position in buffer. */
17 public int bufpos = -1;
18 protected int bufline[];
19 protected int bufcolumn[];
20
21 protected int column = 0;
22 protected int line = 1;
23
24 protected boolean prevCharIsCR = false;
25 protected boolean prevCharIsLF = false;
26
27 protected java.io.Reader inputStream;
28
29 protected char[] buffer;
30 protected int maxNextCharInd = 0;
31 protected int inBuf = 0;
32 protected int tabSize = 8;
33
34 protected void setTabSize(int i) { tabSize = i; }
35 protected int getTabSize(int i) { return tabSize; }
36
37
38 protected void ExpandBuff(boolean wrapAround)
39 {
40 char[] newbuffer = new char[bufsize + 2048];
41 int newbufline[] = new int[bufsize + 2048];
42 int newbufcolumn[] = new int[bufsize + 2048];
43
44 try
45 {
46 if (wrapAround)
47 {
48 System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
49 System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
50 buffer = newbuffer;
51
52 System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
53 System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
54 bufline = newbufline;
55
56 System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
57 System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
58 bufcolumn = newbufcolumn;
59
60 maxNextCharInd = (bufpos += (bufsize - tokenBegin));
61 }
62 else
63 {
64 System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
65 buffer = newbuffer;
66
67 System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
68 bufline = newbufline;
69
70 System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
71 bufcolumn = newbufcolumn;
72
73 maxNextCharInd = (bufpos -= tokenBegin);
74 }
75 }
76 catch (Throwable t)
77 {
78 throw new Error(t.getMessage());
79 }
80
81
82 bufsize += 2048;
83 available = bufsize;
84 tokenBegin = 0;
85 }
86
87 protected void FillBuff() throws java.io.IOException
88 {
89 if (maxNextCharInd == available)
90 {
91 if (available == bufsize)
92 {
93 if (tokenBegin > 2048)
94 {
95 bufpos = maxNextCharInd = 0;
96 available = tokenBegin;
97 }
98 else if (tokenBegin < 0)
99 bufpos = maxNextCharInd = 0;
100 else
101 ExpandBuff(false);
102 }
103 else if (available > tokenBegin)
104 available = bufsize;
105 else if ((tokenBegin - available) < 2048)
106 ExpandBuff(true);
107 else
108 available = tokenBegin;
109 }
110
111 int i;
112 try {
113 if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1)
114 {
115 inputStream.close();
116 throw new java.io.IOException();
117 }
118 else
119 maxNextCharInd += i;
120 return;
121 }
122 catch(java.io.IOException e) {
123 --bufpos;
124 backup(0);
125 if (tokenBegin == -1)
126 tokenBegin = bufpos;
127 throw e;
128 }
129 }
130
131/** Start. */
132 public char BeginToken() throws java.io.IOException
133 {
134 tokenBegin = -1;
135 char c = readChar();
136 tokenBegin = bufpos;
137
138 return c;
139 }
140
141 protected void UpdateLineColumn(char c)
142 {
143 column++;
144
145 if (prevCharIsLF)
146 {
147 prevCharIsLF = false;
148 line += (column = 1);
149 }
150 else if (prevCharIsCR)
151 {
152 prevCharIsCR = false;
153 if (c == '\n')
154 {
155 prevCharIsLF = true;
156 }
157 else
158 line += (column = 1);
159 }
160
161 switch (c)
162 {
163 case '\r' :
164 prevCharIsCR = true;
165 break;
166 case '\n' :
167 prevCharIsLF = true;
168 break;
169 case '\t' :
170 column--;
171 column += (tabSize - (column % tabSize));
172 break;
173 default :
174 break;
175 }
176
177 bufline[bufpos] = line;
178 bufcolumn[bufpos] = column;
179 }
180
181/** Read a character. */
182 public char readChar() throws java.io.IOException
183 {
184 if (inBuf > 0)
185 {
186 --inBuf;
187
188 if (++bufpos == bufsize)
189 bufpos = 0;
190
191 return buffer[bufpos];
192 }
193
194 if (++bufpos >= maxNextCharInd)
195 FillBuff();
196
197 char c = buffer[bufpos];
198
199 UpdateLineColumn(c);
200 return c;
201 }
202
203 @Deprecated
204 /**
205 * @deprecated
206 * @see #getEndColumn
207 */
208
209 public int getColumn() {
210 return bufcolumn[bufpos];
211 }
212
213 @Deprecated
214 /**
215 * @deprecated
216 * @see #getEndLine
217 */
218
219 public int getLine() {
220 return bufline[bufpos];
221 }
222
223 /** Get token end column number. */
224 public int getEndColumn() {
225 return bufcolumn[bufpos];
226 }
227
228 /** Get token end line number. */
229 public int getEndLine() {
230 return bufline[bufpos];
231 }
232
233 /** Get token beginning column number. */
234 public int getBeginColumn() {
235 return bufcolumn[tokenBegin];
236 }
237
238 /** Get token beginning line number. */
239 public int getBeginLine() {
240 return bufline[tokenBegin];
241 }
242
243/** Backup a number of characters. */
244 public void backup(int amount) {
245
246 inBuf += amount;
247 if ((bufpos -= amount) < 0)
248 bufpos += bufsize;
249 }
250
251 /** Constructor. */
252 public SimpleCharStream(java.io.Reader dstream, int startline,
253 int startcolumn, int buffersize)
254 {
255 inputStream = dstream;
256 line = startline;
257 column = startcolumn - 1;
258
259 available = bufsize = buffersize;
260 buffer = new char[buffersize];
261 bufline = new int[buffersize];
262 bufcolumn = new int[buffersize];
263 }
264
265 /** Constructor. */
266 public SimpleCharStream(java.io.Reader dstream, int startline,
267 int startcolumn)
268 {
269 this(dstream, startline, startcolumn, 4096);
270 }
271
272 /** Constructor. */
273 public SimpleCharStream(java.io.Reader dstream)
274 {
275 this(dstream, 1, 1, 4096);
276 }
277
278 /** Reinitialise. */
279 public void ReInit(java.io.Reader dstream, int startline,
280 int startcolumn, int buffersize)
281 {
282 inputStream = dstream;
283 line = startline;
284 column = startcolumn - 1;
285
286 if (buffer == null || buffersize != buffer.length)
287 {
288 available = bufsize = buffersize;
289 buffer = new char[buffersize];
290 bufline = new int[buffersize];
291 bufcolumn = new int[buffersize];
292 }
293 prevCharIsLF = prevCharIsCR = false;
294 tokenBegin = inBuf = maxNextCharInd = 0;
295 bufpos = -1;
296 }
297
298 /** Reinitialise. */
299 public void ReInit(java.io.Reader dstream, int startline,
300 int startcolumn)
301 {
302 ReInit(dstream, startline, startcolumn, 4096);
303 }
304
305 /** Reinitialise. */
306 public void ReInit(java.io.Reader dstream)
307 {
308 ReInit(dstream, 1, 1, 4096);
309 }
310 /** Constructor. */
311 public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
312 int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
313 {
314 this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
315 }
316
317 /** Constructor. */
318 public SimpleCharStream(java.io.InputStream dstream, int startline,
319 int startcolumn, int buffersize)
320 {
321 this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
322 }
323
324 /** Constructor. */
325 public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
326 int startcolumn) throws java.io.UnsupportedEncodingException
327 {
328 this(dstream, encoding, startline, startcolumn, 4096);
329 }
330
331 /** Constructor. */
332 public SimpleCharStream(java.io.InputStream dstream, int startline,
333 int startcolumn)
334 {
335 this(dstream, startline, startcolumn, 4096);
336 }
337
338 /** Constructor. */
339 public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
340 {
341 this(dstream, encoding, 1, 1, 4096);
342 }
343
344 /** Constructor. */
345 public SimpleCharStream(java.io.InputStream dstream)
346 {
347 this(dstream, 1, 1, 4096);
348 }
349
350 /** Reinitialise. */
351 public void ReInit(java.io.InputStream dstream, String encoding, int startline,
352 int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
353 {
354 ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
355 }
356
357 /** Reinitialise. */
358 public void ReInit(java.io.InputStream dstream, int startline,
359 int startcolumn, int buffersize)
360 {
361 ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
362 }
363
364 /** Reinitialise. */
365 public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
366 {
367 ReInit(dstream, encoding, 1, 1, 4096);
368 }
369
370 /** Reinitialise. */
371 public void ReInit(java.io.InputStream dstream)
372 {
373 ReInit(dstream, 1, 1, 4096);
374 }
375 /** Reinitialise. */
376 public void ReInit(java.io.InputStream dstream, String encoding, int startline,
377 int startcolumn) throws java.io.UnsupportedEncodingException
378 {
379 ReInit(dstream, encoding, startline, startcolumn, 4096);
380 }
381 /** Reinitialise. */
382 public void ReInit(java.io.InputStream dstream, int startline,
383 int startcolumn)
384 {
385 ReInit(dstream, startline, startcolumn, 4096);
386 }
387 /** Get token literal value. */
388 public String GetImage()
389 {
390 if (bufpos >= tokenBegin)
391 return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
392 else
393 return new String(buffer, tokenBegin, bufsize - tokenBegin) +
394 new String(buffer, 0, bufpos + 1);
395 }
396
397 /** Get the suffix. */
398 public char[] GetSuffix(int len)
399 {
400 char[] ret = new char[len];
401
402 if ((bufpos + 1) >= len)
403 System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
404 else
405 {
406 System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
407 len - bufpos - 1);
408 System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
409 }
410
411 return ret;
412 }
413
414 /** Reset buffer when finished. */
415 public void Done()
416 {
417 buffer = null;
418 bufline = null;
419 bufcolumn = null;
420 }
421
422 /**
423 * Method to adjust line and column numbers for the start of a token.
424 */
425 public void adjustBeginLineColumn(int newLine, int newCol)
426 {
427 int start = tokenBegin;
428 int len;
429
430 if (bufpos >= tokenBegin)
431 {
432 len = bufpos - tokenBegin + inBuf + 1;
433 }
434 else
435 {
436 len = bufsize - tokenBegin + bufpos + 1 + inBuf;
437 }
438
439 int i = 0, j = 0, k = 0;
440 int nextColDiff = 0, columnDiff = 0;
441
442 while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
443 {
444 bufline[j] = newLine;
445 nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
446 bufcolumn[j] = newCol + columnDiff;
447 columnDiff = nextColDiff;
448 i++;
449 }
450
451 if (i < len)
452 {
453 bufline[j] = newLine++;
454 bufcolumn[j] = newCol + columnDiff;
455
456 while (i++ < len)
457 {
458 if (bufline[j = start % bufsize] != bufline[++start % bufsize])
459 bufline[j] = newLine++;
460 else
461 bufline[j] = newLine;
462 }
463 }
464
465 line = bufline[j];
466 column = bufcolumn[j];
467 }
468
469}
470/* JavaCC - OriginalChecksum=b0bce35239226f00f9dd0fa14ab3ad17 (do not edit this line) */
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/Token.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/Token.java
new file mode 100644
index 000000000..468572c5b
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/Token.java
@@ -0,0 +1,130 @@
1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
3/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
4/**
5 * Describes the input token stream.
6 */
7
8public class Token implements java.io.Serializable {
9
10 /**
11 * The version identifier for this Serializable class.
12 * Increment only if the <i>serialized</i> form of the
13 * class changes.
14 */
15 private static final long serialVersionUID = 1L;
16
17 /**
18 * An integer that describes the kind of this token. This numbering
19 * system is determined by JavaCCParser, and a table of these numbers is
20 * stored in the file ...Constants.java.
21 */
22 public int kind;
23
24 /** The line number of the first character of this Token. */
25 public int beginLine;
26 /** The column number of the first character of this Token. */
27 public int beginColumn;
28 /** The line number of the last character of this Token. */
29 public int endLine;
30 /** The column number of the last character of this Token. */
31 public int endColumn;
32
33 /**
34 * The string image of the token.
35 */
36 public String image;
37
38 /**
39 * A reference to the next regular (non-special) token from the input
40 * stream. If this is the last token from the input stream, or if the
41 * token manager has not read tokens beyond this one, this field is
42 * set to null. This is true only if this token is also a regular
43 * token. Otherwise, see below for a description of the contents of
44 * this field.
45 */
46 public Token next;
47
48 /**
49 * This field is used to access special tokens that occur prior to this
50 * token, but after the immediately preceding regular (non-special) token.
51 * If there are no such special tokens, this field is set to null.
52 * When there are more than one such special token, this field refers
53 * to the last of these special tokens, which in turn refers to the next
54 * previous special token through its specialToken field, and so on
55 * until the first special token (whose specialToken field is null).
56 * The next fields of special tokens refer to other special tokens that
57 * immediately follow it (without an intervening regular token). If there
58 * is no such token, this field is null.
59 */
60 public Token specialToken;
61
62 /**
63 * An optional attribute value of the Token.
64 * Tokens which are not used as syntactic sugar will often contain
65 * meaningful values that will be used later on by the compiler or
66 * interpreter. This attribute value is often different from the image.
67 * Any subclass of Token that actually wants to return a non-null value can
68 * override this method as appropriate.
69 */
70 public Object getValue() {
71 return null;
72 }
73
74 /**
75 * No-argument constructor
76 */
77 public Token() {}
78
79 /**
80 * Constructs a new token for the specified Image.
81 */
82 public Token(int kind)
83 {
84 this(kind, null);
85 }
86
87 /**
88 * Constructs a new token for the specified Image and Kind.
89 */
90 public Token(int kind, String image)
91 {
92 this.kind = kind;
93 this.image = image;
94 }
95
96 /**
97 * Returns the image.
98 */
99 public String toString()
100 {
101 return image;
102 }
103
104 /**
105 * Returns a new Token object, by default. However, if you want, you
106 * can create and return subclass objects based on the value of ofKind.
107 * Simply add the cases to the switch for all those special cases.
108 * For example, if you have a subclass of Token called IDToken that
109 * you want to create if ofKind is ID, simply add something like :
110 *
111 * case MyParserConstants.ID : return new IDToken(ofKind, image);
112 *
113 * to the following switch statement. Then you can cast matchedToken
114 * variable to the appropriate type and use sit in your lexical actions.
115 */
116 public static Token newToken(int ofKind, String image)
117 {
118 switch(ofKind)
119 {
120 default : return new Token(ofKind, image);
121 }
122 }
123
124 public static Token newToken(int ofKind)
125 {
126 return newToken(ofKind, null);
127 }
128
129}
130/* JavaCC - OriginalChecksum=6145f5d5b504ccb4f95e09f2ce3e748a (do not edit this line) */
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/TokenMgrError.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/TokenMgrError.java
new file mode 100644
index 000000000..3e46dcfc5
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/TokenMgrError.java
@@ -0,0 +1,146 @@
1package org.gnunet.seaspider.parser;
2/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
3/* JavaCCOptions: */
4/** Token Manager Error. */
5public class TokenMgrError extends Error
6{
7
8 /**
9 * The version identifier for this Serializable class.
10 * Increment only if the <i>serialized</i> form of the
11 * class changes.
12 */
13 private static final long serialVersionUID = 1L;
14
15 /*
16 * Ordinals for various reasons why an Error of this type can be thrown.
17 */
18
19 /**
20 * Lexical error occurred.
21 */
22 static final int LEXICAL_ERROR = 0;
23
24 /**
25 * An attempt was made to create a second instance of a static token manager.
26 */
27 static final int STATIC_LEXER_ERROR = 1;
28
29 /**
30 * Tried to change to an invalid lexical state.
31 */
32 static final int INVALID_LEXICAL_STATE = 2;
33
34 /**
35 * Detected (and bailed out of) an infinite loop in the token manager.
36 */
37 static final int LOOP_DETECTED = 3;
38
39 /**
40 * Indicates the reason why the exception is thrown. It will have
41 * one of the above 4 values.
42 */
43 int errorCode;
44
45 /**
46 * Replaces unprintable characters by their escaped (or unicode escaped)
47 * equivalents in the given string
48 */
49 protected static final String addEscapes(String str) {
50 StringBuffer retval = new StringBuffer();
51 char ch;
52 for (int i = 0; i < str.length(); i++) {
53 switch (str.charAt(i))
54 {
55 case 0 :
56 continue;
57 case '\b':
58 retval.append("\\b");
59 continue;
60 case '\t':
61 retval.append("\\t");
62 continue;
63 case '\n':
64 retval.append("\\n");
65 continue;
66 case '\f':
67 retval.append("\\f");
68 continue;
69 case '\r':
70 retval.append("\\r");
71 continue;
72 case '\"':
73 retval.append("\\\"");
74 continue;
75 case '\'':
76 retval.append("\\\'");
77 continue;
78 case '\\':
79 retval.append("\\\\");
80 continue;
81 default:
82 if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
83 String s = "0000" + Integer.toString(ch, 16);
84 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
85 } else {
86 retval.append(ch);
87 }
88 continue;
89 }
90 }
91 return retval.toString();
92 }
93
94 /**
95 * Returns a detailed message for the Error when it is thrown by the
96 * token manager to indicate a lexical error.
97 * Parameters :
98 * EOFSeen : indicates if EOF caused the lexical error
99 * curLexState : lexical state in which this error occurred
100 * errorLine : line number when the error occurred
101 * errorColumn : column number when the error occurred
102 * errorAfter : prefix that was seen before this error occurred
103 * curchar : the offending character
104 * Note: You can customize the lexical error message by modifying this method.
105 */
106 protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
107 return("Lexical error at line " +
108 errorLine + ", column " +
109 errorColumn + ". Encountered: " +
110 (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
111 "after : \"" + addEscapes(errorAfter) + "\"");
112 }
113
114 /**
115 * You can also modify the body of this method to customize your error messages.
116 * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
117 * of end-users concern, so you can return something like :
118 *
119 * "Internal Error : Please file a bug report .... "
120 *
121 * from this method for such cases in the release version of your parser.
122 */
123 public String getMessage() {
124 return super.getMessage();
125 }
126
127 /*
128 * Constructors of various flavors follow.
129 */
130
131 /** No arg constructor. */
132 public TokenMgrError() {
133 }
134
135 /** Constructor with message and reason. */
136 public TokenMgrError(String message, int reason) {
137 super(message);
138 errorCode = reason;
139 }
140
141 /** Full Constructor. */
142 public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
143 this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
144 }
145}
146/* JavaCC - OriginalChecksum=3f827858bf5c87e5502cccca67d9b325 (do not edit this line) */
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ANDExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ANDExpression.java
new file mode 100644
index 000000000..8ced2c188
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ANDExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> EqualityExpression()
11 * f1 -> [ "&" ANDExpression() ]
12 * </PRE>
13 */
14public class ANDExpression implements Node {
15 public EqualityExpression f0;
16 public NodeOptional f1;
17
18 public ANDExpression(EqualityExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AdditiveExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AdditiveExpression.java
new file mode 100644
index 000000000..f0c2f33ab
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AdditiveExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> MultiplicativeExpression()
11 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
12 * </PRE>
13 */
14public class AdditiveExpression implements Node {
15 public MultiplicativeExpression f0;
16 public NodeOptional f1;
17
18 public AdditiveExpression(MultiplicativeExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ArgumentExpressionList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ArgumentExpressionList.java
new file mode 100644
index 000000000..0d93ab689
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ArgumentExpressionList.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> AssignmentOrTypeExpression()
11 * f1 -> ( "," AssignmentOrTypeExpression() )*
12 * </PRE>
13 */
14public class ArgumentExpressionList implements Node {
15 public AssignmentOrTypeExpression f0;
16 public NodeListOptional f1;
17
18 public ArgumentExpressionList(AssignmentOrTypeExpression n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Array.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Array.java
new file mode 100644
index 000000000..2d2798d7b
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Array.java
@@ -0,0 +1,45 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> "["
11 * f1 -> [ ConstantExpression() ]
12 * f2 -> "]"
13 * </PRE>
14 */
15public class Array implements Node {
16 public NodeToken f0;
17 public NodeOptional f1;
18 public NodeToken f2;
19
20 public Array(NodeToken n0, NodeOptional n1, NodeToken n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public Array(NodeOptional n0) {
27 f0 = new NodeToken("[");
28 f1 = n0;
29 f2 = new NodeToken("]");
30 }
31
32 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
33 v.visit(this);
34 }
35 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
36 return v.visit(this,argu);
37 }
38 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
39 return v.visit(this);
40 }
41 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
42 v.visit(this,argu);
43 }
44}
45
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentExpression.java
new file mode 100644
index 000000000..1dc2606df
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentExpression.java
@@ -0,0 +1,34 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
11 * | ConditionalExpression()
12 * </PRE>
13 */
14public class AssignmentExpression implements Node {
15 public NodeChoice f0;
16
17 public AssignmentExpression(NodeChoice n0) {
18 f0 = n0;
19 }
20
21 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
22 v.visit(this);
23 }
24 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
25 return v.visit(this,argu);
26 }
27 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
28 return v.visit(this);
29 }
30 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
31 v.visit(this,argu);
32 }
33}
34
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOperator.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOperator.java
new file mode 100644
index 000000000..76b5bfb12
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOperator.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
11 * </PRE>
12 */
13public class AssignmentOperator implements Node {
14 public NodeChoice f0;
15
16 public AssignmentOperator(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOrTypeExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOrTypeExpression.java
new file mode 100644
index 000000000..2d118d221
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/AssignmentOrTypeExpression.java
@@ -0,0 +1,34 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> NoIdentifierTypeSpecifier()
11 * | AssignmentExpression()
12 * </PRE>
13 */
14public class AssignmentOrTypeExpression implements Node {
15 public NodeChoice f0;
16
17 public AssignmentOrTypeExpression(NodeChoice n0) {
18 f0 = n0;
19 }
20
21 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
22 v.visit(this);
23 }
24 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
25 return v.visit(this,argu);
26 }
27 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
28 return v.visit(this);
29 }
30 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
31 v.visit(this,argu);
32 }
33}
34
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CastExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CastExpression.java
new file mode 100644
index 000000000..8a420c55f
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CastExpression.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
11 * </PRE>
12 */
13public class CastExpression implements Node {
14 public NodeChoice f0;
15
16 public CastExpression(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CompoundStatement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CompoundStatement.java
new file mode 100644
index 000000000..18e7e6d8a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/CompoundStatement.java
@@ -0,0 +1,45 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> "{"
11 * f1 -> ( LocalVariableDeclaration() | Statement() )*
12 * f2 -> "}"
13 * </PRE>
14 */
15public class CompoundStatement implements Node {
16 public NodeToken f0;
17 public NodeListOptional f1;
18 public NodeToken f2;
19
20 public CompoundStatement(NodeToken n0, NodeListOptional n1, NodeToken n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public CompoundStatement(NodeListOptional n0) {
27 f0 = new NodeToken("{");
28 f1 = n0;
29 f2 = new NodeToken("}");
30 }
31
32 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
33 v.visit(this);
34 }
35 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
36 return v.visit(this,argu);
37 }
38 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
39 return v.visit(this);
40 }
41 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
42 v.visit(this,argu);
43 }
44}
45
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConditionalExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConditionalExpression.java
new file mode 100644
index 000000000..404ec903a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConditionalExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> LogicalORExpression()
11 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
12 * </PRE>
13 */
14public class ConditionalExpression implements Node {
15 public LogicalORExpression f0;
16 public NodeOptional f1;
17
18 public ConditionalExpression(LogicalORExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Constant.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Constant.java
new file mode 100644
index 000000000..6ccd64ae4
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Constant.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;INTEGER_LITERAL&gt;
11 * | &lt;FLOATING_POINT_LITERAL&gt;
12 * | &lt;CHARACTER_LITERAL&gt;
13 * | &lt;STRING_LITERAL&gt;
14 * </PRE>
15 */
16public class Constant implements Node {
17 public NodeChoice f0;
18
19 public Constant(NodeChoice n0) {
20 f0 = n0;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConstantExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConstantExpression.java
new file mode 100644
index 000000000..e1024c4ad
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ConstantExpression.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ConditionalExpression()
11 * </PRE>
12 */
13public class ConstantExpression implements Node {
14 public ConditionalExpression f0;
15
16 public ConstantExpression(ConditionalExpression n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/DataType.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/DataType.java
new file mode 100644
index 000000000..e99a46a9c
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/DataType.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> StructOrUnionSpecifier()
11 * f1 -> &lt;IDENTIFIER&gt;
12 * </PRE>
13 */
14public class DataType implements Node {
15 public StructOrUnionSpecifier f0;
16 public NodeToken f1;
17
18 public DataType(StructOrUnionSpecifier n0, NodeToken n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumSpecifier.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumSpecifier.java
new file mode 100644
index 000000000..5bb08faca
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumSpecifier.java
@@ -0,0 +1,41 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;ENUM&gt;
11 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
12 * </PRE>
13 */
14public class EnumSpecifier implements Node {
15 public NodeToken f0;
16 public NodeChoice f1;
17
18 public EnumSpecifier(NodeToken n0, NodeChoice n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public EnumSpecifier(NodeChoice n0) {
24 f0 = new NodeToken("enum");
25 f1 = n0;
26 }
27
28 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
29 v.visit(this);
30 }
31 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
32 return v.visit(this,argu);
33 }
34 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
35 return v.visit(this);
36 }
37 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
38 v.visit(this,argu);
39 }
40}
41
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Enumerator.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Enumerator.java
new file mode 100644
index 000000000..305cf697a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Enumerator.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;IDENTIFIER&gt;
11 * f1 -> [ "=" ConstantExpression() ]
12 * </PRE>
13 */
14public class Enumerator implements Node {
15 public NodeToken f0;
16 public NodeOptional f1;
17
18 public Enumerator(NodeToken n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumeratorList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumeratorList.java
new file mode 100644
index 000000000..ba72c0668
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EnumeratorList.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> Enumerator()
11 * f1 -> ( "," Enumerator() )*
12 * </PRE>
13 */
14public class EnumeratorList implements Node {
15 public Enumerator f0;
16 public NodeListOptional f1;
17
18 public EnumeratorList(Enumerator n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EqualityExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EqualityExpression.java
new file mode 100644
index 000000000..44157bb00
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/EqualityExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> RelationalExpression()
11 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
12 * </PRE>
13 */
14public class EqualityExpression implements Node {
15 public RelationalExpression f0;
16 public NodeOptional f1;
17
18 public EqualityExpression(RelationalExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExclusiveORExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExclusiveORExpression.java
new file mode 100644
index 000000000..d80f4099a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExclusiveORExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ANDExpression()
11 * f1 -> [ "^" ExclusiveORExpression() ]
12 * </PRE>
13 */
14public class ExclusiveORExpression implements Node {
15 public ANDExpression f0;
16 public NodeOptional f1;
17
18 public ExclusiveORExpression(ANDExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Expression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Expression.java
new file mode 100644
index 000000000..e8f021a7d
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Expression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> AssignmentExpression()
11 * f1 -> ( "," AssignmentExpression() )*
12 * </PRE>
13 */
14public class Expression implements Node {
15 public AssignmentExpression f0;
16 public NodeListOptional f1;
17
18 public Expression(AssignmentExpression n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExpressionStatement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExpressionStatement.java
new file mode 100644
index 000000000..d6f23828d
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExpressionStatement.java
@@ -0,0 +1,41 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> [ Expression() ]
11 * f1 -> ";"
12 * </PRE>
13 */
14public class ExpressionStatement implements Node {
15 public NodeOptional f0;
16 public NodeToken f1;
17
18 public ExpressionStatement(NodeOptional n0, NodeToken n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public ExpressionStatement(NodeOptional n0) {
24 f0 = n0;
25 f1 = new NodeToken(";");
26 }
27
28 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
29 v.visit(this);
30 }
31 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
32 return v.visit(this,argu);
33 }
34 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
35 return v.visit(this);
36 }
37 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
38 v.visit(this,argu);
39 }
40}
41
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExternalDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExternalDeclaration.java
new file mode 100644
index 000000000..9d359285d
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ExternalDeclaration.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( StorageClassSpecifier() )*
11 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
12 * </PRE>
13 */
14public class ExternalDeclaration implements Node {
15 public NodeListOptional f0;
16 public NodeChoice f1;
17
18 public ExternalDeclaration(NodeListOptional n0, NodeChoice n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionDeclaration.java
new file mode 100644
index 000000000..54da9f7ed
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionDeclaration.java
@@ -0,0 +1,57 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> TypeSpecifier()
11 * f1 -> &lt;IDENTIFIER&gt;
12 * f2 -> "("
13 * f3 -> [ ParameterList() ]
14 * f4 -> ")"
15 * f5 -> ( ";" | CompoundStatement() )
16 * </PRE>
17 */
18public class FunctionDeclaration implements Node {
19 public TypeSpecifier f0;
20 public NodeToken f1;
21 public NodeToken f2;
22 public NodeOptional f3;
23 public NodeToken f4;
24 public NodeChoice f5;
25
26 public FunctionDeclaration(TypeSpecifier n0, NodeToken n1, NodeToken n2, NodeOptional n3, NodeToken n4, NodeChoice n5) {
27 f0 = n0;
28 f1 = n1;
29 f2 = n2;
30 f3 = n3;
31 f4 = n4;
32 f5 = n5;
33 }
34
35 public FunctionDeclaration(TypeSpecifier n0, NodeToken n1, NodeOptional n2, NodeChoice n3) {
36 f0 = n0;
37 f1 = n1;
38 f2 = new NodeToken("(");
39 f3 = n2;
40 f4 = new NodeToken(")");
41 f5 = n3;
42 }
43
44 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
45 v.visit(this);
46 }
47 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
48 return v.visit(this,argu);
49 }
50 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
51 return v.visit(this);
52 }
53 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
54 v.visit(this,argu);
55 }
56}
57
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionType.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionType.java
new file mode 100644
index 000000000..263e73e2f
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/FunctionType.java
@@ -0,0 +1,65 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> TypeSpecifier()
11 * f1 -> "("
12 * f2 -> "*"
13 * f3 -> &lt;IDENTIFIER&gt;
14 * f4 -> ")"
15 * f5 -> "("
16 * f6 -> [ ParameterList() ]
17 * f7 -> ")"
18 * </PRE>
19 */
20public class FunctionType implements Node {
21 public TypeSpecifier f0;
22 public NodeToken f1;
23 public NodeToken f2;
24 public NodeToken f3;
25 public NodeToken f4;
26 public NodeToken f5;
27 public NodeOptional f6;
28 public NodeToken f7;
29
30 public FunctionType(TypeSpecifier n0, NodeToken n1, NodeToken n2, NodeToken n3, NodeToken n4, NodeToken n5, NodeOptional n6, NodeToken n7) {
31 f0 = n0;
32 f1 = n1;
33 f2 = n2;
34 f3 = n3;
35 f4 = n4;
36 f5 = n5;
37 f6 = n6;
38 f7 = n7;
39 }
40
41 public FunctionType(TypeSpecifier n0, NodeToken n1, NodeOptional n2) {
42 f0 = n0;
43 f1 = new NodeToken("(");
44 f2 = new NodeToken("*");
45 f3 = n1;
46 f4 = new NodeToken(")");
47 f5 = new NodeToken("(");
48 f6 = n2;
49 f7 = new NodeToken(")");
50 }
51
52 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
53 v.visit(this);
54 }
55 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
56 return v.visit(this,argu);
57 }
58 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
59 return v.visit(this);
60 }
61 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
62 v.visit(this,argu);
63 }
64}
65
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IdentifierList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IdentifierList.java
new file mode 100644
index 000000000..7df6de807
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IdentifierList.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;IDENTIFIER&gt;
11 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
12 * </PRE>
13 */
14public class IdentifierList implements Node {
15 public NodeToken f0;
16 public NodeListOptional f1;
17
18 public IdentifierList(NodeToken n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InclusiveORExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InclusiveORExpression.java
new file mode 100644
index 000000000..9d972377d
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InclusiveORExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ExclusiveORExpression()
11 * f1 -> [ "|" InclusiveORExpression() ]
12 * </PRE>
13 */
14public class InclusiveORExpression implements Node {
15 public ExclusiveORExpression f0;
16 public NodeOptional f1;
17
18 public InclusiveORExpression(ExclusiveORExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclarator.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclarator.java
new file mode 100644
index 000000000..27cd735fa
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclarator.java
@@ -0,0 +1,39 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;IDENTIFIER&gt;
11 * f1 -> [ Array() ]
12 * f2 -> [ "=" Initializer() ]
13 * </PRE>
14 */
15public class InitDeclarator implements Node {
16 public NodeToken f0;
17 public NodeOptional f1;
18 public NodeOptional f2;
19
20 public InitDeclarator(NodeToken n0, NodeOptional n1, NodeOptional n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
27 v.visit(this);
28 }
29 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
30 return v.visit(this,argu);
31 }
32 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
33 return v.visit(this);
34 }
35 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
36 v.visit(this,argu);
37 }
38}
39
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclaratorList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclaratorList.java
new file mode 100644
index 000000000..0323a1826
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitDeclaratorList.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> InitDeclarator()
11 * f1 -> ( "," InitDeclarator() )*
12 * </PRE>
13 */
14public class InitDeclaratorList implements Node {
15 public InitDeclarator f0;
16 public NodeListOptional f1;
17
18 public InitDeclaratorList(InitDeclarator n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Initializer.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Initializer.java
new file mode 100644
index 000000000..e7e03b967
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Initializer.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
11 * </PRE>
12 */
13public class Initializer implements Node {
14 public NodeChoice f0;
15
16 public Initializer(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitializerList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitializerList.java
new file mode 100644
index 000000000..921602582
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/InitializerList.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> Initializer()
11 * f1 -> ( "," Initializer() )*
12 * </PRE>
13 */
14public class InitializerList implements Node {
15 public Initializer f0;
16 public NodeListOptional f1;
17
18 public InitializerList(Initializer n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IterationStatement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IterationStatement.java
new file mode 100644
index 000000000..c9ba91916
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/IterationStatement.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
11 * </PRE>
12 */
13public class IterationStatement implements Node {
14 public NodeChoice f0;
15
16 public IterationStatement(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/JumpStatement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/JumpStatement.java
new file mode 100644
index 000000000..7341aadf2
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/JumpStatement.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
11 * </PRE>
12 */
13public class JumpStatement implements Node {
14 public NodeChoice f0;
15
16 public JumpStatement(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LabeledStatement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LabeledStatement.java
new file mode 100644
index 000000000..5f4ef4f98
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LabeledStatement.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
11 * </PRE>
12 */
13public class LabeledStatement implements Node {
14 public NodeChoice f0;
15
16 public LabeledStatement(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LocalVariableDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LocalVariableDeclaration.java
new file mode 100644
index 000000000..8337772a4
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LocalVariableDeclaration.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> [ &lt;STATIC&gt; ]
11 * f1 -> VariableDeclaration()
12 * </PRE>
13 */
14public class LocalVariableDeclaration implements Node {
15 public NodeOptional f0;
16 public VariableDeclaration f1;
17
18 public LocalVariableDeclaration(NodeOptional n0, VariableDeclaration n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalANDExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalANDExpression.java
new file mode 100644
index 000000000..b353bb7f6
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalANDExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> InclusiveORExpression()
11 * f1 -> [ "&&" LogicalANDExpression() ]
12 * </PRE>
13 */
14public class LogicalANDExpression implements Node {
15 public InclusiveORExpression f0;
16 public NodeOptional f1;
17
18 public LogicalANDExpression(InclusiveORExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalORExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalORExpression.java
new file mode 100644
index 000000000..87f8d0d11
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/LogicalORExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> LogicalANDExpression()
11 * f1 -> [ "||" LogicalORExpression() ]
12 * </PRE>
13 */
14public class LogicalORExpression implements Node {
15 public LogicalANDExpression f0;
16 public NodeOptional f1;
17
18 public LogicalORExpression(LogicalANDExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/MultiplicativeExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/MultiplicativeExpression.java
new file mode 100644
index 000000000..9b801d12f
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/MultiplicativeExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> CastExpression()
11 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
12 * </PRE>
13 */
14public class MultiplicativeExpression implements Node {
15 public CastExpression f0;
16 public NodeOptional f1;
17
18 public MultiplicativeExpression(CastExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NoIdentifierTypeSpecifier.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NoIdentifierTypeSpecifier.java
new file mode 100644
index 000000000..ff4fc4108
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NoIdentifierTypeSpecifier.java
@@ -0,0 +1,42 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> [ &lt;CONST&gt; ]
11 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
12 * f2 -> [ Pointer() ]
13 * f3 -> [ Array() ]
14 * </PRE>
15 */
16public class NoIdentifierTypeSpecifier implements Node {
17 public NodeOptional f0;
18 public NodeChoice f1;
19 public NodeOptional f2;
20 public NodeOptional f3;
21
22 public NoIdentifierTypeSpecifier(NodeOptional n0, NodeChoice n1, NodeOptional n2, NodeOptional n3) {
23 f0 = n0;
24 f1 = n1;
25 f2 = n2;
26 f3 = n3;
27 }
28
29 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
30 v.visit(this);
31 }
32 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
33 return v.visit(this,argu);
34 }
35 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
36 return v.visit(this);
37 }
38 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
39 v.visit(this,argu);
40 }
41}
42
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Node.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Node.java
new file mode 100644
index 000000000..4ea3904db
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Node.java
@@ -0,0 +1,16 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * The interface which all syntax tree classes must implement.
9 */
10public interface Node extends java.io.Serializable {
11 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v);
12 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu);
13 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v);
14 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu);
15}
16
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeChoice.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeChoice.java
new file mode 100644
index 000000000..ff9a66d1b
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeChoice.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Represents a grammar choice, e.g. ( A | B )
9 */
10public class NodeChoice implements Node {
11 public NodeChoice(Node node) {
12 this(node, -1);
13 }
14
15 public NodeChoice(Node node, int whichChoice) {
16 choice = node;
17 which = whichChoice;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 choice.accept(v);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return choice.accept(v,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return choice.accept(v);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 choice.accept(v,argu);
31 }
32
33 public Node choice;
34 public int which;
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeList.java
new file mode 100644
index 000000000..36352b0f5
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeList.java
@@ -0,0 +1,44 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7import java.util.*;
8
9/**
10 * Represents a grammar list, e.g. ( A )+
11 */
12public class NodeList implements NodeListInterface {
13 public NodeList() {
14 nodes = new Vector<Node>();
15 }
16
17 public NodeList(Node firstNode) {
18 nodes = new Vector<Node>();
19 addNode(firstNode);
20 }
21
22 public void addNode(Node n) {
23 nodes.addElement(n);
24 }
25
26 public Enumeration<Node> elements() { return nodes.elements(); }
27 public Node elementAt(int i) { return nodes.elementAt(i); }
28 public int size() { return nodes.size(); }
29 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
30 v.visit(this);
31 }
32 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
33 return v.visit(this,argu);
34 }
35 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
36 return v.visit(this);
37 }
38 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
39 v.visit(this,argu);
40 }
41
42 public Vector<Node> nodes;
43}
44
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListInterface.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListInterface.java
new file mode 100644
index 000000000..5b37ab566
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListInterface.java
@@ -0,0 +1,22 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * The interface which NodeList, NodeListOptional, and NodeSequence
9 * implement.
10 */
11public interface NodeListInterface extends Node {
12 public void addNode(Node n);
13 public Node elementAt(int i);
14 public java.util.Enumeration<Node> elements();
15 public int size();
16
17 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v);
18 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu);
19 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v);
20 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu);
21}
22
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListOptional.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListOptional.java
new file mode 100644
index 000000000..73ca45fd4
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeListOptional.java
@@ -0,0 +1,45 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7import java.util.*;
8
9/**
10 * Represents an optional grammar list, e.g. ( A )*
11 */
12public class NodeListOptional implements NodeListInterface {
13 public NodeListOptional() {
14 nodes = new Vector<Node>();
15 }
16
17 public NodeListOptional(Node firstNode) {
18 nodes = new Vector<Node>();
19 addNode(firstNode);
20 }
21
22 public void addNode(Node n) {
23 nodes.addElement(n);
24 }
25
26 public Enumeration<Node> elements() { return nodes.elements(); }
27 public Node elementAt(int i) { return nodes.elementAt(i); }
28 public int size() { return nodes.size(); }
29 public boolean present() { return nodes.size() != 0; }
30 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
31 v.visit(this);
32 }
33 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
34 return v.visit(this,argu);
35 }
36 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
37 return v.visit(this);
38 }
39 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
40 v.visit(this,argu);
41 }
42
43 public Vector<Node> nodes;
44}
45
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeOptional.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeOptional.java
new file mode 100644
index 000000000..364c7c6c2
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeOptional.java
@@ -0,0 +1,41 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Represents an grammar optional node, e.g. ( A )? or [ A ]
9 */
10public class NodeOptional implements Node {
11 public NodeOptional() {
12 node = null;
13 }
14
15 public NodeOptional(Node n) {
16 addNode(n);
17 }
18
19 public void addNode(Node n) {
20 if ( node != null) // Oh oh!
21 throw new Error("Attempt to set optional node twice");
22
23 node = n;
24 }
25 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
26 v.visit(this);
27 }
28 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
29 return v.visit(this,argu);
30 }
31 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
32 return v.visit(this);
33 }
34 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
35 v.visit(this,argu);
36 }
37 public boolean present() { return node != null; }
38
39 public Node node;
40}
41
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeSequence.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeSequence.java
new file mode 100644
index 000000000..63c09786a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeSequence.java
@@ -0,0 +1,45 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7import java.util.*;
8
9/**
10 * Represents a sequence of nodes nested within a choice, list,
11 * optional list, or optional, e.g. ( A B )+ or [ C D E ]
12 */
13public class NodeSequence implements NodeListInterface {
14 public NodeSequence(int n) {
15 nodes = new Vector<Node>(n);
16 }
17
18 public NodeSequence(Node firstNode) {
19 nodes = new Vector<Node>();
20 addNode(firstNode);
21 }
22
23 public void addNode(Node n) {
24 nodes.addElement(n);
25 }
26
27 public Node elementAt(int i) { return nodes.elementAt(i); }
28 public Enumeration<Node> elements() { return nodes.elements(); }
29 public int size() { return nodes.size(); }
30 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
31 v.visit(this);
32 }
33 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
34 return v.visit(this,argu);
35 }
36 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
37 return v.visit(this);
38 }
39 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
40 v.visit(this,argu);
41 }
42
43 public Vector<Node> nodes;
44}
45
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeToken.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeToken.java
new file mode 100644
index 000000000..90db44d7a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/NodeToken.java
@@ -0,0 +1,87 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7import java.util.*;
8/**
9 * Represents a single token in the grammar. If the "-tk" option
10 * is used, also contains a Vector of preceding special tokens.
11 */
12public class NodeToken implements Node {
13 public NodeToken(String s) {
14 this(s, -1, -1, -1, -1, -1); }
15
16 public NodeToken(String s, int kind, int beginLine, int beginColumn, int endLine, int endColumn) {
17 tokenImage = s;
18 specialTokens = null;
19 this.kind = kind;
20 this.beginLine = beginLine;
21 this.beginColumn = beginColumn;
22 this.endLine = endLine;
23 this.endColumn = endColumn;
24 }
25
26 public NodeToken getSpecialAt(int i) {
27 if ( specialTokens == null )
28 throw new java.util.NoSuchElementException("No specials in token");
29 return specialTokens.elementAt(i);
30 }
31
32 public int numSpecials() {
33 if ( specialTokens == null ) return 0;
34 return specialTokens.size();
35 }
36
37 public void addSpecial(NodeToken s) {
38 if ( specialTokens == null ) specialTokens = new Vector<NodeToken>();
39 specialTokens.addElement(s);
40 }
41
42 public void trimSpecials() {
43 if ( specialTokens == null ) return;
44 specialTokens.trimToSize();
45 }
46
47 public String toString() { return tokenImage; }
48
49 public String withSpecials() {
50 if ( specialTokens == null )
51 return tokenImage;
52
53 StringBuffer buf = new StringBuffer();
54
55 for ( Enumeration<NodeToken> e = specialTokens.elements(); e.hasMoreElements(); )
56 buf.append(e.nextElement().toString());
57
58 buf.append(tokenImage);
59 return buf.toString();
60 }
61
62 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
63 v.visit(this);
64 }
65 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
66 return v.visit(this,argu);
67 }
68 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
69 return v.visit(this);
70 }
71 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
72 v.visit(this,argu);
73 }
74
75 public String tokenImage;
76
77 // Stores a list of NodeTokens
78 public Vector<NodeToken> specialTokens;
79
80 // -1 for these ints means no position info is available.
81 public int beginLine, beginColumn, endLine, endColumn;
82
83 // Equal to the JavaCC token "kind" integer.
84 // -1 if not available.
85 public int kind;
86}
87
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterDeclaration.java
new file mode 100644
index 000000000..da7a71d44
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterDeclaration.java
@@ -0,0 +1,39 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> TypeSpecifier()
11 * f1 -> &lt;IDENTIFIER&gt;
12 * f2 -> [ Array() ]
13 * </PRE>
14 */
15public class ParameterDeclaration implements Node {
16 public TypeSpecifier f0;
17 public NodeToken f1;
18 public NodeOptional f2;
19
20 public ParameterDeclaration(TypeSpecifier n0, NodeToken n1, NodeOptional n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
27 v.visit(this);
28 }
29 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
30 return v.visit(this,argu);
31 }
32 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
33 return v.visit(this);
34 }
35 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
36 v.visit(this,argu);
37 }
38}
39
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterList.java
new file mode 100644
index 000000000..d92fd41ff
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ParameterList.java
@@ -0,0 +1,39 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ParameterDeclaration()
11 * f1 -> ( "," ParameterDeclaration() )*
12 * f2 -> [ "," "..." ]
13 * </PRE>
14 */
15public class ParameterList implements Node {
16 public ParameterDeclaration f0;
17 public NodeListOptional f1;
18 public NodeOptional f2;
19
20 public ParameterList(ParameterDeclaration n0, NodeListOptional n1, NodeOptional n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
27 v.visit(this);
28 }
29 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
30 return v.visit(this,argu);
31 }
32 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
33 return v.visit(this);
34 }
35 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
36 v.visit(this,argu);
37 }
38}
39
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Pointer.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Pointer.java
new file mode 100644
index 000000000..56f175eb1
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Pointer.java
@@ -0,0 +1,45 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> "*"
11 * f1 -> [ &lt;CONST&gt; ]
12 * f2 -> [ Pointer() ]
13 * </PRE>
14 */
15public class Pointer implements Node {
16 public NodeToken f0;
17 public NodeOptional f1;
18 public NodeOptional f2;
19
20 public Pointer(NodeToken n0, NodeOptional n1, NodeOptional n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public Pointer(NodeOptional n0, NodeOptional n1) {
27 f0 = new NodeToken("*");
28 f1 = n0;
29 f2 = n1;
30 }
31
32 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
33 v.visit(this);
34 }
35 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
36 return v.visit(this,argu);
37 }
38 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
39 return v.visit(this);
40 }
41 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
42 v.visit(this,argu);
43 }
44}
45
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PostfixExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PostfixExpression.java
new file mode 100644
index 000000000..52e141504
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PostfixExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> PrimaryExpression()
11 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
12 * </PRE>
13 */
14public class PostfixExpression implements Node {
15 public PrimaryExpression f0;
16 public NodeListOptional f1;
17
18 public PostfixExpression(PrimaryExpression n0, NodeListOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PrimaryExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PrimaryExpression.java
new file mode 100644
index 000000000..fb953dccd
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/PrimaryExpression.java
@@ -0,0 +1,35 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;IDENTIFIER&gt;
11 * | Constant()
12 * | "(" Expression() ")"
13 * </PRE>
14 */
15public class PrimaryExpression implements Node {
16 public NodeChoice f0;
17
18 public PrimaryExpression(NodeChoice n0) {
19 f0 = n0;
20 }
21
22 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
23 v.visit(this);
24 }
25 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
26 return v.visit(this,argu);
27 }
28 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
29 return v.visit(this);
30 }
31 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
32 v.visit(this,argu);
33 }
34}
35
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/RelationalExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/RelationalExpression.java
new file mode 100644
index 000000000..5b823077b
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/RelationalExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ShiftExpression()
11 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
12 * </PRE>
13 */
14public class RelationalExpression implements Node {
15 public ShiftExpression f0;
16 public NodeOptional f1;
17
18 public RelationalExpression(ShiftExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/SelectionStatement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/SelectionStatement.java
new file mode 100644
index 000000000..e3da4cf34
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/SelectionStatement.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
11 * </PRE>
12 */
13public class SelectionStatement implements Node {
14 public NodeChoice f0;
15
16 public SelectionStatement(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ShiftExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ShiftExpression.java
new file mode 100644
index 000000000..b3c9e5b0f
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/ShiftExpression.java
@@ -0,0 +1,36 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> AdditiveExpression()
11 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
12 * </PRE>
13 */
14public class ShiftExpression implements Node {
15 public AdditiveExpression f0;
16 public NodeOptional f1;
17
18 public ShiftExpression(AdditiveExpression n0, NodeOptional n1) {
19 f0 = n0;
20 f1 = n1;
21 }
22
23 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
24 v.visit(this);
25 }
26 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
27 return v.visit(this,argu);
28 }
29 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
30 return v.visit(this);
31 }
32 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
33 v.visit(this,argu);
34 }
35}
36
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Statement.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Statement.java
new file mode 100644
index 000000000..27148dfe7
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/Statement.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
11 * </PRE>
12 */
13public class Statement implements Node {
14 public NodeChoice f0;
15
16 public Statement(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StorageClassSpecifier.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StorageClassSpecifier.java
new file mode 100644
index 000000000..223839f96
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StorageClassSpecifier.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
11 * </PRE>
12 */
13public class StorageClassSpecifier implements Node {
14 public NodeChoice f0;
15
16 public StorageClassSpecifier(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclaration.java
new file mode 100644
index 000000000..074ec4266
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclaration.java
@@ -0,0 +1,53 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> TypeSpecifier()
11 * f1 -> &lt;IDENTIFIER&gt;
12 * f2 -> [ Array() | ":" ConstantExpression() ]
13 * f3 -> [ &lt;IDENTIFIER&gt; ]
14 * f4 -> ";"
15 * </PRE>
16 */
17public class StructDeclaration implements Node {
18 public TypeSpecifier f0;
19 public NodeToken f1;
20 public NodeOptional f2;
21 public NodeOptional f3;
22 public NodeToken f4;
23
24 public StructDeclaration(TypeSpecifier n0, NodeToken n1, NodeOptional n2, NodeOptional n3, NodeToken n4) {
25 f0 = n0;
26 f1 = n1;
27 f2 = n2;
28 f3 = n3;
29 f4 = n4;
30 }
31
32 public StructDeclaration(TypeSpecifier n0, NodeToken n1, NodeOptional n2, NodeOptional n3) {
33 f0 = n0;
34 f1 = n1;
35 f2 = n2;
36 f3 = n3;
37 f4 = new NodeToken(";");
38 }
39
40 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
41 v.visit(this);
42 }
43 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
44 return v.visit(this,argu);
45 }
46 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
47 return v.visit(this);
48 }
49 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
50 v.visit(this,argu);
51 }
52}
53
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclarationList.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclarationList.java
new file mode 100644
index 000000000..32d081495
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructDeclarationList.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( StructDeclaration() )+
11 * </PRE>
12 */
13public class StructDeclarationList implements Node {
14 public NodeList f0;
15
16 public StructDeclarationList(NodeList n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnion.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnion.java
new file mode 100644
index 000000000..2131d7a6b
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnion.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
11 * </PRE>
12 */
13public class StructOrUnion implements Node {
14 public NodeChoice f0;
15
16 public StructOrUnion(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnionSpecifier.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnionSpecifier.java
new file mode 100644
index 000000000..aa64929be
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/StructOrUnionSpecifier.java
@@ -0,0 +1,34 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
11 * | StructOrUnion() &lt;IDENTIFIER&gt;
12 * </PRE>
13 */
14public class StructOrUnionSpecifier implements Node {
15 public NodeChoice f0;
16
17 public StructOrUnionSpecifier(NodeChoice n0) {
18 f0 = n0;
19 }
20
21 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
22 v.visit(this);
23 }
24 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
25 return v.visit(this,argu);
26 }
27 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
28 return v.visit(this);
29 }
30 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
31 v.visit(this,argu);
32 }
33}
34
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TranslationUnit.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TranslationUnit.java
new file mode 100644
index 000000000..feb48f646
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TranslationUnit.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( ExternalDeclaration() )+
11 * </PRE>
12 */
13public class TranslationUnit implements Node {
14 public NodeList f0;
15
16 public TranslationUnit(NodeList n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeDeclaration.java
new file mode 100644
index 000000000..500aecaf3
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeDeclaration.java
@@ -0,0 +1,45 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> &lt;TYPEDEF&gt;
11 * f1 -> ( DataType() | FunctionType() )
12 * f2 -> ";"
13 * </PRE>
14 */
15public class TypeDeclaration implements Node {
16 public NodeToken f0;
17 public NodeChoice f1;
18 public NodeToken f2;
19
20 public TypeDeclaration(NodeToken n0, NodeChoice n1, NodeToken n2) {
21 f0 = n0;
22 f1 = n1;
23 f2 = n2;
24 }
25
26 public TypeDeclaration(NodeChoice n0) {
27 f0 = new NodeToken("typedef");
28 f1 = n0;
29 f2 = new NodeToken(";");
30 }
31
32 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
33 v.visit(this);
34 }
35 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
36 return v.visit(this,argu);
37 }
38 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
39 return v.visit(this);
40 }
41 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
42 v.visit(this,argu);
43 }
44}
45
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeSpecifier.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeSpecifier.java
new file mode 100644
index 000000000..6d1607d1a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/TypeSpecifier.java
@@ -0,0 +1,42 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> [ &lt;CONST&gt; ]
11 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
12 * f2 -> [ Pointer() ]
13 * f3 -> [ Array() ]
14 * </PRE>
15 */
16public class TypeSpecifier implements Node {
17 public NodeOptional f0;
18 public NodeChoice f1;
19 public NodeOptional f2;
20 public NodeOptional f3;
21
22 public TypeSpecifier(NodeOptional n0, NodeChoice n1, NodeOptional n2, NodeOptional n3) {
23 f0 = n0;
24 f1 = n1;
25 f2 = n2;
26 f3 = n3;
27 }
28
29 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
30 v.visit(this);
31 }
32 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
33 return v.visit(this,argu);
34 }
35 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
36 return v.visit(this);
37 }
38 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
39 v.visit(this,argu);
40 }
41}
42
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryExpression.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryExpression.java
new file mode 100644
index 000000000..1e7894e23
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryExpression.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
11 * </PRE>
12 */
13public class UnaryExpression implements Node {
14 public NodeChoice f0;
15
16 public UnaryExpression(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryOperator.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryOperator.java
new file mode 100644
index 000000000..630af9d21
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/UnaryOperator.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
11 * </PRE>
12 */
13public class UnaryOperator implements Node {
14 public NodeChoice f0;
15
16 public UnaryOperator(NodeChoice n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableClassSpecifier.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableClassSpecifier.java
new file mode 100644
index 000000000..5a9101937
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableClassSpecifier.java
@@ -0,0 +1,33 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
11 * </PRE>
12 */
13public class VariableClassSpecifier implements Node {
14 public NodeListOptional f0;
15
16 public VariableClassSpecifier(NodeListOptional n0) {
17 f0 = n0;
18 }
19
20 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
21 v.visit(this);
22 }
23 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
24 return v.visit(this,argu);
25 }
26 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
27 return v.visit(this);
28 }
29 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
30 v.visit(this,argu);
31 }
32}
33
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableDeclaration.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableDeclaration.java
new file mode 100644
index 000000000..aa7cf6e32
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/nodes/VariableDeclaration.java
@@ -0,0 +1,49 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.nodes;
6
7/**
8 * Grammar production:
9 * <PRE>
10 * f0 -> VariableClassSpecifier()
11 * f1 -> TypeSpecifier()
12 * f2 -> InitDeclaratorList()
13 * f3 -> ";"
14 * </PRE>
15 */
16public class VariableDeclaration implements Node {
17 public VariableClassSpecifier f0;
18 public TypeSpecifier f1;
19 public InitDeclaratorList f2;
20 public NodeToken f3;
21
22 public VariableDeclaration(VariableClassSpecifier n0, TypeSpecifier n1, InitDeclaratorList n2, NodeToken n3) {
23 f0 = n0;
24 f1 = n1;
25 f2 = n2;
26 f3 = n3;
27 }
28
29 public VariableDeclaration(VariableClassSpecifier n0, TypeSpecifier n1, InitDeclaratorList n2) {
30 f0 = n0;
31 f1 = n1;
32 f2 = n2;
33 f3 = new NodeToken(";");
34 }
35
36 public void accept(org.gnunet.seaspider.parser.visitors.Visitor v) {
37 v.visit(this);
38 }
39 public <R,A> R accept(org.gnunet.seaspider.parser.visitors.GJVisitor<R,A> v, A argu) {
40 return v.visit(this,argu);
41 }
42 public <R> R accept(org.gnunet.seaspider.parser.visitors.GJNoArguVisitor<R> v) {
43 return v.visit(this);
44 }
45 public <A> void accept(org.gnunet.seaspider.parser.visitors.GJVoidVisitor<A> v, A argu) {
46 v.visit(this,argu);
47 }
48}
49
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/DepthFirstVisitor.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/DepthFirstVisitor.java
new file mode 100644
index 000000000..57c92b752
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/DepthFirstVisitor.java
@@ -0,0 +1,701 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * Provides default methods which visit each node in the tree in depth-first
12 * order. Your visitors may extend this class.
13 */
14public class DepthFirstVisitor implements Visitor {
15 //
16 // Auto class visitors--probably don't need to be overridden.
17 //
18 public void visit(NodeList n) {
19 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); )
20 e.nextElement().accept(this);
21 }
22
23 public void visit(NodeListOptional n) {
24 if ( n.present() )
25 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); )
26 e.nextElement().accept(this);
27 }
28
29 public void visit(NodeOptional n) {
30 if ( n.present() )
31 n.node.accept(this);
32 }
33
34 public void visit(NodeSequence n) {
35 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); )
36 e.nextElement().accept(this);
37 }
38
39 public void visit(NodeToken n) { }
40
41 //
42 // User-generated visitor methods below
43 //
44
45 /**
46 * <PRE>
47 * f0 -> ( ExternalDeclaration() )+
48 * </PRE>
49 */
50 public void visit(TranslationUnit n) {
51 n.f0.accept(this);
52 }
53
54 /**
55 * <PRE>
56 * f0 -> ( StorageClassSpecifier() )*
57 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
58 * </PRE>
59 */
60 public void visit(ExternalDeclaration n) {
61 n.f0.accept(this);
62 n.f1.accept(this);
63 }
64
65 /**
66 * <PRE>
67 * f0 -> TypeSpecifier()
68 * f1 -> &lt;IDENTIFIER&gt;
69 * f2 -> "("
70 * f3 -> [ ParameterList() ]
71 * f4 -> ")"
72 * f5 -> ( ";" | CompoundStatement() )
73 * </PRE>
74 */
75 public void visit(FunctionDeclaration n) {
76 n.f0.accept(this);
77 n.f1.accept(this);
78 n.f2.accept(this);
79 n.f3.accept(this);
80 n.f4.accept(this);
81 n.f5.accept(this);
82 }
83
84 /**
85 * <PRE>
86 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
87 * </PRE>
88 */
89 public void visit(StorageClassSpecifier n) {
90 n.f0.accept(this);
91 }
92
93 /**
94 * <PRE>
95 * f0 -> &lt;TYPEDEF&gt;
96 * f1 -> ( DataType() | FunctionType() )
97 * f2 -> ";"
98 * </PRE>
99 */
100 public void visit(TypeDeclaration n) {
101 n.f0.accept(this);
102 n.f1.accept(this);
103 n.f2.accept(this);
104 }
105
106 /**
107 * <PRE>
108 * f0 -> StructOrUnionSpecifier()
109 * f1 -> &lt;IDENTIFIER&gt;
110 * </PRE>
111 */
112 public void visit(DataType n) {
113 n.f0.accept(this);
114 n.f1.accept(this);
115 }
116
117 /**
118 * <PRE>
119 * f0 -> TypeSpecifier()
120 * f1 -> "("
121 * f2 -> "*"
122 * f3 -> &lt;IDENTIFIER&gt;
123 * f4 -> ")"
124 * f5 -> "("
125 * f6 -> [ ParameterList() ]
126 * f7 -> ")"
127 * </PRE>
128 */
129 public void visit(FunctionType n) {
130 n.f0.accept(this);
131 n.f1.accept(this);
132 n.f2.accept(this);
133 n.f3.accept(this);
134 n.f4.accept(this);
135 n.f5.accept(this);
136 n.f6.accept(this);
137 n.f7.accept(this);
138 }
139
140 /**
141 * <PRE>
142 * f0 -> ParameterDeclaration()
143 * f1 -> ( "," ParameterDeclaration() )*
144 * f2 -> [ "," "..." ]
145 * </PRE>
146 */
147 public void visit(ParameterList n) {
148 n.f0.accept(this);
149 n.f1.accept(this);
150 n.f2.accept(this);
151 }
152
153 /**
154 * <PRE>
155 * f0 -> TypeSpecifier()
156 * f1 -> &lt;IDENTIFIER&gt;
157 * f2 -> [ Array() ]
158 * </PRE>
159 */
160 public void visit(ParameterDeclaration n) {
161 n.f0.accept(this);
162 n.f1.accept(this);
163 n.f2.accept(this);
164 }
165
166 /**
167 * <PRE>
168 * f0 -> VariableClassSpecifier()
169 * f1 -> TypeSpecifier()
170 * f2 -> InitDeclaratorList()
171 * f3 -> ";"
172 * </PRE>
173 */
174 public void visit(VariableDeclaration n) {
175 n.f0.accept(this);
176 n.f1.accept(this);
177 n.f2.accept(this);
178 n.f3.accept(this);
179 }
180
181 /**
182 * <PRE>
183 * f0 -> [ &lt;STATIC&gt; ]
184 * f1 -> VariableDeclaration()
185 * </PRE>
186 */
187 public void visit(LocalVariableDeclaration n) {
188 n.f0.accept(this);
189 n.f1.accept(this);
190 }
191
192 /**
193 * <PRE>
194 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
195 * </PRE>
196 */
197 public void visit(VariableClassSpecifier n) {
198 n.f0.accept(this);
199 }
200
201 /**
202 * <PRE>
203 * f0 -> [ &lt;CONST&gt; ]
204 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
205 * f2 -> [ Pointer() ]
206 * f3 -> [ Array() ]
207 * </PRE>
208 */
209 public void visit(TypeSpecifier n) {
210 n.f0.accept(this);
211 n.f1.accept(this);
212 n.f2.accept(this);
213 n.f3.accept(this);
214 }
215
216 /**
217 * <PRE>
218 * f0 -> [ &lt;CONST&gt; ]
219 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
220 * f2 -> [ Pointer() ]
221 * f3 -> [ Array() ]
222 * </PRE>
223 */
224 public void visit(NoIdentifierTypeSpecifier n) {
225 n.f0.accept(this);
226 n.f1.accept(this);
227 n.f2.accept(this);
228 n.f3.accept(this);
229 }
230
231 /**
232 * <PRE>
233 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
234 * | StructOrUnion() &lt;IDENTIFIER&gt;
235 * </PRE>
236 */
237 public void visit(StructOrUnionSpecifier n) {
238 n.f0.accept(this);
239 }
240
241 /**
242 * <PRE>
243 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
244 * </PRE>
245 */
246 public void visit(StructOrUnion n) {
247 n.f0.accept(this);
248 }
249
250 /**
251 * <PRE>
252 * f0 -> ( StructDeclaration() )+
253 * </PRE>
254 */
255 public void visit(StructDeclarationList n) {
256 n.f0.accept(this);
257 }
258
259 /**
260 * <PRE>
261 * f0 -> InitDeclarator()
262 * f1 -> ( "," InitDeclarator() )*
263 * </PRE>
264 */
265 public void visit(InitDeclaratorList n) {
266 n.f0.accept(this);
267 n.f1.accept(this);
268 }
269
270 /**
271 * <PRE>
272 * f0 -> &lt;IDENTIFIER&gt;
273 * f1 -> [ Array() ]
274 * f2 -> [ "=" Initializer() ]
275 * </PRE>
276 */
277 public void visit(InitDeclarator n) {
278 n.f0.accept(this);
279 n.f1.accept(this);
280 n.f2.accept(this);
281 }
282
283 /**
284 * <PRE>
285 * f0 -> TypeSpecifier()
286 * f1 -> &lt;IDENTIFIER&gt;
287 * f2 -> [ Array() | ":" ConstantExpression() ]
288 * f3 -> [ &lt;IDENTIFIER&gt; ]
289 * f4 -> ";"
290 * </PRE>
291 */
292 public void visit(StructDeclaration n) {
293 n.f0.accept(this);
294 n.f1.accept(this);
295 n.f2.accept(this);
296 n.f3.accept(this);
297 n.f4.accept(this);
298 }
299
300 /**
301 * <PRE>
302 * f0 -> &lt;ENUM&gt;
303 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
304 * </PRE>
305 */
306 public void visit(EnumSpecifier n) {
307 n.f0.accept(this);
308 n.f1.accept(this);
309 }
310
311 /**
312 * <PRE>
313 * f0 -> Enumerator()
314 * f1 -> ( "," Enumerator() )*
315 * </PRE>
316 */
317 public void visit(EnumeratorList n) {
318 n.f0.accept(this);
319 n.f1.accept(this);
320 }
321
322 /**
323 * <PRE>
324 * f0 -> &lt;IDENTIFIER&gt;
325 * f1 -> [ "=" ConstantExpression() ]
326 * </PRE>
327 */
328 public void visit(Enumerator n) {
329 n.f0.accept(this);
330 n.f1.accept(this);
331 }
332
333 /**
334 * <PRE>
335 * f0 -> "*"
336 * f1 -> [ &lt;CONST&gt; ]
337 * f2 -> [ Pointer() ]
338 * </PRE>
339 */
340 public void visit(Pointer n) {
341 n.f0.accept(this);
342 n.f1.accept(this);
343 n.f2.accept(this);
344 }
345
346 /**
347 * <PRE>
348 * f0 -> &lt;IDENTIFIER&gt;
349 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
350 * </PRE>
351 */
352 public void visit(IdentifierList n) {
353 n.f0.accept(this);
354 n.f1.accept(this);
355 }
356
357 /**
358 * <PRE>
359 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
360 * </PRE>
361 */
362 public void visit(Initializer n) {
363 n.f0.accept(this);
364 }
365
366 /**
367 * <PRE>
368 * f0 -> Initializer()
369 * f1 -> ( "," Initializer() )*
370 * </PRE>
371 */
372 public void visit(InitializerList n) {
373 n.f0.accept(this);
374 n.f1.accept(this);
375 }
376
377 /**
378 * <PRE>
379 * f0 -> "["
380 * f1 -> [ ConstantExpression() ]
381 * f2 -> "]"
382 * </PRE>
383 */
384 public void visit(Array n) {
385 n.f0.accept(this);
386 n.f1.accept(this);
387 n.f2.accept(this);
388 }
389
390 /**
391 * <PRE>
392 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
393 * </PRE>
394 */
395 public void visit(Statement n) {
396 n.f0.accept(this);
397 }
398
399 /**
400 * <PRE>
401 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
402 * </PRE>
403 */
404 public void visit(LabeledStatement n) {
405 n.f0.accept(this);
406 }
407
408 /**
409 * <PRE>
410 * f0 -> [ Expression() ]
411 * f1 -> ";"
412 * </PRE>
413 */
414 public void visit(ExpressionStatement n) {
415 n.f0.accept(this);
416 n.f1.accept(this);
417 }
418
419 /**
420 * <PRE>
421 * f0 -> "{"
422 * f1 -> ( LocalVariableDeclaration() | Statement() )*
423 * f2 -> "}"
424 * </PRE>
425 */
426 public void visit(CompoundStatement n) {
427 n.f0.accept(this);
428 n.f1.accept(this);
429 n.f2.accept(this);
430 }
431
432 /**
433 * <PRE>
434 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
435 * </PRE>
436 */
437 public void visit(SelectionStatement n) {
438 n.f0.accept(this);
439 }
440
441 /**
442 * <PRE>
443 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
444 * </PRE>
445 */
446 public void visit(IterationStatement n) {
447 n.f0.accept(this);
448 }
449
450 /**
451 * <PRE>
452 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
453 * </PRE>
454 */
455 public void visit(JumpStatement n) {
456 n.f0.accept(this);
457 }
458
459 /**
460 * <PRE>
461 * f0 -> AssignmentExpression()
462 * f1 -> ( "," AssignmentExpression() )*
463 * </PRE>
464 */
465 public void visit(Expression n) {
466 n.f0.accept(this);
467 n.f1.accept(this);
468 }
469
470 /**
471 * <PRE>
472 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
473 * | ConditionalExpression()
474 * </PRE>
475 */
476 public void visit(AssignmentExpression n) {
477 n.f0.accept(this);
478 }
479
480 /**
481 * <PRE>
482 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
483 * </PRE>
484 */
485 public void visit(AssignmentOperator n) {
486 n.f0.accept(this);
487 }
488
489 /**
490 * <PRE>
491 * f0 -> LogicalORExpression()
492 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
493 * </PRE>
494 */
495 public void visit(ConditionalExpression n) {
496 n.f0.accept(this);
497 n.f1.accept(this);
498 }
499
500 /**
501 * <PRE>
502 * f0 -> ConditionalExpression()
503 * </PRE>
504 */
505 public void visit(ConstantExpression n) {
506 n.f0.accept(this);
507 }
508
509 /**
510 * <PRE>
511 * f0 -> LogicalANDExpression()
512 * f1 -> [ "||" LogicalORExpression() ]
513 * </PRE>
514 */
515 public void visit(LogicalORExpression n) {
516 n.f0.accept(this);
517 n.f1.accept(this);
518 }
519
520 /**
521 * <PRE>
522 * f0 -> InclusiveORExpression()
523 * f1 -> [ "&&" LogicalANDExpression() ]
524 * </PRE>
525 */
526 public void visit(LogicalANDExpression n) {
527 n.f0.accept(this);
528 n.f1.accept(this);
529 }
530
531 /**
532 * <PRE>
533 * f0 -> ExclusiveORExpression()
534 * f1 -> [ "|" InclusiveORExpression() ]
535 * </PRE>
536 */
537 public void visit(InclusiveORExpression n) {
538 n.f0.accept(this);
539 n.f1.accept(this);
540 }
541
542 /**
543 * <PRE>
544 * f0 -> ANDExpression()
545 * f1 -> [ "^" ExclusiveORExpression() ]
546 * </PRE>
547 */
548 public void visit(ExclusiveORExpression n) {
549 n.f0.accept(this);
550 n.f1.accept(this);
551 }
552
553 /**
554 * <PRE>
555 * f0 -> EqualityExpression()
556 * f1 -> [ "&" ANDExpression() ]
557 * </PRE>
558 */
559 public void visit(ANDExpression n) {
560 n.f0.accept(this);
561 n.f1.accept(this);
562 }
563
564 /**
565 * <PRE>
566 * f0 -> RelationalExpression()
567 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
568 * </PRE>
569 */
570 public void visit(EqualityExpression n) {
571 n.f0.accept(this);
572 n.f1.accept(this);
573 }
574
575 /**
576 * <PRE>
577 * f0 -> ShiftExpression()
578 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
579 * </PRE>
580 */
581 public void visit(RelationalExpression n) {
582 n.f0.accept(this);
583 n.f1.accept(this);
584 }
585
586 /**
587 * <PRE>
588 * f0 -> AdditiveExpression()
589 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
590 * </PRE>
591 */
592 public void visit(ShiftExpression n) {
593 n.f0.accept(this);
594 n.f1.accept(this);
595 }
596
597 /**
598 * <PRE>
599 * f0 -> MultiplicativeExpression()
600 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
601 * </PRE>
602 */
603 public void visit(AdditiveExpression n) {
604 n.f0.accept(this);
605 n.f1.accept(this);
606 }
607
608 /**
609 * <PRE>
610 * f0 -> CastExpression()
611 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
612 * </PRE>
613 */
614 public void visit(MultiplicativeExpression n) {
615 n.f0.accept(this);
616 n.f1.accept(this);
617 }
618
619 /**
620 * <PRE>
621 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
622 * </PRE>
623 */
624 public void visit(CastExpression n) {
625 n.f0.accept(this);
626 }
627
628 /**
629 * <PRE>
630 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
631 * </PRE>
632 */
633 public void visit(UnaryExpression n) {
634 n.f0.accept(this);
635 }
636
637 /**
638 * <PRE>
639 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
640 * </PRE>
641 */
642 public void visit(UnaryOperator n) {
643 n.f0.accept(this);
644 }
645
646 /**
647 * <PRE>
648 * f0 -> PrimaryExpression()
649 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
650 * </PRE>
651 */
652 public void visit(PostfixExpression n) {
653 n.f0.accept(this);
654 n.f1.accept(this);
655 }
656
657 /**
658 * <PRE>
659 * f0 -> &lt;IDENTIFIER&gt;
660 * | Constant()
661 * | "(" Expression() ")"
662 * </PRE>
663 */
664 public void visit(PrimaryExpression n) {
665 n.f0.accept(this);
666 }
667
668 /**
669 * <PRE>
670 * f0 -> AssignmentOrTypeExpression()
671 * f1 -> ( "," AssignmentOrTypeExpression() )*
672 * </PRE>
673 */
674 public void visit(ArgumentExpressionList n) {
675 n.f0.accept(this);
676 n.f1.accept(this);
677 }
678
679 /**
680 * <PRE>
681 * f0 -> NoIdentifierTypeSpecifier()
682 * | AssignmentExpression()
683 * </PRE>
684 */
685 public void visit(AssignmentOrTypeExpression n) {
686 n.f0.accept(this);
687 }
688
689 /**
690 * <PRE>
691 * f0 -> &lt;INTEGER_LITERAL&gt;
692 * | &lt;FLOATING_POINT_LITERAL&gt;
693 * | &lt;CHARACTER_LITERAL&gt;
694 * | &lt;STRING_LITERAL&gt;
695 * </PRE>
696 */
697 public void visit(Constant n) {
698 n.f0.accept(this);
699 }
700
701}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJDepthFirst.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJDepthFirst.java
new file mode 100644
index 000000000..2ac3fd812
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJDepthFirst.java
@@ -0,0 +1,837 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * Provides default methods which visit each node in the tree in depth-first
12 * order. Your visitors may extend this class.
13 */
14public class GJDepthFirst<R,A> implements GJVisitor<R,A> {
15 //
16 // Auto class visitors--probably don't need to be overridden.
17 //
18 public R visit(NodeList n, A argu) {
19 R _ret=null;
20 int _count=0;
21 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
22 e.nextElement().accept(this,argu);
23 _count++;
24 }
25 return _ret;
26 }
27
28 public R visit(NodeListOptional n, A argu) {
29 if ( n.present() ) {
30 R _ret=null;
31 int _count=0;
32 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
33 e.nextElement().accept(this,argu);
34 _count++;
35 }
36 return _ret;
37 }
38 else
39 return null;
40 }
41
42 public R visit(NodeOptional n, A argu) {
43 if ( n.present() )
44 return n.node.accept(this,argu);
45 else
46 return null;
47 }
48
49 public R visit(NodeSequence n, A argu) {
50 R _ret=null;
51 int _count=0;
52 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
53 e.nextElement().accept(this,argu);
54 _count++;
55 }
56 return _ret;
57 }
58
59 public R visit(NodeToken n, A argu) { return null; }
60
61 //
62 // User-generated visitor methods below
63 //
64
65 /**
66 * <PRE>
67 * f0 -> ( ExternalDeclaration() )+
68 * </PRE>
69 */
70 public R visit(TranslationUnit n, A argu) {
71 R _ret=null;
72 n.f0.accept(this, argu);
73 return _ret;
74 }
75
76 /**
77 * <PRE>
78 * f0 -> ( StorageClassSpecifier() )*
79 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
80 * </PRE>
81 */
82 public R visit(ExternalDeclaration n, A argu) {
83 R _ret=null;
84 n.f0.accept(this, argu);
85 n.f1.accept(this, argu);
86 return _ret;
87 }
88
89 /**
90 * <PRE>
91 * f0 -> TypeSpecifier()
92 * f1 -> &lt;IDENTIFIER&gt;
93 * f2 -> "("
94 * f3 -> [ ParameterList() ]
95 * f4 -> ")"
96 * f5 -> ( ";" | CompoundStatement() )
97 * </PRE>
98 */
99 public R visit(FunctionDeclaration n, A argu) {
100 R _ret=null;
101 n.f0.accept(this, argu);
102 n.f1.accept(this, argu);
103 n.f2.accept(this, argu);
104 n.f3.accept(this, argu);
105 n.f4.accept(this, argu);
106 n.f5.accept(this, argu);
107 return _ret;
108 }
109
110 /**
111 * <PRE>
112 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
113 * </PRE>
114 */
115 public R visit(StorageClassSpecifier n, A argu) {
116 R _ret=null;
117 n.f0.accept(this, argu);
118 return _ret;
119 }
120
121 /**
122 * <PRE>
123 * f0 -> &lt;TYPEDEF&gt;
124 * f1 -> ( DataType() | FunctionType() )
125 * f2 -> ";"
126 * </PRE>
127 */
128 public R visit(TypeDeclaration n, A argu) {
129 R _ret=null;
130 n.f0.accept(this, argu);
131 n.f1.accept(this, argu);
132 n.f2.accept(this, argu);
133 return _ret;
134 }
135
136 /**
137 * <PRE>
138 * f0 -> StructOrUnionSpecifier()
139 * f1 -> &lt;IDENTIFIER&gt;
140 * </PRE>
141 */
142 public R visit(DataType n, A argu) {
143 R _ret=null;
144 n.f0.accept(this, argu);
145 n.f1.accept(this, argu);
146 return _ret;
147 }
148
149 /**
150 * <PRE>
151 * f0 -> TypeSpecifier()
152 * f1 -> "("
153 * f2 -> "*"
154 * f3 -> &lt;IDENTIFIER&gt;
155 * f4 -> ")"
156 * f5 -> "("
157 * f6 -> [ ParameterList() ]
158 * f7 -> ")"
159 * </PRE>
160 */
161 public R visit(FunctionType n, A argu) {
162 R _ret=null;
163 n.f0.accept(this, argu);
164 n.f1.accept(this, argu);
165 n.f2.accept(this, argu);
166 n.f3.accept(this, argu);
167 n.f4.accept(this, argu);
168 n.f5.accept(this, argu);
169 n.f6.accept(this, argu);
170 n.f7.accept(this, argu);
171 return _ret;
172 }
173
174 /**
175 * <PRE>
176 * f0 -> ParameterDeclaration()
177 * f1 -> ( "," ParameterDeclaration() )*
178 * f2 -> [ "," "..." ]
179 * </PRE>
180 */
181 public R visit(ParameterList n, A argu) {
182 R _ret=null;
183 n.f0.accept(this, argu);
184 n.f1.accept(this, argu);
185 n.f2.accept(this, argu);
186 return _ret;
187 }
188
189 /**
190 * <PRE>
191 * f0 -> TypeSpecifier()
192 * f1 -> &lt;IDENTIFIER&gt;
193 * f2 -> [ Array() ]
194 * </PRE>
195 */
196 public R visit(ParameterDeclaration n, A argu) {
197 R _ret=null;
198 n.f0.accept(this, argu);
199 n.f1.accept(this, argu);
200 n.f2.accept(this, argu);
201 return _ret;
202 }
203
204 /**
205 * <PRE>
206 * f0 -> VariableClassSpecifier()
207 * f1 -> TypeSpecifier()
208 * f2 -> InitDeclaratorList()
209 * f3 -> ";"
210 * </PRE>
211 */
212 public R visit(VariableDeclaration n, A argu) {
213 R _ret=null;
214 n.f0.accept(this, argu);
215 n.f1.accept(this, argu);
216 n.f2.accept(this, argu);
217 n.f3.accept(this, argu);
218 return _ret;
219 }
220
221 /**
222 * <PRE>
223 * f0 -> [ &lt;STATIC&gt; ]
224 * f1 -> VariableDeclaration()
225 * </PRE>
226 */
227 public R visit(LocalVariableDeclaration n, A argu) {
228 R _ret=null;
229 n.f0.accept(this, argu);
230 n.f1.accept(this, argu);
231 return _ret;
232 }
233
234 /**
235 * <PRE>
236 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
237 * </PRE>
238 */
239 public R visit(VariableClassSpecifier n, A argu) {
240 R _ret=null;
241 n.f0.accept(this, argu);
242 return _ret;
243 }
244
245 /**
246 * <PRE>
247 * f0 -> [ &lt;CONST&gt; ]
248 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
249 * f2 -> [ Pointer() ]
250 * f3 -> [ Array() ]
251 * </PRE>
252 */
253 public R visit(TypeSpecifier n, A argu) {
254 R _ret=null;
255 n.f0.accept(this, argu);
256 n.f1.accept(this, argu);
257 n.f2.accept(this, argu);
258 n.f3.accept(this, argu);
259 return _ret;
260 }
261
262 /**
263 * <PRE>
264 * f0 -> [ &lt;CONST&gt; ]
265 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
266 * f2 -> [ Pointer() ]
267 * f3 -> [ Array() ]
268 * </PRE>
269 */
270 public R visit(NoIdentifierTypeSpecifier n, A argu) {
271 R _ret=null;
272 n.f0.accept(this, argu);
273 n.f1.accept(this, argu);
274 n.f2.accept(this, argu);
275 n.f3.accept(this, argu);
276 return _ret;
277 }
278
279 /**
280 * <PRE>
281 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
282 * | StructOrUnion() &lt;IDENTIFIER&gt;
283 * </PRE>
284 */
285 public R visit(StructOrUnionSpecifier n, A argu) {
286 R _ret=null;
287 n.f0.accept(this, argu);
288 return _ret;
289 }
290
291 /**
292 * <PRE>
293 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
294 * </PRE>
295 */
296 public R visit(StructOrUnion n, A argu) {
297 R _ret=null;
298 n.f0.accept(this, argu);
299 return _ret;
300 }
301
302 /**
303 * <PRE>
304 * f0 -> ( StructDeclaration() )+
305 * </PRE>
306 */
307 public R visit(StructDeclarationList n, A argu) {
308 R _ret=null;
309 n.f0.accept(this, argu);
310 return _ret;
311 }
312
313 /**
314 * <PRE>
315 * f0 -> InitDeclarator()
316 * f1 -> ( "," InitDeclarator() )*
317 * </PRE>
318 */
319 public R visit(InitDeclaratorList n, A argu) {
320 R _ret=null;
321 n.f0.accept(this, argu);
322 n.f1.accept(this, argu);
323 return _ret;
324 }
325
326 /**
327 * <PRE>
328 * f0 -> &lt;IDENTIFIER&gt;
329 * f1 -> [ Array() ]
330 * f2 -> [ "=" Initializer() ]
331 * </PRE>
332 */
333 public R visit(InitDeclarator n, A argu) {
334 R _ret=null;
335 n.f0.accept(this, argu);
336 n.f1.accept(this, argu);
337 n.f2.accept(this, argu);
338 return _ret;
339 }
340
341 /**
342 * <PRE>
343 * f0 -> TypeSpecifier()
344 * f1 -> &lt;IDENTIFIER&gt;
345 * f2 -> [ Array() | ":" ConstantExpression() ]
346 * f3 -> [ &lt;IDENTIFIER&gt; ]
347 * f4 -> ";"
348 * </PRE>
349 */
350 public R visit(StructDeclaration n, A argu) {
351 R _ret=null;
352 n.f0.accept(this, argu);
353 n.f1.accept(this, argu);
354 n.f2.accept(this, argu);
355 n.f3.accept(this, argu);
356 n.f4.accept(this, argu);
357 return _ret;
358 }
359
360 /**
361 * <PRE>
362 * f0 -> &lt;ENUM&gt;
363 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
364 * </PRE>
365 */
366 public R visit(EnumSpecifier n, A argu) {
367 R _ret=null;
368 n.f0.accept(this, argu);
369 n.f1.accept(this, argu);
370 return _ret;
371 }
372
373 /**
374 * <PRE>
375 * f0 -> Enumerator()
376 * f1 -> ( "," Enumerator() )*
377 * </PRE>
378 */
379 public R visit(EnumeratorList n, A argu) {
380 R _ret=null;
381 n.f0.accept(this, argu);
382 n.f1.accept(this, argu);
383 return _ret;
384 }
385
386 /**
387 * <PRE>
388 * f0 -> &lt;IDENTIFIER&gt;
389 * f1 -> [ "=" ConstantExpression() ]
390 * </PRE>
391 */
392 public R visit(Enumerator n, A argu) {
393 R _ret=null;
394 n.f0.accept(this, argu);
395 n.f1.accept(this, argu);
396 return _ret;
397 }
398
399 /**
400 * <PRE>
401 * f0 -> "*"
402 * f1 -> [ &lt;CONST&gt; ]
403 * f2 -> [ Pointer() ]
404 * </PRE>
405 */
406 public R visit(Pointer n, A argu) {
407 R _ret=null;
408 n.f0.accept(this, argu);
409 n.f1.accept(this, argu);
410 n.f2.accept(this, argu);
411 return _ret;
412 }
413
414 /**
415 * <PRE>
416 * f0 -> &lt;IDENTIFIER&gt;
417 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
418 * </PRE>
419 */
420 public R visit(IdentifierList n, A argu) {
421 R _ret=null;
422 n.f0.accept(this, argu);
423 n.f1.accept(this, argu);
424 return _ret;
425 }
426
427 /**
428 * <PRE>
429 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
430 * </PRE>
431 */
432 public R visit(Initializer n, A argu) {
433 R _ret=null;
434 n.f0.accept(this, argu);
435 return _ret;
436 }
437
438 /**
439 * <PRE>
440 * f0 -> Initializer()
441 * f1 -> ( "," Initializer() )*
442 * </PRE>
443 */
444 public R visit(InitializerList n, A argu) {
445 R _ret=null;
446 n.f0.accept(this, argu);
447 n.f1.accept(this, argu);
448 return _ret;
449 }
450
451 /**
452 * <PRE>
453 * f0 -> "["
454 * f1 -> [ ConstantExpression() ]
455 * f2 -> "]"
456 * </PRE>
457 */
458 public R visit(Array n, A argu) {
459 R _ret=null;
460 n.f0.accept(this, argu);
461 n.f1.accept(this, argu);
462 n.f2.accept(this, argu);
463 return _ret;
464 }
465
466 /**
467 * <PRE>
468 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
469 * </PRE>
470 */
471 public R visit(Statement n, A argu) {
472 R _ret=null;
473 n.f0.accept(this, argu);
474 return _ret;
475 }
476
477 /**
478 * <PRE>
479 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
480 * </PRE>
481 */
482 public R visit(LabeledStatement n, A argu) {
483 R _ret=null;
484 n.f0.accept(this, argu);
485 return _ret;
486 }
487
488 /**
489 * <PRE>
490 * f0 -> [ Expression() ]
491 * f1 -> ";"
492 * </PRE>
493 */
494 public R visit(ExpressionStatement n, A argu) {
495 R _ret=null;
496 n.f0.accept(this, argu);
497 n.f1.accept(this, argu);
498 return _ret;
499 }
500
501 /**
502 * <PRE>
503 * f0 -> "{"
504 * f1 -> ( LocalVariableDeclaration() | Statement() )*
505 * f2 -> "}"
506 * </PRE>
507 */
508 public R visit(CompoundStatement n, A argu) {
509 R _ret=null;
510 n.f0.accept(this, argu);
511 n.f1.accept(this, argu);
512 n.f2.accept(this, argu);
513 return _ret;
514 }
515
516 /**
517 * <PRE>
518 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
519 * </PRE>
520 */
521 public R visit(SelectionStatement n, A argu) {
522 R _ret=null;
523 n.f0.accept(this, argu);
524 return _ret;
525 }
526
527 /**
528 * <PRE>
529 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
530 * </PRE>
531 */
532 public R visit(IterationStatement n, A argu) {
533 R _ret=null;
534 n.f0.accept(this, argu);
535 return _ret;
536 }
537
538 /**
539 * <PRE>
540 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
541 * </PRE>
542 */
543 public R visit(JumpStatement n, A argu) {
544 R _ret=null;
545 n.f0.accept(this, argu);
546 return _ret;
547 }
548
549 /**
550 * <PRE>
551 * f0 -> AssignmentExpression()
552 * f1 -> ( "," AssignmentExpression() )*
553 * </PRE>
554 */
555 public R visit(Expression n, A argu) {
556 R _ret=null;
557 n.f0.accept(this, argu);
558 n.f1.accept(this, argu);
559 return _ret;
560 }
561
562 /**
563 * <PRE>
564 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
565 * | ConditionalExpression()
566 * </PRE>
567 */
568 public R visit(AssignmentExpression n, A argu) {
569 R _ret=null;
570 n.f0.accept(this, argu);
571 return _ret;
572 }
573
574 /**
575 * <PRE>
576 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
577 * </PRE>
578 */
579 public R visit(AssignmentOperator n, A argu) {
580 R _ret=null;
581 n.f0.accept(this, argu);
582 return _ret;
583 }
584
585 /**
586 * <PRE>
587 * f0 -> LogicalORExpression()
588 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
589 * </PRE>
590 */
591 public R visit(ConditionalExpression n, A argu) {
592 R _ret=null;
593 n.f0.accept(this, argu);
594 n.f1.accept(this, argu);
595 return _ret;
596 }
597
598 /**
599 * <PRE>
600 * f0 -> ConditionalExpression()
601 * </PRE>
602 */
603 public R visit(ConstantExpression n, A argu) {
604 R _ret=null;
605 n.f0.accept(this, argu);
606 return _ret;
607 }
608
609 /**
610 * <PRE>
611 * f0 -> LogicalANDExpression()
612 * f1 -> [ "||" LogicalORExpression() ]
613 * </PRE>
614 */
615 public R visit(LogicalORExpression n, A argu) {
616 R _ret=null;
617 n.f0.accept(this, argu);
618 n.f1.accept(this, argu);
619 return _ret;
620 }
621
622 /**
623 * <PRE>
624 * f0 -> InclusiveORExpression()
625 * f1 -> [ "&&" LogicalANDExpression() ]
626 * </PRE>
627 */
628 public R visit(LogicalANDExpression n, A argu) {
629 R _ret=null;
630 n.f0.accept(this, argu);
631 n.f1.accept(this, argu);
632 return _ret;
633 }
634
635 /**
636 * <PRE>
637 * f0 -> ExclusiveORExpression()
638 * f1 -> [ "|" InclusiveORExpression() ]
639 * </PRE>
640 */
641 public R visit(InclusiveORExpression n, A argu) {
642 R _ret=null;
643 n.f0.accept(this, argu);
644 n.f1.accept(this, argu);
645 return _ret;
646 }
647
648 /**
649 * <PRE>
650 * f0 -> ANDExpression()
651 * f1 -> [ "^" ExclusiveORExpression() ]
652 * </PRE>
653 */
654 public R visit(ExclusiveORExpression n, A argu) {
655 R _ret=null;
656 n.f0.accept(this, argu);
657 n.f1.accept(this, argu);
658 return _ret;
659 }
660
661 /**
662 * <PRE>
663 * f0 -> EqualityExpression()
664 * f1 -> [ "&" ANDExpression() ]
665 * </PRE>
666 */
667 public R visit(ANDExpression n, A argu) {
668 R _ret=null;
669 n.f0.accept(this, argu);
670 n.f1.accept(this, argu);
671 return _ret;
672 }
673
674 /**
675 * <PRE>
676 * f0 -> RelationalExpression()
677 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
678 * </PRE>
679 */
680 public R visit(EqualityExpression n, A argu) {
681 R _ret=null;
682 n.f0.accept(this, argu);
683 n.f1.accept(this, argu);
684 return _ret;
685 }
686
687 /**
688 * <PRE>
689 * f0 -> ShiftExpression()
690 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
691 * </PRE>
692 */
693 public R visit(RelationalExpression n, A argu) {
694 R _ret=null;
695 n.f0.accept(this, argu);
696 n.f1.accept(this, argu);
697 return _ret;
698 }
699
700 /**
701 * <PRE>
702 * f0 -> AdditiveExpression()
703 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
704 * </PRE>
705 */
706 public R visit(ShiftExpression n, A argu) {
707 R _ret=null;
708 n.f0.accept(this, argu);
709 n.f1.accept(this, argu);
710 return _ret;
711 }
712
713 /**
714 * <PRE>
715 * f0 -> MultiplicativeExpression()
716 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
717 * </PRE>
718 */
719 public R visit(AdditiveExpression n, A argu) {
720 R _ret=null;
721 n.f0.accept(this, argu);
722 n.f1.accept(this, argu);
723 return _ret;
724 }
725
726 /**
727 * <PRE>
728 * f0 -> CastExpression()
729 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
730 * </PRE>
731 */
732 public R visit(MultiplicativeExpression n, A argu) {
733 R _ret=null;
734 n.f0.accept(this, argu);
735 n.f1.accept(this, argu);
736 return _ret;
737 }
738
739 /**
740 * <PRE>
741 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
742 * </PRE>
743 */
744 public R visit(CastExpression n, A argu) {
745 R _ret=null;
746 n.f0.accept(this, argu);
747 return _ret;
748 }
749
750 /**
751 * <PRE>
752 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
753 * </PRE>
754 */
755 public R visit(UnaryExpression n, A argu) {
756 R _ret=null;
757 n.f0.accept(this, argu);
758 return _ret;
759 }
760
761 /**
762 * <PRE>
763 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
764 * </PRE>
765 */
766 public R visit(UnaryOperator n, A argu) {
767 R _ret=null;
768 n.f0.accept(this, argu);
769 return _ret;
770 }
771
772 /**
773 * <PRE>
774 * f0 -> PrimaryExpression()
775 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
776 * </PRE>
777 */
778 public R visit(PostfixExpression n, A argu) {
779 R _ret=null;
780 n.f0.accept(this, argu);
781 n.f1.accept(this, argu);
782 return _ret;
783 }
784
785 /**
786 * <PRE>
787 * f0 -> &lt;IDENTIFIER&gt;
788 * | Constant()
789 * | "(" Expression() ")"
790 * </PRE>
791 */
792 public R visit(PrimaryExpression n, A argu) {
793 R _ret=null;
794 n.f0.accept(this, argu);
795 return _ret;
796 }
797
798 /**
799 * <PRE>
800 * f0 -> AssignmentOrTypeExpression()
801 * f1 -> ( "," AssignmentOrTypeExpression() )*
802 * </PRE>
803 */
804 public R visit(ArgumentExpressionList n, A argu) {
805 R _ret=null;
806 n.f0.accept(this, argu);
807 n.f1.accept(this, argu);
808 return _ret;
809 }
810
811 /**
812 * <PRE>
813 * f0 -> NoIdentifierTypeSpecifier()
814 * | AssignmentExpression()
815 * </PRE>
816 */
817 public R visit(AssignmentOrTypeExpression n, A argu) {
818 R _ret=null;
819 n.f0.accept(this, argu);
820 return _ret;
821 }
822
823 /**
824 * <PRE>
825 * f0 -> &lt;INTEGER_LITERAL&gt;
826 * | &lt;FLOATING_POINT_LITERAL&gt;
827 * | &lt;CHARACTER_LITERAL&gt;
828 * | &lt;STRING_LITERAL&gt;
829 * </PRE>
830 */
831 public R visit(Constant n, A argu) {
832 R _ret=null;
833 n.f0.accept(this, argu);
834 return _ret;
835 }
836
837}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguDepthFirst.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguDepthFirst.java
new file mode 100644
index 000000000..fb13e7a2c
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguDepthFirst.java
@@ -0,0 +1,837 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * Provides default methods which visit each node in the tree in depth-first
12 * order. Your visitors may extend this class.
13 */
14public class GJNoArguDepthFirst<R> implements GJNoArguVisitor<R> {
15 //
16 // Auto class visitors--probably don't need to be overridden.
17 //
18 public R visit(NodeList n) {
19 R _ret=null;
20 int _count=0;
21 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
22 e.nextElement().accept(this);
23 _count++;
24 }
25 return _ret;
26 }
27
28 public R visit(NodeListOptional n) {
29 if ( n.present() ) {
30 R _ret=null;
31 int _count=0;
32 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
33 e.nextElement().accept(this);
34 _count++;
35 }
36 return _ret;
37 }
38 else
39 return null;
40 }
41
42 public R visit(NodeOptional n) {
43 if ( n.present() )
44 return n.node.accept(this);
45 else
46 return null;
47 }
48
49 public R visit(NodeSequence n) {
50 R _ret=null;
51 int _count=0;
52 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
53 e.nextElement().accept(this);
54 _count++;
55 }
56 return _ret;
57 }
58
59 public R visit(NodeToken n) { return null; }
60
61 //
62 // User-generated visitor methods below
63 //
64
65 /**
66 * <PRE>
67 * f0 -> ( ExternalDeclaration() )+
68 * </PRE>
69 */
70 public R visit(TranslationUnit n) {
71 R _ret=null;
72 n.f0.accept(this);
73 return _ret;
74 }
75
76 /**
77 * <PRE>
78 * f0 -> ( StorageClassSpecifier() )*
79 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
80 * </PRE>
81 */
82 public R visit(ExternalDeclaration n) {
83 R _ret=null;
84 n.f0.accept(this);
85 n.f1.accept(this);
86 return _ret;
87 }
88
89 /**
90 * <PRE>
91 * f0 -> TypeSpecifier()
92 * f1 -> &lt;IDENTIFIER&gt;
93 * f2 -> "("
94 * f3 -> [ ParameterList() ]
95 * f4 -> ")"
96 * f5 -> ( ";" | CompoundStatement() )
97 * </PRE>
98 */
99 public R visit(FunctionDeclaration n) {
100 R _ret=null;
101 n.f0.accept(this);
102 n.f1.accept(this);
103 n.f2.accept(this);
104 n.f3.accept(this);
105 n.f4.accept(this);
106 n.f5.accept(this);
107 return _ret;
108 }
109
110 /**
111 * <PRE>
112 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
113 * </PRE>
114 */
115 public R visit(StorageClassSpecifier n) {
116 R _ret=null;
117 n.f0.accept(this);
118 return _ret;
119 }
120
121 /**
122 * <PRE>
123 * f0 -> &lt;TYPEDEF&gt;
124 * f1 -> ( DataType() | FunctionType() )
125 * f2 -> ";"
126 * </PRE>
127 */
128 public R visit(TypeDeclaration n) {
129 R _ret=null;
130 n.f0.accept(this);
131 n.f1.accept(this);
132 n.f2.accept(this);
133 return _ret;
134 }
135
136 /**
137 * <PRE>
138 * f0 -> StructOrUnionSpecifier()
139 * f1 -> &lt;IDENTIFIER&gt;
140 * </PRE>
141 */
142 public R visit(DataType n) {
143 R _ret=null;
144 n.f0.accept(this);
145 n.f1.accept(this);
146 return _ret;
147 }
148
149 /**
150 * <PRE>
151 * f0 -> TypeSpecifier()
152 * f1 -> "("
153 * f2 -> "*"
154 * f3 -> &lt;IDENTIFIER&gt;
155 * f4 -> ")"
156 * f5 -> "("
157 * f6 -> [ ParameterList() ]
158 * f7 -> ")"
159 * </PRE>
160 */
161 public R visit(FunctionType n) {
162 R _ret=null;
163 n.f0.accept(this);
164 n.f1.accept(this);
165 n.f2.accept(this);
166 n.f3.accept(this);
167 n.f4.accept(this);
168 n.f5.accept(this);
169 n.f6.accept(this);
170 n.f7.accept(this);
171 return _ret;
172 }
173
174 /**
175 * <PRE>
176 * f0 -> ParameterDeclaration()
177 * f1 -> ( "," ParameterDeclaration() )*
178 * f2 -> [ "," "..." ]
179 * </PRE>
180 */
181 public R visit(ParameterList n) {
182 R _ret=null;
183 n.f0.accept(this);
184 n.f1.accept(this);
185 n.f2.accept(this);
186 return _ret;
187 }
188
189 /**
190 * <PRE>
191 * f0 -> TypeSpecifier()
192 * f1 -> &lt;IDENTIFIER&gt;
193 * f2 -> [ Array() ]
194 * </PRE>
195 */
196 public R visit(ParameterDeclaration n) {
197 R _ret=null;
198 n.f0.accept(this);
199 n.f1.accept(this);
200 n.f2.accept(this);
201 return _ret;
202 }
203
204 /**
205 * <PRE>
206 * f0 -> VariableClassSpecifier()
207 * f1 -> TypeSpecifier()
208 * f2 -> InitDeclaratorList()
209 * f3 -> ";"
210 * </PRE>
211 */
212 public R visit(VariableDeclaration n) {
213 R _ret=null;
214 n.f0.accept(this);
215 n.f1.accept(this);
216 n.f2.accept(this);
217 n.f3.accept(this);
218 return _ret;
219 }
220
221 /**
222 * <PRE>
223 * f0 -> [ &lt;STATIC&gt; ]
224 * f1 -> VariableDeclaration()
225 * </PRE>
226 */
227 public R visit(LocalVariableDeclaration n) {
228 R _ret=null;
229 n.f0.accept(this);
230 n.f1.accept(this);
231 return _ret;
232 }
233
234 /**
235 * <PRE>
236 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
237 * </PRE>
238 */
239 public R visit(VariableClassSpecifier n) {
240 R _ret=null;
241 n.f0.accept(this);
242 return _ret;
243 }
244
245 /**
246 * <PRE>
247 * f0 -> [ &lt;CONST&gt; ]
248 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
249 * f2 -> [ Pointer() ]
250 * f3 -> [ Array() ]
251 * </PRE>
252 */
253 public R visit(TypeSpecifier n) {
254 R _ret=null;
255 n.f0.accept(this);
256 n.f1.accept(this);
257 n.f2.accept(this);
258 n.f3.accept(this);
259 return _ret;
260 }
261
262 /**
263 * <PRE>
264 * f0 -> [ &lt;CONST&gt; ]
265 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
266 * f2 -> [ Pointer() ]
267 * f3 -> [ Array() ]
268 * </PRE>
269 */
270 public R visit(NoIdentifierTypeSpecifier n) {
271 R _ret=null;
272 n.f0.accept(this);
273 n.f1.accept(this);
274 n.f2.accept(this);
275 n.f3.accept(this);
276 return _ret;
277 }
278
279 /**
280 * <PRE>
281 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
282 * | StructOrUnion() &lt;IDENTIFIER&gt;
283 * </PRE>
284 */
285 public R visit(StructOrUnionSpecifier n) {
286 R _ret=null;
287 n.f0.accept(this);
288 return _ret;
289 }
290
291 /**
292 * <PRE>
293 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
294 * </PRE>
295 */
296 public R visit(StructOrUnion n) {
297 R _ret=null;
298 n.f0.accept(this);
299 return _ret;
300 }
301
302 /**
303 * <PRE>
304 * f0 -> ( StructDeclaration() )+
305 * </PRE>
306 */
307 public R visit(StructDeclarationList n) {
308 R _ret=null;
309 n.f0.accept(this);
310 return _ret;
311 }
312
313 /**
314 * <PRE>
315 * f0 -> InitDeclarator()
316 * f1 -> ( "," InitDeclarator() )*
317 * </PRE>
318 */
319 public R visit(InitDeclaratorList n) {
320 R _ret=null;
321 n.f0.accept(this);
322 n.f1.accept(this);
323 return _ret;
324 }
325
326 /**
327 * <PRE>
328 * f0 -> &lt;IDENTIFIER&gt;
329 * f1 -> [ Array() ]
330 * f2 -> [ "=" Initializer() ]
331 * </PRE>
332 */
333 public R visit(InitDeclarator n) {
334 R _ret=null;
335 n.f0.accept(this);
336 n.f1.accept(this);
337 n.f2.accept(this);
338 return _ret;
339 }
340
341 /**
342 * <PRE>
343 * f0 -> TypeSpecifier()
344 * f1 -> &lt;IDENTIFIER&gt;
345 * f2 -> [ Array() | ":" ConstantExpression() ]
346 * f3 -> [ &lt;IDENTIFIER&gt; ]
347 * f4 -> ";"
348 * </PRE>
349 */
350 public R visit(StructDeclaration n) {
351 R _ret=null;
352 n.f0.accept(this);
353 n.f1.accept(this);
354 n.f2.accept(this);
355 n.f3.accept(this);
356 n.f4.accept(this);
357 return _ret;
358 }
359
360 /**
361 * <PRE>
362 * f0 -> &lt;ENUM&gt;
363 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
364 * </PRE>
365 */
366 public R visit(EnumSpecifier n) {
367 R _ret=null;
368 n.f0.accept(this);
369 n.f1.accept(this);
370 return _ret;
371 }
372
373 /**
374 * <PRE>
375 * f0 -> Enumerator()
376 * f1 -> ( "," Enumerator() )*
377 * </PRE>
378 */
379 public R visit(EnumeratorList n) {
380 R _ret=null;
381 n.f0.accept(this);
382 n.f1.accept(this);
383 return _ret;
384 }
385
386 /**
387 * <PRE>
388 * f0 -> &lt;IDENTIFIER&gt;
389 * f1 -> [ "=" ConstantExpression() ]
390 * </PRE>
391 */
392 public R visit(Enumerator n) {
393 R _ret=null;
394 n.f0.accept(this);
395 n.f1.accept(this);
396 return _ret;
397 }
398
399 /**
400 * <PRE>
401 * f0 -> "*"
402 * f1 -> [ &lt;CONST&gt; ]
403 * f2 -> [ Pointer() ]
404 * </PRE>
405 */
406 public R visit(Pointer n) {
407 R _ret=null;
408 n.f0.accept(this);
409 n.f1.accept(this);
410 n.f2.accept(this);
411 return _ret;
412 }
413
414 /**
415 * <PRE>
416 * f0 -> &lt;IDENTIFIER&gt;
417 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
418 * </PRE>
419 */
420 public R visit(IdentifierList n) {
421 R _ret=null;
422 n.f0.accept(this);
423 n.f1.accept(this);
424 return _ret;
425 }
426
427 /**
428 * <PRE>
429 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
430 * </PRE>
431 */
432 public R visit(Initializer n) {
433 R _ret=null;
434 n.f0.accept(this);
435 return _ret;
436 }
437
438 /**
439 * <PRE>
440 * f0 -> Initializer()
441 * f1 -> ( "," Initializer() )*
442 * </PRE>
443 */
444 public R visit(InitializerList n) {
445 R _ret=null;
446 n.f0.accept(this);
447 n.f1.accept(this);
448 return _ret;
449 }
450
451 /**
452 * <PRE>
453 * f0 -> "["
454 * f1 -> [ ConstantExpression() ]
455 * f2 -> "]"
456 * </PRE>
457 */
458 public R visit(Array n) {
459 R _ret=null;
460 n.f0.accept(this);
461 n.f1.accept(this);
462 n.f2.accept(this);
463 return _ret;
464 }
465
466 /**
467 * <PRE>
468 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
469 * </PRE>
470 */
471 public R visit(Statement n) {
472 R _ret=null;
473 n.f0.accept(this);
474 return _ret;
475 }
476
477 /**
478 * <PRE>
479 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
480 * </PRE>
481 */
482 public R visit(LabeledStatement n) {
483 R _ret=null;
484 n.f0.accept(this);
485 return _ret;
486 }
487
488 /**
489 * <PRE>
490 * f0 -> [ Expression() ]
491 * f1 -> ";"
492 * </PRE>
493 */
494 public R visit(ExpressionStatement n) {
495 R _ret=null;
496 n.f0.accept(this);
497 n.f1.accept(this);
498 return _ret;
499 }
500
501 /**
502 * <PRE>
503 * f0 -> "{"
504 * f1 -> ( LocalVariableDeclaration() | Statement() )*
505 * f2 -> "}"
506 * </PRE>
507 */
508 public R visit(CompoundStatement n) {
509 R _ret=null;
510 n.f0.accept(this);
511 n.f1.accept(this);
512 n.f2.accept(this);
513 return _ret;
514 }
515
516 /**
517 * <PRE>
518 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
519 * </PRE>
520 */
521 public R visit(SelectionStatement n) {
522 R _ret=null;
523 n.f0.accept(this);
524 return _ret;
525 }
526
527 /**
528 * <PRE>
529 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
530 * </PRE>
531 */
532 public R visit(IterationStatement n) {
533 R _ret=null;
534 n.f0.accept(this);
535 return _ret;
536 }
537
538 /**
539 * <PRE>
540 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
541 * </PRE>
542 */
543 public R visit(JumpStatement n) {
544 R _ret=null;
545 n.f0.accept(this);
546 return _ret;
547 }
548
549 /**
550 * <PRE>
551 * f0 -> AssignmentExpression()
552 * f1 -> ( "," AssignmentExpression() )*
553 * </PRE>
554 */
555 public R visit(Expression n) {
556 R _ret=null;
557 n.f0.accept(this);
558 n.f1.accept(this);
559 return _ret;
560 }
561
562 /**
563 * <PRE>
564 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
565 * | ConditionalExpression()
566 * </PRE>
567 */
568 public R visit(AssignmentExpression n) {
569 R _ret=null;
570 n.f0.accept(this);
571 return _ret;
572 }
573
574 /**
575 * <PRE>
576 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
577 * </PRE>
578 */
579 public R visit(AssignmentOperator n) {
580 R _ret=null;
581 n.f0.accept(this);
582 return _ret;
583 }
584
585 /**
586 * <PRE>
587 * f0 -> LogicalORExpression()
588 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
589 * </PRE>
590 */
591 public R visit(ConditionalExpression n) {
592 R _ret=null;
593 n.f0.accept(this);
594 n.f1.accept(this);
595 return _ret;
596 }
597
598 /**
599 * <PRE>
600 * f0 -> ConditionalExpression()
601 * </PRE>
602 */
603 public R visit(ConstantExpression n) {
604 R _ret=null;
605 n.f0.accept(this);
606 return _ret;
607 }
608
609 /**
610 * <PRE>
611 * f0 -> LogicalANDExpression()
612 * f1 -> [ "||" LogicalORExpression() ]
613 * </PRE>
614 */
615 public R visit(LogicalORExpression n) {
616 R _ret=null;
617 n.f0.accept(this);
618 n.f1.accept(this);
619 return _ret;
620 }
621
622 /**
623 * <PRE>
624 * f0 -> InclusiveORExpression()
625 * f1 -> [ "&&" LogicalANDExpression() ]
626 * </PRE>
627 */
628 public R visit(LogicalANDExpression n) {
629 R _ret=null;
630 n.f0.accept(this);
631 n.f1.accept(this);
632 return _ret;
633 }
634
635 /**
636 * <PRE>
637 * f0 -> ExclusiveORExpression()
638 * f1 -> [ "|" InclusiveORExpression() ]
639 * </PRE>
640 */
641 public R visit(InclusiveORExpression n) {
642 R _ret=null;
643 n.f0.accept(this);
644 n.f1.accept(this);
645 return _ret;
646 }
647
648 /**
649 * <PRE>
650 * f0 -> ANDExpression()
651 * f1 -> [ "^" ExclusiveORExpression() ]
652 * </PRE>
653 */
654 public R visit(ExclusiveORExpression n) {
655 R _ret=null;
656 n.f0.accept(this);
657 n.f1.accept(this);
658 return _ret;
659 }
660
661 /**
662 * <PRE>
663 * f0 -> EqualityExpression()
664 * f1 -> [ "&" ANDExpression() ]
665 * </PRE>
666 */
667 public R visit(ANDExpression n) {
668 R _ret=null;
669 n.f0.accept(this);
670 n.f1.accept(this);
671 return _ret;
672 }
673
674 /**
675 * <PRE>
676 * f0 -> RelationalExpression()
677 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
678 * </PRE>
679 */
680 public R visit(EqualityExpression n) {
681 R _ret=null;
682 n.f0.accept(this);
683 n.f1.accept(this);
684 return _ret;
685 }
686
687 /**
688 * <PRE>
689 * f0 -> ShiftExpression()
690 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
691 * </PRE>
692 */
693 public R visit(RelationalExpression n) {
694 R _ret=null;
695 n.f0.accept(this);
696 n.f1.accept(this);
697 return _ret;
698 }
699
700 /**
701 * <PRE>
702 * f0 -> AdditiveExpression()
703 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
704 * </PRE>
705 */
706 public R visit(ShiftExpression n) {
707 R _ret=null;
708 n.f0.accept(this);
709 n.f1.accept(this);
710 return _ret;
711 }
712
713 /**
714 * <PRE>
715 * f0 -> MultiplicativeExpression()
716 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
717 * </PRE>
718 */
719 public R visit(AdditiveExpression n) {
720 R _ret=null;
721 n.f0.accept(this);
722 n.f1.accept(this);
723 return _ret;
724 }
725
726 /**
727 * <PRE>
728 * f0 -> CastExpression()
729 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
730 * </PRE>
731 */
732 public R visit(MultiplicativeExpression n) {
733 R _ret=null;
734 n.f0.accept(this);
735 n.f1.accept(this);
736 return _ret;
737 }
738
739 /**
740 * <PRE>
741 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
742 * </PRE>
743 */
744 public R visit(CastExpression n) {
745 R _ret=null;
746 n.f0.accept(this);
747 return _ret;
748 }
749
750 /**
751 * <PRE>
752 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
753 * </PRE>
754 */
755 public R visit(UnaryExpression n) {
756 R _ret=null;
757 n.f0.accept(this);
758 return _ret;
759 }
760
761 /**
762 * <PRE>
763 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
764 * </PRE>
765 */
766 public R visit(UnaryOperator n) {
767 R _ret=null;
768 n.f0.accept(this);
769 return _ret;
770 }
771
772 /**
773 * <PRE>
774 * f0 -> PrimaryExpression()
775 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
776 * </PRE>
777 */
778 public R visit(PostfixExpression n) {
779 R _ret=null;
780 n.f0.accept(this);
781 n.f1.accept(this);
782 return _ret;
783 }
784
785 /**
786 * <PRE>
787 * f0 -> &lt;IDENTIFIER&gt;
788 * | Constant()
789 * | "(" Expression() ")"
790 * </PRE>
791 */
792 public R visit(PrimaryExpression n) {
793 R _ret=null;
794 n.f0.accept(this);
795 return _ret;
796 }
797
798 /**
799 * <PRE>
800 * f0 -> AssignmentOrTypeExpression()
801 * f1 -> ( "," AssignmentOrTypeExpression() )*
802 * </PRE>
803 */
804 public R visit(ArgumentExpressionList n) {
805 R _ret=null;
806 n.f0.accept(this);
807 n.f1.accept(this);
808 return _ret;
809 }
810
811 /**
812 * <PRE>
813 * f0 -> NoIdentifierTypeSpecifier()
814 * | AssignmentExpression()
815 * </PRE>
816 */
817 public R visit(AssignmentOrTypeExpression n) {
818 R _ret=null;
819 n.f0.accept(this);
820 return _ret;
821 }
822
823 /**
824 * <PRE>
825 * f0 -> &lt;INTEGER_LITERAL&gt;
826 * | &lt;FLOATING_POINT_LITERAL&gt;
827 * | &lt;CHARACTER_LITERAL&gt;
828 * | &lt;STRING_LITERAL&gt;
829 * </PRE>
830 */
831 public R visit(Constant n) {
832 R _ret=null;
833 n.f0.accept(this);
834 return _ret;
835 }
836
837}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguVisitor.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguVisitor.java
new file mode 100644
index 000000000..0e32ab25d
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJNoArguVisitor.java
@@ -0,0 +1,508 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * All GJ visitors with no argument must implement this interface.
12 */
13
14public interface GJNoArguVisitor<R> {
15
16 //
17 // GJ Auto class visitors with no argument
18 //
19
20 public R visit(NodeList n);
21 public R visit(NodeListOptional n);
22 public R visit(NodeOptional n);
23 public R visit(NodeSequence n);
24 public R visit(NodeToken n);
25
26 //
27 // User-generated visitor methods below
28 //
29
30 /**
31 * <PRE>
32 * f0 -> ( ExternalDeclaration() )+
33 * </PRE>
34 */
35 public R visit(TranslationUnit n);
36
37 /**
38 * <PRE>
39 * f0 -> ( StorageClassSpecifier() )*
40 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
41 * </PRE>
42 */
43 public R visit(ExternalDeclaration n);
44
45 /**
46 * <PRE>
47 * f0 -> TypeSpecifier()
48 * f1 -> &lt;IDENTIFIER&gt;
49 * f2 -> "("
50 * f3 -> [ ParameterList() ]
51 * f4 -> ")"
52 * f5 -> ( ";" | CompoundStatement() )
53 * </PRE>
54 */
55 public R visit(FunctionDeclaration n);
56
57 /**
58 * <PRE>
59 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
60 * </PRE>
61 */
62 public R visit(StorageClassSpecifier n);
63
64 /**
65 * <PRE>
66 * f0 -> &lt;TYPEDEF&gt;
67 * f1 -> ( DataType() | FunctionType() )
68 * f2 -> ";"
69 * </PRE>
70 */
71 public R visit(TypeDeclaration n);
72
73 /**
74 * <PRE>
75 * f0 -> StructOrUnionSpecifier()
76 * f1 -> &lt;IDENTIFIER&gt;
77 * </PRE>
78 */
79 public R visit(DataType n);
80
81 /**
82 * <PRE>
83 * f0 -> TypeSpecifier()
84 * f1 -> "("
85 * f2 -> "*"
86 * f3 -> &lt;IDENTIFIER&gt;
87 * f4 -> ")"
88 * f5 -> "("
89 * f6 -> [ ParameterList() ]
90 * f7 -> ")"
91 * </PRE>
92 */
93 public R visit(FunctionType n);
94
95 /**
96 * <PRE>
97 * f0 -> ParameterDeclaration()
98 * f1 -> ( "," ParameterDeclaration() )*
99 * f2 -> [ "," "..." ]
100 * </PRE>
101 */
102 public R visit(ParameterList n);
103
104 /**
105 * <PRE>
106 * f0 -> TypeSpecifier()
107 * f1 -> &lt;IDENTIFIER&gt;
108 * f2 -> [ Array() ]
109 * </PRE>
110 */
111 public R visit(ParameterDeclaration n);
112
113 /**
114 * <PRE>
115 * f0 -> VariableClassSpecifier()
116 * f1 -> TypeSpecifier()
117 * f2 -> InitDeclaratorList()
118 * f3 -> ";"
119 * </PRE>
120 */
121 public R visit(VariableDeclaration n);
122
123 /**
124 * <PRE>
125 * f0 -> [ &lt;STATIC&gt; ]
126 * f1 -> VariableDeclaration()
127 * </PRE>
128 */
129 public R visit(LocalVariableDeclaration n);
130
131 /**
132 * <PRE>
133 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
134 * </PRE>
135 */
136 public R visit(VariableClassSpecifier n);
137
138 /**
139 * <PRE>
140 * f0 -> [ &lt;CONST&gt; ]
141 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
142 * f2 -> [ Pointer() ]
143 * f3 -> [ Array() ]
144 * </PRE>
145 */
146 public R visit(TypeSpecifier n);
147
148 /**
149 * <PRE>
150 * f0 -> [ &lt;CONST&gt; ]
151 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
152 * f2 -> [ Pointer() ]
153 * f3 -> [ Array() ]
154 * </PRE>
155 */
156 public R visit(NoIdentifierTypeSpecifier n);
157
158 /**
159 * <PRE>
160 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
161 * | StructOrUnion() &lt;IDENTIFIER&gt;
162 * </PRE>
163 */
164 public R visit(StructOrUnionSpecifier n);
165
166 /**
167 * <PRE>
168 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
169 * </PRE>
170 */
171 public R visit(StructOrUnion n);
172
173 /**
174 * <PRE>
175 * f0 -> ( StructDeclaration() )+
176 * </PRE>
177 */
178 public R visit(StructDeclarationList n);
179
180 /**
181 * <PRE>
182 * f0 -> InitDeclarator()
183 * f1 -> ( "," InitDeclarator() )*
184 * </PRE>
185 */
186 public R visit(InitDeclaratorList n);
187
188 /**
189 * <PRE>
190 * f0 -> &lt;IDENTIFIER&gt;
191 * f1 -> [ Array() ]
192 * f2 -> [ "=" Initializer() ]
193 * </PRE>
194 */
195 public R visit(InitDeclarator n);
196
197 /**
198 * <PRE>
199 * f0 -> TypeSpecifier()
200 * f1 -> &lt;IDENTIFIER&gt;
201 * f2 -> [ Array() | ":" ConstantExpression() ]
202 * f3 -> [ &lt;IDENTIFIER&gt; ]
203 * f4 -> ";"
204 * </PRE>
205 */
206 public R visit(StructDeclaration n);
207
208 /**
209 * <PRE>
210 * f0 -> &lt;ENUM&gt;
211 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
212 * </PRE>
213 */
214 public R visit(EnumSpecifier n);
215
216 /**
217 * <PRE>
218 * f0 -> Enumerator()
219 * f1 -> ( "," Enumerator() )*
220 * </PRE>
221 */
222 public R visit(EnumeratorList n);
223
224 /**
225 * <PRE>
226 * f0 -> &lt;IDENTIFIER&gt;
227 * f1 -> [ "=" ConstantExpression() ]
228 * </PRE>
229 */
230 public R visit(Enumerator n);
231
232 /**
233 * <PRE>
234 * f0 -> "*"
235 * f1 -> [ &lt;CONST&gt; ]
236 * f2 -> [ Pointer() ]
237 * </PRE>
238 */
239 public R visit(Pointer n);
240
241 /**
242 * <PRE>
243 * f0 -> &lt;IDENTIFIER&gt;
244 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
245 * </PRE>
246 */
247 public R visit(IdentifierList n);
248
249 /**
250 * <PRE>
251 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
252 * </PRE>
253 */
254 public R visit(Initializer n);
255
256 /**
257 * <PRE>
258 * f0 -> Initializer()
259 * f1 -> ( "," Initializer() )*
260 * </PRE>
261 */
262 public R visit(InitializerList n);
263
264 /**
265 * <PRE>
266 * f0 -> "["
267 * f1 -> [ ConstantExpression() ]
268 * f2 -> "]"
269 * </PRE>
270 */
271 public R visit(Array n);
272
273 /**
274 * <PRE>
275 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
276 * </PRE>
277 */
278 public R visit(Statement n);
279
280 /**
281 * <PRE>
282 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
283 * </PRE>
284 */
285 public R visit(LabeledStatement n);
286
287 /**
288 * <PRE>
289 * f0 -> [ Expression() ]
290 * f1 -> ";"
291 * </PRE>
292 */
293 public R visit(ExpressionStatement n);
294
295 /**
296 * <PRE>
297 * f0 -> "{"
298 * f1 -> ( LocalVariableDeclaration() | Statement() )*
299 * f2 -> "}"
300 * </PRE>
301 */
302 public R visit(CompoundStatement n);
303
304 /**
305 * <PRE>
306 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
307 * </PRE>
308 */
309 public R visit(SelectionStatement n);
310
311 /**
312 * <PRE>
313 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
314 * </PRE>
315 */
316 public R visit(IterationStatement n);
317
318 /**
319 * <PRE>
320 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
321 * </PRE>
322 */
323 public R visit(JumpStatement n);
324
325 /**
326 * <PRE>
327 * f0 -> AssignmentExpression()
328 * f1 -> ( "," AssignmentExpression() )*
329 * </PRE>
330 */
331 public R visit(Expression n);
332
333 /**
334 * <PRE>
335 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
336 * | ConditionalExpression()
337 * </PRE>
338 */
339 public R visit(AssignmentExpression n);
340
341 /**
342 * <PRE>
343 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
344 * </PRE>
345 */
346 public R visit(AssignmentOperator n);
347
348 /**
349 * <PRE>
350 * f0 -> LogicalORExpression()
351 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
352 * </PRE>
353 */
354 public R visit(ConditionalExpression n);
355
356 /**
357 * <PRE>
358 * f0 -> ConditionalExpression()
359 * </PRE>
360 */
361 public R visit(ConstantExpression n);
362
363 /**
364 * <PRE>
365 * f0 -> LogicalANDExpression()
366 * f1 -> [ "||" LogicalORExpression() ]
367 * </PRE>
368 */
369 public R visit(LogicalORExpression n);
370
371 /**
372 * <PRE>
373 * f0 -> InclusiveORExpression()
374 * f1 -> [ "&&" LogicalANDExpression() ]
375 * </PRE>
376 */
377 public R visit(LogicalANDExpression n);
378
379 /**
380 * <PRE>
381 * f0 -> ExclusiveORExpression()
382 * f1 -> [ "|" InclusiveORExpression() ]
383 * </PRE>
384 */
385 public R visit(InclusiveORExpression n);
386
387 /**
388 * <PRE>
389 * f0 -> ANDExpression()
390 * f1 -> [ "^" ExclusiveORExpression() ]
391 * </PRE>
392 */
393 public R visit(ExclusiveORExpression n);
394
395 /**
396 * <PRE>
397 * f0 -> EqualityExpression()
398 * f1 -> [ "&" ANDExpression() ]
399 * </PRE>
400 */
401 public R visit(ANDExpression n);
402
403 /**
404 * <PRE>
405 * f0 -> RelationalExpression()
406 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
407 * </PRE>
408 */
409 public R visit(EqualityExpression n);
410
411 /**
412 * <PRE>
413 * f0 -> ShiftExpression()
414 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
415 * </PRE>
416 */
417 public R visit(RelationalExpression n);
418
419 /**
420 * <PRE>
421 * f0 -> AdditiveExpression()
422 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
423 * </PRE>
424 */
425 public R visit(ShiftExpression n);
426
427 /**
428 * <PRE>
429 * f0 -> MultiplicativeExpression()
430 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
431 * </PRE>
432 */
433 public R visit(AdditiveExpression n);
434
435 /**
436 * <PRE>
437 * f0 -> CastExpression()
438 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
439 * </PRE>
440 */
441 public R visit(MultiplicativeExpression n);
442
443 /**
444 * <PRE>
445 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
446 * </PRE>
447 */
448 public R visit(CastExpression n);
449
450 /**
451 * <PRE>
452 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
453 * </PRE>
454 */
455 public R visit(UnaryExpression n);
456
457 /**
458 * <PRE>
459 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
460 * </PRE>
461 */
462 public R visit(UnaryOperator n);
463
464 /**
465 * <PRE>
466 * f0 -> PrimaryExpression()
467 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
468 * </PRE>
469 */
470 public R visit(PostfixExpression n);
471
472 /**
473 * <PRE>
474 * f0 -> &lt;IDENTIFIER&gt;
475 * | Constant()
476 * | "(" Expression() ")"
477 * </PRE>
478 */
479 public R visit(PrimaryExpression n);
480
481 /**
482 * <PRE>
483 * f0 -> AssignmentOrTypeExpression()
484 * f1 -> ( "," AssignmentOrTypeExpression() )*
485 * </PRE>
486 */
487 public R visit(ArgumentExpressionList n);
488
489 /**
490 * <PRE>
491 * f0 -> NoIdentifierTypeSpecifier()
492 * | AssignmentExpression()
493 * </PRE>
494 */
495 public R visit(AssignmentOrTypeExpression n);
496
497 /**
498 * <PRE>
499 * f0 -> &lt;INTEGER_LITERAL&gt;
500 * | &lt;FLOATING_POINT_LITERAL&gt;
501 * | &lt;CHARACTER_LITERAL&gt;
502 * | &lt;STRING_LITERAL&gt;
503 * </PRE>
504 */
505 public R visit(Constant n);
506
507}
508
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVisitor.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVisitor.java
new file mode 100644
index 000000000..431c1953a
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVisitor.java
@@ -0,0 +1,507 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * All GJ visitors must implement this interface.
12 */
13
14public interface GJVisitor<R,A> {
15
16 //
17 // GJ Auto class visitors
18 //
19
20 public R visit(NodeList n, A argu);
21 public R visit(NodeListOptional n, A argu);
22 public R visit(NodeOptional n, A argu);
23 public R visit(NodeSequence n, A argu);
24 public R visit(NodeToken n, A argu);
25
26 //
27 // User-generated visitor methods below
28 //
29
30 /**
31 * <PRE>
32 * f0 -> ( ExternalDeclaration() )+
33 * </PRE>
34 */
35 public R visit(TranslationUnit n, A argu);
36
37 /**
38 * <PRE>
39 * f0 -> ( StorageClassSpecifier() )*
40 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
41 * </PRE>
42 */
43 public R visit(ExternalDeclaration n, A argu);
44
45 /**
46 * <PRE>
47 * f0 -> TypeSpecifier()
48 * f1 -> &lt;IDENTIFIER&gt;
49 * f2 -> "("
50 * f3 -> [ ParameterList() ]
51 * f4 -> ")"
52 * f5 -> ( ";" | CompoundStatement() )
53 * </PRE>
54 */
55 public R visit(FunctionDeclaration n, A argu);
56
57 /**
58 * <PRE>
59 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
60 * </PRE>
61 */
62 public R visit(StorageClassSpecifier n, A argu);
63
64 /**
65 * <PRE>
66 * f0 -> &lt;TYPEDEF&gt;
67 * f1 -> ( DataType() | FunctionType() )
68 * f2 -> ";"
69 * </PRE>
70 */
71 public R visit(TypeDeclaration n, A argu);
72
73 /**
74 * <PRE>
75 * f0 -> StructOrUnionSpecifier()
76 * f1 -> &lt;IDENTIFIER&gt;
77 * </PRE>
78 */
79 public R visit(DataType n, A argu);
80
81 /**
82 * <PRE>
83 * f0 -> TypeSpecifier()
84 * f1 -> "("
85 * f2 -> "*"
86 * f3 -> &lt;IDENTIFIER&gt;
87 * f4 -> ")"
88 * f5 -> "("
89 * f6 -> [ ParameterList() ]
90 * f7 -> ")"
91 * </PRE>
92 */
93 public R visit(FunctionType n, A argu);
94
95 /**
96 * <PRE>
97 * f0 -> ParameterDeclaration()
98 * f1 -> ( "," ParameterDeclaration() )*
99 * f2 -> [ "," "..." ]
100 * </PRE>
101 */
102 public R visit(ParameterList n, A argu);
103
104 /**
105 * <PRE>
106 * f0 -> TypeSpecifier()
107 * f1 -> &lt;IDENTIFIER&gt;
108 * f2 -> [ Array() ]
109 * </PRE>
110 */
111 public R visit(ParameterDeclaration n, A argu);
112
113 /**
114 * <PRE>
115 * f0 -> VariableClassSpecifier()
116 * f1 -> TypeSpecifier()
117 * f2 -> InitDeclaratorList()
118 * f3 -> ";"
119 * </PRE>
120 */
121 public R visit(VariableDeclaration n, A argu);
122
123 /**
124 * <PRE>
125 * f0 -> [ &lt;STATIC&gt; ]
126 * f1 -> VariableDeclaration()
127 * </PRE>
128 */
129 public R visit(LocalVariableDeclaration n, A argu);
130
131 /**
132 * <PRE>
133 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
134 * </PRE>
135 */
136 public R visit(VariableClassSpecifier n, A argu);
137
138 /**
139 * <PRE>
140 * f0 -> [ &lt;CONST&gt; ]
141 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
142 * f2 -> [ Pointer() ]
143 * f3 -> [ Array() ]
144 * </PRE>
145 */
146 public R visit(TypeSpecifier n, A argu);
147
148 /**
149 * <PRE>
150 * f0 -> [ &lt;CONST&gt; ]
151 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
152 * f2 -> [ Pointer() ]
153 * f3 -> [ Array() ]
154 * </PRE>
155 */
156 public R visit(NoIdentifierTypeSpecifier n, A argu);
157
158 /**
159 * <PRE>
160 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
161 * | StructOrUnion() &lt;IDENTIFIER&gt;
162 * </PRE>
163 */
164 public R visit(StructOrUnionSpecifier n, A argu);
165
166 /**
167 * <PRE>
168 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
169 * </PRE>
170 */
171 public R visit(StructOrUnion n, A argu);
172
173 /**
174 * <PRE>
175 * f0 -> ( StructDeclaration() )+
176 * </PRE>
177 */
178 public R visit(StructDeclarationList n, A argu);
179
180 /**
181 * <PRE>
182 * f0 -> InitDeclarator()
183 * f1 -> ( "," InitDeclarator() )*
184 * </PRE>
185 */
186 public R visit(InitDeclaratorList n, A argu);
187
188 /**
189 * <PRE>
190 * f0 -> &lt;IDENTIFIER&gt;
191 * f1 -> [ Array() ]
192 * f2 -> [ "=" Initializer() ]
193 * </PRE>
194 */
195 public R visit(InitDeclarator n, A argu);
196
197 /**
198 * <PRE>
199 * f0 -> TypeSpecifier()
200 * f1 -> &lt;IDENTIFIER&gt;
201 * f2 -> [ Array() | ":" ConstantExpression() ]
202 * f3 -> [ &lt;IDENTIFIER&gt; ]
203 * f4 -> ";"
204 * </PRE>
205 */
206 public R visit(StructDeclaration n, A argu);
207
208 /**
209 * <PRE>
210 * f0 -> &lt;ENUM&gt;
211 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
212 * </PRE>
213 */
214 public R visit(EnumSpecifier n, A argu);
215
216 /**
217 * <PRE>
218 * f0 -> Enumerator()
219 * f1 -> ( "," Enumerator() )*
220 * </PRE>
221 */
222 public R visit(EnumeratorList n, A argu);
223
224 /**
225 * <PRE>
226 * f0 -> &lt;IDENTIFIER&gt;
227 * f1 -> [ "=" ConstantExpression() ]
228 * </PRE>
229 */
230 public R visit(Enumerator n, A argu);
231
232 /**
233 * <PRE>
234 * f0 -> "*"
235 * f1 -> [ &lt;CONST&gt; ]
236 * f2 -> [ Pointer() ]
237 * </PRE>
238 */
239 public R visit(Pointer n, A argu);
240
241 /**
242 * <PRE>
243 * f0 -> &lt;IDENTIFIER&gt;
244 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
245 * </PRE>
246 */
247 public R visit(IdentifierList n, A argu);
248
249 /**
250 * <PRE>
251 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
252 * </PRE>
253 */
254 public R visit(Initializer n, A argu);
255
256 /**
257 * <PRE>
258 * f0 -> Initializer()
259 * f1 -> ( "," Initializer() )*
260 * </PRE>
261 */
262 public R visit(InitializerList n, A argu);
263
264 /**
265 * <PRE>
266 * f0 -> "["
267 * f1 -> [ ConstantExpression() ]
268 * f2 -> "]"
269 * </PRE>
270 */
271 public R visit(Array n, A argu);
272
273 /**
274 * <PRE>
275 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
276 * </PRE>
277 */
278 public R visit(Statement n, A argu);
279
280 /**
281 * <PRE>
282 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
283 * </PRE>
284 */
285 public R visit(LabeledStatement n, A argu);
286
287 /**
288 * <PRE>
289 * f0 -> [ Expression() ]
290 * f1 -> ";"
291 * </PRE>
292 */
293 public R visit(ExpressionStatement n, A argu);
294
295 /**
296 * <PRE>
297 * f0 -> "{"
298 * f1 -> ( LocalVariableDeclaration() | Statement() )*
299 * f2 -> "}"
300 * </PRE>
301 */
302 public R visit(CompoundStatement n, A argu);
303
304 /**
305 * <PRE>
306 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
307 * </PRE>
308 */
309 public R visit(SelectionStatement n, A argu);
310
311 /**
312 * <PRE>
313 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
314 * </PRE>
315 */
316 public R visit(IterationStatement n, A argu);
317
318 /**
319 * <PRE>
320 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
321 * </PRE>
322 */
323 public R visit(JumpStatement n, A argu);
324
325 /**
326 * <PRE>
327 * f0 -> AssignmentExpression()
328 * f1 -> ( "," AssignmentExpression() )*
329 * </PRE>
330 */
331 public R visit(Expression n, A argu);
332
333 /**
334 * <PRE>
335 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
336 * | ConditionalExpression()
337 * </PRE>
338 */
339 public R visit(AssignmentExpression n, A argu);
340
341 /**
342 * <PRE>
343 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
344 * </PRE>
345 */
346 public R visit(AssignmentOperator n, A argu);
347
348 /**
349 * <PRE>
350 * f0 -> LogicalORExpression()
351 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
352 * </PRE>
353 */
354 public R visit(ConditionalExpression n, A argu);
355
356 /**
357 * <PRE>
358 * f0 -> ConditionalExpression()
359 * </PRE>
360 */
361 public R visit(ConstantExpression n, A argu);
362
363 /**
364 * <PRE>
365 * f0 -> LogicalANDExpression()
366 * f1 -> [ "||" LogicalORExpression() ]
367 * </PRE>
368 */
369 public R visit(LogicalORExpression n, A argu);
370
371 /**
372 * <PRE>
373 * f0 -> InclusiveORExpression()
374 * f1 -> [ "&&" LogicalANDExpression() ]
375 * </PRE>
376 */
377 public R visit(LogicalANDExpression n, A argu);
378
379 /**
380 * <PRE>
381 * f0 -> ExclusiveORExpression()
382 * f1 -> [ "|" InclusiveORExpression() ]
383 * </PRE>
384 */
385 public R visit(InclusiveORExpression n, A argu);
386
387 /**
388 * <PRE>
389 * f0 -> ANDExpression()
390 * f1 -> [ "^" ExclusiveORExpression() ]
391 * </PRE>
392 */
393 public R visit(ExclusiveORExpression n, A argu);
394
395 /**
396 * <PRE>
397 * f0 -> EqualityExpression()
398 * f1 -> [ "&" ANDExpression() ]
399 * </PRE>
400 */
401 public R visit(ANDExpression n, A argu);
402
403 /**
404 * <PRE>
405 * f0 -> RelationalExpression()
406 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
407 * </PRE>
408 */
409 public R visit(EqualityExpression n, A argu);
410
411 /**
412 * <PRE>
413 * f0 -> ShiftExpression()
414 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
415 * </PRE>
416 */
417 public R visit(RelationalExpression n, A argu);
418
419 /**
420 * <PRE>
421 * f0 -> AdditiveExpression()
422 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
423 * </PRE>
424 */
425 public R visit(ShiftExpression n, A argu);
426
427 /**
428 * <PRE>
429 * f0 -> MultiplicativeExpression()
430 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
431 * </PRE>
432 */
433 public R visit(AdditiveExpression n, A argu);
434
435 /**
436 * <PRE>
437 * f0 -> CastExpression()
438 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
439 * </PRE>
440 */
441 public R visit(MultiplicativeExpression n, A argu);
442
443 /**
444 * <PRE>
445 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
446 * </PRE>
447 */
448 public R visit(CastExpression n, A argu);
449
450 /**
451 * <PRE>
452 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
453 * </PRE>
454 */
455 public R visit(UnaryExpression n, A argu);
456
457 /**
458 * <PRE>
459 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
460 * </PRE>
461 */
462 public R visit(UnaryOperator n, A argu);
463
464 /**
465 * <PRE>
466 * f0 -> PrimaryExpression()
467 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
468 * </PRE>
469 */
470 public R visit(PostfixExpression n, A argu);
471
472 /**
473 * <PRE>
474 * f0 -> &lt;IDENTIFIER&gt;
475 * | Constant()
476 * | "(" Expression() ")"
477 * </PRE>
478 */
479 public R visit(PrimaryExpression n, A argu);
480
481 /**
482 * <PRE>
483 * f0 -> AssignmentOrTypeExpression()
484 * f1 -> ( "," AssignmentOrTypeExpression() )*
485 * </PRE>
486 */
487 public R visit(ArgumentExpressionList n, A argu);
488
489 /**
490 * <PRE>
491 * f0 -> NoIdentifierTypeSpecifier()
492 * | AssignmentExpression()
493 * </PRE>
494 */
495 public R visit(AssignmentOrTypeExpression n, A argu);
496
497 /**
498 * <PRE>
499 * f0 -> &lt;INTEGER_LITERAL&gt;
500 * | &lt;FLOATING_POINT_LITERAL&gt;
501 * | &lt;CHARACTER_LITERAL&gt;
502 * | &lt;STRING_LITERAL&gt;
503 * </PRE>
504 */
505 public R visit(Constant n, A argu);
506
507}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidDepthFirst.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidDepthFirst.java
new file mode 100644
index 000000000..eb49d3698
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidDepthFirst.java
@@ -0,0 +1,711 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * Provides default methods which visit each node in the tree in depth-first
12 * order. Your visitors may extend this class.
13 */
14public class GJVoidDepthFirst<A> implements GJVoidVisitor<A> {
15 //
16 // Auto class visitors--probably don't need to be overridden.
17 //
18 public void visit(NodeList n, A argu) {
19 int _count=0;
20 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
21 e.nextElement().accept(this,argu);
22 _count++;
23 }
24 }
25
26 public void visit(NodeListOptional n, A argu) {
27 if ( n.present() ) {
28 int _count=0;
29 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
30 e.nextElement().accept(this,argu);
31 _count++;
32 }
33 }
34 }
35
36 public void visit(NodeOptional n, A argu) {
37 if ( n.present() )
38 n.node.accept(this,argu);
39 }
40
41 public void visit(NodeSequence n, A argu) {
42 int _count=0;
43 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
44 e.nextElement().accept(this,argu);
45 _count++;
46 }
47 }
48
49 public void visit(NodeToken n, A argu) {}
50
51 //
52 // User-generated visitor methods below
53 //
54
55 /**
56 * <PRE>
57 * f0 -> ( ExternalDeclaration() )+
58 * </PRE>
59 */
60 public void visit(TranslationUnit n, A argu) {
61 n.f0.accept(this, argu);
62 }
63
64 /**
65 * <PRE>
66 * f0 -> ( StorageClassSpecifier() )*
67 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
68 * </PRE>
69 */
70 public void visit(ExternalDeclaration n, A argu) {
71 n.f0.accept(this, argu);
72 n.f1.accept(this, argu);
73 }
74
75 /**
76 * <PRE>
77 * f0 -> TypeSpecifier()
78 * f1 -> &lt;IDENTIFIER&gt;
79 * f2 -> "("
80 * f3 -> [ ParameterList() ]
81 * f4 -> ")"
82 * f5 -> ( ";" | CompoundStatement() )
83 * </PRE>
84 */
85 public void visit(FunctionDeclaration n, A argu) {
86 n.f0.accept(this, argu);
87 n.f1.accept(this, argu);
88 n.f2.accept(this, argu);
89 n.f3.accept(this, argu);
90 n.f4.accept(this, argu);
91 n.f5.accept(this, argu);
92 }
93
94 /**
95 * <PRE>
96 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
97 * </PRE>
98 */
99 public void visit(StorageClassSpecifier n, A argu) {
100 n.f0.accept(this, argu);
101 }
102
103 /**
104 * <PRE>
105 * f0 -> &lt;TYPEDEF&gt;
106 * f1 -> ( DataType() | FunctionType() )
107 * f2 -> ";"
108 * </PRE>
109 */
110 public void visit(TypeDeclaration n, A argu) {
111 n.f0.accept(this, argu);
112 n.f1.accept(this, argu);
113 n.f2.accept(this, argu);
114 }
115
116 /**
117 * <PRE>
118 * f0 -> StructOrUnionSpecifier()
119 * f1 -> &lt;IDENTIFIER&gt;
120 * </PRE>
121 */
122 public void visit(DataType n, A argu) {
123 n.f0.accept(this, argu);
124 n.f1.accept(this, argu);
125 }
126
127 /**
128 * <PRE>
129 * f0 -> TypeSpecifier()
130 * f1 -> "("
131 * f2 -> "*"
132 * f3 -> &lt;IDENTIFIER&gt;
133 * f4 -> ")"
134 * f5 -> "("
135 * f6 -> [ ParameterList() ]
136 * f7 -> ")"
137 * </PRE>
138 */
139 public void visit(FunctionType n, A argu) {
140 n.f0.accept(this, argu);
141 n.f1.accept(this, argu);
142 n.f2.accept(this, argu);
143 n.f3.accept(this, argu);
144 n.f4.accept(this, argu);
145 n.f5.accept(this, argu);
146 n.f6.accept(this, argu);
147 n.f7.accept(this, argu);
148 }
149
150 /**
151 * <PRE>
152 * f0 -> ParameterDeclaration()
153 * f1 -> ( "," ParameterDeclaration() )*
154 * f2 -> [ "," "..." ]
155 * </PRE>
156 */
157 public void visit(ParameterList n, A argu) {
158 n.f0.accept(this, argu);
159 n.f1.accept(this, argu);
160 n.f2.accept(this, argu);
161 }
162
163 /**
164 * <PRE>
165 * f0 -> TypeSpecifier()
166 * f1 -> &lt;IDENTIFIER&gt;
167 * f2 -> [ Array() ]
168 * </PRE>
169 */
170 public void visit(ParameterDeclaration n, A argu) {
171 n.f0.accept(this, argu);
172 n.f1.accept(this, argu);
173 n.f2.accept(this, argu);
174 }
175
176 /**
177 * <PRE>
178 * f0 -> VariableClassSpecifier()
179 * f1 -> TypeSpecifier()
180 * f2 -> InitDeclaratorList()
181 * f3 -> ";"
182 * </PRE>
183 */
184 public void visit(VariableDeclaration n, A argu) {
185 n.f0.accept(this, argu);
186 n.f1.accept(this, argu);
187 n.f2.accept(this, argu);
188 n.f3.accept(this, argu);
189 }
190
191 /**
192 * <PRE>
193 * f0 -> [ &lt;STATIC&gt; ]
194 * f1 -> VariableDeclaration()
195 * </PRE>
196 */
197 public void visit(LocalVariableDeclaration n, A argu) {
198 n.f0.accept(this, argu);
199 n.f1.accept(this, argu);
200 }
201
202 /**
203 * <PRE>
204 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
205 * </PRE>
206 */
207 public void visit(VariableClassSpecifier n, A argu) {
208 n.f0.accept(this, argu);
209 }
210
211 /**
212 * <PRE>
213 * f0 -> [ &lt;CONST&gt; ]
214 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
215 * f2 -> [ Pointer() ]
216 * f3 -> [ Array() ]
217 * </PRE>
218 */
219 public void visit(TypeSpecifier n, A argu) {
220 n.f0.accept(this, argu);
221 n.f1.accept(this, argu);
222 n.f2.accept(this, argu);
223 n.f3.accept(this, argu);
224 }
225
226 /**
227 * <PRE>
228 * f0 -> [ &lt;CONST&gt; ]
229 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
230 * f2 -> [ Pointer() ]
231 * f3 -> [ Array() ]
232 * </PRE>
233 */
234 public void visit(NoIdentifierTypeSpecifier n, A argu) {
235 n.f0.accept(this, argu);
236 n.f1.accept(this, argu);
237 n.f2.accept(this, argu);
238 n.f3.accept(this, argu);
239 }
240
241 /**
242 * <PRE>
243 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
244 * | StructOrUnion() &lt;IDENTIFIER&gt;
245 * </PRE>
246 */
247 public void visit(StructOrUnionSpecifier n, A argu) {
248 n.f0.accept(this, argu);
249 }
250
251 /**
252 * <PRE>
253 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
254 * </PRE>
255 */
256 public void visit(StructOrUnion n, A argu) {
257 n.f0.accept(this, argu);
258 }
259
260 /**
261 * <PRE>
262 * f0 -> ( StructDeclaration() )+
263 * </PRE>
264 */
265 public void visit(StructDeclarationList n, A argu) {
266 n.f0.accept(this, argu);
267 }
268
269 /**
270 * <PRE>
271 * f0 -> InitDeclarator()
272 * f1 -> ( "," InitDeclarator() )*
273 * </PRE>
274 */
275 public void visit(InitDeclaratorList n, A argu) {
276 n.f0.accept(this, argu);
277 n.f1.accept(this, argu);
278 }
279
280 /**
281 * <PRE>
282 * f0 -> &lt;IDENTIFIER&gt;
283 * f1 -> [ Array() ]
284 * f2 -> [ "=" Initializer() ]
285 * </PRE>
286 */
287 public void visit(InitDeclarator n, A argu) {
288 n.f0.accept(this, argu);
289 n.f1.accept(this, argu);
290 n.f2.accept(this, argu);
291 }
292
293 /**
294 * <PRE>
295 * f0 -> TypeSpecifier()
296 * f1 -> &lt;IDENTIFIER&gt;
297 * f2 -> [ Array() | ":" ConstantExpression() ]
298 * f3 -> [ &lt;IDENTIFIER&gt; ]
299 * f4 -> ";"
300 * </PRE>
301 */
302 public void visit(StructDeclaration n, A argu) {
303 n.f0.accept(this, argu);
304 n.f1.accept(this, argu);
305 n.f2.accept(this, argu);
306 n.f3.accept(this, argu);
307 n.f4.accept(this, argu);
308 }
309
310 /**
311 * <PRE>
312 * f0 -> &lt;ENUM&gt;
313 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
314 * </PRE>
315 */
316 public void visit(EnumSpecifier n, A argu) {
317 n.f0.accept(this, argu);
318 n.f1.accept(this, argu);
319 }
320
321 /**
322 * <PRE>
323 * f0 -> Enumerator()
324 * f1 -> ( "," Enumerator() )*
325 * </PRE>
326 */
327 public void visit(EnumeratorList n, A argu) {
328 n.f0.accept(this, argu);
329 n.f1.accept(this, argu);
330 }
331
332 /**
333 * <PRE>
334 * f0 -> &lt;IDENTIFIER&gt;
335 * f1 -> [ "=" ConstantExpression() ]
336 * </PRE>
337 */
338 public void visit(Enumerator n, A argu) {
339 n.f0.accept(this, argu);
340 n.f1.accept(this, argu);
341 }
342
343 /**
344 * <PRE>
345 * f0 -> "*"
346 * f1 -> [ &lt;CONST&gt; ]
347 * f2 -> [ Pointer() ]
348 * </PRE>
349 */
350 public void visit(Pointer n, A argu) {
351 n.f0.accept(this, argu);
352 n.f1.accept(this, argu);
353 n.f2.accept(this, argu);
354 }
355
356 /**
357 * <PRE>
358 * f0 -> &lt;IDENTIFIER&gt;
359 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
360 * </PRE>
361 */
362 public void visit(IdentifierList n, A argu) {
363 n.f0.accept(this, argu);
364 n.f1.accept(this, argu);
365 }
366
367 /**
368 * <PRE>
369 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
370 * </PRE>
371 */
372 public void visit(Initializer n, A argu) {
373 n.f0.accept(this, argu);
374 }
375
376 /**
377 * <PRE>
378 * f0 -> Initializer()
379 * f1 -> ( "," Initializer() )*
380 * </PRE>
381 */
382 public void visit(InitializerList n, A argu) {
383 n.f0.accept(this, argu);
384 n.f1.accept(this, argu);
385 }
386
387 /**
388 * <PRE>
389 * f0 -> "["
390 * f1 -> [ ConstantExpression() ]
391 * f2 -> "]"
392 * </PRE>
393 */
394 public void visit(Array n, A argu) {
395 n.f0.accept(this, argu);
396 n.f1.accept(this, argu);
397 n.f2.accept(this, argu);
398 }
399
400 /**
401 * <PRE>
402 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
403 * </PRE>
404 */
405 public void visit(Statement n, A argu) {
406 n.f0.accept(this, argu);
407 }
408
409 /**
410 * <PRE>
411 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
412 * </PRE>
413 */
414 public void visit(LabeledStatement n, A argu) {
415 n.f0.accept(this, argu);
416 }
417
418 /**
419 * <PRE>
420 * f0 -> [ Expression() ]
421 * f1 -> ";"
422 * </PRE>
423 */
424 public void visit(ExpressionStatement n, A argu) {
425 n.f0.accept(this, argu);
426 n.f1.accept(this, argu);
427 }
428
429 /**
430 * <PRE>
431 * f0 -> "{"
432 * f1 -> ( LocalVariableDeclaration() | Statement() )*
433 * f2 -> "}"
434 * </PRE>
435 */
436 public void visit(CompoundStatement n, A argu) {
437 n.f0.accept(this, argu);
438 n.f1.accept(this, argu);
439 n.f2.accept(this, argu);
440 }
441
442 /**
443 * <PRE>
444 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
445 * </PRE>
446 */
447 public void visit(SelectionStatement n, A argu) {
448 n.f0.accept(this, argu);
449 }
450
451 /**
452 * <PRE>
453 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
454 * </PRE>
455 */
456 public void visit(IterationStatement n, A argu) {
457 n.f0.accept(this, argu);
458 }
459
460 /**
461 * <PRE>
462 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
463 * </PRE>
464 */
465 public void visit(JumpStatement n, A argu) {
466 n.f0.accept(this, argu);
467 }
468
469 /**
470 * <PRE>
471 * f0 -> AssignmentExpression()
472 * f1 -> ( "," AssignmentExpression() )*
473 * </PRE>
474 */
475 public void visit(Expression n, A argu) {
476 n.f0.accept(this, argu);
477 n.f1.accept(this, argu);
478 }
479
480 /**
481 * <PRE>
482 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
483 * | ConditionalExpression()
484 * </PRE>
485 */
486 public void visit(AssignmentExpression n, A argu) {
487 n.f0.accept(this, argu);
488 }
489
490 /**
491 * <PRE>
492 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
493 * </PRE>
494 */
495 public void visit(AssignmentOperator n, A argu) {
496 n.f0.accept(this, argu);
497 }
498
499 /**
500 * <PRE>
501 * f0 -> LogicalORExpression()
502 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
503 * </PRE>
504 */
505 public void visit(ConditionalExpression n, A argu) {
506 n.f0.accept(this, argu);
507 n.f1.accept(this, argu);
508 }
509
510 /**
511 * <PRE>
512 * f0 -> ConditionalExpression()
513 * </PRE>
514 */
515 public void visit(ConstantExpression n, A argu) {
516 n.f0.accept(this, argu);
517 }
518
519 /**
520 * <PRE>
521 * f0 -> LogicalANDExpression()
522 * f1 -> [ "||" LogicalORExpression() ]
523 * </PRE>
524 */
525 public void visit(LogicalORExpression n, A argu) {
526 n.f0.accept(this, argu);
527 n.f1.accept(this, argu);
528 }
529
530 /**
531 * <PRE>
532 * f0 -> InclusiveORExpression()
533 * f1 -> [ "&&" LogicalANDExpression() ]
534 * </PRE>
535 */
536 public void visit(LogicalANDExpression n, A argu) {
537 n.f0.accept(this, argu);
538 n.f1.accept(this, argu);
539 }
540
541 /**
542 * <PRE>
543 * f0 -> ExclusiveORExpression()
544 * f1 -> [ "|" InclusiveORExpression() ]
545 * </PRE>
546 */
547 public void visit(InclusiveORExpression n, A argu) {
548 n.f0.accept(this, argu);
549 n.f1.accept(this, argu);
550 }
551
552 /**
553 * <PRE>
554 * f0 -> ANDExpression()
555 * f1 -> [ "^" ExclusiveORExpression() ]
556 * </PRE>
557 */
558 public void visit(ExclusiveORExpression n, A argu) {
559 n.f0.accept(this, argu);
560 n.f1.accept(this, argu);
561 }
562
563 /**
564 * <PRE>
565 * f0 -> EqualityExpression()
566 * f1 -> [ "&" ANDExpression() ]
567 * </PRE>
568 */
569 public void visit(ANDExpression n, A argu) {
570 n.f0.accept(this, argu);
571 n.f1.accept(this, argu);
572 }
573
574 /**
575 * <PRE>
576 * f0 -> RelationalExpression()
577 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
578 * </PRE>
579 */
580 public void visit(EqualityExpression n, A argu) {
581 n.f0.accept(this, argu);
582 n.f1.accept(this, argu);
583 }
584
585 /**
586 * <PRE>
587 * f0 -> ShiftExpression()
588 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
589 * </PRE>
590 */
591 public void visit(RelationalExpression n, A argu) {
592 n.f0.accept(this, argu);
593 n.f1.accept(this, argu);
594 }
595
596 /**
597 * <PRE>
598 * f0 -> AdditiveExpression()
599 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
600 * </PRE>
601 */
602 public void visit(ShiftExpression n, A argu) {
603 n.f0.accept(this, argu);
604 n.f1.accept(this, argu);
605 }
606
607 /**
608 * <PRE>
609 * f0 -> MultiplicativeExpression()
610 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
611 * </PRE>
612 */
613 public void visit(AdditiveExpression n, A argu) {
614 n.f0.accept(this, argu);
615 n.f1.accept(this, argu);
616 }
617
618 /**
619 * <PRE>
620 * f0 -> CastExpression()
621 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
622 * </PRE>
623 */
624 public void visit(MultiplicativeExpression n, A argu) {
625 n.f0.accept(this, argu);
626 n.f1.accept(this, argu);
627 }
628
629 /**
630 * <PRE>
631 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
632 * </PRE>
633 */
634 public void visit(CastExpression n, A argu) {
635 n.f0.accept(this, argu);
636 }
637
638 /**
639 * <PRE>
640 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
641 * </PRE>
642 */
643 public void visit(UnaryExpression n, A argu) {
644 n.f0.accept(this, argu);
645 }
646
647 /**
648 * <PRE>
649 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
650 * </PRE>
651 */
652 public void visit(UnaryOperator n, A argu) {
653 n.f0.accept(this, argu);
654 }
655
656 /**
657 * <PRE>
658 * f0 -> PrimaryExpression()
659 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
660 * </PRE>
661 */
662 public void visit(PostfixExpression n, A argu) {
663 n.f0.accept(this, argu);
664 n.f1.accept(this, argu);
665 }
666
667 /**
668 * <PRE>
669 * f0 -> &lt;IDENTIFIER&gt;
670 * | Constant()
671 * | "(" Expression() ")"
672 * </PRE>
673 */
674 public void visit(PrimaryExpression n, A argu) {
675 n.f0.accept(this, argu);
676 }
677
678 /**
679 * <PRE>
680 * f0 -> AssignmentOrTypeExpression()
681 * f1 -> ( "," AssignmentOrTypeExpression() )*
682 * </PRE>
683 */
684 public void visit(ArgumentExpressionList n, A argu) {
685 n.f0.accept(this, argu);
686 n.f1.accept(this, argu);
687 }
688
689 /**
690 * <PRE>
691 * f0 -> NoIdentifierTypeSpecifier()
692 * | AssignmentExpression()
693 * </PRE>
694 */
695 public void visit(AssignmentOrTypeExpression n, A argu) {
696 n.f0.accept(this, argu);
697 }
698
699 /**
700 * <PRE>
701 * f0 -> &lt;INTEGER_LITERAL&gt;
702 * | &lt;FLOATING_POINT_LITERAL&gt;
703 * | &lt;CHARACTER_LITERAL&gt;
704 * | &lt;STRING_LITERAL&gt;
705 * </PRE>
706 */
707 public void visit(Constant n, A argu) {
708 n.f0.accept(this, argu);
709 }
710
711}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidVisitor.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidVisitor.java
new file mode 100644
index 000000000..13176c4e8
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/GJVoidVisitor.java
@@ -0,0 +1,508 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * All GJ void visitors must implement this interface.
12 */
13
14public interface GJVoidVisitor<A> {
15
16 //
17 // GJ void Auto class visitors
18 //
19
20 public void visit(NodeList n, A argu);
21 public void visit(NodeListOptional n, A argu);
22 public void visit(NodeOptional n, A argu);
23 public void visit(NodeSequence n, A argu);
24 public void visit(NodeToken n, A argu);
25
26 //
27 // User-generated visitor methods below
28 //
29
30 /**
31 * <PRE>
32 * f0 -> ( ExternalDeclaration() )+
33 * </PRE>
34 */
35 public void visit(TranslationUnit n, A argu);
36
37 /**
38 * <PRE>
39 * f0 -> ( StorageClassSpecifier() )*
40 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
41 * </PRE>
42 */
43 public void visit(ExternalDeclaration n, A argu);
44
45 /**
46 * <PRE>
47 * f0 -> TypeSpecifier()
48 * f1 -> &lt;IDENTIFIER&gt;
49 * f2 -> "("
50 * f3 -> [ ParameterList() ]
51 * f4 -> ")"
52 * f5 -> ( ";" | CompoundStatement() )
53 * </PRE>
54 */
55 public void visit(FunctionDeclaration n, A argu);
56
57 /**
58 * <PRE>
59 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
60 * </PRE>
61 */
62 public void visit(StorageClassSpecifier n, A argu);
63
64 /**
65 * <PRE>
66 * f0 -> &lt;TYPEDEF&gt;
67 * f1 -> ( DataType() | FunctionType() )
68 * f2 -> ";"
69 * </PRE>
70 */
71 public void visit(TypeDeclaration n, A argu);
72
73 /**
74 * <PRE>
75 * f0 -> StructOrUnionSpecifier()
76 * f1 -> &lt;IDENTIFIER&gt;
77 * </PRE>
78 */
79 public void visit(DataType n, A argu);
80
81 /**
82 * <PRE>
83 * f0 -> TypeSpecifier()
84 * f1 -> "("
85 * f2 -> "*"
86 * f3 -> &lt;IDENTIFIER&gt;
87 * f4 -> ")"
88 * f5 -> "("
89 * f6 -> [ ParameterList() ]
90 * f7 -> ")"
91 * </PRE>
92 */
93 public void visit(FunctionType n, A argu);
94
95 /**
96 * <PRE>
97 * f0 -> ParameterDeclaration()
98 * f1 -> ( "," ParameterDeclaration() )*
99 * f2 -> [ "," "..." ]
100 * </PRE>
101 */
102 public void visit(ParameterList n, A argu);
103
104 /**
105 * <PRE>
106 * f0 -> TypeSpecifier()
107 * f1 -> &lt;IDENTIFIER&gt;
108 * f2 -> [ Array() ]
109 * </PRE>
110 */
111 public void visit(ParameterDeclaration n, A argu);
112
113 /**
114 * <PRE>
115 * f0 -> VariableClassSpecifier()
116 * f1 -> TypeSpecifier()
117 * f2 -> InitDeclaratorList()
118 * f3 -> ";"
119 * </PRE>
120 */
121 public void visit(VariableDeclaration n, A argu);
122
123 /**
124 * <PRE>
125 * f0 -> [ &lt;STATIC&gt; ]
126 * f1 -> VariableDeclaration()
127 * </PRE>
128 */
129 public void visit(LocalVariableDeclaration n, A argu);
130
131 /**
132 * <PRE>
133 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
134 * </PRE>
135 */
136 public void visit(VariableClassSpecifier n, A argu);
137
138 /**
139 * <PRE>
140 * f0 -> [ &lt;CONST&gt; ]
141 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
142 * f2 -> [ Pointer() ]
143 * f3 -> [ Array() ]
144 * </PRE>
145 */
146 public void visit(TypeSpecifier n, A argu);
147
148 /**
149 * <PRE>
150 * f0 -> [ &lt;CONST&gt; ]
151 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
152 * f2 -> [ Pointer() ]
153 * f3 -> [ Array() ]
154 * </PRE>
155 */
156 public void visit(NoIdentifierTypeSpecifier n, A argu);
157
158 /**
159 * <PRE>
160 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
161 * | StructOrUnion() &lt;IDENTIFIER&gt;
162 * </PRE>
163 */
164 public void visit(StructOrUnionSpecifier n, A argu);
165
166 /**
167 * <PRE>
168 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
169 * </PRE>
170 */
171 public void visit(StructOrUnion n, A argu);
172
173 /**
174 * <PRE>
175 * f0 -> ( StructDeclaration() )+
176 * </PRE>
177 */
178 public void visit(StructDeclarationList n, A argu);
179
180 /**
181 * <PRE>
182 * f0 -> InitDeclarator()
183 * f1 -> ( "," InitDeclarator() )*
184 * </PRE>
185 */
186 public void visit(InitDeclaratorList n, A argu);
187
188 /**
189 * <PRE>
190 * f0 -> &lt;IDENTIFIER&gt;
191 * f1 -> [ Array() ]
192 * f2 -> [ "=" Initializer() ]
193 * </PRE>
194 */
195 public void visit(InitDeclarator n, A argu);
196
197 /**
198 * <PRE>
199 * f0 -> TypeSpecifier()
200 * f1 -> &lt;IDENTIFIER&gt;
201 * f2 -> [ Array() | ":" ConstantExpression() ]
202 * f3 -> [ &lt;IDENTIFIER&gt; ]
203 * f4 -> ";"
204 * </PRE>
205 */
206 public void visit(StructDeclaration n, A argu);
207
208 /**
209 * <PRE>
210 * f0 -> &lt;ENUM&gt;
211 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
212 * </PRE>
213 */
214 public void visit(EnumSpecifier n, A argu);
215
216 /**
217 * <PRE>
218 * f0 -> Enumerator()
219 * f1 -> ( "," Enumerator() )*
220 * </PRE>
221 */
222 public void visit(EnumeratorList n, A argu);
223
224 /**
225 * <PRE>
226 * f0 -> &lt;IDENTIFIER&gt;
227 * f1 -> [ "=" ConstantExpression() ]
228 * </PRE>
229 */
230 public void visit(Enumerator n, A argu);
231
232 /**
233 * <PRE>
234 * f0 -> "*"
235 * f1 -> [ &lt;CONST&gt; ]
236 * f2 -> [ Pointer() ]
237 * </PRE>
238 */
239 public void visit(Pointer n, A argu);
240
241 /**
242 * <PRE>
243 * f0 -> &lt;IDENTIFIER&gt;
244 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
245 * </PRE>
246 */
247 public void visit(IdentifierList n, A argu);
248
249 /**
250 * <PRE>
251 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
252 * </PRE>
253 */
254 public void visit(Initializer n, A argu);
255
256 /**
257 * <PRE>
258 * f0 -> Initializer()
259 * f1 -> ( "," Initializer() )*
260 * </PRE>
261 */
262 public void visit(InitializerList n, A argu);
263
264 /**
265 * <PRE>
266 * f0 -> "["
267 * f1 -> [ ConstantExpression() ]
268 * f2 -> "]"
269 * </PRE>
270 */
271 public void visit(Array n, A argu);
272
273 /**
274 * <PRE>
275 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
276 * </PRE>
277 */
278 public void visit(Statement n, A argu);
279
280 /**
281 * <PRE>
282 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
283 * </PRE>
284 */
285 public void visit(LabeledStatement n, A argu);
286
287 /**
288 * <PRE>
289 * f0 -> [ Expression() ]
290 * f1 -> ";"
291 * </PRE>
292 */
293 public void visit(ExpressionStatement n, A argu);
294
295 /**
296 * <PRE>
297 * f0 -> "{"
298 * f1 -> ( LocalVariableDeclaration() | Statement() )*
299 * f2 -> "}"
300 * </PRE>
301 */
302 public void visit(CompoundStatement n, A argu);
303
304 /**
305 * <PRE>
306 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
307 * </PRE>
308 */
309 public void visit(SelectionStatement n, A argu);
310
311 /**
312 * <PRE>
313 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
314 * </PRE>
315 */
316 public void visit(IterationStatement n, A argu);
317
318 /**
319 * <PRE>
320 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
321 * </PRE>
322 */
323 public void visit(JumpStatement n, A argu);
324
325 /**
326 * <PRE>
327 * f0 -> AssignmentExpression()
328 * f1 -> ( "," AssignmentExpression() )*
329 * </PRE>
330 */
331 public void visit(Expression n, A argu);
332
333 /**
334 * <PRE>
335 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
336 * | ConditionalExpression()
337 * </PRE>
338 */
339 public void visit(AssignmentExpression n, A argu);
340
341 /**
342 * <PRE>
343 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
344 * </PRE>
345 */
346 public void visit(AssignmentOperator n, A argu);
347
348 /**
349 * <PRE>
350 * f0 -> LogicalORExpression()
351 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
352 * </PRE>
353 */
354 public void visit(ConditionalExpression n, A argu);
355
356 /**
357 * <PRE>
358 * f0 -> ConditionalExpression()
359 * </PRE>
360 */
361 public void visit(ConstantExpression n, A argu);
362
363 /**
364 * <PRE>
365 * f0 -> LogicalANDExpression()
366 * f1 -> [ "||" LogicalORExpression() ]
367 * </PRE>
368 */
369 public void visit(LogicalORExpression n, A argu);
370
371 /**
372 * <PRE>
373 * f0 -> InclusiveORExpression()
374 * f1 -> [ "&&" LogicalANDExpression() ]
375 * </PRE>
376 */
377 public void visit(LogicalANDExpression n, A argu);
378
379 /**
380 * <PRE>
381 * f0 -> ExclusiveORExpression()
382 * f1 -> [ "|" InclusiveORExpression() ]
383 * </PRE>
384 */
385 public void visit(InclusiveORExpression n, A argu);
386
387 /**
388 * <PRE>
389 * f0 -> ANDExpression()
390 * f1 -> [ "^" ExclusiveORExpression() ]
391 * </PRE>
392 */
393 public void visit(ExclusiveORExpression n, A argu);
394
395 /**
396 * <PRE>
397 * f0 -> EqualityExpression()
398 * f1 -> [ "&" ANDExpression() ]
399 * </PRE>
400 */
401 public void visit(ANDExpression n, A argu);
402
403 /**
404 * <PRE>
405 * f0 -> RelationalExpression()
406 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
407 * </PRE>
408 */
409 public void visit(EqualityExpression n, A argu);
410
411 /**
412 * <PRE>
413 * f0 -> ShiftExpression()
414 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
415 * </PRE>
416 */
417 public void visit(RelationalExpression n, A argu);
418
419 /**
420 * <PRE>
421 * f0 -> AdditiveExpression()
422 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
423 * </PRE>
424 */
425 public void visit(ShiftExpression n, A argu);
426
427 /**
428 * <PRE>
429 * f0 -> MultiplicativeExpression()
430 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
431 * </PRE>
432 */
433 public void visit(AdditiveExpression n, A argu);
434
435 /**
436 * <PRE>
437 * f0 -> CastExpression()
438 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
439 * </PRE>
440 */
441 public void visit(MultiplicativeExpression n, A argu);
442
443 /**
444 * <PRE>
445 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
446 * </PRE>
447 */
448 public void visit(CastExpression n, A argu);
449
450 /**
451 * <PRE>
452 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
453 * </PRE>
454 */
455 public void visit(UnaryExpression n, A argu);
456
457 /**
458 * <PRE>
459 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
460 * </PRE>
461 */
462 public void visit(UnaryOperator n, A argu);
463
464 /**
465 * <PRE>
466 * f0 -> PrimaryExpression()
467 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
468 * </PRE>
469 */
470 public void visit(PostfixExpression n, A argu);
471
472 /**
473 * <PRE>
474 * f0 -> &lt;IDENTIFIER&gt;
475 * | Constant()
476 * | "(" Expression() ")"
477 * </PRE>
478 */
479 public void visit(PrimaryExpression n, A argu);
480
481 /**
482 * <PRE>
483 * f0 -> AssignmentOrTypeExpression()
484 * f1 -> ( "," AssignmentOrTypeExpression() )*
485 * </PRE>
486 */
487 public void visit(ArgumentExpressionList n, A argu);
488
489 /**
490 * <PRE>
491 * f0 -> NoIdentifierTypeSpecifier()
492 * | AssignmentExpression()
493 * </PRE>
494 */
495 public void visit(AssignmentOrTypeExpression n, A argu);
496
497 /**
498 * <PRE>
499 * f0 -> &lt;INTEGER_LITERAL&gt;
500 * | &lt;FLOATING_POINT_LITERAL&gt;
501 * | &lt;CHARACTER_LITERAL&gt;
502 * | &lt;STRING_LITERAL&gt;
503 * </PRE>
504 */
505 public void visit(Constant n, A argu);
506
507}
508
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeDumper.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeDumper.java
new file mode 100644
index 000000000..c2e7c1558
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeDumper.java
@@ -0,0 +1,132 @@
1//
2// Generated by JTB 1.3.2
3//
4package org.gnunet.seaspider.parser.visitors;
5
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9import java.io.*;
10
11/**
12 * Dumps the syntax tree to a Writer using the location information in
13 * each NodeToken.
14 */
15public class TreeDumper extends DepthFirstVisitor {
16 protected PrintWriter out;
17 private int curLine = 1;
18 private int curColumn = 1;
19 private boolean startAtNextToken = false;
20 private boolean printSpecials = true;
21
22 /**
23 * The default constructor uses System.out as its output location.
24 * You may specify your own Writer or OutputStream using one of the
25 * other constructors.
26 */
27 public TreeDumper() { out = new PrintWriter(System.out, true); }
28 public TreeDumper(Writer o) { out = new PrintWriter(o, true); }
29 public TreeDumper(OutputStream o) { out = new PrintWriter(o, true); }
30
31 /**
32 * Flushes the OutputStream or Writer that this TreeDumper is using.
33 */
34 public void flushWriter() { out.flush(); }
35
36 /**
37 * Allows you to specify whether or not to print special tokens.
38 */
39 public void printSpecials(boolean b) { printSpecials = b; }
40
41 /**
42 * Starts the tree dumper on the line containing the next token
43 * visited. For example, if the next token begins on line 50 and the
44 * dumper is currently on line 1 of the file, it will set its current
45 * line to 50 and continue printing from there, as opposed to
46 * printing 49 blank lines and then printing the token.
47 */
48 public void startAtNextToken() { startAtNextToken = true; }
49
50 /**
51 * Resets the position of the output "cursor" to the first line and
52 * column. When using a dumper on a syntax tree more than once, you
53 * either need to call this method or startAtNextToken() between each
54 * dump.
55 */
56 public void resetPosition() { curLine = curColumn = 1; }
57
58 /**
59 * Dumps the current NodeToken to the output stream being used.
60 *
61 * @throws IllegalStateException if the token position is invalid
62 * relative to the current position, i.e. its location places it
63 * before the previous token.
64 */
65 public void visit(NodeToken n) {
66 if ( n.beginLine == -1 || n.beginColumn == -1 ) {
67 printToken(n.tokenImage);
68 return;
69 }
70
71 //
72 // Handle special tokens
73 //
74 if ( printSpecials && n.numSpecials() > 0 )
75 for ( Enumeration<NodeToken> e = n.specialTokens.elements(); e.hasMoreElements(); )
76 visit(e.nextElement());
77
78 //
79 // Handle startAtNextToken option
80 //
81 if ( startAtNextToken ) {
82 curLine = n.beginLine;
83 curColumn = 1;
84 startAtNextToken = false;
85
86 if ( n.beginColumn < curColumn )
87 out.println();
88 }
89
90 //
91 // Check for invalid token position relative to current position.
92 //
93 if ( n.beginLine < curLine )
94 throw new IllegalStateException("at token \"" + n.tokenImage +
95 "\", n.beginLine = " + Integer.toString(n.beginLine) +
96 ", curLine = " + Integer.toString(curLine));
97 else if ( n.beginLine == curLine && n.beginColumn < curColumn )
98 throw new IllegalStateException("at token \"" + n.tokenImage +
99 "\", n.beginColumn = " +
100 Integer.toString(n.beginColumn) + ", curColumn = " +
101 Integer.toString(curColumn));
102
103 //
104 // Move output "cursor" to proper location, then print the token
105 //
106 if ( curLine < n.beginLine ) {
107 curColumn = 1;
108 for ( ; curLine < n.beginLine; ++curLine )
109 out.println();
110 }
111
112 for ( ; curColumn < n.beginColumn; ++curColumn )
113 out.print(" ");
114
115 printToken(n.tokenImage);
116 }
117
118 private void printToken(String s) {
119 for ( int i = 0; i < s.length(); ++i ) {
120 if ( s.charAt(i) == '\n' ) {
121 ++curLine;
122 curColumn = 1;
123 }
124 else
125 curColumn++;
126
127 out.print(s.charAt(i));
128 }
129
130 out.flush();
131 }
132}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeFormatter.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeFormatter.java
new file mode 100644
index 000000000..7cb5ae051
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/TreeFormatter.java
@@ -0,0 +1,980 @@
1//
2// Generated by JTB 1.3.2
3//
4package org.gnunet.seaspider.parser.visitors;
5
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * A skeleton output formatter for your language grammar. Using the
12 * add() method along with force(), indent(), and outdent(), you can
13 * easily specify how this visitor will format the given syntax tree.
14 * See the JTB documentation for more details.
15 *
16 * Pass your syntax tree to this visitor, and then to the TreeDumper
17 * visitor in order to "pretty print" your tree.
18 */
19public class TreeFormatter extends DepthFirstVisitor {
20 private Vector<FormatCommand> cmdQueue = new Vector<FormatCommand>();
21 private boolean lineWrap;
22 private int wrapWidth;
23 private int indentAmt;
24 private int curLine = 1;
25 private int curColumn = 1;
26 private int curIndent = 0;
27
28 /**
29 * The default constructor assumes an indentation amount of 3 spaces
30 * and no line-wrap. You may alternately use the other constructor to
31 * specify your own indentation amount and line width.
32 */
33 public TreeFormatter() { this(3, 0); }
34
35 /**
36 * This constructor accepts an indent amount and a line width which is
37 * used to wrap long lines. If a token's beginColumn value is greater
38 * than the specified wrapWidth, it will be moved to the next line and
39 * indented one extra level. To turn off line-wrapping, specify a
40 * wrapWidth of 0.
41 *
42 * @param indentAmt Amount of spaces per indentation level.
43 * @param wrapWidth Wrap lines longer than wrapWidth. 0 for no wrap.
44 */
45 public TreeFormatter(int indentAmt, int wrapWidth) {
46 this.indentAmt = indentAmt;
47 this.wrapWidth = wrapWidth;
48
49 if ( wrapWidth > 0 )
50 lineWrap = true;
51 else
52 lineWrap = false;
53 }
54
55 /**
56 * Accepts a NodeListInterface object and performs an optional format
57 * command between each node in the list (but not after the last node).
58 */
59 protected void processList(NodeListInterface n) {
60 processList(n, null);
61 }
62
63 protected void processList(NodeListInterface n, FormatCommand cmd) {
64 for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
65 e.nextElement().accept(this);
66 if ( cmd != null && e.hasMoreElements() )
67 cmdQueue.addElement(cmd);
68 }
69 }
70
71 /**
72 * A Force command inserts a line break and indents the next line to
73 * the current indentation level. Use "add(force());".
74 */
75 protected FormatCommand force() { return force(1); }
76 protected FormatCommand force(int i) {
77 return new FormatCommand(FormatCommand.FORCE, i);
78 }
79
80 /**
81 * An Indent command increases the indentation level by one (or a
82 * user-specified amount). Use "add(indent());".
83 */
84 protected FormatCommand indent() { return indent(1); }
85 protected FormatCommand indent(int i) {
86 return new FormatCommand(FormatCommand.INDENT, i);
87 }
88
89 /**
90 * An Outdent command is the reverse of the Indent command: it reduces
91 * the indentation level. Use "add(outdent());".
92 */
93 protected FormatCommand outdent() { return outdent(1); }
94 protected FormatCommand outdent(int i) {
95 return new FormatCommand(FormatCommand.OUTDENT, i);
96 }
97
98 /**
99 * A Space command simply adds one or a user-specified number of
100 * spaces between tokens. Use "add(space());".
101 */
102 protected FormatCommand space() { return space(1); }
103 protected FormatCommand space(int i) {
104 return new FormatCommand(FormatCommand.SPACE, i);
105 }
106
107 /**
108 * Use this method to add FormatCommands to the command queue to be
109 * executed when the next token in the tree is visited.
110 */
111 protected void add(FormatCommand cmd) {
112 cmdQueue.addElement(cmd);
113 }
114
115 /**
116 * Executes the commands waiting in the command queue, then inserts the
117 * proper location information into the current NodeToken.
118 *
119 * If there are any special tokens preceding this token, they will be
120 * given the current location information. The token will follow on
121 * the next line, at the proper indentation level. If this is not the
122 * behavior you want from special tokens, feel free to modify this
123 * method.
124 */
125 public void visit(NodeToken n) {
126 for ( Enumeration<FormatCommand> e = cmdQueue.elements(); e.hasMoreElements(); ) {
127 FormatCommand cmd = e.nextElement();
128 switch ( cmd.getCommand() ) {
129 case FormatCommand.FORCE :
130 curLine += cmd.getNumCommands();
131 curColumn = curIndent + 1;
132 break;
133 case FormatCommand.INDENT :
134 curIndent += indentAmt * cmd.getNumCommands();
135 break;
136 case FormatCommand.OUTDENT :
137 if ( curIndent >= indentAmt )
138 curIndent -= indentAmt * cmd.getNumCommands();
139 break;
140 case FormatCommand.SPACE :
141 curColumn += cmd.getNumCommands();
142 break;
143 default :
144 throw new TreeFormatterException(
145 "Invalid value in command queue.");
146 }
147 }
148
149 cmdQueue.removeAllElements();
150
151 //
152 // Handle all special tokens preceding this NodeToken
153 //
154 if ( n.numSpecials() > 0 )
155 for ( Enumeration<NodeToken> e = n.specialTokens.elements();
156 e.hasMoreElements(); ) {
157 NodeToken special = e.nextElement();
158
159 //
160 // -Place the token.
161 // -Move cursor to next line after the special token.
162 // -Don't update curColumn--want to keep current indent level.
163 //
164 placeToken(special, curLine, curColumn);
165 curLine = special.endLine + 1;
166 }
167
168 placeToken(n, curLine, curColumn);
169 curLine = n.endLine;
170 curColumn = n.endColumn;
171 }
172
173 /**
174 * Inserts token location (beginLine, beginColumn, endLine, endColumn)
175 * information into the NodeToken. Takes into account line-wrap.
176 * Does not update curLine and curColumn.
177 */
178 private void placeToken(NodeToken n, int line, int column) {
179 int length = n.tokenImage.length();
180
181 //
182 // Find beginning of token. Only line-wrap for single-line tokens
183 //
184 if ( !lineWrap || n.tokenImage.indexOf('\n') != -1 ||
185 column + length <= wrapWidth )
186 n.beginColumn = column;
187 else {
188 ++line;
189 column = curIndent + indentAmt + 1;
190 n.beginColumn = column;
191 }
192
193 n.beginLine = line;
194
195 //
196 // Find end of token; don't count \n if it's the last character
197 //
198 for ( int i = 0; i < length; ++i ) {
199 if ( n.tokenImage.charAt(i) == '\n' && i < length - 1 ) {
200 ++line;
201 column = 1;
202 }
203 else
204 ++column;
205 }
206
207 n.endLine = line;
208 n.endColumn = column;
209 }
210
211 //
212 // User-generated visitor methods below
213 //
214
215 /**
216 * <PRE>
217 * f0 -> ( ExternalDeclaration() )+
218 * </PRE>
219 */
220 public void visit(TranslationUnit n) {
221 processList(n.f0);
222 }
223
224 /**
225 * <PRE>
226 * f0 -> ( StorageClassSpecifier() )*
227 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
228 * </PRE>
229 */
230 public void visit(ExternalDeclaration n) {
231 if ( n.f0.present() ) {
232 processList(n.f0);
233 }
234 n.f1.accept(this);
235 }
236
237 /**
238 * <PRE>
239 * f0 -> TypeSpecifier()
240 * f1 -> &lt;IDENTIFIER&gt;
241 * f2 -> "("
242 * f3 -> [ ParameterList() ]
243 * f4 -> ")"
244 * f5 -> ( ";" | CompoundStatement() )
245 * </PRE>
246 */
247 public void visit(FunctionDeclaration n) {
248 n.f0.accept(this);
249 n.f1.accept(this);
250 n.f2.accept(this);
251 if ( n.f3.present() ) {
252 n.f3.accept(this);
253 }
254 n.f4.accept(this);
255 n.f5.accept(this);
256 }
257
258 /**
259 * <PRE>
260 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
261 * </PRE>
262 */
263 public void visit(StorageClassSpecifier n) {
264 n.f0.accept(this);
265 }
266
267 /**
268 * <PRE>
269 * f0 -> &lt;TYPEDEF&gt;
270 * f1 -> ( DataType() | FunctionType() )
271 * f2 -> ";"
272 * </PRE>
273 */
274 public void visit(TypeDeclaration n) {
275 n.f0.accept(this);
276 n.f1.accept(this);
277 n.f2.accept(this);
278 }
279
280 /**
281 * <PRE>
282 * f0 -> StructOrUnionSpecifier()
283 * f1 -> &lt;IDENTIFIER&gt;
284 * </PRE>
285 */
286 public void visit(DataType n) {
287 n.f0.accept(this);
288 n.f1.accept(this);
289 }
290
291 /**
292 * <PRE>
293 * f0 -> TypeSpecifier()
294 * f1 -> "("
295 * f2 -> "*"
296 * f3 -> &lt;IDENTIFIER&gt;
297 * f4 -> ")"
298 * f5 -> "("
299 * f6 -> [ ParameterList() ]
300 * f7 -> ")"
301 * </PRE>
302 */
303 public void visit(FunctionType n) {
304 n.f0.accept(this);
305 n.f1.accept(this);
306 n.f2.accept(this);
307 n.f3.accept(this);
308 n.f4.accept(this);
309 n.f5.accept(this);
310 if ( n.f6.present() ) {
311 n.f6.accept(this);
312 }
313 n.f7.accept(this);
314 }
315
316 /**
317 * <PRE>
318 * f0 -> ParameterDeclaration()
319 * f1 -> ( "," ParameterDeclaration() )*
320 * f2 -> [ "," "..." ]
321 * </PRE>
322 */
323 public void visit(ParameterList n) {
324 n.f0.accept(this);
325 if ( n.f1.present() ) {
326 processList(n.f1);
327 }
328 if ( n.f2.present() ) {
329 n.f2.accept(this);
330 }
331 }
332
333 /**
334 * <PRE>
335 * f0 -> TypeSpecifier()
336 * f1 -> &lt;IDENTIFIER&gt;
337 * f2 -> [ Array() ]
338 * </PRE>
339 */
340 public void visit(ParameterDeclaration n) {
341 n.f0.accept(this);
342 n.f1.accept(this);
343 if ( n.f2.present() ) {
344 n.f2.accept(this);
345 }
346 }
347
348 /**
349 * <PRE>
350 * f0 -> VariableClassSpecifier()
351 * f1 -> TypeSpecifier()
352 * f2 -> InitDeclaratorList()
353 * f3 -> ";"
354 * </PRE>
355 */
356 public void visit(VariableDeclaration n) {
357 n.f0.accept(this);
358 n.f1.accept(this);
359 n.f2.accept(this);
360 n.f3.accept(this);
361 }
362
363 /**
364 * <PRE>
365 * f0 -> [ &lt;STATIC&gt; ]
366 * f1 -> VariableDeclaration()
367 * </PRE>
368 */
369 public void visit(LocalVariableDeclaration n) {
370 if ( n.f0.present() ) {
371 n.f0.accept(this);
372 }
373 n.f1.accept(this);
374 }
375
376 /**
377 * <PRE>
378 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
379 * </PRE>
380 */
381 public void visit(VariableClassSpecifier n) {
382 if ( n.f0.present() ) {
383 processList(n.f0);
384 }
385 }
386
387 /**
388 * <PRE>
389 * f0 -> [ &lt;CONST&gt; ]
390 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
391 * f2 -> [ Pointer() ]
392 * f3 -> [ Array() ]
393 * </PRE>
394 */
395 public void visit(TypeSpecifier n) {
396 if ( n.f0.present() ) {
397 n.f0.accept(this);
398 }
399 n.f1.accept(this);
400 if ( n.f2.present() ) {
401 n.f2.accept(this);
402 }
403 if ( n.f3.present() ) {
404 n.f3.accept(this);
405 }
406 }
407
408 /**
409 * <PRE>
410 * f0 -> [ &lt;CONST&gt; ]
411 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
412 * f2 -> [ Pointer() ]
413 * f3 -> [ Array() ]
414 * </PRE>
415 */
416 public void visit(NoIdentifierTypeSpecifier n) {
417 if ( n.f0.present() ) {
418 n.f0.accept(this);
419 }
420 n.f1.accept(this);
421 if ( n.f2.present() ) {
422 n.f2.accept(this);
423 }
424 if ( n.f3.present() ) {
425 n.f3.accept(this);
426 }
427 }
428
429 /**
430 * <PRE>
431 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
432 * | StructOrUnion() &lt;IDENTIFIER&gt;
433 * </PRE>
434 */
435 public void visit(StructOrUnionSpecifier n) {
436 n.f0.accept(this);
437 }
438
439 /**
440 * <PRE>
441 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
442 * </PRE>
443 */
444 public void visit(StructOrUnion n) {
445 n.f0.accept(this);
446 }
447
448 /**
449 * <PRE>
450 * f0 -> ( StructDeclaration() )+
451 * </PRE>
452 */
453 public void visit(StructDeclarationList n) {
454 processList(n.f0);
455 }
456
457 /**
458 * <PRE>
459 * f0 -> InitDeclarator()
460 * f1 -> ( "," InitDeclarator() )*
461 * </PRE>
462 */
463 public void visit(InitDeclaratorList n) {
464 n.f0.accept(this);
465 if ( n.f1.present() ) {
466 processList(n.f1);
467 }
468 }
469
470 /**
471 * <PRE>
472 * f0 -> &lt;IDENTIFIER&gt;
473 * f1 -> [ Array() ]
474 * f2 -> [ "=" Initializer() ]
475 * </PRE>
476 */
477 public void visit(InitDeclarator n) {
478 n.f0.accept(this);
479 if ( n.f1.present() ) {
480 n.f1.accept(this);
481 }
482 if ( n.f2.present() ) {
483 n.f2.accept(this);
484 }
485 }
486
487 /**
488 * <PRE>
489 * f0 -> TypeSpecifier()
490 * f1 -> &lt;IDENTIFIER&gt;
491 * f2 -> [ Array() | ":" ConstantExpression() ]
492 * f3 -> [ &lt;IDENTIFIER&gt; ]
493 * f4 -> ";"
494 * </PRE>
495 */
496 public void visit(StructDeclaration n) {
497 n.f0.accept(this);
498 n.f1.accept(this);
499 if ( n.f2.present() ) {
500 n.f2.accept(this);
501 }
502 if ( n.f3.present() ) {
503 n.f3.accept(this);
504 }
505 n.f4.accept(this);
506 }
507
508 /**
509 * <PRE>
510 * f0 -> &lt;ENUM&gt;
511 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
512 * </PRE>
513 */
514 public void visit(EnumSpecifier n) {
515 n.f0.accept(this);
516 n.f1.accept(this);
517 }
518
519 /**
520 * <PRE>
521 * f0 -> Enumerator()
522 * f1 -> ( "," Enumerator() )*
523 * </PRE>
524 */
525 public void visit(EnumeratorList n) {
526 n.f0.accept(this);
527 if ( n.f1.present() ) {
528 processList(n.f1);
529 }
530 }
531
532 /**
533 * <PRE>
534 * f0 -> &lt;IDENTIFIER&gt;
535 * f1 -> [ "=" ConstantExpression() ]
536 * </PRE>
537 */
538 public void visit(Enumerator n) {
539 n.f0.accept(this);
540 if ( n.f1.present() ) {
541 n.f1.accept(this);
542 }
543 }
544
545 /**
546 * <PRE>
547 * f0 -> "*"
548 * f1 -> [ &lt;CONST&gt; ]
549 * f2 -> [ Pointer() ]
550 * </PRE>
551 */
552 public void visit(Pointer n) {
553 n.f0.accept(this);
554 if ( n.f1.present() ) {
555 n.f1.accept(this);
556 }
557 if ( n.f2.present() ) {
558 n.f2.accept(this);
559 }
560 }
561
562 /**
563 * <PRE>
564 * f0 -> &lt;IDENTIFIER&gt;
565 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
566 * </PRE>
567 */
568 public void visit(IdentifierList n) {
569 n.f0.accept(this);
570 if ( n.f1.present() ) {
571 processList(n.f1);
572 }
573 }
574
575 /**
576 * <PRE>
577 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
578 * </PRE>
579 */
580 public void visit(Initializer n) {
581 n.f0.accept(this);
582 }
583
584 /**
585 * <PRE>
586 * f0 -> Initializer()
587 * f1 -> ( "," Initializer() )*
588 * </PRE>
589 */
590 public void visit(InitializerList n) {
591 n.f0.accept(this);
592 if ( n.f1.present() ) {
593 processList(n.f1);
594 }
595 }
596
597 /**
598 * <PRE>
599 * f0 -> "["
600 * f1 -> [ ConstantExpression() ]
601 * f2 -> "]"
602 * </PRE>
603 */
604 public void visit(Array n) {
605 n.f0.accept(this);
606 if ( n.f1.present() ) {
607 n.f1.accept(this);
608 }
609 n.f2.accept(this);
610 }
611
612 /**
613 * <PRE>
614 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
615 * </PRE>
616 */
617 public void visit(Statement n) {
618 n.f0.accept(this);
619 }
620
621 /**
622 * <PRE>
623 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
624 * </PRE>
625 */
626 public void visit(LabeledStatement n) {
627 n.f0.accept(this);
628 }
629
630 /**
631 * <PRE>
632 * f0 -> [ Expression() ]
633 * f1 -> ";"
634 * </PRE>
635 */
636 public void visit(ExpressionStatement n) {
637 if ( n.f0.present() ) {
638 n.f0.accept(this);
639 }
640 n.f1.accept(this);
641 }
642
643 /**
644 * <PRE>
645 * f0 -> "{"
646 * f1 -> ( LocalVariableDeclaration() | Statement() )*
647 * f2 -> "}"
648 * </PRE>
649 */
650 public void visit(CompoundStatement n) {
651 n.f0.accept(this);
652 if ( n.f1.present() ) {
653 processList(n.f1);
654 }
655 n.f2.accept(this);
656 }
657
658 /**
659 * <PRE>
660 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
661 * </PRE>
662 */
663 public void visit(SelectionStatement n) {
664 n.f0.accept(this);
665 }
666
667 /**
668 * <PRE>
669 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
670 * </PRE>
671 */
672 public void visit(IterationStatement n) {
673 n.f0.accept(this);
674 }
675
676 /**
677 * <PRE>
678 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
679 * </PRE>
680 */
681 public void visit(JumpStatement n) {
682 n.f0.accept(this);
683 }
684
685 /**
686 * <PRE>
687 * f0 -> AssignmentExpression()
688 * f1 -> ( "," AssignmentExpression() )*
689 * </PRE>
690 */
691 public void visit(Expression n) {
692 n.f0.accept(this);
693 if ( n.f1.present() ) {
694 processList(n.f1);
695 }
696 }
697
698 /**
699 * <PRE>
700 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
701 * | ConditionalExpression()
702 * </PRE>
703 */
704 public void visit(AssignmentExpression n) {
705 n.f0.accept(this);
706 }
707
708 /**
709 * <PRE>
710 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
711 * </PRE>
712 */
713 public void visit(AssignmentOperator n) {
714 n.f0.accept(this);
715 }
716
717 /**
718 * <PRE>
719 * f0 -> LogicalORExpression()
720 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
721 * </PRE>
722 */
723 public void visit(ConditionalExpression n) {
724 n.f0.accept(this);
725 if ( n.f1.present() ) {
726 n.f1.accept(this);
727 }
728 }
729
730 /**
731 * <PRE>
732 * f0 -> ConditionalExpression()
733 * </PRE>
734 */
735 public void visit(ConstantExpression n) {
736 n.f0.accept(this);
737 }
738
739 /**
740 * <PRE>
741 * f0 -> LogicalANDExpression()
742 * f1 -> [ "||" LogicalORExpression() ]
743 * </PRE>
744 */
745 public void visit(LogicalORExpression n) {
746 n.f0.accept(this);
747 if ( n.f1.present() ) {
748 n.f1.accept(this);
749 }
750 }
751
752 /**
753 * <PRE>
754 * f0 -> InclusiveORExpression()
755 * f1 -> [ "&&" LogicalANDExpression() ]
756 * </PRE>
757 */
758 public void visit(LogicalANDExpression n) {
759 n.f0.accept(this);
760 if ( n.f1.present() ) {
761 n.f1.accept(this);
762 }
763 }
764
765 /**
766 * <PRE>
767 * f0 -> ExclusiveORExpression()
768 * f1 -> [ "|" InclusiveORExpression() ]
769 * </PRE>
770 */
771 public void visit(InclusiveORExpression n) {
772 n.f0.accept(this);
773 if ( n.f1.present() ) {
774 n.f1.accept(this);
775 }
776 }
777
778 /**
779 * <PRE>
780 * f0 -> ANDExpression()
781 * f1 -> [ "^" ExclusiveORExpression() ]
782 * </PRE>
783 */
784 public void visit(ExclusiveORExpression n) {
785 n.f0.accept(this);
786 if ( n.f1.present() ) {
787 n.f1.accept(this);
788 }
789 }
790
791 /**
792 * <PRE>
793 * f0 -> EqualityExpression()
794 * f1 -> [ "&" ANDExpression() ]
795 * </PRE>
796 */
797 public void visit(ANDExpression n) {
798 n.f0.accept(this);
799 if ( n.f1.present() ) {
800 n.f1.accept(this);
801 }
802 }
803
804 /**
805 * <PRE>
806 * f0 -> RelationalExpression()
807 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
808 * </PRE>
809 */
810 public void visit(EqualityExpression n) {
811 n.f0.accept(this);
812 if ( n.f1.present() ) {
813 n.f1.accept(this);
814 }
815 }
816
817 /**
818 * <PRE>
819 * f0 -> ShiftExpression()
820 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
821 * </PRE>
822 */
823 public void visit(RelationalExpression n) {
824 n.f0.accept(this);
825 if ( n.f1.present() ) {
826 n.f1.accept(this);
827 }
828 }
829
830 /**
831 * <PRE>
832 * f0 -> AdditiveExpression()
833 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
834 * </PRE>
835 */
836 public void visit(ShiftExpression n) {
837 n.f0.accept(this);
838 if ( n.f1.present() ) {
839 n.f1.accept(this);
840 }
841 }
842
843 /**
844 * <PRE>
845 * f0 -> MultiplicativeExpression()
846 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
847 * </PRE>
848 */
849 public void visit(AdditiveExpression n) {
850 n.f0.accept(this);
851 if ( n.f1.present() ) {
852 n.f1.accept(this);
853 }
854 }
855
856 /**
857 * <PRE>
858 * f0 -> CastExpression()
859 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
860 * </PRE>
861 */
862 public void visit(MultiplicativeExpression n) {
863 n.f0.accept(this);
864 if ( n.f1.present() ) {
865 n.f1.accept(this);
866 }
867 }
868
869 /**
870 * <PRE>
871 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
872 * </PRE>
873 */
874 public void visit(CastExpression n) {
875 n.f0.accept(this);
876 }
877
878 /**
879 * <PRE>
880 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
881 * </PRE>
882 */
883 public void visit(UnaryExpression n) {
884 n.f0.accept(this);
885 }
886
887 /**
888 * <PRE>
889 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
890 * </PRE>
891 */
892 public void visit(UnaryOperator n) {
893 n.f0.accept(this);
894 }
895
896 /**
897 * <PRE>
898 * f0 -> PrimaryExpression()
899 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
900 * </PRE>
901 */
902 public void visit(PostfixExpression n) {
903 n.f0.accept(this);
904 if ( n.f1.present() ) {
905 processList(n.f1);
906 }
907 }
908
909 /**
910 * <PRE>
911 * f0 -> &lt;IDENTIFIER&gt;
912 * | Constant()
913 * | "(" Expression() ")"
914 * </PRE>
915 */
916 public void visit(PrimaryExpression n) {
917 n.f0.accept(this);
918 }
919
920 /**
921 * <PRE>
922 * f0 -> AssignmentOrTypeExpression()
923 * f1 -> ( "," AssignmentOrTypeExpression() )*
924 * </PRE>
925 */
926 public void visit(ArgumentExpressionList n) {
927 n.f0.accept(this);
928 if ( n.f1.present() ) {
929 processList(n.f1);
930 }
931 }
932
933 /**
934 * <PRE>
935 * f0 -> NoIdentifierTypeSpecifier()
936 * | AssignmentExpression()
937 * </PRE>
938 */
939 public void visit(AssignmentOrTypeExpression n) {
940 n.f0.accept(this);
941 }
942
943 /**
944 * <PRE>
945 * f0 -> &lt;INTEGER_LITERAL&gt;
946 * | &lt;FLOATING_POINT_LITERAL&gt;
947 * | &lt;CHARACTER_LITERAL&gt;
948 * | &lt;STRING_LITERAL&gt;
949 * </PRE>
950 */
951 public void visit(Constant n) {
952 n.f0.accept(this);
953 }
954
955}
956
957class FormatCommand {
958 public static final int FORCE = 0;
959 public static final int INDENT = 1;
960 public static final int OUTDENT = 2;
961 public static final int SPACE = 3;
962
963 private int command;
964 private int numCommands;
965
966 FormatCommand(int command, int numCommands) {
967 this.command = command;
968 this.numCommands = numCommands;
969 }
970
971 public int getCommand() { return command; }
972 public int getNumCommands() { return numCommands; }
973 public void setCommand(int i) { command = i; }
974 public void setNumCommands(int i) { numCommands = i; }
975}
976
977class TreeFormatterException extends RuntimeException {
978 TreeFormatterException() { super(); }
979 TreeFormatterException(String s) { super(s); }
980}
diff --git a/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/Visitor.java b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/Visitor.java
new file mode 100644
index 000000000..456698aec
--- /dev/null
+++ b/src/monkey/seaspider/org/gnunet/seaspider/parser/visitors/Visitor.java
@@ -0,0 +1,508 @@
1//
2// Generated by JTB 1.3.2
3//
4
5package org.gnunet.seaspider.parser.visitors;
6import org.gnunet.seaspider.parser.nodes.*;
7
8import java.util.*;
9
10/**
11 * All void visitors must implement this interface.
12 */
13
14public interface Visitor {
15
16 //
17 // void Auto class visitors
18 //
19
20 public void visit(NodeList n);
21 public void visit(NodeListOptional n);
22 public void visit(NodeOptional n);
23 public void visit(NodeSequence n);
24 public void visit(NodeToken n);
25
26 //
27 // User-generated visitor methods below
28 //
29
30 /**
31 * <PRE>
32 * f0 -> ( ExternalDeclaration() )+
33 * </PRE>
34 */
35 public void visit(TranslationUnit n);
36
37 /**
38 * <PRE>
39 * f0 -> ( StorageClassSpecifier() )*
40 * f1 -> ( FunctionDeclaration() | StructOrUnionSpecifier() | VariableDeclaration() | TypeDeclaration() )
41 * </PRE>
42 */
43 public void visit(ExternalDeclaration n);
44
45 /**
46 * <PRE>
47 * f0 -> TypeSpecifier()
48 * f1 -> &lt;IDENTIFIER&gt;
49 * f2 -> "("
50 * f3 -> [ ParameterList() ]
51 * f4 -> ")"
52 * f5 -> ( ";" | CompoundStatement() )
53 * </PRE>
54 */
55 public void visit(FunctionDeclaration n);
56
57 /**
58 * <PRE>
59 * f0 -> ( &lt;STATIC&gt; | &lt;EXTERN&gt; )
60 * </PRE>
61 */
62 public void visit(StorageClassSpecifier n);
63
64 /**
65 * <PRE>
66 * f0 -> &lt;TYPEDEF&gt;
67 * f1 -> ( DataType() | FunctionType() )
68 * f2 -> ";"
69 * </PRE>
70 */
71 public void visit(TypeDeclaration n);
72
73 /**
74 * <PRE>
75 * f0 -> StructOrUnionSpecifier()
76 * f1 -> &lt;IDENTIFIER&gt;
77 * </PRE>
78 */
79 public void visit(DataType n);
80
81 /**
82 * <PRE>
83 * f0 -> TypeSpecifier()
84 * f1 -> "("
85 * f2 -> "*"
86 * f3 -> &lt;IDENTIFIER&gt;
87 * f4 -> ")"
88 * f5 -> "("
89 * f6 -> [ ParameterList() ]
90 * f7 -> ")"
91 * </PRE>
92 */
93 public void visit(FunctionType n);
94
95 /**
96 * <PRE>
97 * f0 -> ParameterDeclaration()
98 * f1 -> ( "," ParameterDeclaration() )*
99 * f2 -> [ "," "..." ]
100 * </PRE>
101 */
102 public void visit(ParameterList n);
103
104 /**
105 * <PRE>
106 * f0 -> TypeSpecifier()
107 * f1 -> &lt;IDENTIFIER&gt;
108 * f2 -> [ Array() ]
109 * </PRE>
110 */
111 public void visit(ParameterDeclaration n);
112
113 /**
114 * <PRE>
115 * f0 -> VariableClassSpecifier()
116 * f1 -> TypeSpecifier()
117 * f2 -> InitDeclaratorList()
118 * f3 -> ";"
119 * </PRE>
120 */
121 public void visit(VariableDeclaration n);
122
123 /**
124 * <PRE>
125 * f0 -> [ &lt;STATIC&gt; ]
126 * f1 -> VariableDeclaration()
127 * </PRE>
128 */
129 public void visit(LocalVariableDeclaration n);
130
131 /**
132 * <PRE>
133 * f0 -> ( &lt;AUTO&gt; | &lt;REGISTER&gt; )*
134 * </PRE>
135 */
136 public void visit(VariableClassSpecifier n);
137
138 /**
139 * <PRE>
140 * f0 -> [ &lt;CONST&gt; ]
141 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() | &lt;IDENTIFIER&gt; )
142 * f2 -> [ Pointer() ]
143 * f3 -> [ Array() ]
144 * </PRE>
145 */
146 public void visit(TypeSpecifier n);
147
148 /**
149 * <PRE>
150 * f0 -> [ &lt;CONST&gt; ]
151 * f1 -> ( &lt;VOID&gt; | &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] | &lt;FLOAT&gt; | &lt;DOUBLE&gt; | ( &lt;SIGNED&gt; | &lt;UNSIGNED&gt; ) [ &lt;CHAR&gt; | &lt;SHORT&gt; [ &lt;INT&gt; ] | &lt;INT&gt; | &lt;LONG&gt; [ &lt;LONG&gt; ] ] | StructOrUnionSpecifier() | EnumSpecifier() )
152 * f2 -> [ Pointer() ]
153 * f3 -> [ Array() ]
154 * </PRE>
155 */
156 public void visit(NoIdentifierTypeSpecifier n);
157
158 /**
159 * <PRE>
160 * f0 -> StructOrUnion() [ &lt;IDENTIFIER&gt; ] "{" StructDeclarationList() "}"
161 * | StructOrUnion() &lt;IDENTIFIER&gt;
162 * </PRE>
163 */
164 public void visit(StructOrUnionSpecifier n);
165
166 /**
167 * <PRE>
168 * f0 -> ( &lt;STRUCT&gt; | &lt;UNION&gt; )
169 * </PRE>
170 */
171 public void visit(StructOrUnion n);
172
173 /**
174 * <PRE>
175 * f0 -> ( StructDeclaration() )+
176 * </PRE>
177 */
178 public void visit(StructDeclarationList n);
179
180 /**
181 * <PRE>
182 * f0 -> InitDeclarator()
183 * f1 -> ( "," InitDeclarator() )*
184 * </PRE>
185 */
186 public void visit(InitDeclaratorList n);
187
188 /**
189 * <PRE>
190 * f0 -> &lt;IDENTIFIER&gt;
191 * f1 -> [ Array() ]
192 * f2 -> [ "=" Initializer() ]
193 * </PRE>
194 */
195 public void visit(InitDeclarator n);
196
197 /**
198 * <PRE>
199 * f0 -> TypeSpecifier()
200 * f1 -> &lt;IDENTIFIER&gt;
201 * f2 -> [ Array() | ":" ConstantExpression() ]
202 * f3 -> [ &lt;IDENTIFIER&gt; ]
203 * f4 -> ";"
204 * </PRE>
205 */
206 public void visit(StructDeclaration n);
207
208 /**
209 * <PRE>
210 * f0 -> &lt;ENUM&gt;
211 * f1 -> ( [ &lt;IDENTIFIER&gt; ] "{" EnumeratorList() "}" | &lt;IDENTIFIER&gt; )
212 * </PRE>
213 */
214 public void visit(EnumSpecifier n);
215
216 /**
217 * <PRE>
218 * f0 -> Enumerator()
219 * f1 -> ( "," Enumerator() )*
220 * </PRE>
221 */
222 public void visit(EnumeratorList n);
223
224 /**
225 * <PRE>
226 * f0 -> &lt;IDENTIFIER&gt;
227 * f1 -> [ "=" ConstantExpression() ]
228 * </PRE>
229 */
230 public void visit(Enumerator n);
231
232 /**
233 * <PRE>
234 * f0 -> "*"
235 * f1 -> [ &lt;CONST&gt; ]
236 * f2 -> [ Pointer() ]
237 * </PRE>
238 */
239 public void visit(Pointer n);
240
241 /**
242 * <PRE>
243 * f0 -> &lt;IDENTIFIER&gt;
244 * f1 -> ( "," &lt;IDENTIFIER&gt; )*
245 * </PRE>
246 */
247 public void visit(IdentifierList n);
248
249 /**
250 * <PRE>
251 * f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
252 * </PRE>
253 */
254 public void visit(Initializer n);
255
256 /**
257 * <PRE>
258 * f0 -> Initializer()
259 * f1 -> ( "," Initializer() )*
260 * </PRE>
261 */
262 public void visit(InitializerList n);
263
264 /**
265 * <PRE>
266 * f0 -> "["
267 * f1 -> [ ConstantExpression() ]
268 * f2 -> "]"
269 * </PRE>
270 */
271 public void visit(Array n);
272
273 /**
274 * <PRE>
275 * f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
276 * </PRE>
277 */
278 public void visit(Statement n);
279
280 /**
281 * <PRE>
282 * f0 -> ( &lt;IDENTIFIER&gt; ":" Statement() | &lt;CASE&gt; ConstantExpression() ":" Statement() | &lt;DFLT&gt; ":" Statement() )
283 * </PRE>
284 */
285 public void visit(LabeledStatement n);
286
287 /**
288 * <PRE>
289 * f0 -> [ Expression() ]
290 * f1 -> ";"
291 * </PRE>
292 */
293 public void visit(ExpressionStatement n);
294
295 /**
296 * <PRE>
297 * f0 -> "{"
298 * f1 -> ( LocalVariableDeclaration() | Statement() )*
299 * f2 -> "}"
300 * </PRE>
301 */
302 public void visit(CompoundStatement n);
303
304 /**
305 * <PRE>
306 * f0 -> ( &lt;IF&gt; "(" Expression() ")" Statement() [ &lt;ELSE&gt; Statement() ] | &lt;SWITCH&gt; "(" Expression() ")" Statement() )
307 * </PRE>
308 */
309 public void visit(SelectionStatement n);
310
311 /**
312 * <PRE>
313 * f0 -> ( &lt;WHILE&gt; "(" Expression() ")" Statement() | &lt;DO&gt; Statement() &lt;WHILE&gt; "(" Expression() ")" ";" | &lt;FOR&gt; "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
314 * </PRE>
315 */
316 public void visit(IterationStatement n);
317
318 /**
319 * <PRE>
320 * f0 -> ( &lt;GOTO&gt; &lt;IDENTIFIER&gt; ";" | &lt;CONTINUE&gt; ";" | &lt;BREAK&gt; ";" | &lt;RETURN&gt; [ Expression() ] ";" )
321 * </PRE>
322 */
323 public void visit(JumpStatement n);
324
325 /**
326 * <PRE>
327 * f0 -> AssignmentExpression()
328 * f1 -> ( "," AssignmentExpression() )*
329 * </PRE>
330 */
331 public void visit(Expression n);
332
333 /**
334 * <PRE>
335 * f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
336 * | ConditionalExpression()
337 * </PRE>
338 */
339 public void visit(AssignmentExpression n);
340
341 /**
342 * <PRE>
343 * f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "&lt;&lt;=" | "&gt;&gt;=" | "&=" | "^=" | "|=" )
344 * </PRE>
345 */
346 public void visit(AssignmentOperator n);
347
348 /**
349 * <PRE>
350 * f0 -> LogicalORExpression()
351 * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
352 * </PRE>
353 */
354 public void visit(ConditionalExpression n);
355
356 /**
357 * <PRE>
358 * f0 -> ConditionalExpression()
359 * </PRE>
360 */
361 public void visit(ConstantExpression n);
362
363 /**
364 * <PRE>
365 * f0 -> LogicalANDExpression()
366 * f1 -> [ "||" LogicalORExpression() ]
367 * </PRE>
368 */
369 public void visit(LogicalORExpression n);
370
371 /**
372 * <PRE>
373 * f0 -> InclusiveORExpression()
374 * f1 -> [ "&&" LogicalANDExpression() ]
375 * </PRE>
376 */
377 public void visit(LogicalANDExpression n);
378
379 /**
380 * <PRE>
381 * f0 -> ExclusiveORExpression()
382 * f1 -> [ "|" InclusiveORExpression() ]
383 * </PRE>
384 */
385 public void visit(InclusiveORExpression n);
386
387 /**
388 * <PRE>
389 * f0 -> ANDExpression()
390 * f1 -> [ "^" ExclusiveORExpression() ]
391 * </PRE>
392 */
393 public void visit(ExclusiveORExpression n);
394
395 /**
396 * <PRE>
397 * f0 -> EqualityExpression()
398 * f1 -> [ "&" ANDExpression() ]
399 * </PRE>
400 */
401 public void visit(ANDExpression n);
402
403 /**
404 * <PRE>
405 * f0 -> RelationalExpression()
406 * f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
407 * </PRE>
408 */
409 public void visit(EqualityExpression n);
410
411 /**
412 * <PRE>
413 * f0 -> ShiftExpression()
414 * f1 -> [ ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" ) RelationalExpression() ]
415 * </PRE>
416 */
417 public void visit(RelationalExpression n);
418
419 /**
420 * <PRE>
421 * f0 -> AdditiveExpression()
422 * f1 -> [ ( "&lt;&lt;" | "&gt;&gt;" ) ShiftExpression() ]
423 * </PRE>
424 */
425 public void visit(ShiftExpression n);
426
427 /**
428 * <PRE>
429 * f0 -> MultiplicativeExpression()
430 * f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
431 * </PRE>
432 */
433 public void visit(AdditiveExpression n);
434
435 /**
436 * <PRE>
437 * f0 -> CastExpression()
438 * f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
439 * </PRE>
440 */
441 public void visit(MultiplicativeExpression n);
442
443 /**
444 * <PRE>
445 * f0 -> ( "(" TypeSpecifier() ")" CastExpression() | UnaryExpression() )
446 * </PRE>
447 */
448 public void visit(CastExpression n);
449
450 /**
451 * <PRE>
452 * f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | &lt;SIZEOF&gt; ( UnaryExpression() | "(" TypeSpecifier() ")" ) )
453 * </PRE>
454 */
455 public void visit(UnaryExpression n);
456
457 /**
458 * <PRE>
459 * f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
460 * </PRE>
461 */
462 public void visit(UnaryOperator n);
463
464 /**
465 * <PRE>
466 * f0 -> PrimaryExpression()
467 * f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." &lt;IDENTIFIER&gt; | "-&gt;" &lt;IDENTIFIER&gt; | "++" | "--" )*
468 * </PRE>
469 */
470 public void visit(PostfixExpression n);
471
472 /**
473 * <PRE>
474 * f0 -> &lt;IDENTIFIER&gt;
475 * | Constant()
476 * | "(" Expression() ")"
477 * </PRE>
478 */
479 public void visit(PrimaryExpression n);
480
481 /**
482 * <PRE>
483 * f0 -> AssignmentOrTypeExpression()
484 * f1 -> ( "," AssignmentOrTypeExpression() )*
485 * </PRE>
486 */
487 public void visit(ArgumentExpressionList n);
488
489 /**
490 * <PRE>
491 * f0 -> NoIdentifierTypeSpecifier()
492 * | AssignmentExpression()
493 * </PRE>
494 */
495 public void visit(AssignmentOrTypeExpression n);
496
497 /**
498 * <PRE>
499 * f0 -> &lt;INTEGER_LITERAL&gt;
500 * | &lt;FLOATING_POINT_LITERAL&gt;
501 * | &lt;CHARACTER_LITERAL&gt;
502 * | &lt;STRING_LITERAL&gt;
503 * </PRE>
504 */
505 public void visit(Constant n);
506
507}
508