Documentation

Php5 extends ParserAbstract
in package

Table of Contents

SYMBOL_NONE  = -1
$action  : array<string|int, int>
$actionBase  : array<string|int, int>
$actionCheck  : array<string|int, int>
$actionDefault  : array<string|int, int>
$actionTableSize  : int
$defaultAction  : int
$endAttributes  : array<string|int, mixed>
$endAttributeStack  : array<string|int, array<string|int, mixed>>
$errorHandler  : ErrorHandler
$errorState  : int
$errorSymbol  : int
$goto  : array<string|int, int>
$gotoBase  : array<string|int, int>
$gotoCheck  : array<string|int, int>
$gotoDefault  : array<string|int, int>
$gotoTableSize  : int
$invalidSymbol  : int
$lexer  : Lexer
$lookaheadStartAttributes  : array<string|int, mixed>
$numNonLeafStates  : int
$productions  : array<string|int, mixed>
$reduceCallbacks  : array<string|int, callable>
$ruleToLength  : array<string|int, int>
$ruleToNonTerminal  : array<string|int, int>
$semStack  : array<string|int, mixed>
$semValue  : mixed
$startAttributeStack  : array<string|int, array<string|int, mixed>>
$symbolToName  : array<string|int, string>
$tokenToSymbol  : array<string|int, int>
$tokenToSymbolMapSize  : int
$unexpectedTokenRule  : int
$YY2TBLSTATE  : mixed
__construct()  : mixed
Creates a parser instance.
parse()  : array<string|int, Stmt>|null
Parses PHP code into a node tree.
checkClass()  : mixed
checkClassConst()  : mixed
checkClassMethod()  : mixed
checkClassModifier()  : mixed
checkEnum()  : mixed
checkInterface()  : mixed
checkModifier()  : mixed
checkNamespace()  : mixed
checkParam()  : mixed
checkProperty()  : mixed
checkTryCatch()  : mixed
checkUseUse()  : mixed
createCommentNopAttributes()  : array<string|int, mixed>
Create attributes for a zero-length common-capturing nop.
doParse()  : mixed
emitError()  : mixed
fixupPhp5StaticPropCall()  : StaticCall
Fix up parsing of static property calls in PHP 5.
fixupStartAttributes()  : mixed
getAttributesAt()  : array<string|int, mixed>
Get combined start and end attributes at a stack location
getErrorMessage()  : string
Format error message including expected tokens.
getExpectedTokens()  : array<string|int, string>
Get limited number of expected tokens in given state.
getFloatCastKind()  : int
handleBuiltinTypes()  : mixed
handleNamespaces()  : array<string|int, Stmt>
Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.
initReduceCallbacks()  : mixed
Initialize $reduceCallbacks map.
parseDocString()  : mixed
parseLNumber()  : mixed
parseNumString()  : LNumber|String_
Parse a T_NUM_STRING token into either an integer or string node.
stripIndentation()  : mixed
checkClassName()  : mixed
checkImplementedInterfaces()  : mixed
fixupNamespaceAttributes()  : mixed
getNamespacingStyle()  : null|string
Determine namespacing style (semicolon or brace)

Constants

Properties

$action

