[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /*+*********************************************************************************** 3 * The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 *************************************************************************************/ 10 11 // $ANTLR 3.1 VTEventConditionParser.g 2009-01-23 20:13:11 12 13 function VTEventConditionParserLexer_DFA9_static(){ 14 $eotS = 15 "\x5\xff\x1\x8\x1\xc\x4\xff\x1\xe\x3\xff"; 16 $eofS = 17 "\xf\xff"; 18 $minS = 19 "\x1\x9\x4\xff\x1\x4e\x1\x30\x4\xff\x1\x30\x3\xff"; 20 $maxS = 21 "\x1\x7a\x4\xff\x1\x6e\x1\x78\x4\xff\x1\x7a\x3\xff"; 22 $acceptS = 23 "\x1\xff\x1\x1\x1\x2\x1\x3\x1\x4\x2\xff\x1\x7\x1\x8\x1\x9\x1\xb\x1". 24 "\xff\x1\x6\x1\xa\x1\x5"; 25 $specialS = 26 "\xf\xff}>"; 27 $transitionS = array( 28 "\x2\xa\x2\xff\x1\xa\x12\xff\x1\xa\x6\xff\x1\x7\x4\xff\x1\x3\x1\xff". 29 "\x1\x9\x1\xff\xa\x6\x3\xff\x1\x1\x3\xff\x8\x8\x1\x5\x11\x8\x1\x2". 30 "\x1\xff\x1\x4\x2\xff\x9\x8\x1\x5\x11\x8", 31 "", 32 "", 33 "", 34 "", 35 "\x1\xb\x1f\xff\x1\xb", 36 "\xa\x6\x3e\xff\x1\xd", 37 "", 38 "", 39 "", 40 "", 41 "\xa\x8\x7\xff\x1a\x8\x4\xff\x1\x8\x1\xff\x1a\x8", 42 "", 43 "", 44 "" 45 ); 46 $arr = array(); 47 $arr['eot'] = DFA::unpackEncodedString($eotS); 48 $arr['eof'] = DFA::unpackEncodedString($eofS); 49 $arr['min'] = DFA::unpackEncodedString($minS); 50 $arr['max'] = DFA::unpackEncodedString($maxS); 51 $arr['accept'] = DFA::unpackEncodedString($acceptS); 52 $arr['special'] = DFA::unpackEncodedString($specialS); 53 54 55 $numStates = sizeof($transitionS); 56 $arr['transition'] = array(); 57 for ($i=0; $i<$numStates; $i++) { 58 $arr['transition'][$i] = DFA::unpackEncodedString($transitionS[$i]); 59 } 60 return $arr; 61 } 62 $VTEventConditionParserLexer_DFA9 = VTEventConditionParserLexer_DFA9_static(); 63 64 class VTEventConditionParserLexer_DFA9 extends DFA { 65 66 public function __construct($recognizer) { 67 global $VTEventConditionParserLexer_DFA9; 68 $DFA = $VTEventConditionParserLexer_DFA9; 69 $this->recognizer = $recognizer; 70 $this->decisionNumber = 9; 71 $this->eot = $DFA['eot']; 72 $this->eof = $DFA['eof']; 73 $this->min = $DFA['min']; 74 $this->max = $DFA['max']; 75 $this->accept = $DFA['accept']; 76 $this->special = $DFA['special']; 77 $this->transition = $DFA['transition']; 78 } 79 public function getDescription() { 80 return "1:1: Tokens : ( T__13 | T__14 | T__15 | T__16 | IN | INTEGER | STRING | SYMBOL | DOT | ELEMENT_ID | WHITESPACE );"; 81 } 82 } 83 84 85 class VTEventConditionParserLexer extends AntlrLexer { 86 static $INTEGER=8; 87 static $T__16=16; 88 static $IN=5; 89 static $T__15=15; 90 static $SYMBOL=4; 91 static $T__14=14; 92 static $LETTER=9; 93 static $T__13=13; 94 static $WHITESPACE=12; 95 static $DIGIT=7; 96 static $DOT=10; 97 static $EOF=-1; 98 static $ELEMENT_ID=11; 99 static $STRING=6; 100 101 public function reportError($e) { 102 print_r($e); 103 throw new Exception("The condition you provided is invalid"); 104 } 105 106 107 // delegates 108 // delegators 109 110 function __construct($input, $state=null){ 111 parent::__construct($input,$state); 112 113 114 $this->dfa9 = new VTEventConditionParserLexer_DFA9($this); 115 } 116 function getGrammarFileName() { return "VTEventConditionParser.g"; } 117 118 // $ANTLR start "T__13" 119 function mT__13(){ 120 try { 121 $_type = VTEventConditionParserLexer::$T__13; 122 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 123 { 124 $this->matchString("=="); 125 126 127 } 128 129 $this->state->type = $_type; 130 $this->state->channel = $_channel; 131 } 132 catch(Exception $e){ 133 throw $e; 134 } 135 } 136 // $ANTLR end "T__13" 137 138 // $ANTLR start "T__14" 139 function mT__14(){ 140 try { 141 $_type = VTEventConditionParserLexer::$T__14; 142 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 143 { 144 $this->matchChar(91); 145 146 } 147 148 $this->state->type = $_type; 149 $this->state->channel = $_channel; 150 } 151 catch(Exception $e){ 152 throw $e; 153 } 154 } 155 // $ANTLR end "T__14" 156 157 // $ANTLR start "T__15" 158 function mT__15(){ 159 try { 160 $_type = VTEventConditionParserLexer::$T__15; 161 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 162 { 163 $this->matchChar(44); 164 165 } 166 167 $this->state->type = $_type; 168 $this->state->channel = $_channel; 169 } 170 catch(Exception $e){ 171 throw $e; 172 } 173 } 174 // $ANTLR end "T__15" 175 176 // $ANTLR start "T__16" 177 function mT__16(){ 178 try { 179 $_type = VTEventConditionParserLexer::$T__16; 180 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 181 { 182 $this->matchChar(93); 183 184 } 185 186 $this->state->type = $_type; 187 $this->state->channel = $_channel; 188 } 189 catch(Exception $e){ 190 throw $e; 191 } 192 } 193 // $ANTLR end "T__16" 194 195 // $ANTLR start "IN" 196 function mIN(){ 197 try { 198 $_type = VTEventConditionParserLexer::$IN; 199 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 200 { 201 if ( $this->input->LA(1)==73||$this->input->LA(1)==105 ) { 202 $this->input->consume(); 203 204 } 205 else { 206 $mse = new MismatchedSetException(null,$this->input); 207 $this->recover($mse); 208 throw $mse;} 209 210 if ( $this->input->LA(1)==78||$this->input->LA(1)==110 ) { 211 $this->input->consume(); 212 213 } 214 else { 215 $mse = new MismatchedSetException(null,$this->input); 216 $this->recover($mse); 217 throw $mse;} 218 219 220 } 221 222 $this->state->type = $_type; 223 $this->state->channel = $_channel; 224 } 225 catch(Exception $e){ 226 throw $e; 227 } 228 } 229 // $ANTLR end "IN" 230 231 // $ANTLR start "INTEGER" 232 function mINTEGER(){ 233 try { 234 $_type = VTEventConditionParserLexer::$INTEGER; 235 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 236 { 237 $cnt1=0; 238 //loop1: 239 do { 240 $alt1=2; 241 $LA1_0 = $this->input->LA(1); 242 243 if ( (($LA1_0>=$this->getToken('48') && $LA1_0<=$this->getToken('57'))) ) { 244 $alt1=1; 245 } 246 247 248 switch ($alt1) { 249 case 1 : 250 { 251 $this->mDIGIT(); 252 253 } 254 break; 255 256 default : 257 if ( $cnt1 >= 1 ) break 2;//loop1; 258 $eee = 259 new EarlyExitException(1, $this->input); 260 throw $eee; 261 } 262 $cnt1++; 263 } while (true); 264 265 266 } 267 268 $this->state->type = $_type; 269 $this->state->channel = $_channel; 270 } 271 catch(Exception $e){ 272 throw $e; 273 } 274 } 275 // $ANTLR end "INTEGER" 276 277 // $ANTLR start "STRING" 278 function mSTRING(){ 279 try { 280 $_type = VTEventConditionParserLexer::$STRING; 281 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 282 { 283 $this->matchChar(39); 284 $cnt2=0; 285 //loop2: 286 do { 287 $alt2=3; 288 $LA2_0 = $this->input->LA(1); 289 290 if ( ($LA2_0==$this->getToken('39')) ) { 291 $LA2_1 = $this->input->LA(2); 292 293 if ( ($LA2_1==$this->getToken('39')) ) { 294 $alt2=2; 295 } 296 297 298 } 299 else if ( (($LA2_0>=$this->getToken('0') && $LA2_0<=$this->getToken('38'))||($LA2_0>=$this->getToken('40') && $LA2_0<=$this->getToken('65534'))) ) { 300 $alt2=1; 301 } 302 303 304 switch ($alt2) { 305 case 1 : 306 { 307 if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('38'))||($this->input->LA(1)>=$this->getToken('40') && $this->input->LA(1)<=$this->getToken('65534')) ) { 308 $this->input->consume(); 309 310 } 311 else { 312 $mse = new MismatchedSetException(null,$this->input); 313 $this->recover($mse); 314 throw $mse;} 315 316 317 } 318 break; 319 case 2 : 320 { 321 $this->matchString("\'\'"); 322 323 324 } 325 break; 326 327 default : 328 if ( $cnt2 >= 1 ) break 2;//loop2; 329 $eee = 330 new EarlyExitException(2, $this->input); 331 throw $eee; 332 } 333 $cnt2++; 334 } while (true); 335 336 $this->matchChar(39); 337 338 } 339 340 $this->state->type = $_type; 341 $this->state->channel = $_channel; 342 } 343 catch(Exception $e){ 344 throw $e; 345 } 346 } 347 // $ANTLR end "STRING" 348 349 // $ANTLR start "SYMBOL" 350 function mSYMBOL(){ 351 try { 352 $_type = VTEventConditionParserLexer::$SYMBOL; 353 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 354 $alt5=2; 355 $LA5_0 = $this->input->LA(1); 356 357 if ( (($LA5_0>=$this->getToken('65') && $LA5_0<=$this->getToken('90'))||($LA5_0>=$this->getToken('97') && $LA5_0<=$this->getToken('122'))) ) { 358 $alt5=1; 359 } 360 else if ( ($LA5_0==$this->getToken('96')) ) { 361 $alt5=2; 362 } 363 else { 364 $nvae = new NoViableAltException("", 5, 0, $this->input); 365 366 throw $nvae; 367 } 368 switch ($alt5) { 369 case 1 : 370 { 371 $this->mLETTER(); 372 { 373 //loop3: 374 do { 375 $alt3=2; 376 $LA3_0 = $this->input->LA(1); 377 378 if ( (($LA3_0>=$this->getToken('48') && $LA3_0<=$this->getToken('57'))||($LA3_0>=$this->getToken('65') && $LA3_0<=$this->getToken('90'))||$LA3_0==$this->getToken('95')||($LA3_0>=$this->getToken('97') && $LA3_0<=$this->getToken('122'))) ) { 379 $alt3=1; 380 } 381 382 383 switch ($alt3) { 384 case 1 : 385 { 386 if ( ($this->input->LA(1)>=$this->getToken('48') && $this->input->LA(1)<=$this->getToken('57'))||($this->input->LA(1)>=$this->getToken('65') && $this->input->LA(1)<=$this->getToken('90'))||$this->input->LA(1)==95||($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('122')) ) { 387 $this->input->consume(); 388 389 } 390 else { 391 $mse = new MismatchedSetException(null,$this->input); 392 $this->recover($mse); 393 throw $mse;} 394 395 396 } 397 break; 398 399 default : 400 break 2;//loop3; 401 } 402 } while (true); 403 404 405 } 406 407 408 } 409 break; 410 case 2 : 411 { 412 $this->matchChar(96); 413 $cnt4=0; 414 //loop4: 415 do { 416 $alt4=2; 417 $LA4_0 = $this->input->LA(1); 418 419 if ( (($LA4_0>=$this->getToken('0') && $LA4_0<=$this->getToken('95'))||($LA4_0>=$this->getToken('97') && $LA4_0<=$this->getToken('65534'))) ) { 420 $alt4=1; 421 } 422 423 424 switch ($alt4) { 425 case 1 : 426 { 427 if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('95'))||($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('65534')) ) { 428 $this->input->consume(); 429 430 } 431 else { 432 $mse = new MismatchedSetException(null,$this->input); 433 $this->recover($mse); 434 throw $mse;} 435 436 437 } 438 break; 439 440 default : 441 if ( $cnt4 >= 1 ) break 2;//loop4; 442 $eee = 443 new EarlyExitException(4, $this->input); 444 throw $eee; 445 } 446 $cnt4++; 447 } while (true); 448 449 $this->matchChar(96); 450 451 } 452 break; 453 454 } 455 $this->state->type = $_type; 456 $this->state->channel = $_channel; 457 } 458 catch(Exception $e){ 459 throw $e; 460 } 461 } 462 // $ANTLR end "SYMBOL" 463 464 // $ANTLR start "DOT" 465 function mDOT(){ 466 try { 467 $_type = VTEventConditionParserLexer::$DOT; 468 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 469 { 470 $this->matchChar(46); 471 472 } 473 474 $this->state->type = $_type; 475 $this->state->channel = $_channel; 476 } 477 catch(Exception $e){ 478 throw $e; 479 } 480 } 481 // $ANTLR end "DOT" 482 483 // $ANTLR start "ELEMENT_ID" 484 function mELEMENT_ID(){ 485 try { 486 $_type = VTEventConditionParserLexer::$ELEMENT_ID; 487 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 488 { 489 $cnt6=0; 490 //loop6: 491 do { 492 $alt6=2; 493 $LA6_0 = $this->input->LA(1); 494 495 if ( (($LA6_0>=$this->getToken('48') && $LA6_0<=$this->getToken('57'))) ) { 496 $alt6=1; 497 } 498 499 500 switch ($alt6) { 501 case 1 : 502 { 503 $this->mDIGIT(); 504 505 } 506 break; 507 508 default : 509 if ( $cnt6 >= 1 ) break 2;//loop6; 510 $eee = 511 new EarlyExitException(6, $this->input); 512 throw $eee; 513 } 514 $cnt6++; 515 } while (true); 516 517 $this->matchChar(120); 518 $cnt7=0; 519 //loop7: 520 do { 521 $alt7=2; 522 $LA7_0 = $this->input->LA(1); 523 524 if ( (($LA7_0>=$this->getToken('48') && $LA7_0<=$this->getToken('57'))) ) { 525 $alt7=1; 526 } 527 528 529 switch ($alt7) { 530 case 1 : 531 { 532 $this->mDIGIT(); 533 534 } 535 break; 536 537 default : 538 if ( $cnt7 >= 1 ) break 2;//loop7; 539 $eee = 540 new EarlyExitException(7, $this->input); 541 throw $eee; 542 } 543 $cnt7++; 544 } while (true); 545 546 547 } 548 549 $this->state->type = $_type; 550 $this->state->channel = $_channel; 551 } 552 catch(Exception $e){ 553 throw $e; 554 } 555 } 556 // $ANTLR end "ELEMENT_ID" 557 558 // $ANTLR start "LETTER" 559 function mLETTER(){ 560 try { 561 { 562 if ( ($this->input->LA(1)>=$this->getToken('65') && $this->input->LA(1)<=$this->getToken('90'))||($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('122')) ) { 563 $this->input->consume(); 564 565 } 566 else { 567 $mse = new MismatchedSetException(null,$this->input); 568 $this->recover($mse); 569 throw $mse;} 570 571 572 } 573 574 } 575 catch(Exception $e){ 576 throw $e; 577 } 578 } 579 // $ANTLR end "LETTER" 580 581 // $ANTLR start "DIGIT" 582 function mDIGIT(){ 583 try { 584 { 585 $this->matchRange(48,57); 586 587 } 588 589 } 590 catch(Exception $e){ 591 throw $e; 592 } 593 } 594 // $ANTLR end "DIGIT" 595 596 // $ANTLR start "WHITESPACE" 597 function mWHITESPACE(){ 598 try { 599 $_type = VTEventConditionParserLexer::$WHITESPACE; 600 $_channel = VTEventConditionParserLexer::$DEFAULT_TOKEN_CHANNEL; 601 { 602 $cnt8=0; 603 //loop8: 604 do { 605 $alt8=2; 606 $LA8_0 = $this->input->LA(1); 607 608 if ( (($LA8_0>=$this->getToken('9') && $LA8_0<=$this->getToken('10'))||$LA8_0==$this->getToken('13')||$LA8_0==$this->getToken('32')) ) { 609 $alt8=1; 610 } 611 612 613 switch ($alt8) { 614 case 1 : 615 { 616 if ( ($this->input->LA(1)>=$this->getToken('9') && $this->input->LA(1)<=$this->getToken('10'))||$this->input->LA(1)==13||$this->input->LA(1)==32 ) { 617 $this->input->consume(); 618 619 } 620 else { 621 $mse = new MismatchedSetException(null,$this->input); 622 $this->recover($mse); 623 throw $mse;} 624 625 626 } 627 break; 628 629 default : 630 if ( $cnt8 >= 1 ) break 2;//loop8; 631 $eee = 632 new EarlyExitException(8, $this->input); 633 throw $eee; 634 } 635 $cnt8++; 636 } while (true); 637 638 $_channel=self::$HIDDEN; 639 640 } 641 642 $this->state->type = $_type; 643 $this->state->channel = $_channel; 644 } 645 catch(Exception $e){ 646 throw $e; 647 } 648 } 649 // $ANTLR end "WHITESPACE" 650 651 function mTokens(){ 652 $alt9=11; 653 $alt9 = $this->dfa9->predict($this->input); 654 switch ($alt9) { 655 case 1 : 656 { 657 $this->mT__13(); 658 659 } 660 break; 661 case 2 : 662 { 663 $this->mT__14(); 664 665 } 666 break; 667 case 3 : 668 { 669 $this->mT__15(); 670 671 } 672 break; 673 case 4 : 674 { 675 $this->mT__16(); 676 677 } 678 break; 679 case 5 : 680 { 681 $this->mIN(); 682 683 } 684 break; 685 case 6 : 686 { 687 $this->mINTEGER(); 688 689 } 690 break; 691 case 7 : 692 { 693 $this->mSTRING(); 694 695 } 696 break; 697 case 8 : 698 { 699 $this->mSYMBOL(); 700 701 } 702 break; 703 case 9 : 704 { 705 $this->mDOT(); 706 707 } 708 break; 709 case 10 : 710 { 711 $this->mELEMENT_ID(); 712 713 } 714 break; 715 case 11 : 716 { 717 $this->mWHITESPACE(); 718 719 } 720 break; 721 722 } 723 724 } 725 726 727 728 } 729 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |