Merge branch '3.x'

Conflicts:
	lib/PhpParser/Parser/Php5.php
	lib/PhpParser/Parser/Php7.php
	test/code/parser/stmt/class/name.test
This commit is contained in:
Nikita Popov 2017-02-09 20:38:33 +01:00
commit 9f5ec5a69a
8 changed files with 2193 additions and 1698 deletions

View File

@ -261,22 +261,22 @@ class_entry_type:
extends_from:
/* empty */ { $$ = null; }
| T_EXTENDS name { $$ = $2; }
| T_EXTENDS class_name { $$ = $2; }
;
interface_extends_list:
/* empty */ { $$ = array(); }
| T_EXTENDS name_list { $$ = $2; }
| T_EXTENDS class_name_list { $$ = $2; }
;
implements_list:
/* empty */ { $$ = array(); }
| T_IMPLEMENTS name_list { $$ = $2; }
| T_IMPLEMENTS class_name_list { $$ = $2; }
;
name_list:
name { init($1); }
| name_list ',' name { push($1, $3); }
class_name_list:
class_name { init($1); }
| class_name_list ',' class_name { push($1, $3); }
;
for_statement:
@ -448,7 +448,7 @@ class_statement:
| method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body
{ $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]];
$this->checkClassMethod($$, #1); }
| T_USE name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
| T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
;
trait_adaptations:
@ -462,7 +462,7 @@ trait_adaptation_list:
;
trait_adaptation:
trait_method_reference_fully_qualified T_INSTEADOF name_list ';'
trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';'
{ $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; }
| trait_method_reference T_AS member_modifier identifier_ex ';'
{ $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; }

View File

@ -62,6 +62,11 @@ semi:
| error { /* nothing */ }
;
no_comma:
/* empty */ { /* nothing */ }
| ',' { $this->emitError(new Error('A trailing comma is not allowed here', attributes())); }
;
top_statement:
statement { $$ = $1; }
| function_declaration_statement { $$ = $1; }
@ -98,18 +103,31 @@ group_use_declaration:
;
unprefixed_use_declarations:
unprefixed_use_declarations ',' unprefixed_use_declaration
non_empty_unprefixed_use_declarations no_comma { $$ = $1; }
;
non_empty_unprefixed_use_declarations:
non_empty_unprefixed_use_declarations ',' unprefixed_use_declaration
{ push($1, $3); }
| unprefixed_use_declaration { init($1); }
;
use_declarations:
use_declarations ',' use_declaration { push($1, $3); }
non_empty_use_declarations no_comma { $$ = $1; }
;
non_empty_use_declarations:
non_empty_use_declarations ',' use_declaration { push($1, $3); }
| use_declaration { init($1); }
;
inline_use_declarations:
inline_use_declarations ',' inline_use_declaration { push($1, $3); }
non_empty_inline_use_declarations no_comma { $$ = $1; }
;
non_empty_inline_use_declarations:
non_empty_inline_use_declarations ',' inline_use_declaration
{ push($1, $3); }
| inline_use_declaration { init($1); }
;
@ -131,7 +149,12 @@ inline_use_declaration:
;
constant_declaration_list:
constant_declaration_list ',' constant_declaration { push($1, $3); }
non_empty_constant_declaration_list no_comma { $$ = $1; }
;
non_empty_constant_declaration_list:
non_empty_constant_declaration_list ',' constant_declaration
{ push($1, $3); }
| constant_declaration { init($1); }
;
@ -140,7 +163,11 @@ constant_declaration:
;
class_const_list:
class_const_list ',' class_const { push($1, $3); }
non_empty_class_const_list no_comma { $$ = $1; }
;
non_empty_class_const_list:
non_empty_class_const_list ',' class_const { push($1, $3); }
| class_const { init($1); }
;
@ -228,8 +255,12 @@ optional_finally:
;
variables_list:
non_empty_variables_list no_comma { $$ = $1; }
;
non_empty_variables_list:
variable { init($1); }
| variables_list ',' variable { push($1, $3); }
| non_empty_variables_list ',' variable { push($1, $3); }
;
optional_ref:
@ -266,22 +297,26 @@ class_entry_type:
extends_from:
/* empty */ { $$ = null; }
| T_EXTENDS name { $$ = $2; }
| T_EXTENDS class_name { $$ = $2; }
;
interface_extends_list:
/* empty */ { $$ = array(); }
| T_EXTENDS name_list { $$ = $2; }
| T_EXTENDS class_name_list { $$ = $2; }
;
implements_list:
/* empty */ { $$ = array(); }
| T_IMPLEMENTS name_list { $$ = $2; }
| T_IMPLEMENTS class_name_list { $$ = $2; }
;
name_list:
name { init($1); }
| name_list ',' name { push($1, $3); }
class_name_list:
non_empty_class_name_list no_comma { $$ = $1; }
;
non_empty_class_name_list:
class_name { init($1); }
| non_empty_class_name_list ',' class_name { push($1, $3); }
;
for_statement:
@ -301,8 +336,12 @@ declare_statement:
;
declare_list:
non_empty_declare_list no_comma { $$ = $1; }
;
non_empty_declare_list:
declare_list_element { init($1); }
| declare_list ',' declare_list_element { push($1, $3); }
| non_empty_declare_list ',' declare_list_element { push($1, $3); }
;
declare_list_element:
@ -372,7 +411,7 @@ foreach_variable:
;
parameter_list:
non_empty_parameter_list { $$ = $1; }
non_empty_parameter_list no_comma { $$ = $1; }
| /* empty */ { $$ = array(); }
;
@ -411,7 +450,7 @@ optional_return_type:
argument_list:
'(' ')' { $$ = array(); }
| '(' non_empty_argument_list ')' { $$ = $2; }
| '(' non_empty_argument_list no_comma ')' { $$ = $2; }
;
non_empty_argument_list:
@ -426,7 +465,11 @@ argument:
;
global_var_list:
global_var_list ',' global_var { push($1, $3); }
non_empty_global_var_list no_comma { $$ = $1; }
;
non_empty_global_var_list:
non_empty_global_var_list ',' global_var { push($1, $3); }
| global_var { init($1); }
;
@ -435,7 +478,11 @@ global_var:
;
static_var_list:
static_var_list ',' static_var { push($1, $3); }
non_empty_static_var_list no_comma { $$ = $1; }
;
non_empty_static_var_list:
non_empty_static_var_list ',' static_var { push($1, $3); }
| static_var { init($1); }
;
@ -457,7 +504,7 @@ class_statement:
| method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body
{ $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]];
$this->checkClassMethod($$, #1); }
| T_USE name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
| T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
;
trait_adaptations:
@ -471,7 +518,7 @@ trait_adaptation_list:
;
trait_adaptation:
trait_method_reference_fully_qualified T_INSTEADOF name_list ';'
trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';'
{ $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; }
| trait_method_reference T_AS member_modifier identifier_ex ';'
{ $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; }
@ -521,8 +568,13 @@ member_modifier:
;
property_declaration_list:
non_empty_property_declaration_list no_comma { $$ = $1; }
;
non_empty_property_declaration_list:
property_declaration { init($1); }
| property_declaration_list ',' property_declaration { push($1, $3); }
| non_empty_property_declaration_list ',' property_declaration
{ push($1, $3); }
;
property_decl_name:
@ -535,7 +587,11 @@ property_declaration:
;
expr_list:
expr_list ',' expr { push($1, $3); }
non_empty_expr_list no_comma { $$ = $1; }
;
non_empty_expr_list:
non_empty_expr_list ',' expr { push($1, $3); }
| expr { init($1); }
;
@ -654,8 +710,12 @@ lexical_vars:
;
lexical_var_list:
non_empty_lexical_var_list no_comma { $$ = $1; }
;
non_empty_lexical_var_list:
lexical_var { init($1); }
| lexical_var_list ',' lexical_var { push($1, $3); }
| non_empty_lexical_var_list ',' lexical_var { push($1, $3); }
;
lexical_var:

View File

@ -18,8 +18,8 @@ use PhpParser\Node\Stmt;
class Php5 extends \PhpParser\ParserAbstract
{
protected $tokenToSymbolMapSize = 392;
protected $actionTableSize = 998;
protected $gotoTableSize = 656;
protected $actionTableSize = 1007;
protected $gotoTableSize = 686;
protected $invalidSymbol = 157;
protected $errorSymbol = 1;
@ -235,113 +235,114 @@ class Php5 extends \PhpParser\ParserAbstract
protected $action = array(
674, 675, 676, 677, 678,-32766, 679, 680, 681, 717,
718, 216, 217, 218, 219, 220, 221, 222, 223, 224,
420, 225, 226, 227, 228, 229, 230, 231, 232, 233,
0, 225, 226, 227, 228, 229, 230, 231, 232, 233,
234, 235, 236,-32766,-32766,-32766,-32766,-32766,-32766,-32766,
-32766,-32767,-32767,-32767,-32767, 419, 237, 238,-32766,-32766,
-32766,-32766, 682,-32766, 0,-32766,-32766,-32766,-32766,-32766,
-32766,-32767,-32767,-32767,-32767, 418, 237, 238,-32766,-32766,
-32766,-32766, 682,-32766, 28,-32766,-32766,-32766,-32766,-32766,
-32766,-32767,-32767,-32767,-32767,-32767, 683, 684, 685, 686,
687, 688, 689, 1177, 28, 749,-32766,-32766,-32766,-32766,
-32766, 282, 690, 691, 692, 693, 694, 695, 696, 697,
687, 688, 689, 1177, 121, 749,-32766,-32766,-32766,-32766,
-32766, 422, 690, 691, 692, 693, 694, 695, 696, 697,
698, 699, 700, 720, 721, 722, 723, 724, 712, 713,
714, 715, 716, 701, 702, 703, 704, 705, 706, 707,
743, 744, 745, 746, 747, 748, 708, 709, 710, 711,
741, 732, 730, 731, 727, 728, 46, 719, 725, 726,
741, 732, 730, 731, 727, 728, 47, 719, 725, 726,
733, 734, 736, 735, 737, 738, 52, 53, 423, 54,
55, 729, 740, 739, 422, 56, 57, 336, 58,-32766,
55, 729, 740, 739, 282, 56, 57, 337, 58,-32766,
-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 7,-32767,
-32767,-32767,-32767, 50, 330, 18, 523, 949, 950, 951,
948, 947, 946, 941,-32766,-32766,-32766, 121, 767, 768,
825, 59, 60,-32766,-32766,-32766, 812, 61, 1177, 62,
-32767,-32767,-32767, 50, 325,-32766, 590, 949, 950, 951,
948, 947, 946, 941,-32766,-32766,-32766, 414, 767, 768,
825, 59, 60,-32766,-32766,-32766, 766, 61, 1177, 62,
291, 292, 63, 64, 65, 66, 67, 68, 69, 70,
351, 24, 299, 71, 415,-32766,-32766,-32766, 116, 1092,
419, 24, 299, 71, 415,-32766,-32766,-32766, 117, 1092,
1093, 752, 751, 755, 213, 214, 215, 472,-32766,-32766,
-32766, 826, 408, 1104, 307,-32766, 1192,-32766,-32766,-32766,
-32766,-32766,-32766, 1041, 200, -271, 435, 414,-32766, 23,
-32766, 826, 408, 1104, 307,-32766, 1059,-32766,-32766,-32766,
-32766,-32766,-32766, 1041, 200, -271, 435,-32766,-32766,-32766,
-32766,-32766,-32766,-32766,-32766, 120, 496, 949, 950, 951,
948, 947, 946, 348, 480, 481, 293, 625, 125,-32766,
897, 898, 336, 482, 483,-32766, 1098, 1099, 1100, 1101,
897, 898, 337, 482, 483,-32766, 1098, 1099, 1100, 1101,
1095, 1096, 310, 497,-32766, 204, 431, 497, 1102, 1097,
431, 309, -222, 497, 8, 39, 431, 327, 321, 1059,
431, 309, -222, 873, 23, 39, 280, 333, 321, 1192,
322, 424, -124, -124, -124, -4, 826, 471, 99, 100,
101, 814, 301, 1041, 38, 19, 425, -124, 473, -124,
474, -124, 475, -124, 102, 426, -124, -124, -124, 29,
30, 427, 428, 626, 31, 476, 431, 816, 72, 337,
927, 349, 350, 477, 478,-32766,-32766,-32766, 298, 479,
1041, 811, 797, 844, 429, 430,-32767,-32767,-32767,-32767,
94, 95, 96, 97, 98,-32766, 418,-32766,-32766,-32766,
30, 427, 428, 626, 31, 476, 431, 816, 72, 329,
927, 349, 350, 477, 478,-32766,-32766,-32766, 420, 479,
1041, 812, 797, 844, 429, 430,-32767,-32767,-32767,-32767,
94, 95, 96, 97, 98,-32766, 8,-32766,-32766,-32766,
-32766, 1142, 213, 214, 215, 295, 424, 239, 828, 640,
-124, 280, 471, 897, 898, 755, 814, 1041, 1210, 38,
19, 425, 200, 473, 904, 474, 497, 475, 297, 431,
-124, 445, 471, 897, 898, 755, 814, 1041, 1210, 38,
19, 425, 200, 473, 351, 474, 497, 475, 297, 431,
426, 213, 214, 215, 29, 30, 427, 428, 406, 31,
476, 1041, 445, 72, 320, 826, 349, 350, 477, 478,
421, 200, 334, 873, 479, 214, 215, 759, 844, 429,
430, 213, 214, 215, 295, 923, 76, 77, 78, 47,
590, 1191, 482, 655, 200, 326, 27, 294, 332, 807,
119, 200, 241, 828, 640, -4, 32, 1041, 79, 80,
476, 1041, 874, 72, 320, 826, 349, 350, 477, 478,
421, 200, 336, 46, 479, 214, 215, 759, 844, 429,
430, 213, 214, 215, 295, -218, 76, 77, 78, 904,
298, 1191, 1219, 655, 200, 1220, 27, 294, 334, 809,
49, 200, 241, 828, 640, -4, 32, 332, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 34, 301, 448, 826, 424, 809, 124,-32766,-32766,
-32766, 471, 903, 441, 102, 814, 642, 1104, 38, 19,
425, 75, 473, 416, 474, 327, 475, 766,-32766, 426,
-32766,-32766, 644, 29, 30, 427, 826, 751, 31, 476,
-218, 117, 72, 805, 49, 349, 350,-32766,-32766,-32766,
215,-32766, 446, 479,-32766,-32766, 234, 235, 236, 213,
214, 215, 874, 207, 643, 1143, 124,-32766, 200,-32766,
-32766,-32766, 237, 238, 424, 231, 232, 233, 1041, 200,
471, 922, 828, 640, 814, 206, 129, 38, 19, 425,
581, 473, 242, 474, 752, 475, 755, 115, 426, 96,
97, 98, 29, 30, 427, 826, 424, 31, 476, 126,
128, 72, 471, 327, 349, 350, 814, 205, 1041, 38,
19, 425, 479, 473, 243, 474, 118, 475, 1041, 1069,
426, 200, 1041, 646, 29, 30, 427, 826, 244, 31,
476, 296, 313, 72, 549, 123, 349, 350,-32766,-32766,
1219, 828, 640, 1220, 479, 283,-32766,-32766,-32766, 824,
497, 237, 238, 431, 652, 649, 460, 596, 436, 648,
327, 455, 20, 130, 359, 424,-32766, 767, 768, 938,
658, 471, -82, 828, 640, 814, 603, 604, 38, 19,
425,-32766, 473, 837, 474, 301, 475, 760, 645, 426,
102, 926, 668, 29, 30, 427, 826, 424, 31, 476,
43, 51, 72, 471, 127, 349, 350, 814, 45, 48,
38, 19, 425, 479, 473, 299, 474, 753, 475, 41,
42, 426, 44, 609, 954, 29, 30, 427, 752, 613,
31, 476, 444, 751, 72, 621, 755, 349, 350, 331,
529,-32766, 860, 640, 601, 479, 845, 33, 103, 104,
101, 119, 301, 448, 826, 424, 807, 124,-32766,-32766,
-32766, 471, 903, 18, 102, 814,-32766,-32766, 38, 19,
425, 446, 473, 416, 474, 116, 475, 923,-32766, 426,
-32766,-32766, 646, 29, 30, 427, 826, 751, 31, 476,
523, 1041, 72, 805, 1041, 349, 350,-32766,-32766,-32766,
215,-32766, 118, 479, 482, 811, 234, 235, 236,-32766,
-32766,-32766, 1041, 207, 644, 1143, 124,-32766, 200,-32766,
-32766,-32766, 237, 238, 424, 96, 97, 98, 34,-32766,
471, 922, 828, 640, 814, 283, 75, 38, 19, 425,
333, 473, 206, 474, 752, 475, 755, 1104, 426, 231,
232, 233, 29, 30, 427, 826, 424, 31, 476, 126,
549, 72, 471, 333, 349, 350, 814, 242, 1041, 38,
19, 425, 479, 473, 115, 474, 205, 475, 1041, 1069,
426,-32766,-32766, 643, 29, 30, 427, 826, 129, 31,
476, 296, 581, 72, 243, 123, 349, 350, 237, 238,
497, 860, 640, 431, 479, 244, 213, 214, 215, 441,
497, 200, 642, 431, 128, 649, 455, 20, 436,-32766,
333, 460, 596, 130, 359, 424, 200, 767, 768, 603,
604, 471, 313, 828, 640, 814, 938, 658, 38, 19,
425, 648, 473, 652, 474, 824, 475, 760, 645, 426,
-82, 926, 668, 29, 30, 427, 826, 424, 31, 476,
837, 301, 72, 471, 42, 349, 350, 814, 102, 299,
38, 19, 425, 479, 473, 127, 474, 43, 475, 609,
44, 426, 51, 753, 48, 29, 30, 427, 752, 41,
31, 476, 613, 45, 72, 751, 584, 349, 350, 954,
600,-32766, 828, 640, 601, 479, 755, 33, 103, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
584, 634, -80, 447, 12, 279, 424, 465, 439, -409,
600, 587, 471, 40, 828, 640, 814, 846, 1103, 38,
19, 425, 840, 473, 1148, 474, 240, 475, 980, 982,
426, 329, 482, 335, 29, 30, 427, 0, 0, 31,
476, 1149, 328, 72, 208, 209, 349, 350, -501, -500,
210, 308, 211, 306, 479, 1039, 0, 0, 0, 358,
-401, 3, 0, 0, 202, 0, 4, 0, 11, 208,
209, -410, 1092, 1093, 9, 210,-32766, 211, 839, 409,
1094, 35, 384, 828, 640, 441, 383, 372, 410, 202,
392, 531, 641, 607, 861, 856, 800, 1092, 1093, 934,
-500,-32766, 868, 867, 933, 1094, 817, 802, 823, 815,
765, 663, 662, 37, 36, 932, 764, 931, 763, 930,
0, 876, 813, 810, 858, 808, 806, 570, 822, 1098,
1099, 1100, 1101, 1095, 1096, 382, 404, 75, 325, 324,
122, 1102, 1097, 405, 651, 653, 284, 654, 212, 656,
-32766, 660, 570, 665, 1098, 1099, 1100, 1101, 1095, 1096,
382, 666, 667, 657, -419, 772, 1102, 1097, 771, 770,
866, 865, 1163, 212, 1055,-32766, 664, 798, 1216, 459,
1215, 1185, 1183, 1168, 1181, 1083, 915, 1189, 1179, 841,
842, 843, 939, 831, 1044, 769, 1043, 833, 1217, 761,
762, 1218, 0, 26, 413, 407, 338, 305, 304, 73,
25, 303, 22,-32766, 302, 290, 289, 281, 203, 74,
0, 1020, 574, 1021, 1045, -219, -218, 14, 1085, 1108,
905, 1049, 1046, 631, 564, 469, 464, 463, 456, 377,
16, 15, 0, 0, 0, 1162, 1109, 1213, 1082, 1180,
1052, 1167, 1182, 1068, 1053, 1054, 1051, 1050
529, 444, 634, 621, 447, 279, 424, 324, -80, -409,
12, 465, 471, 587, 828, 640, 814, 409, 326, 38,
19, 425, 439, 473, 861, 474, 240, 475, 980, 982,
426, 308, 306, 0, 29, 30, 427, 0, 0, 31,
476, 0, 845, 72, 208, 209, 349, 350, 846, 328,
210, 482, 211, 323, 479, 0, -500, -501, 0, 0,
1103, 0, 0, 1149, 202, 0, 0, 0, 11, 208,
209, 0, 1092, 1093, -401, 210,-32766, 211, 3, 4,
1094, 9, 358, 828, 640, -410, 858, 531, 441, 202,
392, 384, 372, 410, 383, 0, 839, 1092, 1093, 856,
-500,-32766, 763, 868, 867, 1094, 876, 817, 802, 823,
815, 765, 663, 662, 37, 36, 808, 806, 764, 934,
0, 822, 933, 931, 930, 800, 932, 570, 813, 1098,
1099, 1100, 1101, 1095, 1096, 382, 810, 771, 641, 653,
75, 1102, 1097, 654, 656, 657, 284, 660, 212, 665,
-32766, 666, 570, 667, 1098, 1099, 1100, 1101, 1095, 1096,
382, 405, 404, 331, 330, 122, 1102, 1097, 651, 35,
772, 770, 607, 212, 664,-32766, 866, 865, 1055, 798,
1216, 1218, 459, 1215, 1185, 1183, 1168, 1181, 1083, 915,
1189, 1179, 841, 842, 843, 939, 831, 1044, 840, 1043,
833, 1217, 761, 762, 769, 0, 26, 25, 413, 407,
338, 305, 304, 73, 22, 303, 302, 290, 289,-32766,
281, 203, 74, 40, 0, 1020, 574, 1021, 1045, -219,
-218, 14, 1085, 1108, 905, 1049, 1046, 631, 564, 469,
464, 463, 456, 377, 16, 15, 0, 0, 1039, -419,
0, 1163, 1162, 1109, 1213, 1082, 1180, 1052, 1167, 1182,
1068, 1053, 1054, 1051, 1050, 0, 1148
);
protected $actionCheck = array(
2, 3, 4, 5, 6, 8, 8, 9, 10, 11,
12, 31, 32, 33, 34, 35, 36, 37, 38, 39,
7, 41, 42, 43, 44, 45, 46, 47, 48, 49,
0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 8, 9, 10, 31, 32, 33, 34,
35, 36, 37, 38, 39, 7, 66, 67, 31, 32,
33, 34, 54, 28, 0, 30, 31, 32, 33, 34,
33, 34, 54, 28, 7, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 68, 69, 70, 71,
72, 73, 74, 79, 7, 77, 31, 32, 33, 34,
35, 7, 84, 85, 86, 87, 88, 89, 90, 91,
@ -352,157 +353,158 @@ class Php5 extends \PhpParser\ParserAbstract
132, 133, 134, 135, 136, 137, 2, 3, 4, 5,
6, 143, 144, 145, 7, 11, 12, 153, 14, 31,
32, 33, 34, 35, 36, 37, 38, 39, 103, 41,
42, 43, 44, 67, 109, 152, 82, 112, 113, 114,
42, 43, 44, 67, 109, 79, 82, 112, 113, 114,
115, 116, 117, 118, 8, 9, 10, 7, 102, 103,
1, 47, 48, 31, 32, 33, 148, 53, 79, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
7, 67, 68, 69, 70, 8, 9, 10, 149, 75,
76, 77, 77, 79, 8, 9, 10, 83, 8, 9,
10, 1, 146, 139, 128, 28, 152, 30, 31, 32,
33, 34, 35, 12, 28, 79, 102, 7, 28, 7,
33, 34, 35, 12, 28, 79, 102, 151, 28, 153,
30, 31, 32, 33, 34, 149, 112, 112, 113, 114,
115, 116, 117, 7, 120, 121, 35, 77, 149, 103,
130, 131, 153, 129, 130, 109, 132, 133, 134, 135,
136, 137, 138, 143, 118, 7, 146, 143, 144, 145,
146, 7, 152, 143, 7, 151, 146, 153, 154, 152,
146, 7, 152, 29, 7, 151, 13, 153, 154, 152,
156, 71, 72, 73, 74, 0, 1, 77, 50, 51,
52, 81, 54, 12, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 66, 95, 96, 97, 98, 99,
100, 101, 102, 143, 104, 105, 146, 148, 108, 7,
150, 111, 112, 113, 114, 8, 9, 10, 35, 119,
150, 111, 112, 113, 114, 8, 9, 10, 7, 119,
12, 148, 122, 123, 124, 125, 41, 42, 43, 44,
45, 46, 47, 48, 49, 28, 7, 30, 31, 32,
33, 155, 8, 9, 10, 35, 71, 13, 148, 149,
150, 13, 77, 130, 131, 79, 81, 12, 82, 84,
85, 86, 28, 88, 152, 90, 143, 92, 7, 146,
150, 29, 77, 130, 131, 79, 81, 12, 82, 84,
85, 86, 28, 88, 7, 90, 143, 92, 7, 146,
95, 8, 9, 10, 99, 100, 101, 102, 103, 104,
105, 12, 29, 108, 109, 1, 111, 112, 113, 114,
7, 28, 67, 29, 119, 9, 10, 122, 123, 124,
125, 8, 9, 10, 35, 148, 8, 9, 10, 67,
82, 1, 129, 29, 28, 7, 140, 141, 143, 148,
13, 28, 29, 148, 149, 150, 28, 12, 30, 31,
105, 12, 148, 108, 109, 1, 111, 112, 113, 114,
7, 28, 67, 67, 119, 9, 10, 122, 123, 124,
125, 8, 9, 10, 35, 152, 8, 9, 10, 152,
35, 1, 77, 29, 28, 80, 140, 141, 143, 148,
67, 28, 29, 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, 13, 54, 128, 1, 71, 148, 147, 8, 9,
10, 77, 152, 146, 66, 81, 149, 139, 84, 85,
86, 149, 88, 123, 90, 153, 92, 148, 28, 95,
10, 77, 152, 152, 66, 81, 8, 9, 84, 85,
86, 149, 88, 123, 90, 149, 92, 148, 28, 95,
30, 31, 29, 99, 100, 101, 1, 77, 104, 105,
152, 149, 108, 148, 67, 111, 112, 8, 9, 10,
10, 151, 149, 119, 8, 9, 50, 51, 52, 8,
9, 10, 148, 15, 29, 152, 147, 28, 28, 30,
31, 32, 66, 67, 71, 47, 48, 49, 12, 28,
77, 148, 148, 149, 81, 15, 149, 84, 85, 86,
153, 88, 15, 90, 77, 92, 79, 15, 95, 47,
82, 12, 108, 148, 12, 111, 112, 8, 9, 10,
10, 151, 149, 119, 129, 148, 50, 51, 52, 8,
9, 10, 12, 15, 29, 152, 147, 28, 28, 30,
31, 32, 66, 67, 71, 47, 48, 49, 13, 28,
77, 148, 148, 149, 81, 35, 149, 84, 85, 86,
153, 88, 15, 90, 77, 92, 79, 139, 95, 47,
48, 49, 99, 100, 101, 1, 71, 104, 105, 149,
29, 108, 77, 153, 111, 112, 81, 15, 12, 84,
85, 86, 119, 88, 15, 90, 149, 92, 12, 112,
95, 28, 12, 29, 99, 100, 101, 1, 15, 104,
105, 35, 29, 108, 78, 29, 111, 112, 31, 32,
77, 148, 149, 80, 119, 35, 8, 9, 10, 29,
143, 66, 67, 146, 29, 29, 72, 73, 151, 29,
153, 72, 73, 97, 98, 71, 28, 102, 103, 148,
149, 77, 29, 148, 149, 81, 106, 107, 84, 85,
86, 31, 88, 35, 90, 54, 92, 148, 149, 95,
66, 148, 149, 99, 100, 101, 1, 71, 104, 105,
67, 67, 108, 77, 67, 111, 112, 81, 67, 67,
84, 85, 86, 119, 88, 68, 90, 77, 92, 67,
67, 95, 67, 74, 79, 99, 100, 101, 77, 93,
104, 105, 86, 77, 108, 91, 79, 111, 112, 110,
82, 82, 148, 149, 109, 119, 123, 15, 16, 17,
78, 108, 77, 153, 111, 112, 81, 15, 12, 84,
85, 86, 119, 88, 15, 90, 15, 92, 12, 112,
95, 31, 32, 29, 99, 100, 101, 1, 149, 104,
105, 35, 153, 108, 15, 29, 111, 112, 66, 67,
143, 148, 149, 146, 119, 15, 8, 9, 10, 146,
143, 28, 149, 146, 29, 29, 72, 73, 151, 31,
153, 72, 73, 97, 98, 71, 28, 102, 103, 106,
107, 77, 29, 148, 149, 81, 148, 149, 84, 85,
86, 29, 88, 29, 90, 29, 92, 148, 149, 95,
29, 148, 149, 99, 100, 101, 1, 71, 104, 105,
35, 54, 108, 77, 67, 111, 112, 81, 66, 68,
84, 85, 86, 119, 88, 67, 90, 67, 92, 74,
67, 95, 67, 77, 67, 99, 100, 101, 77, 67,
104, 105, 93, 67, 108, 77, 87, 111, 112, 79,
96, 82, 148, 149, 109, 119, 79, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
87, 89, 94, 94, 94, 94, 71, 102, 102, 142,
96, 96, 77, 151, 148, 149, 81, 123, 139, 84,
85, 86, 150, 88, 156, 90, 29, 92, 56, 57,
95, 127, 129, 126, 99, 100, 101, -1, -1, 104,
105, 139, 126, 108, 47, 48, 111, 112, 128, 128,
53, 128, 55, 128, 119, 154, -1, -1, -1, 142,
142, 142, -1, -1, 67, -1, 142, -1, 142, 47,
48, 142, 75, 76, 142, 53, 79, 55, 147, 146,
83, 151, 146, 148, 149, 146, 146, 146, 146, 67,
146, 146, 149, 155, 148, 148, 148, 75, 76, 148,
82, 86, 89, 91, 94, 94, 71, 127, 94, 142,
94, 102, 77, 96, 148, 149, 81, 146, 110, 84,
85, 86, 102, 88, 148, 90, 29, 92, 56, 57,
95, 128, 128, -1, 99, 100, 101, -1, -1, 104,
105, -1, 123, 108, 47, 48, 111, 112, 123, 126,
53, 129, 55, 126, 119, -1, 128, 128, -1, -1,
139, -1, -1, 139, 67, -1, -1, -1, 142, 47,
48, -1, 75, 76, 142, 53, 79, 55, 142, 142,
83, 142, 142, 148, 149, 142, 148, 146, 146, 67,
146, 146, 146, 146, 146, -1, 147, 75, 76, 148,
128, 79, 148, 148, 148, 83, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
-1, 148, 148, 148, 148, 148, 148, 130, 148, 132,
133, 134, 135, 136, 137, 138, 149, 149, 149, 149,
133, 134, 135, 136, 137, 138, 148, 150, 149, 149,
149, 144, 145, 149, 149, 149, 153, 149, 151, 149,
153, 149, 130, 149, 132, 133, 134, 135, 136, 137,
138, 149, 149, 149, 154, 150, 144, 145, 150, 150,
138, 149, 149, 149, 149, 149, 144, 145, 149, 151,
150, 150, 155, 151, 150, 153, 150, 150, 150, 150,
150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
150, 150, -1, 151, 151, 151, 151, 151, 151, 151,
150, 150, 150, 150, 150, -1, 151, 151, 151, 151,
151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
-1, 152, 152, 152, 152, 152, 152, 152, 152, 152,
151, 151, 151, 151, -1, 152, 152, 152, 152, 152,
152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
152, 152, -1, -1, -1, 155, 155, 155, 155, 155,
155, 155, 155, 155, 155, 155, 155, 155
152, 152, 152, 152, 152, 152, -1, -1, 154, 154,
-1, 155, 155, 155, 155, 155, 155, 155, 155, 155,
155, 155, 155, 155, 155, -1, 156
);
protected $actionBase = array(
0, 220, 295, 109, 109, 180, 707, -2, -2, -2,
-2, -2, 135, 473, 606, 404, 606, 505, 574, 675,
675, 675, 330, 389, 221, 221, 816, 536, 221, 365,
291, 328, 586, 590, 576, 435, 435, 435, 435, 134,
134, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
435, 384, 179, 427, 458, 718, 717, 715, 720, 812,
651, 811, 770, 771, 551, 772, 773, 774, 775, 776,
769, 777, 678, 778, 418, 418, 418, 418, 418, 418,
0, 220, 295, 109, 109, 180, 718, -2, -2, -2,
-2, -2, 135, 505, 606, 404, 606, 574, 473, 675,
675, 675, 330, 389, 221, 221, 820, 502, 221, 365,
328, 291, 586, 520, 576, 499, 499, 499, 499, 134,
134, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, 254, 179, 458, 535, 709, 708, 728, 713, 816,
651, 815, 773, 774, 605, 775, 776, 777, 778, 779,
772, 780, 757, 781, 418, 418, 418, 418, 418, 418,
418, 418, 418, 418, 418, -3, 354, 383, 413, 206,
516, 521, 521, 521, 521, 521, 521, 521, 166, 166,
478, 618, 618, 618, 618, 618, 618, 618, 166, 166,
166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
166, 166, 166, 166, 166, 406, 618, 618, 618, 510,
737, 573, 762, 762, 762, 762, 762, 762, 762, 762,
166, 166, 166, 166, 166, 406, 521, 521, 521, 510,
737, 603, 762, 762, 762, 762, 762, 762, 762, 762,
762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
762, 762, 762, 762, 762, 470, -20, -20, 509, 630,
327, 587, 210, 152, 197, 25, 25, 25, 25, 25,
762, 762, 762, 762, 762, 470, -20, -20, 509, 608,
327, 570, 210, 152, 197, 25, 25, 25, 25, 25,
17, 45, 5, 5, 5, 5, 712, 305, 305, 305,
305, 118, 118, 118, 118, 781, 780, 779, 764, 303,
303, 643, 643, 627, 731, 522, 522, 498, 498, 487,
305, 118, 118, 118, 118, 784, 783, 782, 768, 395,
395, 662, 662, 621, 756, 498, 498, 522, 522, 487,
487, 487, 487, 487, 487, 487, 487, 487, 487, 370,
156, 802, 130, 130, 130, 130, 430, 430, 430, 243,
84, 642, 608, 243, 248, 248, 248, 476, 476, 476,
76, 638, 296, 296, 545, 545, 545, 342, 140, 140,
140, 140, 337, 639, 543, 140, 407, 140, 140, 362,
655, 761, 654, 760, 523, 669, 96, 673, 682, 733,
646, 733, 569, 564, 550, 658, 373, 803, -6, 384,
501, 447, 611, 714, 349, 710, 193, 38, 345, 519,
59, 13, 730, 708, 810, 809, 74, 660, 611, 611,
611, 232, 348, 729, 727, 59, 358, 565, 565, 565,
565, 758, 734, 565, 565, 565, 565, 755, 785, 277,
403, 759, 137, 711, 631, 631, 636, 636, 631, 631,
631, 631, 625, 628, 631, 792, 801, 801, 636, 637,
636, 625, 628, 602, 602, 602, 602, 636, 628, 636,
636, 631, 636, 801, 801, 628, 627, 801, 67, 628,
656, 631, 647, 647, 602, 704, 703, 636, 636, 644,
801, 801, 801, 644, 628, 602, 615, 671, 268, 801,
602, 583, 637, 583, 615, 628, 583, 637, 637, 583,
54, 623, 632, 670, 798, 794, 683, 603, 634, 805,
804, 808, 806, 799, 600, 685, 702, 701, 552, 633,
613, 635, 621, 659, 622, 665, 646, 679, 604, 604,
604, 661, 664, 661, 604, 604, 604, 604, 604, 604,
604, 604, 842, 657, 607, 663, 626, 700, 572, 681,
649, 540, 742, 619, 685, 685, 767, 820, 827, 750,
641, 620, 803, 822, 661, 835, 706, 170, 518, 800,
766, 680, 676, 661, 797, 661, 744, 661, 819, 768,
617, 791, 685, 790, 604, 818, 841, 840, 839, 838,
837, 836, 757, 834, 614, 833, 699, 653, 826, 274,
807, 658, 672, 684, 698, 322, 832, 789, 661, 661,
752, 728, 661, 753, 713, 705, 815, 695, 825, 831,
619, 824, 661, 645, 830, 322, 610, 629, 813, 616,
694, 793, 817, 795, 735, 547, 579, 788, 605, 688,
829, 828, 814, 686, 736, 593, 738, 624, 787, 740,
796, 716, 786, 612, 821, 648, 679, 666, 609, 650,
652, 754, 784, 823, 687, 691, 696, 783, 709, 782,
156, 808, 130, 130, 130, 130, 430, 430, 430, 243,
428, 664, 850, 243, 248, 248, 248, 476, 476, 476,
76, 658, 296, 86, 86, 86, 86, 296, 86, 86,
545, 545, 545, 407, 483, 639, 355, 459, 477, 59,
657, 767, 624, 766, 523, 683, 96, 611, 687, 733,
660, 733, 564, 569, 543, 672, 342, 805, -6, 254,
508, 373, 627, 720, 38, 694, 377, 193, 345, 519,
346, 331, 755, 710, 814, 813, 137, 669, 627, 627,
627, 277, 84, 754, 753, 346, 273, 552, 552, 552,
552, 727, 752, 552, 552, 552, 552, 760, 794, 349,
403, 761, 74, 716, 631, 631, 638, 638, 631, 631,
631, 631, 640, 645, 631, 795, 803, 803, 638, 647,
638, 640, 645, 812, 812, 812, 812, 638, 645, 638,
638, 631, 638, 803, 803, 645, 621, 803, 47, 645,
667, 631, 663, 663, 812, 705, 704, 638, 638, 620,
803, 803, 803, 620, 645, 812, 615, 689, 268, 803,
812, 623, 647, 623, 615, 645, 623, 647, 647, 623,
20, 641, 642, 758, 802, 798, 729, 659, 665, 807,
806, 811, 809, 796, 636, 681, 703, 702, 579, 617,
630, 633, 646, 676, 637, 644, 660, 682, 622, 622,
622, 668, 677, 668, 622, 622, 622, 622, 622, 622,
622, 622, 849, 607, 680, 643, 655, 701, 581, 686,
650, 547, 738, 661, 681, 681, 769, 824, 831, 835,
834, 626, 805, 826, 668, 842, 707, 67, 518, 804,
764, 688, 685, 668, 801, 668, 740, 668, 823, 770,
628, 771, 681, 793, 622, 822, 848, 847, 846, 845,
844, 843, 836, 841, 635, 840, 700, 629, 830, 274,
810, 672, 679, 684, 699, 322, 839, 792, 668, 668,
742, 731, 668, 744, 698, 706, 819, 696, 829, 838,
661, 828, 668, 649, 837, 322, 632, 625, 817, 619,
695, 797, 821, 799, 759, 572, 599, 791, 634, 717,
833, 832, 818, 616, 730, 610, 734, 652, 790, 735,
800, 678, 789, 788, 825, 654, 682, 666, 648, 656,
653, 736, 787, 827, 691, 711, 714, 786, 715, 785,
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,
@ -536,17 +538,17 @@ class Php5 extends \PhpParser\ParserAbstract
-20, -20, -20, -20, 55, 55, 55, 55, 487, 487,
487, 487, 487, 487, 248, 248, 476, 476, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 487, 55,
487, 631, 631, 631, 631, 637, 637, 637, 631, 296,
487, 631, 631, 631, 631, 647, 647, 647, 631, 296,
296, 296, 631, 0, 0, 0, 0, 0, 0, 631,
296, 0, 0, 631, 631, 631, 637, 631, 631, 631,
631, 631, 296, 637, 631, 637, 631, 631, 801, 546,
546, 546, 546, 322, 59, 0, 631, 631, 637, 637,
637, 0, 0, 0, 801, 0, 636, 0, 0, 0,
0, 604, 170, 0, 246, 0, 0, 0, 0, 0,
0, 620, 246, 381, 381, 0, 614, 604, 604, 604,
0, 0, 620, 620, 0, 0, 0, 0, 0, 0,
428, 620, 0, 0, 0, 0, 428, 230, 0, 0,
230, 0, 322
296, 0, 487, 487, 487, 487, 0, 487, 487, 631,
631, 631, 647, 631, 296, 647, 647, 631, 803, 546,
546, 546, 546, 322, 346, 0, 631, 631, 647, 647,
647, 0, 0, 0, 803, 0, 638, 0, 0, 0,
0, 622, 67, 0, 246, 0, 0, 0, 0, 0,
0, 626, 246, 381, 381, 0, 635, 622, 622, 622,
0, 0, 626, 626, 0, 0, 0, 0, 0, 0,
440, 626, 0, 0, 0, 0, 440, 170, 0, 0,
170, 0, 322
);
protected $actionDefault = array(
@ -582,7 +584,7 @@ class Php5 extends \PhpParser\ParserAbstract
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
274,32767, 230, 230, 230, 230,32767,32767,32767, 230,
32767,32767,32767,32767, 324, 325, 323, 451, 452, 450,
32767, 418,32767, 420,32767,32767,32767,32767,32767,32767,
32767, 418,32767,32767,32767,32767,32767, 420,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767, 489,
32767,32767,32767,32767,32767, 502, 407,32767,32767,32767,
400,32767, 214, 216, 163, 475,32767,32767,32767,32767,
@ -601,7 +603,7 @@ class Php5 extends \PhpParser\ParserAbstract
32767,32767,32767,32767,32767, 402,32767,32767,32767, 368,
369, 478, 491,32767, 492,32767, 400,32767, 332, 333,
335, 312,32767, 314, 358, 359, 360, 361, 362, 363,
364, 366,32767,32767, 405, 408,32767,32767,32767, 85,
364, 366,32767, 405,32767, 408,32767,32767,32767, 85,
110, 249,32767, 541, 85, 403,32767,32767, 297, 541,
32767,32767,32767,32767, 536,32767,32767, 291,32767,32767,
32767, 85, 85, 245,32767, 165,32767, 526,32767, 542,
@ -631,59 +633,62 @@ class Php5 extends \PhpParser\ParserAbstract
554, 182, 183, 184, 185, 186, 187, 188, 189, 190,
191, 192, 193, 194, 145, 146, 147, 161, 148, 163,
149, 197, 164, 150, 151, 152, 198, 153, 131, 627,
572, 758, 572, 572, 572, 572, 572, 572, 572, 572,
572, 757, 572, 572, 572, 572, 572, 572, 572, 572,
572, 572, 572, 572, 572, 572, 572, 572, 572, 572,
572, 572, 572, 572, 572, 572, 572, 572, 572, 572,
572, 572, 572, 572, 572, 572, 572, 572, 572, 572,
572, 572, 572, 572, 572, 1105, 757, 1105, 1105, 1105,
572, 572, 572, 572, 572, 1105, 788, 1105, 1105, 1105,
1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105,
1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105,
1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105,
1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105,
636, 889, 889, 1196, 1196, 6, 1174, 168, 1174, 514,
788, 514, 171, 172, 173, 387, 388, 389, 390, 167,
636, 758, 502, 502, 502, 502, 502, 502, 341, 513,
635, 513, 502, 502, 502, 502, 502, 502, 502, 502,
502, 502, 514, 555, 514, 859, 6, 527, 889, 889,
1196, 1196, 819, 853, 853, 853, 853, 168, 848, 854,
527, 527, 171, 172, 173, 387, 388, 389, 390, 167,
195, 199, 201, 249, 251, 253, 260, 261, 262, 263,
264, 265, 271, 272, 273, 274, 287, 288, 317, 318,
319, 393, 394, 395, 396, 169, 174, 246, 247, 175,
176, 177, 502, 502, 502, 502, 502, 502, 528, 588,
591, 633, 502, 502, 502, 502, 502, 502, 502, 502,
502, 502, 513, 635, 513, 386, 612, 547, 547, 578,
543, 585, 610, 794, 756, 545, 545, 501, 503, 534,
551, 579, 582, 592, 598, 875, 515, 855, 515, 659,
341, 516, 884, 879, 571, 819, 571, 571, 571, 571,
176, 177, 386, 612, 547, 547, 578, 543, 528, 588,
591, 633, 545, 545, 501, 503, 534, 551, 579, 582,
592, 598, 553, 907, 571, 577, 571, 571, 571, 571,
571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
571, 571, 571, 571, 571, 571, 571, 571, 571, 556,
557, 558, 559, 560, 561, 562, 563, 565, 594, 859,
553, 555, 519, 577, 1200, 527, 524, 524, 524, 450,
452, 937, 638, 907, 524, 1106, 620, 935, 527, 527,
1207, 1207, 548, 437, 437, 437, 437, 437, 437, 542,
524, 363, 1207, 437, 437, 437, 437, 437, 437, 437,
437, 437, 437, 1070, 602, 1070, 896, 896, 896, 896,
1081, 1080, 357, 896, 1166, 616, 781, 896, 619, 532,
1173, 360, 1173, 544, 370, 370, 370, 1190, 1190, 1190,
1063, 1154, 853, 853, 853, 853, 323, 312, 457, 848,
611, 854, 468, 781, 781, 370, 524, 524, 1172, 10,
541, 573, 524, 524, 385, 540, 524, 661, 567, 1193,
599, 872, 886, 617, 871, 618, 882, 622, 623, 630,
632, 637, 639, 525, 368, 368, 368, 1206, 1206, 595,
344, 403, 375, 552, 1014, 368, 368, 368, 893, 1206,
276, 277, 278, 945, 1188, 1188, 1188, 368, 1221, 1209,
774, 774, 965, 902, 782, 782, 782, 784, 1066, 1067,
773, 347, 1063, 913, 521, 913, 342, 343, 369, 397,
1086, 777, 373, 911, 775, 1064, 1165, 1064, 1024, 17,
13, 356, 647, 401, 1065, 785, 1056, 953, 453, 916,
583, 1151, 863, 466, 0, 539, 1061, 0, 0, 566,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 0, 608, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
571, 571, 571, 571, 571, 571, 571, 571, 571, 548,
519, 450, 452, 937, 638, 585, 610, 1106, 620, 935,
524, 524, 524, 1200, 524, 556, 557, 558, 559, 560,
561, 562, 563, 565, 594, 363, 616, 542, 524, 619,
602, 1086, 360, 437, 437, 437, 437, 437, 437, 1024,
17, 13, 356, 437, 437, 437, 437, 437, 437, 437,
437, 437, 437, 1070, 611, 1070, 896, 896, 896, 896,
566, 1193, 1174, 896, 1174, 1166, 375, 896, 595, 344,
403, 21, 1081, 1080, 342, 343, 608, 1070, 1070, 1070,
1070, 1063, 1070, 1070, 524, 524, 1154, 1014, 541, 573,
524, 524, 468, 540, 524, 661, 567, 893, 599, 872,
886, 617, 871, 618, 882, 622, 623, 630, 632, 637,
639, 525, 1207, 1207, 368, 368, 368, 347, 794, 756,
781, 552, 276, 277, 278, 368, 368, 515, 1207, 515,
875, 368, 855, 397, 659, 902, 516, 884, 879, 368,
1221, 327, 312, 777, 1188, 1188, 1188, 781, 781, 1173,
369, 1173, 373, 913, 521, 913, 1190, 1190, 1190, 1066,
1067, 357, 775, 1063, 945, 370, 370, 370, 532, 911,
1056, 647, 544, 1206, 1206, 401, 1064, 1165, 1064, 785,
863, 916, 965, 1172, 453, 1065, 1061, 457, 953, 1206,
583, 466, 370, 1151, 0, 539, 385, 1209, 10, 0,
0, 0, 0, 0, 774, 774, 0, 0, 782, 782,
782, 784, 0, 0, 773, 0, 0, 0, 0, 0,
0, 0, 0, 521, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 518, 538, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 518, 0, 538, 0,
0, 0, 0, 0, 0, 517, 0, 522, 440, 0,
442, 0, 0, 0, 0, 0, 615, 0, 0, 0,
0, 1062, 624, 0, 0, 780, 1214, 0, 0, 0,
0, 0, 0, 0, 0, 517, 615, 522, 440, 0,
442, 1062, 624, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 780, 1214, 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,
0, 0, 0, 0, 0, 533
);
@ -700,78 +705,81 @@ class Php5 extends \PhpParser\ParserAbstract
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 55,
115, 14, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 122, 13, 122, 122, 122,
65, 13, 65, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 122, 27, 122, 122, 122,
122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
8, 72, 72, 72, 72, 92, 113, 25, 113, 115,
27, 115, 25, 25, 25, 25, 25, 25, 25, 25,
8, 14, 113, 113, 113, 113, 113, 113, 68, 65,
5, 65, 113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 113, 45, 113, 31, 93, 45, 73, 73,
73, 73, 48, 65, 65, 65, 65, 25, 65, 65,
45, 45, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 112, 112, 112, 112, 112, 112, 96, 58,
58, 58, 112, 112, 112, 112, 112, 112, 112, 112,
112, 112, 112, 5, 112, 49, 49, 49, 49, 49,
49, 38, 38, 12, 12, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 12, 118, 12, 118, 12,
67, 12, 12, 12, 55, 48, 55, 55, 55, 55,
25, 25, 49, 49, 49, 49, 49, 49, 97, 58,
58, 58, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 2, 80, 55, 2, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 31,
2, 45, 9, 2, 136, 45, 9, 9, 9, 7,
7, 7, 7, 79, 9, 7, 7, 7, 45, 45,
138, 138, 104, 55, 55, 55, 55, 55, 55, 9,
9, 44, 138, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 123, 55, 55, 55, 55, 55,
120, 120, 56, 55, 77, 59, 21, 55, 59, 56,
114, 59, 114, 56, 119, 119, 119, 114, 114, 114,
77, 127, 55, 55, 55, 55, 121, 121, 56, 55,
47, 55, 55, 21, 21, 119, 9, 9, 114, 56,
9, 9, 9, 9, 119, 30, 9, 30, 30, 134,
9, 7, 7, 7, 7, 38, 38, 7, 7, 7,
9, 9, 9, 136, 9, 106, 106, 106, 106, 106,
106, 106, 106, 106, 106, 44, 59, 9, 9, 59,
123, 32, 59, 55, 55, 55, 55, 55, 55, 32,
32, 32, 32, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 47, 55, 55, 55, 55, 55,
32, 134, 114, 55, 114, 78, 46, 55, 66, 66,
66, 32, 120, 120, 68, 68, 32, 55, 55, 55,
55, 78, 55, 55, 9, 9, 127, 98, 9, 9,
9, 9, 55, 30, 9, 30, 30, 75, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 9, 11, 11, 11, 137, 137, 65,
65, 65, 46, 9, 97, 11, 11, 11, 74, 137,
63, 63, 63, 92, 8, 8, 8, 11, 11, 137,
21, 21, 96, 76, 21, 21, 21, 21, 77, 77,
21, 16, 77, 11, 11, 11, 67, 67, 10, 20,
32, 23, 15, 80, 22, 77, 77, 77, 32, 32,
32, 32, 69, 19, 77, 24, 108, 94, 61, 81,
62, 126, 66, 103, -1, 8, 110, -1, -1, 32,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
32, -1, -1, -1, -1, 32, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
30, 9, 138, 138, 11, 11, 11, 16, 12, 12,
21, 9, 63, 63, 63, 11, 11, 118, 138, 118,
12, 11, 12, 20, 12, 77, 12, 12, 12, 11,
11, 121, 121, 23, 8, 8, 8, 21, 21, 115,
10, 115, 15, 11, 11, 11, 115, 115, 115, 78,
78, 56, 22, 78, 93, 119, 119, 119, 56, 81,
109, 70, 56, 137, 137, 19, 78, 78, 78, 24,
67, 82, 97, 115, 61, 78, 111, 56, 95, 137,
62, 104, 119, 126, -1, 8, 119, 137, 56, -1,
-1, -1, -1, -1, 21, 21, -1, -1, 21, 21,
21, 21, -1, -1, 21, -1, -1, -1, -1, -1,
-1, -1, -1, 11, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 8, 8, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 8, -1, 8, -1,
-1, -1, -1, -1, -1, 8, -1, 8, 8, -1,
8, -1, -1, -1, -1, -1, 11, -1, -1, -1,
-1, 11, 11, -1, -1, 8, 8, -1, -1, -1,
-1, -1, -1, -1, -1, 8, 11, 8, 8, -1,
8, 11, 11, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 8, 8, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 96
-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, 97
);
protected $gotoBase = array(
0, 0, -282, 0, 0, 261, 0, 366, 188, 42,
186, 164, 282, 154, 109, 175, 191, 0, 0, 128,
194, 96, 176, 195, 117, 7, 0, 202, 0, 0,
-186, 341, 105, 0, 0, 0, 0, 0, 245, 0,
0, -22, 0, 0, 353, 339, 192, 160, 289, -4,
0, 0, 0, 0, 0, 104, -16, 0, -44, -48,
0, 95, 87, -175, 0, 150, 122, -146, 0, 173,
0, 0, -78, 0, 179, 0, 190, 75, 0, 350,
172, 120, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 193, 0, 116, 0, 219, 183, 0, 0,
0, 0, 0, 79, 357, 307, 0, 0, 119, 0,
124, 0, -27, -93, 121, -90, 0, 0, -3, 118,
103, 115, -45, 201, 0, 0, 83, 227, 0, 0,
0, 0, 0, 0, 177, 0, 336, 166, 69, 0,
0, 0, -340, 0, 0, 198, 0, 348, 188, 30,
166, 154, 467, 109, 199, 155, 147, 0, 0, 120,
152, 150, 164, 161, 111, 37, 0, 148, 0, 0,
-198, 207, -34, 0, 0, 0, 0, 0, 319, 0,
0, -22, 0, 0, 337, 201, 126, 124, 216, 3,
0, 0, 0, 0, 0, 104, 83, 0, -14, -87,
0, 91, 87, -193, 0, -90, 94, 110, -238, 0,
162, 0, 0, -51, 0, 138, 0, 172, 76, 0,
280, 168, 112, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 214, 0, 117, 0, 249, 136, 0,
0, 0, 0, 0, 77, 324, 323, 0, 0, 103,
0, 114, 0, -77, 113, 200, 0, 0, 178, 209,
115, 170, -45, 177, 0, 0, 85, 232, 0, 0,
0, 0, 0, 0, 129, 0, 335, 212, 151, 0,
0
);
@ -782,14 +790,14 @@ class Php5 extends \PhpParser\ParserAbstract
526, 827, 1015, 352, 799, 353, 597, 801, 536, 803,
804, 132, 366, 367, 537, 487, 374, 586, 818, 266,
371, 820, 354, 821, 830, 355, 467, 462, 568, 614,
432, 449, 580, 275, 546, 575, 862, 340, 870, 650,
878, 881, 488, 569, 892, 454, 900, 1091, 381, 906,
912, 917, 920, 412, 400, 593, 924, 925, 5, 929,
628, 629, 944, 300, 952, 606, 966, 417, 1034, 1036,
489, 490, 530, 461, 512, 535, 491, 1057, 443, 402,
1060, 492, 493, 433, 434, 1078, 1075, 346, 1159, 345,
432, 449, 580, 275, 546, 1078, 575, 862, 340, 870,
650, 878, 881, 488, 569, 892, 454, 900, 1091, 381,
906, 912, 917, 920, 412, 400, 593, 924, 925, 5,
929, 628, 629, 944, 300, 952, 606, 966, 417, 1034,
1036, 489, 490, 530, 461, 512, 535, 491, 1057, 443,
402, 1060, 492, 493, 433, 434, 1075, 346, 1159, 345,
451, 311, 1146, 589, 1110, 458, 1199, 1155, 339, 494,
495, 361, 1178, 376, 1194, 438, 1201, 1208, 333, 550,
495, 361, 1178, 376, 1194, 438, 1201, 1208, 335, 550,
576
);
@ -812,17 +820,17 @@ class Php5 extends \PhpParser\ParserAbstract
31, 31, 31, 31, 31, 31, 31, 31, 12, 12,
52, 52, 54, 53, 53, 46, 46, 56, 56, 57,
57, 13, 14, 14, 14, 60, 60, 60, 61, 61,
64, 64, 62, 62, 65, 65, 39, 39, 48, 48,
51, 51, 51, 50, 50, 66, 40, 40, 40, 40,
67, 67, 68, 68, 69, 69, 37, 37, 33, 33,
70, 35, 35, 71, 34, 34, 36, 36, 47, 47,
47, 58, 58, 73, 73, 74, 74, 76, 76, 76,
75, 75, 59, 59, 77, 77, 77, 78, 78, 79,
79, 79, 42, 42, 80, 80, 80, 43, 43, 81,
81, 63, 63, 82, 82, 82, 82, 87, 87, 88,
88, 89, 89, 89, 89, 89, 90, 91, 91, 86,
86, 83, 83, 85, 85, 93, 93, 92, 92, 92,
92, 92, 92, 84, 84, 95, 94, 94, 44, 44,
64, 64, 62, 62, 66, 66, 39, 39, 48, 48,
51, 51, 51, 50, 50, 67, 40, 40, 40, 40,
68, 68, 69, 69, 70, 70, 37, 37, 33, 33,
71, 35, 35, 72, 34, 34, 36, 36, 47, 47,
47, 58, 58, 74, 74, 75, 75, 77, 77, 77,
76, 76, 59, 59, 78, 78, 78, 79, 79, 80,
80, 80, 42, 42, 81, 81, 81, 43, 43, 82,
82, 63, 63, 83, 83, 83, 83, 88, 88, 89,
89, 90, 90, 90, 90, 90, 91, 92, 92, 87,
87, 84, 84, 86, 86, 94, 94, 93, 93, 93,
93, 93, 93, 85, 85, 96, 95, 95, 44, 44,
38, 38, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
@ -832,22 +840,22 @@ class Php5 extends \PhpParser\ParserAbstract
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 41, 41, 41, 41, 41, 32, 32, 45, 45,
100, 100, 101, 101, 101, 101, 107, 96, 96, 103,
103, 109, 109, 110, 111, 111, 111, 111, 111, 111,
115, 115, 55, 55, 55, 97, 97, 116, 116, 112,
112, 117, 117, 117, 117, 98, 98, 98, 102, 102,
102, 108, 108, 122, 122, 122, 122, 122, 122, 122,
101, 101, 102, 102, 102, 102, 108, 97, 97, 104,
104, 110, 110, 111, 112, 112, 112, 112, 112, 112,
65, 65, 55, 55, 55, 98, 98, 116, 116, 113,
113, 117, 117, 117, 117, 99, 99, 99, 103, 103,
103, 109, 109, 122, 122, 122, 122, 122, 122, 122,
122, 122, 122, 122, 122, 122, 25, 25, 25, 25,
25, 25, 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, 124, 124, 124,
124, 124, 124, 124, 124, 106, 106, 99, 99, 99,
99, 123, 123, 126, 126, 125, 125, 127, 127, 49,
124, 124, 124, 124, 124, 107, 107, 100, 100, 100,
100, 123, 123, 126, 126, 125, 125, 127, 127, 49,
49, 49, 49, 129, 129, 128, 128, 128, 128, 128,
130, 130, 114, 114, 118, 118, 113, 113, 132, 131,
131, 131, 131, 119, 119, 119, 119, 105, 105, 120,
120, 120, 120, 72, 133, 133, 134, 134, 134, 104,
104, 135, 135, 136, 136, 136, 136, 121, 121, 121,
130, 130, 115, 115, 118, 118, 114, 114, 132, 131,
131, 131, 131, 119, 119, 119, 119, 106, 106, 120,
120, 120, 120, 73, 133, 133, 134, 134, 134, 105,
105, 135, 135, 136, 136, 136, 136, 121, 121, 121,
121, 138, 139, 137, 137, 137, 137, 137, 137, 137,
140, 140, 140
);

