Documentation

Php7 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(132, 133, 134, 568, 135, 136, 0, 721, 722, 723, 137, 37, 921, 448, 449, 450, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 101, 102, 103, 104, 105, 1071, 1072, 1073, 1070, 1069, 1068, 1074, 715, 714, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, 371, 372, 240, 2, 724, -32766, -32766, -32766, 1001, 1002, 415, 956, -32766, -32766, -32766, 373, 372, 12, 267, 138, 397, 728, 729, 730, 731, 415, -32766, 421, -32766, -32766, -32766, -32766, -32766, -32766, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 762, 569, 763, 764, 765, 766, 754, 755, 337, 338, 757, 758, 743, 744, 745, 747, 748, 749, 347, 789, 790, 791, 792, 793, 794, 750, 751, 570, 571, 783, 774, 772, 773, 786, 769, 770, 284, 421, 572, 573, 768, 574, 575, 576, 577, 578, 579, 597, -579, -32766, -32766, 797, 771, 580, 581, -579, 139, -32766, -32766, -32766, 132, 133, 134, 568, 135, 136, 1020, 721, 722, 723, 137, 37, -32766, -32766, -32766, 542, 1306, 126, -32766, 1307, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1071, 1072, 1073, 1070, 1069, 1068, 1074, 957, 715, 714, -318, 993, 1261, -32766, -32766, -32766, -576, 106, 107, 108, -268, 270, 890, -576, 910, 1196, 1195, 1197, 724, -32766, -32766, -32766, 1049, 109, -32766, -32766, -32766, -32766, 989, 988, 987, 990, 267, 138, 397, 728, 729, 730, 731, 1233, -32766, 421, -32766, -32766, -32766, -32766, 1001, 1002, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 762, 569, 763, 764, 765, 766, 754, 755, 337, 338, 757, 758, 743, 744, 745, 747, 748, 749, 347, 789, 790, 791, 792, 793, 794, 750, 751, 570, 571, 783, 774, 772, 773, 786, 769, 770, 880, 321, 572, 573, 768, 574, 575, 576, 577, 578, 579, -32766, 82, 83, 84, -579, 771, 580, 581, -579, 148, 746, 716, 717, 718, 719, 720, 1281, 721, 722, 723, 759, 760, 36, 1280, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 999, 270, -318, -32766, -32766, -32766, 456, 457, 81, -193, 808, -576, 1019, 109, 320, -576, 892, 724, 681, 802, 695, 1001, 1002, 591, -32766, 1047, -32766, -32766, -32766, 715, 714, 725, 726, 727, 728, 729, 730, 731, -192, -86, 795, 279, -530, 284, -32766, -32766, -32766, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 762, 785, 763, 764, 765, 766, 754, 755, 756, 784, 757, 758, 743, 744, 745, 747, 748, 749, 788, 789, 790, 791, 792, 793, 794, 750, 751, 752, 753, 783, 774, 772, 773, 786, 769, 770, 470, 803, 761, 767, 768, 775, 776, 778, 777, 779, 780, -86, -530, -530, 637, 25, 771, 782, 781, 49, 50, 51, 501, 52, 53, 239, 34, -530, 890, 54, 55, -111, 56, 999, 128, -32766, -111, 1201, -111, -530, -570, -536, 890, 300, -570, 144, -111, -111, -111, -111, -111, -111, -111, -111, 1001, 1002, 1001, 1002, 686, 1201, 925, 926, 1194, 806, 890, 927, 1296, 57, 58, 799, 253, -193, 687, 59, 807, 60, 246, 247, 61, 62, 63, 64, 65, 66, 67, 68, 304, 27, 268, 69, 437, 502, -332, 306, 688, 1227, 1228, 503, 1192, 806, -192, 318, 890, 1225, 41, 24, 504, 334, 505, 14, 506, 880, 507, 653, 654, 508, 509, 280, 806, 281, 43, 44, 438, 368, 367, 880, 45, 510, 35, 249, 471, 1063, 359, 333, 103, 104, 105, 1196, 1195, 1197, 806, 511, 512, 513, 335, 801, 1221, 880, 361, 285, 683, 286, 365, 514, 515, 380, 1215, 1216, 1217, 1218, 1212, 1213, 292, 433, -111, 715, 714, 434, 1219, 1214, 149, 400, 1196, 1195, 1197, 293, -153, -153, -153, -356, 70, -356, 316, 317, 320, 880, 892, -531, 681, 435, 1048, -153, 707, -153, 293, -153, 1277, -153, 27, 74, 892, 436, 681, 320, 369, 370, 833, 366, 834, -529, 806, 382, 812, 11, 1225, 833, 150, 834, -111, -111, 151, 74, 942, -111, 681, 320, 153, 806, 866, -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 715, 714, 374, 375, -531, -531, 890, 154, 805, 155, -4, 890, 157, 892, -88, 681, -153, 514, 515, -531, 1215, 1216, 1217, 1218, 1212, 1213, -529, -529, 797, 1108, 1110, -531, 1219, 1214, 715, 714, 690, -32766, 629, 630, -528, -529, 32, 1194, 72, 123, 124, 317, 320, 129, -32766, -32766, -32766, -529, -32766, -535, -32766, 130, -32766, 140, 143, -32766, 158, 159, 160, 320, -32766, -32766, -32766, 161, -528, -32766, -32766, -32766, -79, 282, -75, 1194, -32766, 412, -73, 27, -72, -71, -32766, -32766, -32766, -32766, -32766, 880, -32766, 287, -32766, 806, 880, -32766, -70, 1225, -69, -68, -32766, -32766, -32766, -67, -528, -528, -32766, -32766, -66, 141, -47, -18, -32766, 412, 147, 320, 366, 73, 428, -528, 271, -32766, 278, 291, -51, 696, 699, -111, -111, 1201, -533, -528, -111, 889, -528, -528, 48, 825, -111, -111, -111, -111, 146, 327, 283, 270, 288, 109, 515, -528, 1215, 1216, 1217, 1218, 1212, 1213, 131, 906, 661, -16, 9, -528, 1219, 1214, 892, 797, 681, -32766, 145, 892, 1308, 681, -4, 1194, 72, -32766, 638, 317, 320, 806, -32766, -32766, -32766, 1078, -32766, 544, -32766, 627, -32766, 13, 656, -32766, 548, 298, -533, -533, -32766, -32766, -32766, -32766, 296, 297, -32766, -32766, 674, 1194, 643, 890, -32766, 412, 806, 453, -32766, -32766, -32766, 364, -32766, -32766, -32766, 481, -32766, -533, -32766, -32766, 47, -494, 890, 127, -32766, -32766, -32766, -32766, 644, 657, -32766, -32766, 305, 1194, 890, 805, -32766, 412, 1222, 301, -32766, -32766, -32766, 0, -32766, -32766, -32766, 432, -32766, 299, 922, -32766, -111, 293, 554, 476, -32766, -32766, -32766, -32766, 1232, -484, -32766, -32766, 697, 1194, 560, 908, -32766, 412, 595, 817, -32766, -32766, -32766, 7, -32766, -32766, -32766, 1234, -32766, 16, 293, -32766, 294, 295, 880, 74, -32766, -32766, -32766, 320, 363, 39, -32766, -32766, 40, 704, 705, 871, -32766, 412, -246, -246, -246, 880, 966, 943, 366, -32766, 950, 125, 1247, 940, 951, 869, 938, 880, 1052, -111, -111, -245, -245, -245, -111, 1055, 1056, 366, 1053, 866, -111, -111, -111, -111, 1054, 1060, 701, 1265, -111, -111, 1299, 632, -564, -111, 33, 315, -271, 362, 866, -111, -111, -111, -111, 682, 685, 689, 691, 692, 693, 694, -32766, 892, 698, 681, -246, 684, 1194, 867, 1303, 1305, 828, 827, 836, -32766, -32766, -32766, 915, -32766, 958, -32766, 892, -32766, 681, -245, -32766, 835, 1304, 914, 916, -32766, -32766, -32766, 892, 913, 681, -32766, -32766, 1180, 899, 909, 897, -32766, 412, 948, 949, 1302, 1259, 1248, 1266, 1272, -32766, 1275, -269, -562, -536, -535, -534, 1, 28, 29, 38, 42, 46, 71, 75, 76, 77, 78, 79, 80, 142, 152, 156, 245, 322, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 360, 429, 0, -268, 0, 18, 19, 20, 21, 23, 399, 472, 473, 480, 483, 484, 485, 486, 490, 491, 492, 499, 668, 1205, 1148, 1223, 1022, 1021, 1184, -273, -103, 17, 22, 26, 290, 398, 588, 592, 619, 673, 1152, 1200, 1149, 1278, 0, -498, 1165, 0, 1226, 0, 320)

