mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-26 20:04:48 +01:00
Add support for negative interpolated offsets
A late addition to PHP 7.1 which I missed.
This commit is contained in:
parent
d5eebf7214
commit
c1e0bab4f8
@ -4,6 +4,7 @@ Version 3.0.3-dev
|
||||
### Fixed
|
||||
|
||||
* In `"$foo[0]"` the `0` is now parsed as an `LNumber` rather than `String`. (#325)
|
||||
* [PHP 7.1] Added support for negative interpolated offsets: `"$foo[-1]"`
|
||||
|
||||
Version 3.0.2 (2016-12-06)
|
||||
--------------------------
|
||||
|
@ -876,6 +876,7 @@ encaps_var:
|
||||
encaps_var_offset:
|
||||
T_STRING { $$ = Scalar\String_[$1]; }
|
||||
| T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); }
|
||||
| '-' T_NUM_STRING { $$ = $this->parseNumString('-' . $2, attributes()); }
|
||||
| T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
|
||||
;
|
||||
|
||||
|
@ -18,8 +18,8 @@ use PhpParser\Node\Stmt;
|
||||
class Php7 extends \PhpParser\ParserAbstract
|
||||
{
|
||||
protected $tokenToSymbolMapSize = 392;
|
||||
protected $actionTableSize = 894;
|
||||
protected $gotoTableSize = 429;
|
||||
protected $actionTableSize = 893;
|
||||
protected $gotoTableSize = 413;
|
||||
|
||||
protected $invalidSymbol = 157;
|
||||
protected $errorSymbol = 1;
|
||||
@ -27,7 +27,7 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
protected $unexpectedTokenRule = 32767;
|
||||
|
||||
protected $YY2TBLSTATE = 337;
|
||||
protected $YYNLSTATES = 564;
|
||||
protected $YYNLSTATES = 565;
|
||||
|
||||
protected $symbolToName = array(
|
||||
"EOF",
|
||||
@ -233,104 +233,104 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
);
|
||||
|
||||
protected $action = array(
|
||||
569, 570, 571, 572, 573, 215, 574, 575, 576, 612,
|
||||
613, 1005, 27, 99, 100, 101, 102, 103, 104, 105,
|
||||
570, 571, 572, 573, 574, 215, 575, 576, 577, 613,
|
||||
614, 474, 27, 99, 100, 101, 102, 103, 104, 105,
|
||||
106, 107, 108, 109, 110,-32766,-32766,-32766, 95, 96,
|
||||
97, 0, 239, 116, -267,-32766,-32766,-32766,-32766,-32766,
|
||||
-32766, 530, 241, 114, 98,-32766, 274,-32766,-32766,-32766,
|
||||
-32766,-32766, 577, 870, 872,-32766,-32766,-32766,-32766,-32766,
|
||||
-32766,-32766,-32766, 224,-32766, 714, 578, 579, 580, 581,
|
||||
582, 583, 584,-32766, 265, 644, 840, 841, 842, 839,
|
||||
838, 837, 585, 586, 587, 588, 589, 590, 591, 592,
|
||||
593, 594, 595, 615, 616, 617, 618, 619, 607, 608,
|
||||
609, 610, 611, 596, 597, 598, 599, 600, 601, 602,
|
||||
638, 639, 640, 641, 642, 643, 603, 604, 605, 606,
|
||||
636, 627, 625, 626, 622, 623, 286, 614, 620, 621,
|
||||
628, 629, 631, 630, 632, 633, 42, 43, 381, 44,
|
||||
45, 624, 635, 634, -214, 46, 47, 952, 48,-32767,
|
||||
-32767,-32767,-32767, 90, 91, 92, 93, 94, 268, 71,
|
||||
22, 840, 841, 842, 839, 838, 837, 832,-32766,-32766,
|
||||
-32766, 1041, 1002, 7, 1040, 120, 968, 436, -425, 246,
|
||||
797, 49, 50, 660, 661, 344, 361, 51,-32766, 52,
|
||||
97, 241, 239, 0, -267,-32766,-32766,-32766, -470, -469,
|
||||
1050, 531, 1053, 1051, 98,-32766, 275,-32766,-32766,-32766,
|
||||
-32766,-32766, 578, 871, 873,-32766,-32766,-32766,-32766,-32766,
|
||||
-32766,-32766,-32766, 224,-32766, 715, 579, 580, 581, 582,
|
||||
583, 584, 585,-32766, 344, 645, 841, 842, 843, 840,
|
||||
839, 838, 586, 587, 588, 589, 590, 591, 592, 593,
|
||||
594, 595, 596, 616, 617, 618, 619, 620, 608, 609,
|
||||
610, 611, 612, 597, 598, 599, 600, 601, 602, 603,
|
||||
639, 640, 641, 642, 643, 644, 604, 605, 606, 607,
|
||||
637, 628, 626, 627, 623, 624, 765, 615, 621, 622,
|
||||
629, 630, 632, 631, 633, 634, 42, 43, 381, 44,
|
||||
45, 625, 636, 635, -214, 46, 47, 953, 48,-32767,
|
||||
-32767,-32767,-32767, 90, 91, 92, 93, 94, 269, 266,
|
||||
22, 841, 842, 843, 840, 839, 838, 833,-32766,-32766,
|
||||
-32766, 1042, 1003, 289, 1041, 120, 969, 436, -424, 246,
|
||||
798, 49, 50, -470, -469, -470, -469, 51,-32766, 52,
|
||||
219, 220, 53, 54, 55, 56, 57, 58, 59, 60,
|
||||
1019, 22, 232, 61, 351, 945,-32766,-32766,-32766, 969,
|
||||
970, 646, 705, 1002, 28, -459, 125, 968,-32766,-32766,
|
||||
-32766, 715, 398, 399, 24, 1002,-32766, 339,-32766,-32766,
|
||||
-32766,-32766, 25, 222, 982, 226, 355, 289,-32766, -425,
|
||||
-32766,-32766,-32766, -161, 65, 1049, 408, 1051, 1050, 258,
|
||||
-32766,-32766, 246, -425, 394, 395, 358, 519, 945, 537,
|
||||
-425, 216, -428, 398, 399, 239, 974, 975, 976, 977,
|
||||
971, 972, 243, 111, -424, -423, 1016, 409, 978, 973,
|
||||
353, 791, 792, 275, 964, 63, 131, 255, 378, 256,
|
||||
258, 382, -122, -122, -122, -4, 715, 383, 646, 1046,
|
||||
40, 704, 258, -219, 33, 17, 384, -122, 385, -122,
|
||||
386, -122, 387, -122, 814, 388, -122, -122, -122, 34,
|
||||
35, 389, 352, 520, 36, 390, 353, 659, 62, 518,
|
||||
818, 287, 288, 391, 392, -424, -423, -238, 21, 393,
|
||||
38, -423, 690, 735, 396, 397, 41, 22, 122, -424,
|
||||
-423,-32766,-32766,-32766, 791, 792, -424, -423, -427, 1002,
|
||||
-459, 248, 1002, 968, 409, -461, 382, 353, 717, 535,
|
||||
-122,-32766, 383,-32766,-32766, 295, 704, -469, 701, 33,
|
||||
17, 384, 115, 385, -470, 386, 362, 387, -161, 224,
|
||||
388, 350, 945, -162, 34, 35, 389, 352, 345, 36,
|
||||
390, 247, -423, 62, 254, 715, 287, 288, 391, 392,
|
||||
399,-32766,-32766,-32766, 393, 952, -423, 652, 735, 396,
|
||||
397, 369, 113, -423, 367, 130, 72, 73, 74, 813,
|
||||
764, 65, 121, 539, 1002, 128, 258, 124, 271, 258,
|
||||
92, 93, 94, 717, 535, -4, 26, 112, 75, 76,
|
||||
1020, 22, 232, 61, 351, 946,-32766,-32766,-32766, 970,
|
||||
971, 647, 706, 1003, 216, -459, 125, 969,-32766,-32766,
|
||||
-32766, 716, 398, 399, 116, 1003,-32766, 276,-32766,-32766,
|
||||
-32766,-32766, 25, 222, 983, 286, 355, 24,-32766, -424,
|
||||
-32766,-32766,-32766, 1006, 65, 766, 408, 226, 21, 258,
|
||||
1003, 28, 246, -424, 394, 395, 358, 520, 946, 538,
|
||||
-424, 124, -427, 398, 399, 117, 975, 976, 977, 978,
|
||||
972, 973, 243, 519, -425, -423, 1017, 409, 979, 974,
|
||||
353, 792, 793, 111, 965, 63, 128, 255, 378, 256,
|
||||
258, 382, -122, -122, -122, -4, 716, 383, 647, 1047,
|
||||
40, 705, 258, -219, 33, 17, 384, -122, 385, -122,
|
||||
386, -122, 387, -122, 702, 388, -122, -122, -122, 34,
|
||||
35, 389, 352, 521, 36, 390, 353, 258, 62, 112,
|
||||
819, 287, 288, 391, 392, -425, -423, 131, -161, 393,
|
||||
38, -423, 691, 736, 396, 397, -238, 22, 122, -425,
|
||||
-423,-32766,-32766,-32766, 792, 793, -425, -423, -428, 1003,
|
||||
-459, 248, 1003, 969, 409, 350, 382, 353, 718, 536,
|
||||
-122,-32766, 383,-32766,-32766, 295, 705, 661, 662, 33,
|
||||
17, 384, 115, 385, 41, 386, -162, 387, -461, 361,
|
||||
388, 71, 946, 799, 34, 35, 389, 352, 345, 36,
|
||||
390, 247, -423, 62, 254, 716, 287, 288, 391, 392,
|
||||
399,-32766,-32766,-32766, 393, 953, -423, 653, 736, 396,
|
||||
397, 339, 113, -423, 367, 369, 72, 73, 74, 814,
|
||||
7, 65, 121, 540, 224, 242, 258, 259, 272, 258,
|
||||
92, 93, 94, 718, 536, -4, 26, 362, 75, 76,
|
||||
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
|
||||
87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
|
||||
97, 117, 239, 118, 715, 382, 660, 661, 276, 494,
|
||||
18, 383, -238, 798, 98, 704, 127, 297, 33, 17,
|
||||
384, 1020, 385, 1002, 386, 119, 387, 505, 506, 388,
|
||||
126, 120, 541, 34, 35, 389, 715, 713, 36, 390,
|
||||
-461, 258, 62, 791, 792, 287, 288, 376, 6, 490,
|
||||
491, 552, -469, 393, -469, 547, 945, 702, 242, -470,
|
||||
221, -470, 223, 728, 548, 225, 938, 346, -162, 459,
|
||||
98, 370, 829, 553, 382, 817, 563, 653, 538, 765,
|
||||
383, 39, 717, 535, 704, 514, 448, 33, 17, 384,
|
||||
1044, 385, 430, 386, 429, 387, 359, 357, 388, 16,
|
||||
258, 435, 34, 35, 389, 715, 382, 36, 390, 449,
|
||||
647, 62, 383, 646, 287, 288, 704, 673, 941, 33,
|
||||
17, 384, 393, 385, 315, 386, 503, 387, 434, 492,
|
||||
388, 445, 529, 542, 34, 35, 389, 715, 440, 36,
|
||||
390,-32766, 495, 62, 515, 499, 287, 288, -80, 266,
|
||||
356, 751, 535, 500, 393, 452, 10, 214, 267, 730,
|
||||
509, 270, 340, 273, 736, 540, 703, 488, 0, 821,
|
||||
0, 0, 0, 984, 0, 382, 0, 981, 0, 0,
|
||||
0, 383, 0, 717, 535, 704, 227, 0, 33, 17,
|
||||
384, 737, 385, 338, 386, 926, 387, 0, 0, 388,
|
||||
0, 0, 3, 34, 35, 389, 715, 382, 36, 390,
|
||||
0, -382, 62, 383, 294, 287, 288, 704, 22, 9,
|
||||
33, 17, 384, 393, 385, 309, 386, 320, 387, 442,
|
||||
1002, 388, 358, 325, 968, 34, 35, 389, 321, 341,
|
||||
36, 390, 656, 823, 62, 657, 31, 287, 288, 711,
|
||||
561, 562, 717, 535, 658, 393, 32, 822, 825, 824,
|
||||
747, 749, 693, 945, 759, 758, 752, 767, 695, 706,
|
||||
700, 712, 699, 698, 0, 264, 382, 263, 536, 543,
|
||||
398, 399, 383, 559, 717, 535, 704, 558, 556, 33,
|
||||
17, 384, 554, 385, 551, 386, 550, 387, 546, 545,
|
||||
388, 337, 65, 934, 34, 35, 389, 258, 830, 36,
|
||||
390, 722, 663, 62, 662, 757, 287, 288,-32766,-32766,
|
||||
-32766, 732, 733, 665, 393, 664, 756, 555, 691, 1048,
|
||||
1045, 1003, 996, 1009, 1014, 1017, 734, 933,-32766, 932,
|
||||
97, 118, 239, 130, 716, 382, 553,-32766,-32766,-32766,
|
||||
714, 383, 114, -161, 98, 705,-32766,-32766, 33, 17,
|
||||
384, -238, 385, 1003, 386, 126, 387, 548, 459, 388,
|
||||
506, 507, 542, 34, 35, 389, 716, 225, 36, 390,
|
||||
939, 119, 62, 495, 18, 287, 288, 127, 297, 491,
|
||||
492, 376, 6, 393, 661, 662, 946, 792, 793, 1021,
|
||||
660, -162, 223, -461, 543, 818, 564, 346, 654, 539,
|
||||
830, 554, 221, 729, 382, 370, 120, 239, 39, 98,
|
||||
383, 515, 718, 536, 705, 493, 449, 33, 17, 384,
|
||||
1052, 385, 448, 386, 1045, 387, 674, 429, 388, 16,
|
||||
258, 815, 34, 35, 389, 716, 382, 36, 390, 359,
|
||||
357, 62, 383, 648, 287, 288, 705, 435, 703, 33,
|
||||
17, 384, 393, 385, 647, 386, 430, 387, 315, 445,
|
||||
388, 434, 942, 549, 34, 35, 389, 716, 504, 36,
|
||||
390, 496,-32766, 62, 440, 530, 287, 288, 516, -80,
|
||||
356, 752, 536, 489, 393, 452, 500, 737, 10, 214,
|
||||
985, 271, 510, 501, 738, 541, 268, 982, 267, 731,
|
||||
309, 274, 3, 9, 704, 382, 37, 822, 0, 0,
|
||||
0, 383, 0, 718, 536, 705, 227, 0, 33, 17,
|
||||
384, 0, 385, 0, 386, 338, 387, 0, 0, 388,
|
||||
294, 0, 0, 34, 35, 389, 716, 382, 36, 390,
|
||||
-382, 0, 62, 383, 0, 287, 288, 705, 22, 341,
|
||||
33, 17, 384, 393, 385, 340, 386, 442, 387, 358,
|
||||
1003, 388, 320, 321, 969, 34, 35, 389, 325, 657,
|
||||
36, 390, 824, 658, 62, 31, 712, 287, 288, 562,
|
||||
563, 659, 718, 536, 32, 393, 823, 826, 825, 748,
|
||||
750, 694, 760, 946, 759, 753, 768, 696, 707, 701,
|
||||
713, 700, 699, 0, 265, 264, 382, 537, 544, 560,
|
||||
398, 399, 383, 559, 718, 536, 705, 557, 555, 33,
|
||||
17, 384, 552, 385, 551, 386, 547, 387, 546, 337,
|
||||
388, 927, 65, 935, 34, 35, 389, 258, 831, 36,
|
||||
390, 723, 664, 62, 663, 758, 287, 288,-32766,-32766,
|
||||
-32766, 733, 734, 666, 393, 665, 757, 556, 692, 1049,
|
||||
1046, 1004, 997, 1010, 1015, 1018, 735, 934,-32766, 933,
|
||||
-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,
|
||||
-32767, 731, 724, 717, 535, 37, 1047, 654, 655, 0,
|
||||
-449, -428, 348, 343, 269, 238, 237, 236, 235, -427,
|
||||
-426, 20, 218, 23, 29, 217, 132, 30, 64, 66,
|
||||
129, 67, 68, 123, 70, 69, -451, 0, 11, 15,
|
||||
19, 910, 250, 296, 467, 909, 472, 484, 528, 913,
|
||||
-215, -217, 966, 956, 525, 379, 375, 373, 371, 14,
|
||||
13, 12, -214, 0, -394, 0, 493, 1008, 1043, 994,
|
||||
995, 965, 0, 983
|
||||
-32767, 732, 725, 718, 536, -449, 1048, 655, 656, 0,
|
||||
-428, 348, 343, 270, 238, 237, 236, 235, -427, -426,
|
||||
20, 218, 23, 29, 217, 132, 30, 64, 66, 129,
|
||||
67, 68, 123, 70, 69, -451, 0, 11, 15, 19,
|
||||
911, 250, 296, 467, 910, 472, 485, 529, 914, -215,
|
||||
-217, 967, 957, 526, 379, 375, 373, 371, 14, 13,
|
||||
12, -214, 0, -394, 0, 494, 1009, 1044, 995, 996,
|
||||
966, 0, 984
|
||||
);
|
||||
|
||||
protected $actionCheck = array(
|
||||
2, 3, 4, 5, 6, 13, 8, 9, 10, 11,
|
||||
12, 1, 15, 16, 17, 18, 19, 20, 21, 22,
|
||||
12, 48, 15, 16, 17, 18, 19, 20, 21, 22,
|
||||
23, 24, 25, 26, 27, 8, 9, 10, 50, 51,
|
||||
52, 0, 54, 7, 79, 8, 9, 10, 8, 9,
|
||||
10, 77, 7, 13, 66, 28, 7, 30, 31, 32,
|
||||
52, 7, 54, 0, 79, 8, 9, 10, 7, 7,
|
||||
77, 77, 79, 80, 66, 28, 7, 30, 31, 32,
|
||||
33, 34, 54, 56, 57, 28, 8, 30, 31, 32,
|
||||
33, 34, 35, 35, 109, 1, 68, 69, 70, 71,
|
||||
72, 73, 74, 118, 7, 77, 112, 113, 114, 115,
|
||||
@ -338,72 +338,72 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
|
||||
102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
|
||||
122, 123, 124, 125, 126, 127, 7, 129, 130, 131,
|
||||
122, 123, 124, 125, 126, 127, 29, 129, 130, 131,
|
||||
132, 133, 134, 135, 136, 137, 2, 3, 4, 5,
|
||||
6, 143, 144, 145, 152, 11, 12, 1, 14, 41,
|
||||
42, 43, 44, 45, 46, 47, 48, 49, 109, 149,
|
||||
42, 43, 44, 45, 46, 47, 48, 49, 109, 7,
|
||||
67, 112, 113, 114, 115, 116, 117, 118, 8, 9,
|
||||
10, 79, 79, 7, 82, 147, 83, 82, 67, 28,
|
||||
152, 47, 48, 102, 103, 7, 7, 53, 28, 55,
|
||||
152, 47, 48, 152, 152, 154, 154, 53, 28, 55,
|
||||
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
|
||||
1, 67, 68, 69, 70, 112, 8, 9, 10, 75,
|
||||
76, 77, 148, 79, 13, 7, 67, 83, 8, 9,
|
||||
10, 1, 129, 130, 7, 79, 28, 146, 30, 31,
|
||||
10, 1, 129, 130, 7, 79, 28, 33, 30, 31,
|
||||
32, 33, 140, 141, 139, 7, 102, 7, 28, 128,
|
||||
30, 31, 32, 7, 151, 77, 112, 79, 80, 156,
|
||||
8, 9, 28, 142, 120, 121, 146, 77, 112, 149,
|
||||
149, 13, 151, 129, 130, 54, 132, 133, 134, 135,
|
||||
136, 137, 138, 15, 67, 67, 77, 143, 144, 145,
|
||||
146, 130, 131, 33, 1, 151, 15, 153, 7, 155,
|
||||
30, 31, 32, 1, 151, 148, 112, 7, 7, 156,
|
||||
79, 13, 28, 142, 120, 121, 146, 77, 112, 149,
|
||||
149, 15, 151, 129, 130, 15, 132, 133, 134, 135,
|
||||
136, 137, 138, 79, 67, 67, 77, 143, 144, 145,
|
||||
146, 130, 131, 15, 1, 151, 15, 153, 7, 155,
|
||||
156, 71, 72, 73, 74, 0, 1, 77, 77, 150,
|
||||
67, 81, 156, 152, 84, 85, 86, 87, 88, 89,
|
||||
90, 91, 92, 93, 148, 95, 96, 97, 98, 99,
|
||||
100, 101, 102, 143, 104, 105, 146, 148, 108, 79,
|
||||
150, 111, 112, 113, 114, 128, 128, 7, 7, 119,
|
||||
100, 101, 102, 143, 104, 105, 146, 156, 108, 15,
|
||||
150, 111, 112, 113, 114, 128, 128, 15, 7, 119,
|
||||
67, 67, 122, 123, 124, 125, 7, 67, 149, 142,
|
||||
142, 8, 9, 10, 130, 131, 149, 149, 151, 79,
|
||||
152, 128, 79, 83, 143, 7, 71, 146, 148, 149,
|
||||
150, 28, 77, 30, 31, 142, 81, 7, 148, 84,
|
||||
85, 86, 149, 88, 7, 90, 7, 92, 152, 35,
|
||||
95, 7, 112, 7, 99, 100, 101, 102, 103, 104,
|
||||
150, 28, 77, 30, 31, 142, 81, 102, 103, 84,
|
||||
85, 86, 149, 88, 7, 90, 7, 92, 7, 7,
|
||||
95, 149, 112, 152, 99, 100, 101, 102, 103, 104,
|
||||
105, 128, 128, 108, 109, 1, 111, 112, 113, 114,
|
||||
130, 8, 9, 10, 119, 1, 142, 122, 123, 124,
|
||||
125, 29, 149, 149, 7, 15, 8, 9, 10, 148,
|
||||
29, 151, 149, 29, 79, 15, 156, 15, 143, 156,
|
||||
47, 48, 49, 148, 149, 150, 28, 15, 30, 31,
|
||||
125, 146, 149, 149, 7, 29, 8, 9, 10, 148,
|
||||
7, 151, 149, 29, 35, 29, 156, 67, 143, 156,
|
||||
47, 48, 49, 148, 149, 150, 28, 7, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
|
||||
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
|
||||
52, 15, 54, 15, 1, 71, 102, 103, 67, 72,
|
||||
73, 77, 152, 152, 66, 81, 97, 98, 84, 85,
|
||||
86, 152, 88, 79, 90, 29, 92, 72, 73, 95,
|
||||
29, 147, 29, 99, 100, 101, 1, 29, 104, 105,
|
||||
152, 156, 108, 130, 131, 111, 112, 102, 103, 106,
|
||||
107, 29, 152, 119, 154, 29, 112, 148, 29, 152,
|
||||
35, 154, 35, 35, 29, 35, 152, 123, 152, 128,
|
||||
66, 149, 148, 149, 71, 148, 149, 148, 149, 148,
|
||||
77, 67, 148, 149, 81, 74, 77, 84, 85, 86,
|
||||
77, 88, 77, 90, 77, 92, 77, 77, 95, 152,
|
||||
156, 77, 99, 100, 101, 1, 71, 104, 105, 77,
|
||||
77, 108, 77, 77, 111, 112, 81, 77, 79, 84,
|
||||
85, 86, 119, 88, 78, 90, 79, 92, 79, 79,
|
||||
95, 86, 89, 29, 99, 100, 101, 1, 82, 104,
|
||||
105, 82, 87, 108, 91, 93, 111, 112, 94, 126,
|
||||
102, 148, 149, 96, 119, 94, 94, 94, 127, 147,
|
||||
96, 110, 146, 126, 123, 29, 148, 109, -1, 148,
|
||||
-1, -1, -1, 139, -1, 71, -1, 139, -1, -1,
|
||||
52, 15, 54, 15, 1, 71, 29, 8, 9, 10,
|
||||
29, 77, 13, 152, 66, 81, 8, 9, 84, 85,
|
||||
86, 152, 88, 79, 90, 29, 92, 29, 128, 95,
|
||||
72, 73, 29, 99, 100, 101, 1, 35, 104, 105,
|
||||
152, 29, 108, 72, 73, 111, 112, 97, 98, 106,
|
||||
107, 102, 103, 119, 102, 103, 112, 130, 131, 152,
|
||||
148, 152, 35, 152, 29, 148, 149, 123, 148, 149,
|
||||
148, 149, 35, 35, 71, 149, 147, 54, 67, 66,
|
||||
77, 74, 148, 149, 81, 79, 77, 84, 85, 86,
|
||||
80, 88, 77, 90, 77, 92, 77, 77, 95, 152,
|
||||
156, 148, 99, 100, 101, 1, 71, 104, 105, 77,
|
||||
77, 108, 77, 77, 111, 112, 81, 77, 148, 84,
|
||||
85, 86, 119, 88, 77, 90, 77, 92, 78, 86,
|
||||
95, 79, 79, 29, 99, 100, 101, 1, 79, 104,
|
||||
105, 87, 82, 108, 82, 89, 111, 112, 91, 94,
|
||||
102, 148, 149, 109, 119, 94, 93, 123, 94, 94,
|
||||
139, 110, 96, 96, 123, 29, 127, 139, 126, 147,
|
||||
146, 126, 142, 142, 148, 71, 151, 148, -1, -1,
|
||||
-1, 77, -1, 148, 149, 81, 35, -1, 84, 85,
|
||||
86, 123, 88, 149, 90, 153, 92, -1, -1, 95,
|
||||
-1, -1, 142, 99, 100, 101, 1, 71, 104, 105,
|
||||
-1, 142, 108, 77, 142, 111, 112, 81, 67, 142,
|
||||
86, -1, 88, -1, 90, 149, 92, -1, -1, 95,
|
||||
142, -1, -1, 99, 100, 101, 1, 71, 104, 105,
|
||||
142, -1, 108, 77, -1, 111, 112, 81, 67, 146,
|
||||
84, 85, 86, 119, 88, 146, 90, 146, 92, 146,
|
||||
79, 95, 146, 146, 83, 99, 100, 101, 146, 146,
|
||||
79, 95, 146, 146, 83, 99, 100, 101, 146, 148,
|
||||
104, 105, 148, 148, 108, 148, 148, 111, 112, 148,
|
||||
148, 148, 148, 149, 148, 119, 148, 148, 148, 148,
|
||||
148, 148, 148, 112, 148, 148, 148, 148, 148, 148,
|
||||
148, 148, 148, 148, -1, 149, 71, 149, 149, 149,
|
||||
148, 148, 148, -1, 149, 149, 71, 149, 149, 149,
|
||||
129, 130, 77, 149, 148, 149, 81, 149, 149, 84,
|
||||
85, 86, 149, 88, 149, 90, 149, 92, 149, 149,
|
||||
95, 149, 151, 150, 99, 100, 101, 156, 150, 104,
|
||||
95, 153, 151, 150, 99, 100, 101, 156, 150, 104,
|
||||
105, 150, 150, 108, 150, 150, 111, 112, 8, 9,
|
||||
10, 150, 150, 150, 119, 150, 150, 150, 150, 150,
|
||||
150, 150, 150, 150, 150, 150, 150, 150, 28, 150,
|
||||
@ -411,17 +411,17 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
40, 150, 150, 148, 149, 151, 150, 150, 150, -1,
|
||||
151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
|
||||
151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
|
||||
151, 151, 151, 151, 151, 151, 151, -1, 152, 152,
|
||||
151, 151, 151, 151, 151, 151, -1, 152, 152, 152,
|
||||
152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
|
||||
152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
|
||||
152, 152, 152, -1, 153, -1, 154, 154, 154, 154,
|
||||
154, 154, -1, 155
|
||||
152, 152, -1, 153, -1, 154, 154, 154, 154, 154,
|
||||
154, -1, 155
|
||||
);
|
||||
|
||||
protected $actionBase = array(
|
||||
0, 220, 295, 283, 180, 565, -2, -2, -2, -2,
|
||||
-36, 606, 574, 505, 574, 404, 473, 675, 675, 675,
|
||||
28, 354, 495, 495, 495, 516, 466, 497, 500, 134,
|
||||
0, 220, 295, 283, 180, 564, -2, -2, -2, -2,
|
||||
-36, 606, 505, 574, 505, 404, 473, 675, 675, 675,
|
||||
28, 399, 507, 507, 507, 520, 482, 497, 472, 134,
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
@ -432,53 +432,53 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
134, 134, 134, 401, 64, 201, 571, 710, 717, 712,
|
||||
707, 706, 533, 711, 709, 248, 650, 651, 471, 652,
|
||||
653, 654, 655, 715, 732, 708, 716, 418, 418, 418,
|
||||
134, 134, 134, 97, 64, 238, 568, 709, 716, 711,
|
||||
706, 705, 535, 710, 708, 201, 650, 651, 466, 652,
|
||||
653, 654, 655, 714, 731, 707, 715, 418, 418, 418,
|
||||
418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
|
||||
418, 418, 418, 48, 30, 242, 403, 403, 403, 403,
|
||||
418, 418, 418, 48, 469, 478, 403, 403, 403, 403,
|
||||
403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
|
||||
403, 403, 403, 403, 403, 160, 160, 160, 343, 210,
|
||||
208, 198, 17, 274, 27, 780, 780, 780, 780, 780,
|
||||
108, 108, 108, 108, 621, 621, 93, 280, 280, 280,
|
||||
280, 280, 280, 280, 280, 280, 280, 280, 656, 642,
|
||||
641, 623, 414, 393, 393, 151, 151, 151, 151, 146,
|
||||
-45, 224, 224, 95, 504, 738, 383, 199, 199, 111,
|
||||
207, -22, -22, -22, 81, 526, 92, 92, 10, 274,
|
||||
274, 233, 274, 374, 374, 374, 221, 221, 221, 221,
|
||||
221, 110, 529, 221, 221, 221, 168, 527, 646, 397,
|
||||
534, 635, 273, 377, 370, 486, 563, 355, 518, 355,
|
||||
413, 407, 425, 539, 355, 355, 392, 401, 394, 211,
|
||||
488, 502, 179, 564, 230, 379, 411, 399, 417, 598,
|
||||
567, 714, 236, 713, 339, 149, 211, 211, 211, 331,
|
||||
596, 622, 330, -8, 645, 514, 386, 415, 358, 643,
|
||||
634, 281, 632, 166, 384, 250, 491, 506, 506, 506,
|
||||
506, 506, 506, 498, 506, 485, 690, 690, 479, 520,
|
||||
498, 674, 498, 506, 690, 498, 498, 493, 506, 507,
|
||||
507, 485, 519, 501, 690, 690, 501, 479, 498, 572,
|
||||
573, 528, 482, 499, 499, 528, 498, 499, 520, 499,
|
||||
31, 697, 698, 478, 700, 693, 701, 681, 704, 487,
|
||||
599, 511, 538, 694, 691, 703, 494, 490, 696, 692,
|
||||
553, 576, 489, 258, 432, 530, 484, 689, 518, 556,
|
||||
474, 474, 474, 484, 680, 474, 474, 474, 474, 474,
|
||||
474, 474, 474, 737, 217, 542, 515, 595, 594, 593,
|
||||
456, 592, 549, 531, 458, 613, 508, 553, 553, 648,
|
||||
731, 512, 503, 687, 721, 702, 568, 26, 422, 686,
|
||||
647, 551, 510, 562, 685, 609, 258, 720, 649, 483,
|
||||
553, 678, 474, 679, 705, 735, 736, 688, 733, 726,
|
||||
35, 557, 591, 39, 734, 677, 608, 604, 578, 729,
|
||||
719, 725, 724, 39, 590, 525, 718, 522, 682, 517,
|
||||
683, 600, 420, 676, 699, 589, 728, 727, 730, 588,
|
||||
587, 620, 619, 410, 271, 695, 496, 481, 523, 586,
|
||||
509, 672, 617, 684, 584, 583, 671, 659, 722, 524,
|
||||
556, 547, 521, 532, 513, 615, 657, 723, 492, 582,
|
||||
581, 580, 631, 579, 628, 0, 0, 0, 0, 0,
|
||||
-45, 224, 224, 95, 491, 737, 397, 199, 199, 207,
|
||||
111, -22, -22, -22, 275, 532, 92, 92, 242, -37,
|
||||
274, 274, 233, 274, 422, 422, 422, 221, 221, 221,
|
||||
221, 221, 110, 530, 221, 221, 221, 537, 646, 387,
|
||||
536, 635, 273, 31, 32, 549, 543, 171, 518, 171,
|
||||
413, 441, 428, 538, 171, 171, 396, 97, 392, 493,
|
||||
496, 479, 382, 561, 166, 440, 370, 390, 417, 596,
|
||||
565, 713, 331, 712, 377, 149, 493, 493, 493, 241,
|
||||
595, 620, 339, -8, 645, 516, 379, 419, 381, 643,
|
||||
634, 281, 632, 423, 358, 194, 499, 517, 517, 517,
|
||||
517, 517, 517, 508, 517, 519, 689, 689, 485, 476,
|
||||
508, 495, 508, 517, 689, 508, 508, 512, 517, 515,
|
||||
515, 519, 522, 509, 689, 689, 509, 485, 508, 571,
|
||||
572, 514, 492, 406, 406, 514, 508, 406, 476, 406,
|
||||
33, 696, 697, 451, 699, 692, 700, 680, 703, 490,
|
||||
598, 504, 511, 693, 690, 702, 510, 503, 695, 691,
|
||||
551, 573, 502, 268, 314, 500, 481, 688, 518, 553,
|
||||
483, 483, 483, 481, 679, 483, 483, 483, 483, 483,
|
||||
483, 483, 483, 736, 230, 528, 513, 594, 593, 592,
|
||||
250, 591, 494, 531, 456, 609, 498, 551, 551, 648,
|
||||
730, 618, 506, 686, 720, 701, 567, 217, 246, 685,
|
||||
647, 556, 489, 557, 684, 608, 268, 719, 649, 487,
|
||||
551, 678, 483, 674, 704, 734, 735, 687, 732, 725,
|
||||
24, 562, 590, 39, 480, 733, 677, 604, 600, 576,
|
||||
728, 718, 724, 723, 39, 589, 524, 717, 533, 681,
|
||||
529, 682, 599, 271, 676, 698, 588, 727, 726, 729,
|
||||
587, 586, 619, 617, 458, 322, 694, 468, 477, 527,
|
||||
584, 523, 672, 615, 683, 583, 582, 671, 659, 721,
|
||||
525, 553, 501, 521, 534, 526, 613, 657, 722, 447,
|
||||
581, 580, 579, 631, 578, 628, 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, 134, 134, -2, -2, -2,
|
||||
0, 0, 0, 0, -2, 134, 134, 134, 134, 134,
|
||||
0, 0, 0, 0, 0, 0, 134, 134, -2, -2,
|
||||
-2, 0, 0, 0, 0, -2, 134, 134, 134, 134,
|
||||
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
|
||||
134, 134, 134, 0, 0, 0, 0, 0, 0, 0,
|
||||
134, 134, 134, 134, 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,
|
||||
@ -488,28 +488,28 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
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, 418, 418, 418,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 418, 418,
|
||||
418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
|
||||
418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
|
||||
418, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
|
||||
418, 418, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 418, 418,
|
||||
418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
|
||||
418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
|
||||
418, 418, 418, 418, -3, 418, 418, -3, 418, 418,
|
||||
418, 418, 418, 418, -22, -22, -22, -22, 221, 221,
|
||||
418, 418, 418, 418, 418, -3, 418, 418, -3, 418,
|
||||
418, 418, 418, 418, 418, -22, -22, -22, -22, 221,
|
||||
221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
|
||||
221, 221, 49, 49, 49, 49, 221, -22, -22, 221,
|
||||
221, 221, 221, 221, 49, 221, 221, 92, 92, 92,
|
||||
221, 355, 355, 0, 0, 0, 0, 0, 506, 92,
|
||||
0, 0, 355, 0, 0, 0, 0, 506, 506, 506,
|
||||
0, 0, 0, 0, 0, 506, 92, 0, 0, 0,
|
||||
0, 389, 389, 39, 389, 389, 0, 0, 0, 506,
|
||||
506, 0, 519, 0, 0, 0, 0, 690, 0, 0,
|
||||
0, 0, 0, 474, 26, 687, 0, 119, 0, 0,
|
||||
0, 0, 0, 503, 119, 228, 0, 228, 0, 0,
|
||||
474, 474, 474, 0, 503, 503, 0, 0, 67, 503,
|
||||
0, 0, 0, 67, 178, 0, 178, 0, 0, 0,
|
||||
39
|
||||
221, 221, 221, 49, 49, 49, 49, 221, -22, -22,
|
||||
221, 221, 221, 221, 221, 49, 221, 221, 92, 92,
|
||||
92, 221, 171, 171, 0, 0, 0, 0, 0, 517,
|
||||
92, 0, 0, 171, 0, 0, 0, 0, 0, 517,
|
||||
517, 517, 0, 0, 0, 0, 0, 517, 92, 0,
|
||||
0, 0, 420, 420, 39, 420, 420, 0, 0, 0,
|
||||
517, 517, 0, 522, 0, 0, 0, 0, 689, 0,
|
||||
0, 0, 0, 0, 483, 217, 686, 0, 228, 0,
|
||||
0, 0, 0, 0, 506, 228, 240, 0, 240, 0,
|
||||
0, 483, 483, 483, 0, 506, 506, 0, 0, 152,
|
||||
506, 0, 0, 0, 152, 67, 0, 67, 0, 0,
|
||||
0, 39
|
||||
);
|
||||
|
||||
protected $actionDefault = array(
|
||||
@ -538,8 +538,8 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
32767,32767,32767,32767,32767,32767,32767,32767, 269, 269,
|
||||
269, 269,32767, 324, 325, 229, 229, 229, 229,32767,
|
||||
270, 229,32767,32767,32767,32767,32767,32767,32767, 415,
|
||||
341, 319, 320, 318,32767, 393,32767, 395,32767, 307,
|
||||
309, 387, 291,32767,32767,32767,32767,32767,32767,32767,
|
||||
341, 319, 320, 318,32767, 393,32767, 395,32767,32767,
|
||||
307, 309, 387, 291,32767,32767,32767,32767,32767,32767,
|
||||
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
|
||||
32767,32767, 390, 423, 423,32767,32767,32767, 381,32767,
|
||||
159, 210, 212, 398,32767,32767,32767,32767,32767, 329,
|
||||
@ -561,15 +561,15 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
32767, 84,32767, 84,32767,32767, 460,32767, 423,32767,
|
||||
385,32767, 326, 399, 442,32767,32767, 424,32767,32767,
|
||||
218, 84,32767, 177,32767,32767,32767,32767,32767,32767,
|
||||
403,32767,32767, 179,32767,32767, 423,32767,32767,32767,
|
||||
32767,32767, 281,32767,32767,32767,32767,32767, 423,32767,
|
||||
32767,32767,32767, 222,32767,32767,32767,32767,32767,32767,
|
||||
32767,32767,32767,32767,32767,32767,32767,32767,32767, 82,
|
||||
60,32767, 263,32767,32767,32767,32767,32767,32767,32767,
|
||||
32767,32767,32767,32767,32767, 121, 121, 3, 3, 121,
|
||||
32767, 403,32767,32767, 179,32767,32767, 423,32767,32767,
|
||||
32767,32767,32767, 281,32767,32767,32767,32767,32767, 423,
|
||||
32767,32767,32767,32767, 222,32767,32767,32767,32767,32767,
|
||||
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
|
||||
82, 60,32767, 263,32767,32767,32767,32767,32767,32767,
|
||||
32767,32767,32767,32767,32767,32767, 121, 121, 3, 3,
|
||||
121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
|
||||
121, 121, 121, 121, 248, 154, 248, 204, 248, 248,
|
||||
207, 196, 196, 255
|
||||
121, 121, 121, 121, 121, 248, 154, 248, 204, 248,
|
||||
248, 207, 196, 196, 255
|
||||
);
|
||||
|
||||
protected $goto = array(
|
||||
@ -577,45 +577,44 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
145, 161, 161, 161, 162, 162, 162, 162, 162, 162,
|
||||
162, 145, 157, 158, 159, 160, 176, 174, 177, 410,
|
||||
411, 299, 412, 415, 416, 417, 418, 419, 420, 421,
|
||||
422, 857, 136, 137, 138, 139, 140, 141, 142, 143,
|
||||
422, 858, 136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 147, 173, 175, 178, 195, 198, 199, 201, 202,
|
||||
204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
|
||||
233, 234, 251, 252, 253, 316, 317, 318, 462, 180,
|
||||
181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
|
||||
191, 192, 193, 149, 194, 150, 165, 166, 167, 196,
|
||||
168, 151, 152, 153, 169, 154, 197, 133, 170, 155,
|
||||
171, 172, 156, 521, 200, 257, 245, 432, 463, 828,
|
||||
533, 687, 649, 513, 826, 200, 437, 437, 437, 278,
|
||||
650, 766, 5, 746, 437, 557, 464, 426, 775, 770,
|
||||
428, 431, 444, 465, 466, 468, 651, 450, 453, 437,
|
||||
560, 485, 487, 508, 511, 763, 516, 517, 777, 524,
|
||||
762, 526, 532, 773, 534, 480, 480, 967, 967, 967,
|
||||
967, 967, 967, 967, 967, 967, 967, 967, 967, 413,
|
||||
171, 172, 156, 522, 200, 651, 432, 1038, 1038, 682,
|
||||
464, 688, 650, 278, 5, 200, 437, 437, 437, 425,
|
||||
1038, 767, 652, 747, 437, 558, 425, 426, 776, 771,
|
||||
428, 431, 444, 465, 466, 468, 450, 453, 437, 561,
|
||||
486, 488, 509, 512, 764, 517, 518, 778, 525, 763,
|
||||
527, 533, 774, 535, 481, 481, 968, 968, 968, 968,
|
||||
968, 968, 968, 968, 968, 968, 968, 968, 413, 413,
|
||||
413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
|
||||
413, 413, 413, 301, 942, 681, 443, 454, 1037, 1037,
|
||||
437, 437, 451, 471, 437, 437, 674, 437, 456, 372,
|
||||
502, 1037, 531, 512, 708, 298, 438, 8, 800, 456,
|
||||
750, 460, 414, 414, 414, 414, 414, 414, 414, 414,
|
||||
414, 414, 414, 414, 414, 414, 457, 674, 674, 1036,
|
||||
1036, 483, 279, 229, 336, 230, 231, 481, 482, 527,
|
||||
425, 1029, 1036, 478, 496, 943, 300, 425, 461, 475,
|
||||
1021, 497, 313, 904, 785, 944, 998, 1039, 796, 1010,
|
||||
285, 789, 670, 329, 307, 310, 804, 668, 544, 332,
|
||||
935, 940, 366, 807, 678, 477, 377, 754, 844, 667,
|
||||
667, 675, 675, 675, 677, 0, 666, 0, 323, 498,
|
||||
328, 312, 312, 259, 260, 283, 458, 262, 322, 284,
|
||||
326, 486, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
280, 281, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 946, 0, 0, 790, 790, 790, 790, 946, 0,
|
||||
790, 790, 0, 0, 0, 790, 0, 0, 0, 0,
|
||||
0, 0, 836, 0, 0, 1007, 0, 0, 0, 0,
|
||||
0, 0, 1007, 0, 0, 744, 744, 744, 720, 744,
|
||||
1018, 1018, 739, 745, 721, 0, 0, 0, 0, 0,
|
||||
0, 1004, 780, 780, 1026, 0, 0, 0, 0, 0,
|
||||
413, 413, 301, 943, 532, 443, 454, 479, 497, 437,
|
||||
437, 451, 471, 437, 437, 675, 437, 456, 372, 503,
|
||||
484, 279, 513, 336, 298, 438, 8, 709, 456, 801,
|
||||
460, 414, 414, 414, 414, 414, 414, 414, 414, 414,
|
||||
414, 414, 414, 414, 414, 751, 675, 675, 463, 829,
|
||||
534, 257, 245, 514, 827, 1037, 1037, 229, 457, 230,
|
||||
231, 482, 483, 528, 944, 461, 476, 1030, 1037, 300,
|
||||
498, 1022, 313, 905, 945, 999, 786, 790, 797, 329,
|
||||
1011, 285, 671, 310, 1040, 307, 669, 332, 805, 545,
|
||||
936, 941, 366, 808, 679, 478, 377, 755, 668, 668,
|
||||
676, 676, 676, 678, 845, 667, 0, 0, 323, 499,
|
||||
328, 312, 312, 260, 261, 283, 458, 263, 322, 284,
|
||||
326, 487, 0, 0, 0, 280, 281, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
806, 0, 806, 0, 0, 0, 0, 1011, 1012
|
||||
0, 947, 0, 0, 791, 791, 791, 791, 947, 1008,
|
||||
791, 791, 0, 0, 837, 791, 1008, 0, 0, 0,
|
||||
0, 0, 0, 0, 1019, 1019, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 1005, 745, 745, 745, 721,
|
||||
745, 0, 0, 740, 746, 722, 0, 0, 0, 0,
|
||||
0, 781, 781, 1027, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 807, 0, 807, 0, 0, 0,
|
||||
0, 1012, 1013
|
||||
);
|
||||
|
||||
protected $gotoCheck = array(
|
||||
@ -630,70 +629,69 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
|
||||
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
|
||||
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
|
||||
23, 23, 23, 52, 45, 112, 112, 8, 7, 7,
|
||||
7, 10, 10, 7, 7, 45, 8, 8, 8, 64,
|
||||
11, 10, 92, 10, 8, 10, 80, 10, 10, 10,
|
||||
38, 38, 38, 38, 38, 38, 12, 28, 8, 8,
|
||||
23, 23, 23, 52, 45, 11, 8, 124, 124, 25,
|
||||
80, 10, 10, 64, 92, 45, 8, 8, 8, 109,
|
||||
124, 10, 12, 10, 8, 10, 109, 10, 10, 10,
|
||||
38, 38, 38, 38, 38, 38, 28, 8, 8, 28,
|
||||
28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
||||
28, 28, 28, 28, 28, 70, 70, 70, 70, 70,
|
||||
70, 70, 70, 70, 70, 70, 70, 70, 70, 113,
|
||||
28, 28, 28, 28, 70, 70, 70, 70, 70, 70,
|
||||
70, 70, 70, 70, 70, 70, 70, 70, 113, 113,
|
||||
113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
|
||||
113, 113, 113, 53, 76, 25, 53, 53, 124, 124,
|
||||
8, 8, 8, 8, 8, 8, 19, 8, 69, 53,
|
||||
56, 124, 5, 56, 44, 56, 8, 53, 78, 69,
|
||||
29, 8, 115, 115, 115, 115, 115, 115, 115, 115,
|
||||
115, 115, 115, 115, 115, 115, 114, 19, 19, 123,
|
||||
123, 62, 62, 60, 62, 60, 60, 55, 55, 55,
|
||||
109, 122, 123, 35, 35, 76, 41, 109, 2, 2,
|
||||
120, 43, 42, 96, 72, 76, 76, 123, 74, 117,
|
||||
14, 75, 21, 18, 9, 13, 79, 20, 66, 17,
|
||||
102, 104, 58, 81, 22, 59, 100, 63, 94, 19,
|
||||
19, 19, 19, 19, 19, -1, 19, -1, 45, 45,
|
||||
113, 113, 53, 76, 5, 53, 53, 35, 35, 8,
|
||||
8, 8, 8, 8, 8, 19, 8, 69, 53, 56,
|
||||
62, 62, 56, 62, 56, 8, 53, 44, 69, 78,
|
||||
8, 115, 115, 115, 115, 115, 115, 115, 115, 115,
|
||||
115, 115, 115, 115, 115, 29, 19, 19, 7, 7,
|
||||
7, 112, 112, 7, 7, 123, 123, 60, 114, 60,
|
||||
60, 55, 55, 55, 76, 2, 2, 122, 123, 41,
|
||||
43, 120, 42, 96, 76, 76, 72, 75, 74, 18,
|
||||
117, 14, 21, 13, 123, 9, 20, 17, 79, 66,
|
||||
102, 104, 58, 81, 22, 59, 100, 63, 19, 19,
|
||||
19, 19, 19, 19, 94, 19, -1, -1, 45, 45,
|
||||
45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
|
||||
45, 45, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
64, 64, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, 52, -1, -1, 52, 52, 52, 52, 52, -1,
|
||||
52, 52, -1, -1, -1, 52, -1, -1, -1, -1,
|
||||
-1, -1, 92, -1, -1, 80, -1, -1, -1, -1,
|
||||
-1, -1, 80, -1, -1, 52, 52, 52, 52, 52,
|
||||
80, 80, 52, 52, 52, -1, -1, -1, -1, -1,
|
||||
-1, 80, 69, 69, 69, -1, -1, -1, -1, -1,
|
||||
45, 45, -1, -1, -1, 64, 64, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
80, -1, 80, -1, -1, -1, -1, 80, 80
|
||||
-1, 52, -1, -1, 52, 52, 52, 52, 52, 80,
|
||||
52, 52, -1, -1, 92, 52, 80, -1, -1, -1,
|
||||
-1, -1, -1, -1, 80, 80, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, 80, 52, 52, 52, 52,
|
||||
52, -1, -1, 52, 52, 52, -1, -1, -1, -1,
|
||||
-1, 69, 69, 69, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, 80, -1, 80, -1, -1, -1,
|
||||
-1, 80, 80
|
||||
);
|
||||
|
||||
protected $gotoBase = array(
|
||||
0, 0, -279, 0, 0, 202, 0, 115, -137, 3,
|
||||
120, 128, 144, -10, 16, 0, 0, -59, 9, -48,
|
||||
-9, 7, -77, -20, 0, 188, 0, 0, -389, 204,
|
||||
0, 0, 0, 0, 0, 222, 0, 0, 105, 0,
|
||||
0, 223, 44, 46, 200, 84, 0, 0, 0, 0,
|
||||
0, 0, 109, -159, 0, 11, -164, 0, -78, -81,
|
||||
-313, 0, -26, -80, -241, 0, -19, 0, 0, 178,
|
||||
-49, 0, 23, 0, 26, 25, -99, 0, 197, -13,
|
||||
133, -79, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 122, 0, -90, 0, 24, 0, 0, 0,
|
||||
-89, 0, -67, 0, -69, 0, 0, 0, 0, 18,
|
||||
0, 0, -140, -35, 213, 8, 0, 21, 0, 0,
|
||||
219, 0, 227, -5, -46, 0, 0
|
||||
0, 0, -283, 0, 0, 184, 0, 235, -138, 3,
|
||||
120, 113, 130, -12, 17, 0, 0, -61, 4, -49,
|
||||
-10, 6, -77, -20, 0, 112, 0, 0, -391, 219,
|
||||
0, 0, 0, 0, 0, 166, 0, 0, 105, 0,
|
||||
0, 226, 44, 45, 203, 84, 0, 0, 0, 0,
|
||||
0, 0, 109, -160, 0, 15, -165, 0, -78, -81,
|
||||
-310, 0, -58, -80, -247, 0, -18, 0, 0, 177,
|
||||
-50, 0, 25, 0, 26, 21, -100, 0, 198, -11,
|
||||
117, -79, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 114, 0, -84, 0, 24, 0, 0, 0,
|
||||
-89, 0, -67, 0, -69, 0, 0, 0, 0, -103,
|
||||
0, 0, -14, -36, 225, 7, 0, 22, 0, 0,
|
||||
220, 0, 233, 1, -127, 0, 0
|
||||
);
|
||||
|
||||
protected $gotoDefault = array(
|
||||
-32768, 380, 565, 2, 566, 637, 645, 504, 400, 433,
|
||||
748, 688, 689, 303, 342, 401, 302, 330, 324, 676,
|
||||
669, 671, 679, 134, 333, 682, 1, 684, 439, 716,
|
||||
291, 692, 292, 507, 694, 446, 696, 697, 427, 304,
|
||||
305, 447, 311, 479, 707, 203, 308, 709, 290, 710,
|
||||
719, 335, 293, 510, 489, 469, 501, 402, 363, 476,
|
||||
228, 455, 473, 753, 277, 761, 549, 769, 772, 403,
|
||||
404, 470, 784, 368, 794, 788, 961, 319, 799, 805,
|
||||
993, 808, 811, 349, 331, 327, 815, 816, 4, 820,
|
||||
522, 523, 835, 240, 843, 856, 347, 923, 925, 441,
|
||||
374, 936, 360, 334, 939, 997, 354, 405, 364, 953,
|
||||
261, 282, 244, 406, 423, 249, 407, 365, 1000, 314,
|
||||
1022, 424, 1030, 1038, 272, 306, 474
|
||||
-32768, 380, 566, 2, 567, 638, 646, 505, 400, 433,
|
||||
749, 689, 690, 303, 342, 401, 302, 330, 324, 677,
|
||||
670, 672, 680, 134, 333, 683, 1, 685, 439, 717,
|
||||
291, 693, 292, 508, 695, 446, 697, 698, 427, 304,
|
||||
305, 447, 311, 480, 708, 203, 308, 710, 290, 711,
|
||||
720, 335, 293, 511, 490, 469, 502, 402, 363, 477,
|
||||
228, 455, 473, 754, 277, 762, 550, 770, 773, 403,
|
||||
404, 470, 785, 368, 795, 789, 962, 319, 800, 806,
|
||||
994, 809, 812, 349, 331, 327, 816, 817, 4, 821,
|
||||
523, 524, 836, 240, 844, 857, 347, 924, 926, 441,
|
||||
374, 937, 360, 334, 940, 998, 354, 405, 364, 954,
|
||||
262, 282, 244, 406, 423, 249, 407, 365, 1001, 314,
|
||||
1023, 424, 1031, 1039, 273, 306, 475
|
||||
);
|
||||
|
||||
protected $ruleToNonTerminal = array(
|
||||
@ -745,7 +743,7 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
108, 108, 117, 117, 117, 117, 69, 119, 119, 120,
|
||||
120, 120, 120, 120, 114, 121, 121, 122, 122, 122,
|
||||
122, 122, 112, 112, 112, 112, 124, 125, 123, 123,
|
||||
123, 123, 123, 123, 123, 126, 126, 126
|
||||
123, 123, 123, 123, 123, 126, 126, 126, 126
|
||||
);
|
||||
|
||||
protected $ruleToLength = array(
|
||||
@ -797,7 +795,7 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
3, 1, 1, 3, 1, 1, 4, 3, 1, 1,
|
||||
1, 3, 3, 0, 1, 3, 1, 3, 1, 4,
|
||||
2, 0, 2, 2, 1, 2, 1, 1, 1, 4,
|
||||
3, 3, 3, 6, 3, 1, 1, 1
|
||||
3, 3, 3, 6, 3, 1, 1, 2, 1
|
||||
);
|
||||
|
||||
protected function reduceRule0() {
|
||||
@ -2765,6 +2763,10 @@ class Php7 extends \PhpParser\ParserAbstract
|
||||
}
|
||||
|
||||
protected function reduceRule487() {
|
||||
$this->semValue = $this->parseNumString('-' . $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
|
||||
}
|
||||
|
||||
protected function reduceRule488() {
|
||||
$this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
|
||||
}
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ abstract class ParserAbstract implements Parser
|
||||
}
|
||||
|
||||
protected function parseNumString($str, $attributes) {
|
||||
if (!preg_match('/^(?:0|[1-9][0-9]*)$/', $str)) {
|
||||
if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) {
|
||||
return new String_($str, $attributes);
|
||||
}
|
||||
|
||||
|
72
test/code/parser/scalar/encapsedNegVarOffset.test
Normal file
72
test/code/parser/scalar/encapsedNegVarOffset.test
Normal file
@ -0,0 +1,72 @@
|
||||
Encapsed string negative var offsets
|
||||
-----
|
||||
<?php
|
||||
"$a[-0]";
|
||||
"$a[-1]";
|
||||
"$a[-0x0]";
|
||||
"$a[-00]";
|
||||
"$a[@@{ -PHP_INT_MAX - 1 }@@]";
|
||||
-----
|
||||
!!php7
|
||||
array(
|
||||
0: Scalar_Encapsed(
|
||||
parts: array(
|
||||
0: Expr_ArrayDimFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
dim: Scalar_String(
|
||||
value: -0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Scalar_Encapsed(
|
||||
parts: array(
|
||||
0: Expr_ArrayDimFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
dim: Scalar_LNumber(
|
||||
value: -1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
2: Scalar_Encapsed(
|
||||
parts: array(
|
||||
0: Expr_ArrayDimFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
dim: Scalar_String(
|
||||
value: -0x0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
3: Scalar_Encapsed(
|
||||
parts: array(
|
||||
0: Expr_ArrayDimFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
dim: Scalar_String(
|
||||
value: -00
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
4: Scalar_Encapsed(
|
||||
parts: array(
|
||||
0: Expr_ArrayDimFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
dim: Scalar_LNumber(
|
||||
value: @@{ -PHP_INT_MAX - 1 }@@
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user