protected array<string|int, int> $action = array(699, 669, 670, 671, 672, 673, 286, 674, 675, 676, 712, 713, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 245, 246, 242, 243, 244, -32766, -32766, 677, -32766, 750, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1224, 245, 246, 1225, 678, 679, 680, 681, 682, 683, 684, -32766, 48, 746, -32766, -32766, -32766, -32766, -32766, -32766, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 715, 738, 716, 717, 718, 719, 707, 708, 709, 737, 710, 711, 696, 697, 698, 700, 701, 702, 740, 741, 742, 743, 744, 745, 703, 704, 705, 706, 736, 727, 725, 726, 722, 723, 751, 714, 720, 721, 728, 729, 731, 730, 732, 733, 55, 56, 425, 57, 58, 724, 735, 734, 1073, 59, 60, -224, 61, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 121, -32767, -32767, -32767, -32767, 29, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 1043, 766, 1071, 767, 580, 62, 63, -32766, -32766, -32766, -32766, 64, 516, 65, 294, 295, 66, 67, 68, 69, 70, 71, 72, 73, 822, 25, 302, 74, 418, 981, 983, 1043, 1181, 1095, 1096, 1073, 748, 754, 1075, 1074, 1076, 469, -32766, -32766, -32766, 337, 823, 54, -32767, -32767, -32767, -32767, 98, 99, 100, 101, 102, 220, 221, 222, 78, 361, 1107, -32766, 341, -32766, -32766, -32766, -32766, -32766, 1107, 492, 949, 950, 951, 948, 947, 946, 207, 477, 478, 949, 950, 951, 948, 947, 946, 1043, 479, 480, 52, 1101, 1102, 1103, 1104, 1098, 1099, 319, 872, 668, 667, 27, -511, 1105, 1100, -32766, 130, 1075, 1074, 1076, 345, 668, 667, 41, 126, 341, 334, 369, 336, 426, -128, -128, -128, 896, 897, 468, 220, 221, 222, 811, 1195, 619, 40, 21, 427, -128, 470, -128, 471, -128, 472, -128, 802, 428, -4, 823, 54, 207, 33, 34, 429, 360, 317, 28, 35, 473, -32766, -32766, -32766, 211, 356, 357, 474, 475, -32766, -32766, -32766, 754, 476, 49, 313, 794, 843, 430, 431, 289, 125, -32766, 813, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, -32766, -32766, -32766, 769, 103, 104, 105, 327, 307, 825, 633, -128, 1075, 1074, 1076, 221, 222, 927, 748, 1146, 106, -32766, 129, -32766, -32766, -32766, -32766, 426, 823, 54, 902, 873, 302, 468, 75, 207, 359, 811, 668, 667, 40, 21, 427, 754, 470, 754, 471, 423, 472, 1043, 127, 428, 435, 1043, 341, 1043, 33, 34, 429, 360, 1181, 415, 35, 473, 122, 10, 315, 128, 356, 357, 474, 475, -32766, -32766, -32766, 768, 476, 668, 667, 758, 843, 430, 431, 754, 1043, 1147, -32766, -32766, -32766, 754, 419, 342, 1215, -32766, 131, -32766, -32766, -32766, 341, 363, 346, 426, 823, 54, 100, 101, 102, 468, 825, 633, -4, 811, 442, 903, 40, 21, 427, 754, 470, 435, 471, 341, 472, 341, 766, 428, 767, -209, -209, -209, 33, 34, 429, 360, 479, 1196, 35, 473, 345, -32766, -32766, -32766, 356, 357, 474, 475, 220, 221, 222, 421, 476, 32, 297, 794, 843, 430, 431, 754, 754, 435, -32766, 341, -32766, -32766, 9, 300, 51, 207, 249, 324, 753, 120, 220, 221, 222, 426, 30, 247, 941, 422, 424, 468, 825, 633, -209, 811, 1043, 1061, 40, 21, 427, 129, 470, 207, 471, 341, 472, 804, 20, 428, 124, -208, -208, -208, 33, 34, 429, 360, 479, 212, 35, 473, 923, -259, 823, 54, 356, 357, 474, 475, -32766, -32766, -32766, 1043, 476, 213, 806, 794, 843, 430, 431, -32766, -32766, 435, 435, 341, 341, 443, 79, 80, 81, -32766, 668, 667, 636, 344, 808, 668, 667, 239, 240, 241, 123, 214, 538, 250, 825, 633, -208, 36, 251, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 252, 307, 426, 220, 221, 222, 823, 54, 468, -32766, 222, 765, 811, 106, 134, 40, 21, 427, 571, 470, 207, 471, 445, 472, 207, -32766, 428, 896, 897, 207, 307, 33, 34, 429, 245, 246, 637, 35, 473, 452, 22, 809, 922, 356, 357, 457, 588, 135, 374, 595, 596, 476, -228, 759, 639, 938, 653, 926, 661, -86, 823, 54, 314, 644, 647, 821, 133, 836, 43, 106, 603, 44, 45, 46, 47, 748, 50, 53, 132, 426, 302, -32766, 520, 825, 633, 468, -84, 607, 577, 811, 641, 362, 40, 21, 427, -278, 470, 754, 471, 954, 472, 441, 627, 428, 823, 54, 574, 844, 33, 34, 429, 11, 615, 845, 35, 473, 444, 461, 285, -511, 356, 357, 592, -419, 593, 1106, 1153, -410, 476, 368, 838, 38, 658, 426, 645, 795, 1052, 0, 325, 468, 0, -32766, 0, 811, 0, 0, 40, 21, 427, 0, 470, 0, 471, 0, 472, 0, 322, 428, 823, 54, 825, 633, 33, 34, 429, 0, 326, 0, 35, 473, 323, 0, 316, 318, 356, 357, -512, 426, 0, 753, 531, 0, 476, 468, 6, 0, 0, 811, 650, 7, 40, 21, 427, 12, 470, 14, 471, 373, 472, -420, 562, 428, 823, 54, 78, -225, 33, 34, 429, 39, 656, 657, 35, 473, 859, 633, 764, 812, 356, 357, 820, 799, 814, 875, 866, 867, 476, 797, 860, 857, 855, 426, 933, 934, 931, 819, 803, 468, 805, 807, 810, 811, 930, 762, 40, 21, 427, 763, 470, 932, 471, 335, 472, 358, 634, 428, 638, 640, 825, 633, 33, 34, 429, 642, 643, 646, 35, 473, 648, 649, 651, 652, 356, 357, 635, 426, 1221, 1223, 761, 842, 476, 468, 248, 760, 841, 811, 1222, 840, 40, 21, 427, 1057, 470, 830, 471, 1045, 472, 839, 1046, 428, 828, 215, 216, 939, 33, 34, 429, 217, 864, 218, 35, 473, 825, 633, 24, 865, 356, 357, 456, 1220, 1189, 209, 1187, 1172, 476, 1185, 215, 216, 1086, 1095, 1096, 914, 217, 1193, 218, 1183, -224, 1097, 26, 31, 37, 42, 76, 77, 210, 288, 209, 292, 293, 308, 309, 310, 311, 339, 1095, 1096, 825, 633, 355, 291, 416, 1152, 1097, 16, 17, 18, 393, 453, 460, 462, 466, 552, 624, 1048, 1051, 904, 1111, 1047, 1023, 563, 1022, 1088, 0, 0, -429, 558, 1041, 1101, 1102, 1103, 1104, 1098, 1099, 398, 1054, 1053, 1056, 1055, 1070, 1105, 1100, 1186, 1171, 1167, 1184, 1085, 1218, 1112, 1166, 219, 558, 599, 1101, 1102, 1103, 1104, 1098, 1099, 398, 0, 0, 0, 0, 0, 1105, 1100, 0, 0, 0, 0, 0, 0, 0, 0, 219)

Table of actions. Indexed according to $actionBase comment.

$actionBase

protected array<string|int, int> $actionBase = array(0, 227, 326, 400, 474, 233, 132, 132, 752, -2, -2, 138, -2, -2, -2, 663, 761, 815, 761, 586, 717, 859, 859, 859, 244, 256, 256, 256, 413, 583, 583, 880, 546, 169, 415, 444, 409, 200, 200, 200, 200, 137, 137, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 249, 205, 738, 559, 535, 739, 741, 742, 876, 679, 877, 820, 821, 693, 823, 824, 826, 829, 832, 819, 834, 907, 836, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 67, 536, 299, 510, 230, 44, 652, 652, 652, 652, 652, 652, 652, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 378, 584, 584, 584, 657, 909, 648, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, 503, -21, -21, 436, 650, 364, 571, 215, 426, 156, 26, 26, 329, 329, 329, 329, 329, 46, 46, 5, 5, 5, 5, 152, 186, 186, 186, 186, 120, 120, 120, 120, 374, 374, 429, 448, 448, 334, 267, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 336, 427, 427, 572, 572, 408, 551, 551, 551, 551, 671, 171, 171, 391, 311, 311, 311, 109, 641, 856, 68, 68, 68, 68, 68, 68, 324, 324, 324, -3, -3, -3, 655, 77, 380, 77, 380, 683, 685, 86, 685, 654, -15, 516, 776, 281, 646, 809, 680, 816, 560, 711, 202, 578, 857, 643, -23, 578, 578, 578, 578, 857, 622, 628, 596, -23, 578, -23, 639, 454, 849, 351, 249, 558, 469, 631, 743, 514, 688, 746, 464, 544, 548, 556, 7, 412, 708, 750, 878, 879, 349, 702, 631, 631, 631, 327, 101, 7, -8, 623, 623, 623, 623, 219, 623, 623, 623, 623, 291, 430, 545, 401, 745, 653, 653, 675, 839, 814, 814, 653, 673, 653, 675, 841, 841, 841, 841, 653, 653, 653, 653, 814, 814, 667, 814, 275, 684, 694, 694, 841, 713, 714, 653, 653, 697, 814, 814, 814, 697, 687, 841, 669, 637, 333, 814, 841, 689, 673, 689, 653, 669, 689, 673, 673, 689, 22, 686, 656, 840, 842, 860, 756, 638, 644, 847, 848, 843, 845, 838, 692, 719, 720, 528, 659, 660, 661, 662, 696, 664, 698, 643, 658, 658, 658, 645, 701, 645, 658, 658, 658, 658, 658, 658, 658, 658, 632, 635, 709, 699, 670, 723, 566, 582, 758, 640, 636, 872, 865, 881, 883, 849, 870, 645, 890, 634, 288, 610, 850, 633, 753, 645, 851, 645, 759, 645, 873, 777, 666, 778, 779, 658, 874, 891, 892, 893, 894, 897, 898, 899, 900, 665, 901, 724, 674, 866, 344, 844, 639, 705, 677, 755, 725, 780, 372, 902, 784, 645, 645, 765, 706, 645, 766, 726, 712, 862, 727, 867, 903, 640, 678, 868, 645, 681, 785, 904, 372, 690, 651, 704, 649, 728, 858, 875, 853, 767, 612, 617, 787, 788, 792, 691, 730, 863, 864, 835, 731, 770, 642, 771, 676, 794, 772, 852, 732, 796, 798, 871, 647, 707, 682, 672, 668, 773, 799, 869, 733, 735, 736, 801, 737, 804, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 137, 137, 137, -2, -2, -2, -2, 0, 0, -2, 0, 0, 0, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 0, 0, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 602, -21, -21, -21, -21, 602, -21, -21, -21, -21, -21, -21, -21, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, -21, 602, 602, 602, -21, 68, -21, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 602, 0, 0, 602, -21, 602, -21, 602, -21, -21, 602, 602, 602, 602, 602, 602, 602, -21, -21, -21, -21, -21, -21, 0, 324, 324, 324, 324, -21, -21, -21, -21, 68, 68, 147, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 324, 324, -3, -3, 68, 68, 68, 68, 68, 147, 68, 68, -23, 673, 673, 673, 380, 380, 380, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, -23, 0, -23, 0, 68, -23, 673, -23, 380, 673, 673, -23, 814, 604, 604, 604, 604, 372, 7, 0, 0, 673, 673, 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, 0, 0, 814, 0, 653, 0, 0, 0, 0, 658, 288, 0, 677, 456, 0, 0, 0, 0, 0, 0, 677, 456, 530, 530, 0, 665, 658, 658, 658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 372)

Map of states to a displacement into the $action table. The corresponding action for this state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the action is defaulted, i.e. $actionDefault[$state] should be used instead.

$actionCheck