File diff suppressed because it is too large Load Diff

View File

@ -445,9 +445,9 @@ goto label
-----
!!php7
Syntax error, unexpected T_USE, expecting ';' or '{' from 3:1 to 3:3
Syntax error, unexpected T_USE, expecting ',' or ';' from 5:1 to 5:3
Syntax error, unexpected T_USE, expecting ';' from 5:1 to 5:3
Syntax error, unexpected T_CONST, expecting ';' from 6:1 to 6:5
Syntax error, unexpected T_BREAK, expecting ',' or ';' from 7:1 to 7:5
Syntax error, unexpected T_BREAK, expecting ';' from 7:1 to 7:5
Syntax error, unexpected T_THROW, expecting ';' from 15:1 to 15:5
array(
0: Stmt_Namespace(
@ -562,4 +562,342 @@ array(
)
)
)
)
-----
<?php
use A\{B, };
use function A\{b, };
use A, ;
const A = 42, ;
class X implements Y, {
use A, ;
use A, {
A::b insteadof C, ;
}
const A = 42, ;
public $x, ;
}
interface I extends J, {}
unset($x, );
isset($x, );
declare(a=42, );
function foo($a, ) {}
foo($a, );
global $a, ;
static $a, ;
echo $a, ;
for ($a, ; $b, ; $c, );
function ($a, ) use ($b, ) {};
-----
!!php7
A trailing comma is not allowed here from 3:9 to 3:9
A trailing comma is not allowed here from 4:18 to 4:18
A trailing comma is not allowed here from 5:6 to 5:6
A trailing comma is not allowed here from 6:13 to 6:13
A trailing comma is not allowed here from 8:21 to 8:21
A trailing comma is not allowed here from 9:10 to 9:10
A trailing comma is not allowed here from 10:10 to 10:10
A trailing comma is not allowed here from 11:25 to 11:25
A trailing comma is not allowed here from 13:17 to 13:17
A trailing comma is not allowed here from 14:14 to 14:14
A trailing comma is not allowed here from 16:22 to 16:22
A trailing comma is not allowed here from 18:9 to 18:9
A trailing comma is not allowed here from 19:9 to 19:9
A trailing comma is not allowed here from 21:13 to 21:13
A trailing comma is not allowed here from 23:16 to 23:16
A trailing comma is not allowed here from 24:7 to 24:7
A trailing comma is not allowed here from 25:10 to 25:10
A trailing comma is not allowed here from 26:10 to 26:10
A trailing comma is not allowed here from 27:8 to 27:8
A trailing comma is not allowed here from 29:8 to 29:8
A trailing comma is not allowed here from 29:14 to 29:14
A trailing comma is not allowed here from 29:20 to 29:20
A trailing comma is not allowed here from 30:13 to 30:13
A trailing comma is not allowed here from 30:24 to 30:24
array(
0: Stmt_GroupUse(
type: TYPE_UNKNOWN (0)
prefix: Name(
parts: array(
0: A
)
)
uses: array(
0: Stmt_UseUse(
type: TYPE_NORMAL (1)
name: Name(
parts: array(
0: B
)
)
alias: B
)
)
)
1: Stmt_GroupUse(
type: TYPE_FUNCTION (2)
prefix: Name(
parts: array(
0: A
)
)
uses: array(
0: Stmt_UseUse(
type: TYPE_UNKNOWN (0)
name: Name(
parts: array(
0: b
)
)
alias: b
)
)
)
2: Stmt_Use(
type: TYPE_NORMAL (1)
uses: array(
0: Stmt_UseUse(
type: TYPE_UNKNOWN (0)
name: Name(
parts: array(
0: A
)
)
alias: A
)
)
)
3: Stmt_Const(
consts: array(
0: Const(
name: A
value: Scalar_LNumber(
value: 42
)
)
)
)
4: Stmt_Class(
flags: 0
name: X
extends: null
implements: array(
0: Name(
parts: array(
0: Y
)
)
)
stmts: array(
0: Stmt_TraitUse(
traits: array(
0: Name(
parts: array(
0: A
)
)
)
adaptations: array(
)
)
1: Stmt_TraitUse(
traits: array(
0: Name(
parts: array(
0: A
)
)
)
adaptations: array(
0: Stmt_TraitUseAdaptation_Precedence(
trait: Name(
parts: array(
0: A
)
)
method: b
insteadof: array(
0: Name(
parts: array(
0: C
)
)
)
)
)
)
2: Stmt_ClassConst(
flags: 0
consts: array(
0: Const(
name: A
value: Scalar_LNumber(
value: 42
)
)
)
)
3: Stmt_Property(
flags: MODIFIER_PUBLIC (1)
props: array(
0: Stmt_PropertyProperty(
name: x
default: null
)
)
)
)
)
5: Stmt_Interface(
name: I
extends: array(
0: Name(
parts: array(
0: J
)
)
)
stmts: array(
)
)
6: Stmt_Unset(
vars: array(
0: Expr_Variable(
name: x
)
)
)
7: Stmt_Expression(
expr: Expr_Isset(
vars: array(
0: Expr_Variable(
name: x
)
)
)
)
8: Stmt_Declare(
declares: array(
0: Stmt_DeclareDeclare(
key: a
value: Scalar_LNumber(
value: 42
)
)
)
stmts: null
)
9: Stmt_Function(
byRef: false
name: foo
params: array(
0: Param(
type: null
byRef: false
variadic: false
var: Expr_Variable(
name: a
)
default: null
)
)
returnType: null
stmts: array(
)
)
10: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: foo
)
)
args: array(
0: Arg(
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
)
)
)
11: Stmt_Global(
vars: array(
0: Expr_Variable(
name: a
)
)
)
12: Stmt_Static(
vars: array(
0: Stmt_StaticVar(
var: Expr_Variable(
name: a
)
default: null
)
)
)
13: Stmt_Echo(
exprs: array(
0: Expr_Variable(
name: a
)
)
)
14: Stmt_For(
init: array(
0: Expr_Variable(
name: a
)
)
cond: array(
0: Expr_Variable(
name: b
)
)
loop: array(
0: Expr_Variable(
name: c
)
)
stmts: array(
)
)
15: Stmt_Expression(
expr: Expr_Closure(
static: false
byRef: false
params: array(
0: Param(
type: null
byRef: false
variadic: false
var: Expr_Variable(
name: a
)
default: null
)
)
uses: array(
0: Expr_ClosureUse(
var: Expr_Variable(
name: b
)
byRef: false
)
)
returnType: null
stmts: array(
)
)
)
)

