X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/4f25ebb043fdb762ce4c1a2564cd7056d957ed87..c0ad8bf3c2fb46f001bb24ac98a72b8bfb3a77ce:/src/scan-gram.c diff --git a/src/scan-gram.c b/src/scan-gram.c index 1fa90fcd..7457d949 100644 --- a/src/scan-gram.c +++ b/src/scan-gram.c @@ -309,49 +309,51 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *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 101 +#define YY_END_OF_BUFFER 102 +static yyconst short int yy_accept[380] = { 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, 102, 49, + 38, 37, 37, 42, 49, 41, 39, 49, 40, 34, + 36, 49, 33, 46, 35, 53, 54, 54, 55, 50, + 51, 80, 83, 83, 79, 50, 82, 51, 75, 78, + 78, 74, 77, 57, 58, 58, 56, 73, 60, 61, + 61, 59, 93, 94, 94, 85, 95, 84, 88, 95, + 50, 51, 90, 89, 97, 99, 99, 85, 98, 84, + 88, 100, 100, 100, 85, 84, 88, 38, 37, 37, + 37, 37, 48, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, + 39, 43, 44, 40, 0, 53, 54, 54, 54, 54, + 52, 80, 83, 83, 83, 83, 81, 75, 78, 78, + 78, 78, 76, 57, 58, 58, 58, 58, 72, 71, + 72, 64, 65, 66, 67, 68, 69, 70, 72, 61, + 61, 61, 61, 93, 94, 94, 94, 94, 91, 0, + 91, 0, 86, 87, 92, 0, 92, 97, 99, 99, + 99, 99, 96, 100, 100, 100, 100, 100, 86, 87, 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, 44, 47, 0, 0, 0, + 87, 87, 87, 0, 0, 0, 0, 0, 0, 0, 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, 62, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, + 26, 0, 29, 0, 0, 32, 0, 2, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 18, 0, 0, 0, 23, 0, 25, 27, 30, + + 0, 1, 3, 0, 0, 8, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, + 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 0, 16, 17, 0, 24, 0, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 5, 0, 0, 0, 11, + 0, 0, 0, 0, 9, 0, 15, 22, 28, 0, + 0, 7, 0, 0, 0, 0, 0, 10, 0 } ; static yyconst int yy_ec[256] = @@ -395,198 +397,206 @@ static yyconst int yy_meta[51] = 9, 9, 9, 9, 9, 9, 9, 5, 1, 5 } ; -static yyconst short int yy_base[382] = +static yyconst short int yy_base[406] = { 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 + 108, 110, 131, 179, 227, 249, 116, 142, 839, 840, + 836, 55, 64, 840, 267, 840, 0, 44, 79, 840, + 840, 0, 840, 840, 840, 0, 97, 99, 825, 840, + 840, 0, 119, 122, 840, 840, 0, 840, 0, 126, + 138, 840, 0, 0, 145, 153, 840, 311, 840, 155, + 157, 840, 0, 159, 164, 840, 159, 840, 62, 164, + 840, 840, 840, 840, 0, 185, 189, 840, 786, 840, + 185, 192, 201, 203, 205, 207, 209, 833, 211, 213, + 216, 219, 840, 800, 39, 86, 799, 796, 65, 801, + + 198, 786, 184, 795, 109, 203, 790, 797, 800, 840, + 0, 840, 0, 230, 806, 0, 242, 244, 255, 259, + 840, 0, 261, 263, 265, 272, 840, 0, 274, 276, + 278, 280, 840, 0, 282, 284, 286, 288, 840, 840, + 811, 840, 840, 840, 840, 840, 840, 840, 0, 297, + 314, 316, 318, 0, 322, 324, 326, 328, 840, 322, + 326, 0, 840, 0, 840, 330, 332, 0, 344, 347, + 355, 357, 840, 359, 361, 363, 365, 367, 369, 371, + 785, 144, 781, 780, 780, 144, 778, 787, 789, 775, + 778, 366, 784, 770, 168, 771, 779, 780, 783, 767, + + 772, 766, 771, 763, 775, 0, 840, 789, 0, 782, + 0, 374, 377, 774, 755, 764, 754, 766, 756, 764, + 763, 762, 230, 748, 764, 757, 758, 751, 760, 744, + 744, 755, 744, 751, 747, 743, 737, 740, 746, 745, + 735, 746, 744, 840, 840, 373, 730, 738, 731, 727, + 739, 725, 737, 754, 734, 722, 840, 718, 730, 372, + 725, 716, 720, 712, 840, 712, 375, 711, 723, 709, + 840, 713, 840, 712, 710, 840, 701, 840, 717, 702, + 840, 378, 702, 704, 380, 717, 708, 840, 701, 702, + 697, 840, 695, 707, 696, 840, 692, 840, 382, 840, + + 692, 840, 691, 704, 686, 840, 689, 690, 687, 688, + 659, 666, 633, 840, 628, 629, 613, 606, 618, 840, + 603, 615, 614, 597, 596, 597, 603, 590, 603, 840, + 589, 567, 578, 840, 564, 541, 547, 534, 523, 510, + 520, 840, 840, 506, 840, 516, 497, 510, 499, 368, + 365, 840, 368, 359, 348, 840, 316, 307, 297, 840, + 287, 282, 283, 260, 840, 252, 840, 840, 840, 263, + 384, 840, 241, 236, 224, 196, 158, 840, 840, 409, + 423, 437, 451, 465, 479, 493, 507, 227, 521, 535, + 549, 561, 575, 587, 601, 614, 628, 642, 656, 670, + + 104, 684, 698, 712, 77 } ; -static yyconst short int yy_def[382] = +static yyconst short int yy_def[406] = { 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 + 379, 1, 380, 380, 381, 381, 382, 382, 383, 383, + 384, 384, 385, 385, 386, 386, 387, 387, 379, 379, + 379, 379, 379, 379, 379, 379, 388, 379, 379, 379, + 379, 389, 379, 379, 379, 390, 379, 379, 379, 379, + 379, 391, 379, 379, 379, 379, 392, 379, 393, 379, + 379, 379, 394, 395, 379, 379, 379, 396, 379, 379, + 379, 379, 397, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 398, 379, 379, 379, 379, 379, + 379, 399, 399, 399, 399, 399, 399, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 388, 379, 400, 379, 389, 390, 379, 379, 379, 379, + 379, 391, 379, 379, 379, 379, 379, 393, 379, 379, + 379, 379, 379, 395, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 401, 379, + 379, 379, 379, 397, 379, 379, 379, 379, 379, 379, + 379, 402, 379, 403, 379, 379, 379, 398, 379, 379, + 379, 379, 379, 399, 399, 399, 399, 399, 399, 404, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + + 379, 379, 379, 379, 379, 400, 379, 379, 405, 402, + 403, 404, 404, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 0, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + + 379, 379, 379, 379, 379 } ; -static yyconst short int yy_nxt[866] = +static yyconst short int yy_nxt[891] = { 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, 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, 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 + 37, 38, 112, 37, 38, 113, 39, 89, 90, 39, + 43, 44, 45, 43, 44, 45, 91, 92, 182, 40, + 163, 41, 40, 164, 41, 55, 56, 57, 183, 46, + 47, 48, 46, 47, 48, 50, 51, 245, 50, 51, + 52, 114, 114, 52, 188, 58, 55, 56, 57, 117, + + 118, 119, 120, 189, 46, 53, 48, 46, 53, 48, + 60, 61, 60, 61, 209, 62, 58, 62, 83, 84, + 85, 123, 124, 86, 125, 126, 184, 87, 129, 130, + 58, 185, 58, 64, 65, 66, 67, 46, 68, 48, + 131, 132, 69, 198, 83, 84, 85, 135, 136, 86, + 70, 199, 71, 87, 72, 137, 138, 150, 151, 152, + 153, 155, 156, 46, 159, 48, 157, 158, 160, 165, + 215, 161, 161, 166, 216, 162, 167, 167, 73, 221, + 74, 64, 65, 66, 67, 217, 68, 169, 170, 222, + 69, 171, 172, 163, 175, 176, 164, 232, 70, 378, + + 71, 233, 72, 175, 177, 178, 176, 175, 176, 175, + 176, 175, 176, 89, 90, 91, 92, 179, 89, 90, + 180, 91, 92, 191, 195, 377, 73, 196, 74, 76, + 77, 78, 200, 79, 80, 111, 192, 111, 81, 256, + 193, 201, 114, 114, 117, 118, 119, 120, 46, 202, + 48, 76, 77, 78, 256, 79, 80, 117, 118, 376, + 81, 119, 120, 123, 124, 125, 126, 123, 124, 375, + 46, 374, 48, 93, 125, 126, 129, 130, 131, 132, + 129, 130, 131, 132, 135, 136, 137, 138, 135, 136, + 137, 138, 372, 94, 371, 95, 96, 97, 98, 150, + + 151, 370, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 369, 109, 110, 140, 152, 153, 150, 151, + 152, 153, 368, 141, 155, 156, 157, 158, 155, 156, + 157, 158, 367, 140, 161, 161, 142, 143, 161, 161, + 366, 144, 167, 167, 167, 167, 169, 170, 145, 171, + 172, 146, 365, 147, 364, 148, 149, 169, 170, 171, + 172, 175, 176, 175, 177, 178, 176, 178, 176, 175, + 177, 175, 176, 175, 213, 228, 175, 213, 159, 178, + 213, 289, 160, 363, 295, 161, 161, 305, 362, 308, + 228, 318, 211, 373, 211, 211, 289, 211, 211, 295, + + 211, 361, 305, 229, 308, 360, 318, 359, 373, 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, 115, 115, 115, 115, 115, 115, 115, 115, 115, + 115, 115, 358, 115, 115, 116, 357, 356, 116, 116, + 116, 116, 355, 116, 116, 116, 116, 354, 116, 122, + 353, 352, 351, 122, 122, 122, 122, 122, 122, 122, + 122, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 128, 350, 349, 128, 128, + 128, 348, 128, 128, 128, 128, 128, 133, 133, 133, + 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, + + 133, 134, 347, 346, 345, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 154, 344, + 343, 342, 341, 154, 340, 154, 154, 339, 154, 154, + 338, 154, 168, 337, 336, 335, 168, 334, 333, 168, + 168, 332, 168, 168, 331, 168, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 330, 174, + 206, 329, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 328, 210, 210, 211, 327, + + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 326, 325, 324, 323, + 322, 321, 320, 319, 317, 316, 315, 314, 313, 312, + 311, 310, 309, 307, 306, 304, 303, 302, 301, 300, + 299, 298, 297, 296, 294, 293, 292, 291, 290, 288, + 287, 286, 285, 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, 255, 254, 253, 252, 251, 250, 249, 248, 247, + + 246, 244, 243, 242, 241, 240, 239, 238, 237, 236, + 235, 234, 231, 230, 227, 226, 225, 224, 223, 220, + 219, 218, 214, 208, 207, 205, 204, 203, 197, 194, + 190, 187, 186, 181, 88, 173, 121, 88, 379, 19, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379 } ; -static yyconst short int yy_chk[866] = +static yyconst short int yy_chk[891] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -594,95 +604,97 @@ static yyconst short int yy_chk[866] = 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, + 5, 5, 5, 6, 6, 6, 23, 23, 95, 3, + 69, 3, 4, 69, 4, 9, 9, 9, 95, 5, + 5, 5, 6, 6, 6, 7, 7, 405, 8, 8, + 7, 29, 29, 8, 99, 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, + 37, 38, 38, 99, 7, 7, 7, 8, 8, 8, + 11, 11, 12, 12, 401, 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, + 51, 51, 13, 105, 18, 18, 18, 55, 55, 18, + 13, 105, 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, + 182, 67, 67, 70, 182, 67, 70, 70, 13, 186, + 13, 14, 14, 14, 14, 182, 14, 76, 76, 186, + 14, 77, 77, 81, 82, 82, 81, 195, 14, 377, - 14, 351, 14, 83, 83, 84, 84, 85, 85, 86, + 14, 195, 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, + 87, 92, 92, 101, 103, 376, 14, 103, 14, 15, + 15, 15, 106, 15, 15, 388, 101, 388, 15, 223, + 101, 106, 114, 114, 117, 117, 118, 118, 15, 106, + 15, 16, 16, 16, 223, 16, 16, 119, 119, 375, + 16, 120, 120, 123, 123, 124, 124, 125, 125, 374, + 16, 373, 16, 25, 126, 126, 129, 129, 130, 130, + 131, 131, 132, 132, 135, 135, 136, 136, 137, 137, + 138, 138, 370, 25, 366, 25, 25, 25, 25, 150, + + 150, 364, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 363, 25, 25, 58, 151, 151, 152, 152, + 153, 153, 362, 58, 155, 155, 156, 156, 157, 157, + 158, 158, 361, 58, 160, 160, 58, 58, 161, 161, + 359, 58, 166, 166, 167, 167, 169, 169, 58, 170, + 170, 58, 358, 58, 357, 58, 58, 171, 171, 172, + 172, 174, 174, 175, 175, 176, 176, 177, 177, 178, + 178, 179, 179, 180, 180, 192, 212, 212, 246, 213, + 213, 260, 246, 355, 267, 246, 246, 282, 354, 285, + 192, 299, 180, 371, 180, 212, 260, 212, 213, 267, + + 213, 353, 282, 192, 285, 351, 299, 350, 371, 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 + 380, 380, 380, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 382, 382, 382, + 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, + 382, 383, 383, 383, 383, 383, 383, 383, 383, 383, + 383, 383, 383, 383, 383, 384, 384, 384, 384, 384, + 384, 384, 384, 384, 384, 384, 384, 384, 384, 385, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 386, 386, 386, 386, 386, 386, 386, + + 386, 386, 386, 386, 386, 386, 386, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 389, 389, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 349, 389, 389, 390, 348, 347, 390, 390, + 390, 390, 346, 390, 390, 390, 390, 344, 390, 391, + 341, 340, 339, 391, 391, 391, 391, 391, 391, 391, + 391, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 393, 338, 337, 393, 393, + 393, 336, 393, 393, 393, 393, 393, 394, 394, 394, + 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, + + 394, 395, 335, 333, 332, 395, 395, 395, 395, 395, + 395, 395, 395, 395, 396, 396, 396, 396, 396, 396, + 396, 396, 396, 396, 396, 396, 396, 396, 397, 331, + 329, 328, 327, 397, 326, 397, 397, 325, 397, 397, + 324, 397, 398, 323, 322, 321, 398, 319, 318, 398, + 398, 317, 398, 398, 316, 398, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 315, 399, + 400, 313, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 312, 402, 402, 403, 311, + + 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, + 403, 403, 404, 404, 404, 404, 404, 404, 404, 404, + 404, 404, 404, 404, 404, 404, 310, 309, 308, 307, + 305, 304, 303, 301, 297, 295, 294, 293, 291, 290, + 289, 287, 286, 284, 283, 280, 279, 277, 275, 274, + 272, 270, 269, 268, 266, 264, 263, 262, 261, 259, + 258, 256, 255, 254, 253, 252, 251, 250, 249, 248, + 247, 243, 242, 241, 240, 239, 238, 237, 236, 235, + 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, + 224, 222, 221, 220, 219, 218, 217, 216, 215, 214, + + 210, 208, 205, 204, 203, 202, 201, 200, 199, 198, + 197, 196, 194, 193, 191, 190, 189, 188, 187, 185, + 184, 183, 181, 141, 115, 109, 108, 107, 104, 102, + 100, 98, 97, 94, 88, 79, 39, 21, 19, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379 } ; static yy_state_type yy_last_accepting_state; @@ -691,18 +703,18 @@ static char *yy_last_accepting_cpos; 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[101] = { 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 + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 155, 156, 157, 158, 160, 161, 162, 167, + 170, 173, 176, 177, 180, 183, 186, 194, 200, 216, + 217, 228, 240, 241, 242, 259, 268, 270, 290, 305, + 307, 327, 339, 343, 344, 345, 346, 347, 348, 349, + 350, 351, 357, 368, 374, 375, 377, 379, 397, 403, + 404, 406, 408, 426, 429, 432, 433, 436, 447, 458, + 460, 462, 465, 466, 469, 489, 496, 497, 498, 518 } ; @@ -751,14 +763,14 @@ char *yytext; #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_STEP LOCATION_STEP (*yylloc) - +#define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng); +#define YY_LINES LOCATION_LINES (*yylloc, yyleng); +#define YY_STEP LOCATION_STEP (*yylloc); /* STRING_OBSTACK -- Used to store all the characters that we need to keep (to construct ID, STRINGS etc.). Use the following macros to @@ -813,7 +825,7 @@ static void handle_at PARAMS ((braced_code_t code_kind, #define SC_PROLOGUE 7 #define SC_EPILOGUE 8 -#line 817 "lex.yy.c" +#line 829 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -998,7 +1010,7 @@ YY_DECL /*----------------------------. | Scanning Bison directives. | `----------------------------*/ -#line 1002 "lex.yy.c" +#line 1014 "lex.yy.c" if ( yy_init ) { @@ -1049,13 +1061,13 @@ yy_match: 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 >= 380 ) 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] != 840 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1075,13 +1087,13 @@ do_action: /* This label is used only to access EOF actions. */ { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 97 ) + else if ( yy_act < 101 ) fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 97 ) + else if ( yy_act == 101 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 98 ) + else if ( yy_act == 102 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -1126,200 +1138,220 @@ return PERCENT_DESTRUCTOR; case 6: YY_RULE_SETUP #line 127 "scan-gram.l" -return PERCENT_ERROR_VERBOSE; +return PERCENT_DPREC; YY_BREAK case 7: YY_RULE_SETUP #line 128 "scan-gram.l" -return PERCENT_EXPECT; +return PERCENT_ERROR_VERBOSE; YY_BREAK case 8: YY_RULE_SETUP #line 129 "scan-gram.l" -return PERCENT_FILE_PREFIX; +return PERCENT_EXPECT; YY_BREAK case 9: YY_RULE_SETUP #line 130 "scan-gram.l" -return PERCENT_YACC; +return PERCENT_FILE_PREFIX; YY_BREAK case 10: YY_RULE_SETUP #line 131 "scan-gram.l" -return PERCENT_LEFT; +return PERCENT_YACC; YY_BREAK case 11: YY_RULE_SETUP #line 132 "scan-gram.l" -return PERCENT_LOCATIONS; +return PERCENT_GLR_PARSER; YY_BREAK case 12: YY_RULE_SETUP #line 133 "scan-gram.l" -return PERCENT_NAME_PREFIX; +return PERCENT_LEFT; YY_BREAK case 13: YY_RULE_SETUP #line 134 "scan-gram.l" -return PERCENT_NO_LINES; +return PERCENT_LOCATIONS; YY_BREAK case 14: YY_RULE_SETUP #line 135 "scan-gram.l" -return PERCENT_NONASSOC; +return PERCENT_MERGE; YY_BREAK case 15: YY_RULE_SETUP #line 136 "scan-gram.l" -return PERCENT_NTERM; +return PERCENT_NAME_PREFIX; YY_BREAK case 16: YY_RULE_SETUP #line 137 "scan-gram.l" -return PERCENT_OUTPUT; +return PERCENT_NO_LINES; YY_BREAK case 17: YY_RULE_SETUP #line 138 "scan-gram.l" -return PERCENT_PREC; +return PERCENT_NONASSOC; YY_BREAK case 18: YY_RULE_SETUP #line 139 "scan-gram.l" -return PERCENT_PURE_PARSER; +return PERCENT_NTERM; YY_BREAK case 19: YY_RULE_SETUP #line 140 "scan-gram.l" -return PERCENT_RIGHT; +return PERCENT_OUTPUT; YY_BREAK case 20: YY_RULE_SETUP #line 141 "scan-gram.l" -return PERCENT_SKELETON; +return PERCENT_PREC; YY_BREAK case 21: YY_RULE_SETUP #line 142 "scan-gram.l" -return PERCENT_START; +return PERCENT_PRINTER; YY_BREAK case 22: YY_RULE_SETUP #line 143 "scan-gram.l" -return PERCENT_TOKEN; +return PERCENT_PURE_PARSER; YY_BREAK case 23: YY_RULE_SETUP #line 144 "scan-gram.l" -return PERCENT_TOKEN; +return PERCENT_RIGHT; YY_BREAK case 24: YY_RULE_SETUP #line 145 "scan-gram.l" -return PERCENT_TOKEN_TABLE; +return PERCENT_SKELETON; YY_BREAK case 25: YY_RULE_SETUP #line 146 "scan-gram.l" -return PERCENT_TYPE; +return PERCENT_START; YY_BREAK case 26: YY_RULE_SETUP #line 147 "scan-gram.l" -return PERCENT_UNION; +return PERCENT_TOKEN; YY_BREAK case 27: YY_RULE_SETUP #line 148 "scan-gram.l" -return PERCENT_VERBOSE; +return PERCENT_TOKEN; YY_BREAK case 28: YY_RULE_SETUP #line 149 "scan-gram.l" -return PERCENT_YACC; +return PERCENT_TOKEN_TABLE; YY_BREAK case 29: YY_RULE_SETUP -#line 151 "scan-gram.l" -return EQUAL; +#line 150 "scan-gram.l" +return PERCENT_TYPE; YY_BREAK case 30: YY_RULE_SETUP -#line 152 "scan-gram.l" -return COLON; +#line 151 "scan-gram.l" +return PERCENT_UNION; YY_BREAK case 31: YY_RULE_SETUP -#line 153 "scan-gram.l" -return PIPE; +#line 152 "scan-gram.l" +return PERCENT_VERBOSE; YY_BREAK case 32: YY_RULE_SETUP -#line 154 "scan-gram.l" -return SEMICOLON; +#line 153 "scan-gram.l" +return PERCENT_YACC; YY_BREAK case 33: YY_RULE_SETUP -#line 156 "scan-gram.l" -YY_LINES; YY_STEP; +#line 155 "scan-gram.l" +return EQUAL; YY_BREAK case 34: YY_RULE_SETUP -#line 157 "scan-gram.l" -YY_STEP; +#line 156 "scan-gram.l" +return COLON; YY_BREAK case 35: YY_RULE_SETUP +#line 157 "scan-gram.l" +return PIPE; + YY_BREAK +case 36: +YY_RULE_SETUP #line 158 "scan-gram.l" +return SEMICOLON; + YY_BREAK +case 37: +YY_RULE_SETUP +#line 160 "scan-gram.l" +YY_LINES; YY_STEP; + YY_BREAK +case 38: +YY_RULE_SETUP +#line 161 "scan-gram.l" +YY_STEP; + YY_BREAK +case 39: +YY_RULE_SETUP +#line 162 "scan-gram.l" { - yylval->symbol = getsym (yytext, *yylloc); + yylval->symbol = symbol_get (yytext, *yylloc); return ID; } YY_BREAK -case 36: +case 40: YY_RULE_SETUP -#line 163 "scan-gram.l" +#line 167 "scan-gram.l" yylval->integer = strtol (yytext, 0, 10); return INT; YY_BREAK /* Characters. We don't check there is only one. */ -case 37: +case 41: YY_RULE_SETUP -#line 166 "scan-gram.l" +#line 170 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER); YY_BREAK /* Strings. */ -case 38: +case 42: YY_RULE_SETUP -#line 169 "scan-gram.l" +#line 173 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING); YY_BREAK /* Comments. */ -case 39: +case 43: YY_RULE_SETUP -#line 172 "scan-gram.l" +#line 176 "scan-gram.l" yy_push_state (SC_COMMENT); YY_BREAK -case 40: +case 44: YY_RULE_SETUP -#line 173 "scan-gram.l" +#line 177 "scan-gram.l" YY_STEP; YY_BREAK /* Prologue. */ -case 41: +case 45: YY_RULE_SETUP -#line 176 "scan-gram.l" +#line 180 "scan-gram.l" yy_push_state (SC_PROLOGUE); YY_BREAK /* Code in between braces. */ -case 42: +case 46: YY_RULE_SETUP -#line 179 "scan-gram.l" +#line 183 "scan-gram.l" YY_OBS_GROW; ++braces_level; yy_push_state (SC_BRACED_CODE); YY_BREAK /* A type. */ -case 43: +case 47: YY_RULE_SETUP -#line 182 "scan-gram.l" +#line 186 "scan-gram.l" { obstack_grow (&string_obstack, yytext + 1, yyleng - 2); YY_OBS_FINISH; @@ -1327,21 +1359,21 @@ YY_RULE_SETUP return TYPE; } YY_BREAK -case 44: +case 48: YY_RULE_SETUP -#line 190 "scan-gram.l" +#line 194 "scan-gram.l" { if (++percent_percent_count == 2) yy_push_state (SC_EPILOGUE); return PERCENT_PERCENT; } YY_BREAK -case 45: +case 49: YY_RULE_SETUP -#line 196 "scan-gram.l" +#line 200 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": invalid character: `%c'\n", *yytext); + fprintf (stderr, _(": invalid character: `%c'\n"), *yytext); YY_STEP; } YY_BREAK @@ -1353,14 +1385,14 @@ YY_RULE_SETUP `------------------------------------------------------------*/ -case 46: +case 50: YY_RULE_SETUP -#line 212 "scan-gram.l" +#line 216 "scan-gram.l" if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@<:@"); YY_BREAK -case 47: +case 51: YY_RULE_SETUP -#line 213 "scan-gram.l" +#line 217 "scan-gram.l" if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); YY_BREAK @@ -1369,9 +1401,9 @@ if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); `-----------------------------------------------------------*/ -case 48: +case 52: YY_RULE_SETUP -#line 224 "scan-gram.l" +#line 228 "scan-gram.l" { /* End of the comment. */ if (yy_top_state () == INITIAL) { @@ -1384,26 +1416,26 @@ YY_RULE_SETUP yy_pop_state (); } YY_BREAK -case 49: +case 53: YY_RULE_SETUP -#line 236 "scan-gram.l" +#line 240 "scan-gram.l" if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_BREAK -case 50: +case 54: YY_RULE_SETUP -#line 237 "scan-gram.l" +#line 241 "scan-gram.l" if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_LINES; YY_BREAK -case 51: +case 55: YY_RULE_SETUP -#line 238 "scan-gram.l" +#line 242 "scan-gram.l" /* Stray `*'. */if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_COMMENT): -#line 240 "scan-gram.l" +#line 244 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a comment\n"); + fprintf (stderr, _(": unexpected end of file in a comment\n")); yy_pop_state (); } YY_BREAK @@ -1414,9 +1446,9 @@ case YY_STATE_EOF(SC_COMMENT): `----------------------------------------------------------------*/ -case 52: +case 56: YY_RULE_SETUP -#line 255 "scan-gram.l" +#line 259 "scan-gram.l" { assert (yy_top_state () == INITIAL); YY_OBS_GROW; @@ -1426,21 +1458,21 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 53: +case 57: YY_RULE_SETUP -#line 264 "scan-gram.l" +#line 268 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 54: +case 58: YY_RULE_SETUP -#line 266 "scan-gram.l" +#line 270 "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 272 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a string\n"); + fprintf (stderr, _(": unexpected end of file in a string\n")); assert (yy_top_state () == INITIAL); YY_OBS_FINISH; yylval->string = last_string; @@ -1455,38 +1487,39 @@ case YY_STATE_EOF(SC_ESCAPED_STRING): `---------------------------------------------------------------*/ -case 55: +case 59: YY_RULE_SETUP -#line 286 "scan-gram.l" +#line 290 "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 (); return ID; } } YY_BREAK -case 56: +case 60: YY_RULE_SETUP -#line 300 "scan-gram.l" +#line 305 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 57: +case 61: YY_RULE_SETUP -#line 302 "scan-gram.l" +#line 307 "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 309 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a character\n"); + fprintf (stderr, _(": unexpected end of file in a character\n")); assert (yy_top_state () == INITIAL); YY_OBS_FINISH; yylval->string = last_string; @@ -1500,81 +1533,81 @@ case YY_STATE_EOF(SC_ESCAPED_CHARACTER): `----------------------------*/ -case 58: +case 62: YY_RULE_SETUP -#line 322 "scan-gram.l" +#line 327 "scan-gram.l" { long c = strtol (yytext + 1, 0, 8); if (c > 255) { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": invalid escape: %s\n", quote (yytext)); + fprintf (stderr, _(": invalid escape: %s\n"), quote (yytext)); YY_STEP; } else obstack_1grow (&string_obstack, c); } YY_BREAK -case 59: +case 63: YY_RULE_SETUP -#line 334 "scan-gram.l" +#line 339 "scan-gram.l" { obstack_1grow (&string_obstack, strtol (yytext + 2, 0, 16)); } YY_BREAK -case 60: +case 64: YY_RULE_SETUP -#line 338 "scan-gram.l" +#line 343 "scan-gram.l" obstack_1grow (&string_obstack, '\a'); YY_BREAK -case 61: +case 65: YY_RULE_SETUP -#line 339 "scan-gram.l" +#line 344 "scan-gram.l" obstack_1grow (&string_obstack, '\b'); YY_BREAK -case 62: +case 66: YY_RULE_SETUP -#line 340 "scan-gram.l" +#line 345 "scan-gram.l" obstack_1grow (&string_obstack, '\f'); YY_BREAK -case 63: +case 67: YY_RULE_SETUP -#line 341 "scan-gram.l" +#line 346 "scan-gram.l" obstack_1grow (&string_obstack, '\n'); YY_BREAK -case 64: +case 68: YY_RULE_SETUP -#line 342 "scan-gram.l" +#line 347 "scan-gram.l" obstack_1grow (&string_obstack, '\r'); YY_BREAK -case 65: +case 69: YY_RULE_SETUP -#line 343 "scan-gram.l" +#line 348 "scan-gram.l" obstack_1grow (&string_obstack, '\t'); YY_BREAK -case 66: +case 70: YY_RULE_SETUP -#line 344 "scan-gram.l" +#line 349 "scan-gram.l" obstack_1grow (&string_obstack, '\v'); YY_BREAK -case 67: +case 71: YY_RULE_SETUP -#line 345 "scan-gram.l" +#line 350 "scan-gram.l" obstack_1grow (&string_obstack, yytext[1]); YY_BREAK -case 68: +case 72: YY_RULE_SETUP -#line 346 "scan-gram.l" +#line 351 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unrecognized escape: %s\n", quote (yytext)); + fprintf (stderr, _(": unrecognized escape: %s\n"), quote (yytext)); YY_OBS_GROW; } YY_BREAK /* FLex wants this rule, in case of a `\<>'. */ -case 69: +case 73: YY_RULE_SETUP -#line 352 "scan-gram.l" +#line 357 "scan-gram.l" YY_OBS_GROW; YY_BREAK @@ -1584,41 +1617,41 @@ YY_OBS_GROW; `----------------------------------------------------------*/ -case 70: +case 74: YY_RULE_SETUP -#line 363 "scan-gram.l" +#line 368 "scan-gram.l" { YY_OBS_GROW; assert (yy_top_state () != INITIAL); yy_pop_state (); } YY_BREAK -case 71: +case 75: YY_RULE_SETUP -#line 369 "scan-gram.l" +#line 374 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 72: +case 76: YY_RULE_SETUP -#line 370 "scan-gram.l" +#line 375 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* FLex wants this rule, in case of a `\<>'. */ -case 73: +case 77: YY_RULE_SETUP -#line 372 "scan-gram.l" +#line 377 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 74: +case 78: YY_RULE_SETUP -#line 374 "scan-gram.l" +#line 379 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK case YY_STATE_EOF(SC_CHARACTER): -#line 376 "scan-gram.l" +#line 381 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a character\n"); + fprintf (stderr, _(": unexpected end of file in a character\n")); assert (yy_top_state () != INITIAL); yy_pop_state (); } @@ -1630,41 +1663,41 @@ case YY_STATE_EOF(SC_CHARACTER): `----------------------------------------------------------------*/ -case 75: +case 79: YY_RULE_SETUP -#line 392 "scan-gram.l" +#line 397 "scan-gram.l" { assert (yy_top_state () != INITIAL); YY_OBS_GROW; yy_pop_state (); } YY_BREAK -case 76: +case 80: YY_RULE_SETUP -#line 398 "scan-gram.l" +#line 403 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 77: +case 81: YY_RULE_SETUP -#line 399 "scan-gram.l" +#line 404 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* FLex wants this rule, in case of a `\<>'. */ -case 78: +case 82: YY_RULE_SETUP -#line 401 "scan-gram.l" +#line 406 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 79: +case 83: YY_RULE_SETUP -#line 403 "scan-gram.l" +#line 408 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK case YY_STATE_EOF(SC_STRING): -#line 405 "scan-gram.l" +#line 410 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a string\n"); + fprintf (stderr, _(": unexpected end of file in a string\n")); assert (yy_top_state () != INITIAL); yy_pop_state (); } @@ -1676,32 +1709,32 @@ case YY_STATE_EOF(SC_STRING): /* Characters. We don't check there is only one. */ -case 80: +case 84: YY_RULE_SETUP -#line 421 "scan-gram.l" +#line 426 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_CHARACTER); YY_BREAK /* Strings. */ -case 81: +case 85: YY_RULE_SETUP -#line 424 "scan-gram.l" +#line 429 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_STRING); YY_BREAK /* Comments. */ -case 82: +case 86: YY_RULE_SETUP -#line 427 "scan-gram.l" +#line 432 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_COMMENT); YY_BREAK -case 83: +case 87: YY_RULE_SETUP -#line 428 "scan-gram.l" +#line 433 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* Not comments. */ -case 84: +case 88: YY_RULE_SETUP -#line 431 "scan-gram.l" +#line 436 "scan-gram.l" YY_OBS_GROW; YY_BREAK @@ -1711,9 +1744,9 @@ YY_OBS_GROW; `---------------------------------------------------------------*/ -case 85: +case 89: YY_RULE_SETUP -#line 442 "scan-gram.l" +#line 447 "scan-gram.l" { YY_OBS_GROW; if (--braces_level == 0) @@ -1725,44 +1758,44 @@ YY_RULE_SETUP } } YY_BREAK -case 86: +case 90: YY_RULE_SETUP -#line 453 "scan-gram.l" +#line 458 "scan-gram.l" YY_OBS_GROW; braces_level++; YY_BREAK -case 87: +case 91: YY_RULE_SETUP -#line 455 "scan-gram.l" +#line 460 "scan-gram.l" { handle_dollar (current_braced_code, yytext, *yylloc); } YY_BREAK -case 88: +case 92: YY_RULE_SETUP -#line 457 "scan-gram.l" +#line 462 "scan-gram.l" { handle_at (current_braced_code, yytext, *yylloc); } YY_BREAK -case 89: +case 93: YY_RULE_SETUP -#line 460 "scan-gram.l" +#line 465 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 90: +case 94: YY_RULE_SETUP -#line 461 "scan-gram.l" +#line 466 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK /* A lose $, or /, or etc. */ -case 91: +case 95: YY_RULE_SETUP -#line 464 "scan-gram.l" +#line 469 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_BRACED_CODE): -#line 466 "scan-gram.l" +#line 471 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a braced code\n"); + fprintf (stderr, _(": unexpected end of file in a braced code\n")); yy_pop_state (); YY_OBS_FINISH; yylval->string = last_string; @@ -1775,9 +1808,9 @@ case YY_STATE_EOF(SC_BRACED_CODE): `--------------------------------------------------------------*/ -case 92: +case 96: YY_RULE_SETUP -#line 484 "scan-gram.l" +#line 489 "scan-gram.l" { yy_pop_state (); YY_OBS_FINISH; @@ -1785,26 +1818,26 @@ YY_RULE_SETUP return PROLOGUE; } YY_BREAK -case 93: +case 97: YY_RULE_SETUP -#line 491 "scan-gram.l" +#line 496 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 94: +case 98: YY_RULE_SETUP -#line 492 "scan-gram.l" +#line 497 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 95: +case 99: YY_RULE_SETUP -#line 493 "scan-gram.l" +#line 498 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK case YY_STATE_EOF(SC_PROLOGUE): -#line 495 "scan-gram.l" +#line 500 "scan-gram.l" { LOCATION_PRINT (stderr, *yylloc); - fprintf (stderr, ": unexpected end of file in a prologue\n"); + fprintf (stderr, _(": unexpected end of file in a prologue\n")); yy_pop_state (); YY_OBS_FINISH; yylval->string = last_string; @@ -1818,13 +1851,13 @@ case YY_STATE_EOF(SC_PROLOGUE): `---------------------------------------------------------------*/ -case 96: +case 100: YY_RULE_SETUP -#line 513 "scan-gram.l" +#line 518 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_EPILOGUE): -#line 515 "scan-gram.l" +#line 520 "scan-gram.l" { yy_pop_state (); YY_OBS_FINISH; @@ -1833,12 +1866,12 @@ case YY_STATE_EOF(SC_EPILOGUE): } YY_BREAK -case 97: +case 101: YY_RULE_SETUP -#line 524 "scan-gram.l" +#line 529 "scan-gram.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1842 "lex.yy.c" +#line 1875 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2130,7 +2163,7 @@ static yy_state_type yy_get_previous_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 >= 380 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2165,11 +2198,11 @@ yy_state_type 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 >= 380 ) 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 == 379); return yy_is_jam ? 0 : yy_current_state; } @@ -2728,11 +2761,11 @@ int main() return 0; } #endif -#line 524 "scan-gram.l" +#line 529 "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: $[]($|integer) | | | @@ -2740,11 +2773,10 @@ int main() `------------------------------------------------------------------*/ 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 == '<') @@ -2762,13 +2794,13 @@ handle_action_dollar (char *cp, location_t location) 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 if (('0' <= *cp && *cp <= '9') || *cp == '-') { /* 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 @@ -2786,7 +2818,7 @@ handle_action_dollar (char *cp, location_t 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, @@ -2796,31 +2828,24 @@ handle_action_dollar (char *cp, location_t location) } else { - char buf[] = "$c"; - buf[1] = *cp; - complain_at (location, _("%s is invalid"), quote (buf)); + complain_at (location, _("%s is invalid"), quote (text)); } } -/*---------------------------------------. -| CP is pointing to $$ in a destructor. | -`---------------------------------------*/ +/*---------------------------------------------------------------. +| TEXT is expexted tp 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, _("%s is invalid"), quote (text)); } @@ -2840,7 +2865,8 @@ handle_dollar (braced_code_t braced_code_kind, break; case destructor_braced_code: - handle_destructor_dollar (text, location); + case printer_braced_code: + handle_symbol_code_dollar (text, location); break; } } @@ -2854,21 +2880,21 @@ handle_dollar (braced_code_t braced_code_kind, 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 == '-') + else if (('0' <= *cp && *cp <= '9') || *cp == '-') { /* 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); + int n = strtol (cp, &cp, 10); if (n > rule_length) complain_at (location, _("invalid value: %s%d"), "@", n); @@ -2878,31 +2904,24 @@ handle_action_at (char *text, location_t location) } else { - char buf[] = "@c"; - buf[1] = *text; - complain_at (location, _("%s is invalid"), quote (buf)); + complain_at (location, _("%s is invalid"), quote (text)); } } -/*--------------------------------------------. -| TEXT is expexted tp be @$ in a destructor. | -`--------------------------------------------*/ +/*---------------------------------------------------------------. +| TEXT is expexted tp 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, _("%s is invalid"), quote (text)); } @@ -2922,7 +2941,8 @@ handle_at (braced_code_t braced_code_kind, break; case destructor_braced_code: - handle_destructor_at (text, location); + case printer_braced_code: + handle_symbol_code_at (text, location); break; } } @@ -2947,4 +2967,6 @@ void scanner_free (void) { obstack_free (&string_obstack, 0); + /* Reclaim Flex's buffers. */ + yy_delete_buffer (YY_CURRENT_BUFFER); }