1/** \file 2 * This OBJC source file was generated by $ANTLR version 3.4 3 * 4 * - From the grammar source file : /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g 5 * - On : 2012-02-16 17:34:08 6 * - for the lexer : FuzzyLexer 7 * 8 * Editing it, at least manually, is not wise. 9 * 10 * ObjC language generator and runtime by Alan Condit, acondit|hereisanat|ipns|dotgoeshere|com. 11 * 12 * 13*/ 14// $ANTLR 3.4 /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g 2012-02-16 17:34:08 15 16 17/* ----------------------------------------- 18 * Include the ANTLR3 generated header file. 19 */ 20#import "Fuzzy.h" 21/* ----------------------------------------- */ 22 23 24/* ============================================================================= */ 25/* ============================================================================= 26 * Start of recognizer 27 */ 28 29/** As per Terence: No returns for lexer rules! */ 30@implementation Fuzzy // line 330 31 32+ (void) initialize 33{ 34 [BaseRecognizer setGrammarFileName:@"/Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g"]; 35} 36 37+ (NSString *) tokenNameForType:(NSInteger)aTokenType 38{ 39 return [[self getTokenNames] objectAtIndex:aTokenType]; 40} 41 42+ (Fuzzy *)newFuzzyWithCharStream:(id<CharStream>)anInput 43{ 44 return [[Fuzzy alloc] initWithCharStream:anInput]; 45} 46 47- (id) initWithCharStream:(id<CharStream>)anInput 48{ 49 self = [super initWithCharStream:anInput State:[RecognizerSharedState newRecognizerSharedStateWithRuleLen:30+1]]; 50 if ( self != nil ) { 51 SEL synpred9_FuzzySelector = @selector(synpred9_Fuzzy_fragment); 52 53 SEL synpred2_FuzzySelector = @selector(synpred2_Fuzzy_fragment); 54 55 SEL synpred7_FuzzySelector = @selector(synpred7_Fuzzy_fragment); 56 57 SEL synpred4_FuzzySelector = @selector(synpred4_Fuzzy_fragment); 58 59 SEL synpred8_FuzzySelector = @selector(synpred8_Fuzzy_fragment); 60 61 SEL synpred6_FuzzySelector = @selector(synpred6_Fuzzy_fragment); 62 63 SEL synpred5_FuzzySelector = @selector(synpred5_Fuzzy_fragment); 64 65 SEL synpred3_FuzzySelector = @selector(synpred3_Fuzzy_fragment); 66 67 SEL synpred1_FuzzySelector = @selector(synpred1_Fuzzy_fragment); 68 69 } 70 return self; 71} 72 73- (void) dealloc 74{ 75 [super dealloc]; 76} 77 78/* ObjC Start of actions.lexer.methods */ 79/* ObjC end of actions.lexer.methods */ 80/* ObjC start methods() */ 81/* ObjC end methods() */ 82 83- (id<Token>) nextToken 84{ 85 while (YES) { 86 if ( [input LA:1] == CharStreamEOF ) { 87 return [CommonToken eofToken]; 88 } 89 state.token = nil; 90 state.channel = TokenChannelDefault; 91 state.tokenStartCharIndex = input.index; 92 state.tokenStartCharPositionInLine = [input getCharPositionInLine]; 93 state.tokenStartLine = [input getLine]; 94 state.text = nil; 95 @try { 96 NSInteger m = [input mark]; 97 state.backtracking = 1; /* means we won't throw slow exception */ 98 state.failed = NO; 99 [self mTokens]; 100 state.backtracking = 0; 101 /* mTokens backtracks with synpred at backtracking==2 102 and we set the synpredgate to allow actions at level 1. */ 103 if ( state.failed ) { 104 [input rewind:m]; 105 [input consume]; /* advance one char and try again */ 106 } else { 107 [self emit]; 108 return state.token; 109 } 110 } 111 @catch (RecognitionException *re) { 112 // shouldn't happen in backtracking mode, but... 113 [self reportError:re]; 114 [self recover:re]; 115 } 116 } 117} 118 119- (void)memoize:(id<IntStream>)anInput 120 RuleIndex:(NSInteger)ruleIndex 121 StartIndex:(NSInteger)ruleStartIndex 122{ 123 if ( state.backtracking > 1 ) [super memoize:anInput RuleIndex:ruleIndex StartIndex:ruleStartIndex]; 124} 125 126- (BOOL)alreadyParsedRule:(id<IntStream>)anInput RuleIndex:(NSInteger)ruleIndex 127{ 128 if ( state.backtracking > 1 ) return [super alreadyParsedRule:anInput RuleIndex:ruleIndex]; 129 return NO; 130} 131/* Start of Rules */ 132// $ANTLR start "IMPORT" 133- (void) mIMPORT 134{ 135 // 136 /* ruleScopeSetUp */ 137 138 /* ruleDeclarations */ 139 140 @try { 141 NSInteger _type = IMPORT; 142 NSInteger _channel = TokenChannelDefault; 143 CommonToken *name=nil; 144 145 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:5:2: ( 'import' WS name= QIDStar ( WS )? ';' ) // ruleBlockSingleAlt 146 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:5:4: 'import' WS name= QIDStar ( WS )? ';' // alt 147 { 148 149 150 [self matchString:@"import"]; if ( state.failed ) return ; 151 152 153 154 155 [self mWS]; if ( state.failed ) return ; 156 157 158 159 160 NSInteger nameStart31 = input.index; 161 [self mQIDStar]; if ( state.failed ) return ; 162 163 name = [[CommonToken newToken:input Type:TokenTypeInvalid Channel:TokenChannelDefault Start:nameStart31 Stop:input.index-1] retain]; 164 name.line = self.line; 165 166 167 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:5:29: ( WS )? // block 168 NSInteger alt1=2; 169 NSInteger LA1_0 = [input LA:1]; 170 171 if ( ((LA1_0 >= '\t' && LA1_0 <= '\n')||LA1_0==' ') ) { 172 alt1=1; 173 } 174 switch (alt1) { 175 case 1 : ; 176 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:5:29: WS // alt 177 { 178 179 180 [self mWS]; if ( state.failed ) return ; 181 182 183 184 } 185 break; 186 187 } 188 189 190 191 [self matchChar:';']; if ( state.failed ) return ; 192 193 194 } 195 196 /* token+rule list labels */ 197 198 state.type = _type; 199 state.channel = _channel; 200 } 201 @finally { 202 // 203 /* ruleScopeCleanUp */ 204 205 } 206 return; 207} 208/* $ANTLR end "IMPORT" */ 209// $ANTLR start "RETURN" 210- (void) mRETURN 211{ 212 // 213 /* ruleScopeSetUp */ 214 215 /* ruleDeclarations */ 216 217 @try { 218 NSInteger _type = RETURN; 219 NSInteger _channel = TokenChannelDefault; 220 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:10:2: ( 'return' ( options {greedy=false; } : . )* ';' ) // ruleBlockSingleAlt 221 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:10:4: 'return' ( options {greedy=false; } : . )* ';' // alt 222 { 223 224 225 [self matchString:@"return"]; if ( state.failed ) return ; 226 227 228 229 230 do { 231 NSInteger alt2=2; 232 NSInteger LA2_0 = [input LA:1]; 233 if ( (LA2_0==';') ) { 234 alt2=2; 235 } 236 else if ( ((LA2_0 >= 0x0000 && LA2_0 <= ':')||(LA2_0 >= '<' && LA2_0 <= 0xFFFF)) ) { 237 alt2=1; 238 } 239 240 241 switch (alt2) { 242 case 1 : ; 243 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:10:38: . // alt 244 { 245 246 [self matchAny]; if ( state.failed ) return ; 247 248 249 } 250 break; 251 252 default : 253 goto loop2; 254 } 255 } while (YES); 256 loop2: ; 257 258 259 260 [self matchChar:';']; if ( state.failed ) return ; 261 262 263 } 264 265 /* token+rule list labels */ 266 267 state.type = _type; 268 state.channel = _channel; 269 } 270 @finally { 271 // 272 /* ruleScopeCleanUp */ 273 274 } 275 return; 276} 277/* $ANTLR end "RETURN" */ 278// $ANTLR start "CLASS" 279- (void) mCLASS 280{ 281 // 282 /* ruleScopeSetUp */ 283 284 /* ruleDeclarations */ 285 286 @try { 287 NSInteger _type = CLASS; 288 NSInteger _channel = TokenChannelDefault; 289 CommonToken *name=nil; 290 291 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:2: ( 'class' WS name= ID ( WS )? ( 'extends' WS QID ( WS )? )? ( 'implements' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* )? '{' ) // ruleBlockSingleAlt 292 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:4: 'class' WS name= ID ( WS )? ( 'extends' WS QID ( WS )? )? ( 'implements' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* )? '{' // alt 293 { 294 295 296 [self matchString:@"class"]; if ( state.failed ) return ; 297 298 299 300 301 [self mWS]; if ( state.failed ) return ; 302 303 304 305 306 NSInteger nameStart81 = input.index; 307 [self mID]; if ( state.failed ) return ; 308 309 name = [[CommonToken newToken:input Type:TokenTypeInvalid Channel:TokenChannelDefault Start:nameStart81 Stop:input.index-1] retain]; 310 name.line = self.line; 311 312 313 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:23: ( WS )? // block 314 NSInteger alt3=2; 315 NSInteger LA3_0 = [input LA:1]; 316 317 if ( ((LA3_0 >= '\t' && LA3_0 <= '\n')||LA3_0==' ') ) { 318 alt3=1; 319 } 320 switch (alt3) { 321 case 1 : ; 322 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:23: WS // alt 323 { 324 325 326 [self mWS]; if ( state.failed ) return ; 327 328 329 330 } 331 break; 332 333 } 334 335 336 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:27: ( 'extends' WS QID ( WS )? )? // block 337 NSInteger alt5=2; 338 NSInteger LA5_0 = [input LA:1]; 339 340 if ( (LA5_0=='e') ) { 341 alt5=1; 342 } 343 switch (alt5) { 344 case 1 : ; 345 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:28: 'extends' WS QID ( WS )? // alt 346 { 347 348 349 [self matchString:@"extends"]; if ( state.failed ) return ; 350 351 352 353 354 [self mWS]; if ( state.failed ) return ; 355 356 357 358 359 [self mQID]; if ( state.failed ) return ; 360 361 362 363 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:45: ( WS )? // block 364 NSInteger alt4=2; 365 NSInteger LA4_0 = [input LA:1]; 366 367 if ( ((LA4_0 >= '\t' && LA4_0 <= '\n')||LA4_0==' ') ) { 368 alt4=1; 369 } 370 switch (alt4) { 371 case 1 : ; 372 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:14:45: WS // alt 373 { 374 375 376 [self mWS]; if ( state.failed ) return ; 377 378 379 380 } 381 break; 382 383 } 384 385 386 } 387 break; 388 389 } 390 391 392 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:3: ( 'implements' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* )? // block 393 NSInteger alt10=2; 394 NSInteger LA10_0 = [input LA:1]; 395 396 if ( (LA10_0=='i') ) { 397 alt10=1; 398 } 399 switch (alt10) { 400 case 1 : ; 401 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:4: 'implements' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* // alt 402 { 403 404 405 [self matchString:@"implements"]; if ( state.failed ) return ; 406 407 408 409 410 [self mWS]; if ( state.failed ) return ; 411 412 413 414 415 [self mQID]; if ( state.failed ) return ; 416 417 418 419 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:24: ( WS )? // block 420 NSInteger alt6=2; 421 NSInteger LA6_0 = [input LA:1]; 422 423 if ( ((LA6_0 >= '\t' && LA6_0 <= '\n')||LA6_0==' ') ) { 424 alt6=1; 425 } 426 switch (alt6) { 427 case 1 : ; 428 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:24: WS // alt 429 { 430 431 432 [self mWS]; if ( state.failed ) return ; 433 434 435 436 } 437 break; 438 439 } 440 441 442 443 do { 444 NSInteger alt9=2; 445 NSInteger LA9_0 = [input LA:1]; 446 if ( (LA9_0==',') ) { 447 alt9=1; 448 } 449 450 451 switch (alt9) { 452 case 1 : ; 453 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:29: ',' ( WS )? QID ( WS )? // alt 454 { 455 456 457 [self matchChar:',']; if ( state.failed ) return ; 458 459 460 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:33: ( WS )? // block 461 NSInteger alt7=2; 462 NSInteger LA7_0 = [input LA:1]; 463 464 if ( ((LA7_0 >= '\t' && LA7_0 <= '\n')||LA7_0==' ') ) { 465 alt7=1; 466 } 467 switch (alt7) { 468 case 1 : ; 469 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:33: WS // alt 470 { 471 472 473 [self mWS]; if ( state.failed ) return ; 474 475 476 477 } 478 break; 479 480 } 481 482 483 484 [self mQID]; if ( state.failed ) return ; 485 486 487 488 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:41: ( WS )? // block 489 NSInteger alt8=2; 490 NSInteger LA8_0 = [input LA:1]; 491 492 if ( ((LA8_0 >= '\t' && LA8_0 <= '\n')||LA8_0==' ') ) { 493 alt8=1; 494 } 495 switch (alt8) { 496 case 1 : ; 497 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:15:41: WS // alt 498 { 499 500 501 [self mWS]; if ( state.failed ) return ; 502 503 504 505 } 506 break; 507 508 } 509 510 511 } 512 break; 513 514 default : 515 goto loop9; 516 } 517 } while (YES); 518 loop9: ; 519 520 521 } 522 break; 523 524 } 525 526 527 528 [self matchChar:'{']; if ( state.failed ) return ; 529 530 531 532 if ( state.backtracking == 1 ) { 533 NSLog(@"found class %@", (name!=nil?name.text:nil)); 534 } 535 536 537 } 538 539 /* token+rule list labels */ 540 541 state.type = _type; 542 state.channel = _channel; 543 } 544 @finally { 545 // 546 /* ruleScopeCleanUp */ 547 548 } 549 return; 550} 551/* $ANTLR end "CLASS" */ 552// $ANTLR start "METHOD" 553- (void) mMETHOD 554{ 555 // 556 /* ruleScopeSetUp */ 557 558 /* ruleDeclarations */ 559 560 @try { 561 NSInteger _type = METHOD; 562 NSInteger _channel = TokenChannelDefault; 563 CommonToken *name=nil; 564 565 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:5: ( TYPE WS name= ID ( WS )? '(' ( ARG ( WS )? ( ',' ( WS )? ARG ( WS )? )* )? ')' ( WS )? ( 'throws' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* )? '{' ) // ruleBlockSingleAlt 566 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:9: TYPE WS name= ID ( WS )? '(' ( ARG ( WS )? ( ',' ( WS )? ARG ( WS )? )* )? ')' ( WS )? ( 'throws' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* )? '{' // alt 567 { 568 569 570 [self mTYPE]; if ( state.failed ) return ; 571 572 573 574 575 [self mWS]; if ( state.failed ) return ; 576 577 578 579 580 NSInteger nameStart158 = input.index; 581 [self mID]; if ( state.failed ) return ; 582 583 name = [[CommonToken newToken:input Type:TokenTypeInvalid Channel:TokenChannelDefault Start:nameStart158 Stop:input.index-1] retain]; 584 name.line = self.line; 585 586 587 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:25: ( WS )? // block 588 NSInteger alt11=2; 589 NSInteger LA11_0 = [input LA:1]; 590 591 if ( ((LA11_0 >= '\t' && LA11_0 <= '\n')||LA11_0==' ') ) { 592 alt11=1; 593 } 594 switch (alt11) { 595 case 1 : ; 596 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:25: WS // alt 597 { 598 599 600 [self mWS]; if ( state.failed ) return ; 601 602 603 604 } 605 break; 606 607 } 608 609 610 611 [self matchChar:'(']; if ( state.failed ) return ; 612 613 614 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:33: ( ARG ( WS )? ( ',' ( WS )? ARG ( WS )? )* )? // block 615 NSInteger alt16=2; 616 NSInteger LA16_0 = [input LA:1]; 617 618 if ( ((LA16_0 >= 'A' && LA16_0 <= 'Z')||LA16_0=='_'||(LA16_0 >= 'a' && LA16_0 <= 'z')) ) { 619 alt16=1; 620 } 621 switch (alt16) { 622 case 1 : ; 623 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:35: ARG ( WS )? ( ',' ( WS )? ARG ( WS )? )* // alt 624 { 625 626 627 [self mARG]; if ( state.failed ) return ; 628 629 630 631 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:39: ( WS )? // block 632 NSInteger alt12=2; 633 NSInteger LA12_0 = [input LA:1]; 634 635 if ( ((LA12_0 >= '\t' && LA12_0 <= '\n')||LA12_0==' ') ) { 636 alt12=1; 637 } 638 switch (alt12) { 639 case 1 : ; 640 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:39: WS // alt 641 { 642 643 644 [self mWS]; if ( state.failed ) return ; 645 646 647 648 } 649 break; 650 651 } 652 653 654 655 do { 656 NSInteger alt15=2; 657 NSInteger LA15_0 = [input LA:1]; 658 if ( (LA15_0==',') ) { 659 alt15=1; 660 } 661 662 663 switch (alt15) { 664 case 1 : ; 665 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:44: ',' ( WS )? ARG ( WS )? // alt 666 { 667 668 669 [self matchChar:',']; if ( state.failed ) return ; 670 671 672 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:48: ( WS )? // block 673 NSInteger alt13=2; 674 NSInteger LA13_0 = [input LA:1]; 675 676 if ( ((LA13_0 >= '\t' && LA13_0 <= '\n')||LA13_0==' ') ) { 677 alt13=1; 678 } 679 switch (alt13) { 680 case 1 : ; 681 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:48: WS // alt 682 { 683 684 685 [self mWS]; if ( state.failed ) return ; 686 687 688 689 } 690 break; 691 692 } 693 694 695 696 [self mARG]; if ( state.failed ) return ; 697 698 699 700 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:56: ( WS )? // block 701 NSInteger alt14=2; 702 NSInteger LA14_0 = [input LA:1]; 703 704 if ( ((LA14_0 >= '\t' && LA14_0 <= '\n')||LA14_0==' ') ) { 705 alt14=1; 706 } 707 switch (alt14) { 708 case 1 : ; 709 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:56: WS // alt 710 { 711 712 713 [self mWS]; if ( state.failed ) return ; 714 715 716 717 } 718 break; 719 720 } 721 722 723 } 724 break; 725 726 default : 727 goto loop15; 728 } 729 } while (YES); 730 loop15: ; 731 732 733 } 734 break; 735 736 } 737 738 739 740 [self matchChar:')']; if ( state.failed ) return ; 741 742 743 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:69: ( WS )? // block 744 NSInteger alt17=2; 745 NSInteger LA17_0 = [input LA:1]; 746 747 if ( ((LA17_0 >= '\t' && LA17_0 <= '\n')||LA17_0==' ') ) { 748 alt17=1; 749 } 750 switch (alt17) { 751 case 1 : ; 752 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:20:69: WS // alt 753 { 754 755 756 [self mWS]; if ( state.failed ) return ; 757 758 759 760 } 761 break; 762 763 } 764 765 766 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:8: ( 'throws' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* )? // block 767 NSInteger alt22=2; 768 NSInteger LA22_0 = [input LA:1]; 769 770 if ( (LA22_0=='t') ) { 771 alt22=1; 772 } 773 switch (alt22) { 774 case 1 : ; 775 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:9: 'throws' WS QID ( WS )? ( ',' ( WS )? QID ( WS )? )* // alt 776 { 777 778 779 [self matchString:@"throws"]; if ( state.failed ) return ; 780 781 782 783 784 [self mWS]; if ( state.failed ) return ; 785 786 787 788 789 [self mQID]; if ( state.failed ) return ; 790 791 792 793 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:25: ( WS )? // block 794 NSInteger alt18=2; 795 NSInteger LA18_0 = [input LA:1]; 796 797 if ( ((LA18_0 >= '\t' && LA18_0 <= '\n')||LA18_0==' ') ) { 798 alt18=1; 799 } 800 switch (alt18) { 801 case 1 : ; 802 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:25: WS // alt 803 { 804 805 806 [self mWS]; if ( state.failed ) return ; 807 808 809 810 } 811 break; 812 813 } 814 815 816 817 do { 818 NSInteger alt21=2; 819 NSInteger LA21_0 = [input LA:1]; 820 if ( (LA21_0==',') ) { 821 alt21=1; 822 } 823 824 825 switch (alt21) { 826 case 1 : ; 827 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:30: ',' ( WS )? QID ( WS )? // alt 828 { 829 830 831 [self matchChar:',']; if ( state.failed ) return ; 832 833 834 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:34: ( WS )? // block 835 NSInteger alt19=2; 836 NSInteger LA19_0 = [input LA:1]; 837 838 if ( ((LA19_0 >= '\t' && LA19_0 <= '\n')||LA19_0==' ') ) { 839 alt19=1; 840 } 841 switch (alt19) { 842 case 1 : ; 843 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:34: WS // alt 844 { 845 846 847 [self mWS]; if ( state.failed ) return ; 848 849 850 851 } 852 break; 853 854 } 855 856 857 858 [self mQID]; if ( state.failed ) return ; 859 860 861 862 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:42: ( WS )? // block 863 NSInteger alt20=2; 864 NSInteger LA20_0 = [input LA:1]; 865 866 if ( ((LA20_0 >= '\t' && LA20_0 <= '\n')||LA20_0==' ') ) { 867 alt20=1; 868 } 869 switch (alt20) { 870 case 1 : ; 871 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:21:42: WS // alt 872 { 873 874 875 [self mWS]; if ( state.failed ) return ; 876 877 878 879 } 880 break; 881 882 } 883 884 885 } 886 break; 887 888 default : 889 goto loop21; 890 } 891 } while (YES); 892 loop21: ; 893 894 895 } 896 break; 897 898 } 899 900 901 902 [self matchChar:'{']; if ( state.failed ) return ; 903 904 905 906 if ( state.backtracking == 1 ) { 907 NSLog(@"found method %@", (name!=nil?name.text:nil)); 908 } 909 910 911 } 912 913 /* token+rule list labels */ 914 915 state.type = _type; 916 state.channel = _channel; 917 } 918 @finally { 919 // 920 /* ruleScopeCleanUp */ 921 922 } 923 return; 924} 925/* $ANTLR end "METHOD" */ 926// $ANTLR start "FIELD" 927- (void) mFIELD 928{ 929 // 930 /* ruleScopeSetUp */ 931 932 /* ruleDeclarations */ 933 934 @try { 935 NSInteger _type = FIELD; 936 NSInteger _channel = TokenChannelDefault; 937 CommonToken *name=nil; 938 939 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:26:5: ( TYPE WS name= ID ( '[]' )? ( WS )? ( ';' | '=' ) ) // ruleBlockSingleAlt 940 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:26:9: TYPE WS name= ID ( '[]' )? ( WS )? ( ';' | '=' ) // alt 941 { 942 943 944 [self mTYPE]; if ( state.failed ) return ; 945 946 947 948 949 [self mWS]; if ( state.failed ) return ; 950 951 952 953 954 NSInteger nameStart261 = input.index; 955 [self mID]; if ( state.failed ) return ; 956 957 name = [[CommonToken newToken:input Type:TokenTypeInvalid Channel:TokenChannelDefault Start:nameStart261 Stop:input.index-1] retain]; 958 name.line = self.line; 959 960 961 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:26:25: ( '[]' )? // block 962 NSInteger alt23=2; 963 NSInteger LA23_0 = [input LA:1]; 964 965 if ( (LA23_0=='[') ) { 966 alt23=1; 967 } 968 switch (alt23) { 969 case 1 : ; 970 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:26:25: '[]' // alt 971 { 972 973 974 [self matchString:@"[]"]; if ( state.failed ) return ; 975 976 977 978 } 979 break; 980 981 } 982 983 984 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:26:31: ( WS )? // block 985 NSInteger alt24=2; 986 NSInteger LA24_0 = [input LA:1]; 987 988 if ( ((LA24_0 >= '\t' && LA24_0 <= '\n')||LA24_0==' ') ) { 989 alt24=1; 990 } 991 switch (alt24) { 992 case 1 : ; 993 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:26:31: WS // alt 994 { 995 996 997 [self mWS]; if ( state.failed ) return ; 998 999 1000 1001 } 1002 break; 1003 1004 } 1005 1006 1007 if ([input LA:1] == ';'||[input LA:1] == '=') { 1008 [input consume]; 1009 state.failed = NO; 1010 1011 } else { 1012 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 1013 1014 MismatchedSetException *mse = [MismatchedSetException newException:nil stream:input]; 1015 [self recover:mse]; 1016 @throw mse; 1017 } 1018 1019 1020 1021 if ( state.backtracking == 1 ) { 1022 NSLog(@"found var %@", (name!=nil?name.text:nil)); 1023 } 1024 1025 1026 } 1027 1028 /* token+rule list labels */ 1029 1030 state.type = _type; 1031 state.channel = _channel; 1032 } 1033 @finally { 1034 // 1035 /* ruleScopeCleanUp */ 1036 1037 } 1038 return; 1039} 1040/* $ANTLR end "FIELD" */ 1041// $ANTLR start "STAT" 1042- (void) mSTAT 1043{ 1044 // 1045 /* ruleScopeSetUp */ 1046 1047 /* ruleDeclarations */ 1048 1049 @try { 1050 NSInteger _type = STAT; 1051 NSInteger _channel = TokenChannelDefault; 1052 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:5: ( ( 'if' | 'while' | 'switch' | 'for' ) ( WS )? '(' ) // ruleBlockSingleAlt 1053 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:7: ( 'if' | 'while' | 'switch' | 'for' ) ( WS )? '(' // alt 1054 { 1055 1056 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:7: ( 'if' | 'while' | 'switch' | 'for' ) // block 1057 NSInteger alt25=4; 1058 unichar charLA25 = [input LA:1]; 1059 switch (charLA25) { 1060 case 'i': ; 1061 { 1062 alt25=1; 1063 } 1064 break; 1065 case 'w': ; 1066 { 1067 alt25=2; 1068 } 1069 break; 1070 case 's': ; 1071 { 1072 alt25=3; 1073 } 1074 break; 1075 case 'f': ; 1076 { 1077 alt25=4; 1078 } 1079 break; 1080 1081 default: ; 1082 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 1083 1084 NoViableAltException *nvae = [NoViableAltException newException:25 state:0 stream:input]; 1085 nvae.c = charLA25; 1086 @throw nvae; 1087 1088 } 1089 1090 switch (alt25) { 1091 case 1 : ; 1092 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:8: 'if' // alt 1093 { 1094 1095 1096 [self matchString:@"if"]; if ( state.failed ) return ; 1097 1098 1099 1100 } 1101 break; 1102 case 2 : ; 1103 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:13: 'while' // alt 1104 { 1105 1106 1107 [self matchString:@"while"]; if ( state.failed ) return ; 1108 1109 1110 1111 } 1112 break; 1113 case 3 : ; 1114 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:21: 'switch' // alt 1115 { 1116 1117 1118 [self matchString:@"switch"]; if ( state.failed ) return ; 1119 1120 1121 1122 } 1123 break; 1124 case 4 : ; 1125 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:30: 'for' // alt 1126 { 1127 1128 1129 [self matchString:@"for"]; if ( state.failed ) return ; 1130 1131 1132 1133 } 1134 break; 1135 1136 } 1137 1138 1139 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:37: ( WS )? // block 1140 NSInteger alt26=2; 1141 NSInteger LA26_0 = [input LA:1]; 1142 1143 if ( ((LA26_0 >= '\t' && LA26_0 <= '\n')||LA26_0==' ') ) { 1144 alt26=1; 1145 } 1146 switch (alt26) { 1147 case 1 : ; 1148 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:30:37: WS // alt 1149 { 1150 1151 1152 [self mWS]; if ( state.failed ) return ; 1153 1154 1155 1156 } 1157 break; 1158 1159 } 1160 1161 1162 1163 [self matchChar:'(']; if ( state.failed ) return ; 1164 1165 1166 } 1167 1168 /* token+rule list labels */ 1169 1170 state.type = _type; 1171 state.channel = _channel; 1172 } 1173 @finally { 1174 // 1175 /* ruleScopeCleanUp */ 1176 1177 } 1178 return; 1179} 1180/* $ANTLR end "STAT" */ 1181// $ANTLR start "CALL" 1182- (void) mCALL 1183{ 1184 // 1185 /* ruleScopeSetUp */ 1186 1187 /* ruleDeclarations */ 1188 1189 @try { 1190 NSInteger _type = CALL; 1191 NSInteger _channel = TokenChannelDefault; 1192 CommonToken *name=nil; 1193 1194 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:33:5: (name= QID ( WS )? '(' ) // ruleBlockSingleAlt 1195 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:33:9: name= QID ( WS )? '(' // alt 1196 { 1197 1198 1199 NSInteger nameStart326 = input.index; 1200 [self mQID]; if ( state.failed ) return ; 1201 1202 name = [[CommonToken newToken:input Type:TokenTypeInvalid Channel:TokenChannelDefault Start:nameStart326 Stop:input.index-1] retain]; 1203 name.line = self.line; 1204 1205 1206 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:33:18: ( WS )? // block 1207 NSInteger alt27=2; 1208 NSInteger LA27_0 = [input LA:1]; 1209 1210 if ( ((LA27_0 >= '\t' && LA27_0 <= '\n')||LA27_0==' ') ) { 1211 alt27=1; 1212 } 1213 switch (alt27) { 1214 case 1 : ; 1215 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:33:18: WS // alt 1216 { 1217 1218 1219 [self mWS]; if ( state.failed ) return ; 1220 1221 1222 1223 } 1224 break; 1225 1226 } 1227 1228 1229 1230 [self matchChar:'(']; if ( state.failed ) return ; 1231 1232 1233 1234 if ( state.backtracking == 1 ) { 1235 /*ignore if this/super */ NSLog(@"found call %@",(name!=nil?name.text:nil)); 1236 } 1237 1238 1239 } 1240 1241 /* token+rule list labels */ 1242 1243 state.type = _type; 1244 state.channel = _channel; 1245 } 1246 @finally { 1247 // 1248 /* ruleScopeCleanUp */ 1249 1250 } 1251 return; 1252} 1253/* $ANTLR end "CALL" */ 1254// $ANTLR start "COMMENT" 1255- (void) mCOMMENT 1256{ 1257 // 1258 /* ruleScopeSetUp */ 1259 1260 /* ruleDeclarations */ 1261 1262 @try { 1263 NSInteger _type = COMMENT; 1264 NSInteger _channel = TokenChannelDefault; 1265 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:38:5: ( '/*' ( options {greedy=false; } : . )* '*/' ) // ruleBlockSingleAlt 1266 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:38:9: '/*' ( options {greedy=false; } : . )* '*/' // alt 1267 { 1268 1269 1270 [self matchString:@"/*"]; if ( state.failed ) return ; 1271 1272 1273 1274 1275 do { 1276 NSInteger alt28=2; 1277 NSInteger LA28_0 = [input LA:1]; 1278 if ( (LA28_0=='*') ) { 1279 NSInteger LA28_1 = [input LA:2]; 1280 if ( (LA28_1=='/') ) { 1281 alt28=2; 1282 } 1283 else if ( ((LA28_1 >= 0x0000 && LA28_1 <= '.')||(LA28_1 >= '0' && LA28_1 <= 0xFFFF)) ) { 1284 alt28=1; 1285 } 1286 1287 1288 } 1289 else if ( ((LA28_0 >= 0x0000 && LA28_0 <= ')')||(LA28_0 >= '+' && LA28_0 <= 0xFFFF)) ) { 1290 alt28=1; 1291 } 1292 1293 1294 switch (alt28) { 1295 case 1 : ; 1296 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:38:41: . // alt 1297 { 1298 1299 [self matchAny]; if ( state.failed ) return ; 1300 1301 1302 } 1303 break; 1304 1305 default : 1306 goto loop28; 1307 } 1308 } while (YES); 1309 loop28: ; 1310 1311 1312 1313 [self matchString:@"*/"]; if ( state.failed ) return ; 1314 1315 1316 1317 1318 if ( state.backtracking == 1 ) { 1319 NSLog(@"found comment %@", [self text]); 1320 } 1321 1322 1323 } 1324 1325 /* token+rule list labels */ 1326 1327 state.type = _type; 1328 state.channel = _channel; 1329 } 1330 @finally { 1331 // 1332 /* ruleScopeCleanUp */ 1333 1334 } 1335 return; 1336} 1337/* $ANTLR end "COMMENT" */ 1338// $ANTLR start "SL_COMMENT" 1339- (void) mSL_COMMENT 1340{ 1341 // 1342 /* ruleScopeSetUp */ 1343 1344 /* ruleDeclarations */ 1345 1346 @try { 1347 NSInteger _type = SL_COMMENT; 1348 NSInteger _channel = TokenChannelDefault; 1349 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:43:5: ( '//' ( options {greedy=false; } : . )* '\\n' ) // ruleBlockSingleAlt 1350 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:43:9: '//' ( options {greedy=false; } : . )* '\\n' // alt 1351 { 1352 1353 1354 [self matchString:@"//"]; if ( state.failed ) return ; 1355 1356 1357 1358 1359 do { 1360 NSInteger alt29=2; 1361 NSInteger LA29_0 = [input LA:1]; 1362 if ( (LA29_0=='\n') ) { 1363 alt29=2; 1364 } 1365 else if ( ((LA29_0 >= 0x0000 && LA29_0 <= '\t')||(LA29_0 >= 0x000B && LA29_0 <= 0xFFFF)) ) { 1366 alt29=1; 1367 } 1368 1369 1370 switch (alt29) { 1371 case 1 : ; 1372 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:43:41: . // alt 1373 { 1374 1375 [self matchAny]; if ( state.failed ) return ; 1376 1377 1378 } 1379 break; 1380 1381 default : 1382 goto loop29; 1383 } 1384 } while (YES); 1385 loop29: ; 1386 1387 1388 1389 [self matchChar:'\n']; if ( state.failed ) return ; 1390 1391 1392 1393 if ( state.backtracking == 1 ) { 1394 NSLog(@"found // comment %@", [self text]); 1395 } 1396 1397 1398 } 1399 1400 /* token+rule list labels */ 1401 1402 state.type = _type; 1403 state.channel = _channel; 1404 } 1405 @finally { 1406 // 1407 /* ruleScopeCleanUp */ 1408 1409 } 1410 return; 1411} 1412/* $ANTLR end "SL_COMMENT" */ 1413// $ANTLR start "STRING" 1414- (void) mSTRING 1415{ 1416 // 1417 /* ruleScopeSetUp */ 1418 1419 /* ruleDeclarations */ 1420 1421 @try { 1422 NSInteger _type = STRING; 1423 NSInteger _channel = TokenChannelDefault; 1424 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:48:2: ( '\"' ( options {greedy=false; } : ESC | . )* '\"' ) // ruleBlockSingleAlt 1425 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:48:4: '\"' ( options {greedy=false; } : ESC | . )* '\"' // alt 1426 { 1427 1428 1429 [self matchChar:'"']; if ( state.failed ) return ; 1430 1431 1432 1433 do { 1434 NSInteger alt30=3; 1435 NSInteger LA30_0 = [input LA:1]; 1436 if ( (LA30_0=='"') ) { 1437 alt30=3; 1438 } 1439 else if ( (LA30_0=='\\') ) { 1440 NSInteger LA30_2 = [input LA:2]; 1441 if ( (LA30_2=='"') ) { 1442 alt30=1; 1443 } 1444 else if ( (LA30_2=='\\') ) { 1445 alt30=1; 1446 } 1447 else if ( (LA30_2=='\'') ) { 1448 alt30=1; 1449 } 1450 else if ( ((LA30_2 >= 0x0000 && LA30_2 <= '!')||(LA30_2 >= '#' && LA30_2 <= '&')||(LA30_2 >= '(' && LA30_2 <= '[')||(LA30_2 >= ']' && LA30_2 <= 0xFFFF)) ) { 1451 alt30=2; 1452 } 1453 1454 1455 } 1456 else if ( ((LA30_0 >= 0x0000 && LA30_0 <= '!')||(LA30_0 >= '#' && LA30_0 <= '[')||(LA30_0 >= ']' && LA30_0 <= 0xFFFF)) ) { 1457 alt30=2; 1458 } 1459 1460 1461 switch (alt30) { 1462 case 1 : ; 1463 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:48:34: ESC // alt 1464 { 1465 1466 1467 [self mESC]; if ( state.failed ) return ; 1468 1469 1470 1471 } 1472 break; 1473 case 2 : ; 1474 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:48:40: . // alt 1475 { 1476 1477 [self matchAny]; if ( state.failed ) return ; 1478 1479 1480 } 1481 break; 1482 1483 default : 1484 goto loop30; 1485 } 1486 } while (YES); 1487 loop30: ; 1488 1489 1490 1491 [self matchChar:'"']; if ( state.failed ) return ; 1492 1493 1494 } 1495 1496 /* token+rule list labels */ 1497 1498 state.type = _type; 1499 state.channel = _channel; 1500 } 1501 @finally { 1502 // 1503 /* ruleScopeCleanUp */ 1504 1505 } 1506 return; 1507} 1508/* $ANTLR end "STRING" */ 1509// $ANTLR start "CHAR" 1510- (void) mCHAR 1511{ 1512 // 1513 /* ruleScopeSetUp */ 1514 1515 /* ruleDeclarations */ 1516 1517 @try { 1518 NSInteger _type = CHAR; 1519 NSInteger _channel = TokenChannelDefault; 1520 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:52:2: ( '\\'' ( options {greedy=false; } : ESC | . )* '\\'' ) // ruleBlockSingleAlt 1521 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:52:4: '\\'' ( options {greedy=false; } : ESC | . )* '\\'' // alt 1522 { 1523 1524 1525 [self matchChar:'\'']; if ( state.failed ) return ; 1526 1527 1528 1529 do { 1530 NSInteger alt31=3; 1531 NSInteger LA31_0 = [input LA:1]; 1532 if ( (LA31_0=='\'') ) { 1533 alt31=3; 1534 } 1535 else if ( (LA31_0=='\\') ) { 1536 NSInteger LA31_2 = [input LA:2]; 1537 if ( (LA31_2=='\'') ) { 1538 alt31=1; 1539 } 1540 else if ( (LA31_2=='\\') ) { 1541 alt31=1; 1542 } 1543 else if ( (LA31_2=='"') ) { 1544 alt31=1; 1545 } 1546 else if ( ((LA31_2 >= 0x0000 && LA31_2 <= '!')||(LA31_2 >= '#' && LA31_2 <= '&')||(LA31_2 >= '(' && LA31_2 <= '[')||(LA31_2 >= ']' && LA31_2 <= 0xFFFF)) ) { 1547 alt31=2; 1548 } 1549 1550 1551 } 1552 else if ( ((LA31_0 >= 0x0000 && LA31_0 <= '&')||(LA31_0 >= '(' && LA31_0 <= '[')||(LA31_0 >= ']' && LA31_0 <= 0xFFFF)) ) { 1553 alt31=2; 1554 } 1555 1556 1557 switch (alt31) { 1558 case 1 : ; 1559 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:52:35: ESC // alt 1560 { 1561 1562 1563 [self mESC]; if ( state.failed ) return ; 1564 1565 1566 1567 } 1568 break; 1569 case 2 : ; 1570 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:52:41: . // alt 1571 { 1572 1573 [self matchAny]; if ( state.failed ) return ; 1574 1575 1576 } 1577 break; 1578 1579 default : 1580 goto loop31; 1581 } 1582 } while (YES); 1583 loop31: ; 1584 1585 1586 1587 [self matchChar:'\'']; if ( state.failed ) return ; 1588 1589 1590 } 1591 1592 /* token+rule list labels */ 1593 1594 state.type = _type; 1595 state.channel = _channel; 1596 } 1597 @finally { 1598 // 1599 /* ruleScopeCleanUp */ 1600 1601 } 1602 return; 1603} 1604/* $ANTLR end "CHAR" */ 1605// $ANTLR start "WS" 1606- (void) mWS 1607{ 1608 // 1609 /* ruleScopeSetUp */ 1610 1611 /* ruleDeclarations */ 1612 1613 @try { 1614 NSInteger _type = WS; 1615 NSInteger _channel = TokenChannelDefault; 1616 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:55:5: ( ( ' ' | '\\t' | '\\n' )+ ) // ruleBlockSingleAlt 1617 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:55:9: ( ' ' | '\\t' | '\\n' )+ // alt 1618 { 1619 1620 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:55:9: ( ' ' | '\\t' | '\\n' )+ // positiveClosureBlock 1621 NSInteger cnt32 = 0; 1622 do { 1623 NSInteger alt32 = 2; 1624 NSInteger LA32_0 = [input LA:1]; 1625 if ( ((LA32_0 >= '\t' && LA32_0 <= '\n')||LA32_0==' ') ) { 1626 alt32=1; 1627 } 1628 1629 1630 switch (alt32) { 1631 case 1 : ; 1632 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g: // alt 1633 { 1634 1635 if ((([input LA:1] >= '\t') && ([input LA:1] <= '\n'))||[input LA:1] == ' ') { 1636 [input consume]; 1637 state.failed = NO; 1638 1639 } else { 1640 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 1641 1642 MismatchedSetException *mse = [MismatchedSetException newException:nil stream:input]; 1643 [self recover:mse]; 1644 @throw mse; 1645 } 1646 1647 1648 } 1649 break; 1650 1651 default : 1652 if ( cnt32 >= 1 ) 1653 goto loop32; 1654 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 1655 1656 EarlyExitException *eee = 1657 [EarlyExitException newException:input decisionNumber:32]; 1658 @throw eee; 1659 } 1660 cnt32++; 1661 } while (YES); 1662 loop32: ; 1663 1664 1665 } 1666 1667 /* token+rule list labels */ 1668 1669 state.type = _type; 1670 state.channel = _channel; 1671 } 1672 @finally { 1673 // 1674 /* ruleScopeCleanUp */ 1675 1676 } 1677 return; 1678} 1679/* $ANTLR end "WS" */ 1680// $ANTLR start "QID" 1681- (void) mQID 1682{ 1683 // 1684 /* ruleScopeSetUp */ 1685 1686 /* ruleDeclarations */ 1687 1688 @try { 1689 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:59:5: ( ID ( '.' ID )* ) // ruleBlockSingleAlt 1690 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:59:7: ID ( '.' ID )* // alt 1691 { 1692 1693 1694 [self mID]; if ( state.failed ) return ; 1695 1696 1697 1698 1699 do { 1700 NSInteger alt33=2; 1701 NSInteger LA33_0 = [input LA:1]; 1702 if ( (LA33_0=='.') ) { 1703 alt33=1; 1704 } 1705 1706 1707 switch (alt33) { 1708 case 1 : ; 1709 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:59:11: '.' ID // alt 1710 { 1711 1712 1713 [self matchChar:'.']; if ( state.failed ) return ; 1714 1715 1716 1717 [self mID]; if ( state.failed ) return ; 1718 1719 1720 1721 } 1722 break; 1723 1724 default : 1725 goto loop33; 1726 } 1727 } while (YES); 1728 loop33: ; 1729 1730 1731 } 1732 1733 1734 } 1735 @finally { 1736 // 1737 /* ruleScopeCleanUp */ 1738 1739 } 1740 return; 1741} 1742/* $ANTLR end "QID" */ 1743// $ANTLR start "QIDStar" 1744- (void) mQIDStar 1745{ 1746 // 1747 /* ruleScopeSetUp */ 1748 1749 /* ruleDeclarations */ 1750 1751 @try { 1752 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:68:2: ( ID ( '.' ID )* ( '.*' )? ) // ruleBlockSingleAlt 1753 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:68:4: ID ( '.' ID )* ( '.*' )? // alt 1754 { 1755 1756 1757 [self mID]; if ( state.failed ) return ; 1758 1759 1760 1761 1762 do { 1763 NSInteger alt34=2; 1764 NSInteger LA34_0 = [input LA:1]; 1765 if ( (LA34_0=='.') ) { 1766 NSInteger LA34_1 = [input LA:2]; 1767 if ( ((LA34_1 >= 'A' && LA34_1 <= 'Z')||LA34_1=='_'||(LA34_1 >= 'a' && LA34_1 <= 'z')) ) { 1768 alt34=1; 1769 } 1770 1771 1772 } 1773 1774 1775 switch (alt34) { 1776 case 1 : ; 1777 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:68:8: '.' ID // alt 1778 { 1779 1780 1781 [self matchChar:'.']; if ( state.failed ) return ; 1782 1783 1784 1785 [self mID]; if ( state.failed ) return ; 1786 1787 1788 1789 } 1790 break; 1791 1792 default : 1793 goto loop34; 1794 } 1795 } while (YES); 1796 loop34: ; 1797 1798 1799 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:68:17: ( '.*' )? // block 1800 NSInteger alt35=2; 1801 NSInteger LA35_0 = [input LA:1]; 1802 1803 if ( (LA35_0=='.') ) { 1804 alt35=1; 1805 } 1806 switch (alt35) { 1807 case 1 : ; 1808 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:68:17: '.*' // alt 1809 { 1810 1811 1812 [self matchString:@".*"]; if ( state.failed ) return ; 1813 1814 1815 1816 } 1817 break; 1818 1819 } 1820 1821 1822 } 1823 1824 1825 } 1826 @finally { 1827 // 1828 /* ruleScopeCleanUp */ 1829 1830 } 1831 return; 1832} 1833/* $ANTLR end "QIDStar" */ 1834// $ANTLR start "TYPE" 1835- (void) mTYPE 1836{ 1837 // 1838 /* ruleScopeSetUp */ 1839 1840 /* ruleDeclarations */ 1841 1842 @try { 1843 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:72:5: ( QID ( '[]' )? ) // ruleBlockSingleAlt 1844 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:72:9: QID ( '[]' )? // alt 1845 { 1846 1847 1848 [self mQID]; if ( state.failed ) return ; 1849 1850 1851 1852 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:72:13: ( '[]' )? // block 1853 NSInteger alt36=2; 1854 NSInteger LA36_0 = [input LA:1]; 1855 1856 if ( (LA36_0=='[') ) { 1857 alt36=1; 1858 } 1859 switch (alt36) { 1860 case 1 : ; 1861 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:72:13: '[]' // alt 1862 { 1863 1864 1865 [self matchString:@"[]"]; if ( state.failed ) return ; 1866 1867 1868 1869 } 1870 break; 1871 1872 } 1873 1874 1875 } 1876 1877 1878 } 1879 @finally { 1880 // 1881 /* ruleScopeCleanUp */ 1882 1883 } 1884 return; 1885} 1886/* $ANTLR end "TYPE" */ 1887// $ANTLR start "ARG" 1888- (void) mARG 1889{ 1890 // 1891 /* ruleScopeSetUp */ 1892 1893 /* ruleDeclarations */ 1894 1895 @try { 1896 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:76:5: ( TYPE WS ID ) // ruleBlockSingleAlt 1897 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:76:9: TYPE WS ID // alt 1898 { 1899 1900 1901 [self mTYPE]; if ( state.failed ) return ; 1902 1903 1904 1905 1906 [self mWS]; if ( state.failed ) return ; 1907 1908 1909 1910 1911 [self mID]; if ( state.failed ) return ; 1912 1913 1914 1915 } 1916 1917 1918 } 1919 @finally { 1920 // 1921 /* ruleScopeCleanUp */ 1922 1923 } 1924 return; 1925} 1926/* $ANTLR end "ARG" */ 1927// $ANTLR start "ID" 1928- (void) mID 1929{ 1930 // 1931 /* ruleScopeSetUp */ 1932 1933 /* ruleDeclarations */ 1934 1935 @try { 1936 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:80:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) // ruleBlockSingleAlt 1937 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:80:9: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* // alt 1938 { 1939 1940 if ((([input LA:1] >= 'A') && ([input LA:1] <= 'Z'))||[input LA:1] == '_'||(([input LA:1] >= 'a') && ([input LA:1] <= 'z'))) { 1941 [input consume]; 1942 state.failed = NO; 1943 1944 } else { 1945 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 1946 1947 MismatchedSetException *mse = [MismatchedSetException newException:nil stream:input]; 1948 [self recover:mse]; 1949 @throw mse; 1950 } 1951 1952 1953 1954 do { 1955 NSInteger alt37=2; 1956 NSInteger LA37_0 = [input LA:1]; 1957 if ( ((LA37_0 >= '0' && LA37_0 <= '9')||(LA37_0 >= 'A' && LA37_0 <= 'Z')||LA37_0=='_'||(LA37_0 >= 'a' && LA37_0 <= 'z')) ) { 1958 alt37=1; 1959 } 1960 1961 1962 switch (alt37) { 1963 case 1 : ; 1964 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g: // alt 1965 { 1966 1967 if ((([input LA:1] >= '0') && ([input LA:1] <= '9'))||(([input LA:1] >= 'A') && ([input LA:1] <= 'Z'))||[input LA:1] == '_'||(([input LA:1] >= 'a') && ([input LA:1] <= 'z'))) { 1968 [input consume]; 1969 state.failed = NO; 1970 1971 } else { 1972 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 1973 1974 MismatchedSetException *mse = [MismatchedSetException newException:nil stream:input]; 1975 [self recover:mse]; 1976 @throw mse; 1977 } 1978 1979 1980 } 1981 break; 1982 1983 default : 1984 goto loop37; 1985 } 1986 } while (YES); 1987 loop37: ; 1988 1989 1990 } 1991 1992 1993 } 1994 @finally { 1995 // 1996 /* ruleScopeCleanUp */ 1997 1998 } 1999 return; 2000} 2001/* $ANTLR end "ID" */ 2002// $ANTLR start "ESC" 2003- (void) mESC 2004{ 2005 // 2006 /* ruleScopeSetUp */ 2007 2008 /* ruleDeclarations */ 2009 2010 @try { 2011 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:84:5: ( '\\\\' ( '\"' | '\\'' | '\\\\' ) ) // ruleBlockSingleAlt 2012 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:84:7: '\\\\' ( '\"' | '\\'' | '\\\\' ) // alt 2013 { 2014 2015 2016 [self matchChar:'\\']; if ( state.failed ) return ; 2017 2018 2019 if ([input LA:1] == '"'||[input LA:1] == '\''||[input LA:1] == '\\') { 2020 [input consume]; 2021 state.failed = NO; 2022 2023 } else { 2024 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2025 2026 MismatchedSetException *mse = [MismatchedSetException newException:nil stream:input]; 2027 [self recover:mse]; 2028 @throw mse; 2029 } 2030 2031 2032 } 2033 2034 2035 } 2036 @finally { 2037 // 2038 /* ruleScopeCleanUp */ 2039 2040 } 2041 return; 2042} 2043/* $ANTLR end "ESC" */ 2044- (void) mTokens 2045{ 2046 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:39: ( IMPORT | RETURN | CLASS | METHOD | FIELD | STAT | CALL | COMMENT | SL_COMMENT | STRING | CHAR | WS ) //ruleblock 2047 NSInteger alt38=12; 2048 unichar charLA38 = [input LA:1]; 2049 switch (charLA38) { 2050 case 'i': ; 2051 { 2052 NSInteger LA38_1 = [input LA:2]; 2053 2054 if ( ([self evaluateSyntacticPredicate:@selector(synpred1_Fuzzy_fragment)]) ) { 2055 alt38=1; 2056 } 2057 else if ( ([self evaluateSyntacticPredicate:@selector(synpred4_Fuzzy_fragment)]) ) { 2058 alt38=4; 2059 } 2060 else if ( ([self evaluateSyntacticPredicate:@selector(synpred5_Fuzzy_fragment)]) ) { 2061 alt38=5; 2062 } 2063 else if ( ([self evaluateSyntacticPredicate:@selector(synpred6_Fuzzy_fragment)]) ) { 2064 alt38=6; 2065 } 2066 else if ( ([self evaluateSyntacticPredicate:@selector(synpred7_Fuzzy_fragment)]) ) { 2067 alt38=7; 2068 } 2069 else { 2070 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2071 2072 NoViableAltException *nvae = [NoViableAltException newException:38 state:1 stream:input]; 2073 nvae.c = LA38_1; 2074 @throw nvae; 2075 2076 } 2077 } 2078 break; 2079 case 'r': ; 2080 { 2081 NSInteger LA38_7 = [input LA:2]; 2082 2083 if ( ([self evaluateSyntacticPredicate:@selector(synpred2_Fuzzy_fragment)]) ) { 2084 alt38=2; 2085 } 2086 else if ( ([self evaluateSyntacticPredicate:@selector(synpred4_Fuzzy_fragment)]) ) { 2087 alt38=4; 2088 } 2089 else if ( ([self evaluateSyntacticPredicate:@selector(synpred5_Fuzzy_fragment)]) ) { 2090 alt38=5; 2091 } 2092 else if ( ([self evaluateSyntacticPredicate:@selector(synpred7_Fuzzy_fragment)]) ) { 2093 alt38=7; 2094 } 2095 else { 2096 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2097 2098 NoViableAltException *nvae = [NoViableAltException newException:38 state:7 stream:input]; 2099 nvae.c = LA38_7; 2100 @throw nvae; 2101 2102 } 2103 } 2104 break; 2105 case 'c': ; 2106 { 2107 NSInteger LA38_9 = [input LA:2]; 2108 2109 if ( ([self evaluateSyntacticPredicate:@selector(synpred3_Fuzzy_fragment)]) ) { 2110 alt38=3; 2111 } 2112 else if ( ([self evaluateSyntacticPredicate:@selector(synpred4_Fuzzy_fragment)]) ) { 2113 alt38=4; 2114 } 2115 else if ( ([self evaluateSyntacticPredicate:@selector(synpred5_Fuzzy_fragment)]) ) { 2116 alt38=5; 2117 } 2118 else if ( ([self evaluateSyntacticPredicate:@selector(synpred7_Fuzzy_fragment)]) ) { 2119 alt38=7; 2120 } 2121 else { 2122 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2123 2124 NoViableAltException *nvae = [NoViableAltException newException:38 state:9 stream:input]; 2125 nvae.c = LA38_9; 2126 @throw nvae; 2127 2128 } 2129 } 2130 break; 2131 case 'f': ; 2132 case 's': ; 2133 case 'w': ; 2134 { 2135 NSInteger LA38_11 = [input LA:2]; 2136 2137 if ( ([self evaluateSyntacticPredicate:@selector(synpred4_Fuzzy_fragment)]) ) { 2138 alt38=4; 2139 } 2140 else if ( ([self evaluateSyntacticPredicate:@selector(synpred5_Fuzzy_fragment)]) ) { 2141 alt38=5; 2142 } 2143 else if ( ([self evaluateSyntacticPredicate:@selector(synpred6_Fuzzy_fragment)]) ) { 2144 alt38=6; 2145 } 2146 else if ( ([self evaluateSyntacticPredicate:@selector(synpred7_Fuzzy_fragment)]) ) { 2147 alt38=7; 2148 } 2149 else { 2150 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2151 2152 NoViableAltException *nvae = [NoViableAltException newException:38 state:11 stream:input]; 2153 nvae.c = LA38_11; 2154 @throw nvae; 2155 2156 } 2157 } 2158 break; 2159 case 'A': ; 2160 case 'B': ; 2161 case 'C': ; 2162 case 'D': ; 2163 case 'E': ; 2164 case 'F': ; 2165 case 'G': ; 2166 case 'H': ; 2167 case 'I': ; 2168 case 'J': ; 2169 case 'K': ; 2170 case 'L': ; 2171 case 'M': ; 2172 case 'N': ; 2173 case 'O': ; 2174 case 'P': ; 2175 case 'Q': ; 2176 case 'R': ; 2177 case 'S': ; 2178 case 'T': ; 2179 case 'U': ; 2180 case 'V': ; 2181 case 'W': ; 2182 case 'X': ; 2183 case 'Y': ; 2184 case 'Z': ; 2185 case '_': ; 2186 case 'a': ; 2187 case 'b': ; 2188 case 'd': ; 2189 case 'e': ; 2190 case 'g': ; 2191 case 'h': ; 2192 case 'j': ; 2193 case 'k': ; 2194 case 'l': ; 2195 case 'm': ; 2196 case 'n': ; 2197 case 'o': ; 2198 case 'p': ; 2199 case 'q': ; 2200 case 't': ; 2201 case 'u': ; 2202 case 'v': ; 2203 case 'x': ; 2204 case 'y': ; 2205 case 'z': ; 2206 { 2207 NSInteger LA38_12 = [input LA:2]; 2208 2209 if ( ([self evaluateSyntacticPredicate:@selector(synpred4_Fuzzy_fragment)]) ) { 2210 alt38=4; 2211 } 2212 else if ( ([self evaluateSyntacticPredicate:@selector(synpred5_Fuzzy_fragment)]) ) { 2213 alt38=5; 2214 } 2215 else if ( ([self evaluateSyntacticPredicate:@selector(synpred7_Fuzzy_fragment)]) ) { 2216 alt38=7; 2217 } 2218 else { 2219 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2220 2221 NoViableAltException *nvae = [NoViableAltException newException:38 state:12 stream:input]; 2222 nvae.c = LA38_12; 2223 @throw nvae; 2224 2225 } 2226 } 2227 break; 2228 case '/': ; 2229 { 2230 NSInteger LA38_13 = [input LA:2]; 2231 2232 if ( ([self evaluateSyntacticPredicate:@selector(synpred8_Fuzzy_fragment)]) ) { 2233 alt38=8; 2234 } 2235 else if ( ([self evaluateSyntacticPredicate:@selector(synpred9_Fuzzy_fragment)]) ) { 2236 alt38=9; 2237 } 2238 else { 2239 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2240 2241 NoViableAltException *nvae = [NoViableAltException newException:38 state:13 stream:input]; 2242 nvae.c = LA38_13; 2243 @throw nvae; 2244 2245 } 2246 } 2247 break; 2248 case '"': ; 2249 { 2250 alt38=10; 2251 } 2252 break; 2253 case '\'': ; 2254 { 2255 alt38=11; 2256 } 2257 break; 2258 case '\t': ; 2259 case '\n': ; 2260 case ' ': ; 2261 { 2262 alt38=12; 2263 } 2264 break; 2265 2266 default: ; 2267 if ( state.backtracking > 0 ) { state.failed = YES; return ; } 2268 2269 NoViableAltException *nvae = [NoViableAltException newException:38 state:0 stream:input]; 2270 nvae.c = charLA38; 2271 @throw nvae; 2272 2273 } 2274 2275 switch (alt38) { 2276 case 1 : ; 2277 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:41: IMPORT // alt 2278 { 2279 2280 2281 [self mIMPORT]; if ( state.failed ) return ; 2282 2283 2284 2285 } 2286 break; 2287 case 2 : ; 2288 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:48: RETURN // alt 2289 { 2290 2291 2292 [self mRETURN]; if ( state.failed ) return ; 2293 2294 2295 2296 } 2297 break; 2298 case 3 : ; 2299 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:55: CLASS // alt 2300 { 2301 2302 2303 [self mCLASS]; if ( state.failed ) return ; 2304 2305 2306 2307 } 2308 break; 2309 case 4 : ; 2310 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:61: METHOD // alt 2311 { 2312 2313 2314 [self mMETHOD]; if ( state.failed ) return ; 2315 2316 2317 2318 } 2319 break; 2320 case 5 : ; 2321 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:68: FIELD // alt 2322 { 2323 2324 2325 [self mFIELD]; if ( state.failed ) return ; 2326 2327 2328 2329 } 2330 break; 2331 case 6 : ; 2332 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:74: STAT // alt 2333 { 2334 2335 2336 [self mSTAT]; if ( state.failed ) return ; 2337 2338 2339 2340 } 2341 break; 2342 case 7 : ; 2343 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:79: CALL // alt 2344 { 2345 2346 2347 [self mCALL]; if ( state.failed ) return ; 2348 2349 2350 2351 } 2352 break; 2353 case 8 : ; 2354 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:84: COMMENT // alt 2355 { 2356 2357 2358 [self mCOMMENT]; if ( state.failed ) return ; 2359 2360 2361 2362 } 2363 break; 2364 case 9 : ; 2365 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:92: SL_COMMENT // alt 2366 { 2367 2368 2369 [self mSL_COMMENT]; if ( state.failed ) return ; 2370 2371 2372 2373 } 2374 break; 2375 case 10 : ; 2376 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:103: STRING // alt 2377 { 2378 2379 2380 [self mSTRING]; if ( state.failed ) return ; 2381 2382 2383 2384 } 2385 break; 2386 case 11 : ; 2387 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:110: CHAR // alt 2388 { 2389 2390 2391 [self mCHAR]; if ( state.failed ) return ; 2392 2393 2394 2395 } 2396 break; 2397 case 12 : ; 2398 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:115: WS // alt 2399 { 2400 2401 2402 [self mWS]; if ( state.failed ) return ; 2403 2404 2405 2406 } 2407 break; 2408 2409 } 2410 2411} 2412// $ANTLR start synpred1_Fuzzy_fragment 2413- (void) synpred1_Fuzzy_fragment 2414{ 2415 /* ruleLabelDefs entry */ 2416 2417 2418 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:41: ( IMPORT ) // ruleBlockSingleAlt 2419 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:41: IMPORT // alt 2420 { 2421 2422 2423 [self mIMPORT]; if ( state.failed ) return ; 2424 2425 2426 2427 } 2428 2429} // $ANTLR end synpred1_Fuzzy_fragment 2430// $ANTLR start synpred2_Fuzzy_fragment 2431- (void) synpred2_Fuzzy_fragment 2432{ 2433 /* ruleLabelDefs entry */ 2434 2435 2436 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:48: ( RETURN ) // ruleBlockSingleAlt 2437 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:48: RETURN // alt 2438 { 2439 2440 2441 [self mRETURN]; if ( state.failed ) return ; 2442 2443 2444 2445 } 2446 2447} // $ANTLR end synpred2_Fuzzy_fragment 2448// $ANTLR start synpred3_Fuzzy_fragment 2449- (void) synpred3_Fuzzy_fragment 2450{ 2451 /* ruleLabelDefs entry */ 2452 2453 2454 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:55: ( CLASS ) // ruleBlockSingleAlt 2455 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:55: CLASS // alt 2456 { 2457 2458 2459 [self mCLASS]; if ( state.failed ) return ; 2460 2461 2462 2463 } 2464 2465} // $ANTLR end synpred3_Fuzzy_fragment 2466// $ANTLR start synpred4_Fuzzy_fragment 2467- (void) synpred4_Fuzzy_fragment 2468{ 2469 /* ruleLabelDefs entry */ 2470 2471 2472 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:61: ( METHOD ) // ruleBlockSingleAlt 2473 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:61: METHOD // alt 2474 { 2475 2476 2477 [self mMETHOD]; if ( state.failed ) return ; 2478 2479 2480 2481 } 2482 2483} // $ANTLR end synpred4_Fuzzy_fragment 2484// $ANTLR start synpred5_Fuzzy_fragment 2485- (void) synpred5_Fuzzy_fragment 2486{ 2487 /* ruleLabelDefs entry */ 2488 2489 2490 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:68: ( FIELD ) // ruleBlockSingleAlt 2491 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:68: FIELD // alt 2492 { 2493 2494 2495 [self mFIELD]; if ( state.failed ) return ; 2496 2497 2498 2499 } 2500 2501} // $ANTLR end synpred5_Fuzzy_fragment 2502// $ANTLR start synpred6_Fuzzy_fragment 2503- (void) synpred6_Fuzzy_fragment 2504{ 2505 /* ruleLabelDefs entry */ 2506 2507 2508 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:74: ( STAT ) // ruleBlockSingleAlt 2509 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:74: STAT // alt 2510 { 2511 2512 2513 [self mSTAT]; if ( state.failed ) return ; 2514 2515 2516 2517 } 2518 2519} // $ANTLR end synpred6_Fuzzy_fragment 2520// $ANTLR start synpred7_Fuzzy_fragment 2521- (void) synpred7_Fuzzy_fragment 2522{ 2523 /* ruleLabelDefs entry */ 2524 2525 2526 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:79: ( CALL ) // ruleBlockSingleAlt 2527 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:79: CALL // alt 2528 { 2529 2530 2531 [self mCALL]; if ( state.failed ) return ; 2532 2533 2534 2535 } 2536 2537} // $ANTLR end synpred7_Fuzzy_fragment 2538// $ANTLR start synpred8_Fuzzy_fragment 2539- (void) synpred8_Fuzzy_fragment 2540{ 2541 /* ruleLabelDefs entry */ 2542 2543 2544 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:84: ( COMMENT ) // ruleBlockSingleAlt 2545 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:84: COMMENT // alt 2546 { 2547 2548 2549 [self mCOMMENT]; if ( state.failed ) return ; 2550 2551 2552 2553 } 2554 2555} // $ANTLR end synpred8_Fuzzy_fragment 2556// $ANTLR start synpred9_Fuzzy_fragment 2557- (void) synpred9_Fuzzy_fragment 2558{ 2559 /* ruleLabelDefs entry */ 2560 2561 2562 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:92: ( SL_COMMENT ) // ruleBlockSingleAlt 2563 // /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/fuzzy/Fuzzy.g:1:92: SL_COMMENT // alt 2564 { 2565 2566 2567 [self mSL_COMMENT]; if ( state.failed ) return ; 2568 2569 2570 2571 } 2572 2573} // $ANTLR end synpred9_Fuzzy_fragment 2574 2575@end /* end of Fuzzy implementation line 397 */