Table of actions. Indexed according to $actionBase comment.

$actionBase

protected array<string|int, int> $actionBase = array(0, -2, 154, 542, 698, 894, 913, 586, 53, 430, 867, 307, 307, 67, 307, 307, 307, 482, 693, 693, 925, 693, 468, 504, 204, 204, 204, 651, 651, 651, 651, 685, 685, 845, 845, 877, 813, 781, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 356, 31, 369, 716, 1008, 1014, 1010, 1015, 1006, 1005, 1009, 1011, 1016, 935, 936, 799, 937, 938, 939, 941, 1012, 873, 1007, 1013, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 290, 159, 136, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 54, 54, 54, 187, 569, 569, 341, 203, 658, 47, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 144, 144, 7, 7, 7, 7, 7, 371, -25, -25, -25, -25, 816, 477, 102, 499, 358, 449, 514, 525, 525, 360, -116, 231, 231, 231, 231, 231, 231, -78, -78, -78, -78, -78, 319, 580, 541, 86, 423, 636, 636, 636, 636, 423, 423, 423, 423, 825, 1020, 423, 423, 423, 558, 688, 688, 754, 147, 147, 147, 688, 550, 788, 422, 550, 422, 194, 92, 794, -55, -40, 321, 814, 794, 748, 842, 198, 143, 772, 539, 772, 1004, 778, 767, 733, 868, 896, 1017, 820, 933, 821, 934, 219, 731, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1021, 339, 1004, 286, 1021, 1021, 1021, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 615, 286, 380, 479, 286, 796, 339, 356, 804, 356, 356, 356, 356, 964, 356, 356, 356, 356, 356, 356, 969, 768, 410, 356, 31, 206, 206, 472, 193, 206, 206, 206, 206, 356, 356, 356, 539, 776, 793, 584, 809, 377, 776, 776, 776, 355, 185, 39, 348, 555, 523, 546, 773, 773, 789, 946, 946, 773, 785, 773, 789, 951, 773, 946, 787, 467, 596, 540, 585, 600, 946, 519, 773, 773, 773, 773, 622, 773, 503, 478, 773, 773, 749, 779, 792, 46, 946, 946, 946, 792, 581, 808, 808, 808, 830, 831, 762, 777, 534, 526, 645, 459, 807, 777, 777, 773, 588, 762, 777, 762, 777, 805, 777, 777, 777, 762, 777, 785, 577, 777, 734, 634, 60, 777, 6, 952, 953, 671, 954, 949, 955, 976, 956, 957, 884, 962, 950, 958, 948, 947, 790, 717, 718, 818, 764, 945, 766, 766, 766, 943, 766, 766, 766, 766, 766, 766, 766, 766, 717, 770, 835, 811, 791, 965, 721, 729, 806, 897, 1018, 1019, 964, 997, 959, 826, 732, 983, 966, 866, 876, 967, 968, 984, 998, 999, 898, 786, 899, 900, 803, 970, 885, 766, 952, 957, 950, 958, 948, 947, 765, 760, 755, 756, 753, 740, 737, 739, 771, 1000, 942, 871, 844, 969, 944, 717, 869, 979, 875, 985, 986, 878, 802, 775, 872, 901, 971, 972, 973, 886, 1001, 829, 980, 874, 987, 810, 902, 988, 989, 990, 991, 906, 887, 888, 889, 832, 774, 940, 798, 908, 643, 744, 797, 975, 647, 963, 890, 915, 916, 992, 993, 994, 917, 960, 839, 981, 784, 982, 977, 840, 843, 653, 728, 795, 681, 683, 918, 923, 927, 961, 782, 769, 846, 847, 1002, 928, 686, 848, 735, 929, 996, 736, 741, 800, 893, 824, 817, 780, 974, 783, 849, 930, 851, 858, 859, 995, 861, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, 0, 0, 307, 0, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, 291, 787, 147, 147, 147, 147, 423, 423, 423, 423, 423, -88, -88, 147, 147, 423, 384, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, 286, 422, 0, 785, 785, 785, 785, 0, 0, 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286, 422, 0, 286, 0, 785, 785, 423, 787, 787, 314, 384, 423, 0, 0, 0, 0, 286, 785, 286, 339, 422, 339, 339, 206, 356, 314, 510, 510, 510, 510, 0, 539, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 785, 0, 787, 0, 785, 785, 785, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 0, 946, 0, 0, 0, 0, 773, 0, 0, 0, 0, 0, 0, 773, 951, 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, 0, 0, 766, 802, 0, 802, 0, 766, 766, 766)

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

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, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 582, 582, 582, 582, 32767, 32767, 250, 103, 32767, 32767, 458, 376, 376, 376, 32767, 32767, 526, 526, 526, 526, 526, 526, 32767, 32767, 32767, 32767, 32767, 32767, 458, 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, 101, 32767, 32767, 32767, 37, 7, 8, 10, 11, 50, 17, 314, 32767, 32767, 32767, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 575, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 462, 441, 442, 444, 445, 375, 527, 581, 317, 578, 374, 146, 329, 319, 238, 320, 254, 463, 255, 464, 467, 468, 211, 283, 371, 150, 405, 459, 407, 457, 461, 406, 381, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 379, 380, 460, 438, 437, 436, 403, 32767, 32767, 404, 408, 378, 411, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 409, 410, 427, 428, 425, 426, 429, 32767, 430, 431, 432, 433, 32767, 32767, 306, 32767, 32767, 355, 353, 418, 419, 306, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 520, 435, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 101, 522, 400, 402, 490, 413, 414, 412, 382, 32767, 497, 32767, 103, 499, 32767, 32767, 32767, 112, 32767, 32767, 32767, 32767, 521, 32767, 528, 528, 32767, 483, 101, 194, 32767, 194, 194, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 589, 483, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 32767, 194, 111, 32767, 32767, 32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 189, 32767, 264, 266, 103, 543, 194, 32767, 502, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 495, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 483, 423, 139, 32767, 139, 528, 415, 416, 417, 485, 528, 528, 528, 302, 285, 32767, 32767, 32767, 32767, 500, 500, 101, 101, 101, 101, 495, 32767, 32767, 112, 100, 100, 100, 100, 100, 104, 102, 32767, 32767, 32767, 32767, 100, 32767, 102, 102, 32767, 32767, 221, 208, 219, 102, 32767, 547, 548, 219, 102, 223, 223, 223, 243, 243, 474, 308, 102, 100, 102, 102, 196, 308, 308, 32767, 102, 474, 308, 474, 308, 198, 308, 308, 308, 474, 308, 32767, 102, 308, 210, 100, 100, 308, 32767, 32767, 32767, 485, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 515, 32767, 532, 545, 421, 422, 424, 530, 446, 447, 448, 449, 450, 451, 452, 454, 577, 32767, 489, 32767, 32767, 32767, 32767, 328, 587, 32767, 587, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 588, 32767, 528, 32767, 32767, 32767, 32767, 420, 9, 76, 43, 44, 52, 58, 506, 507, 508, 509, 503, 504, 510, 505, 32767, 32767, 511, 553, 32767, 32767, 529, 580, 32767, 32767, 32767, 32767, 32767, 32767, 139, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 515, 32767, 137, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 528, 32767, 32767, 32767, 304, 305, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 528, 32767, 32767, 32767, 287, 288, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 282, 32767, 32767, 370, 32767, 32767, 32767, 32767, 349, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 152, 152, 3, 3, 331, 152, 152, 152, 331, 152, 331, 331, 331, 152, 152, 152, 152, 152, 152, 276, 184, 258, 261, 243, 243, 152, 341, 152)