protected array<string|int, int> $actionCheck = array(2, 3, 4, 5, 6, 7, 14, 9, 10, 11, 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, 53, 54, 55, 9, 10, 57, 30, 80, 32, 33, 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, 72, 73, 74, 75, 76, 77, 9, 70, 80, 33, 34, 35, 36, 37, 38, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 153, 133, 134, 135, 136, 137, 138, 139, 140, 141, 3, 4, 5, 6, 7, 147, 148, 149, 80, 12, 13, 159, 15, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 156, 44, 45, 46, 47, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 13, 106, 116, 108, 85, 50, 51, 33, 34, 35, 36, 56, 85, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, 73, 59, 60, 13, 82, 78, 79, 80, 80, 82, 152, 153, 154, 86, 9, 10, 11, 8, 1, 2, 44, 45, 46, 47, 48, 49, 50, 51, 52, 9, 10, 11, 156, 106, 143, 30, 160, 32, 33, 34, 35, 36, 143, 116, 116, 117, 118, 119, 120, 121, 30, 124, 125, 116, 117, 118, 119, 120, 121, 13, 133, 134, 70, 136, 137, 138, 139, 140, 141, 142, 31, 37, 38, 8, 132, 148, 149, 116, 156, 152, 153, 154, 160, 37, 38, 158, 8, 160, 161, 8, 163, 74, 75, 76, 77, 134, 135, 80, 9, 10, 11, 84, 1, 80, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 155, 98, 0, 1, 2, 30, 103, 104, 105, 106, 132, 8, 109, 110, 9, 10, 11, 8, 115, 116, 117, 118, 9, 10, 11, 82, 123, 70, 8, 126, 127, 128, 129, 8, 156, 30, 155, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 9, 10, 11, 157, 53, 54, 55, 8, 57, 155, 156, 157, 152, 153, 154, 10, 11, 157, 80, 162, 69, 30, 151, 32, 33, 34, 35, 74, 1, 2, 159, 155, 71, 80, 151, 30, 8, 84, 37, 38, 87, 88, 89, 82, 91, 82, 93, 8, 95, 13, 156, 98, 158, 13, 160, 13, 103, 104, 105, 106, 82, 108, 109, 110, 156, 8, 113, 31, 115, 116, 117, 118, 9, 10, 11, 157, 123, 37, 38, 126, 127, 128, 129, 82, 13, 159, 33, 34, 35, 82, 127, 8, 85, 30, 156, 32, 33, 34, 160, 8, 147, 74, 1, 2, 50, 51, 52, 80, 155, 156, 157, 84, 31, 159, 87, 88, 89, 82, 91, 158, 93, 160, 95, 160, 106, 98, 108, 100, 101, 102, 103, 104, 105, 106, 133, 159, 109, 110, 160, 9, 10, 11, 115, 116, 117, 118, 9, 10, 11, 8, 123, 144, 145, 126, 127, 128, 129, 82, 82, 158, 30, 160, 32, 33, 108, 8, 70, 30, 31, 113, 152, 16, 9, 10, 11, 74, 14, 14, 122, 8, 8, 80, 155, 156, 157, 84, 13, 159, 87, 88, 89, 151, 91, 30, 93, 160, 95, 155, 159, 98, 14, 100, 101, 102, 103, 104, 105, 106, 133, 16, 109, 110, 155, 157, 1, 2, 115, 116, 117, 118, 9, 10, 11, 13, 123, 16, 155, 126, 127, 128, 129, 33, 34, 158, 158, 160, 160, 156, 9, 10, 11, 30, 37, 38, 31, 70, 155, 37, 38, 50, 51, 52, 156, 16, 81, 16, 155, 156, 157, 30, 16, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 16, 57, 74, 9, 10, 11, 1, 2, 80, 116, 11, 155, 84, 69, 156, 87, 88, 89, 160, 91, 30, 93, 132, 95, 30, 33, 98, 134, 135, 30, 57, 103, 104, 105, 69, 70, 31, 109, 110, 75, 76, 155, 155, 115, 116, 75, 76, 101, 102, 111, 112, 123, 159, 155, 156, 155, 156, 155, 156, 31, 1, 2, 31, 31, 31, 31, 31, 38, 70, 69, 77, 70, 70, 70, 70, 80, 70, 70, 70, 74, 71, 85, 85, 155, 156, 80, 97, 96, 100, 84, 31, 106, 87, 88, 89, 82, 91, 82, 93, 82, 95, 89, 92, 98, 1, 2, 90, 127, 103, 104, 105, 97, 94, 127, 109, 110, 97, 97, 97, 132, 115, 116, 100, 146, 113, 143, 143, 146, 123, 106, 151, 155, 157, 74, 31, 157, 162, -1, 114, 80, -1, 116, -1, 84, -1, -1, 87, 88, 89, -1, 91, -1, 93, -1, 95, -1, 130, 98, 1, 2, 155, 156, 103, 104, 105, -1, 130, -1, 109, 110, 131, -1, 132, 132, 115, 116, 132, 74, -1, 152, 150, -1, 123, 80, 146, -1, -1, 84, 31, 146, 87, 88, 89, 146, 91, 146, 93, 146, 95, 146, 150, 98, 1, 2, 156, 159, 103, 104, 105, 155, 155, 155, 109, 110, 155, 156, 155, 155, 115, 116, 155, 155, 155, 155, 155, 155, 123, 155, 155, 155, 155, 74, 155, 155, 155, 155, 155, 80, 155, 155, 155, 84, 155, 155, 87, 88, 89, 155, 91, 155, 93, 156, 95, 156, 156, 98, 156, 156, 155, 156, 103, 104, 105, 156, 156, 156, 109, 110, 156, 156, 156, 156, 115, 116, 156, 74, 157, 157, 157, 157, 123, 80, 31, 157, 157, 84, 157, 157, 87, 88, 89, 157, 91, 157, 93, 157, 95, 157, 157, 98, 157, 50, 51, 157, 103, 104, 105, 56, 157, 58, 109, 110, 155, 156, 158, 157, 115, 116, 157, 157, 157, 70, 157, 157, 123, 157, 50, 51, 157, 78, 79, 157, 56, 157, 58, 157, 159, 86, 158, 158, 158, 158, 158, 158, 158, 158, 70, 158, 158, 158, 158, 158, 158, 158, 78, 79, 155, 156, 158, 160, 158, 163, 86, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, -1, -1, 161, 134, 161, 136, 137, 138, 139, 140, 141, 142, 162, 162, 162, 162, 162, 148, 149, 162, 162, 162, 162, 162, 162, 162, 162, 158, 134, 162, 136, 137, 138, 139, 140, 141, 142, -1, -1, -1, -1, -1, 148, 149, -1, -1, -1, -1, -1, -1, -1, -1, 158)

Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol then the action is defaulted, i.e. $actionDefault[$state] should be used instead.

$actionDefault

protected array<string|int, int> $actionDefault = array(3, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 540, 540, 495, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 297, 297, 297, 32767, 32767, 32767, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 32767, 32767, 32767, 32767, 32767, 32767, 381, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 387, 545, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 362, 363, 365, 366, 296, 548, 529, 245, 388, 544, 295, 247, 325, 499, 32767, 32767, 32767, 327, 122, 256, 201, 498, 125, 294, 232, 380, 382, 326, 301, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 300, 454, 359, 358, 357, 456, 32767, 455, 492, 492, 495, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 323, 483, 482, 324, 452, 328, 453, 331, 457, 460, 329, 330, 347, 348, 345, 346, 349, 458, 459, 476, 477, 474, 475, 299, 350, 351, 352, 353, 478, 479, 480, 481, 32767, 32767, 280, 539, 539, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 338, 339, 467, 468, 32767, 236, 236, 236, 236, 281, 236, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 333, 334, 332, 462, 463, 461, 428, 32767, 32767, 32767, 430, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 500, 32767, 32767, 32767, 32767, 32767, 513, 417, 171, 32767, 409, 32767, 171, 171, 171, 171, 32767, 220, 222, 167, 32767, 171, 32767, 486, 32767, 32767, 32767, 32767, 32767, 518, 343, 32767, 32767, 116, 32767, 32767, 32767, 555, 32767, 513, 32767, 116, 32767, 32767, 32767, 32767, 356, 335, 336, 337, 32767, 32767, 517, 511, 470, 471, 472, 473, 32767, 464, 465, 466, 469, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 425, 431, 431, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 516, 515, 32767, 410, 494, 186, 184, 184, 32767, 206, 206, 32767, 32767, 188, 487, 506, 32767, 188, 173, 32767, 398, 175, 494, 32767, 32767, 238, 32767, 238, 32767, 398, 238, 32767, 32767, 238, 32767, 411, 435, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 377, 378, 489, 502, 32767, 503, 32767, 409, 341, 342, 344, 320, 32767, 322, 367, 368, 369, 370, 371, 372, 373, 375, 32767, 415, 32767, 418, 32767, 32767, 32767, 255, 32767, 553, 32767, 32767, 304, 553, 32767, 32767, 32767, 547, 32767, 32767, 298, 32767, 32767, 32767, 32767, 251, 32767, 169, 32767, 537, 32767, 554, 32767, 511, 32767, 340, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 512, 32767, 32767, 32767, 32767, 227, 32767, 448, 32767, 116, 32767, 32767, 32767, 187, 32767, 32767, 302, 246, 32767, 32767, 546, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 114, 32767, 170, 32767, 32767, 32767, 189, 32767, 32767, 511, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 293, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 511, 32767, 32767, 231, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 411, 32767, 274, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 127, 127, 3, 127, 127, 258, 3, 258, 127, 258, 258, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 214, 217, 206, 206, 164, 127, 127, 266)

