001// $ANTLR 3.5.2 org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g 2024-08-03 13:17:14 002 003package org.apache.tapestry5.beanmodel.internal.antlr; 004 005 006import org.antlr.runtime.*; 007import java.util.Stack; 008import java.util.List; 009import java.util.ArrayList; 010import java.util.Map; 011import java.util.HashMap; 012 013import org.antlr.runtime.tree.*; 014 015 016@SuppressWarnings("all") 017public class PropertyExpressionParser extends org.apache.tapestry5.beanmodel.internal.antlr.BaseParser { 018 public static final String[] tokenNames = new String[] { 019 "<invalid>", "<EOR>", "<DOWN>", "<UP>", "A", "BANG", "COLON", "COMMA", 020 "DECIMAL", "DEREF", "DIGIT", "E", "F", "FALSE", "H", "I", "IDENTIFIER", 021 "INTEGER", "JAVA_ID_PART", "JAVA_ID_START", "L", "LBRACE", "LBRACKET", 022 "LETTER", "LPAREN", "N", "NULL", "NUMBER_OR_RANGEOP", "QUOTE", "R", "RANGEOP", 023 "RBRACE", "RBRACKET", "RPAREN", "S", "SAFEDEREF", "SIGN", "STRING", "T", 024 "THIS", "TRUE", "U", "WS", "INVOKE", "LIST", "MAP", "NOT" 025 }; 026 public static final int EOF=-1; 027 public static final int A=4; 028 public static final int BANG=5; 029 public static final int COLON=6; 030 public static final int COMMA=7; 031 public static final int DECIMAL=8; 032 public static final int DEREF=9; 033 public static final int DIGIT=10; 034 public static final int E=11; 035 public static final int F=12; 036 public static final int FALSE=13; 037 public static final int H=14; 038 public static final int I=15; 039 public static final int IDENTIFIER=16; 040 public static final int INTEGER=17; 041 public static final int JAVA_ID_PART=18; 042 public static final int JAVA_ID_START=19; 043 public static final int L=20; 044 public static final int LBRACE=21; 045 public static final int LBRACKET=22; 046 public static final int LETTER=23; 047 public static final int LPAREN=24; 048 public static final int N=25; 049 public static final int NULL=26; 050 public static final int NUMBER_OR_RANGEOP=27; 051 public static final int QUOTE=28; 052 public static final int R=29; 053 public static final int RANGEOP=30; 054 public static final int RBRACE=31; 055 public static final int RBRACKET=32; 056 public static final int RPAREN=33; 057 public static final int S=34; 058 public static final int SAFEDEREF=35; 059 public static final int SIGN=36; 060 public static final int STRING=37; 061 public static final int T=38; 062 public static final int THIS=39; 063 public static final int TRUE=40; 064 public static final int U=41; 065 public static final int WS=42; 066 public static final int INVOKE=43; 067 public static final int LIST=44; 068 public static final int MAP=45; 069 public static final int NOT=46; 070 071 // delegates 072 public org.apache.tapestry5.beanmodel.internal.antlr.BaseParser[] getDelegates() { 073 return new org.apache.tapestry5.beanmodel.internal.antlr.BaseParser[] {}; 074 } 075 076 // delegators 077 078 079 public PropertyExpressionParser(TokenStream input) { 080 this(input, new RecognizerSharedState()); 081 } 082 public PropertyExpressionParser(TokenStream input, RecognizerSharedState state) { 083 super(input, state); 084 } 085 086 protected TreeAdaptor adaptor = new CommonTreeAdaptor(); 087 088 public void setTreeAdaptor(TreeAdaptor adaptor) { 089 this.adaptor = adaptor; 090 } 091 public TreeAdaptor getTreeAdaptor() { 092 return adaptor; 093 } 094 @Override public String[] getTokenNames() { return PropertyExpressionParser.tokenNames; } 095 @Override public String getGrammarFileName() { return "org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g"; } 096 097 098 public static class start_return extends ParserRuleReturnScope { 099 CommonTree tree; 100 @Override 101 public CommonTree getTree() { return tree; } 102 }; 103 104 105 // $ANTLR start "start" 106 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:45:1: start : expression ^ EOF !; 107 public final PropertyExpressionParser.start_return start() throws RecognitionException { 108 PropertyExpressionParser.start_return retval = new PropertyExpressionParser.start_return(); 109 retval.start = input.LT(1); 110 111 CommonTree root_0 = null; 112 113 Token EOF2=null; 114 ParserRuleReturnScope expression1 =null; 115 116 CommonTree EOF2_tree=null; 117 118 try { 119 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:45:8: ( expression ^ EOF !) 120 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:45:10: expression ^ EOF ! 121 { 122 root_0 = (CommonTree)adaptor.nil(); 123 124 125 pushFollow(FOLLOW_expression_in_start130); 126 expression1=expression(); 127 state._fsp--; 128 if (state.failed) return retval; 129 if ( state.backtracking==0 ) root_0 = (CommonTree)adaptor.becomeRoot(expression1.getTree(), root_0); 130 EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_start133); if (state.failed) return retval; 131 } 132 133 retval.stop = input.LT(-1); 134 135 if ( state.backtracking==0 ) { 136 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 137 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 138 } 139 } 140 catch (RecognitionException re) { 141 reportError(re); 142 recover(input,re); 143 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 144 } 145 finally { 146 // do for sure before leaving 147 } 148 return retval; 149 } 150 // $ANTLR end "start" 151 152 153 public static class expression_return extends ParserRuleReturnScope { 154 CommonTree tree; 155 @Override 156 public CommonTree getTree() { return tree; } 157 }; 158 159 160 // $ANTLR start "expression" 161 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:47:1: expression : ( keyword | rangeOp | constant | propertyChain | list | notOp | map ); 162 public final PropertyExpressionParser.expression_return expression() throws RecognitionException { 163 PropertyExpressionParser.expression_return retval = new PropertyExpressionParser.expression_return(); 164 retval.start = input.LT(1); 165 166 CommonTree root_0 = null; 167 168 ParserRuleReturnScope keyword3 =null; 169 ParserRuleReturnScope rangeOp4 =null; 170 ParserRuleReturnScope constant5 =null; 171 ParserRuleReturnScope propertyChain6 =null; 172 ParserRuleReturnScope list7 =null; 173 ParserRuleReturnScope notOp8 =null; 174 ParserRuleReturnScope map9 =null; 175 176 177 try { 178 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:48:2: ( keyword | rangeOp | constant | propertyChain | list | notOp | map ) 179 int alt1=7; 180 switch ( input.LA(1) ) { 181 case FALSE: 182 case NULL: 183 case THIS: 184 case TRUE: 185 { 186 alt1=1; 187 } 188 break; 189 case INTEGER: 190 { 191 int LA1_2 = input.LA(2); 192 if ( (synpred2_PropertyExpressionParser()) ) { 193 alt1=2; 194 } 195 else if ( (synpred3_PropertyExpressionParser()) ) { 196 alt1=3; 197 } 198 199 else { 200 if (state.backtracking>0) {state.failed=true; return retval;} 201 int nvaeMark = input.mark(); 202 try { 203 input.consume(); 204 NoViableAltException nvae = 205 new NoViableAltException("", 1, 2, input); 206 throw nvae; 207 } finally { 208 input.rewind(nvaeMark); 209 } 210 } 211 212 } 213 break; 214 case IDENTIFIER: 215 { 216 int LA1_3 = input.LA(2); 217 if ( (synpred2_PropertyExpressionParser()) ) { 218 alt1=2; 219 } 220 else if ( (synpred4_PropertyExpressionParser()) ) { 221 alt1=4; 222 } 223 224 else { 225 if (state.backtracking>0) {state.failed=true; return retval;} 226 int nvaeMark = input.mark(); 227 try { 228 input.consume(); 229 NoViableAltException nvae = 230 new NoViableAltException("", 1, 3, input); 231 throw nvae; 232 } finally { 233 input.rewind(nvaeMark); 234 } 235 } 236 237 } 238 break; 239 case DECIMAL: 240 case STRING: 241 { 242 alt1=3; 243 } 244 break; 245 case LBRACKET: 246 { 247 alt1=5; 248 } 249 break; 250 case BANG: 251 { 252 alt1=6; 253 } 254 break; 255 case LBRACE: 256 { 257 alt1=7; 258 } 259 break; 260 default: 261 if (state.backtracking>0) {state.failed=true; return retval;} 262 NoViableAltException nvae = 263 new NoViableAltException("", 1, 0, input); 264 throw nvae; 265 } 266 switch (alt1) { 267 case 1 : 268 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:48:4: keyword 269 { 270 root_0 = (CommonTree)adaptor.nil(); 271 272 273 pushFollow(FOLLOW_keyword_in_expression145); 274 keyword3=keyword(); 275 state._fsp--; 276 if (state.failed) return retval; 277 if ( state.backtracking==0 ) adaptor.addChild(root_0, keyword3.getTree()); 278 279 } 280 break; 281 case 2 : 282 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:49:4: rangeOp 283 { 284 root_0 = (CommonTree)adaptor.nil(); 285 286 287 pushFollow(FOLLOW_rangeOp_in_expression150); 288 rangeOp4=rangeOp(); 289 state._fsp--; 290 if (state.failed) return retval; 291 if ( state.backtracking==0 ) adaptor.addChild(root_0, rangeOp4.getTree()); 292 293 } 294 break; 295 case 3 : 296 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:50:4: constant 297 { 298 root_0 = (CommonTree)adaptor.nil(); 299 300 301 pushFollow(FOLLOW_constant_in_expression155); 302 constant5=constant(); 303 state._fsp--; 304 if (state.failed) return retval; 305 if ( state.backtracking==0 ) adaptor.addChild(root_0, constant5.getTree()); 306 307 } 308 break; 309 case 4 : 310 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:51:4: propertyChain 311 { 312 root_0 = (CommonTree)adaptor.nil(); 313 314 315 pushFollow(FOLLOW_propertyChain_in_expression160); 316 propertyChain6=propertyChain(); 317 state._fsp--; 318 if (state.failed) return retval; 319 if ( state.backtracking==0 ) adaptor.addChild(root_0, propertyChain6.getTree()); 320 321 } 322 break; 323 case 5 : 324 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:52:4: list 325 { 326 root_0 = (CommonTree)adaptor.nil(); 327 328 329 pushFollow(FOLLOW_list_in_expression165); 330 list7=list(); 331 state._fsp--; 332 if (state.failed) return retval; 333 if ( state.backtracking==0 ) adaptor.addChild(root_0, list7.getTree()); 334 335 } 336 break; 337 case 6 : 338 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:53:4: notOp 339 { 340 root_0 = (CommonTree)adaptor.nil(); 341 342 343 pushFollow(FOLLOW_notOp_in_expression170); 344 notOp8=notOp(); 345 state._fsp--; 346 if (state.failed) return retval; 347 if ( state.backtracking==0 ) adaptor.addChild(root_0, notOp8.getTree()); 348 349 } 350 break; 351 case 7 : 352 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:54:4: map 353 { 354 root_0 = (CommonTree)adaptor.nil(); 355 356 357 pushFollow(FOLLOW_map_in_expression175); 358 map9=map(); 359 state._fsp--; 360 if (state.failed) return retval; 361 if ( state.backtracking==0 ) adaptor.addChild(root_0, map9.getTree()); 362 363 } 364 break; 365 366 } 367 retval.stop = input.LT(-1); 368 369 if ( state.backtracking==0 ) { 370 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 371 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 372 } 373 } 374 catch (RecognitionException re) { 375 reportError(re); 376 recover(input,re); 377 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 378 } 379 finally { 380 // do for sure before leaving 381 } 382 return retval; 383 } 384 // $ANTLR end "expression" 385 386 387 public static class keyword_return extends ParserRuleReturnScope { 388 CommonTree tree; 389 @Override 390 public CommonTree getTree() { return tree; } 391 }; 392 393 394 // $ANTLR start "keyword" 395 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:57:1: keyword : ( NULL | TRUE | FALSE | THIS ); 396 public final PropertyExpressionParser.keyword_return keyword() throws RecognitionException { 397 PropertyExpressionParser.keyword_return retval = new PropertyExpressionParser.keyword_return(); 398 retval.start = input.LT(1); 399 400 CommonTree root_0 = null; 401 402 Token set10=null; 403 404 CommonTree set10_tree=null; 405 406 try { 407 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:57:9: ( NULL | TRUE | FALSE | THIS ) 408 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g: 409 { 410 root_0 = (CommonTree)adaptor.nil(); 411 412 413 set10=input.LT(1); 414 if ( input.LA(1)==FALSE||input.LA(1)==NULL||(input.LA(1) >= THIS && input.LA(1) <= TRUE) ) { 415 input.consume(); 416 if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set10)); 417 state.errorRecovery=false; 418 state.failed=false; 419 } 420 else { 421 if (state.backtracking>0) {state.failed=true; return retval;} 422 MismatchedSetException mse = new MismatchedSetException(null,input); 423 throw mse; 424 } 425 } 426 427 retval.stop = input.LT(-1); 428 429 if ( state.backtracking==0 ) { 430 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 431 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 432 } 433 } 434 catch (RecognitionException re) { 435 reportError(re); 436 recover(input,re); 437 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 438 } 439 finally { 440 // do for sure before leaving 441 } 442 return retval; 443 } 444 // $ANTLR end "keyword" 445 446 447 public static class constant_return extends ParserRuleReturnScope { 448 CommonTree tree; 449 @Override 450 public CommonTree getTree() { return tree; } 451 }; 452 453 454 // $ANTLR start "constant" 455 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:59:1: constant : ( INTEGER | DECIMAL | STRING ); 456 public final PropertyExpressionParser.constant_return constant() throws RecognitionException { 457 PropertyExpressionParser.constant_return retval = new PropertyExpressionParser.constant_return(); 458 retval.start = input.LT(1); 459 460 CommonTree root_0 = null; 461 462 Token set11=null; 463 464 CommonTree set11_tree=null; 465 466 try { 467 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:59:9: ( INTEGER | DECIMAL | STRING ) 468 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g: 469 { 470 root_0 = (CommonTree)adaptor.nil(); 471 472 473 set11=input.LT(1); 474 if ( input.LA(1)==DECIMAL||input.LA(1)==INTEGER||input.LA(1)==STRING ) { 475 input.consume(); 476 if ( state.backtracking==0 ) adaptor.addChild(root_0, (CommonTree)adaptor.create(set11)); 477 state.errorRecovery=false; 478 state.failed=false; 479 } 480 else { 481 if (state.backtracking>0) {state.failed=true; return retval;} 482 MismatchedSetException mse = new MismatchedSetException(null,input); 483 throw mse; 484 } 485 } 486 487 retval.stop = input.LT(-1); 488 489 if ( state.backtracking==0 ) { 490 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 491 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 492 } 493 } 494 catch (RecognitionException re) { 495 reportError(re); 496 recover(input,re); 497 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 498 } 499 finally { 500 // do for sure before leaving 501 } 502 return retval; 503 } 504 // $ANTLR end "constant" 505 506 507 public static class propertyChain_return extends ParserRuleReturnScope { 508 CommonTree tree; 509 @Override 510 public CommonTree getTree() { return tree; } 511 }; 512 513 514 // $ANTLR start "propertyChain" 515 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:61:1: propertyChain : ( term DEREF propertyChain -> ^( DEREF term propertyChain ) | term SAFEDEREF propertyChain -> ^( SAFEDEREF term propertyChain ) | term ); 516 public final PropertyExpressionParser.propertyChain_return propertyChain() throws RecognitionException { 517 PropertyExpressionParser.propertyChain_return retval = new PropertyExpressionParser.propertyChain_return(); 518 retval.start = input.LT(1); 519 520 CommonTree root_0 = null; 521 522 Token DEREF13=null; 523 Token SAFEDEREF16=null; 524 ParserRuleReturnScope term12 =null; 525 ParserRuleReturnScope propertyChain14 =null; 526 ParserRuleReturnScope term15 =null; 527 ParserRuleReturnScope propertyChain17 =null; 528 ParserRuleReturnScope term18 =null; 529 530 CommonTree DEREF13_tree=null; 531 CommonTree SAFEDEREF16_tree=null; 532 RewriteRuleTokenStream stream_SAFEDEREF=new RewriteRuleTokenStream(adaptor,"token SAFEDEREF"); 533 RewriteRuleTokenStream stream_DEREF=new RewriteRuleTokenStream(adaptor,"token DEREF"); 534 RewriteRuleSubtreeStream stream_propertyChain=new RewriteRuleSubtreeStream(adaptor,"rule propertyChain"); 535 RewriteRuleSubtreeStream stream_term=new RewriteRuleSubtreeStream(adaptor,"rule term"); 536 537 try { 538 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:62:2: ( term DEREF propertyChain -> ^( DEREF term propertyChain ) | term SAFEDEREF propertyChain -> ^( SAFEDEREF term propertyChain ) | term ) 539 int alt2=3; 540 int LA2_0 = input.LA(1); 541 if ( (LA2_0==IDENTIFIER) ) { 542 int LA2_1 = input.LA(2); 543 if ( (synpred12_PropertyExpressionParser()) ) { 544 alt2=1; 545 } 546 else if ( (synpred13_PropertyExpressionParser()) ) { 547 alt2=2; 548 } 549 else if ( (true) ) { 550 alt2=3; 551 } 552 553 } 554 555 else { 556 if (state.backtracking>0) {state.failed=true; return retval;} 557 NoViableAltException nvae = 558 new NoViableAltException("", 2, 0, input); 559 throw nvae; 560 } 561 562 switch (alt2) { 563 case 1 : 564 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:62:4: term DEREF propertyChain 565 { 566 pushFollow(FOLLOW_term_in_propertyChain222); 567 term12=term(); 568 state._fsp--; 569 if (state.failed) return retval; 570 if ( state.backtracking==0 ) stream_term.add(term12.getTree()); 571 DEREF13=(Token)match(input,DEREF,FOLLOW_DEREF_in_propertyChain224); if (state.failed) return retval; 572 if ( state.backtracking==0 ) stream_DEREF.add(DEREF13); 573 574 pushFollow(FOLLOW_propertyChain_in_propertyChain226); 575 propertyChain14=propertyChain(); 576 state._fsp--; 577 if (state.failed) return retval; 578 if ( state.backtracking==0 ) stream_propertyChain.add(propertyChain14.getTree()); 579 // AST REWRITE 580 // elements: DEREF, propertyChain, term 581 // token labels: 582 // rule labels: retval 583 // token list labels: 584 // rule list labels: 585 // wildcard labels: 586 if ( state.backtracking==0 ) { 587 retval.tree = root_0; 588 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 589 590 root_0 = (CommonTree)adaptor.nil(); 591 // 62:29: -> ^( DEREF term propertyChain ) 592 { 593 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:62:32: ^( DEREF term propertyChain ) 594 { 595 CommonTree root_1 = (CommonTree)adaptor.nil(); 596 root_1 = (CommonTree)adaptor.becomeRoot(stream_DEREF.nextNode(), root_1); 597 adaptor.addChild(root_1, stream_term.nextTree()); 598 adaptor.addChild(root_1, stream_propertyChain.nextTree()); 599 adaptor.addChild(root_0, root_1); 600 } 601 602 } 603 604 605 retval.tree = root_0; 606 } 607 608 } 609 break; 610 case 2 : 611 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:63:4: term SAFEDEREF propertyChain 612 { 613 pushFollow(FOLLOW_term_in_propertyChain241); 614 term15=term(); 615 state._fsp--; 616 if (state.failed) return retval; 617 if ( state.backtracking==0 ) stream_term.add(term15.getTree()); 618 SAFEDEREF16=(Token)match(input,SAFEDEREF,FOLLOW_SAFEDEREF_in_propertyChain243); if (state.failed) return retval; 619 if ( state.backtracking==0 ) stream_SAFEDEREF.add(SAFEDEREF16); 620 621 pushFollow(FOLLOW_propertyChain_in_propertyChain245); 622 propertyChain17=propertyChain(); 623 state._fsp--; 624 if (state.failed) return retval; 625 if ( state.backtracking==0 ) stream_propertyChain.add(propertyChain17.getTree()); 626 // AST REWRITE 627 // elements: SAFEDEREF, propertyChain, term 628 // token labels: 629 // rule labels: retval 630 // token list labels: 631 // rule list labels: 632 // wildcard labels: 633 if ( state.backtracking==0 ) { 634 retval.tree = root_0; 635 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 636 637 root_0 = (CommonTree)adaptor.nil(); 638 // 63:33: -> ^( SAFEDEREF term propertyChain ) 639 { 640 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:63:36: ^( SAFEDEREF term propertyChain ) 641 { 642 CommonTree root_1 = (CommonTree)adaptor.nil(); 643 root_1 = (CommonTree)adaptor.becomeRoot(stream_SAFEDEREF.nextNode(), root_1); 644 adaptor.addChild(root_1, stream_term.nextTree()); 645 adaptor.addChild(root_1, stream_propertyChain.nextTree()); 646 adaptor.addChild(root_0, root_1); 647 } 648 649 } 650 651 652 retval.tree = root_0; 653 } 654 655 } 656 break; 657 case 3 : 658 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:64:4: term 659 { 660 root_0 = (CommonTree)adaptor.nil(); 661 662 663 pushFollow(FOLLOW_term_in_propertyChain260); 664 term18=term(); 665 state._fsp--; 666 if (state.failed) return retval; 667 if ( state.backtracking==0 ) adaptor.addChild(root_0, term18.getTree()); 668 669 } 670 break; 671 672 } 673 retval.stop = input.LT(-1); 674 675 if ( state.backtracking==0 ) { 676 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 677 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 678 } 679 } 680 catch (RecognitionException re) { 681 reportError(re); 682 recover(input,re); 683 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 684 } 685 finally { 686 // do for sure before leaving 687 } 688 return retval; 689 } 690 // $ANTLR end "propertyChain" 691 692 693 public static class term_return extends ParserRuleReturnScope { 694 CommonTree tree; 695 @Override 696 public CommonTree getTree() { return tree; } 697 }; 698 699 700 // $ANTLR start "term" 701 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:67:1: term : ( IDENTIFIER | methodInvocation ); 702 public final PropertyExpressionParser.term_return term() throws RecognitionException { 703 PropertyExpressionParser.term_return retval = new PropertyExpressionParser.term_return(); 704 retval.start = input.LT(1); 705 706 CommonTree root_0 = null; 707 708 Token IDENTIFIER19=null; 709 ParserRuleReturnScope methodInvocation20 =null; 710 711 CommonTree IDENTIFIER19_tree=null; 712 713 try { 714 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:67:6: ( IDENTIFIER | methodInvocation ) 715 int alt3=2; 716 int LA3_0 = input.LA(1); 717 if ( (LA3_0==IDENTIFIER) ) { 718 int LA3_1 = input.LA(2); 719 if ( (LA3_1==LPAREN) ) { 720 alt3=2; 721 } 722 else if ( (LA3_1==EOF||(LA3_1 >= COLON && LA3_1 <= COMMA)||LA3_1==DEREF||(LA3_1 >= RANGEOP && LA3_1 <= RPAREN)||LA3_1==SAFEDEREF) ) { 723 alt3=1; 724 } 725 726 else { 727 if (state.backtracking>0) {state.failed=true; return retval;} 728 int nvaeMark = input.mark(); 729 try { 730 input.consume(); 731 NoViableAltException nvae = 732 new NoViableAltException("", 3, 1, input); 733 throw nvae; 734 } finally { 735 input.rewind(nvaeMark); 736 } 737 } 738 739 } 740 741 else { 742 if (state.backtracking>0) {state.failed=true; return retval;} 743 NoViableAltException nvae = 744 new NoViableAltException("", 3, 0, input); 745 throw nvae; 746 } 747 748 switch (alt3) { 749 case 1 : 750 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:67:8: IDENTIFIER 751 { 752 root_0 = (CommonTree)adaptor.nil(); 753 754 755 IDENTIFIER19=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_term272); if (state.failed) return retval; 756 if ( state.backtracking==0 ) { 757 IDENTIFIER19_tree = (CommonTree)adaptor.create(IDENTIFIER19); 758 adaptor.addChild(root_0, IDENTIFIER19_tree); 759 } 760 761 } 762 break; 763 case 2 : 764 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:68:4: methodInvocation 765 { 766 root_0 = (CommonTree)adaptor.nil(); 767 768 769 pushFollow(FOLLOW_methodInvocation_in_term277); 770 methodInvocation20=methodInvocation(); 771 state._fsp--; 772 if (state.failed) return retval; 773 if ( state.backtracking==0 ) adaptor.addChild(root_0, methodInvocation20.getTree()); 774 775 } 776 break; 777 778 } 779 retval.stop = input.LT(-1); 780 781 if ( state.backtracking==0 ) { 782 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 783 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 784 } 785 } 786 catch (RecognitionException re) { 787 reportError(re); 788 recover(input,re); 789 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 790 } 791 finally { 792 // do for sure before leaving 793 } 794 return retval; 795 } 796 // $ANTLR end "term" 797 798 799 public static class methodInvocation_return extends ParserRuleReturnScope { 800 CommonTree tree; 801 @Override 802 public CommonTree getTree() { return tree; } 803 }; 804 805 806 // $ANTLR start "methodInvocation" 807 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:71:1: methodInvocation : (id= IDENTIFIER LPAREN RPAREN -> ^( INVOKE $id) |id= IDENTIFIER LPAREN expressionList RPAREN -> ^( INVOKE $id expressionList ) ); 808 public final PropertyExpressionParser.methodInvocation_return methodInvocation() throws RecognitionException { 809 PropertyExpressionParser.methodInvocation_return retval = new PropertyExpressionParser.methodInvocation_return(); 810 retval.start = input.LT(1); 811 812 CommonTree root_0 = null; 813 814 Token id=null; 815 Token LPAREN21=null; 816 Token RPAREN22=null; 817 Token LPAREN23=null; 818 Token RPAREN25=null; 819 ParserRuleReturnScope expressionList24 =null; 820 821 CommonTree id_tree=null; 822 CommonTree LPAREN21_tree=null; 823 CommonTree RPAREN22_tree=null; 824 CommonTree LPAREN23_tree=null; 825 CommonTree RPAREN25_tree=null; 826 RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN"); 827 RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER"); 828 RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN"); 829 RewriteRuleSubtreeStream stream_expressionList=new RewriteRuleSubtreeStream(adaptor,"rule expressionList"); 830 831 try { 832 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:72:2: (id= IDENTIFIER LPAREN RPAREN -> ^( INVOKE $id) |id= IDENTIFIER LPAREN expressionList RPAREN -> ^( INVOKE $id expressionList ) ) 833 int alt4=2; 834 int LA4_0 = input.LA(1); 835 if ( (LA4_0==IDENTIFIER) ) { 836 int LA4_1 = input.LA(2); 837 if ( (LA4_1==LPAREN) ) { 838 int LA4_2 = input.LA(3); 839 if ( (LA4_2==RPAREN) ) { 840 alt4=1; 841 } 842 else if ( (LA4_2==BANG||LA4_2==DECIMAL||LA4_2==FALSE||(LA4_2 >= IDENTIFIER && LA4_2 <= INTEGER)||(LA4_2 >= LBRACE && LA4_2 <= LBRACKET)||LA4_2==NULL||LA4_2==STRING||(LA4_2 >= THIS && LA4_2 <= TRUE)) ) { 843 alt4=2; 844 } 845 846 else { 847 if (state.backtracking>0) {state.failed=true; return retval;} 848 int nvaeMark = input.mark(); 849 try { 850 for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) { 851 input.consume(); 852 } 853 NoViableAltException nvae = 854 new NoViableAltException("", 4, 2, input); 855 throw nvae; 856 } finally { 857 input.rewind(nvaeMark); 858 } 859 } 860 861 } 862 863 else { 864 if (state.backtracking>0) {state.failed=true; return retval;} 865 int nvaeMark = input.mark(); 866 try { 867 input.consume(); 868 NoViableAltException nvae = 869 new NoViableAltException("", 4, 1, input); 870 throw nvae; 871 } finally { 872 input.rewind(nvaeMark); 873 } 874 } 875 876 } 877 878 else { 879 if (state.backtracking>0) {state.failed=true; return retval;} 880 NoViableAltException nvae = 881 new NoViableAltException("", 4, 0, input); 882 throw nvae; 883 } 884 885 switch (alt4) { 886 case 1 : 887 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:72:4: id= IDENTIFIER LPAREN RPAREN 888 { 889 id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_methodInvocation291); if (state.failed) return retval; 890 if ( state.backtracking==0 ) stream_IDENTIFIER.add(id); 891 892 LPAREN21=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_methodInvocation293); if (state.failed) return retval; 893 if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN21); 894 895 RPAREN22=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_methodInvocation295); if (state.failed) return retval; 896 if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN22); 897 898 // AST REWRITE 899 // elements: id 900 // token labels: id 901 // rule labels: retval 902 // token list labels: 903 // rule list labels: 904 // wildcard labels: 905 if ( state.backtracking==0 ) { 906 retval.tree = root_0; 907 RewriteRuleTokenStream stream_id=new RewriteRuleTokenStream(adaptor,"token id",id); 908 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 909 910 root_0 = (CommonTree)adaptor.nil(); 911 // 72:32: -> ^( INVOKE $id) 912 { 913 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:72:35: ^( INVOKE $id) 914 { 915 CommonTree root_1 = (CommonTree)adaptor.nil(); 916 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(INVOKE, "INVOKE"), root_1); 917 adaptor.addChild(root_1, stream_id.nextNode()); 918 adaptor.addChild(root_0, root_1); 919 } 920 921 } 922 923 924 retval.tree = root_0; 925 } 926 927 } 928 break; 929 case 2 : 930 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:73:4: id= IDENTIFIER LPAREN expressionList RPAREN 931 { 932 id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_methodInvocation311); if (state.failed) return retval; 933 if ( state.backtracking==0 ) stream_IDENTIFIER.add(id); 934 935 LPAREN23=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_methodInvocation313); if (state.failed) return retval; 936 if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN23); 937 938 pushFollow(FOLLOW_expressionList_in_methodInvocation315); 939 expressionList24=expressionList(); 940 state._fsp--; 941 if (state.failed) return retval; 942 if ( state.backtracking==0 ) stream_expressionList.add(expressionList24.getTree()); 943 RPAREN25=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_methodInvocation317); if (state.failed) return retval; 944 if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN25); 945 946 // AST REWRITE 947 // elements: id, expressionList 948 // token labels: id 949 // rule labels: retval 950 // token list labels: 951 // rule list labels: 952 // wildcard labels: 953 if ( state.backtracking==0 ) { 954 retval.tree = root_0; 955 RewriteRuleTokenStream stream_id=new RewriteRuleTokenStream(adaptor,"token id",id); 956 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 957 958 root_0 = (CommonTree)adaptor.nil(); 959 // 73:47: -> ^( INVOKE $id expressionList ) 960 { 961 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:73:50: ^( INVOKE $id expressionList ) 962 { 963 CommonTree root_1 = (CommonTree)adaptor.nil(); 964 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(INVOKE, "INVOKE"), root_1); 965 adaptor.addChild(root_1, stream_id.nextNode()); 966 adaptor.addChild(root_1, stream_expressionList.nextTree()); 967 adaptor.addChild(root_0, root_1); 968 } 969 970 } 971 972 973 retval.tree = root_0; 974 } 975 976 } 977 break; 978 979 } 980 retval.stop = input.LT(-1); 981 982 if ( state.backtracking==0 ) { 983 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 984 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 985 } 986 } 987 catch (RecognitionException re) { 988 reportError(re); 989 recover(input,re); 990 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 991 } 992 finally { 993 // do for sure before leaving 994 } 995 return retval; 996 } 997 // $ANTLR end "methodInvocation" 998 999 1000 public static class expressionList_return extends ParserRuleReturnScope { 1001 CommonTree tree; 1002 @Override 1003 public CommonTree getTree() { return tree; } 1004 }; 1005 1006 1007 // $ANTLR start "expressionList" 1008 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:76:1: expressionList : expression ( COMMA ! expression )* ; 1009 public final PropertyExpressionParser.expressionList_return expressionList() throws RecognitionException { 1010 PropertyExpressionParser.expressionList_return retval = new PropertyExpressionParser.expressionList_return(); 1011 retval.start = input.LT(1); 1012 1013 CommonTree root_0 = null; 1014 1015 Token COMMA27=null; 1016 ParserRuleReturnScope expression26 =null; 1017 ParserRuleReturnScope expression28 =null; 1018 1019 CommonTree COMMA27_tree=null; 1020 1021 try { 1022 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:77:2: ( expression ( COMMA ! expression )* ) 1023 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:77:4: expression ( COMMA ! expression )* 1024 { 1025 root_0 = (CommonTree)adaptor.nil(); 1026 1027 1028 pushFollow(FOLLOW_expression_in_expressionList341); 1029 expression26=expression(); 1030 state._fsp--; 1031 if (state.failed) return retval; 1032 if ( state.backtracking==0 ) adaptor.addChild(root_0, expression26.getTree()); 1033 1034 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:77:15: ( COMMA ! expression )* 1035 loop5: 1036 while (true) { 1037 int alt5=2; 1038 int LA5_0 = input.LA(1); 1039 if ( (LA5_0==COMMA) ) { 1040 alt5=1; 1041 } 1042 1043 switch (alt5) { 1044 case 1 : 1045 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:77:16: COMMA ! expression 1046 { 1047 COMMA27=(Token)match(input,COMMA,FOLLOW_COMMA_in_expressionList344); if (state.failed) return retval; 1048 pushFollow(FOLLOW_expression_in_expressionList347); 1049 expression28=expression(); 1050 state._fsp--; 1051 if (state.failed) return retval; 1052 if ( state.backtracking==0 ) adaptor.addChild(root_0, expression28.getTree()); 1053 1054 } 1055 break; 1056 1057 default : 1058 break loop5; 1059 } 1060 } 1061 1062 } 1063 1064 retval.stop = input.LT(-1); 1065 1066 if ( state.backtracking==0 ) { 1067 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1068 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1069 } 1070 } 1071 catch (RecognitionException re) { 1072 reportError(re); 1073 recover(input,re); 1074 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1075 } 1076 finally { 1077 // do for sure before leaving 1078 } 1079 return retval; 1080 } 1081 // $ANTLR end "expressionList" 1082 1083 1084 public static class rangeOp_return extends ParserRuleReturnScope { 1085 CommonTree tree; 1086 @Override 1087 public CommonTree getTree() { return tree; } 1088 }; 1089 1090 1091 // $ANTLR start "rangeOp" 1092 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:80:1: rangeOp : from= rangeopArg RANGEOP to= rangeopArg -> ^( RANGEOP $from $to) ; 1093 public final PropertyExpressionParser.rangeOp_return rangeOp() throws RecognitionException { 1094 PropertyExpressionParser.rangeOp_return retval = new PropertyExpressionParser.rangeOp_return(); 1095 retval.start = input.LT(1); 1096 1097 CommonTree root_0 = null; 1098 1099 Token RANGEOP29=null; 1100 ParserRuleReturnScope from =null; 1101 ParserRuleReturnScope to =null; 1102 1103 CommonTree RANGEOP29_tree=null; 1104 RewriteRuleTokenStream stream_RANGEOP=new RewriteRuleTokenStream(adaptor,"token RANGEOP"); 1105 RewriteRuleSubtreeStream stream_rangeopArg=new RewriteRuleSubtreeStream(adaptor,"rule rangeopArg"); 1106 1107 try { 1108 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:81:2: (from= rangeopArg RANGEOP to= rangeopArg -> ^( RANGEOP $from $to) ) 1109 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:81:4: from= rangeopArg RANGEOP to= rangeopArg 1110 { 1111 pushFollow(FOLLOW_rangeopArg_in_rangeOp363); 1112 from=rangeopArg(); 1113 state._fsp--; 1114 if (state.failed) return retval; 1115 if ( state.backtracking==0 ) stream_rangeopArg.add(from.getTree()); 1116 RANGEOP29=(Token)match(input,RANGEOP,FOLLOW_RANGEOP_in_rangeOp366); if (state.failed) return retval; 1117 if ( state.backtracking==0 ) stream_RANGEOP.add(RANGEOP29); 1118 1119 pushFollow(FOLLOW_rangeopArg_in_rangeOp370); 1120 to=rangeopArg(); 1121 state._fsp--; 1122 if (state.failed) return retval; 1123 if ( state.backtracking==0 ) stream_rangeopArg.add(to.getTree()); 1124 // AST REWRITE 1125 // elements: RANGEOP, from, to 1126 // token labels: 1127 // rule labels: from, to, retval 1128 // token list labels: 1129 // rule list labels: 1130 // wildcard labels: 1131 if ( state.backtracking==0 ) { 1132 retval.tree = root_0; 1133 RewriteRuleSubtreeStream stream_from=new RewriteRuleSubtreeStream(adaptor,"rule from",from!=null?from.getTree():null); 1134 RewriteRuleSubtreeStream stream_to=new RewriteRuleSubtreeStream(adaptor,"rule to",to!=null?to.getTree():null); 1135 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 1136 1137 root_0 = (CommonTree)adaptor.nil(); 1138 // 81:43: -> ^( RANGEOP $from $to) 1139 { 1140 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:81:46: ^( RANGEOP $from $to) 1141 { 1142 CommonTree root_1 = (CommonTree)adaptor.nil(); 1143 root_1 = (CommonTree)adaptor.becomeRoot(stream_RANGEOP.nextNode(), root_1); 1144 adaptor.addChild(root_1, stream_from.nextTree()); 1145 adaptor.addChild(root_1, stream_to.nextTree()); 1146 adaptor.addChild(root_0, root_1); 1147 } 1148 1149 } 1150 1151 1152 retval.tree = root_0; 1153 } 1154 1155 } 1156 1157 retval.stop = input.LT(-1); 1158 1159 if ( state.backtracking==0 ) { 1160 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1161 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1162 } 1163 } 1164 catch (RecognitionException re) { 1165 reportError(re); 1166 recover(input,re); 1167 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1168 } 1169 finally { 1170 // do for sure before leaving 1171 } 1172 return retval; 1173 } 1174 // $ANTLR end "rangeOp" 1175 1176 1177 public static class rangeopArg_return extends ParserRuleReturnScope { 1178 CommonTree tree; 1179 @Override 1180 public CommonTree getTree() { return tree; } 1181 }; 1182 1183 1184 // $ANTLR start "rangeopArg" 1185 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:84:1: rangeopArg : ( INTEGER | propertyChain ); 1186 public final PropertyExpressionParser.rangeopArg_return rangeopArg() throws RecognitionException { 1187 PropertyExpressionParser.rangeopArg_return retval = new PropertyExpressionParser.rangeopArg_return(); 1188 retval.start = input.LT(1); 1189 1190 CommonTree root_0 = null; 1191 1192 Token INTEGER30=null; 1193 ParserRuleReturnScope propertyChain31 =null; 1194 1195 CommonTree INTEGER30_tree=null; 1196 1197 try { 1198 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:85:2: ( INTEGER | propertyChain ) 1199 int alt6=2; 1200 int LA6_0 = input.LA(1); 1201 if ( (LA6_0==INTEGER) ) { 1202 alt6=1; 1203 } 1204 else if ( (LA6_0==IDENTIFIER) ) { 1205 alt6=2; 1206 } 1207 1208 else { 1209 if (state.backtracking>0) {state.failed=true; return retval;} 1210 NoViableAltException nvae = 1211 new NoViableAltException("", 6, 0, input); 1212 throw nvae; 1213 } 1214 1215 switch (alt6) { 1216 case 1 : 1217 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:85:4: INTEGER 1218 { 1219 root_0 = (CommonTree)adaptor.nil(); 1220 1221 1222 INTEGER30=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_rangeopArg396); if (state.failed) return retval; 1223 if ( state.backtracking==0 ) { 1224 INTEGER30_tree = (CommonTree)adaptor.create(INTEGER30); 1225 adaptor.addChild(root_0, INTEGER30_tree); 1226 } 1227 1228 } 1229 break; 1230 case 2 : 1231 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:86:4: propertyChain 1232 { 1233 root_0 = (CommonTree)adaptor.nil(); 1234 1235 1236 pushFollow(FOLLOW_propertyChain_in_rangeopArg401); 1237 propertyChain31=propertyChain(); 1238 state._fsp--; 1239 if (state.failed) return retval; 1240 if ( state.backtracking==0 ) adaptor.addChild(root_0, propertyChain31.getTree()); 1241 1242 } 1243 break; 1244 1245 } 1246 retval.stop = input.LT(-1); 1247 1248 if ( state.backtracking==0 ) { 1249 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1250 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1251 } 1252 } 1253 catch (RecognitionException re) { 1254 reportError(re); 1255 recover(input,re); 1256 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1257 } 1258 finally { 1259 // do for sure before leaving 1260 } 1261 return retval; 1262 } 1263 // $ANTLR end "rangeopArg" 1264 1265 1266 public static class list_return extends ParserRuleReturnScope { 1267 CommonTree tree; 1268 @Override 1269 public CommonTree getTree() { return tree; } 1270 }; 1271 1272 1273 // $ANTLR start "list" 1274 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:89:1: list : ( LBRACKET RBRACKET -> ^( LIST ) | LBRACKET expressionList RBRACKET -> ^( LIST expressionList ) ); 1275 public final PropertyExpressionParser.list_return list() throws RecognitionException { 1276 PropertyExpressionParser.list_return retval = new PropertyExpressionParser.list_return(); 1277 retval.start = input.LT(1); 1278 1279 CommonTree root_0 = null; 1280 1281 Token LBRACKET32=null; 1282 Token RBRACKET33=null; 1283 Token LBRACKET34=null; 1284 Token RBRACKET36=null; 1285 ParserRuleReturnScope expressionList35 =null; 1286 1287 CommonTree LBRACKET32_tree=null; 1288 CommonTree RBRACKET33_tree=null; 1289 CommonTree LBRACKET34_tree=null; 1290 CommonTree RBRACKET36_tree=null; 1291 RewriteRuleTokenStream stream_LBRACKET=new RewriteRuleTokenStream(adaptor,"token LBRACKET"); 1292 RewriteRuleTokenStream stream_RBRACKET=new RewriteRuleTokenStream(adaptor,"token RBRACKET"); 1293 RewriteRuleSubtreeStream stream_expressionList=new RewriteRuleSubtreeStream(adaptor,"rule expressionList"); 1294 1295 try { 1296 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:89:6: ( LBRACKET RBRACKET -> ^( LIST ) | LBRACKET expressionList RBRACKET -> ^( LIST expressionList ) ) 1297 int alt7=2; 1298 int LA7_0 = input.LA(1); 1299 if ( (LA7_0==LBRACKET) ) { 1300 int LA7_1 = input.LA(2); 1301 if ( (LA7_1==RBRACKET) ) { 1302 alt7=1; 1303 } 1304 else if ( (LA7_1==BANG||LA7_1==DECIMAL||LA7_1==FALSE||(LA7_1 >= IDENTIFIER && LA7_1 <= INTEGER)||(LA7_1 >= LBRACE && LA7_1 <= LBRACKET)||LA7_1==NULL||LA7_1==STRING||(LA7_1 >= THIS && LA7_1 <= TRUE)) ) { 1305 alt7=2; 1306 } 1307 1308 else { 1309 if (state.backtracking>0) {state.failed=true; return retval;} 1310 int nvaeMark = input.mark(); 1311 try { 1312 input.consume(); 1313 NoViableAltException nvae = 1314 new NoViableAltException("", 7, 1, input); 1315 throw nvae; 1316 } finally { 1317 input.rewind(nvaeMark); 1318 } 1319 } 1320 1321 } 1322 1323 else { 1324 if (state.backtracking>0) {state.failed=true; return retval;} 1325 NoViableAltException nvae = 1326 new NoViableAltException("", 7, 0, input); 1327 throw nvae; 1328 } 1329 1330 switch (alt7) { 1331 case 1 : 1332 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:89:8: LBRACKET RBRACKET 1333 { 1334 LBRACKET32=(Token)match(input,LBRACKET,FOLLOW_LBRACKET_in_list413); if (state.failed) return retval; 1335 if ( state.backtracking==0 ) stream_LBRACKET.add(LBRACKET32); 1336 1337 RBRACKET33=(Token)match(input,RBRACKET,FOLLOW_RBRACKET_in_list415); if (state.failed) return retval; 1338 if ( state.backtracking==0 ) stream_RBRACKET.add(RBRACKET33); 1339 1340 // AST REWRITE 1341 // elements: 1342 // token labels: 1343 // rule labels: retval 1344 // token list labels: 1345 // rule list labels: 1346 // wildcard labels: 1347 if ( state.backtracking==0 ) { 1348 retval.tree = root_0; 1349 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 1350 1351 root_0 = (CommonTree)adaptor.nil(); 1352 // 89:26: -> ^( LIST ) 1353 { 1354 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:89:29: ^( LIST ) 1355 { 1356 CommonTree root_1 = (CommonTree)adaptor.nil(); 1357 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(LIST, "LIST"), root_1); 1358 adaptor.addChild(root_0, root_1); 1359 } 1360 1361 } 1362 1363 1364 retval.tree = root_0; 1365 } 1366 1367 } 1368 break; 1369 case 2 : 1370 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:90:4: LBRACKET expressionList RBRACKET 1371 { 1372 LBRACKET34=(Token)match(input,LBRACKET,FOLLOW_LBRACKET_in_list426); if (state.failed) return retval; 1373 if ( state.backtracking==0 ) stream_LBRACKET.add(LBRACKET34); 1374 1375 pushFollow(FOLLOW_expressionList_in_list428); 1376 expressionList35=expressionList(); 1377 state._fsp--; 1378 if (state.failed) return retval; 1379 if ( state.backtracking==0 ) stream_expressionList.add(expressionList35.getTree()); 1380 RBRACKET36=(Token)match(input,RBRACKET,FOLLOW_RBRACKET_in_list430); if (state.failed) return retval; 1381 if ( state.backtracking==0 ) stream_RBRACKET.add(RBRACKET36); 1382 1383 // AST REWRITE 1384 // elements: expressionList 1385 // token labels: 1386 // rule labels: retval 1387 // token list labels: 1388 // rule list labels: 1389 // wildcard labels: 1390 if ( state.backtracking==0 ) { 1391 retval.tree = root_0; 1392 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 1393 1394 root_0 = (CommonTree)adaptor.nil(); 1395 // 90:37: -> ^( LIST expressionList ) 1396 { 1397 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:90:40: ^( LIST expressionList ) 1398 { 1399 CommonTree root_1 = (CommonTree)adaptor.nil(); 1400 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(LIST, "LIST"), root_1); 1401 adaptor.addChild(root_1, stream_expressionList.nextTree()); 1402 adaptor.addChild(root_0, root_1); 1403 } 1404 1405 } 1406 1407 1408 retval.tree = root_0; 1409 } 1410 1411 } 1412 break; 1413 1414 } 1415 retval.stop = input.LT(-1); 1416 1417 if ( state.backtracking==0 ) { 1418 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1419 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1420 } 1421 } 1422 catch (RecognitionException re) { 1423 reportError(re); 1424 recover(input,re); 1425 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1426 } 1427 finally { 1428 // do for sure before leaving 1429 } 1430 return retval; 1431 } 1432 // $ANTLR end "list" 1433 1434 1435 public static class notOp_return extends ParserRuleReturnScope { 1436 CommonTree tree; 1437 @Override 1438 public CommonTree getTree() { return tree; } 1439 }; 1440 1441 1442 // $ANTLR start "notOp" 1443 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:93:1: notOp : BANG expression -> ^( NOT expression ) ; 1444 public final PropertyExpressionParser.notOp_return notOp() throws RecognitionException { 1445 PropertyExpressionParser.notOp_return retval = new PropertyExpressionParser.notOp_return(); 1446 retval.start = input.LT(1); 1447 1448 CommonTree root_0 = null; 1449 1450 Token BANG37=null; 1451 ParserRuleReturnScope expression38 =null; 1452 1453 CommonTree BANG37_tree=null; 1454 RewriteRuleTokenStream stream_BANG=new RewriteRuleTokenStream(adaptor,"token BANG"); 1455 RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression"); 1456 1457 try { 1458 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:93:8: ( BANG expression -> ^( NOT expression ) ) 1459 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:93:10: BANG expression 1460 { 1461 BANG37=(Token)match(input,BANG,FOLLOW_BANG_in_notOp451); if (state.failed) return retval; 1462 if ( state.backtracking==0 ) stream_BANG.add(BANG37); 1463 1464 pushFollow(FOLLOW_expression_in_notOp453); 1465 expression38=expression(); 1466 state._fsp--; 1467 if (state.failed) return retval; 1468 if ( state.backtracking==0 ) stream_expression.add(expression38.getTree()); 1469 // AST REWRITE 1470 // elements: expression 1471 // token labels: 1472 // rule labels: retval 1473 // token list labels: 1474 // rule list labels: 1475 // wildcard labels: 1476 if ( state.backtracking==0 ) { 1477 retval.tree = root_0; 1478 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 1479 1480 root_0 = (CommonTree)adaptor.nil(); 1481 // 93:26: -> ^( NOT expression ) 1482 { 1483 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:93:29: ^( NOT expression ) 1484 { 1485 CommonTree root_1 = (CommonTree)adaptor.nil(); 1486 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NOT, "NOT"), root_1); 1487 adaptor.addChild(root_1, stream_expression.nextTree()); 1488 adaptor.addChild(root_0, root_1); 1489 } 1490 1491 } 1492 1493 1494 retval.tree = root_0; 1495 } 1496 1497 } 1498 1499 retval.stop = input.LT(-1); 1500 1501 if ( state.backtracking==0 ) { 1502 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1503 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1504 } 1505 } 1506 catch (RecognitionException re) { 1507 reportError(re); 1508 recover(input,re); 1509 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1510 } 1511 finally { 1512 // do for sure before leaving 1513 } 1514 return retval; 1515 } 1516 // $ANTLR end "notOp" 1517 1518 1519 public static class map_return extends ParserRuleReturnScope { 1520 CommonTree tree; 1521 @Override 1522 public CommonTree getTree() { return tree; } 1523 }; 1524 1525 1526 // $ANTLR start "map" 1527 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:96:1: map : ( LBRACE RBRACE -> ^( MAP ) | LBRACE mapEntryList RBRACE -> ^( MAP mapEntryList ) ); 1528 public final PropertyExpressionParser.map_return map() throws RecognitionException { 1529 PropertyExpressionParser.map_return retval = new PropertyExpressionParser.map_return(); 1530 retval.start = input.LT(1); 1531 1532 CommonTree root_0 = null; 1533 1534 Token LBRACE39=null; 1535 Token RBRACE40=null; 1536 Token LBRACE41=null; 1537 Token RBRACE43=null; 1538 ParserRuleReturnScope mapEntryList42 =null; 1539 1540 CommonTree LBRACE39_tree=null; 1541 CommonTree RBRACE40_tree=null; 1542 CommonTree LBRACE41_tree=null; 1543 CommonTree RBRACE43_tree=null; 1544 RewriteRuleTokenStream stream_RBRACE=new RewriteRuleTokenStream(adaptor,"token RBRACE"); 1545 RewriteRuleTokenStream stream_LBRACE=new RewriteRuleTokenStream(adaptor,"token LBRACE"); 1546 RewriteRuleSubtreeStream stream_mapEntryList=new RewriteRuleSubtreeStream(adaptor,"rule mapEntryList"); 1547 1548 try { 1549 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:96:6: ( LBRACE RBRACE -> ^( MAP ) | LBRACE mapEntryList RBRACE -> ^( MAP mapEntryList ) ) 1550 int alt8=2; 1551 int LA8_0 = input.LA(1); 1552 if ( (LA8_0==LBRACE) ) { 1553 int LA8_1 = input.LA(2); 1554 if ( (LA8_1==RBRACE) ) { 1555 alt8=1; 1556 } 1557 else if ( (LA8_1==DECIMAL||LA8_1==FALSE||(LA8_1 >= IDENTIFIER && LA8_1 <= INTEGER)||LA8_1==NULL||LA8_1==STRING||(LA8_1 >= THIS && LA8_1 <= TRUE)) ) { 1558 alt8=2; 1559 } 1560 1561 else { 1562 if (state.backtracking>0) {state.failed=true; return retval;} 1563 int nvaeMark = input.mark(); 1564 try { 1565 input.consume(); 1566 NoViableAltException nvae = 1567 new NoViableAltException("", 8, 1, input); 1568 throw nvae; 1569 } finally { 1570 input.rewind(nvaeMark); 1571 } 1572 } 1573 1574 } 1575 1576 else { 1577 if (state.backtracking>0) {state.failed=true; return retval;} 1578 NoViableAltException nvae = 1579 new NoViableAltException("", 8, 0, input); 1580 throw nvae; 1581 } 1582 1583 switch (alt8) { 1584 case 1 : 1585 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:96:8: LBRACE RBRACE 1586 { 1587 LBRACE39=(Token)match(input,LBRACE,FOLLOW_LBRACE_in_map472); if (state.failed) return retval; 1588 if ( state.backtracking==0 ) stream_LBRACE.add(LBRACE39); 1589 1590 RBRACE40=(Token)match(input,RBRACE,FOLLOW_RBRACE_in_map474); if (state.failed) return retval; 1591 if ( state.backtracking==0 ) stream_RBRACE.add(RBRACE40); 1592 1593 // AST REWRITE 1594 // elements: 1595 // token labels: 1596 // rule labels: retval 1597 // token list labels: 1598 // rule list labels: 1599 // wildcard labels: 1600 if ( state.backtracking==0 ) { 1601 retval.tree = root_0; 1602 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 1603 1604 root_0 = (CommonTree)adaptor.nil(); 1605 // 96:22: -> ^( MAP ) 1606 { 1607 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:96:25: ^( MAP ) 1608 { 1609 CommonTree root_1 = (CommonTree)adaptor.nil(); 1610 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(MAP, "MAP"), root_1); 1611 adaptor.addChild(root_0, root_1); 1612 } 1613 1614 } 1615 1616 1617 retval.tree = root_0; 1618 } 1619 1620 } 1621 break; 1622 case 2 : 1623 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:97:4: LBRACE mapEntryList RBRACE 1624 { 1625 LBRACE41=(Token)match(input,LBRACE,FOLLOW_LBRACE_in_map485); if (state.failed) return retval; 1626 if ( state.backtracking==0 ) stream_LBRACE.add(LBRACE41); 1627 1628 pushFollow(FOLLOW_mapEntryList_in_map487); 1629 mapEntryList42=mapEntryList(); 1630 state._fsp--; 1631 if (state.failed) return retval; 1632 if ( state.backtracking==0 ) stream_mapEntryList.add(mapEntryList42.getTree()); 1633 RBRACE43=(Token)match(input,RBRACE,FOLLOW_RBRACE_in_map489); if (state.failed) return retval; 1634 if ( state.backtracking==0 ) stream_RBRACE.add(RBRACE43); 1635 1636 // AST REWRITE 1637 // elements: mapEntryList 1638 // token labels: 1639 // rule labels: retval 1640 // token list labels: 1641 // rule list labels: 1642 // wildcard labels: 1643 if ( state.backtracking==0 ) { 1644 retval.tree = root_0; 1645 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null); 1646 1647 root_0 = (CommonTree)adaptor.nil(); 1648 // 97:31: -> ^( MAP mapEntryList ) 1649 { 1650 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:97:34: ^( MAP mapEntryList ) 1651 { 1652 CommonTree root_1 = (CommonTree)adaptor.nil(); 1653 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(MAP, "MAP"), root_1); 1654 adaptor.addChild(root_1, stream_mapEntryList.nextTree()); 1655 adaptor.addChild(root_0, root_1); 1656 } 1657 1658 } 1659 1660 1661 retval.tree = root_0; 1662 } 1663 1664 } 1665 break; 1666 1667 } 1668 retval.stop = input.LT(-1); 1669 1670 if ( state.backtracking==0 ) { 1671 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1672 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1673 } 1674 } 1675 catch (RecognitionException re) { 1676 reportError(re); 1677 recover(input,re); 1678 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1679 } 1680 finally { 1681 // do for sure before leaving 1682 } 1683 return retval; 1684 } 1685 // $ANTLR end "map" 1686 1687 1688 public static class mapEntryList_return extends ParserRuleReturnScope { 1689 CommonTree tree; 1690 @Override 1691 public CommonTree getTree() { return tree; } 1692 }; 1693 1694 1695 // $ANTLR start "mapEntryList" 1696 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:100:1: mapEntryList : mapEntry ( COMMA ! mapEntry )* ; 1697 public final PropertyExpressionParser.mapEntryList_return mapEntryList() throws RecognitionException { 1698 PropertyExpressionParser.mapEntryList_return retval = new PropertyExpressionParser.mapEntryList_return(); 1699 retval.start = input.LT(1); 1700 1701 CommonTree root_0 = null; 1702 1703 Token COMMA45=null; 1704 ParserRuleReturnScope mapEntry44 =null; 1705 ParserRuleReturnScope mapEntry46 =null; 1706 1707 CommonTree COMMA45_tree=null; 1708 1709 try { 1710 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:100:14: ( mapEntry ( COMMA ! mapEntry )* ) 1711 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:100:16: mapEntry ( COMMA ! mapEntry )* 1712 { 1713 root_0 = (CommonTree)adaptor.nil(); 1714 1715 1716 pushFollow(FOLLOW_mapEntry_in_mapEntryList511); 1717 mapEntry44=mapEntry(); 1718 state._fsp--; 1719 if (state.failed) return retval; 1720 if ( state.backtracking==0 ) adaptor.addChild(root_0, mapEntry44.getTree()); 1721 1722 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:100:25: ( COMMA ! mapEntry )* 1723 loop9: 1724 while (true) { 1725 int alt9=2; 1726 int LA9_0 = input.LA(1); 1727 if ( (LA9_0==COMMA) ) { 1728 alt9=1; 1729 } 1730 1731 switch (alt9) { 1732 case 1 : 1733 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:100:26: COMMA ! mapEntry 1734 { 1735 COMMA45=(Token)match(input,COMMA,FOLLOW_COMMA_in_mapEntryList514); if (state.failed) return retval; 1736 pushFollow(FOLLOW_mapEntry_in_mapEntryList517); 1737 mapEntry46=mapEntry(); 1738 state._fsp--; 1739 if (state.failed) return retval; 1740 if ( state.backtracking==0 ) adaptor.addChild(root_0, mapEntry46.getTree()); 1741 1742 } 1743 break; 1744 1745 default : 1746 break loop9; 1747 } 1748 } 1749 1750 } 1751 1752 retval.stop = input.LT(-1); 1753 1754 if ( state.backtracking==0 ) { 1755 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1756 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1757 } 1758 } 1759 catch (RecognitionException re) { 1760 reportError(re); 1761 recover(input,re); 1762 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1763 } 1764 finally { 1765 // do for sure before leaving 1766 } 1767 return retval; 1768 } 1769 // $ANTLR end "mapEntryList" 1770 1771 1772 public static class mapEntry_return extends ParserRuleReturnScope { 1773 CommonTree tree; 1774 @Override 1775 public CommonTree getTree() { return tree; } 1776 }; 1777 1778 1779 // $ANTLR start "mapEntry" 1780 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:102:1: mapEntry : mapKey COLON ! expression ; 1781 public final PropertyExpressionParser.mapEntry_return mapEntry() throws RecognitionException { 1782 PropertyExpressionParser.mapEntry_return retval = new PropertyExpressionParser.mapEntry_return(); 1783 retval.start = input.LT(1); 1784 1785 CommonTree root_0 = null; 1786 1787 Token COLON48=null; 1788 ParserRuleReturnScope mapKey47 =null; 1789 ParserRuleReturnScope expression49 =null; 1790 1791 CommonTree COLON48_tree=null; 1792 1793 try { 1794 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:102:10: ( mapKey COLON ! expression ) 1795 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:102:13: mapKey COLON ! expression 1796 { 1797 root_0 = (CommonTree)adaptor.nil(); 1798 1799 1800 pushFollow(FOLLOW_mapKey_in_mapEntry528); 1801 mapKey47=mapKey(); 1802 state._fsp--; 1803 if (state.failed) return retval; 1804 if ( state.backtracking==0 ) adaptor.addChild(root_0, mapKey47.getTree()); 1805 1806 COLON48=(Token)match(input,COLON,FOLLOW_COLON_in_mapEntry530); if (state.failed) return retval; 1807 pushFollow(FOLLOW_expression_in_mapEntry533); 1808 expression49=expression(); 1809 state._fsp--; 1810 if (state.failed) return retval; 1811 if ( state.backtracking==0 ) adaptor.addChild(root_0, expression49.getTree()); 1812 1813 } 1814 1815 retval.stop = input.LT(-1); 1816 1817 if ( state.backtracking==0 ) { 1818 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1819 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1820 } 1821 } 1822 catch (RecognitionException re) { 1823 reportError(re); 1824 recover(input,re); 1825 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1826 } 1827 finally { 1828 // do for sure before leaving 1829 } 1830 return retval; 1831 } 1832 // $ANTLR end "mapEntry" 1833 1834 1835 public static class mapKey_return extends ParserRuleReturnScope { 1836 CommonTree tree; 1837 @Override 1838 public CommonTree getTree() { return tree; } 1839 }; 1840 1841 1842 // $ANTLR start "mapKey" 1843 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:104:1: mapKey : ( keyword | constant | propertyChain ); 1844 public final PropertyExpressionParser.mapKey_return mapKey() throws RecognitionException { 1845 PropertyExpressionParser.mapKey_return retval = new PropertyExpressionParser.mapKey_return(); 1846 retval.start = input.LT(1); 1847 1848 CommonTree root_0 = null; 1849 1850 ParserRuleReturnScope keyword50 =null; 1851 ParserRuleReturnScope constant51 =null; 1852 ParserRuleReturnScope propertyChain52 =null; 1853 1854 1855 try { 1856 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:104:8: ( keyword | constant | propertyChain ) 1857 int alt10=3; 1858 switch ( input.LA(1) ) { 1859 case FALSE: 1860 case NULL: 1861 case THIS: 1862 case TRUE: 1863 { 1864 alt10=1; 1865 } 1866 break; 1867 case DECIMAL: 1868 case INTEGER: 1869 case STRING: 1870 { 1871 alt10=2; 1872 } 1873 break; 1874 case IDENTIFIER: 1875 { 1876 alt10=3; 1877 } 1878 break; 1879 default: 1880 if (state.backtracking>0) {state.failed=true; return retval;} 1881 NoViableAltException nvae = 1882 new NoViableAltException("", 10, 0, input); 1883 throw nvae; 1884 } 1885 switch (alt10) { 1886 case 1 : 1887 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:104:10: keyword 1888 { 1889 root_0 = (CommonTree)adaptor.nil(); 1890 1891 1892 pushFollow(FOLLOW_keyword_in_mapKey542); 1893 keyword50=keyword(); 1894 state._fsp--; 1895 if (state.failed) return retval; 1896 if ( state.backtracking==0 ) adaptor.addChild(root_0, keyword50.getTree()); 1897 1898 } 1899 break; 1900 case 2 : 1901 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:104:20: constant 1902 { 1903 root_0 = (CommonTree)adaptor.nil(); 1904 1905 1906 pushFollow(FOLLOW_constant_in_mapKey546); 1907 constant51=constant(); 1908 state._fsp--; 1909 if (state.failed) return retval; 1910 if ( state.backtracking==0 ) adaptor.addChild(root_0, constant51.getTree()); 1911 1912 } 1913 break; 1914 case 3 : 1915 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:104:31: propertyChain 1916 { 1917 root_0 = (CommonTree)adaptor.nil(); 1918 1919 1920 pushFollow(FOLLOW_propertyChain_in_mapKey550); 1921 propertyChain52=propertyChain(); 1922 state._fsp--; 1923 if (state.failed) return retval; 1924 if ( state.backtracking==0 ) adaptor.addChild(root_0, propertyChain52.getTree()); 1925 1926 } 1927 break; 1928 1929 } 1930 retval.stop = input.LT(-1); 1931 1932 if ( state.backtracking==0 ) { 1933 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); 1934 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); 1935 } 1936 } 1937 catch (RecognitionException re) { 1938 reportError(re); 1939 recover(input,re); 1940 retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); 1941 } 1942 finally { 1943 // do for sure before leaving 1944 } 1945 return retval; 1946 } 1947 // $ANTLR end "mapKey" 1948 1949 // $ANTLR start synpred2_PropertyExpressionParser 1950 public final void synpred2_PropertyExpressionParser_fragment() throws RecognitionException { 1951 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:49:4: ( rangeOp ) 1952 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:49:4: rangeOp 1953 { 1954 pushFollow(FOLLOW_rangeOp_in_synpred2_PropertyExpressionParser150); 1955 rangeOp(); 1956 state._fsp--; 1957 if (state.failed) return; 1958 1959 } 1960 1961 } 1962 // $ANTLR end synpred2_PropertyExpressionParser 1963 1964 // $ANTLR start synpred3_PropertyExpressionParser 1965 public final void synpred3_PropertyExpressionParser_fragment() throws RecognitionException { 1966 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:50:4: ( constant ) 1967 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:50:4: constant 1968 { 1969 pushFollow(FOLLOW_constant_in_synpred3_PropertyExpressionParser155); 1970 constant(); 1971 state._fsp--; 1972 if (state.failed) return; 1973 1974 } 1975 1976 } 1977 // $ANTLR end synpred3_PropertyExpressionParser 1978 1979 // $ANTLR start synpred4_PropertyExpressionParser 1980 public final void synpred4_PropertyExpressionParser_fragment() throws RecognitionException { 1981 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:51:4: ( propertyChain ) 1982 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:51:4: propertyChain 1983 { 1984 pushFollow(FOLLOW_propertyChain_in_synpred4_PropertyExpressionParser160); 1985 propertyChain(); 1986 state._fsp--; 1987 if (state.failed) return; 1988 1989 } 1990 1991 } 1992 // $ANTLR end synpred4_PropertyExpressionParser 1993 1994 // $ANTLR start synpred12_PropertyExpressionParser 1995 public final void synpred12_PropertyExpressionParser_fragment() throws RecognitionException { 1996 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:62:4: ( term DEREF propertyChain ) 1997 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:62:4: term DEREF propertyChain 1998 { 1999 pushFollow(FOLLOW_term_in_synpred12_PropertyExpressionParser222); 2000 term(); 2001 state._fsp--; 2002 if (state.failed) return; 2003 2004 match(input,DEREF,FOLLOW_DEREF_in_synpred12_PropertyExpressionParser224); if (state.failed) return; 2005 2006 pushFollow(FOLLOW_propertyChain_in_synpred12_PropertyExpressionParser226); 2007 propertyChain(); 2008 state._fsp--; 2009 if (state.failed) return; 2010 2011 } 2012 2013 } 2014 // $ANTLR end synpred12_PropertyExpressionParser 2015 2016 // $ANTLR start synpred13_PropertyExpressionParser 2017 public final void synpred13_PropertyExpressionParser_fragment() throws RecognitionException { 2018 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:63:4: ( term SAFEDEREF propertyChain ) 2019 // org/apache/tapestry5/beanmodel/internal/antlr/PropertyExpressionParser.g:63:4: term SAFEDEREF propertyChain 2020 { 2021 pushFollow(FOLLOW_term_in_synpred13_PropertyExpressionParser241); 2022 term(); 2023 state._fsp--; 2024 if (state.failed) return; 2025 2026 match(input,SAFEDEREF,FOLLOW_SAFEDEREF_in_synpred13_PropertyExpressionParser243); if (state.failed) return; 2027 2028 pushFollow(FOLLOW_propertyChain_in_synpred13_PropertyExpressionParser245); 2029 propertyChain(); 2030 state._fsp--; 2031 if (state.failed) return; 2032 2033 } 2034 2035 } 2036 // $ANTLR end synpred13_PropertyExpressionParser 2037 2038 // Delegated rules 2039 2040 public final boolean synpred2_PropertyExpressionParser() { 2041 state.backtracking++; 2042 int start = input.mark(); 2043 try { 2044 synpred2_PropertyExpressionParser_fragment(); // can never throw exception 2045 } catch (RecognitionException re) { 2046 System.err.println("impossible: "+re); 2047 } 2048 boolean success = !state.failed; 2049 input.rewind(start); 2050 state.backtracking--; 2051 state.failed=false; 2052 return success; 2053 } 2054 public final boolean synpred13_PropertyExpressionParser() { 2055 state.backtracking++; 2056 int start = input.mark(); 2057 try { 2058 synpred13_PropertyExpressionParser_fragment(); // can never throw exception 2059 } catch (RecognitionException re) { 2060 System.err.println("impossible: "+re); 2061 } 2062 boolean success = !state.failed; 2063 input.rewind(start); 2064 state.backtracking--; 2065 state.failed=false; 2066 return success; 2067 } 2068 public final boolean synpred4_PropertyExpressionParser() { 2069 state.backtracking++; 2070 int start = input.mark(); 2071 try { 2072 synpred4_PropertyExpressionParser_fragment(); // can never throw exception 2073 } catch (RecognitionException re) { 2074 System.err.println("impossible: "+re); 2075 } 2076 boolean success = !state.failed; 2077 input.rewind(start); 2078 state.backtracking--; 2079 state.failed=false; 2080 return success; 2081 } 2082 public final boolean synpred12_PropertyExpressionParser() { 2083 state.backtracking++; 2084 int start = input.mark(); 2085 try { 2086 synpred12_PropertyExpressionParser_fragment(); // can never throw exception 2087 } catch (RecognitionException re) { 2088 System.err.println("impossible: "+re); 2089 } 2090 boolean success = !state.failed; 2091 input.rewind(start); 2092 state.backtracking--; 2093 state.failed=false; 2094 return success; 2095 } 2096 public final boolean synpred3_PropertyExpressionParser() { 2097 state.backtracking++; 2098 int start = input.mark(); 2099 try { 2100 synpred3_PropertyExpressionParser_fragment(); // can never throw exception 2101 } catch (RecognitionException re) { 2102 System.err.println("impossible: "+re); 2103 } 2104 boolean success = !state.failed; 2105 input.rewind(start); 2106 state.backtracking--; 2107 state.failed=false; 2108 return success; 2109 } 2110 2111 2112 2113 public static final BitSet FOLLOW_expression_in_start130 = new BitSet(new long[]{0x0000000000000000L}); 2114 public static final BitSet FOLLOW_EOF_in_start133 = new BitSet(new long[]{0x0000000000000002L}); 2115 public static final BitSet FOLLOW_keyword_in_expression145 = new BitSet(new long[]{0x0000000000000002L}); 2116 public static final BitSet FOLLOW_rangeOp_in_expression150 = new BitSet(new long[]{0x0000000000000002L}); 2117 public static final BitSet FOLLOW_constant_in_expression155 = new BitSet(new long[]{0x0000000000000002L}); 2118 public static final BitSet FOLLOW_propertyChain_in_expression160 = new BitSet(new long[]{0x0000000000000002L}); 2119 public static final BitSet FOLLOW_list_in_expression165 = new BitSet(new long[]{0x0000000000000002L}); 2120 public static final BitSet FOLLOW_notOp_in_expression170 = new BitSet(new long[]{0x0000000000000002L}); 2121 public static final BitSet FOLLOW_map_in_expression175 = new BitSet(new long[]{0x0000000000000002L}); 2122 public static final BitSet FOLLOW_term_in_propertyChain222 = new BitSet(new long[]{0x0000000000000200L}); 2123 public static final BitSet FOLLOW_DEREF_in_propertyChain224 = new BitSet(new long[]{0x0000000000010000L}); 2124 public static final BitSet FOLLOW_propertyChain_in_propertyChain226 = new BitSet(new long[]{0x0000000000000002L}); 2125 public static final BitSet FOLLOW_term_in_propertyChain241 = new BitSet(new long[]{0x0000000800000000L}); 2126 public static final BitSet FOLLOW_SAFEDEREF_in_propertyChain243 = new BitSet(new long[]{0x0000000000010000L}); 2127 public static final BitSet FOLLOW_propertyChain_in_propertyChain245 = new BitSet(new long[]{0x0000000000000002L}); 2128 public static final BitSet FOLLOW_term_in_propertyChain260 = new BitSet(new long[]{0x0000000000000002L}); 2129 public static final BitSet FOLLOW_IDENTIFIER_in_term272 = new BitSet(new long[]{0x0000000000000002L}); 2130 public static final BitSet FOLLOW_methodInvocation_in_term277 = new BitSet(new long[]{0x0000000000000002L}); 2131 public static final BitSet FOLLOW_IDENTIFIER_in_methodInvocation291 = new BitSet(new long[]{0x0000000001000000L}); 2132 public static final BitSet FOLLOW_LPAREN_in_methodInvocation293 = new BitSet(new long[]{0x0000000200000000L}); 2133 public static final BitSet FOLLOW_RPAREN_in_methodInvocation295 = new BitSet(new long[]{0x0000000000000002L}); 2134 public static final BitSet FOLLOW_IDENTIFIER_in_methodInvocation311 = new BitSet(new long[]{0x0000000001000000L}); 2135 public static final BitSet FOLLOW_LPAREN_in_methodInvocation313 = new BitSet(new long[]{0x000001A004632120L}); 2136 public static final BitSet FOLLOW_expressionList_in_methodInvocation315 = new BitSet(new long[]{0x0000000200000000L}); 2137 public static final BitSet FOLLOW_RPAREN_in_methodInvocation317 = new BitSet(new long[]{0x0000000000000002L}); 2138 public static final BitSet FOLLOW_expression_in_expressionList341 = new BitSet(new long[]{0x0000000000000082L}); 2139 public static final BitSet FOLLOW_COMMA_in_expressionList344 = new BitSet(new long[]{0x000001A004632120L}); 2140 public static final BitSet FOLLOW_expression_in_expressionList347 = new BitSet(new long[]{0x0000000000000082L}); 2141 public static final BitSet FOLLOW_rangeopArg_in_rangeOp363 = new BitSet(new long[]{0x0000000040000000L}); 2142 public static final BitSet FOLLOW_RANGEOP_in_rangeOp366 = new BitSet(new long[]{0x0000000000030000L}); 2143 public static final BitSet FOLLOW_rangeopArg_in_rangeOp370 = new BitSet(new long[]{0x0000000000000002L}); 2144 public static final BitSet FOLLOW_INTEGER_in_rangeopArg396 = new BitSet(new long[]{0x0000000000000002L}); 2145 public static final BitSet FOLLOW_propertyChain_in_rangeopArg401 = new BitSet(new long[]{0x0000000000000002L}); 2146 public static final BitSet FOLLOW_LBRACKET_in_list413 = new BitSet(new long[]{0x0000000100000000L}); 2147 public static final BitSet FOLLOW_RBRACKET_in_list415 = new BitSet(new long[]{0x0000000000000002L}); 2148 public static final BitSet FOLLOW_LBRACKET_in_list426 = new BitSet(new long[]{0x000001A004632120L}); 2149 public static final BitSet FOLLOW_expressionList_in_list428 = new BitSet(new long[]{0x0000000100000000L}); 2150 public static final BitSet FOLLOW_RBRACKET_in_list430 = new BitSet(new long[]{0x0000000000000002L}); 2151 public static final BitSet FOLLOW_BANG_in_notOp451 = new BitSet(new long[]{0x000001A004632120L}); 2152 public static final BitSet FOLLOW_expression_in_notOp453 = new BitSet(new long[]{0x0000000000000002L}); 2153 public static final BitSet FOLLOW_LBRACE_in_map472 = new BitSet(new long[]{0x0000000080000000L}); 2154 public static final BitSet FOLLOW_RBRACE_in_map474 = new BitSet(new long[]{0x0000000000000002L}); 2155 public static final BitSet FOLLOW_LBRACE_in_map485 = new BitSet(new long[]{0x000001A004032100L}); 2156 public static final BitSet FOLLOW_mapEntryList_in_map487 = new BitSet(new long[]{0x0000000080000000L}); 2157 public static final BitSet FOLLOW_RBRACE_in_map489 = new BitSet(new long[]{0x0000000000000002L}); 2158 public static final BitSet FOLLOW_mapEntry_in_mapEntryList511 = new BitSet(new long[]{0x0000000000000082L}); 2159 public static final BitSet FOLLOW_COMMA_in_mapEntryList514 = new BitSet(new long[]{0x000001A004032100L}); 2160 public static final BitSet FOLLOW_mapEntry_in_mapEntryList517 = new BitSet(new long[]{0x0000000000000082L}); 2161 public static final BitSet FOLLOW_mapKey_in_mapEntry528 = new BitSet(new long[]{0x0000000000000040L}); 2162 public static final BitSet FOLLOW_COLON_in_mapEntry530 = new BitSet(new long[]{0x000001A004632120L}); 2163 public static final BitSet FOLLOW_expression_in_mapEntry533 = new BitSet(new long[]{0x0000000000000002L}); 2164 public static final BitSet FOLLOW_keyword_in_mapKey542 = new BitSet(new long[]{0x0000000000000002L}); 2165 public static final BitSet FOLLOW_constant_in_mapKey546 = new BitSet(new long[]{0x0000000000000002L}); 2166 public static final BitSet FOLLOW_propertyChain_in_mapKey550 = new BitSet(new long[]{0x0000000000000002L}); 2167 public static final BitSet FOLLOW_rangeOp_in_synpred2_PropertyExpressionParser150 = new BitSet(new long[]{0x0000000000000002L}); 2168 public static final BitSet FOLLOW_constant_in_synpred3_PropertyExpressionParser155 = new BitSet(new long[]{0x0000000000000002L}); 2169 public static final BitSet FOLLOW_propertyChain_in_synpred4_PropertyExpressionParser160 = new BitSet(new long[]{0x0000000000000002L}); 2170 public static final BitSet FOLLOW_term_in_synpred12_PropertyExpressionParser222 = new BitSet(new long[]{0x0000000000000200L}); 2171 public static final BitSet FOLLOW_DEREF_in_synpred12_PropertyExpressionParser224 = new BitSet(new long[]{0x0000000000010000L}); 2172 public static final BitSet FOLLOW_propertyChain_in_synpred12_PropertyExpressionParser226 = new BitSet(new long[]{0x0000000000000002L}); 2173 public static final BitSet FOLLOW_term_in_synpred13_PropertyExpressionParser241 = new BitSet(new long[]{0x0000000800000000L}); 2174 public static final BitSet FOLLOW_SAFEDEREF_in_synpred13_PropertyExpressionParser243 = new BitSet(new long[]{0x0000000000010000L}); 2175 public static final BitSet FOLLOW_propertyChain_in_synpred13_PropertyExpressionParser245 = new BitSet(new long[]{0x0000000000000002L}); 2176}