Map of states to their default action

$actionTableSize

protected int $actionTableSize = 1189

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(194, 194, 669, 423, 642, 883, 839, 884, 1025, 417, 308, 309, 330, 562, 314, 422, 331, 424, 621, 823, 677, 851, 824, 585, 838, 857, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 522, 523, 413, 524, 526, 527, 528, 529, 530, 531, 532, 533, 1094, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 274, 275, 311, 312, 313, 418, 419, 420, 567, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, 236, 186, 187, 188, 189, 190, 215, 1094, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, 211, 323, 323, 323, 323, 826, 607, 607, 800, 546, 539, 1189, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1242, 1242, 343, 464, 1267, 1268, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 389, 539, 546, 555, 556, 396, 565, 587, 601, 602, 831, 798, 879, 874, 875, 888, 15, 832, 876, 829, 877, 878, 830, 455, 455, 941, 882, 804, 1190, 251, 251, 559, 455, 1240, 1240, 814, 1046, 1042, 1043, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 605, 639, 1191, 1250, 1251, 341, 248, 248, 248, 248, 250, 252, 819, 819, 1193, 1193, 1000, 1193, 1000, 804, 416, 804, 596, 1000, 1282, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1264, 1264, 962, 1264, 1193, 488, 5, 489, 6, 1193, 1193, 1193, 1193, 495, 385, 1193, 1193, 1193, 1274, 1274, 1274, 1274, 277, 277, 277, 277, 558, 1276, 1276, 1276, 1276, 1066, 1067, 895, 346, 553, 319, 303, 896, 703, 620, 622, 641, 640, 346, 346, 1143, 659, 663, 976, 667, 675, 972, 1260, 430, 1292, 1292, 332, 346, 346, 816, 346, 636, 1309, 650, 651, 652, 844, 536, 536, 924, 536, 1292, 525, 525, 541, 1269, 1270, 346, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 1295, 617, 618, 1033, 819, 446, 395, 1262, 1262, 1033, 935, 935, 935, 935, 563, 599, 446, 929, 936, 933, 403, 676, 822, 1186, 552, 534, 534, 534, 534, 841, 589, 600, 984, 1031, 1253, 965, 939, 939, 937, 939, 702, 465, 538, 974, 969, 344, 345, 706, 440, 900, 1082, 853, 946, 440, 440, 1035, 604, 662, 469, 1293, 1293, 981, 1077, 540, 550, 0, 0, 0, 540, 843, 550, 645, 960, 388, 1174, 911, 1293, 837, 1175, 1178, 912, 1179, 0, 566, 458, 459, 460, 541, 849, 1185, 0, 1300, 1301, 254, 254, 401, 402, 0, 0, 0, 648, 0, 649, 0, 405, 406, 407, 0, 660, 0, 0, 408, 0, 0, 0, 339, 847, 594, 608, 611, 612, 613, 614, 633, 634, 635, 679, 918, 995, 1003, 1007, 1004, 1008, 0, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 0, 1188, 440, 852, 840, 1030, 1034, 584, 1059, 0, 680, 666, 666, 944, 496, 672, 1057, 387, 391, 547, 586, 590, 425, 0, 0, 0, 0, 0, 0, 425, 0, 0, 0, 0, 0, 0, 934, 1012, 1005, 1009, 1006, 1010, 0, 0, 0, 0, 0, 272, 0, 0, 0, 0, 537, 537, 0, 0, 0, 0, 1075, 856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 979, 979)

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

