From 9fad8f790ff5f884fb8ee8655790fe3a7f1e459c Mon Sep 17 00:00:00 2001 From: z7zmey Date: Sat, 27 Jan 2018 12:33:13 +0200 Subject: [PATCH] prepare php5 bnf --- php5/php5.go | 5357 +++++++++++++++----------------------------------- php5/php5.y | 2959 ++++++++-------------------- 2 files changed, 2367 insertions(+), 5949 deletions(-) diff --git a/php5/php5.go b/php5/php5.go index 072af6c..a14c4a9 100644 --- a/php5/php5.go +++ b/php5/php5.go @@ -5,30 +5,22 @@ import __yyfmt__ "fmt" //line php5/php5.y:2 import ( - "strconv" - "strings" - - "github.com/z7zmey/php-parser/node" - "github.com/z7zmey/php-parser/node/expr" - "github.com/z7zmey/php-parser/node/expr/assign_op" - "github.com/z7zmey/php-parser/node/expr/binary_op" - "github.com/z7zmey/php-parser/node/expr/cast" - "github.com/z7zmey/php-parser/node/name" - "github.com/z7zmey/php-parser/node/scalar" - "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/token" + // "strings" + // "strconv" + "github.com/z7zmey/php-parser/token" // "github.com/z7zmey/php-parser/node" + // "github.com/z7zmey/php-parser/node/scalar" + // "github.com/z7zmey/php-parser/node/name" + // "github.com/z7zmey/php-parser/node/stmt" + // "github.com/z7zmey/php-parser/node/expr" +// "github.com/z7zmey/php-parser/node/expr/assign_op" +// "github.com/z7zmey/php-parser/node/expr/binary_op" +// "github.com/z7zmey/php-parser/node/expr/cast" ) //line php5/php5.y:21 type yySymType struct { - yys int - node node.Node - token token.Token - boolWithToken boolWithToken - list []node.Node - foreachVariable foreachVariable - nodesWithEndToken *nodesWithEndToken - str string + yys int + token token.Token } const T_INCLUDE = 57346 @@ -41,132 +33,129 @@ const T_LOGICAL_XOR = 57352 const T_LOGICAL_AND = 57353 const T_PRINT = 57354 const T_YIELD = 57355 -const T_DOUBLE_ARROW = 57356 -const T_YIELD_FROM = 57357 -const T_PLUS_EQUAL = 57358 -const T_MINUS_EQUAL = 57359 -const T_MUL_EQUAL = 57360 -const T_DIV_EQUAL = 57361 -const T_CONCAT_EQUAL = 57362 -const T_MOD_EQUAL = 57363 -const T_AND_EQUAL = 57364 -const T_OR_EQUAL = 57365 -const T_XOR_EQUAL = 57366 -const T_SL_EQUAL = 57367 -const T_SR_EQUAL = 57368 -const T_POW_EQUAL = 57369 -const T_COALESCE = 57370 -const T_BOOLEAN_OR = 57371 -const T_BOOLEAN_AND = 57372 -const T_IS_EQUAL = 57373 -const T_IS_NOT_EQUAL = 57374 -const T_IS_IDENTICAL = 57375 -const T_IS_NOT_IDENTICAL = 57376 -const T_SPACESHIP = 57377 -const T_IS_SMALLER_OR_EQUAL = 57378 -const T_IS_GREATER_OR_EQUAL = 57379 -const T_SL = 57380 -const T_SR = 57381 -const T_INSTANCEOF = 57382 -const T_INC = 57383 -const T_DEC = 57384 -const T_INT_CAST = 57385 -const T_DOUBLE_CAST = 57386 -const T_STRING_CAST = 57387 -const T_ARRAY_CAST = 57388 -const T_OBJECT_CAST = 57389 -const T_BOOL_CAST = 57390 -const T_UNSET_CAST = 57391 -const T_POW = 57392 -const T_NEW = 57393 -const T_CLONE = 57394 -const T_NOELSE = 57395 -const T_ELSEIF = 57396 -const T_ELSE = 57397 -const T_ENDIF = 57398 -const T_STATIC = 57399 -const T_ABSTRACT = 57400 -const T_FINAL = 57401 -const T_PRIVATE = 57402 -const T_PROTECTED = 57403 -const T_PUBLIC = 57404 -const T_EXIT = 57405 -const T_IF = 57406 -const T_LNUMBER = 57407 -const T_DNUMBER = 57408 -const T_STRING = 57409 -const T_STRING_VARNAME = 57410 -const T_VARIABLE = 57411 -const T_NUM_STRING = 57412 -const T_INLINE_HTML = 57413 -const T_CHARACTER = 57414 -const T_BAD_CHARACTER = 57415 -const T_ENCAPSED_AND_WHITESPACE = 57416 -const T_CONSTANT_ENCAPSED_STRING = 57417 -const T_ECHO = 57418 -const T_DO = 57419 -const T_WHILE = 57420 -const T_ENDWHILE = 57421 -const T_FOR = 57422 -const T_ENDFOR = 57423 -const T_FOREACH = 57424 -const T_ENDFOREACH = 57425 -const T_DECLARE = 57426 -const T_ENDDECLARE = 57427 -const T_AS = 57428 -const T_SWITCH = 57429 -const T_ENDSWITCH = 57430 -const T_CASE = 57431 -const T_DEFAULT = 57432 -const T_BREAK = 57433 -const T_CONTINUE = 57434 -const T_GOTO = 57435 -const T_FUNCTION = 57436 -const T_CONST = 57437 -const T_RETURN = 57438 -const T_TRY = 57439 -const T_CATCH = 57440 -const T_FINALLY = 57441 -const T_THROW = 57442 -const T_USE = 57443 -const T_INSTEADOF = 57444 -const T_GLOBAL = 57445 -const T_VAR = 57446 -const T_UNSET = 57447 -const T_ISSET = 57448 -const T_EMPTY = 57449 -const T_HALT_COMPILER = 57450 -const T_CLASS = 57451 -const T_TRAIT = 57452 -const T_INTERFACE = 57453 -const T_EXTENDS = 57454 -const T_IMPLEMENTS = 57455 -const T_OBJECT_OPERATOR = 57456 -const T_LIST = 57457 -const T_ARRAY = 57458 -const T_CALLABLE = 57459 -const T_CLASS_C = 57460 -const T_TRAIT_C = 57461 -const T_METHOD_C = 57462 -const T_FUNC_C = 57463 -const T_LINE = 57464 -const T_FILE = 57465 -const T_COMMENT = 57466 -const T_DOC_COMMENT = 57467 -const T_OPEN_TAG = 57468 -const T_OPEN_TAG_WITH_ECHO = 57469 -const T_CLOSE_TAG = 57470 -const T_WHITESPACE = 57471 -const T_START_HEREDOC = 57472 -const T_END_HEREDOC = 57473 -const T_DOLLAR_OPEN_CURLY_BRACES = 57474 -const T_CURLY_OPEN = 57475 -const T_PAAMAYIM_NEKUDOTAYIM = 57476 -const T_NAMESPACE = 57477 -const T_NS_C = 57478 -const T_DIR = 57479 -const T_NS_SEPARATOR = 57480 -const T_ELLIPSIS = 57481 +const T_PLUS_EQUAL = 57356 +const T_MINUS_EQUAL = 57357 +const T_MUL_EQUAL = 57358 +const T_DIV_EQUAL = 57359 +const T_CONCAT_EQUAL = 57360 +const T_MOD_EQUAL = 57361 +const T_AND_EQUAL = 57362 +const T_OR_EQUAL = 57363 +const T_XOR_EQUAL = 57364 +const T_SL_EQUAL = 57365 +const T_SR_EQUAL = 57366 +const T_POW_EQUAL = 57367 +const T_BOOLEAN_OR = 57368 +const T_BOOLEAN_AND = 57369 +const T_IS_EQUAL = 57370 +const T_IS_NOT_EQUAL = 57371 +const T_IS_IDENTICAL = 57372 +const T_IS_NOT_IDENTICAL = 57373 +const T_IS_SMALLER_OR_EQUAL = 57374 +const T_IS_GREATER_OR_EQUAL = 57375 +const T_SL = 57376 +const T_SR = 57377 +const T_INSTANCEOF = 57378 +const T_INC = 57379 +const T_DEC = 57380 +const T_INT_CAST = 57381 +const T_DOUBLE_CAST = 57382 +const T_STRING_CAST = 57383 +const T_ARRAY_CAST = 57384 +const T_OBJECT_CAST = 57385 +const T_BOOL_CAST = 57386 +const T_UNSET_CAST = 57387 +const T_POW = 57388 +const T_NEW = 57389 +const T_CLONE = 57390 +const T_ELSEIF = 57391 +const T_ELSE = 57392 +const T_ENDIF = 57393 +const T_STATIC = 57394 +const T_ABSTRACT = 57395 +const T_FINAL = 57396 +const T_PRIVATE = 57397 +const T_PROTECTED = 57398 +const T_PUBLIC = 57399 +const T_EXIT = 57400 +const T_IF = 57401 +const T_LNUMBER = 57402 +const T_DNUMBER = 57403 +const T_STRING = 57404 +const T_STRING_VARNAME = 57405 +const T_VARIABLE = 57406 +const T_NUM_STRING = 57407 +const T_INLINE_HTML = 57408 +const T_CHARACTER = 57409 +const T_BAD_CHARACTER = 57410 +const T_ENCAPSED_AND_WHITESPACE = 57411 +const T_CONSTANT_ENCAPSED_STRING = 57412 +const T_ECHO = 57413 +const T_DO = 57414 +const T_WHILE = 57415 +const T_ENDWHILE = 57416 +const T_FOR = 57417 +const T_ENDFOR = 57418 +const T_FOREACH = 57419 +const T_ENDFOREACH = 57420 +const T_DECLARE = 57421 +const T_ENDDECLARE = 57422 +const T_AS = 57423 +const T_SWITCH = 57424 +const T_ENDSWITCH = 57425 +const T_CASE = 57426 +const T_DEFAULT = 57427 +const T_BREAK = 57428 +const T_CONTINUE = 57429 +const T_GOTO = 57430 +const T_FUNCTION = 57431 +const T_CONST = 57432 +const T_RETURN = 57433 +const T_TRY = 57434 +const T_CATCH = 57435 +const T_FINALLY = 57436 +const T_THROW = 57437 +const T_USE = 57438 +const T_INSTEADOF = 57439 +const T_GLOBAL = 57440 +const T_VAR = 57441 +const T_UNSET = 57442 +const T_ISSET = 57443 +const T_EMPTY = 57444 +const T_HALT_COMPILER = 57445 +const T_CLASS = 57446 +const T_TRAIT = 57447 +const T_INTERFACE = 57448 +const T_EXTENDS = 57449 +const T_IMPLEMENTS = 57450 +const T_OBJECT_OPERATOR = 57451 +const T_DOUBLE_ARROW = 57452 +const T_LIST = 57453 +const T_ARRAY = 57454 +const T_CALLABLE = 57455 +const T_CLASS_C = 57456 +const T_TRAIT_C = 57457 +const T_METHOD_C = 57458 +const T_FUNC_C = 57459 +const T_LINE = 57460 +const T_FILE = 57461 +const T_COMMENT = 57462 +const T_DOC_COMMENT = 57463 +const T_OPEN_TAG = 57464 +const T_OPEN_TAG_WITH_ECHO = 57465 +const T_CLOSE_TAG = 57466 +const T_WHITESPACE = 57467 +const T_START_HEREDOC = 57468 +const T_END_HEREDOC = 57469 +const T_DOLLAR_OPEN_CURLY_BRACES = 57470 +const T_CURLY_OPEN = 57471 +const T_PAAMAYIM_NEKUDOTAYIM = 57472 +const T_NAMESPACE = 57473 +const T_NS_C = 57474 +const T_DIR = 57475 +const T_NS_SEPARATOR = 57476 +const T_ELLIPSIS = 57477 +const T_YIELD_FROM = 57478 var yyToknames = [...]string{ "$end", @@ -183,8 +172,6 @@ var yyToknames = [...]string{ "T_LOGICAL_AND", "T_PRINT", "T_YIELD", - "T_DOUBLE_ARROW", - "T_YIELD_FROM", "'='", "T_PLUS_EQUAL", "T_MINUS_EQUAL", @@ -200,7 +187,6 @@ var yyToknames = [...]string{ "T_POW_EQUAL", "'?'", "':'", - "T_COALESCE", "T_BOOLEAN_OR", "T_BOOLEAN_AND", "'|'", @@ -210,7 +196,6 @@ var yyToknames = [...]string{ "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", "T_IS_NOT_IDENTICAL", - "T_SPACESHIP", "'<'", "T_IS_SMALLER_OR_EQUAL", "'>'", @@ -240,7 +225,6 @@ var yyToknames = [...]string{ "'['", "T_NEW", "T_CLONE", - "T_NOELSE", "T_ELSEIF", "T_ELSE", "T_ENDIF", @@ -302,6 +286,7 @@ var yyToknames = [...]string{ "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", + "T_DOUBLE_ARROW", "T_LIST", "T_ARRAY", "T_CALLABLE", @@ -327,6 +312,7 @@ var yyToknames = [...]string{ "T_DIR", "T_NS_SEPARATOR", "T_ELLIPSIS", + "T_YIELD_FROM", "'\"'", "'`'", "'{'", @@ -343,1362 +329,210 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line php5/php5.y:2584 +//line php5/php5.y:1262 //line yacctab:1 var yyExca = [...]int{ -1, 1, 1, -1, -2, 0, - -1, 43, - 69, 420, - 133, 420, - 153, 420, - 161, 420, - -2, 415, - -1, 47, - 164, 423, - -2, 432, - -1, 83, - 69, 422, - 133, 422, - 153, 422, - 161, 422, - 164, 425, - -2, 410, - -1, 106, - 153, 383, - -2, 412, - -1, 228, - 69, 420, - 133, 420, - 153, 420, - 161, 420, - -2, 311, - -1, 231, - 164, 425, - -2, 422, - -1, 234, - 69, 420, - 133, 420, - 153, 420, - 161, 420, - -2, 313, - -1, 352, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - -2, 335, - -1, 353, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - -2, 336, - -1, 354, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - -2, 337, - -1, 355, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - -2, 338, - -1, 356, - 43, 0, - 44, 0, - 45, 0, - 46, 0, - -2, 339, - -1, 357, - 43, 0, - 44, 0, - 45, 0, - 46, 0, - -2, 340, - -1, 358, - 43, 0, - 44, 0, - 45, 0, - 46, 0, - -2, 341, - -1, 359, - 43, 0, - 44, 0, - 45, 0, - 46, 0, - -2, 342, - -1, 360, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - -2, 343, - -1, 367, - 9, 161, - 165, 161, - -2, 420, - -1, 411, - 9, 460, - 165, 460, - 166, 460, - -2, 420, - -1, 415, - 69, 421, - 133, 421, - 153, 421, - 161, 421, - 164, 424, - -2, 345, - -1, 429, - 164, 446, - -2, 413, - -1, 430, - 164, 448, - -2, 438, - -1, 509, - 164, 446, - -2, 414, - -1, 510, - 164, 448, - -2, 439, - -1, 569, - 165, 211, - -2, 216, - -1, 594, - 164, 424, - -2, 421, - -1, 646, - 165, 211, - -2, 216, - -1, 651, - 165, 181, - -2, 420, - -1, 659, - 165, 211, - -2, 216, - -1, 684, - 9, 459, - 165, 459, - 166, 459, - -2, 420, - -1, 717, - 165, 182, - -2, 420, - -1, 737, - 88, 263, - -2, 266, - -1, 776, - 165, 181, - -2, 420, - -1, 778, - 165, 184, - -2, 394, - -1, 880, - 105, 76, - -2, 80, - -1, 912, - 165, 211, - -2, 216, } const yyPrivate = 57344 -const yyLast = 7467 +const yyLast = 2 var yyAct = [...]int{ - 27, 129, 823, 836, 660, 859, 374, 576, 739, 434, - 872, 106, 835, 791, 664, 772, 809, 673, 783, 563, - 662, 137, 137, 137, 311, 650, 150, 4, 709, 631, - 698, 665, 530, 630, 185, 366, 320, 512, 376, 220, - 520, 403, 131, 79, 571, 315, 314, 222, 8, 7, - 136, 188, 224, 227, 146, 149, 235, 236, 237, 238, - 239, 127, 142, 240, 241, 242, 243, 244, 245, 246, - 125, 249, 139, 140, 257, 258, 259, 124, 2, 253, - 313, 312, 511, 6, 5, 428, 126, 778, 272, 273, - 891, 275, 276, 691, 687, 263, 268, 229, 229, 608, - 81, 595, 743, 744, 745, 742, 741, 740, 583, 408, - 924, 886, 104, 818, 817, 807, 799, 782, 771, 725, - 307, 110, 715, 696, 694, 686, 675, 648, 636, 626, - 596, 317, 114, 120, 587, 322, 323, 290, 928, 912, - 927, 83, 867, 826, 284, 286, 736, 831, 780, 738, - 718, 104, 685, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 659, - 362, 364, 646, 368, 319, 265, 370, 404, 881, 104, - 268, 105, 305, 810, 294, 231, 231, 331, 285, 78, - 378, 386, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 569, 552, 400, 137, 402, 233, - 224, 382, 550, 143, 282, 229, 232, 766, 767, 301, - 105, 413, 412, 289, 224, 291, 116, 43, 104, 383, - 298, 288, 381, 304, 109, 293, 890, 292, 334, 137, - 743, 744, 745, 742, 741, 740, 423, 287, 330, 407, - 514, 137, 405, 328, 274, 429, 509, 401, 105, 229, - 369, 521, 522, 414, 361, 523, 566, 232, 840, 265, - 839, 812, 307, 527, 269, 108, 531, 116, 224, 104, - 301, 228, 234, 271, 736, 270, 866, 738, 248, 416, - 229, 830, 766, 767, 133, 283, 219, 111, 215, 549, - 183, 427, 182, 181, 230, 135, 232, 105, 134, 4, - 130, 112, 918, 231, 516, 811, 116, 533, 104, 267, - 901, 418, 419, 559, 900, 150, 863, 605, 558, 885, - 8, 7, 848, 819, 517, 813, 806, 763, 508, 750, - 518, 714, 515, 712, 842, 133, 765, 418, 111, 419, - 419, 418, 710, 708, 562, 705, 553, 231, 105, 548, - 305, 538, 536, 535, 384, 6, 5, 372, 269, 542, - 568, 326, 578, 539, 579, 557, 575, 580, 581, 573, - 560, 556, 577, 325, 133, 324, 295, 111, 231, 805, - 802, 645, 333, 666, 800, 759, 586, 105, 606, 907, - 224, 590, 329, 224, 570, 787, 884, 327, 406, 367, - 857, 541, 534, 544, 116, 855, 216, 607, 801, 254, - 604, 534, 610, 788, 420, 534, 306, 534, 781, 731, - 674, 585, 113, 574, 300, 154, 156, 155, 184, 417, - 288, 904, 593, 303, 513, 303, 262, 589, 116, 116, - 261, 430, 510, 411, 116, 179, 609, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 218, 178, 255, 256, 425, 113, 116, 700, 116, 115, - 526, 116, 377, 164, 902, 288, 634, 629, 667, 668, - 628, 572, 545, 667, 668, 137, 614, 380, 217, 743, - 744, 745, 742, 741, 740, 122, 123, 133, 143, 543, - 111, 644, 133, 625, 303, 111, 652, 784, 145, 618, - 254, 903, 303, 303, 318, 420, 611, 861, 254, 623, - 722, 723, 147, 640, 322, 642, 635, 617, 615, 254, - 421, 4, 647, 736, 133, 613, 738, 111, 654, 121, - 76, 77, 299, 688, 254, 232, 638, 145, 671, 277, - 672, 669, 8, 7, 577, 116, 547, 104, 892, 683, - 641, 656, 119, 109, 540, 302, 794, 793, 860, 252, - 649, 754, 525, 255, 256, 829, 689, 679, 229, 229, - 524, 255, 256, 792, 305, 670, 632, 6, 5, 853, - 521, 190, 255, 256, 422, 531, 743, 744, 745, 742, - 741, 740, 827, 653, 108, 229, 278, 255, 256, 147, - 116, 706, 602, 128, 743, 744, 745, 742, 741, 740, - 701, 713, 116, 133, 260, 224, 111, 697, 669, 720, - 695, 546, 693, 230, 724, 544, 105, 544, 704, 534, - 736, 669, 852, 738, 711, 375, 373, 730, 669, 122, - 123, 194, 751, 752, 600, 193, 224, 747, 736, 192, - 254, 738, 746, 186, 719, 420, 229, 164, 729, 699, - 755, 748, 279, 280, 703, 632, 231, 231, 189, 322, - 728, 297, 797, 612, 195, 196, 406, 616, 756, 224, - 598, 254, 601, 599, 761, 753, 281, 814, 766, 767, - 732, 758, 760, 231, 769, 766, 767, 824, 669, 768, - 773, 770, 775, 45, 795, 764, 796, 785, 577, 789, - 544, 798, 254, 255, 256, 544, 544, 251, 777, 749, - 229, 743, 744, 745, 742, 741, 740, 808, 197, 199, - 198, 699, 385, 632, 187, 178, 816, 868, 804, 862, - 682, 191, 833, 822, 255, 256, 825, 164, 588, 332, - 815, 308, 821, 716, 231, 633, 163, 165, 166, 832, - 178, 675, 367, 651, 757, 702, 828, 118, 726, 624, - 619, 847, 164, 564, 554, 255, 256, 409, 849, 841, - 1, 37, 544, 737, 544, 846, 734, 735, 803, 684, - 379, 661, 844, 851, 865, 529, 669, 221, 519, 856, - 858, 869, 773, 365, 878, 864, 837, 882, 883, 871, - 144, 790, 877, 141, 321, 148, 834, 888, 231, 889, - 658, 820, 250, 893, 838, 887, 643, 926, 223, 896, - 42, 41, 894, 15, 14, 878, 897, 597, 266, 544, - 895, 48, 899, 877, 47, 107, 906, 49, 82, 80, - 717, 71, 247, 61, 264, 60, 876, 910, 875, 874, - 873, 733, 44, 911, 663, 721, 655, 843, 917, 920, - 913, 637, 916, 915, 577, 309, 117, 921, 296, 3, - 922, 433, 786, 727, 669, 0, 0, 925, 0, 0, - 929, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 776, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, - 164, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 12, 22, 32, 0, 0, 33, 11, 0, 23, - 0, 28, 85, 86, 9, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 10, 100, 96, 111, 0, 103, 72, 13, 627, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 179, 75, 180, 152, - 153, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 0, 164, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 12, 22, 32, 0, 0, - 33, 11, 0, 23, 0, 28, 85, 86, 9, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 10, 100, 96, 111, 0, - 103, 72, 13, 537, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 0, 0, 0, - 0, 0, 0, 0, 55, 56, 0, 0, 164, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 76, 77, 0, 0, 0, 69, 46, 92, - 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, - 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 36, 12, - 22, 32, 0, 0, 33, 11, 0, 23, 0, 28, - 85, 86, 9, 38, 39, 40, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 161, 162, - 160, 163, 165, 166, 102, 178, 0, 0, 0, 10, - 100, 96, 111, 0, 103, 72, 13, 164, 31, 59, - 0, 0, 105, 87, 88, 89, 90, 91, 0, 0, - 0, 0, 73, 74, 0, 75, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 164, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 0, 24, 76, 77, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 930, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 56, 164, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 76, 77, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 316, 38, 39, 40, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 923, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 164, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 919, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 909, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 171, 172, 169, 170, 177, 173, 174, 175, - 176, 167, 168, 161, 162, 160, 163, 165, 166, 0, - 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 164, 0, 55, 56, 0, 0, 0, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 76, 77, 0, 0, 0, 69, 46, 92, - 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, - 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, - 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, - 85, 86, 316, 38, 39, 40, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, - 100, 96, 111, 0, 103, 72, 13, 908, 31, 59, - 0, 0, 105, 87, 88, 89, 90, 91, 0, 0, - 0, 0, 73, 74, 0, 75, 167, 168, 161, 162, - 160, 163, 165, 166, 0, 178, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 0, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 0, 24, 76, 77, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 905, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 0, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 200, 201, 202, 203, 205, 206, - 207, 208, 209, 210, 211, 212, 204, 0, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 213, 214, 0, 0, 24, - 76, 77, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 316, 38, 39, 40, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 854, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 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, 55, 56, 0, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 850, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 0, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 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, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 779, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 0, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 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, 55, 56, 0, 0, 0, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 76, 77, 0, 0, 0, 69, 46, 92, - 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, - 25, 17, 16, 762, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, - 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, - 85, 86, 316, 38, 39, 40, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, - 100, 96, 111, 0, 103, 72, 13, 0, 31, 59, - 0, 0, 105, 87, 88, 89, 90, 91, 0, 0, - 0, 0, 73, 74, 0, 75, 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, 55, 56, - 0, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 678, 24, 76, 77, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 0, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 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, 55, 56, 0, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 76, 77, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 316, 38, 39, 40, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 567, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 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, 55, 56, 0, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 310, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 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, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 0, 31, 59, 156, 155, 105, 441, - 442, 443, 444, 445, 0, 446, 447, 448, 484, 485, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 449, 0, 164, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 450, 451, 0, 454, 455, - 456, 435, 436, 437, 438, 439, 440, 452, 453, 0, - 0, 432, 0, 104, 0, 0, 0, 0, 0, 0, - 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, - 467, 487, 488, 489, 490, 491, 479, 480, 481, 482, - 483, 468, 469, 470, 471, 472, 473, 474, 475, 476, - 477, 478, 0, 499, 497, 498, 494, 495, 0, 486, - 492, 493, 500, 501, 503, 502, 504, 505, 0, 0, - 0, 0, 0, 87, 88, 89, 90, 91, 0, 496, - 507, 506, 73, 74, 0, 75, 431, 0, 0, 0, - 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, - 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 0, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 0, 24, 0, 0, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 132, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 0, 0, 0, 0, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 0, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 845, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 0, 0, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 132, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 0, 0, 0, 0, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 0, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 680, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 0, 0, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 132, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 0, 0, 0, 0, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 0, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 0, 0, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 132, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 0, 0, - 0, 0, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 0, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 639, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 56, 0, 0, 0, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 0, 0, 0, 0, 0, 69, 46, 92, - 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, - 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 132, 0, - 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, - 85, 86, 0, 0, 0, 0, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, - 100, 96, 111, 0, 103, 72, 13, 155, 31, 59, - 0, 0, 105, 441, 442, 443, 444, 445, 0, 446, - 447, 448, 484, 485, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 164, 0, 449, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 450, - 451, 0, 454, 455, 456, 435, 436, 437, 438, 439, - 440, 452, 453, 0, 0, 880, 0, 0, 0, 0, - 0, 0, 0, 0, 457, 458, 459, 460, 461, 462, - 463, 464, 465, 466, 467, 487, 488, 489, 490, 491, - 479, 480, 481, 482, 483, 468, 469, 470, 471, 472, - 473, 474, 475, 476, 477, 478, 0, 499, 497, 498, - 494, 495, 0, 486, 492, 493, 500, 501, 503, 502, - 504, 505, 441, 442, 443, 444, 445, 426, 446, 447, - 448, 484, 485, 879, 507, 506, 111, 0, 0, 0, - 0, 898, 179, 0, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 0, 0, 0, 0, 449, 0, 0, 0, 0, 0, - 164, 0, 0, 0, 0, 0, 0, 0, 450, 451, - 0, 454, 455, 456, 435, 436, 437, 438, 439, 440, - 452, 453, 0, 0, 880, 0, 0, 0, 0, 0, - 0, 0, 0, 457, 458, 459, 460, 461, 462, 463, - 464, 465, 466, 467, 487, 488, 489, 490, 491, 479, - 480, 481, 482, 483, 468, 469, 470, 471, 472, 473, - 474, 475, 476, 477, 478, 0, 499, 497, 498, 494, - 495, 0, 486, 492, 493, 500, 501, 503, 502, 504, - 505, 154, 156, 155, 0, 0, 0, 87, 88, 89, - 90, 91, 879, 507, 506, 111, 73, 74, 0, 75, - 870, 179, 0, 180, 152, 153, 157, 159, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 164, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 0, 0, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 132, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 0, 0, 0, 0, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 707, 133, 100, 96, - 111, 0, 103, 72, 13, 0, 31, 59, 0, 0, - 105, 441, 442, 443, 444, 445, 0, 446, 447, 448, - 484, 485, 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, 449, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 450, 451, 0, - 454, 455, 456, 435, 436, 437, 438, 439, 440, 452, - 453, 0, 0, 432, 0, 0, 0, 0, 0, 0, - 0, 0, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 487, 488, 489, 490, 491, 479, 480, - 481, 482, 483, 468, 469, 470, 471, 472, 473, 474, - 475, 476, 477, 478, 0, 499, 497, 498, 494, 495, - 0, 486, 492, 493, 500, 501, 503, 502, 504, 505, - 441, 442, 443, 444, 445, 0, 446, 447, 448, 484, - 485, 496, 507, 506, 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, 449, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 450, 451, 0, 454, - 455, 456, 743, 744, 745, 742, 741, 740, 452, 453, - 0, 0, 914, 0, 0, 0, 0, 0, 0, 0, - 0, 457, 458, 459, 460, 461, 462, 463, 464, 465, - 466, 467, 487, 488, 489, 490, 491, 479, 480, 481, - 482, 483, 468, 469, 470, 471, 472, 473, 474, 475, - 476, 477, 478, 0, 499, 497, 498, 494, 495, 0, - 486, 492, 493, 500, 501, 503, 502, 504, 505, 0, - 0, 0, 0, 0, 87, 88, 89, 90, 91, 0, - 496, 507, 506, 73, 74, 0, 75, 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, 55, - 56, 0, 0, 0, 0, 57, 0, 58, 53, 54, - 62, 63, 64, 65, 66, 67, 68, 70, 0, 51, - 84, 52, 0, 0, 0, 0, 138, 0, 0, 0, - 0, 0, 69, 0, 92, 93, 116, 0, 104, 0, - 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 85, 86, 0, 0, 0, - 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, - 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 133, 100, 96, 111, 532, 103, - 72, 0, 0, 0, 59, 528, 0, 105, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 73, 74, 0, - 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 225, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 55, 56, 0, 0, 0, 0, 57, - 0, 58, 53, 54, 62, 63, 64, 65, 66, 67, - 68, 70, 0, 51, 84, 52, 0, 0, 0, 0, - 138, 0, 0, 0, 0, 0, 69, 0, 92, 93, - 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, - 0, 0, 0, 0, 87, 88, 89, 90, 91, 85, - 86, 0, 0, 73, 74, 0, 75, 0, 226, 108, - 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, - 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, - 96, 111, 0, 103, 72, 0, 0, 0, 59, 55, - 56, 105, 0, 0, 0, 57, 0, 58, 53, 54, - 62, 63, 64, 65, 66, 67, 68, 70, 0, 51, - 84, 52, 0, 0, 0, 0, 138, 0, 0, 0, - 0, 0, 69, 0, 92, 93, 116, 0, 104, 0, - 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, - 87, 88, 89, 90, 91, 85, 86, 0, 0, 73, - 74, 0, 75, 0, 50, 108, 0, 101, 97, 98, - 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 591, 133, 100, 96, 111, 532, 103, - 72, 0, 0, 0, 59, 55, 56, 105, 0, 0, - 0, 57, 0, 58, 53, 54, 62, 63, 64, 65, - 66, 67, 68, 70, 0, 51, 84, 52, 0, 0, - 0, 0, 138, 0, 0, 0, 0, 0, 69, 0, - 92, 93, 116, 0, 104, 0, 0, 0, 0, 0, - 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, - 0, 0, 0, 0, 0, 0, 87, 88, 89, 90, - 91, 85, 86, 0, 0, 73, 74, 0, 75, 0, - 592, 108, 0, 101, 97, 98, 99, 94, 95, 0, - 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, - 133, 100, 96, 111, 0, 103, 72, 0, 0, 0, - 59, 55, 56, 105, 0, 0, 0, 57, 0, 58, - 53, 54, 62, 63, 64, 65, 66, 67, 68, 70, - 0, 51, 84, 52, 0, 0, 0, 0, 138, 0, - 0, 0, 0, 0, 69, 0, 92, 93, 116, 424, - 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, - 0, 0, 87, 88, 89, 90, 91, 85, 86, 0, - 0, 73, 74, 0, 75, 0, 50, 108, 0, 101, - 97, 98, 99, 94, 95, 0, 0, 0, 0, 0, - 0, 102, 0, 0, 0, 387, 133, 100, 96, 111, - 0, 103, 72, 0, 0, 0, 59, 55, 56, 105, - 0, 0, 0, 57, 0, 58, 53, 54, 62, 63, - 64, 65, 66, 67, 68, 70, 0, 51, 84, 52, - 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, - 69, 0, 92, 93, 116, 0, 104, 0, 0, 0, - 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 132, 0, 0, 0, 0, 0, 0, 87, 88, - 89, 90, 91, 85, 86, 0, 0, 73, 74, 0, - 75, 0, 50, 108, 0, 101, 97, 98, 99, 94, - 95, 0, 0, 0, 0, 363, 0, 102, 0, 0, - 0, 0, 133, 100, 96, 111, 0, 103, 72, 0, - 0, 0, 59, 55, 56, 105, 0, 0, 0, 57, - 0, 58, 53, 54, 62, 63, 64, 65, 66, 67, - 68, 70, 0, 51, 84, 52, 0, 0, 0, 0, - 138, 0, 0, 0, 0, 0, 69, 0, 92, 93, - 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, - 0, 0, 0, 0, 87, 88, 89, 90, 91, 85, - 86, 0, 0, 73, 74, 0, 75, 0, 50, 108, - 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, - 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, - 96, 111, 0, 103, 72, 0, 0, 0, 59, 55, - 56, 105, 0, 0, 0, 57, 0, 58, 53, 54, - 62, 63, 64, 65, 66, 67, 68, 70, 0, 51, - 84, 52, 0, 0, 0, 0, 138, 0, 0, 0, - 0, 0, 69, 0, 92, 93, 116, 0, 104, 0, - 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 85, 86, 0, 0, 0, - 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, - 99, 94, 95, 0, 0, 0, 154, 156, 155, 102, - 0, 0, 0, 0, 133, 100, 96, 111, 0, 103, - 72, 0, 0, 0, 59, 0, 179, 105, 180, 152, - 153, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 154, 156, 155, 0, 0, 0, 0, - 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, - 0, 0, 0, 179, 0, 180, 152, 153, 157, 159, - 158, 171, 172, 169, 170, 177, 173, 174, 175, 176, - 167, 168, 161, 162, 160, 163, 165, 166, 0, 178, - 154, 156, 155, 0, 0, 0, 0, 0, 0, 0, - 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, - 179, 0, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 154, 156, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, - 0, 677, 0, 0, 0, 0, 0, 179, 0, 180, - 152, 153, 157, 159, 158, 171, 172, 169, 170, 177, - 173, 174, 175, 176, 167, 168, 161, 162, 160, 163, - 165, 166, 0, 178, 154, 156, 155, 0, 0, 0, - 0, 0, 0, 0, 0, 164, 0, 0, 676, 0, - 0, 0, 0, 0, 179, 0, 180, 152, 153, 157, - 159, 158, 171, 172, 169, 170, 177, 173, 174, 175, - 176, 167, 168, 161, 162, 160, 163, 165, 166, 0, - 178, 154, 156, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 164, 0, 0, 621, 0, 0, 0, 0, - 0, 179, 0, 180, 152, 153, 157, 159, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 154, 156, - 155, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 0, 0, 620, 0, 0, 0, 0, 0, 179, 0, - 180, 152, 153, 157, 159, 158, 171, 172, 169, 170, - 177, 173, 174, 175, 176, 167, 168, 161, 162, 160, - 163, 165, 166, 0, 178, 154, 156, 155, 0, 0, - 0, 0, 0, 0, 0, 0, 164, 0, 0, 594, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 154, 156, 155, 0, 0, 0, 0, 0, - 0, 0, 0, 164, 0, 0, 582, 0, 0, 0, - 0, 0, 179, 0, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 154, - 156, 155, 0, 0, 0, 0, 0, 0, 0, 0, - 164, 0, 0, 555, 0, 0, 0, 0, 0, 179, - 810, 180, 152, 153, 157, 159, 158, 171, 172, 169, - 170, 177, 173, 174, 175, 176, 167, 168, 161, 162, - 160, 163, 165, 166, 0, 178, 154, 156, 155, 0, - 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, - 551, 0, 0, 0, 0, 0, 179, 0, 180, 152, - 153, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 154, 156, 155, 0, 0, 0, 0, - 0, 0, 0, 0, 164, 0, 0, 415, 0, 0, - 0, 0, 0, 179, 0, 180, 152, 153, 157, 159, - 158, 171, 172, 169, 170, 177, 173, 174, 175, 176, - 167, 168, 161, 162, 160, 163, 165, 166, 0, 178, - 154, 156, 155, 0, 0, 0, 0, 0, 0, 0, - 0, 164, 811, 0, 0, 0, 0, 0, 0, 0, - 179, 0, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 154, 156, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 164, 371, - 0, 0, 0, 0, 0, 0, 0, 179, 0, 180, - 152, 153, 157, 159, 158, 171, 172, 169, 170, 177, - 173, 174, 175, 176, 167, 168, 161, 162, 160, 163, - 165, 166, 0, 178, 0, 154, 156, 155, 0, 0, - 0, 0, 0, 0, 0, 164, 151, 0, 0, 0, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 154, 156, 155, 0, 0, 0, 0, 0, - 0, 0, 692, 164, 0, 0, 0, 0, 0, 0, - 0, 0, 179, 0, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 154, 156, 155, 0, 0, 0, 0, 0, 0, 690, - 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 179, 0, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 154, 156, 155, - 0, 0, 0, 0, 0, 0, 0, 681, 164, 0, - 0, 0, 0, 0, 0, 0, 0, 179, 0, 180, - 152, 153, 157, 159, 158, 171, 172, 169, 170, 177, - 173, 174, 175, 176, 167, 168, 161, 162, 160, 163, - 165, 166, 0, 178, 0, 154, 156, 155, 0, 0, - 0, 0, 0, 0, 622, 164, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 154, 156, 155, 0, 0, 0, 0, 0, - 0, 0, 603, 164, 0, 0, 0, 0, 0, 0, - 0, 0, 179, 561, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 565, 154, 156, 155, 0, 0, 410, 0, 0, 584, - 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 179, 0, 180, 152, 153, 157, 159, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 154, 156, - 155, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 0, 0, 0, 0, 0, 0, 0, 0, 179, 0, - 180, 152, 153, 157, 159, 158, 171, 172, 169, 170, - 177, 173, 174, 175, 176, 167, 168, 161, 162, 160, - 163, 165, 166, 0, 178, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 164, + 2, 1, } var yyPact = [...]int{ - -1000, -1000, 1255, -1000, -1000, -1000, -1000, -1000, -1000, 157, - 338, 412, 557, -1000, -1000, -1000, 156, 4963, 154, 151, - 6270, 6270, 6270, 24, 464, 6270, -1000, 6923, 149, 148, - 146, -1000, 287, 6270, 607, 743, 671, 493, 603, 599, - 595, 641, 695, 2417, -1000, -1000, 144, -1000, -1000, 357, - 142, 5574, 6270, 150, 150, 6270, 6270, 6270, 6270, 6270, - -1000, -1000, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 134, - 6270, -1000, 664, 6270, 6270, 6270, -1000, -1000, -1000, 585, - -1000, 307, 303, -1000, 201, 131, 129, 6270, 6270, 100, - 6270, 6270, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 486, 633, -1000, 63, 34, 34, 93, -1000, - 293, 554, -28, 554, 84, -1000, -1000, 233, 415, 281, - 438, 554, -1000, -1000, -1000, -1000, 273, -1000, 774, 3387, - 6270, 447, 671, 285, 6270, 6270, 232, 7398, 425, 230, - 218, 254, -1000, -1000, 249, 671, -1000, 772, 239, -1000, - 7398, -1000, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, - 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, - 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 240, 6154, - 6270, 150, 6270, 557, -1000, 6876, 214, -1000, 590, -1000, - 589, -1000, 371, -1000, 386, 78, 4963, 75, 211, 741, - 6038, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, - 6270, 6270, 6270, -1000, -1000, 6270, 6270, 6270, 101, 5574, - -57, 808, -1000, -1000, 7351, 150, 68, -1000, -1000, 585, - 6270, -1000, -1000, 5574, -1000, 629, 629, 719, 629, 6782, - 629, 629, 629, 629, 629, 629, 629, -1000, 6270, 629, - 289, 471, 602, -1000, 491, 5922, 150, 1076, 4812, 1076, - 6270, 3715, 3715, 34, -1000, 301, 191, 34, -1000, -1000, - 6270, 6270, 7398, 7398, 6270, 7398, 7398, 460, -1000, 452, - 341, 471, 6270, -1000, -1000, 5410, -1000, 5574, 583, 293, - 210, 293, -1000, -1000, 1091, -1000, 208, 220, 437, 554, - -1000, 372, 351, 575, 429, -1000, -1000, 557, 6270, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 58, 6735, 51, -1000, - 203, 805, 7398, 6688, -1000, -1000, -1000, -1000, 24, -1000, - 551, -1000, 6270, -1000, 6270, 1402, 1566, 3705, 1076, 4665, - 1730, 2054, 1891, 744, 744, 744, 719, 629, 719, 719, - 1349, 1349, 912, 912, 912, 912, 2209, 2209, 2209, 2209, - 912, -1000, 7302, 6270, 1240, 804, -1000, -1000, 7255, 111, - 3223, -1000, -1000, -1000, 50, 371, 379, 410, 282, -1000, - 410, 6270, -1000, 6270, -1000, -1000, 1076, 6270, 1076, 1076, - 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, - 6641, -58, 7207, 34, -1000, 6270, -1000, -31, 771, 5574, - 5806, -1000, 5574, 6594, -65, -1000, -35, -1000, -1000, -1000, - -1000, 634, 556, 7160, 268, 246, 6270, -67, 34, -1000, - -1000, 6270, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 34, -1000, - -1000, -1000, -1000, 24, 6270, 6270, 101, 24, 371, 801, - -1000, 7398, 6547, 6500, -1000, -1000, -1000, 7112, -1000, 800, - -1000, 7398, 6270, -36, -1000, -1000, 927, -1000, -1000, -1000, - 349, 350, -1000, 554, 348, 566, -1000, 345, -1000, 7398, - -37, 4515, 6270, 6270, 6270, 370, -1000, -1000, 18, 7398, - -1000, 6270, 1240, -38, 150, 499, 4351, -1000, 15, 373, - 379, -1000, 410, -1000, -1000, 279, 792, -1000, 6453, 6406, - 3059, 2054, 4187, -1000, -1000, -1000, 7065, 763, 6270, -1000, - 7398, 150, -12, -40, -1000, -1000, -1000, -72, -1000, -1000, - 484, -1000, -1000, -1000, -1000, 6270, -1000, 1076, -1000, -1000, - 7017, -1000, -1000, -73, 6970, -1000, -1000, 379, -41, 6270, - -1000, -1000, -1000, -42, 5690, 7398, -1000, -1000, 554, 336, - 796, -1000, -1000, 554, 566, -1000, 202, -1000, -1000, -1000, - 4951, 200, 7398, -1000, 199, 190, 373, 1240, 188, -1000, - -43, 778, 150, -14, 5574, -1000, -1000, -1000, 433, 373, - -46, 799, -1000, 673, -1000, -1000, 378, -1000, -1000, -1000, - -1000, 278, 792, 568, -1000, 410, 4963, 728, 186, -1000, - -1000, -1000, 6270, 1076, -1000, 5574, 763, -1000, -1000, 435, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 795, -1000, - 554, 243, 566, -1000, 796, -1000, 2895, 184, 6270, 194, - -1000, 627, -1000, -47, -1000, 3859, 499, -1000, 5574, -79, - 2731, -1000, -16, 277, -48, 417, 373, 257, -1000, -1000, - 272, -1000, -1000, -1000, 525, 483, 410, 685, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 550, -1000, -1000, -1000, - -1000, 3551, 1076, -49, 242, 267, 238, 554, 795, -1000, - -1000, 237, 183, -1000, -50, -1000, 6270, 162, 119, 182, - 620, 417, -1000, -1000, -1000, -51, -1000, -52, -1000, 180, - 410, -1000, 706, 706, -21, -1000, 544, -1000, -1000, 443, - 138, -1000, 765, 5127, 671, 117, -1000, -1000, 3551, 763, - -1000, -1000, -1000, -1000, 192, -1000, -1000, 4023, 6829, -1000, - -1000, -1000, -1000, -1000, 179, 706, 2567, 3859, -1000, -1000, - 584, -1000, 2403, 264, 373, 259, 510, 762, 174, -1000, - -1000, 525, -1000, 6270, 133, -1000, 760, 5127, -1000, -1000, - 4818, 26, -1000, -1000, -1000, -1000, -1000, 3551, -1000, 255, - 176, -1000, -54, 410, -1000, -1000, -1000, -1000, 81, -1000, - -1000, 500, 6270, -1000, -1000, 7398, -1000, 5127, 6270, -1000, - -1000, 4679, -1000, 171, 167, 383, 436, 298, -1000, 285, - -1000, -1000, 2239, 3551, -1000, -1000, 248, -1000, 2075, 1911, - -1000, 510, -1000, 7398, -1000, -1000, 7398, -25, -1000, -1000, - -1000, -1000, 410, 5266, 5127, 159, 1747, -1000, -1000, -1000, - -1000, -1000, 373, 792, -1000, -1000, 5127, -1000, -1000, -1000, - 1583, -55, -1000, -1000, 706, -23, -1000, -1000, -1000, 1419, - -1000, + -1000, -1000, -1000, } var yyPgo = [...]int{ - 0, 923, 922, 51, 9, 921, 3, 919, 11, 24, - 81, 80, 46, 45, 918, 29, 916, 77, 70, 61, - 915, 0, 50, 911, 907, 15, 906, 905, 35, 237, - 38, 20, 904, 32, 902, 62, 54, 901, 10, 900, - 899, 898, 896, 13, 55, 895, 894, 100, 95, 199, - 893, 892, 891, 5, 889, 85, 41, 888, 141, 43, - 887, 885, 884, 881, 878, 79, 877, 874, 873, 871, - 12, 870, 868, 47, 40, 31, 2, 14, 743, 8, - 795, 25, 867, 866, 864, 37, 82, 599, 862, 121, - 861, 860, 856, 86, 855, 36, 854, 853, 30, 33, - 851, 850, 28, 849, 843, 592, 840, 18, 838, 837, - 39, 835, 78, 1, 4, 831, 17, 830, 44, 827, - 826, 823, 7, 821, 6, 820, 19, 16, + 0, 1, 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, + 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, 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, 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, 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, } var yyR1 = [...]int{ - 0, 125, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, - 5, 5, 5, 5, 5, 5, 6, 6, 112, 112, - 89, 89, 8, 8, 8, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 80, - 80, 14, 14, 16, 16, 126, 126, 99, 99, 98, - 98, 105, 105, 15, 15, 18, 18, 17, 17, 93, - 93, 113, 113, 20, 20, 20, 20, 20, 20, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 91, 91, 90, 90, 27, 27, 104, - 104, 28, 10, 1, 1, 2, 2, 11, 11, 123, - 123, 78, 78, 12, 13, 30, 30, 117, 117, 118, - 118, 81, 81, 81, 81, 24, 24, 25, 25, 26, - 26, 83, 83, 83, 83, 102, 102, 102, 127, 127, - 23, 23, 69, 69, 67, 67, 71, 71, 68, 68, - 114, 114, 115, 115, 31, 31, 32, 32, 77, 77, - 75, 75, 75, 76, 76, 85, 85, 111, 111, 33, - 33, 97, 97, 35, 101, 101, 36, 36, 116, 116, - 37, 37, 37, 37, 122, 122, 84, 84, 84, 103, - 103, 38, 38, 39, 40, 40, 40, 40, 42, 42, - 41, 82, 82, 120, 120, 119, 119, 121, 121, 79, - 79, 79, 79, 79, 79, 100, 100, 43, 43, 92, - 92, 70, 19, 94, 94, 44, 95, 95, 96, 96, - 46, 45, 45, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 124, - 3, 3, 107, 107, 106, 106, 53, 53, 54, 54, - 54, 54, 47, 47, 48, 48, 51, 51, 88, 88, - 88, 86, 86, 58, 58, 58, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 59, 59, 59, 21, 21, 22, 22, 57, - 60, 60, 60, 61, 61, 61, 62, 62, 62, 62, - 62, 62, 29, 29, 29, 49, 49, 49, 63, 63, - 64, 64, 64, 64, 64, 64, 55, 55, 55, 56, - 56, 56, 110, 73, 73, 109, 109, 72, 72, 72, - 72, 72, 72, 87, 87, 87, 87, 65, 65, 65, - 65, 65, 65, 65, 66, 66, 66, 66, 50, 50, - 50, 50, 50, 50, 50, 108, 108, 74, + 0, 1, 2, 2, 3, 3, 4, 4, 4, 4, + 4, 8, 4, 9, 4, 4, 4, 4, 4, 10, + 10, 14, 14, 14, 14, 11, 11, 15, 15, 15, + 15, 12, 12, 16, 16, 16, 16, 13, 13, 18, + 18, 19, 19, 19, 19, 5, 5, 20, 22, 23, + 20, 26, 27, 20, 30, 31, 20, 33, 34, 20, + 36, 37, 38, 20, 40, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 50, 53, 20, 55, 56, 20, 57, 20, 20, 60, + 62, 20, 20, 20, 61, 64, 66, 67, 68, 61, + 63, 70, 63, 69, 69, 71, 71, 73, 74, 72, + 49, 49, 75, 6, 7, 78, 78, 79, 79, 81, + 76, 85, 77, 89, 77, 83, 83, 83, 83, 84, + 84, 88, 90, 90, 86, 86, 91, 91, 52, 52, + 51, 51, 92, 51, 39, 39, 54, 54, 59, 59, + 58, 58, 41, 41, 41, 41, 94, 96, 94, 97, + 94, 95, 95, 32, 32, 24, 98, 24, 28, 99, + 28, 25, 25, 29, 29, 82, 82, 100, 100, 101, + 101, 102, 102, 102, 102, 103, 103, 103, 104, 104, + 105, 105, 105, 105, 46, 46, 107, 107, 107, 47, + 47, 47, 47, 87, 87, 111, 109, 109, 109, 116, + 109, 114, 118, 118, 119, 119, 120, 120, 121, 121, + 122, 122, 123, 126, 126, 127, 127, 125, 124, 124, + 128, 128, 117, 117, 110, 110, 115, 115, 130, 130, + 129, 129, 129, 129, 129, 129, 112, 112, 112, 112, + 113, 113, 48, 48, 35, 35, 132, 131, 131, 133, + 133, 135, 135, 138, 137, 137, 137, 139, 140, 139, + 143, 141, 145, 43, 43, 43, 146, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 148, 43, 149, 43, 150, + 43, 151, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 152, 43, 153, 154, 43, 155, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 158, 43, 43, + 43, 43, 43, 43, 43, 163, 43, 165, 43, 45, + 45, 45, 45, 160, 160, 160, 160, 161, 161, 80, + 164, 164, 168, 168, 168, 168, 170, 169, 171, 169, + 172, 169, 175, 169, 177, 169, 179, 169, 180, 169, + 181, 169, 173, 173, 173, 173, 65, 65, 65, 142, + 142, 184, 186, 182, 182, 187, 187, 188, 157, 157, + 157, 162, 162, 162, 144, 144, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 191, 17, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 166, 166, 166, 166, 159, 159, 159, + 159, 159, 159, 159, 194, 194, 199, 199, 198, 198, + 198, 198, 42, 42, 21, 21, 108, 106, 147, 201, + 202, 44, 44, 204, 204, 205, 134, 206, 206, 208, + 207, 203, 203, 203, 176, 176, 211, 211, 178, 212, + 213, 212, 200, 200, 200, 183, 183, 183, 209, 209, + 209, 214, 214, 136, 136, 185, 185, 215, 215, 215, + 174, 174, 210, 210, 93, 93, 216, 217, 216, 216, + 167, 167, 218, 218, 218, 218, 218, 218, 218, 218, + 189, 189, 189, 189, 219, 220, 219, 219, 219, 219, + 219, 221, 221, 221, 156, 156, 156, 156, 156, 156, + 156, 156, 222, 224, 222, 223, 223, 196, 196, 193, + 197, } var yyR2 = [...]int{ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 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, 2, 0, - 1, 3, 1, 3, 2, 1, 1, 1, 1, 1, - 4, 3, 5, 4, 3, 4, 3, 4, 3, 1, - 1, 6, 7, 6, 7, 0, 1, 3, 1, 3, - 1, 3, 1, 1, 2, 1, 3, 1, 2, 3, - 1, 2, 0, 1, 1, 1, 1, 1, 4, 3, - 1, 1, 5, 7, 9, 5, 3, 3, 3, 3, - 3, 3, 1, 2, 6, 7, 9, 5, 1, 6, - 3, 3, 2, 0, 9, 1, 3, 0, 4, 1, - 3, 1, 11, 0, 1, 0, 1, 9, 8, 1, - 2, 1, 1, 6, 7, 0, 2, 0, 2, 0, - 2, 1, 2, 4, 3, 1, 4, 1, 4, 1, - 4, 3, 4, 4, 5, 0, 5, 4, 1, 1, - 1, 4, 5, 6, 1, 3, 6, 7, 3, 6, - 1, 0, 1, 3, 4, 6, 0, 1, 1, 2, - 1, 1, 1, 0, 2, 2, 4, 1, 3, 1, - 2, 3, 1, 1, 3, 1, 1, 3, 2, 0, - 3, 4, 3, 10, 1, 3, 1, 2, 3, 1, - 2, 2, 2, 3, 3, 3, 4, 3, 1, 1, - 3, 1, 3, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 3, 1, 2, 4, 3, - 1, 4, 4, 3, 1, 1, 0, 1, 3, 1, - 8, 3, 2, 6, 5, 3, 4, 2, 3, 3, + 0, 1, 1, 0, 1, 3, 1, 1, 1, 4, + 3, 0, 6, 0, 5, 3, 4, 4, 2, 3, + 1, 1, 3, 2, 4, 3, 1, 1, 3, 2, + 4, 3, 1, 1, 3, 2, 4, 5, 4, 1, + 0, 1, 1, 1, 4, 1, 2, 3, 0, 0, + 7, 0, 0, 10, 0, 0, 5, 0, 0, 7, + 0, 0, 0, 12, 0, 4, 2, 3, 2, 3, + 2, 3, 3, 2, 3, 3, 3, 1, 2, 5, + 0, 0, 10, 0, 0, 10, 0, 6, 1, 0, + 0, 8, 3, 3, 0, 0, 0, 0, 0, 13, + 0, 0, 5, 1, 0, 1, 2, 0, 0, 10, + 1, 3, 1, 1, 1, 0, 1, 0, 1, 0, + 10, 0, 8, 0, 7, 1, 2, 1, 2, 0, + 2, 1, 0, 2, 0, 2, 1, 3, 0, 2, + 1, 2, 0, 5, 1, 4, 1, 4, 1, 4, + 3, 5, 3, 4, 4, 5, 0, 0, 6, 0, + 5, 1, 1, 1, 4, 0, 0, 5, 0, 0, + 6, 0, 2, 0, 3, 1, 0, 1, 3, 4, + 6, 0, 1, 1, 1, 2, 3, 3, 1, 3, + 1, 1, 2, 2, 3, 1, 1, 2, 4, 3, + 5, 1, 3, 2, 0, 0, 4, 2, 1, 0, + 9, 3, 1, 3, 1, 3, 0, 1, 1, 2, + 2, 2, 3, 1, 3, 1, 1, 3, 4, 3, + 0, 1, 1, 3, 1, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 3, 5, 1, 3, + 5, 4, 3, 1, 0, 1, 0, 4, 1, 2, + 1, 4, 3, 0, 3, 1, 1, 0, 0, 2, + 0, 4, 0, 7, 3, 4, 0, 7, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 2, 2, 2, 2, 0, 4, 0, 4, 0, + 4, 0, 4, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 1, 0, 5, 0, 0, 7, 0, 5, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 3, 1, + 1, 1, 3, 2, 1, 0, 10, 0, 11, 2, + 2, 4, 4, 4, 4, 4, 4, 4, 3, 1, + 0, 4, 3, 4, 1, 2, 0, 3, 0, 5, + 0, 4, 0, 5, 0, 5, 0, 5, 0, 5, + 0, 3, 1, 1, 3, 2, 1, 3, 2, 1, + 1, 0, 0, 6, 1, 2, 0, 2, 0, 2, + 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 2, 3, 1, + 1, 1, 1, 3, 2, 4, 3, 1, 1, 1, + 4, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 5, 4, 3, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 3, 2, 1, 2, 4, 2, 11, 12, 0, - 0, 1, 0, 4, 3, 1, 1, 2, 2, 4, - 4, 2, 1, 1, 1, 1, 0, 3, 0, 1, - 1, 0, 1, 4, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 2, 3, 3, - 1, 1, 1, 3, 3, 1, 1, 0, 1, 1, - 1, 3, 1, 1, 3, 1, 1, 4, 4, 4, - 4, 1, 1, 1, 3, 1, 4, 2, 3, 3, - 1, 4, 4, 3, 3, 3, 1, 3, 1, 1, - 3, 1, 1, 0, 1, 3, 1, 3, 1, 4, - 2, 6, 4, 2, 2, 1, 2, 1, 4, 3, - 3, 3, 6, 3, 1, 1, 2, 1, 5, 4, - 2, 2, 4, 2, 2, 1, 3, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, + 2, 2, 3, 1, 1, 3, 2, 1, 1, 1, + 1, 3, 3, 1, 0, 2, 0, 1, 5, 3, + 3, 1, 1, 1, 3, 3, 1, 1, 1, 0, + 0, 7, 1, 2, 0, 0, 4, 4, 4, 0, + 2, 1, 1, 0, 1, 2, 3, 3, 1, 4, + 0, 5, 1, 1, 1, 1, 2, 1, 4, 4, + 1, 1, 4, 0, 1, 1, 1, 4, 4, 1, + 1, 3, 1, 2, 3, 1, 1, 0, 5, 0, + 0, 2, 5, 3, 3, 1, 6, 4, 4, 2, + 2, 2, 1, 2, 1, 0, 5, 3, 3, 6, + 3, 1, 1, 1, 4, 4, 4, 2, 2, 4, + 2, 2, 1, 0, 4, 1, 1, 3, 3, 3, + 3, } var yyChk = [...]int{ - -1000, -125, -112, -7, -9, -10, -11, -12, -13, 127, - 154, 120, 114, 161, -67, -68, 97, 96, 99, 106, - 110, 111, 115, 122, 76, 95, 90, -21, 124, 101, - 103, 163, 116, 119, 112, 86, 113, -123, 128, 129, - 130, -69, -71, -29, -34, -78, 83, -62, -63, -60, - 134, 69, 71, 58, 59, 49, 50, 55, 57, 164, - -45, -50, 60, 61, 62, 63, 64, 65, 66, 82, - 67, -52, 160, 13, 14, 16, 77, 78, -49, -59, - -54, -47, -57, -58, 70, 125, 126, 4, 5, 6, - 7, 8, 84, 85, 141, 142, 156, 138, 139, 140, - 155, 137, 149, 159, 88, 167, -8, -61, 135, 94, - -89, 157, 164, 157, -89, 161, 86, -16, -80, -105, - -89, 157, 113, 114, -17, -18, -93, -19, 86, -113, - 164, -9, 113, 154, 164, 164, -22, -21, 76, -22, - -22, -97, -35, -49, -101, 113, -36, 88, -94, -44, - -21, 163, 33, 34, 10, 12, 11, 35, 37, 36, - 51, 49, 50, 52, 68, 53, 54, 47, 48, 40, - 41, 38, 39, 43, 44, 45, 46, 42, 56, 30, - 32, 164, 164, 164, 161, -21, 86, 31, -3, 37, - 128, -78, 86, 86, 86, 73, 74, 73, 75, 74, - 17, 18, 19, 20, 29, 21, 22, 23, 24, 25, - 26, 27, 28, 58, 59, 164, 69, 161, 133, 164, - -110, -109, -73, -72, -21, 37, 134, -21, -29, -59, - 164, -58, 76, 69, -29, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -51, 164, -21, - -88, 93, -87, -65, 88, 151, 152, -21, -21, -21, - 69, 153, 153, -48, -46, -47, -64, 128, -8, -49, - 164, 164, -21, -21, 164, -21, -21, 93, 150, -87, - -87, 93, 161, -49, -85, 164, -85, 164, 157, -89, - 165, -89, 163, 161, -112, 163, -14, -105, -89, 157, - 163, 9, 157, 105, -89, -18, 163, 9, 17, -20, - 162, -9, -10, -11, -12, -13, 127, -21, 97, -3, - -95, -96, -21, -21, 163, 163, 163, 163, 9, 163, - 9, -3, 17, 163, 9, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -48, -21, 31, -21, -104, -28, -29, -21, -93, - -113, 163, 163, 86, -124, 86, -30, 131, -124, -117, - 131, 164, -9, 164, 163, 31, -21, 37, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -22, -21, -56, 86, 161, -49, -110, 166, 9, - 15, -29, 164, -21, -110, 165, -22, 160, -65, -65, - 93, 69, 133, -21, 87, -29, 15, -22, -55, -6, - -49, 161, 86, -5, -4, 76, 77, 78, 79, 80, - 81, 4, 5, 6, 7, 8, 10, 11, 12, 56, - 70, 71, 82, 83, 73, 74, 75, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 111, - 112, 113, 114, 115, 13, 14, 134, 106, 107, 108, - 109, 110, 135, 136, 131, 132, 154, 129, 130, 128, - 137, 138, 140, 139, 141, 142, 156, 155, -55, -6, - -49, -86, -85, 153, 69, 161, 133, 153, -86, -108, - -74, -21, -21, -21, 150, 150, 159, -21, 165, -111, - -33, -21, 158, -110, 86, 163, -112, 162, 163, 163, - 157, -89, -17, 157, -89, 161, 86, 157, -19, -21, - 164, 165, 164, 163, 9, 165, -35, -36, -124, -21, - -44, 31, -21, -126, 9, 105, 165, 162, -124, 164, - -30, -118, 132, -8, 161, -124, -122, -8, -21, -21, - -113, -21, 165, 166, 162, -85, -21, 165, 17, -73, - -21, 37, 134, -110, 165, 166, 165, -66, 86, 89, - 50, 88, 86, 162, 162, 69, 162, -21, 166, -85, - -21, -85, -49, -22, -21, -56, -49, -30, -126, 9, - 165, 165, 162, -126, 9, -21, 165, 162, 161, 157, - -99, -15, -18, -80, 161, -124, 165, -23, -9, 31, - -21, -95, -21, -83, 161, 31, 164, -21, 165, -28, - -81, -29, 37, 134, 69, -26, -9, 31, -91, 164, - -114, -115, -31, -32, -77, -75, 30, 135, 136, -8, - -118, -124, -122, -116, 161, 9, 165, 165, 75, -9, - 31, 162, 17, -21, -29, 164, 165, 166, 89, -21, - 162, 166, 162, -118, 165, -74, 165, -33, -98, -18, - 161, -126, 9, -18, -99, 163, -113, 165, 163, -102, - 163, -102, 163, -114, 163, 165, 15, -29, 164, -110, - -113, -27, 117, 118, -114, 165, 9, -1, 37, -75, - -124, 161, 162, -37, -120, -119, 120, -121, 123, -79, - 81, 80, 79, 76, 77, 78, -116, -8, -9, 31, - 163, -113, -21, -110, 166, -124, -126, 9, -98, 162, - -15, -126, 98, 163, -95, 162, 108, 109, -102, 107, - -102, 165, -25, -9, 31, -81, -29, -110, 166, 104, - 164, 161, 165, -107, 120, -31, -2, 158, 161, -116, - -100, -43, 88, 114, 113, -122, -79, 162, -113, 165, - 162, 161, 162, -18, -126, 162, 163, 165, -21, -127, - 31, 163, 162, 163, 107, -107, -113, 165, 165, 163, - -90, -8, -113, -76, 31, -76, 164, 88, -116, 162, - 163, 9, -124, 17, -92, -70, -6, -3, -84, 163, - 161, -116, 162, -24, -9, 31, -127, -113, 163, -76, - 102, -25, 88, 35, 162, 161, -77, 161, -106, -53, - 88, 37, 17, 162, -43, -21, 163, 9, 17, -6, - 162, -103, -38, -39, -40, -41, -42, -8, -6, 154, - 86, 162, -113, -113, 161, 163, 165, -8, -113, -113, - 165, 9, 88, -21, -124, -70, -21, -124, 162, -38, - 163, 163, 121, 105, 153, 100, -113, 161, 162, 162, - -53, -124, 164, -122, 86, -4, -79, -6, 163, 162, - -113, -114, -6, 162, 165, -76, -82, 163, 161, -113, - 162, + -1000, -1, -2, } var yyDef = [...]int{ - 79, -2, 1, 78, 85, 86, 87, 88, 89, 0, - 0, 0, 0, 122, 130, 131, 0, 0, 0, 0, - 417, 417, 417, 0, 382, 0, 142, 0, 0, 0, - 0, 148, 0, 0, 0, 80, 370, 0, 0, 0, - 0, 204, 0, -2, 416, 169, 0, -2, 433, 419, - 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, - 346, 350, 0, 0, 0, 0, 0, 0, 0, 386, - 0, 360, 388, 0, 363, 0, 171, 172, 426, 411, - 431, 0, 0, -2, 0, 0, 0, 0, 0, 0, - 0, 0, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 0, 0, 435, 0, -2, 0, 0, 395, - 82, 0, 0, 0, 0, 79, 80, 0, 0, 0, - 115, 0, 99, 100, 112, 117, 0, 120, 0, 0, - 0, 0, 370, 0, 286, 0, 0, 418, 382, 0, - 0, 0, 232, 233, 0, 370, 235, 236, 0, 284, - 285, 143, 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, 122, 0, 0, 152, 369, 371, - 0, 170, 175, 369, 177, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 310, 312, 0, 417, 0, 0, 453, - 0, 452, 456, 454, 458, 0, 0, 297, -2, 0, - 0, -2, 382, 453, -2, 331, 332, 333, 334, 0, - 351, 352, 353, 354, 355, 356, 357, 358, 417, 359, - 0, 389, 390, 465, 467, 0, 0, 362, 364, 366, - 417, 0, 0, 391, 292, 384, 385, 391, 383, 440, - 0, 0, 480, 481, 0, 483, 484, 0, 407, 0, - 0, 0, 0, 437, 378, 0, 381, 453, 0, 84, - 0, 83, 91, 79, 0, 94, 0, 0, 115, 0, - 96, 0, 0, 0, 115, 118, 98, 0, 0, 121, - 129, 123, 124, 125, 126, 127, 0, 0, 0, 369, - 0, 287, 289, 0, 136, 137, 138, 139, 0, 140, - 0, 369, 0, 141, 0, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, -2, -2, -2, -2, -2, -2, -2, -2, - -2, 344, 0, 0, 349, 105, 159, -2, 0, 0, - 0, 150, 151, 369, 0, 175, 179, 0, 0, 369, - 0, 0, 205, 0, 208, 122, 295, 0, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 0, 0, 0, 434, 449, 0, 451, 0, 394, 453, - 0, -2, 453, 0, 0, -2, 0, 361, 466, 463, - 464, 0, 0, 0, 0, 420, 0, 0, 0, -2, - -2, 0, 76, 77, 69, 70, 71, 72, 73, 74, - 75, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 0, -2, - -2, 291, 392, 0, 417, 0, 0, 0, 175, 105, - 485, 487, 0, 0, 406, 409, 408, 0, 225, 105, - 227, 229, 0, 0, 81, 90, 0, 93, 95, 97, - 0, 115, 111, 0, 115, 0, 116, 0, 119, 369, - 0, 0, 0, 286, 0, 0, 231, 234, 0, 237, - 283, 0, 348, 0, 106, 0, 0, 153, 0, -2, - 179, 369, 0, 176, 239, 0, 178, 244, 0, 0, - 0, 296, 0, 427, 429, 430, 0, 0, 0, 455, - 457, 0, 0, 0, -2, 394, 387, 0, 474, 475, - 0, 477, 469, 470, 471, 0, 473, 365, 428, 379, - 0, 380, 444, 0, 0, 443, 445, 179, 0, 106, - 479, 482, 436, 0, 106, 230, 393, 92, 0, 0, - 105, 108, 113, 0, 0, 282, 0, 132, 200, 122, - 0, 0, 288, 135, 195, 195, -2, 347, 0, 160, - 0, -2, 0, 0, 453, 147, 189, 122, 157, -2, - 0, 210, 212, 163, 217, 218, 0, 220, 221, 222, - 369, 0, 180, 265, 239, 0, 0, 0, 0, 202, - 122, 450, 0, 294, -2, 453, 462, 468, 476, 0, - 447, 441, 442, 369, 478, 486, 226, 228, 105, 110, - 0, 0, 106, 114, 105, 128, 0, 0, 286, 0, - 195, 0, 195, 0, 144, 0, 0, -2, 453, 0, - 0, 149, 0, 0, 0, 372, 216, 165, 164, 219, - 0, 239, 173, 238, 0, 0, 0, -2, 264, 267, - 269, 270, 271, 272, 273, 274, 265, 245, 203, 122, - 209, 206, 293, 0, 0, 0, 0, 106, 105, 103, - 107, 0, 0, 133, 0, 191, 0, 0, 0, 0, - 0, 372, 145, 187, 122, 0, -2, 0, -2, 0, - 0, 122, 223, 223, 0, 213, 0, 166, 239, 265, - 0, 276, 369, 0, 370, 0, 268, 174, 207, 461, - 472, 239, 101, 109, 0, 104, 201, 0, 0, 122, - 198, 199, 192, 193, 0, 223, 0, 0, 183, 190, - 0, 155, 0, 0, 0, 0, 0, 214, 265, 168, - 240, 0, 277, 0, 0, 280, 0, 0, 242, 246, - 0, 265, 102, 134, 185, 122, 122, 197, 194, 0, - 0, 146, 0, 0, 158, 122, 224, 122, 0, 375, - 376, 0, 0, 167, 275, 369, 241, 0, 0, 369, - 247, 0, 249, 0, 0, 259, 0, 0, 258, 57, - -2, 290, 0, 196, 122, 188, 0, 156, 0, 0, - 373, 0, 377, 215, 278, 279, 369, 0, 248, 250, - 251, 252, 0, 0, 0, 0, 0, 122, 162, 367, - 374, 281, -2, 253, 254, 255, 257, 260, 186, 368, - 0, 0, 256, 154, 223, 0, 243, 261, 122, 0, - 262, + 3, -2, 1, } var yyTok1 = [...]int{ 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 55, 159, 3, 167, 54, 37, 3, - 164, 165, 52, 49, 9, 50, 51, 53, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 31, 163, - 43, 17, 45, 30, 67, 3, 3, 3, 3, 3, + 3, 3, 3, 51, 156, 3, 164, 50, 34, 3, + 161, 162, 48, 45, 9, 46, 47, 49, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 29, 160, + 39, 15, 41, 28, 63, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 69, 3, 166, 36, 3, 160, 3, 3, 3, + 3, 65, 3, 163, 33, 3, 157, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 161, 35, 162, 57, + 3, 3, 3, 158, 32, 159, 53, } var yyTok2 = [...]int{ 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, - 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 32, 33, 34, 38, - 39, 40, 41, 42, 44, 46, 47, 48, 56, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 68, 70, + 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 30, 31, 35, 36, 37, 38, + 40, 42, 43, 44, 52, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, @@ -1707,7 +541,7 @@ var yyTok2 = [...]int{ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, + 151, 152, 153, 154, 155, } var yyTok3 = [...]int{ 0, @@ -2052,3711 +886,2618 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:251 + //line php5/php5.y:188 { - rootnode = stmt.NewStmtList(yyDollar[1].list) - positions.AddPosition(rootnode, positionBuilder.NewNodeListPosition(yyDollar[1].list)) } case 2: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + //line php5/php5.y:192 { - yyVAL.token = yyDollar[1].token - } - case 3: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 - { - yyVAL.token = yyDollar[1].token } case 4: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + //line php5/php5.y:197 { - yyVAL.token = yyDollar[1].token } case 5: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:198 { - yyVAL.token = yyDollar[1].token } case 6: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + //line php5/php5.y:202 { - yyVAL.token = yyDollar[1].token } case 7: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + //line php5/php5.y:203 { - yyVAL.token = yyDollar[1].token } case 8: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + //line php5/php5.y:204 { - yyVAL.token = yyDollar[1].token } case 9: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:258 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:205 { - yyVAL.token = yyDollar[1].token } case 10: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:206 { - yyVAL.token = yyDollar[1].token } case 11: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:207 { - yyVAL.token = yyDollar[1].token } case 12: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:208 { - yyVAL.token = yyDollar[1].token } case 13: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:209 { - yyVAL.token = yyDollar[1].token } case 14: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:210 { - yyVAL.token = yyDollar[1].token } case 15: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:211 { - yyVAL.token = yyDollar[1].token } case 16: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:212 { - yyVAL.token = yyDollar[1].token } case 17: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:213 { - yyVAL.token = yyDollar[1].token } case 18: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:214 { - yyVAL.token = yyDollar[1].token - } - case 19: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 - { - yyVAL.token = yyDollar[1].token - } - case 20: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 - { - yyVAL.token = yyDollar[1].token } case 21: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:259 + //line php5/php5.y:223 { - yyVAL.token = yyDollar[1].token } case 22: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:224 { - yyVAL.token = yyDollar[1].token } case 23: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:225 { - yyVAL.token = yyDollar[1].token } case 24: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:226 { - yyVAL.token = yyDollar[1].token - } - case 25: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 - { - yyVAL.token = yyDollar[1].token - } - case 26: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 - { - yyVAL.token = yyDollar[1].token } case 27: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + //line php5/php5.y:235 { - yyVAL.token = yyDollar[1].token } case 28: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:236 { - yyVAL.token = yyDollar[1].token } case 29: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:237 { - yyVAL.token = yyDollar[1].token } case 30: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:238 { - yyVAL.token = yyDollar[1].token - } - case 31: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:260 - { - yyVAL.token = yyDollar[1].token - } - case 32: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 - { - yyVAL.token = yyDollar[1].token } case 33: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + //line php5/php5.y:247 { - yyVAL.token = yyDollar[1].token } case 34: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:248 { - yyVAL.token = yyDollar[1].token } case 35: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:249 { - yyVAL.token = yyDollar[1].token } case 36: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:250 { - yyVAL.token = yyDollar[1].token } case 37: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:254 { - yyVAL.token = yyDollar[1].token } case 38: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:255 { - yyVAL.token = yyDollar[1].token } case 39: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 + //line php5/php5.y:259 { - yyVAL.token = yyDollar[1].token - } - case 40: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 - { - yyVAL.token = yyDollar[1].token - } - case 41: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:261 - { - yyVAL.token = yyDollar[1].token - } - case 42: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 - { - yyVAL.token = yyDollar[1].token - } - case 43: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 - { - yyVAL.token = yyDollar[1].token } case 44: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:268 { - yyVAL.token = yyDollar[1].token } case 45: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + //line php5/php5.y:273 { - yyVAL.token = yyDollar[1].token } case 46: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:274 { - yyVAL.token = yyDollar[1].token - } - case 47: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 - { - yyVAL.token = yyDollar[1].token } case 48: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:279 { - yyVAL.token = yyDollar[1].token } case 49: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:279 { - yyVAL.token = yyDollar[1].token } case 50: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:279 { - yyVAL.token = yyDollar[1].token } case 51: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:280 { - yyVAL.token = yyDollar[1].token } case 52: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:262 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:280 { - yyVAL.token = yyDollar[1].token } case 53: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:280 { - yyVAL.token = yyDollar[1].token } case 54: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + //line php5/php5.y:281 { - yyVAL.token = yyDollar[1].token } case 55: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:281 { - yyVAL.token = yyDollar[1].token } case 56: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:281 { - yyVAL.token = yyDollar[1].token } case 57: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + //line php5/php5.y:282 { - yyVAL.token = yyDollar[1].token } case 58: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:282 { - yyVAL.token = yyDollar[1].token } case 59: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:282 { - yyVAL.token = yyDollar[1].token } case 60: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:263 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:286 { - yyVAL.token = yyDollar[1].token } case 61: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:288 { - yyVAL.token = yyDollar[1].token } case 62: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:290 { - yyVAL.token = yyDollar[1].token } case 63: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-12 : yypt+1] + //line php5/php5.y:291 { - yyVAL.token = yyDollar[1].token } case 64: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:292 { - yyVAL.token = yyDollar[1].token } case 65: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:292 { - yyVAL.token = yyDollar[1].token } case 66: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:293 { - yyVAL.token = yyDollar[1].token } case 67: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:294 { - yyVAL.token = yyDollar[1].token } case 68: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:264 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:295 { - yyVAL.token = yyDollar[1].token } case 69: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:268 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:296 { - yyVAL.token = yyDollar[1].token } case 70: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:269 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:297 { - yyVAL.token = yyDollar[1].token } case 71: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:269 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:298 { - yyVAL.token = yyDollar[1].token } case 72: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:269 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:299 { - yyVAL.token = yyDollar[1].token } case 73: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:269 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:300 { - yyVAL.token = yyDollar[1].token - } - case 74: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:269 - { - yyVAL.token = yyDollar[1].token - } - case 75: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:269 - { - yyVAL.token = yyDollar[1].token - } - case 76: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:273 - { - yyVAL.token = yyDollar[1].token } case 77: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:274 + //line php5/php5.y:304 { - yyVAL.token = yyDollar[1].token } case 78: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:278 + //line php5/php5.y:305 { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) - } - case 79: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:279 - { - yyVAL.list = []node.Node{} } case 80: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:284 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:308 { - namePart := name.NewNamePart(yyDollar[1].token.Value) - positions.AddPosition(namePart, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.list = []node.Node{namePart} - comments.AddComments(namePart, yyDollar[1].token.Comments()) } case 81: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:291 + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:309 { - namePart := name.NewNamePart(yyDollar[3].token.Value) - positions.AddPosition(namePart, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.list = append(yyDollar[1].list, namePart) - comments.AddComments(namePart, yyDollar[3].token.Comments()) } case 82: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:301 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:310 { - yyVAL.node = name.NewName(yyDollar[1].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 83: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:307 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:312 { - yyVAL.node = name.NewRelative(yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 84: - yyDollar = yyS[yypt-2 : yypt+1] + yyDollar = yyS[yypt-8 : yypt+1] //line php5/php5.y:313 { - yyVAL.node = name.NewFullyQualified(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 85: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:321 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:314 { - yyVAL.node = yyDollar[1].node } case 86: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:322 + //line php5/php5.y:315 { - yyVAL.node = yyDollar[1].node } case 87: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:323 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:315 { - yyVAL.node = yyDollar[1].node - } - case 88: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:324 - { - yyVAL.node = yyDollar[1].node } case 89: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:325 + //line php5/php5.y:317 { - yyVAL.node = yyDollar[1].node } case 90: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:326 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:318 { - yyVAL.node = stmt.NewHaltCompiler() } case 91: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:328 + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:319 { - name := name.NewName(yyDollar[2].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) - yyVAL.node = stmt.NewNamespace(name, nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 92: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:338 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:320 { - name := name.NewName(yyDollar[2].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) - yyVAL.node = stmt.NewNamespace(name, yyDollar[4].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 93: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:348 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:321 { - yyVAL.node = stmt.NewNamespace(nil, yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 94: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:353 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:325 { - yyVAL.node = yyDollar[2].node } case 95: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:354 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:326 { - yyVAL.node = yyDollar[3].node.(*stmt.GroupUse).SetUseType(yyDollar[2].node) } case 96: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:356 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:327 { - yyVAL.node = stmt.NewUseList(nil, yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 97: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:361 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:328 { - yyVAL.node = stmt.NewUseList(yyDollar[2].node, yyDollar[3].list) } case 98: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:363 + yyDollar = yyS[yypt-11 : yypt+1] + //line php5/php5.y:329 { - yyVAL.node = stmt.NewConstList(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 99: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:372 + yyDollar = yyS[yypt-13 : yypt+1] + //line php5/php5.y:330 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 100: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:378 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:333 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 101: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:387 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:334 { - name := name.NewName(yyDollar[1].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) - yyVAL.node = stmt.NewGroupUse(nil, name, yyDollar[4].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[6].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 102: - yyDollar = yyS[yypt-7 : yypt+1] - //line php5/php5.y:397 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:334 { - name := name.NewName(yyDollar[2].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) - yyVAL.node = stmt.NewGroupUse(nil, name, yyDollar[5].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 103: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:410 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:338 { - name := name.NewName(yyDollar[1].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) - yyVAL.node = stmt.NewGroupUse(nil, name, yyDollar[4].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[6].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 104: - yyDollar = yyS[yypt-7 : yypt+1] - //line php5/php5.y:420 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:339 + { + } + case 105: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:343 + { + } + case 106: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:344 { - name := name.NewName(yyDollar[2].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) - yyVAL.node = stmt.NewGroupUse(nil, name, yyDollar[5].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 107: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:438 + //line php5/php5.y:348 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 108: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:439 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:348 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 109: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:444 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:348 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) - } - case 110: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:445 - { - yyVAL.list = []node.Node{yyDollar[1].node} - } - case 111: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:449 - { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 112: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:450 + //line php5/php5.y:357 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 113: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:454 + //line php5/php5.y:361 { - yyVAL.node = yyDollar[1].node } case 114: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:455 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:365 { - yyVAL.node = yyDollar[2].node.(*stmt.Use).SetUseType(yyDollar[1].node) } case 115: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:460 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:369 { - name := name.NewName(yyDollar[1].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) - yyVAL.node = stmt.NewUse(nil, name, nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 116: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:470 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:370 { - name := name.NewName(yyDollar[1].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) - alias := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = stmt.NewUse(nil, name, alias) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) - comments.AddComments(alias, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 117: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:485 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:374 { - yyVAL.node = yyDollar[1].node } case 118: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:486 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:375 { - yyVAL.node = yyDollar[2].node } case 119: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:490 + //line php5/php5.y:379 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 120: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:491 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:381 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 121: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:495 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:386 { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 122: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:496 + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:390 { - yyVAL.list = []node.Node{} } case 123: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:500 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:392 { - yyVAL.node = yyDollar[1].node } case 124: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:501 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:396 { - yyVAL.node = yyDollar[1].node } case 125: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:502 + //line php5/php5.y:401 { - yyVAL.node = yyDollar[1].node } case 126: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:503 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:402 { - yyVAL.node = yyDollar[1].node } case 127: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:504 + //line php5/php5.y:403 { - yyVAL.node = yyDollar[1].node } case 128: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:506 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:404 { - yyVAL.node = stmt.NewHaltCompiler() - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 129: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:514 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:408 { - yyVAL.node = stmt.NewStmtList(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 130: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:519 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:409 { - yyVAL.node = yyDollar[1].node } case 131: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:520 + //line php5/php5.y:413 { - yyVAL.node = yyDollar[1].node - } - case 132: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:522 - { - yyVAL.node = stmt.NewWhile(yyDollar[1].token, yyDollar[3].node, yyDollar[5].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 133: - yyDollar = yyS[yypt-7 : yypt+1] - //line php5/php5.y:528 - { - yyVAL.node = stmt.NewDo(yyDollar[2].node, yyDollar[5].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 134: - yyDollar = yyS[yypt-9 : yypt+1] - //line php5/php5.y:534 - { - yyVAL.node = stmt.NewFor(yyDollar[3].list, yyDollar[5].list, yyDollar[7].list, yyDollar[9].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 135: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:540 - { - yyVAL.node = stmt.NewSwitch(yyDollar[1].token, yyDollar[3].node, yyDollar[5].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 136: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:546 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:427 { - yyVAL.node = stmt.NewBreak(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 137: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:552 + //line php5/php5.y:428 { - yyVAL.node = stmt.NewContinue(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 138: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:558 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:432 { - yyVAL.node = stmt.NewReturn(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 139: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:564 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:433 { - yyVAL.node = stmt.NewGlobal(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 140: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:570 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:437 { - yyVAL.node = stmt.NewStatic(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 141: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:576 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:438 { - yyVAL.node = stmt.NewEcho(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 142: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:582 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:439 { - yyVAL.node = stmt.NewInlineHtml(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 143: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:588 - { - yyVAL.node = stmt.NewExpression(yyDollar[1].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) - } - case 144: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:594 - { - yyVAL.node = stmt.NewUnset(yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 145: - yyDollar = yyS[yypt-7 : yypt+1] - //line php5/php5.y:600 - { - yyVAL.node = stmt.NewForeach(yyDollar[3].node, nil, yyDollar[5].foreachVariable.node, yyDollar[7].node, yyDollar[5].foreachVariable.byRef) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[7].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 146: - yyDollar = yyS[yypt-9 : yypt+1] - //line php5/php5.y:606 - { - yyVAL.node = stmt.NewForeach(yyDollar[3].node, yyDollar[5].node, yyDollar[7].foreachVariable.node, yyDollar[9].node, yyDollar[7].foreachVariable.byRef) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 147: yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:612 + //line php5/php5.y:439 { - yyVAL.node = stmt.NewDeclare(yyDollar[3].list, yyDollar[5].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 148: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:618 - { - yyVAL.node = stmt.NewNop() - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 149: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:624 - { - if yyDollar[6].node == nil { - yyVAL.node = stmt.NewTry(yyDollar[3].list, yyDollar[5].list, yyDollar[6].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[5].list)) - } else { - yyVAL.node = stmt.NewTry(yyDollar[3].list, yyDollar[5].list, yyDollar[6].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) - } - - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 150: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:636 + //line php5/php5.y:461 { - yyVAL.node = stmt.NewThrow(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 151: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:642 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:462 { - label := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(label, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = stmt.NewGoto(label) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - - comments.AddComments(label, yyDollar[2].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 152: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:652 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:467 { - label := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(label, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewLabel(label) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) - - comments.AddComments(label, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 153: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:663 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:468 { - yyVAL.list = []node.Node{} } case 154: - yyDollar = yyS[yypt-9 : yypt+1] - //line php5/php5.y:665 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:469 { - identifier := node.NewIdentifier(yyDollar[5].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[5].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[5].token)) - catch := stmt.NewCatch(yyDollar[4].list, variable, yyDollar[8].list) - positions.AddPosition(catch, positionBuilder.NewTokensPosition(yyDollar[2].token, yyDollar[9].token)) - yyVAL.list = append(yyDollar[1].list, catch) - - comments.AddComments(identifier, yyDollar[5].token.Comments()) - comments.AddComments(variable, yyDollar[5].token.Comments()) - comments.AddComments(catch, yyDollar[2].token.Comments()) } case 155: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:680 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:470 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 156: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:681 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:475 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 157: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:685 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:476 { - yyVAL.node = nil } case 158: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:687 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:476 { - yyVAL.node = stmt.NewFinally(yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 159: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:695 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:477 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 160: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:696 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:477 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) - } - case 161: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:700 - { - yyVAL.node = yyDollar[1].node - } - case 162: - yyDollar = yyS[yypt-11 : yypt+1] - //line php5/php5.y:705 - { - name := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = stmt.NewFunction(name, yyDollar[2].boolWithToken.value, yyDollar[6].list, yyDollar[8].node, yyDollar[10].list, yyDollar[4].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[11].token)) - - comments.AddComments(name, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 163: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:717 - { - yyVAL.boolWithToken = boolWithToken{false, nil} - } - case 164: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:718 - { - yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} - } - case 165: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:722 - { - yyVAL.boolWithToken = boolWithToken{false, nil} } case 166: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:723 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:496 { - yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} } case 167: - yyDollar = yyS[yypt-9 : yypt+1] - //line php5/php5.y:728 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:496 { - name := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = stmt.NewClass(name, yyDollar[1].list, nil, yyDollar[4].node, yyDollar[5].list, yyDollar[8].list, yyDollar[6].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[9].token)) - - comments.AddComments(name, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) - } - case 168: - yyDollar = yyS[yypt-8 : yypt+1] - //line php5/php5.y:738 - { - name := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = stmt.NewClass(name, nil, nil, yyDollar[3].node, yyDollar[4].list, yyDollar[7].list, yyDollar[5].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) - - comments.AddComments(name, yyDollar[2].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 169: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:750 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:502 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 170: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:751 - { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) - } - case 171: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:756 - { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 172: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:762 - { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 173: yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:771 + //line php5/php5.y:502 { - name := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = stmt.NewTrait(name, yyDollar[5].list, yyDollar[3].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) - - comments.AddComments(name, yyDollar[2].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 174: - yyDollar = yyS[yypt-7 : yypt+1] - //line php5/php5.y:784 - { - name := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = stmt.NewInterface(name, yyDollar[3].list, yyDollar[6].list, yyDollar[4].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) - - comments.AddComments(name, yyDollar[2].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 175: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:796 - { - yyVAL.node = nil - } - case 176: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:797 - { - yyVAL.node = yyDollar[2].node - } - case 177: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:801 - { - yyVAL.list = nil - } - case 178: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:802 - { - yyVAL.list = yyDollar[2].list } case 179: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:806 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:531 { - yyVAL.list = nil } case 180: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:807 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:533 { - yyVAL.list = yyDollar[2].list } case 181: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:811 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:538 { - yyVAL.foreachVariable = foreachVariable{yyDollar[1].node, false} } case 182: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:812 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:539 { - yyVAL.foreachVariable = foreachVariable{yyDollar[2].node, true} } case 183: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:814 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:540 { - list := expr.NewList(yyDollar[3].list) - positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - yyVAL.foreachVariable = foreachVariable{list, false} - comments.AddComments(list, yyDollar[1].token.Comments()) } case 184: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:821 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:541 { - list := expr.NewShortList(yyDollar[2].list) - positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - yyVAL.foreachVariable = foreachVariable{list, false} - comments.AddComments(list, yyDollar[1].token.Comments()) } case 185: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:830 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:546 { - yyVAL.node = yyDollar[1].node } case 186: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:832 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:547 { - yyVAL.node = stmt.NewStmtList(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 187: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:840 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:548 { - yyVAL.node = yyDollar[1].node - } - case 188: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:842 - { - yyVAL.node = stmt.NewStmtList(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 189: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:850 - { - yyVAL.node = yyDollar[1].node } case 190: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:852 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:558 { - yyVAL.node = stmt.NewStmtList(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 191: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:860 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:559 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} } case 192: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:861 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:560 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[3].list, yyDollar[4].token} } case 193: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:862 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:561 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[4].token} } case 194: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:863 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:565 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[3].list, yyDollar[5].token} } case 195: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:867 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:566 { - yyVAL.list = []node.Node{} } case 196: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:869 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:571 { - _case := stmt.NewCase(yyDollar[3].node, yyDollar[5].list) - positions.AddPosition(_case, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) - yyVAL.list = append(yyDollar[1].list, _case) - comments.AddComments(_case, yyDollar[2].token.Comments()) } case 197: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:876 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:572 + { + } + case 198: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:573 + { + } + case 199: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:578 { - _default := stmt.NewDefault(yyDollar[4].list) - positions.AddPosition(_default, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) - yyVAL.list = append(yyDollar[1].list, _default) - comments.AddComments(_default, yyDollar[2].token.Comments()) } case 200: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:890 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:579 { - yyVAL.node = yyDollar[1].node } case 201: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:892 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:580 { - yyVAL.node = stmt.NewStmtList(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 202: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:901 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:581 { - yyVAL.node = stmt.NewIf(yyDollar[3].node, yyDollar[5].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 203: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:907 - { - _elseIf := stmt.NewElseIf(yyDollar[4].node, yyDollar[6].node) - positions.AddPosition(_elseIf, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[6].node)) - yyVAL.node = yyDollar[1].node.(*stmt.If).AddElseIf(_elseIf) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[6].node)) - - comments.AddComments(_elseIf, yyDollar[2].token.Comments()) - } - case 204: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:918 - { - yyVAL.node = yyDollar[1].node } case 205: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:920 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:593 { - _else := stmt.NewElse(yyDollar[3].node) - positions.AddPosition(_else, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[3].node)) - yyVAL.node = yyDollar[1].node.(*stmt.If).SetElse(_else) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - - comments.AddComments(yyVAL.node, yyDollar[2].token.Comments()) - } - case 206: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:932 - { - stmts := stmt.NewStmtList(yyDollar[6].list) - positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[6].list)) - yyVAL.node = stmt.NewAltIf(yyDollar[3].node, stmts) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[6].list)) - - comments.AddComments(stmts, yyDollar[5].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 207: - yyDollar = yyS[yypt-7 : yypt+1] - //line php5/php5.y:942 - { - stmts := stmt.NewStmtList(yyDollar[7].list) - positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[7].list)) - _elseIf := stmt.NewAltElseIf(yyDollar[4].node, stmts) - positions.AddPosition(_elseIf, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[7].list)) - yyVAL.node = yyDollar[1].node.(*stmt.AltIf).AddElseIf(_elseIf) - - comments.AddComments(stmts, yyDollar[6].token.Comments()) - comments.AddComments(_elseIf, yyDollar[2].token.Comments()) - } - case 208: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:956 - { - yyVAL.node = yyDollar[1].node - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) } case 209: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:961 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:596 { - stmts := stmt.NewStmtList(yyDollar[4].list) - positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[4].list)) - _else := stmt.NewAltElse(stmts) - positions.AddPosition(_else, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) - yyVAL.node = yyDollar[1].node.(*stmt.AltIf).SetElse(_else) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[6].token)) - - comments.AddComments(stmts, yyDollar[3].token.Comments()) - comments.AddComments(_else, yyDollar[2].token.Comments()) } case 210: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:975 + yyDollar = yyS[yypt-9 : yypt+1] + //line php5/php5.y:598 { - yyVAL.list = yyDollar[1].list - } - case 211: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:976 - { - yyVAL.list = nil } case 212: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:980 + //line php5/php5.y:606 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 213: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:981 + //line php5/php5.y:607 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) - } - case 214: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:986 - { - identifier := node.NewIdentifier(yyDollar[4].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) - - comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) - - if yyDollar[1].node != nil { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, nil, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) - } else if yyDollar[2].boolWithToken.value == true { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, nil, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(*yyDollar[2].boolWithToken.token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[2].boolWithToken.token.Comments()) - } else if yyDollar[3].boolWithToken.value == true { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, nil, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(*yyDollar[3].boolWithToken.token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[3].boolWithToken.token.Comments()) - } else { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, nil, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) - } - } - case 215: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:1014 - { - identifier := node.NewIdentifier(yyDollar[4].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) - - comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) - - if yyDollar[1].node != nil { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, yyDollar[6].node, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[6].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) - } else if yyDollar[2].boolWithToken.value == true { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, yyDollar[6].node, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(*yyDollar[2].boolWithToken.token, yyDollar[6].node)) - comments.AddComments(yyVAL.node, yyDollar[2].boolWithToken.token.Comments()) - } else if yyDollar[3].boolWithToken.value == true { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, yyDollar[6].node, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(*yyDollar[3].boolWithToken.token, yyDollar[6].node)) - comments.AddComments(yyVAL.node, yyDollar[3].boolWithToken.token.Comments()) - } else { - yyVAL.node = node.NewParameter(yyDollar[1].node, variable, yyDollar[6].node, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[4].token, yyDollar[6].node)) - comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) - } - } - case 216: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1044 - { - yyVAL.node = nil - } - case 217: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1045 - { - yyVAL.node = yyDollar[1].node - } - case 218: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1049 - { - yyVAL.node = yyDollar[1].node - } - case 219: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1051 - { - yyVAL.node = node.NewNullable(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 220: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1060 - { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 221: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1066 - { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 222: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1071 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:631 { - yyVAL.node = yyDollar[1].node } case 223: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1075 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:635 { - yyVAL.node = nil } case 224: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1076 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:636 { - yyVAL.node = yyDollar[2].node } case 225: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1080 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:640 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{[]node.Node{}, yyDollar[2].token} } case 226: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1081 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:641 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[4].token} } case 227: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1085 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:645 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 228: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1086 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:649 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 229: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1091 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:650 { - yyVAL.node = node.NewArgument(yyDollar[1].node, false) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 230: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1097 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:654 { - yyVAL.node = node.NewArgument(yyDollar[2].node, true) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 231: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1105 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:655 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 232: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1106 + //line php5/php5.y:659 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 233: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1110 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:660 { - yyVAL.node = yyDollar[1].node } case 234: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1114 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:664 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 235: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1115 + //line php5/php5.y:665 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 236: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1120 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:669 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewStaticVar(variable, nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 237: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1133 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:670 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewStaticVar(variable, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 238: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1148 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:674 { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 239: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1149 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:675 { - yyVAL.list = []node.Node{} } case 240: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1154 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:679 { - yyVAL.node = stmt.NewPropertyList(yyDollar[1].list, yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 241: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1160 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:680 { - yyVAL.node = stmt.NewClassConstList(yyDollar[1].list, yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 242: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1166 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:681 { - yyVAL.node = stmt.NewTraitUse(yyDollar[2].list, yyDollar[3].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 243: - yyDollar = yyS[yypt-10 : yypt+1] - //line php5/php5.y:1172 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:682 { - name := node.NewIdentifier(yyDollar[4].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[4].token)) - yyVAL.node = stmt.NewClassMethod(name, yyDollar[1].list, yyDollar[3].boolWithToken.value, yyDollar[7].list, yyDollar[9].node, yyDollar[10].nodesWithEndToken.nodes, yyDollar[5].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[10].nodesWithEndToken.endToken)) - - comments.AddComments(name, yyDollar[4].token.Comments()) - comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) } case 244: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1184 + //line php5/php5.y:683 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 245: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1185 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:684 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 246: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1189 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:688 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[1].token} } case 247: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1190 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:689 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[2].token} } case 248: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1191 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:690 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} } case 249: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1195 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:691 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 250: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1196 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:695 { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 251: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1200 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:696 { - yyVAL.node = yyDollar[1].node } case 252: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1201 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:700 { - yyVAL.node = yyDollar[1].node } case 253: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1206 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:701 { - name := name.NewName(yyDollar[3].list) - positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[3].list)) - yyVAL.node = stmt.NewTraitUsePrecedence(yyDollar[1].node, name) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, yyDollar[3].list)) - - comments.AddComments(name, ListGetFirstNodeComments(yyDollar[3].list)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 254: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1219 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:706 { - alias := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, nil, alias) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) - - comments.AddComments(alias, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 255: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1229 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:707 { - alias := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, nil, alias) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) - - comments.AddComments(alias, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 256: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1239 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:711 { - alias := node.NewIdentifier(yyDollar[4].token.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[4].token)) - yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, alias) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - - comments.AddComments(alias, yyDollar[4].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 257: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1249 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:711 { - yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 258: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1258 + //line php5/php5.y:712 { - name := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewTraitMethodRef(nil, name) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(name, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 259: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1267 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:716 { - yyVAL.node = yyDollar[1].node } case 260: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1272 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:717 { - target := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = stmt.NewTraitMethodRef(yyDollar[1].node, target) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) - - comments.AddComments(target, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 261: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1284 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:721 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[1].token} } case 262: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1285 + //line php5/php5.y:722 { - yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} } case 263: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1289 + //line php5/php5.y:726 { - yyVAL.list = yyDollar[1].list } case 264: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1291 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:726 { - modifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(modifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.list = []node.Node{modifier} - comments.AddComments(modifier, yyDollar[1].token.Comments()) } case 265: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1300 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:727 { - yyVAL.list = nil } case 266: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1301 + //line php5/php5.y:728 { - yyVAL.list = yyDollar[1].list } case 267: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1305 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:732 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 268: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1306 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:733 { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 269: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1311 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:734 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 270: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1317 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:738 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 271: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1323 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:738 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 272: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1329 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:742 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 273: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1335 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:742 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 274: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1341 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:743 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 275: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1349 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:744 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 276: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1350 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:745 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 277: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1355 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:745 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewProperty(variable, nil, yyDollar[2].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 278: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1368 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:746 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewProperty(variable, yyDollar[3].node, yyDollar[4].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 279: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1383 + //line php5/php5.y:747 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 280: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1384 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:748 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 281: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1389 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:749 { - name := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewConstant(name, yyDollar[3].node, yyDollar[4].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) - - comments.AddComments(name, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 282: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1402 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:750 { - name := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = stmt.NewConstant(name, yyDollar[3].node, yyDollar[4].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) - - comments.AddComments(name, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 283: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1414 + //line php5/php5.y:751 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 284: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1415 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:752 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 285: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1419 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:753 { - yyVAL.node = yyDollar[1].node } case 286: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1423 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:754 { - yyVAL.list = nil } case 287: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1424 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:755 { - yyVAL.list = yyDollar[1].list } case 288: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1427 + //line php5/php5.y:756 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 289: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1428 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:757 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 290: - yyDollar = yyS[yypt-8 : yypt+1] - //line php5/php5.y:1433 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:758 { - if yyDollar[2].nodesWithEndToken != nil { - yyVAL.node = stmt.NewClass(nil, nil, yyDollar[2].nodesWithEndToken.nodes, yyDollar[3].node, yyDollar[4].list, yyDollar[7].list, yyDollar[5].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) - } else { - yyVAL.node = stmt.NewClass(nil, nil, nil, yyDollar[3].node, yyDollar[4].list, yyDollar[7].list, yyDollar[5].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) - } - - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 291: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1448 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:759 { - if yyDollar[3].nodesWithEndToken != nil { - yyVAL.node = expr.NewNew(yyDollar[2].node, yyDollar[3].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].nodesWithEndToken.endToken)) - } else { - yyVAL.node = expr.NewNew(yyDollar[2].node, nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - } - - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 292: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1459 + //line php5/php5.y:760 { - yyVAL.node = expr.NewNew(yyDollar[2].node, nil) } case 293: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:1464 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:761 { - list := expr.NewList(yyDollar[3].list) - positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - yyVAL.node = assign_op.NewAssign(list, yyDollar[6].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) - - comments.AddComments(list, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 294: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:1474 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:762 { - shortList := expr.NewShortList(yyDollar[2].list) - positions.AddPosition(shortList, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - yyVAL.node = assign_op.NewAssign(shortList, yyDollar[5].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) - - comments.AddComments(shortList, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 295: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1484 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:763 { - yyVAL.node = assign_op.NewAssign(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 296: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1490 + //line php5/php5.y:763 { - yyVAL.node = assign_op.NewAssignRef(yyDollar[1].node, yyDollar[4].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 297: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1496 + //line php5/php5.y:764 { - yyVAL.node = expr.NewClone(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 298: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1502 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:764 { - yyVAL.node = assign_op.NewPlus(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 299: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1508 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:765 { - yyVAL.node = assign_op.NewMinus(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 300: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1514 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:765 { - yyVAL.node = assign_op.NewMul(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 301: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1520 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:766 { - yyVAL.node = assign_op.NewPow(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 302: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1526 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:766 { - yyVAL.node = assign_op.NewDiv(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 303: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1532 + //line php5/php5.y:767 { - yyVAL.node = assign_op.NewConcat(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 304: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1538 + //line php5/php5.y:768 { - yyVAL.node = assign_op.NewMod(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 305: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1544 + //line php5/php5.y:769 { - yyVAL.node = assign_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 306: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1550 + //line php5/php5.y:770 { - yyVAL.node = assign_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 307: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1556 + //line php5/php5.y:771 { - yyVAL.node = assign_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 308: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1562 + //line php5/php5.y:772 { - yyVAL.node = assign_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 309: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1568 + //line php5/php5.y:773 { - yyVAL.node = assign_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 310: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1574 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:774 { - yyVAL.node = expr.NewPostInc(yyDollar[1].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 311: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1580 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:775 { - yyVAL.node = expr.NewPreInc(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 312: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1586 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:776 { - yyVAL.node = expr.NewPostDec(yyDollar[1].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 313: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1592 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:777 { - yyVAL.node = expr.NewPreDec(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 314: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1598 + //line php5/php5.y:778 { - yyVAL.node = binary_op.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 315: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1604 + //line php5/php5.y:779 { - yyVAL.node = binary_op.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 316: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1610 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:780 { - yyVAL.node = binary_op.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 317: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1616 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:781 { - yyVAL.node = binary_op.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 318: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1622 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:782 { - yyVAL.node = binary_op.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 319: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1628 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:783 { - yyVAL.node = binary_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 320: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1634 + //line php5/php5.y:784 { - yyVAL.node = binary_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 321: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1640 + //line php5/php5.y:785 { - yyVAL.node = binary_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 322: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1646 + //line php5/php5.y:786 { - yyVAL.node = binary_op.NewConcat(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 323: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1652 + //line php5/php5.y:787 { - yyVAL.node = binary_op.NewPlus(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 324: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1658 + //line php5/php5.y:788 { - yyVAL.node = binary_op.NewMinus(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 325: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1664 + //line php5/php5.y:789 { - yyVAL.node = binary_op.NewMul(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 326: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1670 + //line php5/php5.y:790 { - yyVAL.node = binary_op.NewPow(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 327: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1676 + //line php5/php5.y:791 { - yyVAL.node = binary_op.NewDiv(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 328: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1682 + //line php5/php5.y:792 { - yyVAL.node = binary_op.NewMod(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 329: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1688 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:793 { - yyVAL.node = binary_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 330: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1694 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:794 { - yyVAL.node = binary_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 331: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1700 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:795 { - yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 332: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1706 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:795 { - yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 333: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1712 + //line php5/php5.y:796 { - yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 334: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1718 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:797 { - yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 335: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1724 + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:798 { - yyVAL.node = binary_op.NewIdentical(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 336: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1730 + //line php5/php5.y:799 { - yyVAL.node = binary_op.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 337: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1736 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:800 { - yyVAL.node = binary_op.NewEqual(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 338: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1742 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:801 { - yyVAL.node = binary_op.NewNotEqual(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 339: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1748 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:802 { - yyVAL.node = binary_op.NewSmaller(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 340: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1754 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:803 { - yyVAL.node = binary_op.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 341: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1760 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:804 { - yyVAL.node = binary_op.NewGreater(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 342: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1766 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:805 { - yyVAL.node = binary_op.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 343: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1772 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:806 { - yyVAL.node = binary_op.NewSpaceship(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 344: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1778 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:807 { - yyVAL.node = expr.NewInstanceOf(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 345: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1783 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:808 { - yyVAL.node = yyDollar[2].node } case 346: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1784 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:809 { - yyVAL.node = yyDollar[1].node } case 347: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:1786 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:810 { - yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 348: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1792 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:810 { - yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 349: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1798 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:811 { - yyVAL.node = binary_op.NewCoalesce(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 350: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1803 + //line php5/php5.y:812 { - yyVAL.node = yyDollar[1].node } case 351: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1805 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:813 { - yyVAL.node = cast.NewCastInt(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 352: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1811 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:814 { - yyVAL.node = cast.NewCastDouble(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 353: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1817 + //line php5/php5.y:815 { - yyVAL.node = cast.NewCastString(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 354: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1823 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:816 { - yyVAL.node = cast.NewCastArray(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 355: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1829 + //line php5/php5.y:817 { - yyVAL.node = cast.NewCastObject(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 356: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1835 + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:819 { - yyVAL.node = cast.NewCastBool(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 357: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1841 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:820 { - yyVAL.node = cast.NewCastUnset(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 358: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1847 + yyDollar = yyS[yypt-11 : yypt+1] + //line php5/php5.y:822 { - yyVAL.node = expr.NewExit(yyDollar[2].node, strings.EqualFold(yyDollar[1].token.Value, "die")) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 359: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1853 + //line php5/php5.y:826 { - yyVAL.node = expr.NewErrorSuppress(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 360: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1858 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:827 { - yyVAL.node = yyDollar[1].node } case 361: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1860 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:828 { - yyVAL.node = expr.NewShellExec(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 362: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1866 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:829 { - yyVAL.node = expr.NewPrint(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 363: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1872 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:833 { - yyVAL.node = expr.NewYield(nil, nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 364: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1878 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:834 { - yyVAL.node = expr.NewYield(nil, yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 365: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1884 + //line php5/php5.y:835 { - yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 366: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1890 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:836 { - yyVAL.node = expr.NewYieldFrom(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 367: - yyDollar = yyS[yypt-11 : yypt+1] - //line php5/php5.y:1896 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:840 { - yyVAL.node = expr.NewClosure(yyDollar[5].list, yyDollar[7].list, yyDollar[8].node, yyDollar[10].list, false, yyDollar[2].boolWithToken.value, yyDollar[3].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[11].token)) - - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 368: - yyDollar = yyS[yypt-12 : yypt+1] - //line php5/php5.y:1903 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:841 { - yyVAL.node = expr.NewClosure(yyDollar[6].list, yyDollar[8].list, yyDollar[9].node, yyDollar[11].list, true, yyDollar[3].boolWithToken.value, yyDollar[4].str) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[12].token)) - - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 369: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1912 - { - yyVAL.str = yylex.(*lexer).PhpDocComment - yylex.(*lexer).PhpDocComment = "" - } - case 370: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1916 - { - yyVAL.boolWithToken = boolWithToken{false, nil} - } - case 371: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1917 + //line php5/php5.y:845 { - yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} } case 372: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:1921 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:854 { - yyVAL.list = []node.Node{} } case 373: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1922 + //line php5/php5.y:855 { - yyVAL.list = yyDollar[3].list } case 374: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:1926 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:856 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 375: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1927 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:857 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 376: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1932 + //line php5/php5.y:861 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = expr.NewClusureUse(variable, false) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 377: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1945 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:862 { - identifier := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[2].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = expr.NewClusureUse(variable, true) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) - - comments.AddComments(identifier, yyDollar[2].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 378: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1961 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:863 { - yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 379: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1967 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:864 { - yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 380: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:1973 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:865 { - yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 381: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:1979 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:866 { - yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 382: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1988 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:867 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 383: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1993 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:868 { - yyVAL.node = yyDollar[1].node } case 384: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1997 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:869 { - yyVAL.node = yyDollar[1].node } case 385: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:1998 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:870 { - yyVAL.node = yyDollar[1].node } case 386: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:2002 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:871 { - yyVAL.node = nil } case 387: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2003 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:872 { - yyVAL.node = yyDollar[2].node } case 388: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:2007 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:873 { - yyVAL.list = []node.Node{} } case 389: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2008 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:874 { - yyVAL.list = []node.Node{scalar.NewEncapsedStringPart(yyDollar[1].token.Value)} } case 390: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2009 + //line php5/php5.y:875 { - yyVAL.list = yyDollar[1].list } case 391: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:2013 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:876 { - yyVAL.nodesWithEndToken = nil } case 392: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2014 + //line php5/php5.y:880 { - yyVAL.nodesWithEndToken = yyDollar[1].nodesWithEndToken } case 393: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2019 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:881 { - yyVAL.node = expr.NewArray(yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 394: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2025 + //line php5/php5.y:882 { - yyVAL.node = expr.NewShortArray(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 395: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2031 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:883 { - yyVAL.node = scalar.NewString(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 396: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2040 + //line php5/php5.y:887 { - yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 397: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2046 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:888 { - yyVAL.node = scalar.NewDnumber(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 398: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2052 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:889 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 399: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2058 + //line php5/php5.y:895 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 400: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2064 + //line php5/php5.y:896 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 401: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2070 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:901 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 402: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2076 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:902 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 403: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2082 + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:903 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 404: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2088 + //line php5/php5.y:904 { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 405: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2094 - { - yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) - } - case 406: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2100 - { - yyVAL.node = scalar.NewString(yyDollar[2].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) /* TODO: mark as Heredoc*/ - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 407: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2105 + //line php5/php5.y:915 { - yyVAL.node = scalar.NewEncapsed(nil) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 408: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2111 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:919 { - yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 409: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2117 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:920 { - yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 410: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2122 + //line php5/php5.y:921 { - yyVAL.node = yyDollar[1].node } case 411: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2123 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:925 { - yyVAL.node = yyDollar[1].node } case 412: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2128 + //line php5/php5.y:926 { - yyVAL.node = expr.NewConstFetch(yyDollar[1].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 413: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2134 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:927 { - target := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) - - comments.AddComments(target, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 414: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2144 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:932 { - target := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) - - comments.AddComments(target, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 415: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2156 + //line php5/php5.y:933 { - yyVAL.node = yyDollar[1].node } case 416: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2157 + //line php5/php5.y:938 { - yyVAL.node = yyDollar[1].node } case 417: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:2161 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:939 { - yyVAL.node = nil } case 418: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2162 + //line php5/php5.y:940 { - yyVAL.node = yyDollar[1].node } case 419: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2166 + //line php5/php5.y:941 { - yyVAL.node = yyDollar[1].node } case 420: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2170 + //line php5/php5.y:942 { - yyVAL.node = yyDollar[1].node } case 421: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2171 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:943 { - yyVAL.node = yyDollar[2].node } case 422: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2172 + //line php5/php5.y:944 { - yyVAL.node = yyDollar[1].node } case 423: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2176 + //line php5/php5.y:945 { - yyVAL.node = yyDollar[1].node } case 424: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2177 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:946 { - yyVAL.node = yyDollar[2].node } case 425: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2178 + //line php5/php5.y:947 { - yyVAL.node = yyDollar[1].node } case 426: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2182 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:948 { - yyVAL.node = yyDollar[1].node } case 427: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2184 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:949 { - yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 428: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2190 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:953 { - yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 429: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2196 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:957 { - yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 430: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2202 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:961 { - yyVAL.node = expr.NewMethodCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 431: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2207 + //line php5/php5.y:962 { - yyVAL.node = yyDollar[1].node } case 432: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2211 + //line php5/php5.y:963 { - yyVAL.node = yyDollar[1].node } case 433: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2212 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:964 { - yyVAL.node = yyDollar[1].node } case 434: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2214 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:965 { - yyVAL.node = expr.NewPropertyFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 435: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2223 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:966 { - name := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = expr.NewVariable(name) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(name, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 436: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2233 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:967 { - yyVAL.node = expr.NewVariable(yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 437: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2239 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:968 { - yyVAL.node = expr.NewVariable(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 438: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2248 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:969 { - yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 439: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2254 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:970 { - yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 440: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2262 + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:974 { - yyVAL.node = yyDollar[1].node } case 441: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2264 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:975 { - yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 442: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2270 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:976 { - yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 443: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2276 + //line php5/php5.y:977 { - yyVAL.node = expr.NewPropertyFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 444: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2282 + //line php5/php5.y:978 { - yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 445: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2288 + //line php5/php5.y:979 { - yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 446: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2297 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:980 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 447: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2302 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:981 { - yyVAL.node = yyDollar[2].node } case 448: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2303 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:982 { - yyVAL.node = yyDollar[1].node } case 449: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2308 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:983 { - yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 450: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2313 + //line php5/php5.y:984 { - yyVAL.node = yyDollar[2].node } case 451: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2314 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:985 { - yyVAL.node = yyDollar[1].node } case 452: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2319 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:986 { - if yyDollar[1].list[len(yyDollar[1].list)-1] == nil { - yyVAL.list = yyDollar[1].list[:len(yyDollar[1].list)-1] - } else { - yyVAL.list = yyDollar[1].list - } } case 453: - yyDollar = yyS[yypt-0 : yypt+1] - //line php5/php5.y:2329 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:987 { - yyVAL.node = nil } case 454: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2330 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:988 { - yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2335 + //line php5/php5.y:989 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 456: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2336 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:990 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 457: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2341 + //line php5/php5.y:991 { - yyVAL.node = expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node, false) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 458: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2347 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:992 { - yyVAL.node = expr.NewArrayItem(nil, yyDollar[1].node, false) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 459: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2353 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:993 { - yyVAL.node = expr.NewArrayItem(yyDollar[1].node, yyDollar[4].node, true) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 460: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2359 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:994 { - yyVAL.node = expr.NewArrayItem(nil, yyDollar[2].node, true) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 461: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:2365 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:995 { - // TODO: Cannot use list() as standalone expression - list := expr.NewList(yyDollar[5].list) - positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[3].token, yyDollar[6].token)) - yyVAL.node = expr.NewArrayItem(yyDollar[1].node, list, false) - positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[6].token)) - - comments.AddComments(list, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 462: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2376 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:996 { - // TODO: Cannot use list() as standalone expression - list := expr.NewList(yyDollar[3].list) - positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - yyVAL.node = expr.NewArrayItem(nil, list, false) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - - comments.AddComments(list, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 463: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2389 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:997 { - yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 464: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2391 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:998 { - encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) - positions.AddPosition(encapsed, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.list = append(yyDollar[1].list, encapsed) - comments.AddComments(encapsed, yyDollar[2].token.Comments()) } case 465: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2397 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:999 { - yyVAL.list = []node.Node{yyDollar[1].node} } case 466: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2399 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1000 { - encapsed := scalar.NewEncapsedStringPart(yyDollar[1].token.Value) - positions.AddPosition(encapsed, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.list = []node.Node{encapsed, yyDollar[2].node} - comments.AddComments(encapsed, yyDollar[1].token.Comments()) } case 467: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2409 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1001 { - name := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = expr.NewVariable(name) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(name, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 468: yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2419 + //line php5/php5.y:1002 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = expr.NewArrayDimFetch(variable, yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 469: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2432 + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1003 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) - fetch := node.NewIdentifier(yyDollar[3].token.Value) - positions.AddPosition(fetch, positionBuilder.NewTokenPosition(yyDollar[3].token)) - yyVAL.node = expr.NewPropertyFetch(variable, fetch) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(fetch, yyDollar[3].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 470: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2448 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1004 { - yyVAL.node = expr.NewVariable(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 471: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2454 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1005 { - name := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = expr.NewVariable(name) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) - - comments.AddComments(name, yyDollar[2].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 472: - yyDollar = yyS[yypt-6 : yypt+1] - //line php5/php5.y:2464 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1006 { - identifier := node.NewIdentifier(yyDollar[2].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[2].token)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[2].token)) - yyVAL.node = expr.NewArrayDimFetch(variable, yyDollar[4].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) - - comments.AddComments(identifier, yyDollar[2].token.Comments()) - comments.AddComments(variable, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 473: - yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2477 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1010 { - yyVAL.node = yyDollar[2].node } case 474: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2481 + //line php5/php5.y:1011 { - yyVAL.node = scalar.NewString(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 475: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2487 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1012 { - // TODO: add option to handle 64 bit integer - if _, err := strconv.Atoi(yyDollar[1].token.Value); err == nil { - yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - } else { - yyVAL.node = scalar.NewString(yyDollar[1].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - } - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 476: yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2499 + //line php5/php5.y:1013 { - // TODO: add option to handle 64 bit integer - if _, err := strconv.Atoi(yyDollar[2].token.Value); err == nil { - lnumber := scalar.NewLnumber(yyDollar[2].token.Value) - positions.AddPosition(lnumber, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) - yyVAL.node = expr.NewUnaryMinus(lnumber) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) - - comments.AddComments(lnumber, yyDollar[1].token.Comments()) - } else { - yyDollar[2].token.Value = "-" + yyDollar[2].token.Value - yyVAL.node = scalar.NewString(yyDollar[2].token.Value) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) - } - - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 477: yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2517 + //line php5/php5.y:1017 { - identifier := node.NewIdentifier(yyDollar[1].token.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) - yyVAL.node = expr.NewVariable(identifier) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) - - comments.AddComments(identifier, yyDollar[1].token.Comments()) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 478: - yyDollar = yyS[yypt-5 : yypt+1] - //line php5/php5.y:2530 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1018 { - yyVAL.node = expr.NewIsset(yyDollar[3].list) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 479: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2536 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1019 { - yyVAL.node = expr.NewEmpty(yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 480: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2542 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1020 { - yyVAL.node = expr.NewInclude(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 481: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2548 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1021 { - yyVAL.node = expr.NewIncludeOnce(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 482: - yyDollar = yyS[yypt-4 : yypt+1] - //line php5/php5.y:2554 + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1022 { - yyVAL.node = expr.NewEval(yyDollar[3].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 483: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2560 + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1023 { - yyVAL.node = expr.NewRequire(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 484: - yyDollar = yyS[yypt-2 : yypt+1] - //line php5/php5.y:2566 + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1027 { - yyVAL.node = expr.NewRequireOnce(yyDollar[2].node) - positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) - comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 485: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2574 + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1028 { - yyVAL.list = []node.Node{yyDollar[1].node} } - case 486: + case 488: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1037 + { + } + case 489: yyDollar = yyS[yypt-3 : yypt+1] - //line php5/php5.y:2575 + //line php5/php5.y:1038 { - yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } - case 487: - yyDollar = yyS[yypt-1 : yypt+1] - //line php5/php5.y:2579 + case 490: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1039 + { + } + case 491: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1040 + { + } + case 492: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1044 + { + } + case 493: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1045 + { + } + case 494: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1049 + { + } + case 495: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1050 + { + } + case 496: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1055 + { + } + case 497: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1060 + { + } + case 498: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1064 + { + } + case 499: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1068 + { + } + case 500: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1069 + { + } + case 501: + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:1070 + { + } + case 502: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1071 + { + } + case 503: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1075 + { + } + case 504: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1076 + { + } + case 505: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1081 + { + } + case 506: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1081 + { + } + case 507: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1085 + { + } + case 508: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1086 + { + } + case 509: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1090 + { + } + case 510: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1091 + { + } + case 511: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1095 + { + } + case 512: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1096 + { + } + case 513: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1097 + { + } + case 514: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1101 + { + } + case 515: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1102 + { + } + case 516: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1106 + { + } + case 517: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1107 + { + } + case 518: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1112 + { + } + case 519: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1116 + { + } + case 520: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1117 + { + } + case 521: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1118 + { + } + case 522: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1122 + { + } + case 523: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1123 + { + } + case 524: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1124 + { + } + case 525: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1129 + { + } + case 526: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1130 + { + } + case 527: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1131 + { + } + case 528: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1135 + { + } + case 529: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1136 + { + } + case 530: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1137 + { + } + case 531: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1142 + { + } + case 532: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1143 + { + } + case 533: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1147 + { + } + case 534: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1148 + { + } + case 535: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1153 + { + } + case 536: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1154 + { + } + case 537: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1158 + { + } + case 538: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1159 + { + } + case 539: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1160 + { + } + case 540: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1164 + { + } + case 541: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1165 + { + } + case 542: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1169 + { + } + case 543: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1170 + { + } + case 546: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1180 + { + } + case 547: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1181 + { + } + case 548: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1181 + { + } + case 549: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1182 + { + } + case 550: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1187 + { + } + case 551: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1188 + { + } + case 552: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1192 + { + } + case 553: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1193 + { + } + case 554: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1194 + { + } + case 555: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1195 + { + } + case 556: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:1196 + { + } + case 557: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1197 + { + } + case 558: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1198 + { + } + case 559: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1199 + { + } + case 560: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1203 + { + } + case 561: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1204 + { + } + case 562: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1205 + { + } + case 563: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1206 + { + } + case 564: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1212 + { + } + case 565: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1213 + { + } + case 566: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1213 + { + } + case 567: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1214 + { + } + case 568: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1215 + { + } + case 569: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:1216 + { + } + case 570: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1217 + { + } + case 571: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1222 + { + } + case 572: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1223 + { + } + case 573: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1224 + { + } + case 574: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1229 + { + } + case 575: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1230 + { + } + case 576: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1231 + { + } + case 577: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1232 + { + } + case 578: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1233 + { + } + case 579: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1234 + { + } + case 580: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1235 + { + } + case 581: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1236 + { + } + case 582: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1240 + { + } + case 583: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1241 + { + } + case 584: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1241 + { + } + case 585: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1245 + { + } + case 586: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1246 + { + } + case 587: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1250 + { + } + case 588: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1251 + { + } + case 589: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1255 + { + } + case 590: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1259 { - yyVAL.node = yyDollar[1].node } } goto yystack /* stack new state and value */ diff --git a/php5/php5.y b/php5/php5.y index 51fe9cd..a6335f2 100644 --- a/php5/php5.y +++ b/php5/php5.y @@ -2,30 +2,24 @@ package php5 import ( - "strings" - "strconv" +// "strings" +// "strconv" "github.com/z7zmey/php-parser/token" - "github.com/z7zmey/php-parser/node" - "github.com/z7zmey/php-parser/node/scalar" - "github.com/z7zmey/php-parser/node/name" - "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/node/expr" - "github.com/z7zmey/php-parser/node/expr/assign_op" - "github.com/z7zmey/php-parser/node/expr/binary_op" - "github.com/z7zmey/php-parser/node/expr/cast" +// "github.com/z7zmey/php-parser/node" +// "github.com/z7zmey/php-parser/node/scalar" +// "github.com/z7zmey/php-parser/node/name" +// "github.com/z7zmey/php-parser/node/stmt" +// "github.com/z7zmey/php-parser/node/expr" +// "github.com/z7zmey/php-parser/node/expr/assign_op" +// "github.com/z7zmey/php-parser/node/expr/binary_op" +// "github.com/z7zmey/php-parser/node/expr/cast" ) %} %union{ - node node.Node token token.Token - boolWithToken boolWithToken - list []node.Node - foreachVariable foreachVariable - nodesWithEndToken *nodesWithEndToken - str string } %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE @@ -35,17 +29,14 @@ import ( %left T_LOGICAL_AND %right T_PRINT %right T_YIELD -%right T_DOUBLE_ARROW -%right T_YIELD_FROM %left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL %left '?' ':' -%right T_COALESCE %left T_BOOLEAN_OR -%left T_BOOLEAN_AND +%left T_BOOLEAN_AND %left '|' %left '^' %left '&' -%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP +%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL %nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL %left T_SL T_SR %left '+' '-' '.' @@ -56,10 +47,9 @@ import ( %right T_POW %right '[' %nonassoc T_NEW T_CLONE -%left T_NOELSE %left T_ELSEIF -%left T_ELSE -%left T_ENDIF +%left T_ELSE +%left T_ENDIF %right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC %type $unk @@ -192,2394 +182,1081 @@ import ( %token '@' %token '$' -%type is_reference is_variadic returns_ref - -%type reserved_non_modifiers -%type semi_reserved -%type identifier - -%type top_statement name statement function_declaration_statement -%type class_declaration_statement trait_declaration_statement -%type interface_declaration_statement -%type group_use_declaration inline_use_declaration -%type mixed_group_use_declaration use_declaration unprefixed_use_declaration -%type const_decl inner_statement -%type expr optional_expr while_statement for_statement -%type foreach_statement declare_statement finally_statement unset_variable variable -%type extends_from parameter optional_type argument expr_without_variable global_var -%type static_var class_statement trait_adaptation trait_precedence trait_alias -%type absolute_trait_method_reference trait_method_reference property echo_expr -%type new_expr anonymous_class class_name class_name_reference simple_variable -%type internal_functions_in_yacc -%type exit_expr scalar lexical_var function_call member_name property_name -%type variable_class_name dereferencable_scalar constant dereferencable -%type callable_expr callable_variable static_member new_variable -%type encaps_var encaps_var_offset -%type if_stmt -%type alt_if_stmt -%type if_stmt_without_else -%type class_const_decl -%type alt_if_stmt_without_else -%type array_pair possible_array_pair -%type isset_variable type return_type type_expr -%type class_modifier - -%type member_modifier -%type use_type -%type foreach_variable - -%type method_body switch_case_list trait_adaptations argument_list ctor_arguments - -%type encaps_list backticks_expr namespace_name catch_name_list catch_list class_const_list -%type const_list echo_expr_list for_exprs non_empty_for_exprs global_var_list -%type unprefixed_use_declarations inline_use_declarations property_list static_var_list -%type case_list trait_adaptation_list unset_variables -%type use_declarations lexical_var_list lexical_vars isset_variables non_empty_array_pair_list -%type array_pair_list non_empty_argument_list top_statement_list -%type inner_statement_list parameter_list non_empty_parameter_list class_statement_list -%type interface_extends_list implements_list method_modifiers variable_modifiers -%type non_empty_member_modifiers name_list class_modifiers - -%type backup_doc_comment - %% -///////////////////////////////////////////////////////////////////////// - start: - top_statement_list - { - rootnode = stmt.NewStmtList($1) - positions.AddPosition(rootnode, positionBuilder.NewNodeListPosition($1)) - } -; - -reserved_non_modifiers: - T_INCLUDE {$$=$1} | T_INCLUDE_ONCE {$$=$1} | T_EVAL {$$=$1} | T_REQUIRE {$$=$1} | T_REQUIRE_ONCE {$$=$1} | T_LOGICAL_OR {$$=$1} | T_LOGICAL_XOR {$$=$1} | T_LOGICAL_AND {$$=$1} - | T_INSTANCEOF {$$=$1} | T_NEW {$$=$1} | T_CLONE {$$=$1} | T_EXIT {$$=$1} | T_IF {$$=$1} | T_ELSEIF {$$=$1} | T_ELSE {$$=$1} | T_ENDIF {$$=$1} | T_ECHO {$$=$1} | T_DO {$$=$1} | T_WHILE {$$=$1} | T_ENDWHILE {$$=$1} - | T_FOR {$$=$1} | T_ENDFOR {$$=$1} | T_FOREACH {$$=$1} | T_ENDFOREACH {$$=$1} | T_DECLARE {$$=$1} | T_ENDDECLARE {$$=$1} | T_AS {$$=$1} | T_TRY {$$=$1} | T_CATCH {$$=$1} | T_FINALLY {$$=$1} - | T_THROW {$$=$1} | T_USE {$$=$1} | T_INSTEADOF {$$=$1} | T_GLOBAL {$$=$1} | T_VAR {$$=$1} | T_UNSET {$$=$1} | T_ISSET {$$=$1} | T_EMPTY {$$=$1} | T_CONTINUE {$$=$1} | T_GOTO {$$=$1} - | T_FUNCTION {$$=$1} | T_CONST {$$=$1} | T_RETURN {$$=$1} | T_PRINT {$$=$1} | T_YIELD {$$=$1} | T_LIST {$$=$1} | T_SWITCH {$$=$1} | T_ENDSWITCH {$$=$1} | T_CASE {$$=$1} | T_DEFAULT {$$=$1} | T_BREAK {$$=$1} - | T_ARRAY {$$=$1} | T_CALLABLE {$$=$1} | T_EXTENDS {$$=$1} | T_IMPLEMENTS {$$=$1} | T_NAMESPACE {$$=$1} | T_TRAIT {$$=$1} | T_INTERFACE {$$=$1} | T_CLASS {$$=$1} - | T_CLASS_C {$$=$1} | T_TRAIT_C {$$=$1} | T_FUNC_C {$$=$1} | T_METHOD_C {$$=$1} | T_LINE {$$=$1} | T_FILE {$$=$1} | T_DIR {$$=$1} | T_NS_C {$$=$1} -; - -semi_reserved: - reserved_non_modifiers {$$=$1} - | T_STATIC {$$=$1} | T_ABSTRACT {$$=$1} | T_FINAL {$$=$1} | T_PRIVATE {$$=$1} | T_PROTECTED {$$=$1} | T_PUBLIC {$$=$1} -; - -identifier: - T_STRING { $$ = $1 } - | semi_reserved { $$ = $1 } + top_statement_list { } ; top_statement_list: - top_statement_list top_statement { $$ = append($1, $2) } - | /* empty */ { $$ = []node.Node{} } + top_statement_list { } + | /* empty */ ; namespace_name: - T_STRING - { - namePart := name.NewNamePart($1.Value) - positions.AddPosition(namePart, positionBuilder.NewTokenPosition($1)) - $$ = []node.Node{namePart} - comments.AddComments(namePart, $1.Comments()) - } - | namespace_name T_NS_SEPARATOR T_STRING - { - namePart := name.NewNamePart($3.Value) - positions.AddPosition(namePart, positionBuilder.NewTokenPosition($3)) - $$ = append($1, namePart) - comments.AddComments(namePart, $3.Comments()) - } -; - -name: - namespace_name - { - $$ = name.NewName($1) - positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | T_NAMESPACE T_NS_SEPARATOR namespace_name - { - $$ = name.NewRelative($3) - positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_NS_SEPARATOR namespace_name - { - $$ = name.NewFullyQualified($2) - positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } + T_STRING { } + | namespace_name T_NS_SEPARATOR T_STRING { } ; top_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | trait_declaration_statement { $$ = $1; } - | interface_declaration_statement { $$ = $1; } - | T_HALT_COMPILER '(' ')' ';' { $$ = stmt.NewHaltCompiler() } - | T_NAMESPACE namespace_name ';' - { - name := name.NewName($2) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) - $$ = stmt.NewNamespace(name, nil) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - - comments.AddComments(name, ListGetFirstNodeComments($2)) - comments.AddComments($$, $1.Comments()) - } - | T_NAMESPACE namespace_name '{' top_statement_list '}' - { - name := name.NewName($2) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) - $$ = stmt.NewNamespace(name, $4) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $5)) - - comments.AddComments(name, ListGetFirstNodeComments($2)) - comments.AddComments($$, $1.Comments()) - } - | T_NAMESPACE '{' top_statement_list '}' - { - $$ = stmt.NewNamespace(nil, $3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } - | T_USE mixed_group_use_declaration ';' { $$ = $2 } - | T_USE use_type group_use_declaration ';' { $$ = $3.(*stmt.GroupUse).SetUseType($2) } - | T_USE use_declarations ';' - { - $$ = stmt.NewUseList(nil, $2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_USE use_type use_declarations ';' { $$ = stmt.NewUseList($2, $3) } - | T_CONST const_list ';' - { - $$ = stmt.NewConstList($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } -; - -use_type: - T_FUNCTION - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_CONST - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } -; - -group_use_declaration: - namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations possible_comma '}' - { - name := name.NewName($1) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) - $$ = stmt.NewGroupUse(nil, name, $4) - positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $6)) - - comments.AddComments(name, ListGetFirstNodeComments($1)) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | T_NS_SEPARATOR namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations possible_comma '}' - { - name := name.NewName($2) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) - $$ = stmt.NewGroupUse(nil, name, $5) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $7)) - - comments.AddComments(name, ListGetFirstNodeComments($2)) - comments.AddComments($$, $1.Comments()) - } -; - -mixed_group_use_declaration: - namespace_name T_NS_SEPARATOR '{' inline_use_declarations possible_comma '}' - { - name := name.NewName($1) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) - $$ = stmt.NewGroupUse(nil, name, $4) - positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $6)) - - comments.AddComments(name, ListGetFirstNodeComments($1)) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | T_NS_SEPARATOR namespace_name T_NS_SEPARATOR '{' inline_use_declarations possible_comma '}' - { - name := name.NewName($2) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) - $$ = stmt.NewGroupUse(nil, name, $5) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $7)) - - comments.AddComments(name, ListGetFirstNodeComments($2)) - comments.AddComments($$, $1.Comments()) - } -; - -possible_comma: - /* empty */ - | ',' -; - -inline_use_declarations: - inline_use_declarations ',' inline_use_declaration - { $$ = append($1, $3) } - | inline_use_declaration { $$ = []node.Node{$1} } -; - -unprefixed_use_declarations: - unprefixed_use_declarations ',' unprefixed_use_declaration - { $$ = append($1, $3) } - | unprefixed_use_declaration { $$ = []node.Node{$1} } + statement { } + | function_declaration_statement { } + | class_declaration_statement { } + | T_HALT_COMPILER '(' ')' ';' { } + | T_NAMESPACE namespace_name ';' { } + | T_NAMESPACE namespace_name '{' { } + top_statement_list '}' { } + | T_NAMESPACE '{' { } + top_statement_list '}' { } + | T_USE use_declarations ';' { } + | T_USE T_FUNCTION use_function_declarations ';' { } + | T_USE T_CONST use_const_declarations ';' { } + | constant_declaration ';' { } ; use_declarations: - use_declarations ',' use_declaration { $$ = append($1, $3) } - | use_declaration { $$ = []node.Node{$1} } -; - -inline_use_declaration: - unprefixed_use_declaration { $$ = $1; } - | use_type unprefixed_use_declaration { $$ = $2.(*stmt.Use).SetUseType($1) } -; - -unprefixed_use_declaration: - namespace_name - { - name := name.NewName($1) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) - $$ = stmt.NewUse(nil, name, nil) - positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) - - comments.AddComments(name, ListGetFirstNodeComments($1)) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | namespace_name T_AS T_STRING - { - name := name.NewName($1) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) - alias := node.NewIdentifier($3.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition($3)) - $$ = stmt.NewUse(nil, name, alias) - positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $3)) - - comments.AddComments(name, ListGetFirstNodeComments($1)) - comments.AddComments(alias, $3.Comments()) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } + use_declarations ',' use_declaration + | use_declaration ; use_declaration: - unprefixed_use_declaration { $$ = $1; } - | T_NS_SEPARATOR unprefixed_use_declaration { $$ = $2; } + namespace_name { } + | namespace_name T_AS T_STRING { } + | T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name T_AS T_STRING { } ; -const_list: - const_list ',' const_decl { $$ = append($1, $3) } - | const_decl { $$ = []node.Node{$1} } +use_function_declarations: + use_function_declarations ',' use_function_declaration + | use_function_declaration +; + +use_function_declaration: + namespace_name { } + | namespace_name T_AS T_STRING { } + | T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name T_AS T_STRING { } +; + +use_const_declarations: + use_const_declarations ',' use_const_declaration + | use_const_declaration +; + +use_const_declaration: + namespace_name { } + | namespace_name T_AS T_STRING { } + | T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name T_AS T_STRING { } +; + +constant_declaration: + constant_declaration ',' T_STRING '=' static_scalar { } + | T_CONST T_STRING '=' static_scalar { } ; inner_statement_list: - inner_statement_list inner_statement { $$ = append($1, $2) } - | /* empty */ { $$ = []node.Node{} } + inner_statement_list { } + | /* empty */ ; + inner_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | trait_declaration_statement { $$ = $1; } - | interface_declaration_statement { $$ = $1; } - | T_HALT_COMPILER '(' ')' ';' - { - $$ = stmt.NewHaltCompiler() - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } + statement + | function_declaration_statement + | class_declaration_statement + | T_HALT_COMPILER '(' ')' ';' { } +; + statement: - '{' inner_statement_list '}' - { - $$ = stmt.NewStmtList($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | if_stmt { $$ = $1; } - | alt_if_stmt { $$ = $1; } - | T_WHILE '(' expr ')' while_statement - { - $$ = stmt.NewWhile($1, $3, $5) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) - comments.AddComments($$, $1.Comments()) - } - | T_DO statement T_WHILE '(' expr ')' ';' - { - $$ = stmt.NewDo($2, $5) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $7)) - comments.AddComments($$, $1.Comments()) - } - | T_FOR '(' for_exprs ';' for_exprs ';' for_exprs ')' for_statement - { - $$ = stmt.NewFor($3, $5, $7, $9) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $9)) - comments.AddComments($$, $1.Comments()) - } - | T_SWITCH '(' expr ')' switch_case_list - { - $$ = stmt.NewSwitch($1, $3, $5.nodes) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $5.endToken)) - comments.AddComments($$, $1.Comments()) - } - | T_BREAK optional_expr ';' - { - $$ = stmt.NewBreak($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_CONTINUE optional_expr ';' - { - $$ = stmt.NewContinue($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_RETURN optional_expr ';' - { - $$ = stmt.NewReturn($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_GLOBAL global_var_list ';' - { - $$ = stmt.NewGlobal($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_STATIC static_var_list ';' - { - $$ = stmt.NewStatic($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_ECHO echo_expr_list ';' - { - $$ = stmt.NewEcho($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_INLINE_HTML - { - $$ = stmt.NewInlineHtml($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | expr ';' - { - $$ = stmt.NewExpression($1) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2)) - comments.AddComments($$, comments[$1]) - } - | T_UNSET '(' unset_variables possible_comma ')' ';' - { - $$ = stmt.NewUnset($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $6)) - comments.AddComments($$, $1.Comments()) - } - | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement - { - $$ = stmt.NewForeach($3, nil, $5.node, $7, $5.byRef) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $7)) - comments.AddComments($$, $1.Comments()) - } - | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement - { - $$ = stmt.NewForeach($3, $5, $7.node, $9, $7.byRef) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $9)) - comments.AddComments($$, $1.Comments()) - } - | T_DECLARE '(' const_list ')' declare_statement - { - $$ = stmt.NewDeclare($3, $5) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) - comments.AddComments($$, $1.Comments()) - } - | ';' - { - $$ = stmt.NewNop() - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_TRY '{' inner_statement_list '}' catch_list finally_statement - { - if $6 == nil { - $$ = stmt.NewTry($3, $5, $6) - positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $5)) - } else { - $$ = stmt.NewTry($3, $5, $6) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $6)) - } - - comments.AddComments($$, $1.Comments()) - } - | T_THROW expr ';' - { - $$ = stmt.NewThrow($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_GOTO T_STRING ';' - { - label := node.NewIdentifier($2.Value) - positions.AddPosition(label, positionBuilder.NewTokenPosition($2)) - $$ = stmt.NewGoto(label) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - - comments.AddComments(label, $2.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_STRING ':' - { - label := node.NewIdentifier($1.Value) - positions.AddPosition(label, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewLabel(label) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) - - comments.AddComments(label, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - -catch_list: - /* empty */ { $$ = []node.Node{} } - | catch_list T_CATCH '(' catch_name_list T_VARIABLE ')' '{' inner_statement_list '}' - { - identifier := node.NewIdentifier($5.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($5)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($5)) - catch := stmt.NewCatch($4, variable, $8) - positions.AddPosition(catch, positionBuilder.NewTokensPosition($2, $9)) - $$ = append($1, catch) - - comments.AddComments(identifier, $5.Comments()) - comments.AddComments(variable, $5.Comments()) - comments.AddComments(catch, $2.Comments()) - } + unticked_statement { } + | T_STRING ':' { } ; -catch_name_list: - name { $$ = []node.Node{$1} } - | catch_name_list '|' name { $$ = append($1, $3) } + +unticked_statement: + '{' inner_statement_list '}' + | T_IF parenthesis_expr { } statement { } elseif_list else_single { } + | T_IF parenthesis_expr ':' { } inner_statement_list { } new_elseif_list new_else_single T_ENDIF ';' { } + | T_WHILE { } parenthesis_expr { } while_statement { } + | T_DO { } statement T_WHILE { } parenthesis_expr ';' { } + | T_FOR + '(' + for_expr + ';' { } + for_expr + ';' { } + for_expr + ')' { } + for_statement { } + | T_SWITCH parenthesis_expr { } switch_case_list { } + | T_BREAK ';' { } + | T_BREAK expr ';' { } + | T_CONTINUE ';' { } + | T_CONTINUE expr ';' { } + | T_RETURN ';' { } + | T_RETURN expr_without_variable ';' { } + | T_RETURN variable ';' { } + | yield_expr ';' { } + | T_GLOBAL global_var_list ';' + | T_STATIC static_var_list ';' + | T_ECHO echo_expr_list ';' + | T_INLINE_HTML { } + | expr ';' { } + | T_UNSET '(' unset_variables ')' ';' + | T_FOREACH '(' variable T_AS + { } + foreach_variable foreach_optional_arg ')' { } + foreach_statement { } + | T_FOREACH '(' expr_without_variable T_AS + { } + foreach_variable foreach_optional_arg ')' { } + foreach_statement { } + | T_DECLARE { } '(' declare_list ')' declare_statement { } + | ';' /* empty statement */ + | T_TRY { } '{' inner_statement_list '}' + catch_statement { } + finally_statement { } + | T_THROW expr ';' { } + | T_GOTO T_STRING ';' { } ; +catch_statement: + /* empty */ { } + | T_CATCH '(' { } + fully_qualified_class_name { } + T_VARIABLE ')' { } + '{' inner_statement_list '}' { } + additional_catches { } + finally_statement: - /* empty */ { $$ = nil } - | T_FINALLY '{' inner_statement_list '}' - { - $$ = stmt.NewFinally($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } + /* empty */ { } + | T_FINALLY { } '{' inner_statement_list '}' { } +; + +additional_catches: + non_empty_additional_catches { } + | /* empty */ { } +; + +non_empty_additional_catches: + additional_catch { } + | non_empty_additional_catches additional_catch { } +; + +additional_catch: + T_CATCH '(' fully_qualified_class_name { } T_VARIABLE ')' { } '{' inner_statement_list '}' { } ; unset_variables: - unset_variable { $$ = []node.Node{$1} } - | unset_variables ',' unset_variable { $$ = append($1, $3) } + unset_variable + | unset_variables ',' unset_variable ; unset_variable: - variable { $$ = $1 } + variable { } ; function_declaration_statement: - T_FUNCTION returns_ref T_STRING backup_doc_comment '(' parameter_list ')' return_type '{' inner_statement_list '}' - { - name := node.NewIdentifier($3.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($3)) - $$ = stmt.NewFunction(name, $2.value, $6, $8, $10, $4) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $11)) - - comments.AddComments(name, $3.Comments()) - comments.AddComments($$, $1.Comments()) - } -; - -is_reference: - /* empty */ { $$ = boolWithToken{false, nil} } - | '&' { $$ = boolWithToken{true, &$1} } -; - -is_variadic: - /* empty */ { $$ = boolWithToken{false, nil} } - | T_ELLIPSIS { $$ = boolWithToken{true, &$1} } + unticked_function_declaration_statement { } ; class_declaration_statement: - class_modifiers T_CLASS T_STRING extends_from implements_list backup_doc_comment '{' class_statement_list '}' - { - name := node.NewIdentifier($3.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($3)) - $$ = stmt.NewClass(name, $1, nil, $4, $5, $8, $6) - positions.AddPosition($$, positionBuilder.NewOptionalListTokensPosition($1, $2, $9)) - - comments.AddComments(name, $3.Comments()) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | T_CLASS T_STRING extends_from implements_list backup_doc_comment '{' class_statement_list '}' - { - name := node.NewIdentifier($2.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) - $$ = stmt.NewClass(name, nil, nil, $3, $4, $7, $5) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $8)) - - comments.AddComments(name, $2.Comments()) - comments.AddComments($$, $1.Comments()) - } + unticked_class_declaration_statement { } ; -class_modifiers: - class_modifier { $$ = []node.Node{$1} } - | class_modifiers class_modifier { $$ = append($1, $2) } +is_reference: + /* empty */ { } + | '&' { } ; -class_modifier: - T_ABSTRACT - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_FINAL - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } +is_variadic: + /* empty */ { } + | T_ELLIPSIS { } ; -trait_declaration_statement: - T_TRAIT T_STRING backup_doc_comment '{' class_statement_list '}' - { - name := node.NewIdentifier($2.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) - $$ = stmt.NewTrait(name, $5, $3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $6)) - - comments.AddComments(name, $2.Comments()) - comments.AddComments($$, $1.Comments()) - } +unticked_function_declaration_statement: + function is_reference T_STRING { } + '(' parameter_list ')' + '{' inner_statement_list '}' { } ; -interface_declaration_statement: - T_INTERFACE T_STRING interface_extends_list backup_doc_comment '{' class_statement_list '}' - { - name := node.NewIdentifier($2.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) - $$ = stmt.NewInterface(name, $3, $6, $4) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $7)) - - comments.AddComments(name, $2.Comments()) - comments.AddComments($$, $1.Comments()) - } +unticked_class_declaration_statement: + class_entry_type T_STRING extends_from + { } + implements_list + '{' + class_statement_list + '}' { } + | interface_entry T_STRING + { } + interface_extends_list + '{' + class_statement_list + '}' { } +; + + +class_entry_type: + T_CLASS { } + | T_ABSTRACT T_CLASS { } + | T_TRAIT { } + | T_FINAL T_CLASS { } ; extends_from: - /* empty */ { $$ = nil } - | T_EXTENDS name { $$ = $2; } + /* empty */ { } + | T_EXTENDS fully_qualified_class_name { } +; + +interface_entry: + T_INTERFACE { } ; interface_extends_list: - /* empty */ { $$ = nil } - | T_EXTENDS name_list { $$ = $2 } + /* empty */ + | T_EXTENDS interface_list ; implements_list: - /* empty */ { $$ = nil } - | T_IMPLEMENTS name_list { $$ = $2 } + /* empty */ + | T_IMPLEMENTS interface_list +; + +interface_list: + fully_qualified_class_name { } + | interface_list ',' fully_qualified_class_name { } +; + +foreach_optional_arg: + /* empty */ { } + | T_DOUBLE_ARROW foreach_variable { } ; foreach_variable: - variable { $$ = foreachVariable{$1, false} } - | '&' variable { $$ = foreachVariable{$2, true} } - | T_LIST '(' array_pair_list ')' - { - list := expr.NewList($3) - positions.AddPosition(list, positionBuilder.NewTokensPosition($1, $4)) - $$ = foreachVariable{list, false} - comments.AddComments(list, $1.Comments()) - } - | '[' array_pair_list ']' - { - list := expr.NewShortList($2) - positions.AddPosition(list, positionBuilder.NewTokensPosition($1, $3)) - $$ = foreachVariable{list, false} - comments.AddComments(list, $1.Comments()) - } + variable { } + | '&' variable { } + | T_LIST '(' { } assignment_list ')' { } ; for_statement: - statement { $$ = $1; } - | ':' inner_statement_list T_ENDFOR ';' - { - $$ = stmt.NewStmtList($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } + statement + | ':' inner_statement_list T_ENDFOR ';' ; + foreach_statement: - statement { $$ = $1; } - | ':' inner_statement_list T_ENDFOREACH ';' - { - $$ = stmt.NewStmtList($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } + statement + | ':' inner_statement_list T_ENDFOREACH ';' ; + declare_statement: - statement { $$ = $1; } - | ':' inner_statement_list T_ENDDECLARE ';' - { - $$ = stmt.NewStmtList($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } + statement + | ':' inner_statement_list T_ENDDECLARE ';' ; + +declare_list: + T_STRING '=' static_scalar { } + | declare_list ',' T_STRING '=' static_scalar { } +; + + switch_case_list: - '{' case_list '}' { $$ = &nodesWithEndToken{$2, $3} } - | '{' ';' case_list '}' { $$ = &nodesWithEndToken{$3, $4} } - | ':' case_list T_ENDSWITCH ';' { $$ = &nodesWithEndToken{$2, $4} } - | ':' ';' case_list T_ENDSWITCH ';' { $$ = &nodesWithEndToken{$3, $5} } + '{' case_list '}' { } + | '{' ';' case_list '}' { } + | ':' case_list T_ENDSWITCH ';' { } + | ':' ';' case_list T_ENDSWITCH ';' { } ; + case_list: - /* empty */ { $$ = []node.Node{} } - | case_list T_CASE expr case_separator inner_statement_list - { - _case := stmt.NewCase($3, $5) - positions.AddPosition(_case, positionBuilder.NewTokenNodeListPosition($2, $5)) - $$ = append($1, _case) - comments.AddComments(_case, $2.Comments()) - } - | case_list T_DEFAULT case_separator inner_statement_list - { - _default := stmt.NewDefault($4) - positions.AddPosition(_default, positionBuilder.NewTokenNodeListPosition($2, $4)) - $$ = append($1, _default) - comments.AddComments(_default, $2.Comments()) - } + /* empty */ { } + | case_list T_CASE expr case_separator { } inner_statement_list { } + | case_list T_DEFAULT case_separator { } inner_statement_list { } ; + case_separator: - ':' - | ';' + ':' + | ';' ; + while_statement: - statement { $$ = $1; } - | ':' inner_statement_list T_ENDWHILE ';' - { - $$ = stmt.NewStmtList($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } + statement + | ':' inner_statement_list T_ENDWHILE ';' ; -if_stmt_without_else: - T_IF '(' expr ')' statement - { - $$ = stmt.NewIf($3, $5) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) - comments.AddComments($$, $1.Comments()) - } - | if_stmt_without_else T_ELSEIF '(' expr ')' statement - { - _elseIf := stmt.NewElseIf($4, $6) - positions.AddPosition(_elseIf, positionBuilder.NewTokenNodePosition($2, $6)) - $$ = $1.(*stmt.If).AddElseIf(_elseIf) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $6)) - comments.AddComments(_elseIf, $2.Comments()) - } + +elseif_list: + /* empty */ + | elseif_list T_ELSEIF parenthesis_expr { } statement { } ; -if_stmt: - if_stmt_without_else %prec T_NOELSE { $$ = $1; } - | if_stmt_without_else T_ELSE statement - { - _else := stmt.NewElse($3) - positions.AddPosition(_else, positionBuilder.NewTokenNodePosition($2, $3)) - $$ = $1.(*stmt.If).SetElse(_else) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, $2.Comments()) - } +new_elseif_list: + /* empty */ + | new_elseif_list T_ELSEIF parenthesis_expr ':' { } inner_statement_list { } ; -alt_if_stmt_without_else: - T_IF '(' expr ')' ':' inner_statement_list - { - stmts := stmt.NewStmtList($6) - positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($6)) - $$ = stmt.NewAltIf($3, stmts) - positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $6)) - comments.AddComments(stmts, $5.Comments()) - comments.AddComments($$, $1.Comments()) - } - | alt_if_stmt_without_else T_ELSEIF '(' expr ')' ':' inner_statement_list - { - stmts := stmt.NewStmtList($7) - positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($7)) - _elseIf := stmt.NewAltElseIf($4, stmts) - positions.AddPosition(_elseIf, positionBuilder.NewTokenNodeListPosition($2, $7)) - $$ = $1.(*stmt.AltIf).AddElseIf(_elseIf) - - comments.AddComments(stmts, $6.Comments()) - comments.AddComments(_elseIf, $2.Comments()) - } +else_single: + /* empty */ + | T_ELSE statement ; -alt_if_stmt: - alt_if_stmt_without_else T_ENDIF ';' - { - $$ = $1 - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) - } - | alt_if_stmt_without_else T_ELSE ':' inner_statement_list T_ENDIF ';' - { - stmts := stmt.NewStmtList($4) - positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($4)) - _else := stmt.NewAltElse(stmts) - positions.AddPosition(_else, positionBuilder.NewTokenNodeListPosition($2, $4)) - $$ = $1.(*stmt.AltIf).SetElse(_else) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $6)) - comments.AddComments(stmts, $3.Comments()) - comments.AddComments(_else, $2.Comments()) - } +new_else_single: + /* empty */ + | T_ELSE ':' inner_statement_list ; + parameter_list: - non_empty_parameter_list { $$ = $1; } - | /* empty */ { $$ = nil } + non_empty_parameter_list + | /* empty */ ; + non_empty_parameter_list: - parameter { $$ = []node.Node{$1} } - | non_empty_parameter_list ',' parameter { $$ = append($1, $3) } + parameter + | non_empty_parameter_list ',' parameter ; parameter: - optional_type is_reference is_variadic T_VARIABLE - { - identifier := node.NewIdentifier($4.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) - - comments.AddComments($$, $4.Comments()) - comments.AddComments($$, $4.Comments()) - - if $1 != nil { - $$ = node.NewParameter($1, variable, nil, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } else if $2.value == true { - $$ = node.NewParameter($1, variable, nil, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewTokensPosition(*$2.token, $4)) - comments.AddComments($$, $2.token.Comments()) - } else if $3.value == true { - $$ = node.NewParameter($1, variable, nil, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewTokensPosition(*$3.token, $4)) - comments.AddComments($$, $3.token.Comments()) - } else { - $$ = node.NewParameter($1, variable, nil, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($4)) - comments.AddComments($$, $4.Comments()) - } - } - | optional_type is_reference is_variadic T_VARIABLE '=' expr - { - identifier := node.NewIdentifier($4.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) - - comments.AddComments($$, $4.Comments()) - comments.AddComments($$, $4.Comments()) - - if $1 != nil { - $$ = node.NewParameter($1, variable, $6, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $6)) - comments.AddComments($$, comments[$1]) - } else if $2.value == true { - $$ = node.NewParameter($1, variable, $6, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition(*$2.token, $6)) - comments.AddComments($$, $2.token.Comments()) - } else if $3.value == true { - $$ = node.NewParameter($1, variable, $6, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition(*$3.token, $6)) - comments.AddComments($$, $3.token.Comments()) - } else { - $$ = node.NewParameter($1, variable, $6, $2.value, $3.value) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($4, $6)) - comments.AddComments($$, $4.Comments()) - } - } + optional_class_type is_reference is_variadic T_VARIABLE + { } + | optional_class_type is_reference is_variadic T_VARIABLE '=' static_scalar + { } ; -optional_type: - /* empty */ { $$ = nil } - | type_expr { $$ = $1; } + +optional_class_type: + /* empty */ { } + | T_ARRAY { } + | T_CALLABLE { } + | fully_qualified_class_name { } ; -type_expr: - type { $$ = $1; } - | '?' type - { - $$ = node.NewNullable($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } + +function_call_parameter_list: + '(' ')' { } + | '(' non_empty_function_call_parameter_list ')' { } + | '(' yield_expr ')' { } ; -type: - T_ARRAY - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_CALLABLE - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | name { $$ = $1; } + +non_empty_function_call_parameter_list: + function_call_parameter + | non_empty_function_call_parameter_list ',' function_call_parameter ; -return_type: - /* empty */ { $$ = nil } - | ':' type_expr { $$ = $2; } -; - -argument_list: - '(' ')' { $$ = &nodesWithEndToken{[]node.Node{}, $2} } - | '(' non_empty_argument_list possible_comma ')' { $$ = &nodesWithEndToken{$2, $4} } -; - -non_empty_argument_list: - argument { $$ = []node.Node{$1} } - | non_empty_argument_list ',' argument { $$ = append($1, $3) } -; - -argument: - expr - { - $$ = node.NewArgument($1, false) - positions.AddPosition($$, positionBuilder.NewNodePosition($1)) - comments.AddComments($$, comments[$1]) - } - | T_ELLIPSIS expr - { - $$ = node.NewArgument($2, true) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } +function_call_parameter: + expr_without_variable { } + | variable { } + | '&' w_variable { } + | T_ELLIPSIS expr { } ; global_var_list: - global_var_list ',' global_var { $$ = append($1, $3); } - | global_var { $$ = []node.Node{$1} } + global_var_list ',' global_var { } + | global_var { } ; + global_var: - simple_variable { $$ = $1 } + T_VARIABLE { } + | '$' r_variable { } + | '$' '{' expr '}' { } ; + static_var_list: - static_var_list ',' static_var { $$ = append($1, $3) } - | static_var { $$ = []node.Node{$1} } + static_var_list ',' T_VARIABLE { } + | static_var_list ',' T_VARIABLE '=' static_scalar { } + | T_VARIABLE { } + | T_VARIABLE '=' static_scalar { } + ; -static_var: - T_VARIABLE - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewStaticVar(variable, nil) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_VARIABLE '=' expr - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewStaticVar(variable, $3) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $3)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } -; class_statement_list: - class_statement_list class_statement { $$ = append($1, $2) } - | /* empty */ { $$ = []node.Node{} } + class_statement_list class_statement + | /* empty */ ; + class_statement: - variable_modifiers property_list ';' - { - $$ = stmt.NewPropertyList($1, $2) - positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $3)) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | method_modifiers T_CONST class_const_list ';' - { - $$ = stmt.NewClassConstList($1, $3) - positions.AddPosition($$, positionBuilder.NewOptionalListTokensPosition($1, $2, $4)) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } - | T_USE name_list trait_adaptations - { - $$ = stmt.NewTraitUse($2, $3.nodes) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3.endToken)) - comments.AddComments($$, $1.Comments()) - } - | method_modifiers T_FUNCTION returns_ref identifier backup_doc_comment '(' parameter_list ')' return_type method_body - { - name := node.NewIdentifier($4.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($4)) - $$ = stmt.NewClassMethod(name, $1, $3.value, $7, $9, $10.nodes, $5) - positions.AddPosition($$, positionBuilder.NewOptionalListTokensPosition($1, $2, $10.endToken)) - - comments.AddComments(name, $4.Comments()) - comments.AddComments($$, ListGetFirstNodeComments($1)) - } + variable_modifiers { } class_variable_declaration ';' + | class_constant_declaration ';' + | trait_use_statement + | method_modifiers function is_reference T_STRING { } + '(' parameter_list ')' + method_body { } ; -name_list: - name { $$ = []node.Node{$1} } - | name_list ',' name { $$ = append($1, $3) } +trait_use_statement: + T_USE trait_list trait_adaptations +; + +trait_list: + fully_qualified_class_name { } + | trait_list ',' fully_qualified_class_name { } ; trait_adaptations: - ';' { $$ = &nodesWithEndToken{nil, $1} } - | '{' '}' { $$ = &nodesWithEndToken{nil, $2} } - | '{' trait_adaptation_list '}' { $$ = &nodesWithEndToken{$2, $3} } + ';' + | '{' trait_adaptation_list '}' ; trait_adaptation_list: - trait_adaptation { $$ = []node.Node{$1} } - | trait_adaptation_list trait_adaptation { $$ = append($1, $2) } + /* empty */ + | non_empty_trait_adaptation_list ; -trait_adaptation: - trait_precedence ';' { $$ = $1; } - | trait_alias ';' { $$ = $1; } +non_empty_trait_adaptation_list: + trait_adaptation_statement + | non_empty_trait_adaptation_list trait_adaptation_statement +; + +trait_adaptation_statement: + trait_precedence ';' + | trait_alias ';' ; trait_precedence: - absolute_trait_method_reference T_INSTEADOF name_list - { - name := name.NewName($3) - positions.AddPosition(name, positionBuilder.NewNodeListPosition($3)) - $$ = stmt.NewTraitUsePrecedence($1, name) - positions.AddPosition($$, positionBuilder.NewNodeNodeListPosition($1, $3)) - - comments.AddComments(name, ListGetFirstNodeComments($3)) - comments.AddComments($$, comments[$1]) - } + trait_method_reference_fully_qualified T_INSTEADOF trait_reference_list { } ; -trait_alias: - trait_method_reference T_AS T_STRING - { - alias := node.NewIdentifier($3.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition($3)) - $$ = stmt.NewTraitUseAlias($1, nil, alias) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) - - comments.AddComments(alias, $3.Comments()) - comments.AddComments($$, comments[$1]) - } - | trait_method_reference T_AS reserved_non_modifiers - { - alias := node.NewIdentifier($3.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition($3)) - $$ = stmt.NewTraitUseAlias($1, nil, alias) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) - - comments.AddComments(alias, $3.Comments()) - comments.AddComments($$, comments[$1]) - } - | trait_method_reference T_AS member_modifier identifier - { - alias := node.NewIdentifier($4.Value) - positions.AddPosition(alias, positionBuilder.NewTokenPosition($4)) - $$ = stmt.NewTraitUseAlias($1, $3, alias) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - - comments.AddComments(alias, $4.Comments()) - comments.AddComments($$, comments[$1]) - } - | trait_method_reference T_AS member_modifier - { - $$ = stmt.NewTraitUseAlias($1, $3, nil) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } +trait_reference_list: + fully_qualified_class_name { } + | trait_reference_list ',' fully_qualified_class_name { } ; trait_method_reference: - identifier - { - name := node.NewIdentifier($1.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewTraitMethodRef(nil, name) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(name, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | absolute_trait_method_reference { $$ = $1; } + T_STRING { } + | trait_method_reference_fully_qualified { } ; -absolute_trait_method_reference: - name T_PAAMAYIM_NEKUDOTAYIM identifier - { - target := node.NewIdentifier($3.Value) - positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) - $$ = stmt.NewTraitMethodRef($1, target) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) - - comments.AddComments(target, $3.Comments()) - comments.AddComments($$, comments[$1]) - } +trait_method_reference_fully_qualified: + fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { } +; + +trait_alias: + trait_method_reference T_AS trait_modifiers T_STRING { } + | trait_method_reference T_AS member_modifier { } +; + +trait_modifiers: + /* empty */ { } /* No change of methods visibility */ + | member_modifier { } /* REM: Keep in mind, there are not only visibility modifiers */ ; method_body: - ';' /* abstract method */ { $$ = &nodesWithEndToken{nil, $1} } - | '{' inner_statement_list '}' { $$ = &nodesWithEndToken{$2, $3} } + ';' /* abstract method */ { } + | '{' inner_statement_list '}' { } ; variable_modifiers: - non_empty_member_modifiers { $$ = $1; } - | T_VAR - { - modifier := node.NewIdentifier($1.Value) - positions.AddPosition(modifier, positionBuilder.NewTokenPosition($1)) - $$ = []node.Node{modifier} - comments.AddComments(modifier, $1.Comments()) - } + non_empty_member_modifiers { } + | T_VAR { } ; method_modifiers: - /* empty */ { $$ = nil } - | non_empty_member_modifiers { $$ = $1 } + /* empty */ { } + | non_empty_member_modifiers { } ; non_empty_member_modifiers: - member_modifier { $$ = []node.Node{$1} } - | non_empty_member_modifiers member_modifier { $$ = append($1, $2) } + member_modifier { } + | non_empty_member_modifiers member_modifier { } ; member_modifier: - T_PUBLIC - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_PROTECTED - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_PRIVATE - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_STATIC - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_ABSTRACT - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_FINAL - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } + T_PUBLIC { } + | T_PROTECTED { } + | T_PRIVATE { } + | T_STATIC { } + | T_ABSTRACT { } + | T_FINAL { } ; -property_list: - property_list ',' property { $$ = append($1, $3) } - | property { $$ = []node.Node{$1} } +class_variable_declaration: + class_variable_declaration ',' T_VARIABLE { } + | class_variable_declaration ',' T_VARIABLE '=' static_scalar { } + | T_VARIABLE { } + | T_VARIABLE '=' static_scalar { } ; -property: - T_VARIABLE backup_doc_comment - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewProperty(variable, nil, $2) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_VARIABLE '=' expr backup_doc_comment - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewProperty(variable, $3, $4) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $3)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } -; - -class_const_list: - class_const_list ',' class_const_decl { $$ = append($1, $3) } - | class_const_decl { $$ = []node.Node{$1} } -; - -class_const_decl: - identifier '=' expr backup_doc_comment - { - name := node.NewIdentifier($1.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewConstant(name, $3, $4) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $3)) - - comments.AddComments(name, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } -; - -const_decl: - T_STRING '=' expr backup_doc_comment - { - name := node.NewIdentifier($1.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) - $$ = stmt.NewConstant(name, $3, $4) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $3)) - - comments.AddComments(name, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } +class_constant_declaration: + class_constant_declaration ',' T_STRING '=' static_scalar { } + | T_CONST T_STRING '=' static_scalar { } ; echo_expr_list: - echo_expr_list ',' echo_expr { $$ = append($1, $3) } - | echo_expr { $$ = []node.Node{$1} } + echo_expr_list ',' expr { } + | expr { } ; -echo_expr: - expr { $$ = $1 } + +for_expr: + /* empty */ { } + | non_empty_for_expr { } ; -for_exprs: - /* empty */ { $$ = nil; } - | non_empty_for_exprs { $$ = $1; } -; -non_empty_for_exprs: - non_empty_for_exprs ',' expr { $$ = append($1, $3) } - | expr { $$ = []node.Node{$1} } +non_empty_for_expr: + non_empty_for_expr ',' { } expr { } + | expr { } ; -anonymous_class: - T_CLASS ctor_arguments extends_from implements_list backup_doc_comment '{' class_statement_list '}' - { - if $2 != nil { - $$ = stmt.NewClass(nil, nil, $2.nodes, $3, $4, $7, $5) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $8)) - } else { - $$ = stmt.NewClass(nil, nil, nil, $3, $4, $7, $5) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $8)) - } +chaining_method_or_property: + chaining_method_or_property variable_property { } + | variable_property { } +; - comments.AddComments($$, $1.Comments()) - } +chaining_dereference: + chaining_dereference '[' dim_offset ']' { } + | '[' dim_offset ']' { } +; + +chaining_instance_call: + chaining_dereference { } chaining_method_or_property { } + | chaining_dereference { } + | chaining_method_or_property { } +; + +instance_call: + /* empty */ { } + | { } + chaining_instance_call { } ; new_expr: - T_NEW class_name_reference ctor_arguments - { - if $3 != nil { - $$ = expr.NewNew($2, $3.nodes) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3.endToken)) - } else { - $$ = expr.NewNew($2, nil) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - } - - comments.AddComments($$, $1.Comments()) - } - | T_NEW anonymous_class { $$ = expr.NewNew($2, nil) } + T_NEW class_name_reference { } ctor_arguments { } ; expr_without_variable: - T_LIST '(' array_pair_list ')' '=' expr - { - list := expr.NewList($3) - positions.AddPosition(list, positionBuilder.NewTokensPosition($1, $4)) - $$ = assign_op.NewAssign(list, $6) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $6)) - - comments.AddComments(list, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | '[' array_pair_list ']' '=' expr - { - shortList := expr.NewShortList($2) - positions.AddPosition(shortList, positionBuilder.NewTokensPosition($1, $3)) - $$ = assign_op.NewAssign(shortList, $5) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) - - comments.AddComments(shortList, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | variable '=' expr - { - $$ = assign_op.NewAssign($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable '=' '&' expr - { - $$ = assign_op.NewAssignRef($1, $4) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | T_CLONE expr - { - $$ = expr.NewClone($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | variable T_PLUS_EQUAL expr - { - $$ = assign_op.NewPlus($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_MINUS_EQUAL expr - { - $$ = assign_op.NewMinus($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_MUL_EQUAL expr - { - $$ = assign_op.NewMul($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_POW_EQUAL expr - { - $$ = assign_op.NewPow($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_DIV_EQUAL expr - { - $$ = assign_op.NewDiv($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_CONCAT_EQUAL expr - { - $$ = assign_op.NewConcat($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_MOD_EQUAL expr - { - $$ = assign_op.NewMod($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_AND_EQUAL expr - { - $$ = assign_op.NewBitwiseAnd($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_OR_EQUAL expr - { - $$ = assign_op.NewBitwiseOr($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_XOR_EQUAL expr - { - $$ = assign_op.NewBitwiseXor($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_SL_EQUAL expr - { - $$ = assign_op.NewShiftLeft($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_SR_EQUAL expr - { - $$ = assign_op.NewShiftRight($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable T_INC - { - $$ = expr.NewPostInc($1) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2)) - comments.AddComments($$, comments[$1]) - } - | T_INC variable - { - $$ = expr.NewPreInc($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | variable T_DEC - { - $$ = expr.NewPostDec($1) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2)) - comments.AddComments($$, comments[$1]) - } - | T_DEC variable - { - $$ = expr.NewPreDec($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | expr T_BOOLEAN_OR expr - { - $$ = binary_op.NewBooleanOr($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_BOOLEAN_AND expr - { - $$ = binary_op.NewBooleanAnd($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_LOGICAL_OR expr - { - $$ = binary_op.NewLogicalOr($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_LOGICAL_AND expr - { - $$ = binary_op.NewLogicalAnd($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_LOGICAL_XOR expr - { - $$ = binary_op.NewLogicalXor($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '|' expr - { - $$ = binary_op.NewBitwiseOr($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '&' expr - { - $$ = binary_op.NewBitwiseAnd($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '^' expr - { - $$ = binary_op.NewBitwiseXor($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '.' expr - { - $$ = binary_op.NewConcat($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '+' expr - { - $$ = binary_op.NewPlus($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '-' expr - { - $$ = binary_op.NewMinus($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '*' expr - { - $$ = binary_op.NewMul($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_POW expr - { - $$ = binary_op.NewPow($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '/' expr - { - $$ = binary_op.NewDiv($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '%' expr - { - $$ = binary_op.NewMod($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_SL expr - { - $$ = binary_op.NewShiftLeft($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_SR expr - { - $$ = binary_op.NewShiftRight($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | '+' expr %prec T_INC - { - $$ = expr.NewUnaryPlus($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | '-' expr %prec T_INC - { - $$ = expr.NewUnaryMinus($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | '!' expr - { - $$ = expr.NewBooleanNot($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | '~' expr - { - $$ = expr.NewBitwiseNot($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | expr T_IS_IDENTICAL expr - { - $$ = binary_op.NewIdentical($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_IS_NOT_IDENTICAL expr - { - $$ = binary_op.NewNotIdentical($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_IS_EQUAL expr - { - $$ = binary_op.NewEqual($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_IS_NOT_EQUAL expr - { - $$ = binary_op.NewNotEqual($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '<' expr - { - $$ = binary_op.NewSmaller($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_IS_SMALLER_OR_EQUAL expr - { - $$ = binary_op.NewSmallerOrEqual($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr '>' expr - { - $$ = binary_op.NewGreater($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_IS_GREATER_OR_EQUAL expr - { - $$ = binary_op.NewGreaterOrEqual($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_SPACESHIP expr - { - $$ = binary_op.NewSpaceship($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr T_INSTANCEOF class_name_reference - { - $$ = expr.NewInstanceOf($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | '(' expr ')' { $$ = $2; } - | new_expr { $$ = $1; } - | expr '?' expr ':' expr - { - $$ = expr.NewTernary($1, $3, $5) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $5)) - comments.AddComments($$, comments[$1]) - } - | expr '?' ':' expr - { - $$ = expr.NewTernary($1, nil, $4) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | expr T_COALESCE expr - { - $$ = binary_op.NewCoalesce($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | internal_functions_in_yacc { $$ = $1} - | T_INT_CAST expr - { - $$ = cast.NewCastInt($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_DOUBLE_CAST expr - { - $$ = cast.NewCastDouble($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_STRING_CAST expr - { - $$ = cast.NewCastString($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_ARRAY_CAST expr - { - $$ = cast.NewCastArray($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_OBJECT_CAST expr - { - $$ = cast.NewCastObject($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_BOOL_CAST expr - { - $$ = cast.NewCastBool($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_UNSET_CAST expr - { - $$ = cast.NewCastUnset($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_EXIT exit_expr - { - $$ = expr.NewExit($2, strings.EqualFold($1.Value, "die")) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | '@' expr - { - $$ = expr.NewErrorSuppress($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | scalar { $$ = $1; } - | '`' backticks_expr '`' - { - $$ = expr.NewShellExec($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_PRINT expr - { - $$ = expr.NewPrint($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_YIELD - { - $$ = expr.NewYield(nil, nil) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_YIELD expr - { - $$ = expr.NewYield(nil, $2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_YIELD expr T_DOUBLE_ARROW expr - { - $$ = expr.NewYield($2, $4) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } - | T_YIELD_FROM expr - { - $$ = expr.NewYieldFrom($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_FUNCTION returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type '{' inner_statement_list '}' - { - $$ = expr.NewClosure($5, $7, $8, $10, false, $2.value, $3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $11)) - - comments.AddComments($$, $1.Comments()) - } - | T_STATIC T_FUNCTION returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type '{' inner_statement_list '}' - { - $$ = expr.NewClosure($6, $8, $9, $11, true, $3.value, $4) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $12)) - - comments.AddComments($$, $1.Comments()) - } + T_LIST '(' { } assignment_list ')' '=' expr { } + | variable '=' expr { } + | variable '=' '&' variable { } + | variable '=' '&' T_NEW class_name_reference { } ctor_arguments { } + | T_CLONE expr { } + | variable T_PLUS_EQUAL expr { } + | variable T_MINUS_EQUAL expr { } + | variable T_MUL_EQUAL expr { } + | variable T_POW_EQUAL expr { } + | variable T_DIV_EQUAL expr { } + | variable T_CONCAT_EQUAL expr { } + | variable T_MOD_EQUAL expr { } + | variable T_AND_EQUAL expr { } + | variable T_OR_EQUAL expr { } + | variable T_XOR_EQUAL expr { } + | variable T_SL_EQUAL expr { } + | variable T_SR_EQUAL expr { } + | rw_variable T_INC { } + | T_INC rw_variable { } + | rw_variable T_DEC { } + | T_DEC rw_variable { } + | expr T_BOOLEAN_OR { } expr { } + | expr T_BOOLEAN_AND { } expr { } + | expr T_LOGICAL_OR { } expr { } + | expr T_LOGICAL_AND { } expr { } + | expr T_LOGICAL_XOR expr { } + | expr '|' expr { } + | expr '&' expr { } + | expr '^' expr { } + | expr '.' expr { } + | expr '+' expr { } + | expr '-' expr { } + | expr '*' expr { } + | expr T_POW expr { } + | expr '/' expr { } + | expr '%' expr { } + | expr T_SL expr { } + | expr T_SR expr { } + | '+' expr %prec T_INC { } + | '-' expr %prec T_INC { } + | '!' expr { } + | '~' expr { } + | expr T_IS_IDENTICAL expr { } + | expr T_IS_NOT_IDENTICAL expr { } + | expr T_IS_EQUAL expr { } + | expr T_IS_NOT_EQUAL expr { } + | expr '<' expr { } + | expr T_IS_SMALLER_OR_EQUAL expr { } + | expr '>' expr { } + | expr T_IS_GREATER_OR_EQUAL expr { } + | expr T_INSTANCEOF class_name_reference { } + | parenthesis_expr { } + | new_expr { } + | '(' new_expr ')' { } instance_call { } + | expr '?' { } + expr ':' { } + expr { } + | expr '?' ':' { } + expr { } + | internal_functions_in_yacc { } + | T_INT_CAST expr { } + | T_DOUBLE_CAST expr { } + | T_STRING_CAST expr { } + | T_ARRAY_CAST expr { } + | T_OBJECT_CAST expr { } + | T_BOOL_CAST expr { } + | T_UNSET_CAST expr { } + | T_EXIT exit_expr { } + | '@' { } expr { } + | scalar { } + | combined_scalar_offset { } + | combined_scalar { } + | '`' backticks_expr '`' { } + | T_PRINT expr { } + | T_YIELD { } + | function is_reference { } + '(' parameter_list ')' lexical_vars + '{' inner_statement_list '}' { } + | T_STATIC function is_reference { } + '(' parameter_list ')' lexical_vars + '{' inner_statement_list '}' { } ; -backup_doc_comment: - /* empty */ { $$ = yylex.(*lexer).PhpDocComment; yylex.(*lexer).PhpDocComment = "" } +yield_expr: + T_YIELD expr_without_variable { } + | T_YIELD variable { } + | T_YIELD expr T_DOUBLE_ARROW expr_without_variable { } + | T_YIELD expr T_DOUBLE_ARROW variable { } ; -returns_ref: - /* empty */ { $$ = boolWithToken{false, nil} } - | '&' { $$ = boolWithToken{true, &$1} } +combined_scalar_offset: + combined_scalar '[' dim_offset ']' { } + | combined_scalar_offset '[' dim_offset ']' { } + | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { } + | general_constant '[' dim_offset ']' { } +; + +combined_scalar: + T_ARRAY '(' array_pair_list ')' { } + | '[' array_pair_list ']' { } +; + +function: + T_FUNCTION { } ; lexical_vars: - /* empty */ { $$ = []node.Node{} } - | T_USE '(' lexical_var_list ')' { $$ = $3; } + /* empty */ + | T_USE '(' lexical_var_list ')' ; lexical_var_list: - lexical_var_list ',' lexical_var { $$ = append($1, $3) } - | lexical_var { $$ = []node.Node{$1} } -; - -lexical_var: - T_VARIABLE - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - $$ = expr.NewClusureUse(variable, false) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | '&' T_VARIABLE - { - identifier := node.NewIdentifier($2.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($2)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($2)) - $$ = expr.NewClusureUse(variable, true) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) - - comments.AddComments(identifier, $2.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } + lexical_var_list ',' T_VARIABLE { } + | lexical_var_list ',' '&' T_VARIABLE { } + | T_VARIABLE { } + | '&' T_VARIABLE { } ; function_call: - name argument_list - { - $$ = expr.NewFunctionCall($1, $2.nodes) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2.endToken)) - comments.AddComments($$, comments[$1]) - } - | class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list - { - $$ = expr.NewStaticCall($1, $3, $4.nodes) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) - comments.AddComments($$, comments[$1]) - } - | variable_class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list - { - $$ = expr.NewStaticCall($1, $3, $4.nodes) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) - comments.AddComments($$, comments[$1]) - } - | callable_expr argument_list - { - $$ = expr.NewFunctionCall($1, $2.nodes) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2.endToken)) - comments.AddComments($$, comments[$1]) - } + namespace_name { } + function_call_parameter_list { } + | T_NAMESPACE T_NS_SEPARATOR namespace_name { } + function_call_parameter_list { } + | T_NS_SEPARATOR namespace_name { } + function_call_parameter_list { } + | class_name T_PAAMAYIM_NEKUDOTAYIM variable_name { } + function_call_parameter_list { } + | class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { } + function_call_parameter_list { } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_name { } + function_call_parameter_list { } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { } + function_call_parameter_list { } + | variable_without_objects { } + function_call_parameter_list { } ; class_name: - T_STATIC - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | name { $$ = $1; } + T_STATIC { } + | namespace_name { } + | T_NAMESPACE T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name { } ; +fully_qualified_class_name: + namespace_name { } + | T_NAMESPACE T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name { } +; + + + class_name_reference: - class_name { $$ = $1; } - | new_variable { $$ = $1; } + class_name { } + | dynamic_class_name_reference { } +; + + +dynamic_class_name_reference: + base_variable T_OBJECT_OPERATOR { } + object_property { } dynamic_class_name_variable_properties + { } + | base_variable { } +; + + +dynamic_class_name_variable_properties: + dynamic_class_name_variable_properties dynamic_class_name_variable_property + | /* empty */ +; + + +dynamic_class_name_variable_property: + T_OBJECT_OPERATOR object_property { } ; exit_expr: - /* empty */ { $$ = nil } - | '(' optional_expr ')' { $$ = $2; } + /* empty */ { } + | '(' ')' { } + | parenthesis_expr { } ; backticks_expr: - /* empty */ { $$ = []node.Node{} } - | T_ENCAPSED_AND_WHITESPACE { $$ = []node.Node{scalar.NewEncapsedStringPart($1.Value)} } - | encaps_list { $$ = $1; } + /* empty */ { } + | T_ENCAPSED_AND_WHITESPACE { } + | encaps_list { } ; + ctor_arguments: - /* empty */ { $$ = nil } - | argument_list { $$ = $1 } + /* empty */ { } + | function_call_parameter_list { } ; -dereferencable_scalar: - T_ARRAY '(' array_pair_list ')' - { - $$ = expr.NewArray($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } - | '[' array_pair_list ']' - { - $$ = expr.NewShortArray($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_CONSTANT_ENCAPSED_STRING - { - $$ = scalar.NewString($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } + +common_scalar: + T_LNUMBER { } + | T_DNUMBER { } + | T_CONSTANT_ENCAPSED_STRING { } + | T_LINE { } + | T_FILE { } + | T_DIR { } + | T_TRAIT_C { } + | T_METHOD_C { } + | T_FUNC_C { } + | T_NS_C { } + | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { } + | T_START_HEREDOC T_END_HEREDOC { } +; + +static_class_constant: + class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { } +; + +static_scalar: /* compile-time evaluated scalars */ + static_scalar_value { } +; + +static_scalar_value: + common_scalar { } + | static_class_name_scalar { } + | namespace_name { } + | T_NAMESPACE T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name { } + | T_ARRAY '(' static_array_pair_list ')' { } + | '[' static_array_pair_list ']' { } + | static_class_constant { } + | T_CLASS_C { } + | static_operation { } +; + +static_operation: + static_scalar_value '[' static_scalar_value ']' { } + | static_scalar_value '+' static_scalar_value { } + | static_scalar_value '-' static_scalar_value { } + | static_scalar_value '*' static_scalar_value { } + | static_scalar_value T_POW static_scalar_value { } + | static_scalar_value '/' static_scalar_value { } + | static_scalar_value '%' static_scalar_value { } + | '!' static_scalar_value { } + | '~' static_scalar_value { } + | static_scalar_value '|' static_scalar_value { } + | static_scalar_value '&' static_scalar_value { } + | static_scalar_value '^' static_scalar_value { } + | static_scalar_value T_SL static_scalar_value { } + | static_scalar_value T_SR static_scalar_value { } + | static_scalar_value '.' static_scalar_value { } + | static_scalar_value T_LOGICAL_XOR static_scalar_value { } + | static_scalar_value T_LOGICAL_AND static_scalar_value { } + | static_scalar_value T_LOGICAL_OR static_scalar_value { } + | static_scalar_value T_BOOLEAN_AND static_scalar_value { } + | static_scalar_value T_BOOLEAN_OR static_scalar_value { } + | static_scalar_value T_IS_IDENTICAL static_scalar_value { } + | static_scalar_value T_IS_NOT_IDENTICAL static_scalar_value { } + | static_scalar_value T_IS_EQUAL static_scalar_value { } + | static_scalar_value T_IS_NOT_EQUAL static_scalar_value { } + | static_scalar_value '<' static_scalar_value { } + | static_scalar_value '>' static_scalar_value { } + | static_scalar_value T_IS_SMALLER_OR_EQUAL static_scalar_value { } + | static_scalar_value T_IS_GREATER_OR_EQUAL static_scalar_value { } + | static_scalar_value '?' ':' static_scalar_value { } + | static_scalar_value '?' static_scalar_value ':' static_scalar_value { } + | '+' static_scalar_value { } + | '-' static_scalar_value { } + | '(' static_scalar_value ')' { } +; + +general_constant: + class_constant { } + | namespace_name { } + | T_NAMESPACE T_NS_SEPARATOR namespace_name { } + | T_NS_SEPARATOR namespace_name { } ; scalar: - T_LNUMBER - { - $$ = scalar.NewLnumber($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_DNUMBER - { - $$ = scalar.NewDnumber($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_LINE - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_FILE - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_DIR - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_TRAIT_C - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_METHOD_C - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_FUNC_C - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_NS_C - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_CLASS_C - { - $$ = scalar.NewMagicConstant($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC - { - $$ = scalar.NewString($2.Value) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3))/* TODO: mark as Heredoc*/ - comments.AddComments($$, $1.Comments()) - } - | T_START_HEREDOC T_END_HEREDOC - { - $$ = scalar.NewEncapsed(nil) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | '"' encaps_list '"' - { - $$ = scalar.NewEncapsed($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_START_HEREDOC encaps_list T_END_HEREDOC - { - $$ = scalar.NewEncapsed($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | dereferencable_scalar { $$ = $1; } - | constant { $$ = $1; } + T_STRING_VARNAME { } + | general_constant { } + | class_name_scalar { } + | common_scalar { } + | '"' encaps_list '"' { } + | T_START_HEREDOC encaps_list T_END_HEREDOC { } + | T_CLASS_C { } ; -constant: - name - { - $$ = expr.NewConstFetch($1) - positions.AddPosition($$, positionBuilder.NewNodePosition($1)) - comments.AddComments($$, comments[$1]) - } - | class_name T_PAAMAYIM_NEKUDOTAYIM identifier - { - target := node.NewIdentifier($3.Value) - positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) - $$ = expr.NewClassConstFetch($1, target) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) +static_array_pair_list: + /* empty */ { } + | non_empty_static_array_pair_list possible_comma { } +; - comments.AddComments(target, $3.Comments()) - comments.AddComments($$, comments[$1]) - } - | variable_class_name T_PAAMAYIM_NEKUDOTAYIM identifier - { - target := node.NewIdentifier($3.Value) - positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) - $$ = expr.NewClassConstFetch($1, target) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) +possible_comma: + /* empty */ + | ',' +; - comments.AddComments(target, $3.Comments()) - comments.AddComments($$, comments[$1]) - } +non_empty_static_array_pair_list: + non_empty_static_array_pair_list ',' static_scalar_value T_DOUBLE_ARROW static_scalar_value { } + | non_empty_static_array_pair_list ',' static_scalar_value { } + | static_scalar_value T_DOUBLE_ARROW static_scalar_value { } + | static_scalar_value { } ; expr: - variable { $$ = $1; } - | expr_without_variable { $$ = $1; } + r_variable { } + | expr_without_variable { } ; -optional_expr: - /* empty */ { $$ = nil } - | expr { $$ = $1; } +parenthesis_expr: + '(' expr ')' { } + | '(' yield_expr ')' { } ; -variable_class_name: - dereferencable { $$ = $1; } + +r_variable: + variable { } ; -dereferencable: - variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } + +w_variable: + variable { } ; -callable_expr: - callable_variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } -; - -callable_variable: - simple_variable { $$ = $1; } - | dereferencable '[' optional_expr ']' - { - $$ = expr.NewArrayDimFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | constant '[' optional_expr ']' - { - $$ = expr.NewArrayDimFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | dereferencable '{' expr '}' - { - $$ = expr.NewArrayDimFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | dereferencable T_OBJECT_OPERATOR property_name argument_list - { - $$ = expr.NewMethodCall($1, $3, $4.nodes) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) - comments.AddComments($$, comments[$1]) - } - | function_call { $$ = $1; } +rw_variable: + variable { } ; variable: - callable_variable { $$ = $1; } - | static_member { $$ = $1; } - | dereferencable T_OBJECT_OPERATOR property_name - { - $$ = expr.NewPropertyFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } + base_variable_with_function_calls T_OBJECT_OPERATOR { } + object_property { } method_or_not variable_properties + { } + | base_variable_with_function_calls { } ; -simple_variable: - T_VARIABLE - { - name := node.NewIdentifier($1.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) - $$ = expr.NewVariable(name) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(name, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | '$' '{' expr '}' - { - $$ = expr.NewVariable($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } - | '$' simple_variable - { - $$ = expr.NewVariable($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } +variable_properties: + variable_properties variable_property { } + | /* empty */ { } +; + + +variable_property: + T_OBJECT_OPERATOR object_property { } method_or_not { } +; + +array_method_dereference: + array_method_dereference '[' dim_offset ']' { } + | method '[' dim_offset ']' { } +; + +method: + { } + function_call_parameter_list { } +; + +method_or_not: + method { } + | array_method_dereference { } + | /* empty */ { } +; + +variable_without_objects: + reference_variable { } + | simple_indirect_reference reference_variable { } ; static_member: - class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable - { - $$ = expr.NewStaticPropertyFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | variable_class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable - { - $$ = expr.NewStaticPropertyFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } + class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { } + ; -new_variable: - simple_variable { $$ = $1 } - | new_variable '[' optional_expr ']' - { - $$ = expr.NewArrayDimFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | new_variable '{' expr '}' - { - $$ = expr.NewArrayDimFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | new_variable T_OBJECT_OPERATOR property_name - { - $$ = expr.NewPropertyFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable - { - $$ = expr.NewStaticPropertyFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | new_variable T_PAAMAYIM_NEKUDOTAYIM simple_variable - { - $$ = expr.NewStaticPropertyFetch($1, $3) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } +variable_class_name: + reference_variable { } ; -member_name: - identifier - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1 } +array_function_dereference: + array_function_dereference '[' dim_offset ']' { } + | function_call { } + '[' dim_offset ']' { } ; -property_name: - T_STRING - { - $$ = node.NewIdentifier($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1 } +base_variable_with_function_calls: + base_variable { } + | array_function_dereference { } + | function_call { } ; + +base_variable: + reference_variable { } + | simple_indirect_reference reference_variable { } + | static_member { } +; + +reference_variable: + reference_variable '[' dim_offset ']' { } + | reference_variable '{' expr '}' { } + | compound_variable { } +; + + +compound_variable: + T_VARIABLE { } + | '$' '{' expr '}' { } +; + +dim_offset: + /* empty */ { } + | expr { } +; + + +object_property: + object_dim_list { } + | variable_without_objects { } +; + +object_dim_list: + object_dim_list '[' dim_offset ']' { } + | object_dim_list '{' expr '}' { } + | variable_name { } +; + +variable_name: + T_STRING { } + | '{' expr '}' { } +; + +simple_indirect_reference: + '$' { } + | simple_indirect_reference '$' { } +; + +assignment_list: + assignment_list ',' assignment_list_element + | assignment_list_element +; + + +assignment_list_element: + variable { } + | T_LIST '(' { } assignment_list ')' { } + | /* empty */ { } +; + + array_pair_list: - non_empty_array_pair_list - { - if ($1[len($1)-1] == nil) { - $$ = $1[:len($1)-1] - } else { - $$ = $1 - } - } -; - -possible_array_pair: - /* empty */ { $$ = nil } - | array_pair { $$ = $1; } + /* empty */ { } + | non_empty_array_pair_list possible_comma { } ; non_empty_array_pair_list: - non_empty_array_pair_list ',' possible_array_pair - { $$ = append($1, $3) } - | possible_array_pair { $$ = []node.Node{$1} } -; - -array_pair: - expr T_DOUBLE_ARROW expr - { - $$ = expr.NewArrayItem($1, $3, false) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) - comments.AddComments($$, comments[$1]) - } - | expr - { - $$ = expr.NewArrayItem(nil, $1, false) - positions.AddPosition($$, positionBuilder.NewNodePosition($1)) - comments.AddComments($$, comments[$1]) - } - | expr T_DOUBLE_ARROW '&' variable - { - $$ = expr.NewArrayItem($1, $4, true) - positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $4)) - comments.AddComments($$, comments[$1]) - } - | '&' variable - { - $$ = expr.NewArrayItem(nil, $2, true) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | expr T_DOUBLE_ARROW T_LIST '(' array_pair_list ')' - { - // TODO: Cannot use list() as standalone expression - list := expr.NewList($5) - positions.AddPosition(list, positionBuilder.NewTokensPosition($3, $6)) - $$ = expr.NewArrayItem($1, list, false) - positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $6)) - - comments.AddComments(list, $3.Comments()) - comments.AddComments($$, comments[$1]) - } - | T_LIST '(' array_pair_list ')' - { - // TODO: Cannot use list() as standalone expression - list := expr.NewList($3) - positions.AddPosition(list, positionBuilder.NewTokensPosition($1, $4)) - $$ = expr.NewArrayItem(nil, list, false) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - - comments.AddComments(list, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } + non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { } + | non_empty_array_pair_list ',' expr { } + | expr T_DOUBLE_ARROW expr { } + | expr { } + | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable { } + | non_empty_array_pair_list ',' '&' w_variable { } + | expr T_DOUBLE_ARROW '&' w_variable { } + | '&' w_variable { } ; encaps_list: - encaps_list encaps_var { $$ = append($1, $2) } - | encaps_list T_ENCAPSED_AND_WHITESPACE - { - encapsed := scalar.NewEncapsedStringPart($2.Value) - positions.AddPosition(encapsed, positionBuilder.NewTokenPosition($2)) - $$ = append($1, encapsed) - comments.AddComments(encapsed, $2.Comments()) - } - | encaps_var { $$ = []node.Node{$1} } - | T_ENCAPSED_AND_WHITESPACE encaps_var - { - encapsed := scalar.NewEncapsedStringPart($1.Value) - positions.AddPosition(encapsed, positionBuilder.NewTokenPosition($1)) - $$ = []node.Node{encapsed, $2} - comments.AddComments(encapsed, $1.Comments()) - } + encaps_list encaps_var { } + | encaps_list T_ENCAPSED_AND_WHITESPACE { } + | encaps_var { } + | T_ENCAPSED_AND_WHITESPACE encaps_var { } ; + + encaps_var: - T_VARIABLE - { - name := node.NewIdentifier($1.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) - $$ = expr.NewVariable(name) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(name, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_VARIABLE '[' encaps_var_offset ']' - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - $$ = expr.NewArrayDimFetch(variable, $3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_VARIABLE T_OBJECT_OPERATOR T_STRING - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) - fetch := node.NewIdentifier($3.Value) - positions.AddPosition(fetch, positionBuilder.NewTokenPosition($3)) - $$ = expr.NewPropertyFetch(variable, fetch) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments(fetch, $3.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_DOLLAR_OPEN_CURLY_BRACES expr '}' - { - $$ = expr.NewVariable($2) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - comments.AddComments($$, $1.Comments()) - } - | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' - { - name := node.NewIdentifier($2.Value) - positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) - $$ = expr.NewVariable(name) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) - - comments.AddComments(name, $2.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' - { - identifier := node.NewIdentifier($2.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($2)) - variable := expr.NewVariable(identifier) - positions.AddPosition(variable, positionBuilder.NewTokenPosition($2)) - $$ = expr.NewArrayDimFetch(variable, $4) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $6)) - - - comments.AddComments(identifier, $2.Comments()) - comments.AddComments(variable, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } - | T_CURLY_OPEN variable '}' { $$ = $2; } + T_VARIABLE { } + | T_VARIABLE '[' { } encaps_var_offset ']' { } + | T_VARIABLE T_OBJECT_OPERATOR T_STRING { } + | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { } + | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { } + | T_CURLY_OPEN variable '}' { } ; + + encaps_var_offset: - T_STRING - { - $$ = scalar.NewString($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - comments.AddComments($$, $1.Comments()) - } - | T_NUM_STRING - { - // TODO: add option to handle 64 bit integer - if _, err := strconv.Atoi($1.Value); err == nil { - $$ = scalar.NewLnumber($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - } else { - $$ = scalar.NewString($1.Value) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - } - comments.AddComments($$, $1.Comments()) - } - | '-' T_NUM_STRING - { - // TODO: add option to handle 64 bit integer - if _, err := strconv.Atoi($2.Value); err == nil { - lnumber := scalar.NewLnumber($2.Value) - positions.AddPosition(lnumber, positionBuilder.NewTokensPosition($1, $2)) - $$ = expr.NewUnaryMinus(lnumber) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) - - comments.AddComments(lnumber, $1.Comments()) - } else { - $2.Value = "-"+$2.Value - $$ = scalar.NewString($2.Value) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) - } - - comments.AddComments($$, $1.Comments()) - } - | T_VARIABLE - { - identifier := node.NewIdentifier($1.Value) - positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) - $$ = expr.NewVariable(identifier) - positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) - - comments.AddComments(identifier, $1.Comments()) - comments.AddComments($$, $1.Comments()) - } + T_STRING { } + | T_NUM_STRING { } + | T_VARIABLE { } ; + internal_functions_in_yacc: - T_ISSET '(' isset_variables possible_comma ')' - { - $$ = expr.NewIsset($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $5)) - comments.AddComments($$, $1.Comments()) - } - | T_EMPTY '(' expr ')' - { - $$ = expr.NewEmpty($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } - | T_INCLUDE expr - { - $$ = expr.NewInclude($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_INCLUDE_ONCE expr - { - $$ = expr.NewIncludeOnce($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_EVAL '(' expr ')' - { - $$ = expr.NewEval($3) - positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) - comments.AddComments($$, $1.Comments()) - } - | T_REQUIRE expr - { - $$ = expr.NewRequire($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } - | T_REQUIRE_ONCE expr - { - $$ = expr.NewRequireOnce($2) - positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) - comments.AddComments($$, $1.Comments()) - } + T_ISSET '(' isset_variables ')' { } + | T_EMPTY '(' variable ')' { } + | T_EMPTY '(' expr_without_variable ')' { } + | T_INCLUDE expr { } + | T_INCLUDE_ONCE expr { } + | T_EVAL '(' expr ')' { } + | T_REQUIRE expr { } + | T_REQUIRE_ONCE expr { } ; isset_variables: - isset_variable { $$ = []node.Node{$1} } - | isset_variables ',' isset_variable { $$ = append($1, $3) } + isset_variable { } + | isset_variables ',' { } isset_variable { } ; isset_variable: - expr { $$ = $1 } + variable { } + | expr_without_variable { } ; -///////////////////////////////////////////////////////////////////////// +class_constant: + class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { } +; + +static_class_name_scalar: + class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS { } +; + +class_name_scalar: + class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS { } +; %% \ No newline at end of file