Map of states to their default action

$actionTableSize

protected int $actionTableSize = 1093

Size of $action table

$defaultAction

protected int $defaultAction = -32766

Action number signifying default action

$endAttributes

protected array<string|int, mixed> $endAttributes

End attributes of last shifted token

$endAttributeStack

protected array<string|int, array<string|int, mixed>> $endAttributeStack

End attribute stack

$errorState

protected int $errorState

Error state, used to avoid error floods

$errorSymbol

protected int $errorSymbol = 1

Symbol number of error recovery token

$goto

protected array<string|int, int> $goto = array(166, 140, 140, 140, 166, 187, 168, 144, 147, 141, 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 138, 159, 160, 161, 162, 184, 139, 185, 493, 494, 377, 495, 499, 500, 501, 502, 503, 504, 505, 506, 967, 164, 145, 146, 148, 171, 176, 186, 203, 253, 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, 395, 396, 542, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, 158, 136, 620, 560, 756, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1108, 628, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 757, 888, 888, 508, 1200, 1200, 400, 606, 508, 536, 536, 568, 532, 534, 534, 496, 498, 524, 540, 569, 572, 583, 590, 852, 852, 852, 852, 847, 853, 174, 585, 519, 600, 601, 177, 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, 497, 497, 785, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 509, 578, 582, 626, 749, 509, 544, 545, 546, 547, 548, 549, 550, 551, 553, 586, 338, 559, 321, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 530, 349, 655, 555, 587, 352, 414, 591, 575, 604, 885, 611, 612, 881, 616, 617, 623, 625, 630, 632, 298, 296, 296, 296, 298, 290, 299, 944, 610, 816, 1170, 613, 436, 436, 375, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 1072, 1084, 1083, 945, 1065, 1072, 895, 895, 895, 895, 1178, 895, 895, 1212, 1212, 1178, 388, 858, 561, 755, 1072, 1072, 1072, 1072, 1072, 1072, 3, 4, 384, 384, 384, 1212, 874, 856, 854, 856, 654, 465, 511, 883, 878, 1089, 541, 384, 537, 384, 567, 384, 1026, 19, 15, 371, 384, 1226, 510, 1204, 1192, 1192, 1192, 510, 906, 372, 522, 533, 554, 912, 514, 1068, 1069, 13, 1065, 378, 912, 1158, 594, 23, 965, 386, 386, 386, 602, 1066, 1169, 1066, 937, 447, 449, 631, 752, 1177, 1067, 1109, 614, 935, 1177, 605, 1197, 391, 1211, 1211, 543, 892, 386, 1194, 1194, 1194, 399, 518, 1016, 901, 389, 771, 529, 752, 340, 752, 1211, 518, 518, 385, 781, 1214, 770, 772, 1063, 910, 774, 1058, 1176, 659, 953, 514, 782, 862, 915, 450, 573, 1155, 0, 463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, 528, 0, 0, 0, 0, 513, 0, 528, 0, 350, 351, 0, 609, 512, 515, 438, 439, 1064, 618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 779, 1219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 523, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 301)

Table of states to goto after reduction. Indexed according to $gotoBase comment.

$gotoBase

protected array<string|int, int> $gotoBase = array(0, 0, -184, 0, 0, 356, 290, 0, 488, 149, 0, 182, 85, 118, 426, 112, 203, 179, 208, 0, 0, 0, 0, 162, 190, 198, 120, 27, 0, 272, -224, 0, -274, 406, 32, 0, 0, 0, 0, 0, 330, 0, 0, -24, 0, 0, 440, 485, 213, 218, 371, -74, 0, 0, 0, 0, 0, 107, 110, 0, 0, -11, -72, 0, 104, 95, -405, 0, -94, 41, 119, -82, 0, 164, 0, 0, -79, 0, 197, 0, 204, 43, 0, 441, 171, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 115, 0, 195, 210, 0, 0, 0, 0, 0, 86, 427, 259, 0, 0, 116, 0, 174, 0, -5, 117, 196, 0, 0, 161, 170, 93, -21, -48, 273, 0, 0, 91, 271, 0, 0, 0, 0, 0, 0, 216, 0, 437, 187, 102, 0, 0)

Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted)

$gotoCheck