$gotoBase

protected array<string|int, int> $gotoBase = array(0, 0, -297, 0, 0, 226, 196, 159, 517, 7, 0, 0, -66, -65, 25, -175, 78, -33, 39, 84, -213, 0, -64, 158, 302, 390, 15, 18, 46, 49, 0, 0, 0, 0, 0, -356, 0, 67, 0, 32, 0, -10, -1, 0, 0, 13, -417, 0, -364, 200, 0, 0, 0, 0, 0, 208, 0, 0, 490, 0, 0, 256, 0, 85, -14, -236, 0, 0, 0, 0, 0, 0, -6, 0, 0, -168, 0, 0, 45, 140, -12, 0, -35, -95, -344, 0, 0, 221, 0, 0, 27, 92, 0, 0, -11, -287, 0, 19, 0, 0, 0, 251, 267, 0, 0, 370, -73, 0, 43, 0, 0, 61, 0, 0, 0, 270, 0, 0, 0, 0, 0, 6, 0, 40, 16, 0, -7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, -2, 0, 188, 0, 59, 0, 0, 0, -195, 0, -19, 0, 0, 35, 0, 0, 0, 0, 0, 0, 3, -57, -8, 201, 117, 0, 0, -110, 0, -4, 223, 0, 241, 36, 129, 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(42, 42, 72, 65, 65, 64, 35, 64, 121, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 26, 9, 35, 27, 124, 35, 45, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, 15, 106, 106, 7, 75, 75, 20, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 162, 162, 95, 168, 168, 168, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 15, 6, 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, 15, 143, 143, 49, 15, 12, 20, 5, 5, 164, 143, 163, 163, 20, 15, 15, 15, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 55, 55, 20, 20, 20, 171, 5, 5, 5, 5, 5, 5, 22, 22, 72, 72, 72, 72, 72, 12, 13, 12, 13, 72, 173, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 124, 124, 101, 124, 72, 149, 46, 149, 46, 72, 72, 72, 72, 149, 61, 72, 72, 72, 9, 9, 9, 9, 24, 24, 24, 24, 102, 124, 124, 124, 124, 138, 138, 72, 14, 48, 161, 161, 72, 48, 48, 48, 63, 48, 14, 14, 145, 48, 48, 48, 48, 48, 48, 124, 111, 174, 174, 29, 14, 14, 18, 14, 84, 14, 84, 84, 84, 39, 19, 19, 90, 19, 174, 165, 165, 14, 170, 170, 14, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 174, 83, 83, 124, 22, 19, 28, 124, 124, 124, 19, 19, 19, 19, 2, 2, 19, 19, 19, 91, 91, 91, 25, 154, 9, 105, 105, 105, 105, 37, 105, 9, 108, 123, 14, 25, 25, 25, 25, 25, 25, 151, 25, 25, 25, 95, 95, 97, 23, 17, 17, 41, 94, 23, 23, 126, 17, 14, 82, 175, 175, 17, 141, 9, 9, -1, -1, -1, 9, 17, 9, 17, 17, 9, 78, 78, 175, 17, 78, 78, 78, 78, -1, 9, 9, 9, 9, 14, 9, 17, -1, 9, 9, 5, 5, 80, 80, -1, -1, -1, 80, -1, 80, -1, 80, 80, 80, -1, 80, -1, -1, 80, -1, -1, -1, 80, 9, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 87, 87, 87, 87, 87, 87, -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, 14, 23, 16, 16, 16, 16, 8, 8, -1, 8, 8, 8, 16, 8, 8, 8, 58, 58, 58, 58, 58, 115, -1, -1, -1, -1, -1, -1, 115, -1, -1, -1, -1, -1, -1, 16, 115, 115, 115, 115, 115, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, 24, 24, -1, -1, -1, -1, 16, 16, -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, 105, 105)

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, 500, 710, 4, 711, 904, 787, 796, 582, 516, 678, 340, 609, 414, 1258, 881, 1081, 564, 815, 1202, 1210, 447, 818, 324, 700, 863, 864, 865, 392, 377, 383, 390, 631, 610, 482, 850, 443, 842, 474, 845, 442, 854, 162, 411, 498, 858, 3, 860, 543, 891, 378, 868, 379, 655, 870, 549, 872, 873, 386, 393, 394, 1086, 557, 606, 885, 243, 551, 886, 376, 887, 894, 381, 384, 664, 454, 493, 487, 404, 1061, 593, 628, 451, 468, 616, 615, 603, 467, 426, 409, 326, 923, 931, 475, 452, 945, 342, 953, 708, 1093, 623, 477, 961, 624, 968, 971, 517, 518, 466, 983, 269, 986, 478, 1018, 646, 647, 998, 625, 626, 1016, 461, 583, 1024, 444, 1032, 1246, 445, 1036, 262, 1039, 276, 410, 427, 1044, 1045, 8, 1051, 670, 671, 10, 273, 497, 1076, 665, 441, 1092, 431, 1162, 1164, 545, 479, 1182, 1181, 658, 494, 1187, 1249, 439, 519, 462, 310, 520, 302, 328, 307, 535, 289, 329, 521, 463, 1255, 1263, 325, 30, 1283, 1294, 336, 561, 598)

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

$gotoTableSize

protected int $gotoTableSize = 611

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 = 709

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

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_READONLY", "T_VAR", "T_UNSET", "T_ISSET", "T_EMPTY", "T_HALT_COMPILER", "T_CLASS", "T_TRAIT", "T_INTERFACE", "T_ENUM", "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", "T_NULLSAFE_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_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, 166, 168, 167, 55, 168, 168, 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, 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, 160, 36, 168, 165, 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, 161, 35, 162, 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, 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)

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 = 421

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