diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4de43..d1bdf09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Version 0.9.3-dev ----------------- +* [BC] As `list()` in `foreach` is not supported the structure of list assignments changed: + + 1. There is no longer a dedicated `AssignList` node; instead a normal `Assign` node is used with a `List` as `var`. + 2. Nested lists are now `List` nodes too, instead of just arrays. + * [PHP 5.5] Add support for constant array / string dereferencing. Examples: `"foo"[2]`, `[1, 2, 3][2]` @@ -10,17 +15,14 @@ Version 0.9.3-dev * [PHP 5.5] Add support for `finally`. This adds a new `finallyStmts` subnode to the `TryCatch` node. If there is no finally clause it will be `null`. -* [BC] [PHP 5.5] Add support for `list()` destructuring of `foreach` values. +* [PHP 5.5] Add support for `list()` destructuring of `foreach` values. Example: `foreach ($coords as list($x, $y)) { ... }` - This changes the node structure for the previously existing `list(...) = $foo` assignments. Those no longer have a - dedicated `AssignList` node; instead they are parsed as a normal `Assign` node with a `List` as `var`. Similarly the - use in `foreach` will generate a `List` for `valueVar`. - * Fix parsing of `$foo =& new Bar`. It is now properly parsed as `AssignRef` (instead of `Assign`). Version 0.9.2 (07.07.2012) -------------------------- + * Add `Class->getMethods()` function, which returns all methods contained in the `stmts` array of the class node. This does not take inherited methods into account. diff --git a/grammar/zend_language_parser.phpy b/grammar/zend_language_parser.phpy index 83383fd..402ad31 100644 --- a/grammar/zend_language_parser.phpy +++ b/grammar/zend_language_parser.phpy @@ -600,7 +600,7 @@ parentheses_expr: yield_expr: T_YIELD expr { $$ = Expr_Yield[$2, null]; } - | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr_Yield[$2, $4]; } + | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr_Yield[$4, $2]; } ; array_expr: @@ -620,10 +620,6 @@ new_expr: T_NEW class_name_reference ctor_arguments { $$ = Expr_New[$2, $3]; } ; -list_expr: - T_LIST '(' assignment_list ')' { $$ = Expr_List[$3]; } -; - lexical_vars: /* empty */ { $$ = array(); } | T_USE '(' lexical_var_list ')' { $$ = $3; } @@ -845,14 +841,18 @@ object_property: | variable_without_objects { $$ = $1; } ; -assignment_list: - assignment_list ',' assignment_list_element { push($1, $3); } - | assignment_list_element { init($1); } +list_expr: + T_LIST '(' list_expr_elements ')' { $$ = Expr_List[$3]; } ; -assignment_list_element: +list_expr_elements: + list_expr_elements ',' list_expr_element { push($1, $3); } + | list_expr_element { init($1); } +; + +list_expr_element: variable { $$ = $1; } - | T_LIST '(' assignment_list ')' { $$ = $3; } + | list_expr { $$ = $1; } | /* empty */ { $$ = null; } ; diff --git a/lib/PHPParser/Parser.php b/lib/PHPParser/Parser.php index ad02987..f73b098 100644 --- a/lib/PHPParser/Parser.php +++ b/lib/PHPParser/Parser.php @@ -16,10 +16,10 @@ class PHPParser_Parser const TOKEN_MAP_SIZE = 386; - const YYLAST = 998; - const YY2TBLSTATE = 316; - const YYGLAST = 414; - const YYNLSTATES = 534; + const YYLAST = 1008; + const YY2TBLSTATE = 314; + const YYGLAST = 409; + const YYNLSTATES = 531; const YYUNEXPECTED = 32767; const YYDEFAULT = -32766; @@ -356,106 +356,107 @@ class PHPParser_Parser ); protected static $yyaction = array( - 59, 60, 325, 61, 62,-32766,-32766,-32766, 351, 63, + 59, 60, 323, 61, 62,-32766,-32766,-32766, 35, 63, 64,-32767,-32767,-32767,-32767, 97, 98, 99, 100, 101, - 57, 464,-32766, 297,-32766,-32766, 41, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 267, 360, - 65, 66, 928, 497, 930, 929, 67, 538, 68, 219, - 220, 69, 70, 71, 72, 73, 74, 75, 76, 31, - 232, 77, 318, 326, 733, 735, 918, 840, 841, 362, - 324, 897, 340, 581, 509, 363, 46, 27, 327, 852, - 364, 245, 365, 456, 366, 39, 223, 328,-32766,-32766, - -32766, 36, 37, 367, 333, 280, 38, 368, 329, 425, - 78, 185, 121, 278, 279,-32766, 286,-32766, 35, 369, - 370, 371, 372, 373, 389, 343, 683, 330, 563, 605, - 374, 375, 376, 377, 863, 846, 847, 848, 849, 843, - 844, 239, 81, 82, 83, -349, 389, 850, 845, 330, - 587, 507, 346, 47, 227, 259, 243, 22, 247, 40, - 669, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 57, 461,-32766, 296,-32766,-32766, 41, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 266, 344, + 65, 66, 925, 494, 927, 926, 67, 535, 68, 218, + 219, 69, 70, 71, 72, 73, 74, 75, 76, 31, + 231, 77, 316, 324, 730, 732, 247, 836, 837, 360, + 349, 893, 338, 578, 506, 361, 46, 27, 325, 848, + 362, 244, 363, 453, 364, 39, 222, 326,-32766,-32766, + -32766, 36, 37, 365, 331, 285, 38, 366, 327, 422, + 78, 122, 121, 277, 278,-32766, 279,-32766, 213, 367, + 368, 369, 370, 371, 387, 341, 680, 328, 560, 602, + 372, 373, 374, 375, 848, 842, 843, 844, 845, 839, + 840, 238, 81, 82, 83, -348, 387, 846, 841, 328, + 584, 504, 358, 47, 226, 258, 242, 658, 246, 40, + 322, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 791, 233, 678,-32766,-32766,-32766, 704, 705, - 706, 703, 702, 701, 633, 0,-32766,-32766,-32766, 658, - 659, 214,-32766, 122,-32766,-32766,-32766,-32766,-32766,-32767, - -32767,-32767,-32767,-32766, 791, 322, 329, 319, 350, 806, - -117, 257, 127, 277,-32766,-32766,-32766, 369, 370, 891, - 696, 261, 897, 221, 216,-32766, 543, 605, 374, 375, - 547, 538, 344, 215, 538,-32766, 897, 376,-32766,-32766, - -32766, 578,-32766, 54,-32766, 322,-32766, 661, 263,-32766, - 56, 257, 604,-32766,-32766,-32766, 791,-32766,-32766,-32766, - 696, 34,-32766, 538, 348,-32766, 388,-32766, 345, 816, - -32766,-32766,-32766,-32766,-32766, 224,-32766, 579,-32766, 53, - 125,-32766, 99, 100, 101,-32766,-32766,-32766, 791, 918, - -32766,-32766, 603, 268,-32766, 925, 259,-32766, 388, 226, - 634, 389,-32766,-32766, 330,-32766, 322, 225, 334,-32766, - 259, 238, 257, 901, 248, 538, 102, 103, 104,-32766, - 233, 696,-32766,-32766,-32766, 118,-32766, 506,-32766,-32766, - -32766, 187, 119,-32766,-32766,-32766, 125,-32766,-32766,-32766, - 791,-32766,-32766,-32766, 211, 188,-32766, 538, 129,-32766, - 388,-32766, 454, 602,-32766,-32766,-32766,-32766,-32766, 192, - -32766, 117,-32766, 862, 186,-32766, 116, -113, 193,-32766, - -32766,-32766, 852, 519,-32766,-32766,-32766,-32766,-32766, 353, - 28,-32766, 388, 357, 471, 126,-32766,-32766, 531,-32766, - 523, 791, 522,-32766, 130, 287, 480, 481, 688, 538, - 305, 544, 514,-32766, 529, 124,-32766,-32766,-32766, 512, - -32766, 591,-32766, 510,-32766, 128, 489,-32766,-32766,-32766, - 233,-32766,-32766,-32766, 600, 329,-32766,-32766, 682, 528, - -32766, 658, 659,-32766, 388, 52, 369, 370, 55, 693, - 533,-32766, 224, 51,-32766, 563, 605, 374, 375, 50, - 538, 58, 49, 496,-32766, 494, 232,-32766,-32766,-32766, - 485,-32766, 265,-32766, 210,-32766, 552, 414,-32766, 402, - -32766,-32766,-32766,-32766,-32766, 554,-32766,-32766,-32766, 855, - 539,-32766, 538, 538,-32766, 388,-32766, 505, 400,-32766, - -32766,-32766,-32766,-32766, 482,-32766, 791,-32766, 478, 339, - -32766, 341, 415, 690,-32766,-32766,-32766, 399, 923,-32766, - -32766, 809, 401,-32766, -161, 342,-32766, 388, 918, 329, - 319,-32766,-32766, 329,-32766, 266, 277, 476, 791, 338, - 369, 370, 416, 229, 369, 370, -158, 474, 447, 543, - 605, 374, 375, 563, 605, 374, 375, 459, 359,-32766, - 258, 606, 120,-32766,-32766, 538, 851, 660, 80,-32766, - 607, 263,-32766,-32766,-32766, 30,-32766, 545,-32766, 508, - -32766, 564, 256,-32766, 260, 255, 191,-32766,-32766,-32766, - 791,-32766,-32766,-32766, 244, -349,-32766, 538, 246,-32766, - 388,-32766, -350, 422,-32766,-32766,-32766,-32766,-32766, 42, - -32766, 465,-32766, 45, -292,-32766, 337, 789, 250,-32766, - -32766,-32766, 791, 407,-32766,-32766, -283, 502,-32766, 299, - 251,-32766, 388, -291, 513, 0,-32766,-32766, 340,-32766, - 590, 574, 572,-32766, 568, 582, 589, 583, 576, 538, - 636, 627, 628,-32766, 566, 689,-32766,-32766,-32766, 580, - -32766, 686,-32766, 548,-32766, 577, 687,-32766, 571,-32766, - 621,-32766,-32766,-32766, 44,-32766,-32766,-32766, 515, 619, - -32766, 538, 516,-32766, 388,-32766, 617, 679,-32766,-32766, - -32766,-32766,-32766, 518,-32766, 520,-32766, 525, 526,-32766, - 530, 532, 123,-32766,-32766,-32766, 527, 329,-32766,-32766, - 892, 902,-32766, 671, 831,-32766, 388, 894, 369, 370, - 575,-32766, 321,-32766, 882, 896,-32766, 563, 605, 374, - 375, 898, 538, 626, 926, 927,-32766, 625, 924,-32766, - -32766,-32766, 356,-32766,-32766,-32766, 317,-32766, 235, 234, - -32766, 222, 573,-32766,-32766,-32766,-32766, 236,-32766,-32766, - -32766, 218, 217,-32766, 538, 213,-32766, 388,-32766, 262, - 212,-32766,-32766,-32766,-32766,-32766, 237,-32766, 184,-32766, - 79, 48,-32766, 189, 190, 43,-32766,-32766,-32766, 33, - 32,-32766,-32766, -114, 858,-32766, 662, 798,-32766, 388, - 771, 795, 183,-32766,-32766, 501,-32766, 833, 329, 319, - 840, 841, 475, 439,-32766, 277, 358, 354, 842, 369, - 370,-32766,-32766,-32766, 306, 288, 25, 24, 543, 605, - 374, 375,-32766,-32766,-32766,-32766,-32766, 23,-32766, 483, - -32766,-32766,-32766,-32766,-32766, 794, 770, 448, 907,-32766, - 263,-32766,-32766,-32766,-32766, 804, 546, -113, 0, 876, - 0, 0, 859, 922, 830, 893, 444, 877, 846, 847, - 848, 849, 843, 844, 308, 881, 895, 815, 329, 802, - 850, 845, 329, 800, 801, 799,-32766, 0,-32766, 369, - 370, 0, 0, 369, 370, 329, 0, 0, 563, 605, - 374, 375, 563, 605, 374, 375, 369, 370, 0, 0, - 0, 329, 0, 0, 0, 563, 605, 374, 375, 0, - 0, 0, 369, 370, 329, 0, 517, 0, 329, 0, - 601, 563, 605, 374, 375, 369, 370, 0, 0, 369, - 370, 329, 0, 694, 563, 605, 374, 375, 563, 605, - 374, 375, 369, 370, 0, 0, 0, 504, 0, 594, - 0, 563, 605, 374, 375, 0,-32766,-32766,-32766, 0, - 329, 0, 793, 495, 0, 0, 596, 0, 0, 0, - 0, 369, 370,-32766, 329,-32766,-32766,-32766, 0, 792, - 563, 605, 374, 375, 0, 369, 370, 0, 0, 0, - 0, 0, 0, 0, 563, 605, 374, 375 + 103, 104, 788, 232, 576,-32766,-32766,-32766, 701, 702, + 703, 700, 699, 698, 630, 0,-32766,-32766,-32766, 655, + 656, 214,-32766, 34,-32766,-32766,-32766,-32766,-32766,-32767, + -32767,-32767,-32767,-32766, 788, 320, 327, 317, 897, 22, + -117, 256, 127, 276,-32766,-32766,-32766, 367, 368, 666, + 693, 185, 893, 220, 225,-32766, 540, 602, 372, 373, + 575, 535, 342,-32766, 535,-32766, 893, 374,-32766,-32766, + -32766, 544,-32766, 54,-32766, 320,-32766, 900, 262,-32766, + 53, 256, 600,-32766,-32766,-32766, 788,-32766,-32766,-32766, + 693, 343,-32766, 535, 348,-32766, 386,-32766, 346, 812, + -32766,-32766,-32766,-32766,-32766, 223,-32766, 675,-32766, 56, + 126,-32766, 99, 100, 101,-32766,-32766,-32766, 788, 802, + -32766,-32766, 599, 215,-32766, 922, 258,-32766, 386, 887, + 631, 387,-32766,-32766, 328,-32766, 320, 224, 332,-32766, + 258, 915, 256, 503, 915, 535, 102, 103, 104,-32766, + 232, 693,-32766,-32766,-32766, 118,-32766, 129,-32766, 237, + -32766, 451, 117,-32766,-32766,-32766, 125,-32766,-32766,-32766, + 125,-32766,-32766,-32766, 211, 260,-32766, 535, 193,-32766, + 386,-32766, 192, 601,-32766,-32766,-32766,-32766,-32766, 187, + -32766, 119,-32766, 788, 597,-32766, 186, -113, 188,-32766, + -32766,-32766, 859, 267,-32766,-32766, 116, 124,-32766,-32766, + -32766,-32766, 386, 528, 685, 858,-32766,-32766, 526,-32766, + 327, 317, 355, 468, 509, 788, 507, 276, 351, 28, + 588, 367, 368, 516,-32766,-32766,-32766, 130, 286, 232, + 540, 602, 372, 373, 477, 478,-32766, 128,-32766,-32766, + 519,-32766, 535,-32766,-32766,-32766,-32766, 655, 656,-32766, + -32766,-32766, 262,-32766, 520,-32766, 49,-32766, 542, 51, + -32766, 690, 530, 50,-32766,-32766,-32766, 52,-32766,-32766, + -32766, 541, 511,-32766, 535, 304,-32766, 386,-32766, 679, + 525,-32766,-32766,-32766,-32766,-32766, 223,-32766, 58,-32766, + 55, 482,-32766, 231, 493, 535,-32766,-32766,-32766, 788, + 340,-32766,-32766, 502, 413,-32766, 412, 687,-32766, 386, + 851, 549, 551,-32766,-32766, 400,-32766, 337, 339, 536, + -32766, 491, 397, 398, 920, 264, 535, 479, 456, 475, + -32766, 805, 399,-32766,-32766,-32766, -161,-32766, 915,-32766, + 265,-32766, 604, 603,-32766,-32766,-32766, 471,-32766,-32766, + -32766, 788,-32766,-32766,-32766, 210, 414,-32766, 535, 228, + -32766, 386,-32766, -158, 444,-32766,-32766,-32766,-32766,-32766, + 336,-32766, 473,-32766, 357, 405,-32766, 257, 335, 847, + -32766,-32766,-32766, 788, 191,-32766,-32766, 255, 120,-32766, + 254, 786,-32766, 386, 245, 0, 0,-32766,-32766, 259, + -32766, 657, 243, -348,-32766, -349, 374, 42, 0, 480, + 535, 0, 0, 0,-32766, 0, 0,-32766,-32766,-32766, + 80,-32766, 462,-32766, 0,-32766, 499, 250,-32766,-32766, + -32766, 249,-32766,-32766,-32766, 788,-32766,-32766,-32766, -290, + -282,-32766, 535, 298,-32766, 386,-32766, -291, 338,-32766, + -32766,-32766,-32766,-32766, 45,-32766, 44,-32766, 571, 512, + -32766, 573, 569, 586,-32766,-32766,-32766, 563, 618,-32766, + -32766, 574, 587,-32766, 565, 579,-32766, 386, 580, 577, + 683, 568,-32766, 633,-32766, 624, 625, 614,-32766, 616, + 545, 684, 513, 686, 535, 676, 888, 505,-32766, 510, + 515,-32766,-32766,-32766, 517,-32766, 522,-32766, 523,-32766, + 527, 529,-32766, 570,-32766, 123,-32766,-32766,-32766, 524, + -32766,-32766,-32766, 898, 668,-32766, 535, 827,-32766, 386, + -32766, 890, 878,-32766,-32766,-32766,-32766,-32766, 892,-32766, + 924,-32766, 623, 923,-32766, 189, 190, 622,-32766,-32766, + -32766, 894, 354,-32766,-32766, 921, 854,-32766, 79,-32766, + -32766, 386, 234, 233, 183, 572,-32766, 221,-32766, 235, + 217, 216, 836, 837, 212,-32766,-32766, 236, 315, 184, + 838, 535, 261, 48, 43,-32766, 33, 32,-32766,-32766, + -32766, 30,-32766, 319,-32766, 795,-32766,-32766,-32766,-32766, + 768, 829, 792,-32766,-32766,-32766, 498, 472,-32766,-32766, + 436, 356,-32766, 352, 305,-32766, 386, 287, 25, 24, + 23, -113, -114,-32766, 791, 767, 659, 445, 441, 0, + 842, 843, 844, 845, 839, 840, 307, 872, 855, 919, + 826, 889, 846, 841, 327, 317, 873, 877,-32766, 327, + -32766, 276,-32766,-32766, 891, 367, 368,-32766,-32766,-32766, + 367, 368, 811, 799, 540, 602, 372, 373, 797, 560, + 602, 372, 373, 327,-32766, 798,-32766,-32766,-32766,-32766, + -32766, 796, 0, 0, 367, 368, 262, 327, 0, 0, + 0, 327, 543, 560, 602, 372, 373, 514, 367, 368, + 0, 0, 367, 368, 327, 0, 0, 560, 602, 372, + 373, 560, 602, 372, 373, 367, 368, 0, 0, 0, + 327, 561, 0, 0, 560, 602, 372, 373, 0, 0, + 0, 367, 368, 327, 0, 691, 0, 327, 501, 591, + 560, 602, 372, 373, 367, 368, 0, 0, 367, 368, + 0, 327, 790, 560, 602, 372, 373, 560, 602, 372, + 373, 0, 367, 368, 492, 0, 0, 0, 593, 0, + 486, 560, 602, 372, 373, 327, 0, 0, 0, 327, + 0, 789, 0, 0, 0, 598, 367, 368, 0, 0, + 367, 368,-32766,-32766,-32766, 560, 602, 372, 373, 560, + 602, 372, 373, 0, 327, 0, 0, 0, 0,-32766, + 0,-32766,-32766,-32766,-32766, 367, 368, 0, 0, 0, + 0, 0, 0, 0, 560, 602, 372, 373 ); protected static $yycheck = array( @@ -474,151 +475,152 @@ class PHPParser_Parser 118, 119, 124, 125, 134, 127, 128, 129, 130, 131, 132, 133, 8, 9, 10, 122, 138, 139, 140, 141, 142, 143, 7, 145, 31, 147, 148, 146, 150, 25, - 73, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 7, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 12, 49, 142, 8, 9, 10, 106, 107, 108, 109, 110, 111, 26, 0, 8, 9, 10, 125, 126, 31, 25, 7, 27, 28, 29, 30, 31, 32, 33, 34, 35, 25, 12, 97, 96, 97, 71, 146, 146, 103, 61, 103, 8, 9, 10, 107, 108, 73, - 112, 7, 73, 31, 147, 65, 116, 117, 118, 119, - 142, 71, 143, 7, 71, 75, 73, 124, 78, 79, + 112, 7, 73, 31, 7, 65, 116, 117, 118, 119, + 142, 71, 143, 8, 71, 75, 73, 124, 78, 79, 80, 142, 82, 61, 84, 97, 86, 146, 138, 89, 61, 103, 144, 93, 94, 95, 12, 65, 98, 99, - 112, 7, 102, 71, 71, 105, 106, 75, 7, 106, + 112, 7, 102, 71, 71, 105, 106, 75, 71, 106, 78, 79, 80, 113, 82, 31, 84, 142, 86, 61, - 143, 89, 42, 43, 44, 93, 94, 95, 12, 76, - 98, 99, 144, 147, 102, 144, 147, 105, 106, 7, + 143, 89, 42, 43, 44, 93, 94, 95, 12, 146, + 98, 99, 144, 147, 102, 144, 147, 105, 106, 73, 142, 138, 142, 143, 141, 113, 97, 31, 145, 65, - 147, 7, 103, 71, 76, 71, 45, 46, 47, 75, - 49, 112, 78, 79, 80, 143, 82, 71, 84, 8, - 86, 13, 143, 89, 142, 143, 143, 93, 94, 95, - 12, 65, 98, 99, 123, 13, 102, 71, 143, 105, - 106, 75, 147, 144, 78, 79, 80, 113, 82, 13, - 84, 143, 86, 150, 13, 89, 13, 146, 13, 93, - 94, 95, 134, 26, 98, 99, 8, 9, 102, 66, - 67, 105, 106, 66, 67, 143, 142, 143, 26, 113, - 26, 12, 26, 65, 91, 92, 100, 101, 142, 71, - 72, 142, 143, 75, 26, 26, 78, 79, 80, 26, - 82, 26, 84, 26, 86, 26, 87, 89, 142, 143, - 49, 93, 94, 95, 31, 96, 98, 99, 142, 143, - 102, 125, 126, 105, 106, 61, 107, 108, 61, 142, - 143, 113, 31, 61, 65, 116, 117, 118, 119, 61, - 71, 61, 61, 73, 75, 71, 62, 78, 79, 80, - 68, 82, 76, 84, 88, 86, 71, 71, 89, 71, - 142, 143, 93, 94, 95, 71, 65, 98, 99, 71, - 71, 102, 71, 71, 105, 106, 75, 71, 71, 78, - 79, 80, 113, 82, 73, 84, 12, 86, 73, 71, - 89, 71, 71, 71, 93, 94, 95, 71, 71, 98, - 99, 73, 73, 102, 73, 80, 105, 106, 76, 96, - 97, 142, 143, 96, 113, 76, 103, 103, 12, 96, - 107, 108, 88, 88, 107, 108, 88, 90, 88, 116, - 117, 118, 119, 116, 117, 118, 119, 90, 96, 65, - 104, 117, 123, 142, 143, 71, 134, 146, 143, 75, - 117, 138, 78, 79, 80, 145, 82, 144, 84, 143, - 86, 144, 121, 89, 120, 120, 123, 93, 94, 95, - 12, 65, 98, 99, 122, 122, 102, 71, 122, 105, - 106, 75, 122, 124, 78, 79, 80, 113, 82, 123, - 84, 137, 86, 142, 137, 89, 141, 148, 137, 93, - 94, 95, 12, 141, 98, 99, 137, 137, 102, 137, - 137, 105, 106, 137, 143, -1, 142, 143, 141, 113, - 142, 142, 142, 65, 142, 142, 142, 142, 142, 71, - 142, 142, 142, 75, 142, 142, 78, 79, 80, 142, - 82, 142, 84, 142, 86, 142, 142, 89, 142, 143, - 142, 93, 94, 95, 142, 65, 98, 99, 142, 142, - 102, 71, 142, 105, 106, 75, 142, 142, 78, 79, - 80, 113, 82, 143, 84, 143, 86, 143, 143, 89, - 143, 143, 143, 93, 94, 95, 143, 96, 98, 99, - 144, 144, 102, 144, 144, 105, 106, 144, 107, 108, - 142, 143, 145, 113, 144, 144, 65, 116, 117, 118, - 119, 144, 71, 144, 144, 144, 75, 144, 144, 78, - 79, 80, 144, 82, 145, 84, 145, 86, 145, 145, - 89, 145, 142, 143, 93, 94, 95, 145, 65, 98, - 99, 145, 145, 102, 71, 145, 105, 106, 75, 145, - 145, 78, 79, 80, 113, 82, 145, 84, 145, 86, - 145, 145, 89, 42, 43, 145, 93, 94, 95, 145, - 145, 98, 99, 146, 146, 102, 146, 146, 105, 106, - 146, 146, 61, 142, 143, 146, 113, 146, 96, 97, - 69, 70, 146, 146, 73, 103, 146, 146, 77, 107, - 108, 8, 9, 10, 146, 146, 146, 146, 116, 117, - 118, 119, 8, 9, 10, 142, 143, 146, 25, 149, - 27, 28, 29, 30, 31, 146, 146, 146, 146, 25, - 138, 27, 28, 29, 30, 146, 144, 146, -1, 149, - -1, -1, 149, 149, 149, 149, 125, 149, 127, 128, - 129, 130, 131, 132, 133, 149, 149, 149, 96, 149, - 139, 140, 96, 149, 149, 149, 145, -1, 147, 107, - 108, -1, -1, 107, 108, 96, -1, -1, 116, 117, - 118, 119, 116, 117, 118, 119, 107, 108, -1, -1, - -1, 96, -1, -1, -1, 116, 117, 118, 119, -1, - -1, -1, 107, 108, 96, -1, 144, -1, 96, -1, - 144, 116, 117, 118, 119, 107, 108, -1, -1, 107, - 108, 96, -1, 144, 116, 117, 118, 119, 116, 117, - 118, 119, 107, 108, -1, -1, -1, 83, -1, 144, - -1, 116, 117, 118, 119, -1, 8, 9, 10, -1, - 96, -1, 144, 85, -1, -1, 144, -1, -1, -1, - -1, 107, 108, 25, 96, 27, 28, 29, -1, 144, - 116, 117, 118, 119, -1, 107, 108, -1, -1, -1, + 147, 76, 103, 71, 76, 71, 45, 46, 47, 75, + 49, 112, 78, 79, 80, 143, 82, 143, 84, 7, + 86, 147, 143, 89, 142, 143, 143, 93, 94, 95, + 143, 65, 98, 99, 123, 7, 102, 71, 13, 105, + 106, 75, 13, 144, 78, 79, 80, 113, 82, 13, + 84, 143, 86, 12, 31, 89, 13, 146, 13, 93, + 94, 95, 134, 147, 98, 99, 13, 26, 102, 8, + 9, 105, 106, 26, 142, 150, 142, 143, 26, 113, + 96, 97, 66, 67, 26, 12, 26, 103, 66, 67, + 26, 107, 108, 26, 8, 9, 10, 91, 92, 49, + 116, 117, 118, 119, 100, 101, 65, 26, 142, 143, + 26, 25, 71, 27, 28, 29, 75, 125, 126, 78, + 79, 80, 138, 82, 26, 84, 61, 86, 144, 61, + 89, 142, 143, 61, 93, 94, 95, 61, 65, 98, + 99, 142, 143, 102, 71, 72, 105, 106, 75, 142, + 143, 78, 79, 80, 113, 82, 31, 84, 61, 86, + 61, 68, 89, 62, 73, 71, 93, 94, 95, 12, + 80, 98, 99, 71, 71, 102, 71, 71, 105, 106, + 71, 71, 71, 142, 143, 71, 113, 71, 71, 71, + 65, 71, 71, 71, 71, 76, 71, 73, 90, 73, + 75, 73, 73, 78, 79, 80, 73, 82, 76, 84, + 76, 86, 117, 117, 89, 142, 143, 90, 93, 94, + 95, 12, 65, 98, 99, 88, 88, 102, 71, 88, + 105, 106, 75, 88, 88, 78, 79, 80, 113, 82, + 96, 84, 103, 86, 96, 141, 89, 104, 141, 134, + 93, 94, 95, 12, 123, 98, 99, 121, 123, 102, + 120, 148, 105, 106, 122, -1, -1, 142, 143, 120, + 113, 146, 122, 122, 65, 122, 124, 123, -1, 149, + 71, -1, -1, -1, 75, -1, -1, 78, 79, 80, + 143, 82, 137, 84, -1, 86, 137, 137, 89, 142, + 143, 137, 93, 94, 95, 12, 65, 98, 99, 137, + 137, 102, 71, 137, 105, 106, 75, 137, 141, 78, + 79, 80, 113, 82, 142, 84, 142, 86, 142, 142, + 89, 142, 142, 142, 93, 94, 95, 142, 142, 98, + 99, 142, 142, 102, 142, 142, 105, 106, 142, 142, + 142, 142, 143, 142, 113, 142, 142, 142, 65, 142, + 142, 142, 142, 142, 71, 142, 144, 143, 75, 143, + 143, 78, 79, 80, 143, 82, 143, 84, 143, 86, + 143, 143, 89, 142, 143, 143, 93, 94, 95, 143, + 65, 98, 99, 144, 144, 102, 71, 144, 105, 106, + 75, 144, 144, 78, 79, 80, 113, 82, 144, 84, + 144, 86, 144, 144, 89, 42, 43, 144, 93, 94, + 95, 144, 144, 98, 99, 144, 146, 102, 145, 145, + 105, 106, 145, 145, 61, 142, 143, 145, 113, 145, + 145, 145, 69, 70, 145, 65, 73, 145, 145, 145, + 77, 71, 145, 145, 145, 75, 145, 145, 78, 79, + 80, 145, 82, 145, 84, 146, 86, 142, 143, 89, + 146, 146, 146, 93, 94, 95, 146, 146, 98, 99, + 146, 146, 102, 146, 146, 105, 106, 146, 146, 146, + 146, 146, 146, 113, 146, 146, 146, 146, 125, -1, + 127, 128, 129, 130, 131, 132, 133, 149, 149, 149, + 149, 149, 139, 140, 96, 97, 149, 149, 145, 96, + 147, 103, 142, 143, 149, 107, 108, 8, 9, 10, + 107, 108, 149, 149, 116, 117, 118, 119, 149, 116, + 117, 118, 119, 96, 25, 149, 27, 28, 29, 30, + 31, 149, -1, -1, 107, 108, 138, 96, -1, -1, + -1, 96, 144, 116, 117, 118, 119, 144, 107, 108, + -1, -1, 107, 108, 96, -1, -1, 116, 117, 118, + 119, 116, 117, 118, 119, 107, 108, -1, -1, -1, + 96, 144, -1, -1, 116, 117, 118, 119, -1, -1, + -1, 107, 108, 96, -1, 144, -1, 96, 83, 144, + 116, 117, 118, 119, 107, 108, -1, -1, 107, 108, + -1, 96, 144, 116, 117, 118, 119, 116, 117, 118, + 119, -1, 107, 108, 85, -1, -1, -1, 144, -1, + 87, 116, 117, 118, 119, 96, -1, -1, -1, 96, + -1, 144, -1, -1, -1, 144, 107, 108, -1, -1, + 107, 108, 8, 9, 10, 116, 117, 118, 119, 116, + 117, 118, 119, -1, 96, -1, -1, -1, -1, 25, + -1, 27, 28, 29, 30, 107, 108, -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 119 ); protected static $yybase = array( - 0, 702, 423, 110, 427, 772, 2, 329, 878, 776, - 835, 822, 818, 864, 805, 789, 601, 601, 601, 601, - 601, 383, 347, 364, 362, 364, 387, -2, -2, -2, - 411, 192, 192, 651, 192, 244, 516, 600, 568, 328, - 379, 160, 276, 484, 484, 484, 484, 683, 683, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 158, 493, 429, 476, 490, 489, 496, 494, 689, - 376, 584, 577, 389, 571, 570, 563, 560, 559, 588, - 557, 680, 556, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 321, 368, 206, 206, 206, 206, 206, + 0, 728, 294, 110, 757, 733, 2, 863, 859, 821, + 817, 804, 788, 835, 775, 771, 888, 888, 888, 888, + 888, 368, 377, 408, 357, 408, 370, -2, -2, -2, + 435, 192, 192, 635, 192, 244, 519, 551, 603, 383, + 351, 160, 276, 467, 467, 467, 467, 690, 690, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 158, 513, 445, 464, 500, 496, 499, 501, 658, + 447, 591, 587, 391, 574, 568, 567, 563, 560, 588, + 559, 440, 532, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 225, 371, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 178, 178, 80, 731, 731, 731, 731, 731, 731, 731, - 731, 731, 731, 731, -3, 948, 814, 803, 167, 167, - 167, 167, 13, -25, -25, -25, -25, 108, 148, 209, - 113, 113, 469, 469, 394, 469, 549, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 441, 416, - 240, 240, 589, 589, 64, 64, 64, 64, 306, 238, - -10, 213, -28, 386, 242, 242, 242, 449, 422, 442, - 193, 137, 271, 271, 271, -24, -24, -24, -24, 415, - -24, -24, -24, -69, 182, -50, -50, -29, 205, 457, - 583, 447, 579, 286, 467, -41, 259, 465, 77, 433, - 465, 313, 317, 296, 479, 89, 77, 158, 297, 189, - 507, 431, 511, 444, 88, 99, 135, -23, 218, 146, - 1, 450, 691, 690, 699, 151, 470, 101, -55, 218, - 221, 692, 535, 32, 63, 509, 256, 393, 634, 417, - 420, 396, 417, 421, 393, 626, 626, 626, 626, 393, - 412, 420, 420, 393, 394, 420, 254, 412, 393, 455, - 412, 454, 626, 526, 530, 417, 439, 451, 420, 420, - 420, 396, 393, 626, 424, 94, 420, 626, 424, 393, - 421, 185, 385, 391, 630, 625, 567, 436, 426, 434, - 443, 607, 606, 596, 398, 428, 615, 635, 472, 513, - 430, 353, 388, 382, 374, 471, 377, 462, 433, 487, - 371, 463, 483, 463, 726, 482, 486, 466, 435, 488, - 351, 318, 481, 472, 645, 668, 459, 409, 594, 657, - 463, 725, 522, 186, 332, 593, 395, 463, 602, 463, - 644, 540, 610, 463, 641, 437, 581, 472, 371, 371, - 371, 640, 724, 720, 718, 717, 716, 708, 706, 390, - 705, 492, 661, 304, 623, 479, 464, 404, 495, 214, - 704, 463, 463, 542, 415, 463, 498, 461, 681, 499, - 656, 425, 453, 703, 422, 408, 660, 463, 452, 700, - 214, 366, 392, 637, 500, 544, 591, 545, 346, 638, - 614, 553, 355, 580, 378, 502, 671, 670, 701, 518, - 547, 384, 438, 380, 621, 527, 649, 448, 480, 446, - 445, 548, 432, 669, 534, 503, 514, 0, 0, 0, + 178, 178, 80, 683, 683, 683, 683, 683, 683, 683, + 683, 683, 683, 683, -3, 396, 964, 829, 167, 167, + 167, 167, 13, -25, -25, -25, -25, 209, 108, 148, + 113, 113, 462, 462, 411, 552, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 443, 412, 240, + 240, 594, 594, 64, 64, 64, 64, 302, -10, 238, + 235, -28, 429, 137, 137, 137, 444, 425, 442, 197, + 193, 271, 271, 271, -24, -24, -24, -24, 457, -24, + -24, -24, -69, 182, -50, -50, -29, 184, 418, 583, + 437, 578, 317, 490, -41, 309, 417, 146, 454, 417, + 332, 326, 314, 483, 89, 146, 158, 299, 218, 517, + 413, 528, 448, 99, 88, 32, -23, 189, 226, 63, + 456, 661, 659, 101, 151, 463, 1, -55, 189, 221, + 533, 135, 143, 518, 242, 333, 621, 432, 626, 415, + 432, 434, 333, 618, 618, 618, 618, 333, 404, 626, + 626, 333, 411, 626, 186, 404, 333, 450, 404, 459, + 618, 497, 530, 432, 439, 446, 626, 626, 626, 415, + 333, 618, 449, 214, 626, 618, 449, 333, 434, 185, + 374, 375, 619, 593, 628, 431, 534, 406, 405, 606, + 605, 602, 424, 426, 609, 622, 414, 509, 427, 363, + 382, 378, 386, 474, 409, 460, 454, 487, 360, 461, + 470, 461, 712, 486, 482, 452, 400, 510, 353, 346, + 536, 414, 636, 648, 423, 428, 598, 644, 461, 706, + 494, 94, 355, 597, 420, 461, 604, 461, 634, 537, + 461, 629, 433, 576, 414, 360, 360, 360, 660, 699, + 694, 693, 685, 678, 677, 672, 407, 671, 512, 647, + 322, 614, 483, 465, 421, 516, 338, 670, 461, 461, + 541, 457, 461, 521, 492, 654, 523, 641, 436, 441, + 669, 425, 419, 645, 461, 458, 668, 338, 394, 403, + 656, 524, 543, 613, 545, 339, 590, 617, 556, 335, + 579, 362, 505, 653, 652, 655, 506, 547, 430, 438, + 401, 612, 527, 640, 455, 469, 453, 451, 548, 416, + 651, 525, 531, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -2, -2, -2, -2, -2, + 0, 0, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, 0, 0, 0, -2, -2, -2, -2, -2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, 0, 0, + 0, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, @@ -628,34 +630,34 @@ class PHPParser_Parser -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, 124, 124, 124, 124, 124, + -2, -2, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 124, 124, 124, + 124, 124, 124, 124, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 124, 124, - 124, 124, 124, 124, 124, 124, 0, 271, 271, 271, - 271, 72, 72, 72, 163, 163, 163, 163, 163, 163, - 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 72, 72, 271, 271, 163, 163, -24, -24, - -24, -24, -24, -50, -50, -50, -24, -50, 149, 149, - 149, -50, -50, -50, 146, 146, 0, 0, 0, 0, - 0, 0, 0, 149, 0, 0, 0, 412, 420, 0, - 0, 0, 149, 303, 303, 303, 303, 214, 218, 0, - 472, 412, 0, 439, 412, 0, 0, 0, 420, 0, - 0, 0, 0, 0, 186, 594, 261, 472, 0, 0, - 0, 0, 0, 0, 0, 472, 292, 292, 226, 0, - 390, 0, 0, 0, 0, 226, 261, 0, 0, 214 + 124, 124, 124, 124, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 124, 124, 124, 124, 124, + 124, 124, 124, 0, 271, 271, 271, 271, 72, 72, + 72, 163, 163, 163, 163, 163, 163, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 72, 72, + 271, 271, 163, 163, -24, -24, -24, -24, -24, -50, + -50, -50, -24, -50, 149, 149, 149, -50, -50, -50, + 226, 226, 0, 0, 0, 0, 0, 0, 0, 149, + 0, 0, 0, 404, 626, 0, 0, 0, 149, 316, + 316, 316, 316, 338, 189, 0, 414, 404, 0, 439, + 404, 0, 0, 0, 626, 0, 0, 0, 0, 0, + 94, 598, 254, 414, 0, 0, 0, 0, 0, 0, + 0, 414, 217, 217, 0, 0, 407, 0, 0, 0, + 0, 254, 0, 0, 338 ); protected static $yydefault = array( 3,32767,32767, 1,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 106, 98, 112, 97, 108,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 375, 375,32767, 333,32767,32767,32767,32767,32767, - 32767,32767,32767, 179, 179, 179,32767,32767,32767, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365,32767, + 32767, 375, 375,32767, 332,32767,32767,32767,32767,32767, + 32767,32767,32767, 179, 179, 179,32767,32767,32767, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 364,32767, 32767,32767,32767,32767, 257,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -665,90 +667,89 @@ class PHPParser_Parser 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767, 262, 380,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 238, 239, 241, 242, 178, 366, 131, + 32767,32767,32767, 238, 239, 241, 242, 178, 365, 131, 263, 379, 177, 205, 207, 256, 206, 183, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 182, - 235, 234, 203, 330, 330, 333,32767,32767,32767,32767, + 235, 234, 203, 329, 329, 332,32767,32767,32767,32767, 32767,32767,32767,32767, 204, 208, 210, 209, 225, 226, 223, 224, 181, 227, 228, 229, 230, 163, 163, 163, - 32767,32767, 374, 374,32767, 374,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 164,32767, - 217, 218, 293, 293, 122, 122, 122, 122, 122,32767, - 32767,32767,32767, 301,32767,32767,32767,32767,32767, 303, - 32767,32767, 212, 213, 211,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 338, 302,32767,32767,32767,32767, - 32767,32767,32767,32767, 351, 289,32767,32767,32767, 282, - 32767, 109, 111, 61, 319,32767,32767,32767,32767, 356, - 32767,32767,32767, 17,32767,32767,32767, 387, 351,32767, - 32767, 19,32767,32767,32767,32767, 233,32767,32767, 355, - 349,32767,32767,32767,32767,32767,32767, 65, 298,32767, - 304,32767,32767,32767, 65,32767,32767,32767,32767, 65, - 32767, 354, 353, 65,32767, 283, 332,32767, 65, 76, - 32767, 74,32767, 95, 95,32767,32767, 78, 327, 344, - 32767,32767, 65,32767, 271, 332,32767,32767, 271, 65, - 32767,32767, 4, 308,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 284,32767, - 32767,32767, 253, 254, 340,32767, 341,32767, 282,32767, - 221, 200,32767, 202,32767,32767, 287, 290,32767,32767, - 32767, 140,32767, 285,32767, 186,32767,32767,32767,32767, - 382,32767,32767, 180,32767,32767,32767, 136,32767, 63, - 349,32767,32767, 372,32767,32767, 349, 286, 214, 215, - 216,32767,32767,32767,32767,32767,32767,32767,32767, 350, - 32767,32767,32767, 116,32767, 319,32767,32767,32767, 77, - 32767, 184, 132,32767,32767, 381,32767,32767,32767,32767, - 32767,32767, 337,32767,32767,32767,32767, 64,32767,32767, - 79,32767,32767, 349,32767,32767,32767,32767, 120,32767, - 32767,32767, 175,32767,32767,32767,32767,32767, 349,32767, - 32767,32767,32767,32767,32767,32767,32767, 4,32767, 157, - 32767,32767,32767,32767,32767,32767,32767, 25, 25, 3, - 25, 103, 25, 143, 3, 95, 95, 58, 143, 25, - 143, 25, 25, 25, 25, 25, 25, 25, 150, 25, - 25, 25, 25, 25 + 32767,32767, 374, 374,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 164,32767, 217, + 218, 292, 292, 122, 122, 122, 122, 122,32767,32767, + 32767,32767, 300,32767,32767,32767,32767,32767, 302,32767, + 32767, 212, 213, 211,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 337, 301,32767,32767,32767,32767,32767, + 32767,32767,32767, 350, 288,32767,32767,32767, 281,32767, + 109, 111, 61, 318,32767,32767,32767,32767, 355,32767, + 32767,32767, 17,32767,32767,32767, 387, 350,32767,32767, + 19,32767,32767,32767,32767, 233,32767,32767, 354, 348, + 32767,32767,32767,32767,32767, 65, 297,32767, 303,32767, + 32767,32767, 65,32767,32767,32767,32767, 65,32767, 353, + 352, 65,32767, 282, 331,32767, 65, 76,32767, 74, + 32767, 95, 95,32767,32767, 78, 326, 343,32767,32767, + 65,32767, 270, 331,32767,32767, 270, 65,32767,32767, + 4, 307,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 283,32767,32767,32767, + 253, 254, 339,32767, 340,32767, 281,32767, 221, 200, + 32767, 202,32767,32767, 286, 289,32767,32767,32767, 140, + 32767, 284,32767, 186,32767,32767,32767,32767, 382,32767, + 32767, 180,32767,32767,32767, 136,32767, 63, 348,32767, + 372,32767,32767, 348, 285, 214, 215, 216,32767,32767, + 32767,32767,32767,32767,32767,32767, 349,32767,32767,32767, + 116,32767, 318,32767,32767,32767, 77,32767, 184, 132, + 32767,32767, 381,32767,32767,32767,32767,32767,32767, 336, + 32767,32767,32767,32767, 64,32767,32767, 79,32767,32767, + 348,32767,32767,32767,32767, 120,32767,32767,32767, 175, + 32767,32767,32767,32767,32767, 348,32767,32767,32767,32767, + 32767,32767,32767,32767, 4,32767, 157,32767,32767,32767, + 32767,32767,32767,32767, 25, 25, 3, 25, 103, 25, + 143, 3, 95, 95, 58, 143, 25, 143, 25, 25, + 25, 25, 25, 25, 25, 150, 25, 25, 25, 25, + 25 ); protected static $yygoto = array( 159, 134, 134, 139, 134, 159, 135, 136, 137, 141, 143, 167, 161, 157, 157, 157, 157, 139, 139, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 153, - 154, 155, 156, 165, 133, 753, 754, 390, 756, 777, - 778, 779, 780, 781, 782, 783, 785, 721, 138, 140, + 154, 155, 156, 165, 133, 750, 751, 388, 753, 774, + 775, 776, 777, 778, 779, 780, 782, 718, 138, 140, 142, 163, 164, 166, 182, 194, 195, 196, 197, 198, - 199, 200, 201, 203, 204, 205, 206, 230, 231, 252, - 253, 254, 428, 429, 430, 168, 169, 170, 171, 172, + 199, 200, 201, 203, 204, 205, 206, 229, 230, 251, + 252, 253, 425, 426, 427, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 144, 145, 146, 160, 147, 162, 148, 180, 149, 150, 151, 181, 152, - 131, 445, 445, 445, 445, 445, 445, 445, 445, 445, - 445, 445, 446, 446, 446, 446, 446, 446, 446, 446, - 446, 446, 446, 249, 585, 270, 405, 241, 335, 335, - 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, - 335, 335, 335, 335, 335, 335, 542, 542, 542, 424, - 817, 817, 657, 657, 657, 657, 657, 541, 541, 541, - 498, 396, 396, 432, 433, 434, 435, 436, 437, 438, - 440, 469, 1, 614, 614, 614, 614, 2, 609, 615, - 493, 392, 392, 392, 392, 392, 392, 392, 392, 392, - 392, 392, 392, 392, 392, 392, 392, 392, 392, 460, - 466, 503, 911, 395, 395, 310, 488, 423, 423, 451, - 423, 417, 419, 419, 391, 393, 410, 420, 426, 452, - 455, 467, 473, 5, 880, 16, 208, 6, 209, 540, - 540, 540, 457, 486, 7, 664, 17, 18, 8, 19, - 9, 10, 11, 290, 20, 12, 13, 14, 15, 635, - 620, 618, 616, 618, 511, 398, 644, 639, 854, 854, - 854, 854, 854, 854, 854, 854, 854, 854, 854, 917, - 917, 431, 479, 276, 404, 868, 834, 920, 917, 487, - 839, 649, 649, 774, 26, 21, 285, 293, 404, 404, - 293, 813, 814, 719, 920, 920, 271, 272, 700, 316, - 441, 470, 273, 315, 397, 397, 888, 888, 811, 879, - 811, 29, 829, 828, 311, 484, 812, 557, 675, 624, - 856, 857, 870, 655, 710, 887, 887, 298, 298, 298, - 904, 765, 291, 653, 303, 549, 408, 903, 903, 903, - 403, 418, 298, 667, 312, 521, 555, 301, 808, 623, - 427, 309, 886, 672, 865, 461, 708, 0, 0, 0, - 490, 0, 491, 0, 0, 0, 0, 0, 0, 0, + 131, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 443, 443, 443, 443, 443, 443, 443, 443, + 443, 443, 443, 403, 646, 646, 904, 904, 333, 333, + 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, + 333, 333, 333, 333, 333, 538, 538, 538, 582, 813, + 813, 654, 654, 654, 654, 654, 297, 297, 297, 495, + 394, 394, 429, 430, 431, 432, 433, 434, 435, 437, + 466, 297, 611, 611, 611, 611, 908, 606, 612, 490, + 308, 390, 390, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 390, 269, 539, + 539, 539, 393, 393, 309, 485, 420, 420, 448, 415, + 417, 417, 389, 391, 408, 418, 423, 449, 452, 464, + 470, 5, 876, 16, 421, 6, 1, 537, 537, 537, + 661, 2, 7, 289, 17, 18, 8, 19, 9, 10, + 11, 476, 20, 12, 13, 14, 15, 632, 617, 615, + 613, 615, 508, 396, 641, 636, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 914, 914, 208, + 275, 209, 864, 830, 248, 917, 914, 835, 240, 484, + 771, 26, 21, 284, 292, 454, 483, 292, 809, 810, + 716, 901, 917, 917, 457, 463, 500, 438, 467, 272, + 313, 697, 314, 884, 884, 807, 875, 807, 29, 302, + 883, 883, 481, 808, 554, 672, 621, 852, 853, 866, + 652, 707, 899, 899, 899, 290, 650, 428, 762, 406, + 402, 395, 395, 546, 416, 664, 401, 882, 825, 824, + 310, 518, 552, 300, 402, 402, 424, 804, 458, 669, + 620, 487, 0, 0, 705, 488, 861, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 270, 271, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 409 + 0, 0, 0, 0, 0, 0, 0, 0, 407 ); protected static $yygcheck = array( @@ -763,67 +764,66 @@ class PHPParser_Parser 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 99, 31, 48, 75, 99, 38, 38, + 38, 38, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 75, 53, 53, 53, 53, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 7, 7, 7, 83, - 38, 38, 38, 38, 38, 38, 38, 6, 6, 6, - 38, 93, 93, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 2, 38, 38, 38, 38, 2, 38, 38, - 38, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 40, - 40, 40, 111, 90, 90, 32, 32, 32, 32, 32, + 38, 38, 38, 38, 38, 6, 6, 6, 31, 38, + 38, 38, 38, 38, 38, 38, 96, 96, 96, 38, + 92, 92, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 96, 38, 38, 38, 38, 111, 38, 38, 38, + 96, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 48, 7, + 7, 7, 89, 89, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 13, 57, 13, 44, 13, 44, 5, - 5, 5, 21, 21, 13, 59, 13, 13, 13, 13, - 13, 13, 13, 28, 13, 13, 13, 13, 13, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, 100, 112, - 112, 25, 101, 4, 25, 104, 15, 112, 112, 30, - 57, 53, 53, 15, 15, 15, 15, 4, 25, 25, - 4, 57, 57, 75, 112, 112, 48, 48, 72, 72, - 15, 46, 46, 46, 96, 96, 91, 91, 57, 57, - 57, 15, 98, 98, 86, 15, 57, 12, 12, 12, - 12, 12, 12, 12, 12, 92, 92, 97, 97, 97, - 109, 76, 39, 55, 29, 10, 39, 92, 92, 92, - 4, 39, 97, 60, 9, 50, 11, 4, 88, 47, - 4, 97, 92, 61, 103, 39, 74, -1, -1, -1, - 82, -1, 39, -1, -1, -1, -1, -1, -1, -1, + 32, 13, 57, 13, 83, 13, 2, 5, 5, 5, + 59, 2, 13, 28, 13, 13, 13, 13, 13, 13, + 13, 100, 13, 13, 13, 13, 13, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 112, 112, 44, + 4, 44, 103, 15, 98, 112, 112, 57, 98, 30, + 15, 15, 15, 15, 4, 21, 21, 4, 57, 57, + 75, 109, 112, 112, 40, 40, 40, 15, 46, 46, + 46, 72, 72, 90, 90, 57, 57, 57, 15, 29, + 91, 91, 15, 57, 12, 12, 12, 12, 12, 12, + 12, 12, 91, 91, 91, 39, 55, 25, 76, 39, + 25, 95, 95, 10, 39, 60, 4, 91, 97, 97, + 9, 50, 11, 4, 25, 25, 4, 87, 39, 61, + 47, 82, -1, -1, 74, 39, 102, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 48, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 75 + -1, -1, -1, -1, -1, -1, -1, -1, 75 ); protected static $yygbase = array( - 0, 0, -337, 0, 10, 228, 156, 145, 0, 22, - 55, 1, 131, -285, 0, -42, 0, 0, 0, 0, - 0, 188, 0, 0, -30, 241, 0, 0, 197, 116, - 68, 99, -5, 0, 0, 0, 0, 0, -82, 3, - -36, 0, 0, 0, -292, 0, 45, -2, -219, 0, - 58, 0, 0, 71, 0, 95, 0, -40, 0, 200, - 57, 7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 70, 0, -4, 79, 98, 0, 0, 0, - 0, 0, 2, 117, 113, 0, 101, 0, 24, 0, - -29, 74, 93, -71, 0, 0, 72, 83, 67, -120, - 75, 88, 0, -1, 90, 0, 0, 0, 0, 115, - 0, 168, 29, 0 + 0, 0, -280, 0, 8, 226, 144, 198, 0, 20, + 54, -1, 128, -284, 0, -43, 0, 0, 0, 0, + 0, 241, 0, 0, -30, 297, 0, 0, 187, 92, + 68, 123, -6, 0, 0, 0, 0, 0, -82, -2, + 60, 0, 0, 0, -246, 0, 43, 1, -144, 0, + 55, 0, 0, -86, 0, 89, 0, -41, 0, 195, + 50, 5, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 74, 0, -4, 76, 96, 0, 0, 0, + 0, 0, -5, 192, 112, 0, 0, 25, 0, -29, + 72, 79, -71, 0, 0, 100, -87, 94, 32, 73, + 57, 0, 3, 87, 0, 0, 0, 0, 0, 78, + 0, 142, 28, 0 ); protected static $yygdefault = array( - -32768, 361, 3, 536, 378, 560, 561, 562, 294, 292, - 550, 556, 462, 4, 558, 766, 281, 565, 282, 472, - 567, 412, 569, 570, 132, 379, 295, 296, 413, 302, - 458, 584, 202, 300, 586, 283, 588, 593, 284, 492, - 442, 380, 347, 453, 207, 421, 449, 622, 269, 630, - 524, 638, 641, 381, 443, 652, 352, 810, 307, 663, - 668, 673, 676, 323, 313, 468, 680, 681, 242, 685, - 499, 500, 699, 228, 707, 720, 320, 784, 786, 382, - 383, 406, 477, 394, 411, 803, 304, 314, 807, 384, - 385, 331, 332, 825, 822, 275, 873, 274, 349, 240, - 860, 463, 355, 910, 869, 264, 386, 387, 289, 905, - 336, 912, 919, 450 + -32768, 359, 3, 533, 376, 557, 558, 559, 293, 291, + 547, 553, 459, 4, 555, 763, 280, 562, 281, 469, + 564, 410, 566, 567, 132, 377, 294, 295, 411, 301, + 455, 581, 202, 299, 583, 282, 585, 590, 283, 489, + 439, 378, 345, 450, 207, 419, 446, 619, 268, 627, + 521, 635, 638, 379, 440, 649, 350, 806, 306, 660, + 665, 670, 673, 321, 311, 465, 677, 678, 241, 682, + 496, 497, 696, 227, 704, 717, 318, 781, 783, 380, + 381, 404, 474, 392, 409, 800, 312, 803, 382, 383, + 329, 330, 821, 818, 274, 869, 273, 347, 239, 856, + 460, 353, 907, 865, 263, 384, 385, 288, 303, 902, + 334, 909, 916, 447 ); protected static $yylhs = array( @@ -854,18 +854,18 @@ class PHPParser_Parser 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 15, 15, 25, 25, 79, 79, 80, 80, 80, 75, - 53, 82, 82, 87, 87, 88, 89, 89, 89, 89, - 89, 89, 93, 93, 38, 38, 38, 76, 76, 94, - 94, 90, 90, 95, 95, 95, 95, 95, 77, 77, - 77, 81, 81, 81, 85, 85, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, - 12, 12, 12, 12, 12, 12, 78, 78, 78, 78, - 101, 101, 103, 103, 102, 102, 104, 104, 32, 32, - 32, 32, 106, 106, 105, 105, 105, 105, 105, 107, - 107, 92, 92, 96, 96, 91, 91, 108, 108, 108, - 108, 97, 97, 97, 97, 84, 84, 98, 98, 98, - 86, 86, 109, 109, 109, 83, 83, 110, 110, 111, - 111, 111, 111, 99, 99, 99, 99, 112, 112, 112, + 82, 82, 86, 86, 87, 88, 88, 88, 88, 88, + 88, 92, 92, 38, 38, 38, 76, 76, 93, 93, + 89, 89, 94, 94, 94, 94, 94, 77, 77, 77, + 81, 81, 81, 85, 85, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 12, + 12, 12, 12, 12, 12, 78, 78, 78, 78, 100, + 100, 102, 102, 101, 101, 103, 103, 32, 32, 32, + 32, 105, 105, 104, 104, 104, 104, 104, 106, 106, + 91, 91, 95, 95, 90, 90, 107, 107, 107, 107, + 96, 96, 96, 96, 84, 84, 97, 97, 97, 53, + 108, 108, 109, 109, 109, 83, 83, 110, 110, 111, + 111, 111, 111, 98, 98, 98, 98, 112, 112, 112, 112, 112, 112, 112, 113, 113, 113 ); @@ -897,17 +897,17 @@ class PHPParser_Parser 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, 2, 1, 9, 10, 3, 3, 2, 4, 4, 3, 4, 4, 4, 3, - 4, 0, 4, 1, 3, 2, 2, 4, 6, 2, - 2, 4, 1, 1, 1, 2, 3, 1, 1, 1, - 1, 1, 1, 0, 3, 3, 4, 4, 0, 2, - 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, - 1, 3, 2, 2, 4, 3, 1, 3, 3, 3, - 0, 2, 0, 1, 3, 1, 3, 1, 1, 1, - 1, 1, 6, 4, 3, 4, 2, 4, 4, 1, - 3, 1, 2, 1, 1, 4, 1, 3, 6, 4, - 4, 4, 4, 1, 4, 0, 1, 1, 3, 1, - 3, 1, 1, 4, 0, 0, 2, 3, 1, 3, + 0, 4, 1, 3, 2, 2, 4, 6, 2, 2, + 4, 1, 1, 1, 2, 3, 1, 1, 1, 1, + 1, 1, 0, 3, 3, 4, 4, 0, 2, 1, + 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, + 3, 2, 2, 4, 3, 1, 3, 3, 3, 0, + 2, 0, 1, 3, 1, 3, 1, 1, 1, 1, + 1, 6, 4, 3, 4, 2, 4, 4, 1, 3, + 1, 2, 1, 1, 4, 1, 3, 6, 4, 4, + 4, 4, 1, 4, 0, 1, 1, 3, 1, 4, + 3, 1, 1, 1, 0, 0, 2, 3, 1, 3, 1, 4, 2, 2, 2, 1, 2, 1, 4, 3, 3, 3, 6, 3, 1, 1, 1 ); @@ -2123,7 +2123,7 @@ class PHPParser_Parser } protected function yyn263($attributes) { - $this->yyval = new PHPParser_Node_Expr_Yield($this->yyastk[$this->stackPos-(4-2)], $this->yyastk[$this->stackPos-(4-4)], $attributes); + $this->yyval = new PHPParser_Node_Expr_Yield($this->yyastk[$this->stackPos-(4-4)], $this->yyastk[$this->stackPos-(4-2)], $attributes); } protected function yyn264($attributes) { @@ -2151,42 +2151,38 @@ class PHPParser_Parser } protected function yyn270($attributes) { - $this->yyval = new PHPParser_Node_Expr_List($this->yyastk[$this->stackPos-(4-3)], $attributes); - } - - protected function yyn271($attributes) { $this->yyval = array(); } - protected function yyn272($attributes) { + protected function yyn271($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(4-3)]; } - protected function yyn273($attributes) { + protected function yyn272($attributes) { $this->yyval = array($this->yyastk[$this->stackPos-(1-1)]); } - protected function yyn274($attributes) { + protected function yyn273($attributes) { $this->yyastk[$this->stackPos-(3-1)][] = $this->yyastk[$this->stackPos-(3-3)]; $this->yyval = $this->yyastk[$this->stackPos-(3-1)]; } - protected function yyn275($attributes) { + protected function yyn274($attributes) { $this->yyval = new PHPParser_Node_Expr_ClosureUse(substr($this->yyastk[$this->stackPos-(2-2)], 1), $this->yyastk[$this->stackPos-(2-1)], $attributes); } - protected function yyn276($attributes) { + protected function yyn275($attributes) { $this->yyval = new PHPParser_Node_Expr_FuncCall($this->yyastk[$this->stackPos-(2-1)], $this->yyastk[$this->stackPos-(2-2)], $attributes); } - protected function yyn277($attributes) { + protected function yyn276($attributes) { $this->yyval = new PHPParser_Node_Expr_StaticCall($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $this->yyastk[$this->stackPos-(4-4)], $attributes); } - protected function yyn278($attributes) { + protected function yyn277($attributes) { $this->yyval = new PHPParser_Node_Expr_StaticCall($this->yyastk[$this->stackPos-(6-1)], $this->yyastk[$this->stackPos-(6-4)], $this->yyastk[$this->stackPos-(6-6)], $attributes); } - protected function yyn279($attributes) { + protected function yyn278($attributes) { if ($this->yyastk[$this->stackPos-(2-1)] instanceof PHPParser_Node_Expr_StaticPropertyFetch) { $this->yyval = new PHPParser_Node_Expr_StaticCall($this->yyastk[$this->stackPos-(2-1)]->class, new PHPParser_Node_Expr_Variable($this->yyastk[$this->stackPos-(2-1)]->name, $attributes), $this->yyastk[$this->stackPos-(2-2)], $attributes); @@ -2204,34 +2200,38 @@ class PHPParser_Parser } - protected function yyn280($attributes) { + protected function yyn279($attributes) { $this->yyval = new PHPParser_Node_Expr_FuncCall($this->yyastk[$this->stackPos-(2-1)], $this->yyastk[$this->stackPos-(2-2)], $attributes); } - protected function yyn281($attributes) { + protected function yyn280($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); } - protected function yyn282($attributes) { + protected function yyn281($attributes) { $this->yyval = new PHPParser_Node_Name('static', $attributes); } - protected function yyn283($attributes) { + protected function yyn282($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } - protected function yyn284($attributes) { + protected function yyn283($attributes) { $this->yyval = new PHPParser_Node_Name($this->yyastk[$this->stackPos-(1-1)], $attributes); } - protected function yyn285($attributes) { + protected function yyn284($attributes) { $this->yyval = new PHPParser_Node_Name_FullyQualified($this->yyastk[$this->stackPos-(2-2)], $attributes); } - protected function yyn286($attributes) { + protected function yyn285($attributes) { $this->yyval = new PHPParser_Node_Name_Relative($this->yyastk[$this->stackPos-(3-3)], $attributes); } + protected function yyn286($attributes) { + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + } + protected function yyn287($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } @@ -2252,12 +2252,12 @@ class PHPParser_Parser $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } - protected function yyn292($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + protected function yyn292() { + $this->yyval = $this->yyastk[$this->stackPos]; } - protected function yyn293() { - $this->yyval = $this->yyastk[$this->stackPos]; + protected function yyn293($attributes) { + $this->yyval = new PHPParser_Node_Expr_PropertyFetch($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-3)], $attributes); } protected function yyn294($attributes) { @@ -2265,7 +2265,7 @@ class PHPParser_Parser } protected function yyn295($attributes) { - $this->yyval = new PHPParser_Node_Expr_PropertyFetch($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-3)], $attributes); + $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); } protected function yyn296($attributes) { @@ -2273,7 +2273,7 @@ class PHPParser_Parser } protected function yyn297($attributes) { - $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); + $this->yyval = null; } protected function yyn298($attributes) { @@ -2281,161 +2281,161 @@ class PHPParser_Parser } protected function yyn299($attributes) { - $this->yyval = null; + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } protected function yyn300($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + $this->yyval = array(); } protected function yyn301($attributes) { - $this->yyval = array(); - } - - protected function yyn302($attributes) { $this->yyval = array(PHPParser_Node_Scalar_String::parseEscapeSequences($this->yyastk[$this->stackPos-(1-1)], '`')); } - protected function yyn303($attributes) { + protected function yyn302($attributes) { foreach ($this->yyastk[$this->stackPos-(1-1)] as &$s) { if (is_string($s)) { $s = PHPParser_Node_Scalar_String::parseEscapeSequences($s, '`'); } }; $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } - protected function yyn304($attributes) { + protected function yyn303($attributes) { $this->yyval = array(); } + protected function yyn304($attributes) { + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + } + protected function yyn305($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; - } - - protected function yyn306($attributes) { $this->yyval = new PHPParser_Node_Scalar_LNumber(PHPParser_Node_Scalar_LNumber::parse($this->yyastk[$this->stackPos-(1-1)]), $attributes); } - protected function yyn307($attributes) { + protected function yyn306($attributes) { $this->yyval = new PHPParser_Node_Scalar_DNumber(PHPParser_Node_Scalar_DNumber::parse($this->yyastk[$this->stackPos-(1-1)]), $attributes); } - protected function yyn308($attributes) { + protected function yyn307($attributes) { $this->yyval = PHPParser_Node_Scalar_String::create($this->yyastk[$this->stackPos-(1-1)], $attributes); } - protected function yyn309($attributes) { + protected function yyn308($attributes) { $this->yyval = new PHPParser_Node_Scalar_LineConst($attributes); } - protected function yyn310($attributes) { + protected function yyn309($attributes) { $this->yyval = new PHPParser_Node_Scalar_FileConst($attributes); } - protected function yyn311($attributes) { + protected function yyn310($attributes) { $this->yyval = new PHPParser_Node_Scalar_DirConst($attributes); } - protected function yyn312($attributes) { + protected function yyn311($attributes) { $this->yyval = new PHPParser_Node_Scalar_ClassConst($attributes); } - protected function yyn313($attributes) { + protected function yyn312($attributes) { $this->yyval = new PHPParser_Node_Scalar_TraitConst($attributes); } - protected function yyn314($attributes) { + protected function yyn313($attributes) { $this->yyval = new PHPParser_Node_Scalar_MethodConst($attributes); } - protected function yyn315($attributes) { + protected function yyn314($attributes) { $this->yyval = new PHPParser_Node_Scalar_FuncConst($attributes); } - protected function yyn316($attributes) { + protected function yyn315($attributes) { $this->yyval = new PHPParser_Node_Scalar_NSConst($attributes); } - protected function yyn317($attributes) { + protected function yyn316($attributes) { $this->yyval = new PHPParser_Node_Scalar_String(PHPParser_Node_Scalar_String::parseDocString($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-2)]), $attributes); } - protected function yyn318($attributes) { + protected function yyn317($attributes) { $this->yyval = new PHPParser_Node_Scalar_String('', $attributes); } - protected function yyn319($attributes) { + protected function yyn318($attributes) { $this->yyval = new PHPParser_Node_Expr_ConstFetch($this->yyastk[$this->stackPos-(1-1)], $attributes); } - protected function yyn320($attributes) { + protected function yyn319($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } + protected function yyn320($attributes) { + $this->yyval = new PHPParser_Node_Expr_ClassConstFetch($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-3)], $attributes); + } + protected function yyn321($attributes) { - $this->yyval = new PHPParser_Node_Expr_ClassConstFetch($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-3)], $attributes); - } - - protected function yyn322($attributes) { $this->yyval = new PHPParser_Node_Expr_UnaryPlus($this->yyastk[$this->stackPos-(2-2)], $attributes); } - protected function yyn323($attributes) { + protected function yyn322($attributes) { $this->yyval = new PHPParser_Node_Expr_UnaryMinus($this->yyastk[$this->stackPos-(2-2)], $attributes); } - protected function yyn324($attributes) { + protected function yyn323($attributes) { $this->yyval = new PHPParser_Node_Expr_Array($this->yyastk[$this->stackPos-(4-3)], $attributes); } - protected function yyn325($attributes) { + protected function yyn324($attributes) { $this->yyval = new PHPParser_Node_Expr_Array($this->yyastk[$this->stackPos-(3-2)], $attributes); } - protected function yyn326($attributes) { + protected function yyn325($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } - protected function yyn327($attributes) { + protected function yyn326($attributes) { $this->yyval = new PHPParser_Node_Expr_ClassConstFetch($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-3)], $attributes); } - protected function yyn328($attributes) { + protected function yyn327($attributes) { foreach ($this->yyastk[$this->stackPos-(3-2)] as &$s) { if (is_string($s)) { $s = PHPParser_Node_Scalar_String::parseEscapeSequences($s, '"'); } }; $this->yyval = new PHPParser_Node_Scalar_Encapsed($this->yyastk[$this->stackPos-(3-2)], $attributes); } - protected function yyn329($attributes) { + protected function yyn328($attributes) { foreach ($this->yyastk[$this->stackPos-(3-2)] as &$s) { if (is_string($s)) { $s = PHPParser_Node_Scalar_String::parseEscapeSequences($s, null); } } $s = preg_replace('~(\r\n|\n|\r)$~', '', $s); if ('' === $s) array_pop($this->yyastk[$this->stackPos-(3-2)]);; $this->yyval = new PHPParser_Node_Scalar_Encapsed($this->yyastk[$this->stackPos-(3-2)], $attributes); } - protected function yyn330($attributes) { + protected function yyn329($attributes) { $this->yyval = array(); } - protected function yyn331($attributes) { + protected function yyn330($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(2-1)]; } + protected function yyn331() { + $this->yyval = $this->yyastk[$this->stackPos]; + } + protected function yyn332() { $this->yyval = $this->yyastk[$this->stackPos]; } - protected function yyn333() { - $this->yyval = $this->yyastk[$this->stackPos]; - } - - protected function yyn334($attributes) { + protected function yyn333($attributes) { $this->yyastk[$this->stackPos-(3-1)][] = $this->yyastk[$this->stackPos-(3-3)]; $this->yyval = $this->yyastk[$this->stackPos-(3-1)]; } - protected function yyn335($attributes) { + protected function yyn334($attributes) { $this->yyval = array($this->yyastk[$this->stackPos-(1-1)]); } - protected function yyn336($attributes) { + protected function yyn335($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayItem($this->yyastk[$this->stackPos-(3-3)], $this->yyastk[$this->stackPos-(3-1)], false, $attributes); } - protected function yyn337($attributes) { + protected function yyn336($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayItem($this->yyastk[$this->stackPos-(1-1)], null, false, $attributes); } + protected function yyn337($attributes) { + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + } + protected function yyn338($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } @@ -2449,77 +2449,77 @@ class PHPParser_Parser } protected function yyn341($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; - } - - protected function yyn342($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(6-2)], $this->yyastk[$this->stackPos-(6-5)], $attributes); } - protected function yyn343($attributes) { + protected function yyn342($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); } - protected function yyn344($attributes) { + protected function yyn343($attributes) { $this->yyval = new PHPParser_Node_Expr_PropertyFetch($this->yyastk[$this->stackPos-(3-1)], $this->yyastk[$this->stackPos-(3-3)], $attributes); } - protected function yyn345($attributes) { + protected function yyn344($attributes) { $this->yyval = new PHPParser_Node_Expr_MethodCall($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $this->yyastk[$this->stackPos-(4-4)], $attributes); } - protected function yyn346($attributes) { + protected function yyn345($attributes) { $this->yyval = new PHPParser_Node_Expr_FuncCall($this->yyastk[$this->stackPos-(2-1)], $this->yyastk[$this->stackPos-(2-2)], $attributes); } + protected function yyn346($attributes) { + $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); + } + protected function yyn347($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); } protected function yyn348($attributes) { - $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } protected function yyn349($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; - } - - protected function yyn350($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(3-2)]; } - protected function yyn351($attributes) { + protected function yyn350($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } - protected function yyn352($attributes) { + protected function yyn351($attributes) { $this->yyval = new PHPParser_Node_Expr_Variable($this->yyastk[$this->stackPos-(2-2)], $attributes); } + protected function yyn352($attributes) { + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + } + protected function yyn353($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } protected function yyn354($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; - } - - protected function yyn355($attributes) { $this->yyval = new PHPParser_Node_Expr_StaticPropertyFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-4)], $attributes); } - protected function yyn356($attributes) { + protected function yyn355($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } - protected function yyn357($attributes) { + protected function yyn356($attributes) { $this->yyval = new PHPParser_Node_Expr_StaticPropertyFetch($this->yyastk[$this->stackPos-(3-1)], substr($this->yyastk[$this->stackPos-(3-3)], 1), $attributes); } - protected function yyn358($attributes) { + protected function yyn357($attributes) { $this->yyval = new PHPParser_Node_Expr_StaticPropertyFetch($this->yyastk[$this->stackPos-(6-1)], $this->yyastk[$this->stackPos-(6-5)], $attributes); } + protected function yyn358($attributes) { + $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); + } + protected function yyn359($attributes) { $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); } @@ -2533,37 +2533,37 @@ class PHPParser_Parser } protected function yyn362($attributes) { - $this->yyval = new PHPParser_Node_Expr_ArrayDimFetch($this->yyastk[$this->stackPos-(4-1)], $this->yyastk[$this->stackPos-(4-3)], $attributes); - } - - protected function yyn363($attributes) { $this->yyval = new PHPParser_Node_Expr_Variable(substr($this->yyastk[$this->stackPos-(1-1)], 1), $attributes); } - protected function yyn364($attributes) { + protected function yyn363($attributes) { $this->yyval = new PHPParser_Node_Expr_Variable($this->yyastk[$this->stackPos-(4-3)], $attributes); } - protected function yyn365($attributes) { + protected function yyn364($attributes) { $this->yyval = null; } + protected function yyn365($attributes) { + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; + } + protected function yyn366($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } protected function yyn367($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; - } - - protected function yyn368($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(3-2)]; } - protected function yyn369($attributes) { + protected function yyn368($attributes) { $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } + protected function yyn369($attributes) { + $this->yyval = new PHPParser_Node_Expr_List($this->yyastk[$this->stackPos-(4-3)], $attributes); + } + protected function yyn370($attributes) { $this->yyastk[$this->stackPos-(3-1)][] = $this->yyastk[$this->stackPos-(3-3)]; $this->yyval = $this->yyastk[$this->stackPos-(3-1)]; } @@ -2577,7 +2577,7 @@ class PHPParser_Parser } protected function yyn373($attributes) { - $this->yyval = $this->yyastk[$this->stackPos-(4-3)]; + $this->yyval = $this->yyastk[$this->stackPos-(1-1)]; } protected function yyn374($attributes) { diff --git a/lib/PHPParser/PrettyPrinter/Zend.php b/lib/PHPParser/PrettyPrinter/Zend.php index ac49a01..6151ebf 100644 --- a/lib/PHPParser/PrettyPrinter/Zend.php +++ b/lib/PHPParser/PrettyPrinter/Zend.php @@ -142,10 +142,6 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract return $this->p($node->var) . ' >>= ' . $this->p($node->expr); } - public function pExpr_AssignList(PHPParser_Node_Expr_AssignList $node) { - return $this->pAssignList($node->vars) . ' = ' . $this->p($node->expr); - } - // Binary expressions public function pExpr_Plus(PHPParser_Node_Expr_Plus $node) { @@ -365,6 +361,19 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract return $map[$node->type] . ' ' . $this->p($node->expr); } + public function pExpr_List(PHPParser_Node_Expr_List $node) { + $pList = array(); + foreach ($node->vars as $var) { + if (null === $var) { + $pList[] = ''; + } else { + $pList[] = $this->p($var); + } + } + + return 'list(' . implode(', ', $pList) . ')'; + } + // Other public function pExpr_Variable(PHPParser_Node_Expr_Variable $node) { @@ -439,6 +448,18 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract return 'die' . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); } + public function pExpr_Yield(PHPParser_Node_Expr_Yield $node) { + if ($node->value === null) { + return 'yield'; + } else { + // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary + return '(yield ' + . ($node->key !== null ? $this->p($node->key) . ' => ' : '') + . $this->p($node->value) + . ')'; + } + } + // Declarations public function pStmt_Namespace(PHPParser_Node_Stmt_Namespace $node) { @@ -585,7 +606,10 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract public function pStmt_TryCatch(PHPParser_Node_Stmt_TryCatch $node) { return 'try {' . "\n" . $this->pStmts($node->stmts) . "\n" . '}' - . $this->pImplode($node->catches); + . $this->pImplode($node->catches) + . ($node->finallyStmts !== null + ? ' finally {' . "\n" . $this->pStmts($node->finallyStmts) . "\n" . '}' + : ''); } public function pStmt_Catch(PHPParser_Node_Stmt_Catch $node) { @@ -688,21 +712,6 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract return $return; } - public function pAssignList(array $elements) { - $pAssignList = array(); - foreach ($elements as $element) { - if (null === $element) { - $pAssignList[] = ''; - } elseif (is_array($element)) { - $pAssignList[] = $this->pAssignList($element); - } else { - $pAssignList[] = $this->p($element); - } - } - - return 'list(' . implode(', ', $pAssignList) . ')'; - } - public function pVarOrNewExpr(PHPParser_Node $node) { if ($node instanceof PHPParser_Node_Expr_New) { return '(' . $this->p($node) . ')'; diff --git a/test/code/parser/expr/assign.test b/test/code/parser/expr/assign.test index 650db2b..e6916ad 100644 --- a/test/code/parser/expr/assign.test +++ b/test/code/parser/expr/assign.test @@ -185,10 +185,12 @@ array( 0: Expr_Variable( name: a ) - 1: array( - 0: null - 1: Expr_Variable( - name: c + 1: Expr_List( + vars: array( + 0: null + 1: Expr_Variable( + name: c + ) ) ) 2: Expr_Variable( diff --git a/test/code/parser/stmt/function/generator.test b/test/code/parser/stmt/function/generator.test index 66b44fb..e5a5716 100644 --- a/test/code/parser/stmt/function/generator.test +++ b/test/code/parser/stmt/function/generator.test @@ -45,10 +45,10 @@ array( ) 2: Expr_Yield( key: Expr_Variable( - name: value + name: key ) value: Expr_Variable( - name: key + name: value ) ) 3: Expr_Assign( @@ -77,10 +77,10 @@ array( ) expr: Expr_Yield( key: Expr_Variable( - name: value + name: key ) value: Expr_Variable( - name: key + name: value ) ) )