protected array<string|int, int> $gotoCheck = array(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, 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, 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, 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, 57, 68, 15, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 126, 9, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 16, 76, 76, 68, 76, 76, 51, 51, 68, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 68, 68, 68, 68, 68, 68, 27, 66, 101, 66, 66, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 117, 117, 29, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 61, 61, 61, 6, 117, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 125, 57, 125, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 32, 71, 32, 32, 69, 69, 69, 32, 40, 40, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 5, 5, 5, 5, 5, 5, 5, 97, 62, 50, 81, 62, 57, 57, 62, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 124, 124, 97, 81, 57, 57, 57, 57, 57, 118, 57, 57, 142, 142, 118, 12, 33, 12, 14, 57, 57, 57, 57, 57, 57, 30, 30, 13, 13, 13, 142, 14, 14, 14, 14, 14, 57, 14, 14, 14, 34, 2, 13, 109, 13, 2, 13, 34, 34, 34, 34, 13, 13, 122, 140, 9, 9, 9, 122, 83, 58, 58, 58, 34, 13, 13, 81, 81, 58, 81, 46, 13, 131, 127, 34, 101, 123, 123, 123, 34, 81, 81, 81, 8, 8, 8, 8, 11, 119, 81, 8, 8, 8, 119, 49, 138, 48, 141, 141, 47, 78, 123, 119, 119, 119, 123, 47, 102, 80, 17, 23, 9, 11, 18, 11, 141, 47, 47, 11, 23, 141, 23, 24, 115, 84, 25, 113, 119, 73, 99, 13, 26, 70, 85, 64, 65, 130, -1, 108, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, 9, -1, 9, -1, 71, 71, -1, 13, 9, 9, 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5)

Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used.

$gotoDefault

protected array<string|int, int> $gotoDefault = array(-32768, 467, 663, 2, 664, 834, 739, 747, 597, 481, 629, 581, 380, 1188, 791, 792, 793, 381, 367, 482, 379, 410, 405, 780, 773, 775, 783, 172, 411, 786, 1, 788, 517, 824, 1017, 364, 796, 365, 589, 798, 526, 800, 801, 137, 382, 383, 527, 483, 390, 576, 815, 276, 387, 817, 366, 818, 827, 370, 464, 454, 459, 556, 608, 432, 446, 570, 564, 535, 1081, 565, 861, 348, 869, 660, 877, 880, 484, 557, 891, 451, 899, 1094, 397, 905, 911, 916, 287, 919, 417, 412, 584, 924, 925, 5, 929, 621, 622, 8, 312, 952, 598, 966, 420, 1036, 1038, 485, 486, 521, 458, 507, 525, 487, 1059, 440, 413, 1062, 488, 489, 433, 434, 1078, 354, 1163, 353, 448, 320, 1150, 579, 1113, 455, 1203, 1159, 347, 490, 491, 376, 1182, 392, 1198, 437, 1205, 1213, 343, 539, 566)

Map of non-terminals to the default state to goto after their reduction

$gotoTableSize

protected int $gotoTableSize = 643

Size of $goto table

$invalidSymbol

protected int $invalidSymbol = 168

Symbol number signifying an invalid token

$lookaheadStartAttributes

protected array<string|int, mixed> $lookaheadStartAttributes

Start attributes of last read token

$numNonLeafStates

protected int $numNonLeafStates = 662

Number of non-leaf states

$productions

protected array<string|int, mixed> $productions

Names of the production rules (only necessary for debugging)

$reduceCallbacks

protected array<string|int, callable> $reduceCallbacks

Semantic action callbacks

$ruleToLength

protected array<string|int, int> $ruleToLength = array(1, 1, 2, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 2, 3, 1, 3, 3, 1, 3, 2, 0, 1, 1, 1, 1, 1, 3, 5, 8, 3, 5, 9, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 1, 2, 2, 5, 7, 9, 5, 6, 3, 3, 2, 2, 1, 1, 1, 0, 2, 8, 0, 4, 1, 3, 0, 1, 0, 1, 0, 1, 10, 7, 6, 5, 1, 2, 2, 0, 2, 0, 2, 0, 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, 1, 4, 0, 2, 3, 0, 2, 4, 0, 2, 0, 3, 1, 2, 1, 1, 0, 1, 3, 4, 6, 1, 1, 1, 0, 1, 0, 2, 2, 3, 3, 1, 3, 1, 2, 2, 3, 1, 1, 2, 4, 3, 1, 1, 3, 2, 0, 1, 3, 3, 9, 3, 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, 3, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 0, 1, 1, 3, 3, 4, 4, 1, 2, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 5, 4, 3, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, 2, 1, 2, 10, 11, 3, 3, 2, 4, 4, 3, 4, 4, 4, 4, 7, 3, 2, 0, 4, 1, 3, 2, 2, 4, 6, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, 4, 0, 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 1, 4, 3, 1, 3, 3, 3, 3, 3, 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, 5, 4, 4, 3, 1, 3, 1, 1, 3, 3, 0, 2, 0, 1, 3, 1, 3, 1, 1, 1, 1, 1, 6, 4, 3, 4, 2, 4, 4, 1, 3, 1, 2, 1, 1, 4, 1, 1, 3, 6, 4, 4, 4, 4, 1, 4, 0, 1, 1, 3, 1, 1, 4, 3, 1, 1, 1, 0, 0, 2, 3, 1, 3, 1, 4, 2, 2, 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, 6, 3, 1, 1, 1)

Map of rules to the length of their right-hand side, which is the number of elements that have to be popped from the stack(s) on reduction.

$ruleToNonTerminal

protected array<string|int, int> $ruleToNonTerminal = array(0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, 48, 58, 58, 59, 59, 60, 60, 15, 16, 16, 16, 63, 63, 63, 64, 64, 67, 67, 65, 65, 69, 69, 41, 41, 50, 50, 53, 53, 53, 52, 52, 70, 42, 42, 42, 42, 71, 71, 72, 72, 73, 73, 39, 39, 35, 35, 74, 37, 37, 75, 36, 36, 38, 38, 49, 49, 49, 61, 61, 77, 77, 78, 78, 80, 80, 80, 79, 79, 62, 62, 81, 81, 81, 82, 82, 83, 83, 83, 44, 44, 84, 84, 84, 45, 45, 85, 85, 86, 86, 66, 87, 87, 87, 87, 92, 92, 93, 93, 94, 94, 94, 94, 94, 95, 96, 96, 91, 91, 88, 88, 90, 90, 98, 98, 97, 97, 97, 97, 97, 97, 89, 89, 100, 99, 99, 46, 46, 40, 40, 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, 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, 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, 34, 34, 47, 47, 105, 105, 106, 106, 106, 106, 112, 101, 101, 108, 108, 114, 114, 115, 116, 116, 116, 116, 116, 116, 68, 68, 57, 57, 57, 57, 102, 102, 120, 120, 117, 117, 121, 121, 121, 121, 103, 103, 103, 107, 107, 107, 113, 113, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 27, 27, 27, 27, 27, 27, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 111, 111, 104, 104, 104, 104, 127, 127, 130, 130, 129, 129, 131, 131, 51, 51, 51, 51, 133, 133, 132, 132, 132, 132, 132, 134, 134, 119, 119, 122, 122, 118, 118, 136, 135, 135, 135, 135, 123, 123, 123, 123, 110, 110, 124, 124, 124, 124, 76, 137, 137, 138, 138, 138, 109, 109, 139, 139, 140, 140, 140, 140, 140, 125, 125, 125, 125, 142, 143, 141, 141, 141, 141, 141, 141, 141, 144, 144, 144)

Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for determining the state to goto after reduction.

$semStack

protected array<string|int, mixed> $semStack

Semantic value stack (contains values of tokens and semantic action results)

$semValue

protected mixed $semValue

Temporary value containing the result of last semantic action (reduction)

$startAttributeStack

protected array<string|int, array<string|int, mixed>> $startAttributeStack

Start attribute stack

$symbolToName

protected array<string|int, string> $symbolToName = array("EOF", "error", "T_THROW", "T_INCLUDE", "T_INCLUDE_ONCE", "T_EVAL", "T_REQUIRE", "T_REQUIRE_ONCE", "','", "T_LOGICAL_OR", "T_LOGICAL_XOR", "T_LOGICAL_AND", "T_PRINT", "T_YIELD", "T_DOUBLE_ARROW", "T_YIELD_FROM", "'='", "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", "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", "T_BOOLEAN_OR", "T_BOOLEAN_AND", "'|'", "'^'", "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", "T_IS_EQUAL", "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", "T_IS_NOT_IDENTICAL", "T_SPACESHIP", "'<'", "T_IS_SMALLER_OR_EQUAL", "'>'", "T_IS_GREATER_OR_EQUAL", "T_SL", "T_SR", "'+'", "'-'", "'.'", "'*'", "'/'", "'%'", "'!'", "T_INSTANCEOF", "'~'", "T_INC", "T_DEC", "T_INT_CAST", "T_DOUBLE_CAST", "T_STRING_CAST", "T_ARRAY_CAST", "T_OBJECT_CAST", "T_BOOL_CAST", "T_UNSET_CAST", "'@'", "T_POW", "'['", "T_NEW", "T_CLONE", "T_EXIT", "T_IF", "T_ELSEIF", "T_ELSE", "T_ENDIF", "T_LNUMBER", "T_DNUMBER", "T_STRING", "T_STRING_VARNAME", "T_VARIABLE", "T_NUM_STRING", "T_INLINE_HTML", "T_ENCAPSED_AND_WHITESPACE", "T_CONSTANT_ENCAPSED_STRING", "T_ECHO", "T_DO", "T_WHILE", "T_ENDWHILE", "T_FOR", "T_ENDFOR", "T_FOREACH", "T_ENDFOREACH", "T_DECLARE", "T_ENDDECLARE", "T_AS", "T_SWITCH", "T_MATCH", "T_ENDSWITCH", "T_CASE", "T_DEFAULT", "T_BREAK", "T_CONTINUE", "T_GOTO", "T_FUNCTION", "T_FN", "T_CONST", "T_RETURN", "T_TRY", "T_CATCH", "T_FINALLY", "T_USE", "T_INSTEADOF", "T_GLOBAL", "T_STATIC", "T_ABSTRACT", "T_FINAL", "T_PRIVATE", "T_PROTECTED", "T_PUBLIC", "T_VAR", "T_UNSET", "T_ISSET", "T_EMPTY", "T_HALT_COMPILER", "T_CLASS", "T_TRAIT", "T_INTERFACE", "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", "T_LIST", "T_ARRAY", "T_CALLABLE", "T_CLASS_C", "T_TRAIT_C", "T_METHOD_C", "T_FUNC_C", "T_LINE", "T_FILE", "T_START_HEREDOC", "T_END_HEREDOC", "T_DOLLAR_OPEN_CURLY_BRACES", "T_CURLY_OPEN", "T_PAAMAYIM_NEKUDOTAYIM", "T_NAMESPACE", "T_NS_C", "T_DIR", "T_NS_SEPARATOR", "T_ELLIPSIS", "T_NAME_FULLY_QUALIFIED", "T_NAME_QUALIFIED", "T_NAME_RELATIVE", "';'", "'{'", "'}'", "'('", "')'", "'\$'", "'`'", "']'", "'\"'", "T_READONLY", "T_ENUM", "T_NULLSAFE_OBJECT_OPERATOR", "T_ATTRIBUTE")

Map of symbols to their names

$tokenToSymbol

protected array<string|int, int> $tokenToSymbol = array(0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 163, 168, 160, 55, 168, 168, 158, 159, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 155, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 70, 168, 162, 36, 168, 161, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 156, 35, 157, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 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, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 164, 122, 123, 124, 125, 126, 127, 128, 129, 165, 130, 131, 132, 166, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 167)

Map of lexer tokens to internal symbols

$tokenToSymbolMapSize

protected int $tokenToSymbolMapSize = 396

Size of $tokenToSymbol map

$unexpectedTokenRule

protected int $unexpectedTokenRule = 32767

Rule number signifying that an unexpected token was encountered

$YY2TBLSTATE

protected mixed $YY2TBLSTATE = 415

Methods

__construct()

Creates a parser instance.

public __construct(Lexer $lexer[, array<string|int, mixed> $options = [] ]) : mixed

Options: Currently none.

Parameters
$lexer : Lexer

A lexer

$options : array<string|int, mixed> = []

Options array.

Return values
mixed

parse()

