001//
002// Generated by JTB 1.1.2
003//
004
005package jtb.cparser.visitor;
006import jtb.cparser.syntaxtree.*;
007import java.util.*;
008
009/**
010 * All visitors must implement this interface.
011 */
012public interface Visitor {
013   //
014   // Auto class visitors
015   //
016   public void visit(NodeList n);
017   public void visit(NodeListOptional n);
018   public void visit(NodeOptional n);
019   public void visit(NodeSequence n);
020   public void visit(NodeToken n);
021
022   //
023   // User-generated visitor methods below
024   //
025
026   // f0 -> ( ExternalDeclaration() )+
027   public void visit(TranslationUnit n);
028
029   // f0 -> ( FunctionDefinition() | Declaration() )
030   public void visit(ExternalDeclaration n);
031
032   // f0 -> [ DeclarationSpecifiers() ]
033   // f1 -> Declarator()
034   // f2 -> [ DeclarationList() ]
035   // f3 -> CompoundStatement()
036   public void visit(FunctionDefinition n);
037
038   // f0 -> DeclarationSpecifiers()
039   // f1 -> [ InitDeclaratorList() ]
040   // f2 -> ";"
041   public void visit(Declaration n);
042
043   // f0 -> ( Declaration() )+
044   public void visit(DeclarationList n);
045
046   // f0 -> StorageClassSpecifier() [ DeclarationSpecifiers() ]
047   //       | TypeSpecifier() [ DeclarationSpecifiers() ]
048   //       | TypeQualifier() [ DeclarationSpecifiers() ]
049   public void visit(DeclarationSpecifiers n);
050
051   // f0 -> ( &lt; AUTO &gt; | <REGISTER> | <STATIC> | <EXTERN> | <TYPEDEF> )
052   public void visit(StorageClassSpecifier n);
053
054   // f0 -> ( <VOID> | <CHAR> | <SHORT> | <INT> | <LONG> | <FLOAT> | <DOUBLE> | <SIGNED> | <UNSIGNED> | StructOrUnionSpecifier() | EnumSpecifier() | TypedefName() )
055   public void visit(TypeSpecifier n);
056
057   // f0 -> ( <CONST> | <VOLATILE> )
058   public void visit(TypeQualifier n);
059
060   // f0 -> StructOrUnion()
061   // f1 -> ( [ <IDENTIFIER> ] "{" StructDeclarationList() "}" | <IDENTIFIER> )
062   public void visit(StructOrUnionSpecifier n);
063
064   // f0 -> ( <STRUCT> | <UNION> )
065   public void visit(StructOrUnion n);
066
067   // f0 -> ( StructDeclaration() )+
068   public void visit(StructDeclarationList n);
069
070   // f0 -> InitDeclarator()
071   // f1 -> ( "," InitDeclarator() )*
072   public void visit(InitDeclaratorList n);
073
074   // f0 -> Declarator()
075   // f1 -> [ "=" Initializer() ]
076   public void visit(InitDeclarator n);
077
078   // f0 -> SpecifierQualifierList()
079   // f1 -> StructDeclaratorList()
080   // f2 -> ";"
081   public void visit(StructDeclaration n);
082
083   // f0 -> TypeSpecifier() [ SpecifierQualifierList() ]
084   //       | TypeQualifier() [ SpecifierQualifierList() ]
085   public void visit(SpecifierQualifierList n);
086
087   // f0 -> StructDeclarator()
088   // f1 -> ( "," StructDeclarator() )*
089   public void visit(StructDeclaratorList n);
090
091   // f0 -> ( Declarator() | [ Declarator() ] ":" ConstantExpression() )
092   public void visit(StructDeclarator n);
093
094   // f0 -> <ENUM>
095   // f1 -> ( [ <IDENTIFIER> ] "{" EnumeratorList() "}" | <IDENTIFIER> )
096   public void visit(EnumSpecifier n);
097
098   // f0 -> Enumerator()
099   // f1 -> ( "," Enumerator() )*
100   public void visit(EnumeratorList n);
101
102   // f0 -> <IDENTIFIER>
103   // f1 -> [ "=" ConstantExpression() ]
104   public void visit(Enumerator n);
105
106   // f0 -> [ Pointer() ]
107   // f1 -> DirectDeclarator()
108   public void visit(Declarator n);
109
110   // f0 -> ( t=<IDENTIFIER> | "(" Declarator() ")" )
111   // f1 -> ( "[" [ ConstantExpression() ] "]" | "(" ParameterTypeList() ")" | "(" [ IdentifierList() ] ")" )*
112   public void visit(DirectDeclarator n);
113
114   // f0 -> "*"
115   // f1 -> [ TypeQualifierList() ]
116   // f2 -> [ Pointer() ]
117   public void visit(Pointer n);
118
119   // f0 -> ( TypeQualifier() )+
120   public void visit(TypeQualifierList n);
121
122   // f0 -> ParameterList()
123   // f1 -> [ "," "..." ]
124   public void visit(ParameterTypeList n);
125
126   // f0 -> ParameterDeclaration()
127   // f1 -> ( "," ParameterDeclaration() )*
128   public void visit(ParameterList n);
129
130   // f0 -> DeclarationSpecifiers()
131   // f1 -> ( Declarator() | [ AbstractDeclarator() ] )
132   public void visit(ParameterDeclaration n);
133
134   // f0 -> <IDENTIFIER>
135   // f1 -> ( "," <IDENTIFIER> )*
136   public void visit(IdentifierList n);
137
138   // f0 -> ( AssignmentExpression() | "{" InitializerList() [ "," ] "}" )
139   public void visit(Initializer n);
140
141   // f0 -> Initializer()
142   // f1 -> ( "," Initializer() )*
143   public void visit(InitializerList n);
144
145   // f0 -> SpecifierQualifierList()
146   // f1 -> [ AbstractDeclarator() ]
147   public void visit(TypeName n);
148
149   // f0 -> ( Pointer() | [ Pointer() ] DirectAbstractDeclarator() )
150   public void visit(AbstractDeclarator n);
151
152   // f0 -> ( "(" AbstractDeclarator() ")" | "[" [ ConstantExpression() ] "]" | "(" [ ParameterTypeList() ] ")" )
153   // f1 -> ( "[" [ ConstantExpression() ] "]" | "(" [ ParameterTypeList() ] ")" )*
154   public void visit(DirectAbstractDeclarator n);
155
156   // f0 -> <IDENTIFIER>
157   public void visit(TypedefName n);
158
159   // f0 -> ( LabeledStatement() | ExpressionStatement() | CompoundStatement() | SelectionStatement() | IterationStatement() | JumpStatement() )
160   public void visit(Statement n);
161
162   // f0 -> ( <IDENTIFIER> ":" Statement() | <CASE> ConstantExpression() ":" Statement() | <DFLT> ":" Statement() )
163   public void visit(LabeledStatement n);
164
165   // f0 -> [ Expression() ]
166   // f1 -> ";"
167   public void visit(ExpressionStatement n);
168
169   // f0 -> "{"
170   // f1 -> [ DeclarationList() ]
171   // f2 -> [ StatementList() ]
172   // f3 -> "}"
173   public void visit(CompoundStatement n);
174
175   // f0 -> ( Statement() )+
176   public void visit(StatementList n);
177
178   // f0 -> ( <IF> "(" Expression() ")" Statement() [ <ELSE> Statement() ] | <SWITCH> "(" Expression() ")" Statement() )
179   public void visit(SelectionStatement n);
180
181   // f0 -> ( <WHILE> "(" Expression() ")" Statement() | <DO> Statement() <WHILE> "(" Expression() ")" ";" | <FOR> "(" [ Expression() ] ";" [ Expression() ] ";" [ Expression() ] ")" Statement() )
182   public void visit(IterationStatement n);
183
184   // f0 -> ( <GOTO> <IDENTIFIER> ";" | <CONTINUE> ";" | <BREAK> ";" | <RETURN> [ Expression() ] ";" )
185   public void visit(JumpStatement n);
186
187   // f0 -> AssignmentExpression()
188   // f1 -> ( "," AssignmentExpression() )*
189   public void visit(Expression n);
190
191   // f0 -> UnaryExpression() AssignmentOperator() AssignmentExpression()
192   //       | ConditionalExpression()
193   public void visit(AssignmentExpression n);
194
195   // f0 -> ( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" )
196   public void visit(AssignmentOperator n);
197
198   // f0 -> LogicalORExpression()
199   // f1 -> [ "?" Expression() ":" ConditionalExpression() ]
200   public void visit(ConditionalExpression n);
201
202   // f0 -> ConditionalExpression()
203   public void visit(ConstantExpression n);
204
205   // f0 -> LogicalANDExpression()
206   // f1 -> [ "||" LogicalORExpression() ]
207   public void visit(LogicalORExpression n);
208
209   // f0 -> InclusiveORExpression()
210   // f1 -> [ "&&" LogicalANDExpression() ]
211   public void visit(LogicalANDExpression n);
212
213   // f0 -> ExclusiveORExpression()
214   // f1 -> [ "|" InclusiveORExpression() ]
215   public void visit(InclusiveORExpression n);
216
217   // f0 -> ANDExpression()
218   // f1 -> [ "^" ExclusiveORExpression() ]
219   public void visit(ExclusiveORExpression n);
220
221   // f0 -> EqualityExpression()
222   // f1 -> [ "&" ANDExpression() ]
223   public void visit(ANDExpression n);
224
225   // f0 -> RelationalExpression()
226   // f1 -> [ ( "==" | "!=" ) EqualityExpression() ]
227   public void visit(EqualityExpression n);
228
229   // f0 -> ShiftExpression()
230   // f1 -> [ ( "<" | ">" | "<=" | ">=" ) RelationalExpression() ]
231   public void visit(RelationalExpression n);
232
233   // f0 -> AdditiveExpression()
234   // f1 -> [ ( "<<" | ">>" ) ShiftExpression() ]
235   public void visit(ShiftExpression n);
236
237   // f0 -> MultiplicativeExpression()
238   // f1 -> [ ( "+" | "-" ) AdditiveExpression() ]
239   public void visit(AdditiveExpression n);
240
241   // f0 -> CastExpression()
242   // f1 -> [ ( "*" | "/" | "%" ) MultiplicativeExpression() ]
243   public void visit(MultiplicativeExpression n);
244
245   // f0 -> ( "(" TypeName() ")" CastExpression() | UnaryExpression() )
246   public void visit(CastExpression n);
247
248   // f0 -> ( PostfixExpression() | "++" UnaryExpression() | "--" UnaryExpression() | UnaryOperator() CastExpression() | <SIZEOF> ( UnaryExpression() | "(" TypeName() ")" ) )
249   public void visit(UnaryExpression n);
250
251   // f0 -> ( "&" | "*" | "+" | "-" | "~" | "!" )
252   public void visit(UnaryOperator n);
253
254   // f0 -> PrimaryExpression()
255   // f1 -> ( "[" Expression() "]" | "(" [ ArgumentExpressionList() ] ")" | "." <IDENTIFIER> | "->" <IDENTIFIER> | "++" | "--" )*
256   public void visit(PostfixExpression n);
257
258   // f0 -> ( <IDENTIFIER> | Constant() | "(" Expression() ")" )
259   public void visit(PrimaryExpression n);
260
261   // f0 -> AssignmentExpression()
262   // f1 -> ( "," AssignmentExpression() )*
263   public void visit(ArgumentExpressionList n);
264
265   // f0 -> <INTEGER_LITERAL>
266   //       | <FLOATING_POINT_LITERAL>
267   //       | <CHARACTER_LITERAL>
268   //       | <STRING_LITERAL>
269   public void visit(Constant n);
270
271}