raven-rhel6/php53/php-5.3.29-zendparse.patch
2024-02-21 20:14:44 +06:00

180 lines
8.7 KiB
Diff

diff -Naur php-5.3.29_orig/Zend/zend_language_parser.c php-5.3.29/Zend/zend_language_parser.c
--- php-5.3.29_orig/Zend/zend_language_parser.c 2014-08-14 01:27:30.000000000 +0600
+++ php-5.3.29/Zend/zend_language_parser.c 2023-10-12 10:17:57.930363726 +0600
@@ -115,11 +115,6 @@
#define YYERROR_VERBOSE
#define YYSTYPE znode
-#ifdef ZTS
-# define YYPARSE_PARAM tsrm_ls
-# define YYLEX_PARAM tsrm_ls
-#endif
-
@@ -141,8 +136,14 @@
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
+/* "%code requires" blocks. */
+#ifdef ZTS
+# define YYPARSE_PARAM tsrm_ls
+# define YYLEX_PARAM tsrm_ls
+#endif
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -903,53 +904,53 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 155, 155, 159, 159, 160, 164, 165, 169, 170,
- 171, 172, 173, 174, 174, 176, 176, 178, 179, 183,
- 184, 188, 189, 190, 191, 195, 196, 200, 200, 201,
- 206, 207, 208, 209, 214, 215, 219, 220, 220, 220,
- 221, 221, 221, 222, 222, 222, 223, 223, 223, 227,
- 229, 231, 224, 233, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 248, 249,
- 247, 252, 253, 251, 255, 255, 256, 257, 258, 259,
- 260, 261, 257, 263, 264, 269, 270, 274, 275, 280,
- 280, 280, 285, 286, 290, 294, 298, 303, 304, 309,
- 309, 315, 314, 321, 320, 330, 331, 332, 336, 337,
- 341, 344, 346, 349, 351, 355, 356, 360, 361, 366,
- 367, 371, 372, 377, 378, 383, 384, 389, 390, 395,
- 396, 397, 398, 403, 404, 404, 405, 405, 410, 411,
- 416, 417, 422, 424, 424, 428, 430, 430, 434, 436,
- 440, 442, 447, 448, 453, 454, 455, 456, 457, 458,
- 459, 460, 465, 466, 467, 472, 473, 478, 479, 480,
- 481, 482, 483, 487, 488, 493, 494, 495, 500, 501,
- 502, 503, 509, 510, 515, 515, 516, 517, 517, 523,
- 524, 528, 529, 533, 534, 538, 539, 543, 544, 545,
- 546, 547, 548, 552, 553, 554, 555, 559, 560, 564,
- 565, 570, 571, 575, 575, 576, 580, 580, 581, 582,
- 583, 583, 584, 584, 585, 586, 587, 588, 589, 590,
- 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
- 601, 601, 602, 602, 603, 603, 604, 604, 605, 606,
- 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
- 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
- 627, 628, 629, 630, 631, 632, 631, 634, 634, 636,
- 637, 638, 639, 640, 641, 642, 643, 644, 645, 645,
- 646, 647, 648, 649, 650, 650, 655, 658, 660, 664,
- 665, 666, 667, 671, 671, 674, 674, 677, 677, 680,
- 680, 683, 683, 686, 686, 689, 689, 692, 692, 698,
- 699, 700, 701, 705, 706, 707, 713, 714, 719, 720,
- 719, 722, 727, 728, 733, 737, 738, 739, 743, 744,
- 745, 750, 751, 756, 757, 758, 759, 760, 761, 762,
- 763, 764, 765, 766, 767, 772, 773, 774, 775, 776,
- 777, 778, 779, 783, 787, 788, 789, 790, 791, 792,
- 793, 794, 799, 800, 803, 805, 809, 810, 811, 812,
- 816, 817, 822, 827, 832, 837, 838, 837, 840, 844,
- 845, 850, 850, 854, 854, 858, 862, 863, 867, 868,
- 873, 877, 878, 883, 884, 885, 889, 890, 891, 896,
- 897, 901, 902, 907, 908, 908, 912, 913, 914, 918,
- 919, 923, 924, 928, 929, 934, 935, 935, 936, 941,
- 942, 946, 947, 948, 949, 950, 951, 952, 953, 957,
- 958, 959, 960, 966, 967, 967, 968, 969, 970, 971,
- 976, 977, 978, 983, 984, 985, 986, 987, 988, 989,
- 993, 994, 994, 998, 999
+ 0, 157, 157, 161, 161, 162, 166, 167, 171, 172,
+ 173, 174, 175, 176, 176, 178, 178, 180, 181, 185,
+ 186, 190, 191, 192, 193, 197, 198, 202, 202, 203,
+ 208, 209, 210, 211, 216, 217, 221, 222, 222, 222,
+ 223, 223, 223, 224, 224, 224, 225, 225, 225, 229,
+ 231, 233, 226, 235, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 250, 251,
+ 249, 254, 255, 253, 257, 257, 258, 259, 260, 261,
+ 262, 263, 259, 265, 266, 271, 272, 276, 277, 282,
+ 282, 282, 287, 288, 292, 296, 300, 305, 306, 311,
+ 311, 317, 316, 323, 322, 332, 333, 334, 338, 339,
+ 343, 346, 348, 351, 353, 357, 358, 362, 363, 368,
+ 369, 373, 374, 379, 380, 385, 386, 391, 392, 397,
+ 398, 399, 400, 405, 406, 406, 407, 407, 412, 413,
+ 418, 419, 424, 426, 426, 430, 432, 432, 436, 438,
+ 442, 444, 449, 450, 455, 456, 457, 458, 459, 460,
+ 461, 462, 467, 468, 469, 474, 475, 480, 481, 482,
+ 483, 484, 485, 489, 490, 495, 496, 497, 502, 503,
+ 504, 505, 511, 512, 517, 517, 518, 519, 519, 525,
+ 526, 530, 531, 535, 536, 540, 541, 545, 546, 547,
+ 548, 549, 550, 554, 555, 556, 557, 561, 562, 566,
+ 567, 572, 573, 577, 577, 578, 582, 582, 583, 584,
+ 585, 585, 586, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 603, 604, 604, 605, 605, 606, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 633, 636, 636, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 647,
+ 648, 649, 650, 651, 652, 652, 657, 660, 662, 666,
+ 667, 668, 669, 673, 673, 676, 676, 679, 679, 682,
+ 682, 685, 685, 688, 688, 691, 691, 694, 694, 700,
+ 701, 702, 703, 707, 708, 709, 715, 716, 721, 722,
+ 721, 724, 729, 730, 735, 739, 740, 741, 745, 746,
+ 747, 752, 753, 758, 759, 760, 761, 762, 763, 764,
+ 765, 766, 767, 768, 769, 774, 775, 776, 777, 778,
+ 779, 780, 781, 785, 789, 790, 791, 792, 793, 794,
+ 795, 796, 801, 802, 805, 807, 811, 812, 813, 814,
+ 818, 819, 824, 829, 834, 839, 840, 839, 842, 846,
+ 847, 852, 852, 856, 856, 860, 864, 865, 869, 870,
+ 875, 879, 880, 885, 886, 887, 891, 892, 893, 898,
+ 899, 903, 904, 909, 910, 910, 914, 915, 916, 920,
+ 921, 925, 926, 930, 931, 936, 937, 937, 938, 943,
+ 944, 948, 949, 950, 951, 952, 953, 954, 955, 959,
+ 960, 961, 962, 968, 969, 969, 970, 971, 972, 973,
+ 978, 979, 980, 985, 986, 987, 988, 989, 990, 991,
+ 995, 996, 996, 1000, 1001
};
#endif
diff -Naur php-5.3.29_orig/Zend/zend_language_parser.h php-5.3.29/Zend/zend_language_parser.h
--- php-5.3.29_orig/Zend/zend_language_parser.h 2014-08-14 01:27:30.000000000 +0600
+++ php-5.3.29/Zend/zend_language_parser.h 2023-10-12 10:19:25.931818816 +0600
@@ -164,6 +164,16 @@
T_NS_SEPARATOR = 380
};
#endif
+/* "%code requires" blocks. */
+
+
+#ifdef ZTS
+# define YYPARSE_PARAM tsrm_ls
+# define YYLEX_PARAM tsrm_ls
+#endif
+
+
+
/* Tokens. */
#define T_REQUIRE_ONCE 258
#define T_REQUIRE 259
diff -Naur php-5.3.29_orig/Zend/zend_language_parser.y php-5.3.29/Zend/zend_language_parser.y
--- php-5.3.29_orig/Zend/zend_language_parser.y 2014-08-14 01:22:50.000000000 +0600
+++ php-5.3.29/Zend/zend_language_parser.y 2023-10-12 10:20:14.259519569 +0600
@@ -38,17 +38,19 @@
#define YYERROR_VERBOSE
#define YYSTYPE znode
-#ifdef ZTS
-# define YYPARSE_PARAM tsrm_ls
-# define YYLEX_PARAM tsrm_ls
-#endif
-
%}
%pure_parser
%expect 2
+%code requires {
+#ifdef ZTS
+# define YYPARSE_PARAM tsrm_ls
+# define YYLEX_PARAM tsrm_ls
+#endif
+}
+
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR