#define yyrestart gram_restart
#define yytext gram_text
-#line 19 "lex.yy.c"
+#line 19 "scan-gram.c"
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 97
-#define YY_END_OF_BUFFER 98
-static yyconst short int yy_accept[356] =
+#define YY_NUM_RULES 104
+#define YY_END_OF_BUFFER 105
+static yyconst short int yy_accept[411] =
{ 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 98, 45,
- 34, 33, 33, 38, 45, 37, 35, 45, 36, 30,
- 32, 45, 29, 42, 31, 49, 50, 50, 51, 46,
- 47, 76, 79, 79, 75, 46, 78, 47, 71, 74,
- 74, 70, 73, 53, 54, 54, 52, 69, 56, 57,
- 57, 55, 89, 90, 90, 81, 91, 80, 84, 91,
- 46, 47, 86, 85, 93, 95, 95, 81, 94, 80,
- 84, 96, 96, 96, 81, 80, 84, 34, 33, 33,
- 33, 33, 44, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 41, 35, 39,
- 40, 36, 0, 49, 50, 50, 50, 50, 48, 76,
- 79, 79, 79, 79, 77, 71, 74, 74, 74, 74,
- 72, 53, 54, 54, 54, 54, 68, 67, 68, 60,
- 61, 62, 63, 64, 65, 66, 68, 57, 57, 57,
- 57, 89, 90, 90, 90, 90, 87, 0, 87, 0,
- 82, 83, 88, 0, 88, 93, 95, 95, 95, 95,
- 92, 96, 96, 96, 96, 96, 82, 83, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 40, 43, 0, 0, 0, 83, 83, 83, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 58, 59, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 10, 0, 0, 0, 0,
- 0, 0, 17, 0, 0, 0, 0, 22, 0, 25,
- 0, 0, 28, 0, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 15, 0, 0, 19, 0,
- 21, 23, 26, 0, 1, 3, 0, 0, 7, 0,
- 0, 0, 0, 0, 0, 16, 0, 0, 0, 0,
-
- 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 27, 0, 0, 0, 0, 0, 0, 13,
- 14, 0, 20, 0, 0, 0, 0, 0, 11, 0,
- 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,
- 8, 0, 12, 18, 24, 0, 0, 6, 0, 0,
- 0, 0, 0, 9, 0
+ 0, 0, 0, 0, 61, 61, 0, 0, 87, 87,
+ 82, 82, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 105, 53, 42, 42, 46, 53, 45, 40,
+ 43, 53, 44, 38, 41, 53, 37, 50, 39, 53,
+ 59, 59, 54, 55, 61, 60, 61, 57, 57, 85,
+ 84, 88, 80, 79, 83, 63, 62, 78, 65, 64,
+ 99, 90, 99, 99, 89, 93, 99, 99, 94, 96,
+ 101, 102, 93, 103, 90, 89, 93, 42, 52, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 49, 43, 47, 48,
+
+ 44, 0, 0, 59, 58, 0, 61, 61, 61, 61,
+ 57, 56, 85, 86, 86, 86, 86, 80, 81, 81,
+ 81, 81, 63, 77, 75, 66, 77, 68, 69, 70,
+ 71, 72, 73, 77, 74, 77, 65, 99, 97, 0,
+ 97, 0, 95, 0, 91, 92, 0, 94, 99, 0,
+ 98, 0, 98, 101, 100, 103, 91, 92, 103, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 48, 51, 0, 0,
+ 0, 0, 87, 0, 0, 0, 0, 82, 0, 0,
+
+ 0, 66, 0, 0, 67, 0, 0, 0, 0, 0,
+ 0, 0, 103, 103, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 0, 66, 0, 0,
+ 0, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 12, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 21, 35, 35, 35, 35, 35, 28, 35, 31,
+ 35, 35, 34, 0, 0, 0, 35, 2, 35, 35,
+ 6, 35, 35, 35, 35, 35, 35, 35, 14, 35,
+
+ 35, 35, 18, 35, 35, 35, 35, 24, 35, 27,
+ 29, 32, 35, 0, 0, 76, 1, 3, 35, 35,
+ 8, 35, 35, 35, 35, 35, 35, 35, 35, 19,
+ 35, 35, 35, 35, 35, 35, 0, 4, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 22,
+ 35, 35, 35, 33, 0, 35, 35, 35, 35, 35,
+ 35, 35, 35, 16, 17, 35, 35, 26, 35, 0,
+ 35, 35, 35, 35, 35, 25, 13, 35, 35, 35,
+ 35, 0, 0, 5, 35, 35, 35, 11, 35, 35,
+ 35, 35, 36, 35, 9, 35, 15, 20, 23, 30,
+
+ 35, 35, 7, 35, 35, 35, 35, 35, 10, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 5, 1, 6, 7, 1, 8, 1,
- 1, 9, 1, 1, 10, 11, 12, 13, 13, 13,
- 13, 13, 13, 13, 13, 14, 14, 15, 16, 17,
- 18, 19, 1, 20, 21, 21, 21, 21, 21, 21,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 22, 23, 24, 1, 25, 1, 26, 27, 28, 29,
-
- 30, 31, 32, 33, 34, 11, 35, 36, 37, 38,
- 39, 40, 11, 41, 42, 43, 44, 45, 11, 46,
- 47, 11, 48, 49, 50, 1, 1, 1, 1, 1,
+ 1, 4, 1, 5, 6, 7, 8, 1, 9, 1,
+ 1, 10, 1, 11, 12, 13, 14, 15, 15, 15,
+ 15, 15, 15, 15, 15, 16, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 24, 24, 24, 24, 24,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 25, 13, 13, 13, 13, 13,
+ 26, 27, 28, 1, 29, 1, 30, 31, 32, 33,
+
+ 34, 35, 36, 37, 38, 13, 39, 40, 41, 42,
+ 43, 44, 13, 45, 46, 47, 48, 49, 13, 50,
+ 51, 13, 52, 53, 54, 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
} ;
-static yyconst int yy_meta[51] =
+static yyconst int yy_meta[56] =
{ 0,
- 1, 1, 2, 3, 4, 5, 6, 7, 8, 1,
- 9, 10, 11, 11, 1, 1, 1, 1, 12, 5,
- 11, 13, 14, 13, 9, 11, 11, 11, 11, 11,
- 11, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 5, 1, 5
+ 1, 1, 2, 1, 3, 1, 4, 5, 6, 7,
+ 1, 8, 9, 5, 10, 10, 1, 1, 4, 1,
+ 11, 1, 4, 10, 9, 12, 13, 12, 9, 10,
+ 10, 10, 10, 10, 10, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 4, 1, 4, 11
} ;
-static yyconst short int yy_base[382] =
+static yyconst short int yy_base[449] =
{ 0,
- 0, 0, 48, 51, 58, 61, 83, 86, 73, 94,
- 108, 110, 131, 179, 227, 249, 116, 142, 814, 815,
- 811, 55, 64, 815, 267, 815, 0, 44, 79, 815,
- 815, 0, 815, 815, 815, 0, 97, 99, 800, 815,
- 815, 0, 119, 122, 815, 815, 0, 815, 0, 126,
- 138, 815, 0, 0, 145, 153, 815, 311, 815, 155,
- 157, 815, 0, 159, 164, 815, 159, 815, 62, 164,
- 815, 815, 815, 815, 0, 185, 189, 815, 761, 815,
- 185, 192, 201, 203, 205, 207, 209, 808, 211, 213,
- 216, 219, 815, 775, 778, 86, 773, 49, 198, 762,
-
- 184, 771, 109, 203, 766, 773, 776, 815, 0, 815,
- 0, 230, 782, 0, 242, 244, 255, 259, 815, 0,
- 261, 263, 265, 272, 815, 0, 274, 276, 278, 280,
- 815, 0, 282, 284, 286, 288, 815, 815, 787, 815,
- 815, 815, 815, 815, 815, 815, 0, 296, 298, 314,
- 316, 0, 318, 322, 324, 326, 815, 318, 322, 0,
- 815, 0, 815, 326, 330, 0, 342, 344, 347, 355,
- 815, 357, 359, 361, 363, 365, 367, 369, 761, 144,
- 757, 757, 144, 765, 767, 757, 364, 763, 749, 761,
- 749, 757, 758, 761, 745, 750, 744, 749, 741, 753,
-
- 0, 815, 767, 0, 760, 0, 372, 375, 752, 733,
- 742, 732, 735, 743, 742, 741, 727, 743, 738, 731,
- 740, 724, 724, 735, 732, 728, 724, 718, 721, 727,
- 726, 716, 727, 725, 815, 815, 371, 711, 719, 712,
- 708, 707, 719, 736, 716, 815, 701, 230, 709, 700,
- 704, 696, 815, 370, 696, 708, 694, 815, 698, 815,
- 697, 695, 815, 686, 815, 702, 687, 373, 687, 689,
- 376, 694, 687, 688, 683, 815, 681, 683, 815, 653,
- 815, 378, 815, 650, 815, 626, 637, 606, 815, 607,
- 606, 605, 601, 611, 601, 815, 611, 595, 588, 599,
-
- 815, 585, 597, 596, 557, 562, 569, 536, 546, 532,
- 511, 522, 815, 508, 503, 508, 491, 491, 498, 815,
- 815, 362, 815, 373, 351, 360, 348, 315, 815, 319,
- 311, 297, 815, 284, 267, 260, 249, 252, 242, 228,
- 815, 217, 815, 815, 815, 208, 380, 815, 205, 192,
- 166, 85, 62, 815, 815, 405, 419, 433, 447, 461,
- 475, 489, 503, 189, 517, 531, 545, 557, 571, 583,
- 597, 610, 624, 638, 652, 666, 84, 680, 694, 708,
- 58
+ 0, 896, 46, 47, 55, 58, 891, 890, 61, 64,
+ 50, 70, 66, 75, 85, 86, 109, 159, 96, 122,
+ 129, 144, 899, 903, 60, 104, 903, 206, 903, 903,
+ 0, 89, 52, 903, 903, 0, 903, 903, 903, 858,
+ 0, 106, 903, 903, 870, 903, 138, 0, 882, 0,
+ 903, 142, 0, 903, 172, 0, 903, 254, 0, 903,
+ 0, 903, 174, 88, 903, 169, 92, 144, 903, 903,
+ 0, 841, 170, 0, 0, 0, 178, 198, 903, 0,
+ 856, 26, 76, 855, 852, 128, 857, 161, 842, 164,
+ 851, 100, 164, 846, 853, 856, 903, 0, 903, 0,
+
+ 201, 864, 846, 0, 903, 218, 856, 263, 268, 855,
+ 0, 903, 0, 903, 221, 854, 224, 0, 903, 230,
+ 853, 258, 0, 903, 903, 864, 0, 903, 903, 903,
+ 903, 903, 903, 0, 903, 0, 0, 0, 903, 258,
+ 262, 0, 903, 284, 903, 903, 289, 903, 903, 303,
+ 903, 267, 282, 0, 903, 0, 0, 0, 306, 0,
+ 836, 280, 832, 831, 831, 272, 829, 160, 841, 827,
+ 830, 288, 836, 822, 823, 91, 822, 830, 831, 834,
+ 818, 823, 817, 822, 814, 826, 0, 903, 815, 316,
+ 300, 321, 829, 329, 332, 828, 335, 827, 338, 341,
+
+ 826, 837, 0, 0, 0, 830, 344, 328, 348, 343,
+ 356, 346, 359, 354, 820, 801, 810, 800, 812, 802,
+ 810, 809, 808, 829, 793, 827, 808, 801, 802, 795,
+ 804, 788, 788, 785, 798, 787, 794, 790, 786, 780,
+ 783, 789, 788, 778, 789, 787, 784, 903, 0, 0,
+ 359, 772, 780, 773, 769, 781, 767, 779, 798, 776,
+ 764, 0, 763, 759, 771, 355, 766, 757, 761, 753,
+ 766, 0, 752, 357, 751, 763, 749, 0, 753, 0,
+ 752, 750, 0, 788, 0, 0, 740, 0, 756, 741,
+ 0, 360, 741, 743, 364, 756, 755, 746, 0, 739,
+
+ 740, 735, 0, 733, 767, 744, 733, 0, 729, 0,
+ 365, 0, 729, 313, 0, 903, 0, 728, 741, 723,
+ 0, 726, 727, 724, 723, 724, 721, 731, 721, 0,
+ 719, 717, 731, 717, 712, 724, 375, 0, 710, 722,
+ 721, 706, 707, 722, 709, 716, 703, 716, 717, 0,
+ 701, 688, 691, 0, 703, 659, 644, 648, 635, 646,
+ 635, 624, 634, 0, 0, 623, 621, 0, 627, 625,
+ 581, 578, 564, 538, 528, 0, 0, 527, 525, 518,
+ 507, 533, 526, 0, 349, 338, 339, 0, 335, 342,
+ 337, 346, 903, 310, 0, 274, 0, 0, 0, 0,
+
+ 282, 366, 0, 278, 256, 240, 241, 222, 0, 903,
+ 395, 408, 421, 434, 447, 460, 473, 486, 499, 512,
+ 517, 527, 540, 553, 566, 579, 590, 603, 614, 627,
+ 639, 652, 664, 677, 690, 696, 706, 254, 219, 208,
+ 719, 196, 193, 167, 144, 142, 55, 732
} ;
-static yyconst short int yy_def[382] =
+static yyconst short int yy_def[449] =
{ 0,
- 355, 1, 356, 356, 357, 357, 358, 358, 359, 359,
- 360, 360, 361, 361, 362, 362, 363, 363, 355, 355,
- 355, 355, 355, 355, 355, 355, 364, 355, 355, 355,
- 355, 365, 355, 355, 355, 366, 355, 355, 355, 355,
- 355, 367, 355, 355, 355, 355, 368, 355, 369, 355,
- 355, 355, 370, 371, 355, 355, 355, 372, 355, 355,
- 355, 355, 373, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 374, 355, 355, 355, 355, 355,
- 355, 375, 375, 375, 375, 375, 375, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
-
- 355, 355, 355, 355, 355, 355, 355, 355, 364, 355,
- 376, 355, 365, 366, 355, 355, 355, 355, 355, 367,
- 355, 355, 355, 355, 355, 369, 355, 355, 355, 355,
- 355, 371, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 377, 355, 355, 355,
- 355, 373, 355, 355, 355, 355, 355, 355, 355, 378,
- 355, 379, 355, 355, 355, 374, 355, 355, 355, 355,
- 355, 375, 375, 375, 375, 375, 375, 380, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
-
- 376, 355, 355, 381, 378, 379, 380, 380, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
-
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 0, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355
+ 410, 1, 411, 411, 412, 412, 413, 413, 414, 414,
+ 415, 415, 416, 416, 417, 417, 418, 418, 419, 419,
+ 420, 420, 410, 410, 410, 410, 410, 410, 410, 410,
+ 421, 410, 410, 410, 410, 422, 410, 410, 410, 410,
+ 423, 410, 410, 410, 424, 410, 424, 425, 410, 426,
+ 410, 427, 428, 410, 429, 430, 410, 431, 432, 410,
+ 433, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 434, 410, 410, 435, 435, 435, 435, 410, 410, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 410, 421, 410, 437,
+
+ 410, 422, 410, 423, 410, 410, 424, 424, 424, 424,
+ 425, 410, 426, 410, 410, 410, 410, 428, 410, 410,
+ 410, 410, 430, 410, 410, 410, 438, 410, 410, 410,
+ 410, 410, 410, 439, 410, 440, 432, 433, 410, 410,
+ 410, 441, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 434, 410, 435, 435, 435, 435, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 437, 410, 410, 410,
+ 410, 410, 410, 410, 410, 427, 410, 410, 410, 410,
+
+ 429, 410, 442, 443, 440, 441, 410, 410, 410, 410,
+ 410, 410, 435, 435, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 410, 410, 444, 445,
+ 410, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 410, 446, 447, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 410, 439, 410, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 410, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 410, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 448,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 448, 410, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 410, 436, 436, 436, 436, 436, 436, 436,
+
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 0,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410
} ;
-static yyconst short int yy_nxt[866] =
+static yyconst short int yy_nxt[959] =
{ 0,
- 20, 21, 22, 23, 24, 20, 25, 26, 20, 20,
- 27, 28, 29, 29, 30, 31, 32, 33, 20, 20,
- 27, 20, 20, 20, 20, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 34, 35, 20,
- 37, 38, 110, 37, 38, 111, 39, 89, 90, 39,
- 43, 44, 45, 43, 44, 45, 91, 92, 236, 40,
- 161, 41, 40, 162, 41, 55, 56, 57, 184, 46,
- 47, 48, 46, 47, 48, 50, 51, 185, 50, 51,
- 52, 112, 112, 52, 204, 58, 55, 56, 57, 115,
-
- 116, 117, 118, 354, 46, 53, 48, 46, 53, 48,
- 60, 61, 60, 61, 353, 62, 58, 62, 83, 84,
- 85, 121, 122, 86, 123, 124, 181, 87, 127, 128,
- 58, 182, 58, 64, 65, 66, 67, 46, 68, 48,
- 129, 130, 69, 193, 83, 84, 85, 133, 134, 86,
- 70, 194, 71, 87, 72, 135, 136, 148, 149, 150,
- 151, 153, 154, 46, 157, 48, 155, 156, 158, 163,
- 210, 159, 159, 164, 211, 160, 165, 165, 73, 215,
- 74, 64, 65, 66, 67, 212, 68, 167, 168, 216,
- 69, 169, 170, 161, 173, 174, 162, 109, 70, 109,
-
- 71, 352, 72, 173, 175, 176, 174, 173, 174, 173,
- 174, 173, 174, 89, 90, 91, 92, 177, 89, 90,
- 178, 91, 92, 186, 190, 351, 73, 191, 74, 76,
- 77, 78, 195, 79, 80, 350, 187, 348, 81, 273,
- 188, 196, 112, 112, 115, 116, 117, 118, 46, 197,
- 48, 76, 77, 78, 273, 79, 80, 115, 116, 347,
- 81, 117, 118, 121, 122, 123, 124, 121, 122, 346,
- 46, 345, 48, 93, 123, 124, 127, 128, 129, 130,
- 127, 128, 129, 130, 133, 134, 135, 136, 133, 134,
- 135, 136, 344, 94, 343, 95, 96, 97, 148, 149,
-
- 150, 151, 98, 342, 99, 100, 101, 102, 103, 104,
- 105, 106, 341, 107, 108, 138, 148, 149, 150, 151,
- 153, 154, 340, 139, 155, 156, 153, 154, 155, 156,
- 159, 159, 339, 138, 159, 159, 140, 141, 165, 165,
- 338, 142, 165, 165, 167, 168, 169, 170, 143, 167,
- 168, 144, 337, 145, 336, 146, 147, 169, 170, 173,
- 174, 173, 175, 176, 174, 176, 174, 173, 175, 173,
- 174, 173, 208, 220, 173, 208, 157, 176, 208, 278,
- 158, 335, 288, 159, 159, 291, 334, 299, 220, 349,
- 206, 333, 206, 206, 278, 206, 206, 288, 206, 332,
-
- 291, 221, 299, 331, 349, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 63, 63, 63, 63, 63,
- 63, 63, 63, 63, 63, 63, 63, 63, 63, 75,
- 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
-
- 75, 75, 75, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 330, 113,
- 113, 114, 329, 328, 114, 114, 114, 114, 327, 114,
- 114, 114, 114, 326, 114, 120, 325, 324, 323, 120,
- 120, 120, 120, 120, 120, 120, 120, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 126, 322, 321, 126, 126, 126, 320, 126, 126,
- 126, 126, 126, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 132, 319, 318,
-
- 317, 132, 132, 132, 132, 132, 132, 132, 132, 132,
- 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
- 137, 137, 137, 137, 152, 316, 315, 314, 313, 152,
- 312, 152, 152, 311, 152, 152, 310, 152, 166, 309,
- 308, 307, 166, 306, 305, 166, 166, 304, 166, 166,
- 303, 166, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 302, 172, 201, 301, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 300, 205, 205, 206, 298, 206, 206, 206, 206,
-
- 206, 206, 206, 206, 206, 206, 206, 206, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 297, 296, 295, 294, 293, 292, 290, 289,
- 287, 286, 285, 284, 283, 282, 281, 280, 279, 277,
- 276, 275, 274, 272, 271, 270, 269, 268, 267, 266,
- 265, 264, 263, 262, 261, 260, 259, 258, 257, 256,
- 255, 254, 253, 252, 251, 250, 249, 248, 247, 246,
- 245, 244, 243, 242, 241, 240, 239, 238, 237, 235,
- 234, 233, 232, 231, 230, 229, 228, 227, 226, 225,
- 224, 223, 222, 219, 218, 217, 214, 213, 209, 203,
-
- 202, 200, 199, 198, 192, 189, 183, 180, 179, 88,
- 171, 119, 88, 355, 19, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355
+ 24, 25, 26, 25, 27, 24, 24, 28, 29, 24,
+ 30, 24, 31, 32, 33, 33, 34, 35, 36, 37,
+ 24, 24, 24, 31, 31, 24, 24, 24, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 38, 39, 24, 24, 42, 42, 46, 54, 162,
+ 46, 78, 78, 78, 316, 51, 101, 101, 51, 163,
+ 57, 43, 43, 44, 44, 43, 55, 44, 54, 57,
+ 43, 47, 44, 43, 47, 44, 43, 52, 44, 43,
+ 52, 44, 58, 60, 60, 43, 55, 44, 99, 148,
+
+ 62, 58, 100, 72, 65, 78, 78, 78, 143, 73,
+ 149, 58, 58, 62, 144, 63, 64, 65, 150, 105,
+ 164, 43, 66, 44, 235, 165, 62, 67, 236, 72,
+ 65, 68, 106, 75, 43, 73, 44, 76, 179, 109,
+ 110, 109, 77, 115, 116, 115, 180, 43, 75, 44,
+ 151, 315, 76, 286, 43, 152, 44, 77, 153, 153,
+ 69, 168, 70, 62, 108, 63, 64, 65, 117, 43,
+ 169, 44, 66, 120, 121, 120, 285, 67, 145, 145,
+ 139, 68, 146, 146, 43, 140, 44, 157, 141, 141,
+ 171, 158, 142, 175, 225, 147, 147, 181, 122, 78,
+
+ 78, 78, 250, 172, 159, 249, 182, 173, 176, 226,
+ 69, 177, 70, 79, 183, 101, 101, 205, 80, 190,
+ 191, 190, 192, 193, 192, 195, 196, 195, 204, 80,
+ 80, 197, 198, 197, 80, 80, 81, 80, 82, 83,
+ 84, 85, 80, 80, 80, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 80, 96, 97, 125, 200,
+ 201, 200, 125, 203, 109, 110, 109, 409, 126, 109,
+ 110, 109, 141, 141, 408, 125, 141, 141, 127, 407,
+ 125, 153, 153, 128, 129, 207, 208, 207, 130, 108,
+ 209, 210, 209, 406, 108, 131, 153, 153, 132, 230,
+
+ 133, 134, 135, 136, 211, 212, 211, 213, 214, 213,
+ 216, 222, 405, 105, 217, 403, 230, 190, 191, 190,
+ 402, 223, 192, 193, 192, 218, 106, 337, 337, 231,
+ 192, 193, 192, 195, 196, 195, 197, 198, 197, 197,
+ 198, 197, 200, 201, 200, 207, 208, 207, 143, 209,
+ 210, 209, 145, 148, 144, 401, 146, 211, 212, 211,
+ 213, 214, 213, 157, 149, 139, 300, 158, 307, 147,
+ 140, 320, 150, 141, 141, 323, 335, 404, 355, 400,
+ 159, 399, 398, 300, 397, 307, 396, 395, 320, 337,
+ 337, 394, 323, 335, 404, 41, 41, 41, 41, 41,
+
+ 41, 41, 41, 41, 41, 41, 41, 41, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 71,
+
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 74, 74, 74, 74, 74, 74, 74, 74,
+ 74, 74, 74, 74, 74, 98, 98, 102, 393, 102,
+ 102, 102, 102, 102, 102, 102, 102, 383, 102, 102,
+ 104, 104, 104, 104, 104, 104, 392, 104, 104, 104,
+ 104, 391, 104, 107, 390, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 389, 107, 111, 111, 111, 111,
+ 111, 111, 388, 111, 111, 111, 111, 111, 111, 113,
+ 113, 387, 113, 113, 113, 113, 113, 113, 113, 113,
+ 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
+
+ 114, 386, 114, 118, 118, 118, 118, 118, 385, 118,
+ 118, 118, 118, 118, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 384, 119, 123, 123, 383,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 124,
+ 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
+ 124, 124, 137, 137, 137, 137, 137, 381, 137, 137,
+ 137, 137, 137, 137, 138, 138, 380, 379, 378, 377,
+ 138, 138, 138, 138, 138, 376, 138, 154, 154, 375,
+ 154, 374, 373, 154, 154, 154, 154, 154, 372, 154,
+ 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
+
+ 156, 371, 156, 160, 160, 160, 187, 370, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 206,
+ 369, 206, 206, 206, 206, 206, 206, 206, 206, 368,
+ 206, 206, 382, 382, 382, 382, 382, 382, 382, 382,
+ 382, 382, 382, 382, 382, 367, 366, 365, 364, 363,
+ 362, 361, 360, 359, 358, 357, 356, 354, 353, 352,
+ 351, 350, 349, 348, 347, 346, 345, 344, 343, 342,
+ 341, 340, 339, 338, 336, 334, 333, 332, 331, 330,
+ 329, 328, 327, 326, 325, 324, 322, 321, 319, 318,
+ 317, 314, 313, 312, 311, 310, 309, 308, 306, 305,
+
+ 304, 303, 302, 301, 299, 298, 297, 296, 295, 294,
+ 293, 292, 291, 290, 289, 288, 287, 284, 283, 282,
+ 281, 280, 279, 278, 277, 276, 275, 274, 273, 272,
+ 271, 270, 269, 268, 267, 266, 265, 264, 263, 262,
+ 261, 260, 259, 258, 257, 256, 255, 254, 253, 252,
+ 251, 248, 122, 199, 117, 194, 247, 246, 245, 244,
+ 243, 242, 241, 240, 239, 238, 237, 234, 233, 232,
+ 229, 228, 227, 224, 221, 220, 219, 215, 202, 199,
+ 194, 108, 108, 189, 188, 186, 185, 184, 178, 174,
+ 170, 167, 166, 161, 155, 112, 108, 103, 410, 49,
+
+ 49, 40, 23, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410
} ;
-static yyconst short int yy_chk[866] =
+static yyconst short int yy_chk[959] =
{ 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,
- 3, 3, 28, 4, 4, 28, 3, 22, 22, 4,
- 5, 5, 5, 6, 6, 6, 23, 23, 381, 3,
- 69, 3, 4, 69, 4, 9, 9, 9, 98, 5,
- 5, 5, 6, 6, 6, 7, 7, 98, 8, 8,
- 7, 29, 29, 8, 377, 9, 10, 10, 10, 37,
-
- 37, 38, 38, 353, 7, 7, 7, 8, 8, 8,
- 11, 11, 12, 12, 352, 11, 10, 12, 17, 17,
- 17, 43, 43, 17, 44, 44, 96, 17, 50, 50,
- 11, 96, 12, 13, 13, 13, 13, 17, 13, 17,
- 51, 51, 13, 103, 18, 18, 18, 55, 55, 18,
- 13, 103, 13, 18, 13, 56, 56, 60, 60, 61,
- 61, 64, 64, 18, 67, 18, 65, 65, 67, 70,
- 180, 67, 67, 70, 180, 67, 70, 70, 13, 183,
- 13, 14, 14, 14, 14, 180, 14, 76, 76, 183,
- 14, 77, 77, 81, 82, 82, 81, 364, 14, 364,
-
- 14, 351, 14, 83, 83, 84, 84, 85, 85, 86,
- 86, 87, 87, 89, 89, 90, 90, 87, 91, 91,
- 87, 92, 92, 99, 101, 350, 14, 101, 14, 15,
- 15, 15, 104, 15, 15, 349, 99, 346, 15, 248,
- 99, 104, 112, 112, 115, 115, 116, 116, 15, 104,
- 15, 16, 16, 16, 248, 16, 16, 117, 117, 342,
- 16, 118, 118, 121, 121, 122, 122, 123, 123, 340,
- 16, 339, 16, 25, 124, 124, 127, 127, 128, 128,
- 129, 129, 130, 130, 133, 133, 134, 134, 135, 135,
- 136, 136, 338, 25, 337, 25, 25, 25, 148, 148,
-
- 149, 149, 25, 336, 25, 25, 25, 25, 25, 25,
- 25, 25, 335, 25, 25, 58, 150, 150, 151, 151,
- 153, 153, 334, 58, 154, 154, 155, 155, 156, 156,
- 158, 158, 332, 58, 159, 159, 58, 58, 164, 164,
- 331, 58, 165, 165, 167, 167, 168, 168, 58, 169,
- 169, 58, 330, 58, 328, 58, 58, 170, 170, 172,
- 172, 173, 173, 174, 174, 175, 175, 176, 176, 177,
- 177, 178, 178, 187, 207, 207, 237, 208, 208, 254,
- 237, 327, 268, 237, 237, 271, 326, 282, 187, 347,
- 178, 325, 178, 207, 254, 207, 208, 268, 208, 324,
-
- 271, 187, 282, 322, 347, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 357,
- 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
- 357, 357, 357, 358, 358, 358, 358, 358, 358, 358,
- 358, 358, 358, 358, 358, 358, 358, 359, 359, 359,
- 359, 359, 359, 359, 359, 359, 359, 359, 359, 359,
- 359, 360, 360, 360, 360, 360, 360, 360, 360, 360,
- 360, 360, 360, 360, 360, 361, 361, 361, 361, 361,
- 361, 361, 361, 361, 361, 361, 361, 361, 361, 362,
- 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
-
- 362, 362, 362, 363, 363, 363, 363, 363, 363, 363,
- 363, 363, 363, 363, 363, 363, 363, 365, 365, 365,
- 365, 365, 365, 365, 365, 365, 365, 365, 319, 365,
- 365, 366, 318, 317, 366, 366, 366, 366, 316, 366,
- 366, 366, 366, 315, 366, 367, 314, 312, 311, 367,
- 367, 367, 367, 367, 367, 367, 367, 368, 368, 368,
- 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
- 368, 369, 310, 309, 369, 369, 369, 308, 369, 369,
- 369, 369, 369, 370, 370, 370, 370, 370, 370, 370,
- 370, 370, 370, 370, 370, 370, 370, 371, 307, 306,
-
- 305, 371, 371, 371, 371, 371, 371, 371, 371, 371,
- 372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
- 372, 372, 372, 372, 373, 304, 303, 302, 300, 373,
- 299, 373, 373, 298, 373, 373, 297, 373, 374, 295,
- 294, 293, 374, 292, 291, 374, 374, 290, 374, 374,
- 288, 374, 375, 375, 375, 375, 375, 375, 375, 375,
- 375, 375, 375, 375, 287, 375, 376, 286, 376, 376,
- 376, 376, 376, 376, 376, 376, 376, 376, 376, 376,
- 378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
- 378, 284, 378, 378, 379, 280, 379, 379, 379, 379,
-
- 379, 379, 379, 379, 379, 379, 379, 379, 380, 380,
- 380, 380, 380, 380, 380, 380, 380, 380, 380, 380,
- 380, 380, 278, 277, 275, 274, 273, 272, 270, 269,
- 267, 266, 264, 262, 261, 259, 257, 256, 255, 252,
- 251, 250, 249, 247, 245, 244, 243, 242, 241, 240,
- 239, 238, 234, 233, 232, 231, 230, 229, 228, 227,
- 226, 225, 224, 223, 222, 221, 220, 219, 218, 217,
- 216, 215, 214, 213, 212, 211, 210, 209, 205, 203,
- 200, 199, 198, 197, 196, 195, 194, 193, 192, 191,
- 190, 189, 188, 186, 185, 184, 182, 181, 179, 139,
-
- 113, 107, 106, 105, 102, 100, 97, 95, 94, 88,
- 79, 39, 21, 19, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355, 355, 355, 355, 355, 355,
- 355, 355, 355, 355, 355
+ 1, 1, 1, 1, 1, 3, 4, 5, 11, 82,
+ 6, 25, 25, 25, 447, 9, 33, 33, 10, 82,
+ 13, 3, 4, 3, 4, 11, 11, 11, 12, 14,
+ 5, 5, 5, 6, 6, 6, 9, 9, 9, 10,
+ 10, 10, 13, 15, 16, 12, 12, 12, 32, 67,
+
+ 19, 14, 32, 19, 19, 26, 26, 26, 64, 19,
+ 67, 15, 16, 17, 64, 17, 17, 17, 67, 42,
+ 83, 19, 17, 19, 176, 83, 20, 17, 176, 20,
+ 20, 17, 42, 21, 17, 20, 17, 21, 92, 47,
+ 47, 47, 21, 52, 52, 52, 92, 20, 22, 20,
+ 68, 446, 22, 445, 21, 68, 21, 22, 68, 68,
+ 17, 86, 17, 18, 47, 18, 18, 18, 52, 22,
+ 86, 22, 18, 55, 55, 55, 444, 18, 66, 73,
+ 63, 18, 66, 73, 18, 63, 18, 77, 63, 63,
+ 88, 77, 63, 90, 168, 66, 73, 93, 55, 78,
+
+ 78, 78, 443, 88, 77, 442, 93, 88, 90, 168,
+ 18, 90, 18, 28, 93, 101, 101, 440, 28, 106,
+ 106, 106, 115, 115, 115, 117, 117, 117, 439, 28,
+ 28, 120, 120, 120, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28, 58, 122,
+ 122, 122, 58, 438, 108, 108, 108, 408, 58, 109,
+ 109, 109, 140, 140, 407, 58, 141, 141, 58, 406,
+ 58, 152, 152, 58, 58, 144, 144, 144, 58, 108,
+ 147, 147, 147, 405, 109, 58, 153, 153, 58, 172,
+
+ 58, 58, 58, 58, 150, 150, 150, 159, 159, 159,
+ 162, 166, 404, 191, 162, 401, 172, 190, 190, 190,
+ 396, 166, 192, 192, 192, 162, 191, 314, 314, 172,
+ 194, 194, 194, 195, 195, 195, 197, 197, 197, 199,
+ 199, 199, 200, 200, 200, 207, 207, 207, 208, 209,
+ 209, 209, 210, 212, 208, 394, 210, 211, 211, 211,
+ 213, 213, 213, 214, 212, 251, 266, 214, 274, 210,
+ 251, 292, 212, 251, 251, 295, 311, 402, 337, 392,
+ 214, 391, 390, 266, 389, 274, 387, 386, 292, 337,
+ 337, 385, 295, 311, 402, 411, 411, 411, 411, 411,
+
+ 411, 411, 411, 411, 411, 411, 411, 411, 412, 412,
+ 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
+ 412, 413, 413, 413, 413, 413, 413, 413, 413, 413,
+ 413, 413, 413, 413, 414, 414, 414, 414, 414, 414,
+ 414, 414, 414, 414, 414, 414, 414, 415, 415, 415,
+ 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
+ 416, 416, 416, 416, 416, 416, 416, 416, 416, 416,
+ 416, 416, 416, 417, 417, 417, 417, 417, 417, 417,
+ 417, 417, 417, 417, 417, 417, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 419,
+
+ 419, 419, 419, 419, 419, 419, 419, 419, 419, 419,
+ 419, 419, 420, 420, 420, 420, 420, 420, 420, 420,
+ 420, 420, 420, 420, 420, 421, 421, 422, 383, 422,
+ 422, 422, 422, 422, 422, 422, 422, 382, 422, 422,
+ 423, 423, 423, 423, 423, 423, 381, 423, 423, 423,
+ 423, 380, 423, 424, 379, 424, 424, 424, 424, 424,
+ 424, 424, 424, 424, 378, 424, 425, 425, 425, 425,
+ 425, 425, 375, 425, 425, 425, 425, 425, 425, 426,
+ 426, 374, 426, 426, 426, 426, 426, 426, 426, 426,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 373, 427, 428, 428, 428, 428, 428, 372, 428,
+ 428, 428, 428, 428, 429, 429, 429, 429, 429, 429,
+ 429, 429, 429, 429, 429, 371, 429, 430, 430, 370,
+ 430, 430, 430, 430, 430, 430, 430, 430, 430, 431,
+ 431, 431, 431, 431, 431, 431, 431, 431, 431, 431,
+ 431, 431, 432, 432, 432, 432, 432, 369, 432, 432,
+ 432, 432, 432, 432, 433, 433, 367, 366, 363, 362,
+ 433, 433, 433, 433, 433, 361, 433, 434, 434, 360,
+ 434, 359, 358, 434, 434, 434, 434, 434, 357, 434,
+ 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
+
+ 435, 356, 435, 436, 436, 436, 437, 355, 437, 437,
+ 437, 437, 437, 437, 437, 437, 437, 437, 437, 441,
+ 353, 441, 441, 441, 441, 441, 441, 441, 441, 352,
+ 441, 441, 448, 448, 448, 448, 448, 448, 448, 448,
+ 448, 448, 448, 448, 448, 351, 349, 348, 347, 346,
+ 345, 344, 343, 342, 341, 340, 339, 336, 335, 334,
+ 333, 332, 331, 329, 328, 327, 326, 325, 324, 323,
+ 322, 320, 319, 318, 313, 309, 307, 306, 305, 304,
+ 302, 301, 300, 298, 297, 296, 294, 293, 290, 289,
+ 287, 284, 282, 281, 279, 277, 276, 275, 273, 271,
+
+ 270, 269, 268, 267, 265, 264, 263, 261, 260, 259,
+ 258, 257, 256, 255, 254, 253, 252, 247, 246, 245,
+ 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
+ 234, 233, 232, 231, 230, 229, 228, 227, 226, 225,
+ 224, 223, 222, 221, 220, 219, 218, 217, 216, 215,
+ 206, 202, 201, 198, 196, 193, 189, 186, 185, 184,
+ 183, 182, 181, 180, 179, 178, 177, 175, 174, 173,
+ 171, 170, 169, 167, 165, 164, 163, 161, 126, 121,
+ 116, 110, 107, 103, 102, 96, 95, 94, 91, 89,
+ 87, 85, 84, 81, 72, 49, 45, 40, 23, 8,
+
+ 7, 2, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
+ 410, 410, 410, 410, 410, 410, 410, 410
} ;
static yy_state_type yy_last_accepting_state;
extern int yy_flex_debug;
int yy_flex_debug = 1;
-static yyconst short int yy_rule_linenum[97] =
+static yyconst short int yy_rule_linenum[104] =
{ 0,
- 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, 151, 152,
- 153, 154, 156, 157, 158, 163, 166, 169, 172, 173,
- 176, 179, 182, 190, 196, 212, 213, 224, 236, 237,
- 238, 255, 264, 266, 286, 300, 302, 322, 334, 338,
- 339, 340, 341, 342, 343, 344, 345, 346, 352, 363,
- 369, 370, 372, 374, 392, 398, 399, 401, 403, 421,
- 424, 427, 428, 431, 442, 453, 455, 457, 460, 461,
- 464, 484, 491, 492, 493, 513
-
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 266, 271, 273, 274, 275, 276,
+ 277, 279, 281, 287, 301, 304, 307, 308, 311, 314,
+ 317, 325, 331, 346, 347, 357, 362, 377, 378, 393,
+ 394, 406, 416, 435, 451, 470, 482, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 515, 521, 532, 538,
+ 539, 540, 542, 559, 565, 566, 567, 569, 586, 589,
+ 592, 593, 596, 607, 608, 609, 622, 624, 629, 648,
+
+ 655, 656, 675
} ;
/* The intent behind this definition is that it'll catch
#define YY_STACK_USED 1
#line 26 "scan-gram.l"
#include "system.h"
+#include "mbswidth.h"
#include "complain.h"
#include "quote.h"
#include "getargs.h"
#define YY_USER_INIT \
do { \
LOCATION_RESET (*yylloc); \
+ yylloc->file = infile; \
/* This is only to avoid GCC warnings. */ \
if (yycontrol) {;}; \
} while (0)
-#define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng)
-#define YY_LINES LOCATION_LINES (*yylloc, yyleng); lineno += yyleng;
+#define YY_USER_ACTION extend_location (yylloc, yytext, yyleng);
#define YY_STEP LOCATION_STEP (*yylloc)
+#define YY_INPUT(buf, result, size) ((result) = no_cr_read (yyin, buf, size))
+
+
+/* Read bytes from FP into buffer BUF of size SIZE. Return the
+ number of bytes read. Remove '\r' from input, treating \r\n
+ and isolated \r as \n. */
+
+static size_t
+no_cr_read (FILE *fp, char *buf, size_t size)
+{
+ size_t s = fread (buf, 1, size, fp);
+ if (s)
+ {
+ char *w = memchr (buf, '\r', s);
+ if (w)
+ {
+ char const *r = ++w;
+ char const *lim = buf + s;
+
+ for (;;)
+ {
+ /* Found an '\r'. Treat it like '\n', but ignore any
+ '\n' that immediately follows. */
+ w[-1] = '\n';
+ if (r == lim)
+ {
+ int ch = getc (fp);
+ if (ch != '\n' && ungetc (ch, fp) != ch)
+ break;
+ }
+ else if (*r == '\n')
+ r++;
+
+ /* Copy until the next '\r'. */
+ do
+ {
+ if (r == lim)
+ return w - buf;
+ }
+ while ((*w++ = *r++) != '\r');
+ }
+
+ return w - buf;
+ }
+ }
+
+ return s;
+}
+
+
+/* Extend *LOC to account for token TOKEN of size SIZE. */
+
+static void
+extend_location (location_t *loc, char const *token, int size)
+{
+ int line = loc->last_line;
+ int column = loc->last_column;
+ char const *p0 = token;
+ char const *p = token;
+ char const *lim = token + size;
+
+ for (p = token; p < lim; p++)
+ switch (*p)
+ {
+ case '\r':
+ /* \r shouldn't survive no_cr_read. */
+ abort ();
+
+ case '\n':
+ line++;
+ column = 1;
+ p0 = p + 1;
+ break;
+
+ case '\t':
+ column += mbsnwidth (p0, p - p0, 0);
+ column += 8 - ((column - 1) & 7);
+ p0 = p + 1;
+ break;
+ }
+
+ loc->last_line = line;
+ loc->last_column = column + mbsnwidth (p0, p - p0, 0);
+}
+
+
+/* Report an unexpected end of file at LOC. A token or comment began
+ with TOKEN_START, but an end of file was encountered and the
+ expected TOKEN_END was missing. */
+
+static void
+unexpected_end_of_file (location_t loc,
+ char const *token_start, char const *token_end)
+{
+ complain_at (loc, _("unexpected end of file in `%s ... %s'"),
+ token_start, token_end);
+}
+
+
/* STRING_OBSTACK -- Used to store all the characters that we need to
keep (to construct ID, STRINGS etc.). Use the following macros to
}
-static int braces_level = 0;
static int percent_percent_count = 0;
-static void handle_dollar PARAMS ((braced_code_t code_kind,
- char *cp, location_t location));
-static void handle_at PARAMS ((braced_code_t code_kind,
- char *cp, location_t location));
+/* Within well-formed rules, RULE_LENGTH is the number of values in
+ the current rule so far, which says where to find `$0' with respect
+ to the top of the stack. It is not the same as the rule->length in
+ the case of mid rule actions.
+
+ Outside of well-formed rules, RULE_LENGTH has an undefined value. */
+static int rule_length;
+
+static void handle_dollar (braced_code_t code_kind,
+ char *cp, location_t location);
+static void handle_at (braced_code_t code_kind,
+ char *cp, location_t location);
+static void handle_syncline (char *args, location_t *location);
+static int convert_ucn_to_byte (char const *hex_text);
#define SC_COMMENT 1
+#define SC_LINE_COMMENT 2
+#define SC_YACC_COMMENT 3
-#define SC_STRING 2
-#define SC_CHARACTER 3
+#define SC_STRING 4
+#define SC_CHARACTER 5
-#define SC_ESCAPED_STRING 4
-#define SC_ESCAPED_CHARACTER 5
+#define SC_ESCAPED_STRING 6
+#define SC_ESCAPED_CHARACTER 7
-#define SC_BRACED_CODE 6
-#define SC_PROLOGUE 7
-#define SC_EPILOGUE 8
+#define SC_BRACED_CODE 8
+#define SC_PROLOGUE 9
+#define SC_EPILOGUE 10
-#line 817 "lex.yy.c"
+/* POSIX says that a tag must be both an id and a C union member, but
+ historically almost any character is allowed in a tag. We disallow
+ NUL and newline, as this simplifies our implementation. */
+/* Zero or more instances of backslash-newline. Following GCC, allow
+ white space between the backslash and the newline. */
+#line 975 "scan-gram.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
#endif
#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ yy_current_buffer->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 98 "scan-gram.l"
+#line 216 "scan-gram.l"
+
+ int braces_level IF_LINT (= 0);
/* At each yylex invocation, mark the current position as the
start of the next token. */
-#define TR_POS 0
-#if TR_POS
- fprintf (stderr, "FOO1: %p: ", yylloc);
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, "\n");
-#endif
YY_STEP;
-#if TR_POS
- fprintf (stderr, "BAR1: ");
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, "\n");
-#endif
/*----------------------------.
| Scanning Bison directives. |
`----------------------------*/
-#line 1002 "lex.yy.c"
+#line 1154 "scan-gram.c"
if ( yy_init )
{
yy_bp = yy_cp;
yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
yy_match:
do
{
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 356 )
+ if ( yy_current_state >= 411 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 815 );
+ while ( yy_base[yy_current_state] != 903 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
{
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
- else if ( yy_act < 97 )
+ else if ( yy_act < 104 )
fprintf( stderr, "--accepting rule at line %d (\"%s\")\n",
yy_rule_linenum[yy_act], yytext );
- else if ( yy_act == 97 )
+ else if ( yy_act == 104 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
yytext );
- else if ( yy_act == 98 )
+ else if ( yy_act == 105 )
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
case 1:
YY_RULE_SETUP
-#line 122 "scan-gram.l"
+#line 231 "scan-gram.l"
return PERCENT_NONASSOC;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 123 "scan-gram.l"
+#line 232 "scan-gram.l"
return PERCENT_DEBUG;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 124 "scan-gram.l"
+#line 233 "scan-gram.l"
return PERCENT_DEFINE;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 125 "scan-gram.l"
+#line 234 "scan-gram.l"
return PERCENT_DEFINES;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 126 "scan-gram.l"
+#line 235 "scan-gram.l"
return PERCENT_DESTRUCTOR;
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 127 "scan-gram.l"
-return PERCENT_ERROR_VERBOSE;
+#line 236 "scan-gram.l"
+return PERCENT_DPREC;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 128 "scan-gram.l"
-return PERCENT_EXPECT;
+#line 237 "scan-gram.l"
+return PERCENT_ERROR_VERBOSE;
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 129 "scan-gram.l"
-return PERCENT_FILE_PREFIX;
+#line 238 "scan-gram.l"
+return PERCENT_EXPECT;
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 130 "scan-gram.l"
-return PERCENT_YACC;
+#line 239 "scan-gram.l"
+return PERCENT_FILE_PREFIX;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 131 "scan-gram.l"
-return PERCENT_LEFT;
+#line 240 "scan-gram.l"
+return PERCENT_YACC;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 132 "scan-gram.l"
-return PERCENT_LOCATIONS;
+#line 241 "scan-gram.l"
+return PERCENT_GLR_PARSER;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 133 "scan-gram.l"
-return PERCENT_NAME_PREFIX;
+#line 242 "scan-gram.l"
+return PERCENT_LEFT;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 134 "scan-gram.l"
-return PERCENT_NO_LINES;
+#line 243 "scan-gram.l"
+return PERCENT_LOCATIONS;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 135 "scan-gram.l"
-return PERCENT_NONASSOC;
+#line 244 "scan-gram.l"
+return PERCENT_MERGE;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 136 "scan-gram.l"
-return PERCENT_NTERM;
+#line 245 "scan-gram.l"
+return PERCENT_NAME_PREFIX;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 137 "scan-gram.l"
-return PERCENT_OUTPUT;
+#line 246 "scan-gram.l"
+return PERCENT_NO_LINES;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 138 "scan-gram.l"
-return PERCENT_PREC;
+#line 247 "scan-gram.l"
+return PERCENT_NONASSOC;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 139 "scan-gram.l"
-return PERCENT_PURE_PARSER;
+#line 248 "scan-gram.l"
+return PERCENT_NTERM;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 140 "scan-gram.l"
-return PERCENT_RIGHT;
+#line 249 "scan-gram.l"
+return PERCENT_OUTPUT;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 141 "scan-gram.l"
-return PERCENT_SKELETON;
+#line 250 "scan-gram.l"
+return PERCENT_PARSE_PARAM;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 142 "scan-gram.l"
-return PERCENT_START;
+#line 251 "scan-gram.l"
+rule_length--; return PERCENT_PREC;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 143 "scan-gram.l"
-return PERCENT_TOKEN;
+#line 252 "scan-gram.l"
+return PERCENT_PRINTER;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 144 "scan-gram.l"
-return PERCENT_TOKEN;
+#line 253 "scan-gram.l"
+return PERCENT_PURE_PARSER;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 145 "scan-gram.l"
-return PERCENT_TOKEN_TABLE;
+#line 254 "scan-gram.l"
+return PERCENT_RIGHT;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 146 "scan-gram.l"
-return PERCENT_TYPE;
+#line 255 "scan-gram.l"
+return PERCENT_LEX_PARAM;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 147 "scan-gram.l"
-return PERCENT_UNION;
+#line 256 "scan-gram.l"
+return PERCENT_SKELETON;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 148 "scan-gram.l"
-return PERCENT_VERBOSE;
+#line 257 "scan-gram.l"
+return PERCENT_START;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 149 "scan-gram.l"
-return PERCENT_YACC;
+#line 258 "scan-gram.l"
+return PERCENT_TOKEN;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 151 "scan-gram.l"
-return EQUAL;
+#line 259 "scan-gram.l"
+return PERCENT_TOKEN;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 152 "scan-gram.l"
-return COLON;
+#line 260 "scan-gram.l"
+return PERCENT_TOKEN_TABLE;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 153 "scan-gram.l"
-return PIPE;
+#line 261 "scan-gram.l"
+return PERCENT_TYPE;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 154 "scan-gram.l"
-return SEMICOLON;
+#line 262 "scan-gram.l"
+return PERCENT_UNION;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 156 "scan-gram.l"
-YY_LINES; YY_STEP;
+#line 263 "scan-gram.l"
+return PERCENT_VERBOSE;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 157 "scan-gram.l"
-YY_STEP;
+#line 264 "scan-gram.l"
+return PERCENT_YACC;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 158 "scan-gram.l"
+#line 266 "scan-gram.l"
{
- yylval->symbol = getsym (yytext, *yylloc);
- return ID;
+ complain_at (*yylloc, _("invalid directive: %s"), quote (yytext));
+ YY_STEP;
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 163 "scan-gram.l"
-yylval->integer = strtol (yytext, 0, 10); return INT;
+#line 271 "scan-gram.l"
+handle_syncline (yytext + strlen ("#line "), yylloc); YY_STEP;
YY_BREAK
-/* Characters. We don't check there is only one. */
case 37:
YY_RULE_SETUP
-#line 166 "scan-gram.l"
+#line 273 "scan-gram.l"
+return EQUAL;
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 274 "scan-gram.l"
+rule_length = 0; return COLON;
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 275 "scan-gram.l"
+rule_length = 0; return PIPE;
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 276 "scan-gram.l"
+return COMMA;
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 277 "scan-gram.l"
+return SEMICOLON;
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 279 "scan-gram.l"
+YY_STEP;
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 281 "scan-gram.l"
+{
+ yylval->symbol = symbol_get (yytext, *yylloc);
+ rule_length++;
+ return ID;
+ }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 287 "scan-gram.l"
+{
+ unsigned long num;
+ errno = 0;
+ num = strtoul (yytext, 0, 10);
+ if (INT_MAX < num || errno)
+ {
+ complain_at (*yylloc, _("integer out of range: %s"), quote (yytext));
+ num = INT_MAX;
+ }
+ yylval->integer = num;
+ return INT;
+ }
+ YY_BREAK
+/* Characters. We don't check there is only one. */
+case 45:
+YY_RULE_SETUP
+#line 301 "scan-gram.l"
YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER);
YY_BREAK
/* Strings. */
-case 38:
+case 46:
YY_RULE_SETUP
-#line 169 "scan-gram.l"
+#line 304 "scan-gram.l"
YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING);
YY_BREAK
/* Comments. */
-case 39:
+case 47:
YY_RULE_SETUP
-#line 172 "scan-gram.l"
-yy_push_state (SC_COMMENT);
+#line 307 "scan-gram.l"
+BEGIN SC_YACC_COMMENT;
YY_BREAK
-case 40:
+case 48:
YY_RULE_SETUP
-#line 173 "scan-gram.l"
+#line 308 "scan-gram.l"
YY_STEP;
YY_BREAK
/* Prologue. */
-case 41:
+case 49:
YY_RULE_SETUP
-#line 176 "scan-gram.l"
+#line 311 "scan-gram.l"
yy_push_state (SC_PROLOGUE);
YY_BREAK
/* Code in between braces. */
-case 42:
+case 50:
YY_RULE_SETUP
-#line 179 "scan-gram.l"
-YY_OBS_GROW; ++braces_level; yy_push_state (SC_BRACED_CODE);
+#line 314 "scan-gram.l"
+YY_OBS_GROW; braces_level = 0; yy_push_state (SC_BRACED_CODE);
YY_BREAK
/* A type. */
-case 43:
+case 51:
YY_RULE_SETUP
-#line 182 "scan-gram.l"
+#line 317 "scan-gram.l"
{
obstack_grow (&string_obstack, yytext + 1, yyleng - 2);
YY_OBS_FINISH;
return TYPE;
}
YY_BREAK
-case 44:
+case 52:
YY_RULE_SETUP
-#line 190 "scan-gram.l"
+#line 325 "scan-gram.l"
{
if (++percent_percent_count == 2)
yy_push_state (SC_EPILOGUE);
return PERCENT_PERCENT;
}
YY_BREAK
-case 45:
+case 53:
YY_RULE_SETUP
-#line 196 "scan-gram.l"
+#line 331 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": invalid character: `%c'\n", *yytext);
+ complain_at (*yylloc, _("invalid character: %s"), quote (yytext));
YY_STEP;
}
YY_BREAK
-/*------------------------------------------------------------.
- | Whatever the start condition (but those which correspond to |
- | entity `swallowed' by Bison: SC_ESCAPED_STRING and |
- | SC_ESCAPED_CHARACTER), no M4 character must escape as is. |
- `------------------------------------------------------------*/
+/*-------------------------------------------------------------------.
+ | Whatever the start condition (but those which correspond to |
+ | entities `swallowed' by Bison: SC_YACC_COMMENT, SC_ESCAPED_STRING, |
+ | and SC_ESCAPED_CHARACTER), no M4 character must escape as is. |
+ `-------------------------------------------------------------------*/
-case 46:
+case 54:
YY_RULE_SETUP
-#line 212 "scan-gram.l"
-if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@<:@");
+#line 346 "scan-gram.l"
+obstack_sgrow (&string_obstack, "@<:@");
YY_BREAK
-case 47:
+case 55:
YY_RULE_SETUP
-#line 213 "scan-gram.l"
-if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@");
+#line 347 "scan-gram.l"
+obstack_sgrow (&string_obstack, "@:>@");
YY_BREAK
-/*-----------------------------------------------------------.
- | Scanning a C comment. The initial `/ *' is already eaten. |
- `-----------------------------------------------------------*/
+/*---------------------------------------------------------------.
+ | Scanning a Yacc comment. The initial `/ *' is already eaten. |
+ `---------------------------------------------------------------*/
-case 48:
+case 56:
YY_RULE_SETUP
-#line 224 "scan-gram.l"
-{ /* End of the comment. */
- if (yy_top_state () == INITIAL)
- {
- YY_STEP;
- }
- else
- {
- YY_OBS_GROW;
- }
- yy_pop_state ();
+#line 357 "scan-gram.l"
+{
+ YY_STEP;
+ BEGIN INITIAL;
}
YY_BREAK
-case 49:
+case 57:
YY_RULE_SETUP
-#line 236 "scan-gram.l"
-if (yy_top_state () != INITIAL) YY_OBS_GROW;
+#line 362 "scan-gram.l"
+;
YY_BREAK
-case 50:
+case YY_STATE_EOF(SC_YACC_COMMENT):
+#line 364 "scan-gram.l"
+{
+ unexpected_end_of_file (*yylloc, "/*", "*/");
+ BEGIN INITIAL;
+ }
+ YY_BREAK
+
+/*------------------------------------------------------------.
+ | Scanning a C comment. The initial `/ *' is already eaten. |
+ `------------------------------------------------------------*/
+
+
+case 58:
YY_RULE_SETUP
-#line 237 "scan-gram.l"
-if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_LINES;
+#line 377 "scan-gram.l"
+YY_OBS_GROW; yy_pop_state ();
YY_BREAK
-case 51:
+case 59:
YY_RULE_SETUP
-#line 238 "scan-gram.l"
-/* Stray `*'. */if (yy_top_state () != INITIAL) YY_OBS_GROW;
+#line 378 "scan-gram.l"
+YY_OBS_GROW;
YY_BREAK
case YY_STATE_EOF(SC_COMMENT):
-#line 240 "scan-gram.l"
+#line 380 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a comment\n");
+ unexpected_end_of_file (*yylloc, "/*", "*/");
yy_pop_state ();
}
YY_BREAK
+/*--------------------------------------------------------------.
+ | Scanning a line comment. The initial `//' is already eaten. |
+ `--------------------------------------------------------------*/
+
+
+case 60:
+YY_RULE_SETUP
+#line 393 "scan-gram.l"
+YY_OBS_GROW; yy_pop_state ();
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 394 "scan-gram.l"
+YY_OBS_GROW;
+ YY_BREAK
+case YY_STATE_EOF(SC_LINE_COMMENT):
+#line 395 "scan-gram.l"
+yy_pop_state ();
+ YY_BREAK
+
/*----------------------------------------------------------------.
| Scanning a C string, including its escapes. The initial `"' is |
| already eaten. |
`----------------------------------------------------------------*/
-case 52:
+case 62:
YY_RULE_SETUP
-#line 255 "scan-gram.l"
+#line 406 "scan-gram.l"
{
assert (yy_top_state () == INITIAL);
YY_OBS_GROW;
YY_OBS_FINISH;
yylval->string = last_string;
yy_pop_state ();
+ rule_length++;
return STRING;
}
YY_BREAK
-case 53:
+case 63:
YY_RULE_SETUP
-#line 264 "scan-gram.l"
+#line 416 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 266 "scan-gram.l"
-obstack_1grow (&string_obstack, '\n'); YY_LINES;
- YY_BREAK
case YY_STATE_EOF(SC_ESCAPED_STRING):
-#line 268 "scan-gram.l"
+#line 418 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a string\n");
+ unexpected_end_of_file (*yylloc, "\"", "\"");
assert (yy_top_state () == INITIAL);
YY_OBS_FINISH;
yylval->string = last_string;
`---------------------------------------------------------------*/
-case 55:
+case 64:
YY_RULE_SETUP
-#line 286 "scan-gram.l"
+#line 435 "scan-gram.l"
{
YY_OBS_GROW;
assert (yy_top_state () == INITIAL);
{
YY_OBS_FINISH;
- yylval->symbol = getsym (last_string, *yylloc);
- symbol_class_set (yylval->symbol, token_sym);
- symbol_user_token_number_set (yylval->symbol, last_string[1]);
+ yylval->symbol = symbol_get (last_string, *yylloc);
+ symbol_class_set (yylval->symbol, token_sym, *yylloc);
+ symbol_user_token_number_set (yylval->symbol,
+ (unsigned char) last_string[1], *yylloc);
YY_OBS_FREE;
yy_pop_state ();
+ rule_length++;
return ID;
}
}
YY_BREAK
-case 56:
+case 65:
YY_RULE_SETUP
-#line 300 "scan-gram.l"
+#line 451 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 302 "scan-gram.l"
-obstack_1grow (&string_obstack, '\n'); YY_LINES;
- YY_BREAK
case YY_STATE_EOF(SC_ESCAPED_CHARACTER):
-#line 304 "scan-gram.l"
+#line 453 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a character\n");
+ unexpected_end_of_file (*yylloc, "'", "'");
assert (yy_top_state () == INITIAL);
YY_OBS_FINISH;
yylval->string = last_string;
`----------------------------*/
-case 58:
+case 66:
YY_RULE_SETUP
-#line 322 "scan-gram.l"
+#line 470 "scan-gram.l"
{
- long c = strtol (yytext + 1, 0, 8);
- if (c > 255)
+ unsigned long c = strtoul (yytext + 1, 0, 8);
+ if (UCHAR_MAX < c)
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": invalid escape: %s\n", quote (yytext));
+ complain_at (*yylloc, _("invalid escape sequence: %s"),
+ quote (yytext));
YY_STEP;
}
else
obstack_1grow (&string_obstack, c);
}
YY_BREAK
-case 59:
+case 67:
YY_RULE_SETUP
-#line 334 "scan-gram.l"
+#line 482 "scan-gram.l"
{
- obstack_1grow (&string_obstack, strtol (yytext + 2, 0, 16));
+ unsigned long c;
+ errno = 0;
+ c = strtoul (yytext + 2, 0, 16);
+ if (UCHAR_MAX < c || errno)
+ {
+ complain_at (*yylloc, _("invalid escape sequence: %s"),
+ quote (yytext));
+ YY_STEP;
+ }
+ else
+ obstack_1grow (&string_obstack, c);
}
YY_BREAK
-case 60:
+case 68:
YY_RULE_SETUP
-#line 338 "scan-gram.l"
+#line 496 "scan-gram.l"
obstack_1grow (&string_obstack, '\a');
YY_BREAK
-case 61:
+case 69:
YY_RULE_SETUP
-#line 339 "scan-gram.l"
+#line 497 "scan-gram.l"
obstack_1grow (&string_obstack, '\b');
YY_BREAK
-case 62:
+case 70:
YY_RULE_SETUP
-#line 340 "scan-gram.l"
+#line 498 "scan-gram.l"
obstack_1grow (&string_obstack, '\f');
YY_BREAK
-case 63:
+case 71:
YY_RULE_SETUP
-#line 341 "scan-gram.l"
+#line 499 "scan-gram.l"
obstack_1grow (&string_obstack, '\n');
YY_BREAK
-case 64:
+case 72:
YY_RULE_SETUP
-#line 342 "scan-gram.l"
+#line 500 "scan-gram.l"
obstack_1grow (&string_obstack, '\r');
YY_BREAK
-case 65:
+case 73:
YY_RULE_SETUP
-#line 343 "scan-gram.l"
+#line 501 "scan-gram.l"
obstack_1grow (&string_obstack, '\t');
YY_BREAK
-case 66:
+case 74:
YY_RULE_SETUP
-#line 344 "scan-gram.l"
+#line 502 "scan-gram.l"
obstack_1grow (&string_obstack, '\v');
YY_BREAK
-case 67:
+case 75:
YY_RULE_SETUP
-#line 345 "scan-gram.l"
+#line 503 "scan-gram.l"
obstack_1grow (&string_obstack, yytext[1]);
YY_BREAK
-case 68:
+case 76:
YY_RULE_SETUP
-#line 346 "scan-gram.l"
+#line 504 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unrecognized escape: %s\n", quote (yytext));
+ int c = convert_ucn_to_byte (yytext);
+ if (c < 0)
+ {
+ complain_at (*yylloc, _("invalid escape sequence: %s"),
+ quote (yytext));
+ YY_STEP;
+ }
+ else
+ obstack_1grow (&string_obstack, c);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 515 "scan-gram.l"
+{
+ complain_at (*yylloc, _("unrecognized escape sequence: %s"),
+ quote (yytext));
YY_OBS_GROW;
}
YY_BREAK
/* FLex wants this rule, in case of a `\<<EOF>>'. */
-case 69:
+case 78:
YY_RULE_SETUP
-#line 352 "scan-gram.l"
+#line 521 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
`----------------------------------------------------------*/
-case 70:
+case 79:
YY_RULE_SETUP
-#line 363 "scan-gram.l"
+#line 532 "scan-gram.l"
{
YY_OBS_GROW;
assert (yy_top_state () != INITIAL);
yy_pop_state ();
}
YY_BREAK
-case 71:
+case 80:
YY_RULE_SETUP
-#line 369 "scan-gram.l"
+#line 538 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 72:
+case 81:
YY_RULE_SETUP
-#line 370 "scan-gram.l"
+#line 539 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-/* FLex wants this rule, in case of a `\<<EOF>>'. */
-case 73:
+case 82:
YY_RULE_SETUP
-#line 372 "scan-gram.l"
+#line 540 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 74:
+/* Needed for `\<<EOF>>', `\\<<newline>>[', and `\\<<newline>>]'. */
+case 83:
YY_RULE_SETUP
-#line 374 "scan-gram.l"
-YY_OBS_GROW; YY_LINES;
+#line 542 "scan-gram.l"
+YY_OBS_GROW;
YY_BREAK
case YY_STATE_EOF(SC_CHARACTER):
-#line 376 "scan-gram.l"
+#line 544 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a character\n");
+ unexpected_end_of_file (*yylloc, "'", "'");
assert (yy_top_state () != INITIAL);
yy_pop_state ();
}
`----------------------------------------------------------------*/
-case 75:
+case 84:
YY_RULE_SETUP
-#line 392 "scan-gram.l"
+#line 559 "scan-gram.l"
{
assert (yy_top_state () != INITIAL);
YY_OBS_GROW;
yy_pop_state ();
}
YY_BREAK
-case 76:
+case 85:
YY_RULE_SETUP
-#line 398 "scan-gram.l"
+#line 565 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 77:
+case 86:
YY_RULE_SETUP
-#line 399 "scan-gram.l"
+#line 566 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-/* FLex wants this rule, in case of a `\<<EOF>>'. */
-case 78:
+case 87:
YY_RULE_SETUP
-#line 401 "scan-gram.l"
+#line 567 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 79:
+/* Needed for `\<<EOF>>', `\\<<newline>>[', and `\\<<newline>>]'. */
+case 88:
YY_RULE_SETUP
-#line 403 "scan-gram.l"
-YY_OBS_GROW; YY_LINES;
+#line 569 "scan-gram.l"
+YY_OBS_GROW;
YY_BREAK
case YY_STATE_EOF(SC_STRING):
-#line 405 "scan-gram.l"
+#line 571 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a string\n");
+ unexpected_end_of_file (*yylloc, "\"", "\"");
assert (yy_top_state () != INITIAL);
yy_pop_state ();
}
/* Characters. We don't check there is only one. */
-case 80:
+case 89:
YY_RULE_SETUP
-#line 421 "scan-gram.l"
+#line 586 "scan-gram.l"
YY_OBS_GROW; yy_push_state (SC_CHARACTER);
YY_BREAK
/* Strings. */
-case 81:
+case 90:
YY_RULE_SETUP
-#line 424 "scan-gram.l"
+#line 589 "scan-gram.l"
YY_OBS_GROW; yy_push_state (SC_STRING);
YY_BREAK
/* Comments. */
-case 82:
+case 91:
YY_RULE_SETUP
-#line 427 "scan-gram.l"
+#line 592 "scan-gram.l"
YY_OBS_GROW; yy_push_state (SC_COMMENT);
YY_BREAK
-case 83:
+case 92:
YY_RULE_SETUP
-#line 428 "scan-gram.l"
-YY_OBS_GROW;
+#line 593 "scan-gram.l"
+YY_OBS_GROW; yy_push_state (SC_LINE_COMMENT);
YY_BREAK
/* Not comments. */
-case 84:
+case 93:
YY_RULE_SETUP
-#line 431 "scan-gram.l"
+#line 596 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
`---------------------------------------------------------------*/
-case 85:
+case 94:
YY_RULE_SETUP
-#line 442 "scan-gram.l"
+#line 607 "scan-gram.l"
+YY_OBS_GROW; braces_level++;
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 608 "scan-gram.l"
+YY_OBS_GROW; braces_level--;
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 609 "scan-gram.l"
{
YY_OBS_GROW;
- if (--braces_level == 0)
+ braces_level--;
+ if (braces_level < 0)
{
yy_pop_state ();
YY_OBS_FINISH;
yylval->string = last_string;
+ rule_length++;
return BRACED_CODE;
}
}
YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 453 "scan-gram.l"
-YY_OBS_GROW; braces_level++;
- YY_BREAK
-case 87:
+case 97:
YY_RULE_SETUP
-#line 455 "scan-gram.l"
+#line 622 "scan-gram.l"
{ handle_dollar (current_braced_code,
yytext, *yylloc); }
YY_BREAK
-case 88:
+case 98:
YY_RULE_SETUP
-#line 457 "scan-gram.l"
+#line 624 "scan-gram.l"
{ handle_at (current_braced_code,
yytext, *yylloc); }
YY_BREAK
-case 89:
+/* `"<"{splice}"<"' tokenizes `<<%' correctly (as `<<' `%') rather
+ than incorrrectly (as `<' `<%'). */
+case 99:
YY_RULE_SETUP
-#line 460 "scan-gram.l"
-YY_OBS_GROW;
- YY_BREAK
-case 90:
-YY_RULE_SETUP
-#line 461 "scan-gram.l"
-YY_OBS_GROW; YY_LINES;
- YY_BREAK
-/* A lose $, or /, or etc. */
-case 91:
-YY_RULE_SETUP
-#line 464 "scan-gram.l"
+#line 629 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
case YY_STATE_EOF(SC_BRACED_CODE):
-#line 466 "scan-gram.l"
+#line 631 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a braced code\n");
+ unexpected_end_of_file (*yylloc, "{", "}");
yy_pop_state ();
YY_OBS_FINISH;
yylval->string = last_string;
`--------------------------------------------------------------*/
-case 92:
+case 100:
YY_RULE_SETUP
-#line 484 "scan-gram.l"
+#line 648 "scan-gram.l"
{
yy_pop_state ();
YY_OBS_FINISH;
return PROLOGUE;
}
YY_BREAK
-case 93:
+case 101:
YY_RULE_SETUP
-#line 491 "scan-gram.l"
+#line 655 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 94:
+case 102:
YY_RULE_SETUP
-#line 492 "scan-gram.l"
+#line 656 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
-case 95:
-YY_RULE_SETUP
-#line 493 "scan-gram.l"
-YY_OBS_GROW; YY_LINES;
- YY_BREAK
case YY_STATE_EOF(SC_PROLOGUE):
-#line 495 "scan-gram.l"
+#line 658 "scan-gram.l"
{
- LOCATION_PRINT (stderr, *yylloc);
- fprintf (stderr, ": unexpected end of file in a prologue\n");
+ unexpected_end_of_file (*yylloc, "%{", "%}");
yy_pop_state ();
YY_OBS_FINISH;
yylval->string = last_string;
/*---------------------------------------------------------------.
| Scanning the epilogue (everything after the second "%%", which |
- | has already been eaten. |
+ | has already been eaten). |
`---------------------------------------------------------------*/
-case 96:
+case 103:
YY_RULE_SETUP
-#line 513 "scan-gram.l"
+#line 675 "scan-gram.l"
YY_OBS_GROW;
YY_BREAK
case YY_STATE_EOF(SC_EPILOGUE):
-#line 515 "scan-gram.l"
+#line 677 "scan-gram.l"
{
yy_pop_state ();
YY_OBS_FINISH;
}
YY_BREAK
-case 97:
+case 104:
YY_RULE_SETUP
-#line 524 "scan-gram.l"
+#line 686 "scan-gram.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 1842 "lex.yy.c"
+#line 2079 "scan-gram.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
register char *yy_cp;
yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 55);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 356 )
+ if ( yy_current_state >= 411 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ register YY_CHAR yy_c = 55;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 356 )
+ if ( yy_current_state >= 411 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 355);
+ yy_is_jam = (yy_current_state == 410);
return yy_is_jam ? 0 : yy_current_state;
}
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
+ yy_current_buffer->yy_at_bol = (c == '\n');
return c;
}
return 0;
}
#endif
-#line 524 "scan-gram.l"
+#line 686 "scan-gram.l"
/*------------------------------------------------------------------.
-| CP is pointing to a wannabee semantic value (i.e., a `$'). |
+| TEXT is pointing to a wannabee semantic value (i.e., a `$'). |
| |
| Possible inputs: $[<TYPENAME>]($|integer) |
| |
`------------------------------------------------------------------*/
static inline void
-handle_action_dollar (char *cp, location_t location)
+handle_action_dollar (char *text, location_t location)
{
const char *type_name = NULL;
-
- ++cp;
+ char *cp = text + 1;
/* Get the type name if explicit. */
if (*cp == '<')
type_name = symbol_list_n_type_name_get (current_rule, location, 0);
if (!type_name && typed)
complain_at (location, _("$$ of `%s' has no declared type"),
- symbol_tag_get (current_rule->sym));
+ current_rule->sym->tag);
if (!type_name)
type_name = "";
obstack_fgrow1 (&string_obstack,
"]b4_lhs_value([%s])[", type_name);
}
- else if (isdigit (*cp) || *cp == '-')
+ else
{
- /* RULE_LENGTH is the number of values in the current rule so
- far, which says where to find `$0' with respect to the top of
- the stack. It is not the same as the rule->length in the
- case of mid rule actions. */
- int rule_length = symbol_list_length (current_rule->next);
- int n = strtol (cp, &cp, 10);
-
- if (n > rule_length)
- complain_at (location, _("invalid value: %s%d"), "$", n);
- else
+ long num;
+ errno = 0;
+ num = strtol (cp, 0, 10);
+
+ if (INT_MIN <= num && num <= rule_length && ! errno)
{
+ int n = num;
if (!type_name && n > 0)
type_name = symbol_list_n_type_name_get (current_rule, location,
n);
if (!type_name && typed)
complain_at (location, _("$%d of `%s' has no declared type"),
- n, symbol_tag_get (current_rule->sym));
+ n, current_rule->sym->tag);
if (!type_name)
type_name = "";
obstack_fgrow3 (&string_obstack,
"]b4_rhs_value([%d], [%d], [%s])[",
rule_length, n, type_name);
}
- }
- else
- {
- char buf[] = "$c";
- buf[1] = *cp;
- complain_at (location, _("%s is invalid"), quote (buf));
+ else
+ complain_at (location, _("integer out of range: %s"), quote (text));
}
}
-/*---------------------------------------.
-| CP is pointing to $$ in a destructor. |
-`---------------------------------------*/
+/*---------------------------------------------------------------.
+| TEXT is expected to be $$ in some code associated to a symbol: |
+| destructor or printer. |
+`---------------------------------------------------------------*/
static inline void
-handle_destructor_dollar (char *cp, location_t location)
+handle_symbol_code_dollar (char *text, location_t location)
{
- ++cp;
+ char *cp = text + 1;
if (*cp == '$')
- {
- obstack_sgrow (&string_obstack, "]b4_dollar_dollar[");
- }
+ obstack_sgrow (&string_obstack, "]b4_dollar_dollar[");
else
- {
- char buf[] = "$c";
- buf[1] = *cp;
- complain_at (location, _("%s is invalid"), quote (buf));
- }
+ complain_at (location, _("invalid value: %s"), quote (text));
}
break;
case destructor_braced_code:
- handle_destructor_dollar (text, location);
+ case printer_braced_code:
+ handle_symbol_code_dollar (text, location);
break;
}
}
static inline void
handle_action_at (char *text, location_t location)
{
+ char *cp = text + 1;
locations_flag = 1;
- ++text;
- if (*text == '$')
+ if (*cp == '$')
{
obstack_sgrow (&string_obstack, "]b4_lhs_location[");
}
- else if (isdigit (*text) || *text == '-')
- {
- /* RULE_LENGTH is the number of values in the current rule so
- far, which says where to find `$0' with respect to the top of
- the stack. It is not the same as the rule->length in the
- case of mid rule actions. */
- int rule_length = symbol_list_length (current_rule->next);
- int n = strtol (text, &text, 10);
-
- if (n > rule_length)
- complain_at (location, _("invalid value: %s%d"), "@", n);
- else
- obstack_fgrow2 (&string_obstack, "]b4_rhs_location([%d], [%d])[",
- rule_length, n);
- }
else
{
- char buf[] = "@c";
- buf[1] = *text;
- complain_at (location, _("%s is invalid"), quote (buf));
+ long num;
+ errno = 0;
+ num = strtol (cp, 0, 10);
+
+ if (INT_MIN <= num && num <= rule_length && ! errno)
+ {
+ int n = num;
+ obstack_fgrow2 (&string_obstack, "]b4_rhs_location([%d], [%d])[",
+ rule_length, n);
+ }
+ else
+ complain_at (location, _("integer out of range: %s"), quote (text));
}
}
-/*--------------------------------------------.
-| TEXT is expexted tp be @$ in a destructor. |
-`--------------------------------------------*/
+/*---------------------------------------------------------------.
+| TEXT is expected to be @$ in some code associated to a symbol: |
+| destructor or printer. |
+`---------------------------------------------------------------*/
static inline void
-handle_destructor_at (char *text, location_t location)
+handle_symbol_code_at (char *text, location_t location)
{
- ++text;
- if (*text == '$')
- {
- obstack_sgrow (&string_obstack, "]b4_at_dollar[");
- }
+ char *cp = text + 1;
+ if (*cp == '$')
+ obstack_sgrow (&string_obstack, "]b4_at_dollar[");
else
- {
- char buf[] = "$c";
- buf[1] = *text;
- complain_at (location, _("%s is invalid"), quote (buf));
- }
+ complain_at (location, _("invalid value: %s"), quote (text));
}
break;
case destructor_braced_code:
- handle_destructor_at (text, location);
+ case printer_braced_code:
+ handle_symbol_code_at (text, location);
break;
}
}
+/*------------------------------------------------------------------.
+| Convert universal character name UCN to a single-byte character, |
+| and return that character. Return -1 if UCN does not correspond |
+| to a single-byte character. |
+`------------------------------------------------------------------*/
+
+static int
+convert_ucn_to_byte (char const *ucn)
+{
+ unsigned long code = strtoul (ucn + 2, 0, 16);
+
+ /* FIXME: Currently we assume Unicode-compatible unibyte characters
+ on ASCII hosts (i.e., Latin-1 on hosts with 8-bit bytes). On
+ non-ASCII hosts we support only the portable C character set.
+ These limitations should be removed once we add support for
+ multibyte characters. */
+
+ if (UCHAR_MAX < code)
+ return -1;
+
+#if ! ('$' == 0x24 && '@' == 0x40 && '`' == 0x60 && '~' == 0x7e)
+ {
+ /* A non-ASCII host. Use CODE to index into a table of the C
+ basic execution character set, which is guaranteed to exist on
+ all Standard C platforms. This table also includes '$', '@',
+ and '`', which are not in the basic execution character set but
+ which are unibyte characters on all the platforms that we know
+ about. */
+ static signed char const table[] =
+ {
+ '\0', -1, -1, -1, -1, -1, -1, '\a',
+ '\b', '\t', '\n', '\v', '\f', '\r', -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ ' ', '!', '"', '#', '$', '%', '&', '\'',
+ '(', ')', '*', '+', ',', '-', '.', '/',
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', ':', ';', '<', '=', '>', '?',
+ '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+ 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
+ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', '{', '|', '}', '~'
+ };
+
+ code = code < sizeof table ? table[code] : -1;
+ }
+#endif
+
+ return code;
+}
+
+
+/*----------------------------------------------------------------.
+| Handle `#line INT "FILE"'. ARGS has already skipped `#line '. |
+`----------------------------------------------------------------*/
+
+static void
+handle_syncline (char *args, location_t *location)
+{
+ int lineno = strtol (args, &args, 10);
+ const char *file = NULL;
+ file = strchr (args, '"') + 1;
+ *strchr (file, '"') = 0;
+ /* FIXME: Leaking... Can't free, as some locations are still
+ pointing to the old file name. */
+ infile = xstrdup (file);
+ location->file = infile;
+ location->last_line = lineno;
+}
+
/*-------------------------.
| Initialize the scanner. |
`-------------------------*/
scanner_free (void)
{
obstack_free (&string_obstack, 0);
+ /* Reclaim Flex's buffers. */
+ yy_delete_buffer (YY_CURRENT_BUFFER);
}