Parses PHP code into a node tree.

public parse(string $code[, ErrorHandler|null $errorHandler = null ]) : array<string|int, Stmt>|null

If a non-throwing error handler is used, the parser will continue parsing after an error occurred and attempt to build a partial AST.

Parameters
$code : string

The source code to parse

$errorHandler : ErrorHandler|null = null

Error handler to use for lexer/parser errors, defaults to ErrorHandler\Throwing.

Return values
array<string|int, Stmt>|null

Array of statements (or null non-throwing error handler is used and the parser was unable to recover from an error).

checkClass()

protected checkClass(Class_ $node, mixed $namePos) : mixed
Parameters
$node : Class_
$namePos : mixed
Return values
mixed

checkClassConst()

protected checkClassConst(ClassConst $node, mixed $modifierPos) : mixed
Parameters
$node : ClassConst
$modifierPos : mixed
Return values
mixed

checkClassModifier()

protected checkClassModifier(mixed $a, mixed $b, mixed $modifierPos) : mixed
Parameters
$a : mixed
$b : mixed
$modifierPos : mixed
Return values
mixed

checkEnum()

protected checkEnum(Enum_ $node, mixed $namePos) : mixed
Parameters
$node : Enum_
$namePos : mixed
Return values
mixed

checkModifier()

protected checkModifier(mixed $a, mixed $b, mixed $modifierPos) : mixed
Parameters
$a : mixed
$b : mixed
$modifierPos : mixed
Return values
mixed

checkProperty()

protected checkProperty(Property $node, mixed $modifierPos) : mixed
Parameters
$node : Property
$modifierPos : mixed
Return values
mixed

checkUseUse()

protected checkUseUse(UseUse $node, mixed $namePos) : mixed
Parameters
$node : UseUse
$namePos : mixed
Return values
mixed

createCommentNopAttributes()

Create attributes for a zero-length common-capturing nop.

protected createCommentNopAttributes(array<string|int, Comment$comments) : array<string|int, mixed>
Parameters
$comments : array<string|int, Comment>
Return values
array<string|int, mixed>

fixupPhp5StaticPropCall()

Fix up parsing of static property calls in PHP 5.

protected fixupPhp5StaticPropCall(StaticPropertyFetch|ArrayDimFetch $prop, array<string|int, Arg$args, array<string|int, mixed> $attributes) : StaticCall

In PHP 5 A::$b[c][d] and A::$b[c]d have very different interpretation. The former is interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the latter as the former initially and this method fixes the AST into the correct form when we encounter the "()".

Parameters
$prop : StaticPropertyFetch|ArrayDimFetch
$args : array<string|int, Arg>
$attributes : array<string|int, mixed>
Return values
StaticCall

fixupStartAttributes()

protected fixupStartAttributes(Node $to, Node $from) : mixed
Parameters
$to : Node
$from : Node
Return values
mixed

getAttributesAt()

Get combined start and end attributes at a stack location

protected getAttributesAt(int $pos) : array<string|int, mixed>
Parameters
$pos : int

Stack location

Return values
array<string|int, mixed>

Combined start and end attributes

getErrorMessage()

Format error message including expected tokens.

protected getErrorMessage(int $symbol, int $state) : string
Parameters
$symbol : int

Unexpected symbol

$state : int

State at time of error

Return values
string

Formatted error message

getExpectedTokens()

Get limited number of expected tokens in given state.

protected getExpectedTokens(int $state) : array<string|int, string>
Parameters
$state : int

State

Return values
array<string|int, string>

Expected tokens. If too many, an empty array is returned.

getFloatCastKind()

protected getFloatCastKind(string $cast) : int
Parameters
$cast : string
Return values
int

handleBuiltinTypes()

protected handleBuiltinTypes(Name $name) : mixed
Parameters
$name : Name
Return values
mixed

handleNamespaces()

Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.

protected handleNamespaces(array<string|int, Stmt$stmts) : array<string|int, Stmt>
Parameters
$stmts : array<string|int, Stmt>
Return values
array<string|int, Stmt>

initReduceCallbacks()

Initialize $reduceCallbacks map.

protected initReduceCallbacks() : mixed
Return values
mixed

parseDocString()

protected parseDocString(string $startToken, mixed $contents, string $endToken, array<string|int, mixed> $attributes, array<string|int, mixed> $endTokenAttributes, bool $parseUnicodeEscape) : mixed
Parameters
$startToken : string
$contents : mixed
$endToken : string
$attributes : array<string|int, mixed>
$endTokenAttributes : array<string|int, mixed>
$parseUnicodeEscape : bool
Return values
mixed

parseLNumber()

protected parseLNumber(mixed $str, mixed $attributes[, mixed $allowInvalidOctal = false ]) : mixed
Parameters
$str : mixed
$attributes : mixed
$allowInvalidOctal : mixed = false
Return values
mixed

parseNumString()

Parse a T_NUM_STRING token into either an integer or string node.

protected parseNumString(string $str, array<string|int, mixed> $attributes) : LNumber|String_
Parameters
$str : string

Number string

$attributes : array<string|int, mixed>

Attributes

Return values
LNumber|String_

Integer or string node.

stripIndentation()

protected stripIndentation(string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array<string|int, mixed> $attributes) : mixed
Parameters
$string : string
$indentLen : int
$indentChar : string
$newlineAtStart : bool
$newlineAtEnd : bool
$attributes : array<string|int, mixed>
Return values
mixed

checkClassName()

private checkClassName(mixed $name, mixed $namePos) : mixed
Parameters
$name : mixed
$namePos : mixed
Return values
mixed

checkImplementedInterfaces()

private checkImplementedInterfaces(array<string|int, mixed> $interfaces) : mixed
Parameters
$interfaces : array<string|int, mixed>
Return values
mixed

getNamespacingStyle()

Determine namespacing style (semicolon or brace)

private getNamespacingStyle(array<string|int, Node$stmts) : null|string
Parameters
$stmts : array<string|int, Node>

Top-level statements.

Return values
null|string

One of "semicolon", "brace" or null (no namespaces)

Search results