001// 002// Generated by JTB 1.3.2 003// 004 005package jtb.visitor; 006import jtb.syntaxtree.*; 007import java.util.*; 008 009/** 010 * All GJ visitors with no argument must implement this interface. 011 */ 012 013public interface GJNoArguVisitor<R> { 014 015 // 016 // GJ Auto class visitors with no argument 017 // 018 019 public R visit(NodeList n); 020 public R visit(NodeListOptional n); 021 public R visit(NodeOptional n); 022 public R visit(NodeSequence n); 023 public R visit(NodeToken n); 024 025 // 026 // User-generated visitor methods below 027 // 028 029 // f0 -> [ PackageDeclaration() ] 030 // f1 -> ( ImportDeclaration() )* 031 // f2 -> ( TypeDeclaration() )* 032 // f3 -> ( <"\u001a"> )? 033 // f4 -> ( <STUFF_TO_IGNORE: ~[]> )? 034 // f5 -> <EOF> 035 public R visit(CompilationUnit n); 036 037 // f0 -> Modifiers() 038 // f1 -> "package" 039 // f2 -> Name() 040 // f3 -> ";" 041 public R visit(PackageDeclaration n); 042 043 // f0 -> "import" 044 // f1 -> [ "static" ] 045 // f2 -> Name() 046 // f3 -> [ "." "*" ] 047 // f4 -> ";" 048 public R visit(ImportDeclaration n); 049 050 // f0 -> ( ( "public" | "static" | "protected" | "private" | "final" | "abstract" | "synchronized" | "native" | "transient" | "volatile" | "strictfp" | Annotation() ) )* 051 public R visit(Modifiers n); 052 053 // f0 -> ";" 054 // | Modifiers() ( ClassOrInterfaceDeclaration(modifiers) | EnumDeclaration(modifiers) | AnnotationTypeDeclaration(modifiers) ) 055 public R visit(TypeDeclaration n); 056 057 // f0 -> ( "class" | "interface" ) 058 // f1 -> <IDENTIFIER> 059 // f2 -> [ TypeParameters() ] 060 // f3 -> [ ExtendsList(isInterface) ] 061 // f4 -> [ ImplementsList(isInterface) ] 062 // f5 -> ClassOrInterfaceBody(isInterface) 063 public R visit(ClassOrInterfaceDeclaration n); 064 065 // f0 -> "extends" 066 // f1 -> ClassOrInterfaceType() 067 // f2 -> ( "," ClassOrInterfaceType() )* 068 public R visit(ExtendsList n); 069 070 // f0 -> "implements" 071 // f1 -> ClassOrInterfaceType() 072 // f2 -> ( "," ClassOrInterfaceType() )* 073 public R visit(ImplementsList n); 074 075 // f0 -> "enum" 076 // f1 -> <IDENTIFIER> 077 // f2 -> [ ImplementsList(false) ] 078 // f3 -> EnumBody() 079 public R visit(EnumDeclaration n); 080 081 // f0 -> "{" 082 // f1 -> [ EnumConstant() ( "," EnumConstant() )* ] 083 // f2 -> [ "," ] 084 // f3 -> [ ";" ( ClassOrInterfaceBodyDeclaration(false) )* ] 085 // f4 -> "}" 086 public R visit(EnumBody n); 087 088 // f0 -> Modifiers() 089 // f1 -> <IDENTIFIER> 090 // f2 -> [ Arguments() ] 091 // f3 -> [ ClassOrInterfaceBody(false) ] 092 public R visit(EnumConstant n); 093 094 // f0 -> "<" 095 // f1 -> TypeParameter() 096 // f2 -> ( "," TypeParameter() )* 097 // f3 -> ">" 098 public R visit(TypeParameters n); 099 100 // f0 -> <IDENTIFIER> 101 // f1 -> [ TypeBound() ] 102 public R visit(TypeParameter n); 103 104 // f0 -> "extends" 105 // f1 -> ClassOrInterfaceType() 106 // f2 -> ( "&" ClassOrInterfaceType() )* 107 public R visit(TypeBound n); 108 109 // f0 -> "{" 110 // f1 -> ( ClassOrInterfaceBodyDeclaration(isInterface) )* 111 // f2 -> "}" 112 public R visit(ClassOrInterfaceBody n); 113 114 // f0 -> Initializer() 115 // | Modifiers() ( ClassOrInterfaceDeclaration(modifiers) | EnumDeclaration(modifiers) | ConstructorDeclaration() | FieldDeclaration(modifiers) | MethodDeclaration(modifiers) | AnnotationTypeDeclaration(modifiers) ) 116 // | ";" 117 public R visit(ClassOrInterfaceBodyDeclaration n); 118 119 // f0 -> Type() 120 // f1 -> VariableDeclarator() 121 // f2 -> ( "," VariableDeclarator() )* 122 // f3 -> ";" 123 public R visit(FieldDeclaration n); 124 125 // f0 -> VariableDeclaratorId() 126 // f1 -> [ "=" VariableInitializer() ] 127 public R visit(VariableDeclarator n); 128 129 // f0 -> <IDENTIFIER> 130 // f1 -> ( "[" "]" )* 131 public R visit(VariableDeclaratorId n); 132 133 // f0 -> ArrayInitializer() 134 // | Expression() 135 public R visit(VariableInitializer n); 136 137 // f0 -> "{" 138 // f1 -> [ VariableInitializer() ( "," VariableInitializer() )* ] 139 // f2 -> [ "," ] 140 // f3 -> "}" 141 public R visit(ArrayInitializer n); 142 143 // f0 -> [ TypeParameters() ] 144 // f1 -> ResultType() 145 // f2 -> MethodDeclarator() 146 // f3 -> [ "throws" NameList() ] 147 // f4 -> ( Block() | ";" ) 148 public R visit(MethodDeclaration n); 149 150 // f0 -> <IDENTIFIER> 151 // f1 -> FormalParameters() 152 // f2 -> ( "[" "]" )* 153 public R visit(MethodDeclarator n); 154 155 // f0 -> "(" 156 // f1 -> [ FormalParameter() ( "," FormalParameter() )* ] 157 // f2 -> ")" 158 public R visit(FormalParameters n); 159 160 // f0 -> Modifiers() 161 // f1 -> [ "final" | Annotation() ] 162 // f2 -> Type() 163 // f3 -> [ "..." ] 164 // f4 -> VariableDeclaratorId() 165 public R visit(FormalParameter n); 166 167 // f0 -> [ TypeParameters() ] 168 // f1 -> <IDENTIFIER> 169 // f2 -> FormalParameters() 170 // f3 -> [ "throws" NameList() ] 171 // f4 -> "{" 172 // f5 -> [ ExplicitConstructorInvocation() ] 173 // f6 -> ( BlockStatement() )* 174 // f7 -> "}" 175 public R visit(ConstructorDeclaration n); 176 177 // f0 -> [ TypeArguments() ] ( "this" | "super" ) Arguments() ";" 178 // | PrimaryExpression() "." [ TypeArguments() ] "super" Arguments() ";" 179 public R visit(ExplicitConstructorInvocation n); 180 181 // f0 -> [ "static" ] 182 // f1 -> Block() 183 public R visit(Initializer n); 184 185 // f0 -> ReferenceType() 186 // | PrimitiveType() 187 public R visit(Type n); 188 189 // f0 -> PrimitiveType() ( "[" "]" )+ 190 // | ( ClassOrInterfaceType() ) ( "[" "]" )* 191 public R visit(ReferenceType n); 192 193 // f0 -> <IDENTIFIER> 194 // f1 -> [ TypeArguments() ] 195 // f2 -> ( "." <IDENTIFIER> [ TypeArguments() ] )* 196 public R visit(ClassOrInterfaceType n); 197 198 // f0 -> "<" 199 // f1 -> TypeArgument() 200 // f2 -> ( "," TypeArgument() )* 201 // f3 -> ">" 202 public R visit(TypeArguments n); 203 204 // f0 -> ReferenceType() 205 // | "?" [ WildcardBounds() ] 206 public R visit(TypeArgument n); 207 208 // f0 -> "extends" ReferenceType() 209 // | "super" ReferenceType() 210 public R visit(WildcardBounds n); 211 212 // f0 -> "boolean" 213 // | "char" 214 // | "byte" 215 // | "short" 216 // | "int" 217 // | "long" 218 // | "float" 219 // | "double" 220 public R visit(PrimitiveType n); 221 222 // f0 -> "void" 223 // | Type() 224 public R visit(ResultType n); 225 226 // f0 -> <IDENTIFIER> 227 // f1 -> ( "." <IDENTIFIER> )* 228 public R visit(Name n); 229 230 // f0 -> Name() 231 // f1 -> ( "," Name() )* 232 public R visit(NameList n); 233 234 // f0 -> ConditionalExpression() 235 // f1 -> [ AssignmentOperator() Expression() ] 236 public R visit(Expression n); 237 238 // f0 -> "=" 239 // | "*=" 240 // | "/=" 241 // | "%=" 242 // | "+=" 243 // | "-=" 244 // | "<<=" 245 // | ">>=" 246 // | ">>>=" 247 // | "&=" 248 // | "^=" 249 // | "|=" 250 public R visit(AssignmentOperator n); 251 252 // f0 -> ConditionalOrExpression() 253 // f1 -> [ "?" Expression() ":" Expression() ] 254 public R visit(ConditionalExpression n); 255 256 // f0 -> ConditionalAndExpression() 257 // f1 -> ( "||" ConditionalAndExpression() )* 258 public R visit(ConditionalOrExpression n); 259 260 // f0 -> InclusiveOrExpression() 261 // f1 -> ( "&&" InclusiveOrExpression() )* 262 public R visit(ConditionalAndExpression n); 263 264 // f0 -> ExclusiveOrExpression() 265 // f1 -> ( "|" ExclusiveOrExpression() )* 266 public R visit(InclusiveOrExpression n); 267 268 // f0 -> AndExpression() 269 // f1 -> ( "^" AndExpression() )* 270 public R visit(ExclusiveOrExpression n); 271 272 // f0 -> EqualityExpression() 273 // f1 -> ( "&" EqualityExpression() )* 274 public R visit(AndExpression n); 275 276 // f0 -> InstanceOfExpression() 277 // f1 -> ( ( "==" | "!=" ) InstanceOfExpression() )* 278 public R visit(EqualityExpression n); 279 280 // f0 -> RelationalExpression() 281 // f1 -> [ "instanceof" Type() ] 282 public R visit(InstanceOfExpression n); 283 284 // f0 -> ShiftExpression() 285 // f1 -> ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression() )* 286 public R visit(RelationalExpression n); 287 288 // f0 -> AdditiveExpression() 289 // f1 -> ( ( "<<" | RSIGNEDSHIFT() | RUNSIGNEDSHIFT() ) AdditiveExpression() )* 290 public R visit(ShiftExpression n); 291 292 // f0 -> MultiplicativeExpression() 293 // f1 -> ( ( "+" | "-" ) MultiplicativeExpression() )* 294 public R visit(AdditiveExpression n); 295 296 // f0 -> UnaryExpression() 297 // f1 -> ( ( "*" | "/" | "%" ) UnaryExpression() )* 298 public R visit(MultiplicativeExpression n); 299 300 // f0 -> ( "+" | "-" ) UnaryExpression() 301 // | PreIncrementExpression() 302 // | PreDecrementExpression() 303 // | UnaryExpressionNotPlusMinus() 304 public R visit(UnaryExpression n); 305 306 // f0 -> "++" 307 // f1 -> PrimaryExpression() 308 public R visit(PreIncrementExpression n); 309 310 // f0 -> "--" 311 // f1 -> PrimaryExpression() 312 public R visit(PreDecrementExpression n); 313 314 // f0 -> ( "~" | "!" ) UnaryExpression() 315 // | CastExpression() 316 // | PostfixExpression() 317 public R visit(UnaryExpressionNotPlusMinus n); 318 319 // f0 -> "(" PrimitiveType() 320 // | "(" Type() "[" "]" 321 // | "(" Type() ")" ( "~" | "!" | "(" | <IDENTIFIER> | "this" | "super" | "new" | Literal() ) 322 public R visit(CastLookahead n); 323 324 // f0 -> PrimaryExpression() 325 // f1 -> [ "++" | "--" ] 326 public R visit(PostfixExpression n); 327 328 // f0 -> "(" Type() ")" UnaryExpression() 329 // | "(" Type() ")" UnaryExpressionNotPlusMinus() 330 public R visit(CastExpression n); 331 332 // f0 -> PrimaryPrefix() 333 // f1 -> ( PrimarySuffix() )* 334 public R visit(PrimaryExpression n); 335 336 // f0 -> "." 337 // f1 -> TypeArguments() 338 // f2 -> <IDENTIFIER> 339 public R visit(MemberSelector n); 340 341 // f0 -> Literal() 342 // | ( <IDENTIFIER> "." )* "this" 343 // | "super" "." <IDENTIFIER> 344 // | ClassOrInterfaceType() "." "super" "." <IDENTIFIER> 345 // | "(" Expression() ")" 346 // | AllocationExpression() 347 // | ResultType() "." "class" 348 // | Name() 349 public R visit(PrimaryPrefix n); 350 351 // f0 -> "." "super" 352 // | "." "this" 353 // | "." AllocationExpression() 354 // | MemberSelector() 355 // | "[" Expression() "]" 356 // | "." <IDENTIFIER> 357 // | Arguments() 358 public R visit(PrimarySuffix n); 359 360 // f0 -> <INTEGER_LITERAL> 361 // | <FLOATING_POINT_LITERAL> 362 // | <CHARACTER_LITERAL> 363 // | <STRING_LITERAL> 364 // | BooleanLiteral() 365 // | NullLiteral() 366 public R visit(Literal n); 367 368 // f0 -> "true" 369 // | "false" 370 public R visit(BooleanLiteral n); 371 372 // f0 -> "null" 373 public R visit(NullLiteral n); 374 375 // f0 -> "(" 376 // f1 -> [ ArgumentList() ] 377 // f2 -> ")" 378 public R visit(Arguments n); 379 380 // f0 -> Expression() 381 // f1 -> ( "," Expression() )* 382 public R visit(ArgumentList n); 383 384 // f0 -> "new" PrimitiveType() ArrayDimsAndInits() 385 // | "new" ClassOrInterfaceType() [ TypeArguments() ] ( ArrayDimsAndInits() | Arguments() [ ClassOrInterfaceBody(false) ] ) 386 public R visit(AllocationExpression n); 387 388 // f0 -> ( "[" Expression() "]" )+ ( "[" "]" )* 389 // | ( "[" "]" )+ ArrayInitializer() 390 public R visit(ArrayDimsAndInits n); 391 392 // f0 -> LabeledStatement() 393 // | AssertStatement() 394 // | Block() 395 // | EmptyStatement() 396 // | StatementExpression() ";" 397 // | SwitchStatement() 398 // | IfStatement() 399 // | WhileStatement() 400 // | DoStatement() 401 // | ForStatement() 402 // | BreakStatement() 403 // | ContinueStatement() 404 // | ReturnStatement() 405 // | ThrowStatement() 406 // | SynchronizedStatement() 407 // | TryStatement() 408 public R visit(Statement n); 409 410 // f0 -> "assert" 411 // f1 -> Expression() 412 // f2 -> [ ":" Expression() ] 413 // f3 -> ";" 414 public R visit(AssertStatement n); 415 416 // f0 -> <IDENTIFIER> 417 // f1 -> ":" 418 // f2 -> Statement() 419 public R visit(LabeledStatement n); 420 421 // f0 -> "{" 422 // f1 -> ( BlockStatement() )* 423 // f2 -> "}" 424 public R visit(Block n); 425 426 // f0 -> LocalVariableDeclaration() ";" 427 // | Statement() 428 // | ClassOrInterfaceDeclaration(0) 429 public R visit(BlockStatement n); 430 431 // f0 -> Modifiers() 432 // f1 -> Type() 433 // f2 -> VariableDeclarator() 434 // f3 -> ( "," VariableDeclarator() )* 435 public R visit(LocalVariableDeclaration n); 436 437 // f0 -> ";" 438 public R visit(EmptyStatement n); 439 440 // f0 -> PreIncrementExpression() 441 // | PreDecrementExpression() 442 // | PrimaryExpression() [ "++" | "--" | AssignmentOperator() Expression() ] 443 public R visit(StatementExpression n); 444 445 // f0 -> "switch" 446 // f1 -> "(" 447 // f2 -> Expression() 448 // f3 -> ")" 449 // f4 -> "{" 450 // f5 -> ( SwitchLabel() ( BlockStatement() )* )* 451 // f6 -> "}" 452 public R visit(SwitchStatement n); 453 454 // f0 -> "case" Expression() ":" 455 // | "default" ":" 456 public R visit(SwitchLabel n); 457 458 // f0 -> "if" 459 // f1 -> "(" 460 // f2 -> Expression() 461 // f3 -> ")" 462 // f4 -> Statement() 463 // f5 -> [ "else" Statement() ] 464 public R visit(IfStatement n); 465 466 // f0 -> "while" 467 // f1 -> "(" 468 // f2 -> Expression() 469 // f3 -> ")" 470 // f4 -> Statement() 471 public R visit(WhileStatement n); 472 473 // f0 -> "do" 474 // f1 -> Statement() 475 // f2 -> "while" 476 // f3 -> "(" 477 // f4 -> Expression() 478 // f5 -> ")" 479 // f6 -> ";" 480 public R visit(DoStatement n); 481 482 // f0 -> "for" 483 // f1 -> "(" 484 // f2 -> ( Modifiers() Type() <IDENTIFIER> ":" Expression() | [ ForInit() ] ";" [ Expression() ] ";" [ ForUpdate() ] ) 485 // f3 -> ")" 486 // f4 -> Statement() 487 public R visit(ForStatement n); 488 489 // f0 -> LocalVariableDeclaration() 490 // | StatementExpressionList() 491 public R visit(ForInit n); 492 493 // f0 -> StatementExpression() 494 // f1 -> ( "," StatementExpression() )* 495 public R visit(StatementExpressionList n); 496 497 // f0 -> StatementExpressionList() 498 public R visit(ForUpdate n); 499 500 // f0 -> "break" 501 // f1 -> [ <IDENTIFIER> ] 502 // f2 -> ";" 503 public R visit(BreakStatement n); 504 505 // f0 -> "continue" 506 // f1 -> [ <IDENTIFIER> ] 507 // f2 -> ";" 508 public R visit(ContinueStatement n); 509 510 // f0 -> "return" 511 // f1 -> [ Expression() ] 512 // f2 -> ";" 513 public R visit(ReturnStatement n); 514 515 // f0 -> "throw" 516 // f1 -> Expression() 517 // f2 -> ";" 518 public R visit(ThrowStatement n); 519 520 // f0 -> "synchronized" 521 // f1 -> "(" 522 // f2 -> Expression() 523 // f3 -> ")" 524 // f4 -> Block() 525 public R visit(SynchronizedStatement n); 526 527 // f0 -> "try" 528 // f1 -> Block() 529 // f2 -> ( "catch" "(" FormalParameter() ")" Block() )* 530 // f3 -> [ "finally" Block() ] 531 public R visit(TryStatement n); 532 533 // f0 -> ( ">" ">" ">" ) 534 public R visit(RUNSIGNEDSHIFT n); 535 536 // f0 -> ( ">" ">" ) 537 public R visit(RSIGNEDSHIFT n); 538 539 // f0 -> NormalAnnotation() 540 // | SingleMemberAnnotation() 541 // | MarkerAnnotation() 542 public R visit(Annotation n); 543 544 // f0 -> "@" 545 // f1 -> Name() 546 // f2 -> "(" 547 // f3 -> [ MemberValuePairs() ] 548 // f4 -> ")" 549 public R visit(NormalAnnotation n); 550 551 // f0 -> "@" 552 // f1 -> Name() 553 public R visit(MarkerAnnotation n); 554 555 // f0 -> "@" 556 // f1 -> Name() 557 // f2 -> "(" 558 // f3 -> MemberValue() 559 // f4 -> ")" 560 public R visit(SingleMemberAnnotation n); 561 562 // f0 -> MemberValuePair() 563 // f1 -> ( "," MemberValuePair() )* 564 public R visit(MemberValuePairs n); 565 566 // f0 -> <IDENTIFIER> 567 // f1 -> "=" 568 // f2 -> MemberValue() 569 public R visit(MemberValuePair n); 570 571 // f0 -> Annotation() 572 // | MemberValueArrayInitializer() 573 // | ConditionalExpression() 574 public R visit(MemberValue n); 575 576 // f0 -> "{" 577 // f1 -> ( MemberValue() ( "," MemberValue() )* [ "," ] )? 578 // f2 -> "}" 579 public R visit(MemberValueArrayInitializer n); 580 581 // f0 -> "@" 582 // f1 -> "interface" 583 // f2 -> <IDENTIFIER> 584 // f3 -> AnnotationTypeBody() 585 public R visit(AnnotationTypeDeclaration n); 586 587 // f0 -> "{" 588 // f1 -> ( AnnotationTypeMemberDeclaration() )* 589 // f2 -> "}" 590 public R visit(AnnotationTypeBody n); 591 592 // f0 -> Modifiers() ( Type() <IDENTIFIER> "(" ")" [ DefaultValue() ] ";" | ClassOrInterfaceDeclaration(modifiers) | EnumDeclaration(modifiers) | AnnotationTypeDeclaration(modifiers) | FieldDeclaration(modifiers) ) 593 // | ( ";" ) 594 public R visit(AnnotationTypeMemberDeclaration n); 595 596 // f0 -> "default" 597 // f1 -> MemberValue() 598 public R visit(DefaultValue n); 599 600} 601