View File

@ -4,7 +4,7 @@ Non-simple variables are forbidden in PHP 7
global $$foo->bar;
-----
!!php7
Syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' from 2:13 to 2:14
Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14
array(
0: Stmt_Global(
vars: array(

View File

@ -76,8 +76,21 @@ array(
-----
<?php class A extends static {}
-----
Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:23 to 1:28
Cannot use 'static' as class name as it is reserved from 1:23 to 1:28
array(
0: Stmt_Class(
flags: 0
name: A
extends: Name(
parts: array(
0: static
)
)
implements: array(
)
stmts: array(
)
)
)
-----
<?php class A implements self {}
@ -122,8 +135,22 @@ array(
-----
<?php class A implements static {}
-----
Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:26 to 1:31
Cannot use 'static' as interface name as it is reserved from 1:26 to 1:31
array(
0: Stmt_Class(
flags: 0
name: A
extends: null
implements: array(
0: Name(
parts: array(
0: static
)
)
)
stmts: array(
)
)
)
-----
<?php interface self {}
@ -196,6 +223,18 @@ array(
-----
<?php interface A extends static {}
-----
Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:27 to 1:32
Cannot use 'static' as interface name as it is reserved from 1:27 to 1:32
array(
0: Stmt_Interface(
name: A
extends: array(
0: Name(
parts: array(
0: static
)
)
)
stmts: array(
)
)
)

View File

@ -56,7 +56,7 @@ array(
use Foo {Bar, Baz};
-----
!!php7
Syntax error, unexpected '{', expecting ',' or ';' from 3:9 to 3:9
Syntax error, unexpected '{', expecting ';' from 3:9 to 3:9
array(
0: Stmt_Use(
type: TYPE_NORMAL (1)