X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/97650f4efc420eb5eb0af124f28987875e10428a..f377f69fec28013c79db4efe12bbb9d48987fb2c:/src/scan-gram.c diff --git a/src/scan-gram.c b/src/scan-gram.c index 29b6d32a..ed67d7c6 100644 --- a/src/scan-gram.c +++ b/src/scan-gram.c @@ -15,7 +15,7 @@ #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: @@ -400,46 +400,46 @@ static yyconst int yy_meta[51] = 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, 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, + 108, 110, 131, 179, 227, 249, 116, 142, 840, 841, + 837, 55, 64, 841, 267, 841, 0, 44, 79, 841, + 841, 0, 841, 841, 841, 0, 97, 99, 826, 841, + 841, 0, 119, 122, 841, 841, 0, 841, 0, 126, + 138, 841, 0, 0, 145, 153, 841, 311, 841, 155, + 157, 841, 0, 159, 164, 841, 159, 841, 62, 164, + 841, 841, 841, 841, 0, 185, 189, 841, 787, 841, + 185, 192, 201, 203, 205, 207, 209, 834, 211, 213, + 216, 219, 841, 801, 39, 86, 800, 797, 65, 802, + + 198, 787, 184, 796, 109, 203, 791, 798, 801, 841, + 0, 841, 0, 230, 807, 0, 242, 244, 255, 259, + 841, 0, 261, 263, 265, 272, 841, 0, 274, 276, + 278, 280, 841, 0, 282, 284, 286, 288, 841, 841, + 812, 841, 841, 841, 841, 841, 841, 841, 0, 297, + 314, 317, 319, 0, 322, 324, 326, 328, 841, 322, + 326, 0, 841, 0, 841, 330, 332, 0, 344, 347, + 355, 357, 841, 359, 361, 363, 365, 367, 369, 371, + 786, 144, 782, 781, 781, 144, 779, 788, 790, 776, + 779, 366, 785, 771, 168, 772, 780, 781, 784, 768, + + 773, 767, 772, 764, 776, 0, 841, 790, 0, 783, + 0, 374, 377, 775, 756, 765, 755, 767, 757, 765, + 764, 763, 230, 749, 765, 758, 759, 752, 761, 745, + 745, 756, 745, 752, 748, 744, 738, 741, 747, 746, + 736, 747, 745, 841, 841, 373, 731, 739, 732, 728, + 740, 726, 738, 755, 735, 723, 841, 719, 731, 372, + 726, 717, 721, 713, 841, 713, 375, 712, 724, 710, + 841, 714, 841, 713, 711, 841, 702, 841, 718, 703, + 841, 378, 703, 705, 380, 718, 709, 841, 702, 703, + 698, 841, 696, 708, 697, 841, 693, 841, 382, 841, + + 693, 841, 692, 705, 687, 841, 690, 691, 688, 689, + 686, 670, 657, 841, 631, 643, 616, 609, 619, 841, + 605, 616, 615, 600, 599, 600, 605, 591, 604, 841, + 590, 592, 579, 841, 565, 562, 551, 535, 547, 511, + 521, 841, 841, 509, 841, 521, 502, 511, 503, 493, + 367, 841, 372, 372, 353, 841, 345, 309, 309, 841, + 295, 292, 283, 260, 841, 252, 841, 841, 841, 263, + 384, 841, 241, 236, 224, 196, 158, 841, 841, 409, 423, 437, 451, 465, 479, 493, 507, 227, 521, 535, 549, 561, 575, 587, 601, 614, 628, 642, 656, 670, @@ -495,11 +495,11 @@ static yyconst short int yy_def[406] = 379, 379, 379, 379, 379 } ; -static yyconst short int yy_nxt[891] = +static yyconst short int yy_nxt[892] = { 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, 112, 37, 38, 113, 39, 89, 90, 39, @@ -531,17 +531,17 @@ static yyconst short int yy_nxt[891] = 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, + 107, 108, 369, 109, 110, 140, 152, 153, 140, 150, + 151, 152, 153, 141, 155, 156, 157, 158, 155, 156, + 157, 158, 368, 140, 161, 161, 142, 143, 161, 161, + 367, 144, 167, 167, 167, 167, 169, 170, 145, 171, + 172, 146, 366, 147, 365, 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, + 213, 289, 160, 364, 295, 161, 161, 305, 363, 308, 228, 318, 211, 373, 211, 211, 289, 211, 211, 295, - 211, 361, 305, 229, 308, 360, 318, 359, 373, 36, + 211, 362, 305, 229, 308, 361, 318, 360, 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, @@ -555,48 +555,50 @@ static yyconst short int yy_nxt[891] = 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, + 115, 115, 359, 115, 115, 116, 358, 357, 116, 116, + 116, 116, 356, 116, 116, 116, 116, 355, 116, 122, + 354, 353, 352, 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, + 127, 127, 127, 127, 127, 128, 351, 350, 128, 128, + 128, 349, 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, + 133, 134, 348, 347, 346, 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, + 139, 139, 139, 139, 139, 139, 139, 139, 154, 345, + 344, 343, 342, 154, 341, 154, 154, 340, 154, 154, + 339, 154, 168, 338, 337, 336, 168, 335, 334, 168, + 168, 333, 168, 168, 332, 168, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 331, 174, + 206, 330, 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, + 210, 210, 210, 210, 210, 329, 210, 210, 211, 328, 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, + 212, 212, 212, 212, 212, 212, 327, 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, 379, 379, 379, 379, 379, 379, 379, 379, 379 + 379 + } ; -static yyconst short int yy_chk[891] = +static yyconst short int yy_chk[892] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -632,17 +634,17 @@ static yyconst short int yy_chk[891] = 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, + 25, 25, 363, 25, 25, 58, 151, 151, 58, 152, + 152, 153, 153, 58, 155, 155, 156, 156, 157, 157, + 158, 158, 362, 58, 160, 160, 58, 58, 161, 161, + 361, 58, 166, 166, 167, 167, 169, 169, 58, 170, + 170, 58, 359, 58, 358, 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, + 213, 260, 246, 357, 267, 246, 246, 282, 355, 285, 192, 299, 180, 371, 180, 212, 260, 212, 213, 267, - 213, 353, 282, 192, 285, 351, 299, 350, 371, 380, + 213, 354, 282, 192, 285, 353, 299, 351, 371, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 382, 382, 382, @@ -656,45 +658,47 @@ static yyconst short int yy_chk[891] = 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, + 389, 389, 350, 389, 389, 390, 349, 348, 390, 390, + 390, 390, 347, 390, 390, 390, 390, 346, 390, 391, + 344, 341, 340, 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, + 392, 392, 392, 392, 392, 393, 339, 338, 393, 393, + 393, 337, 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, + 394, 395, 336, 335, 333, 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, + 396, 396, 396, 396, 396, 396, 396, 396, 397, 332, + 331, 329, 328, 397, 327, 397, 397, 326, 397, 397, + 325, 397, 398, 324, 323, 322, 398, 321, 319, 398, + 398, 318, 398, 398, 317, 398, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 316, 399, + 400, 315, 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, + 402, 402, 402, 402, 402, 313, 402, 402, 403, 312, 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, + 404, 404, 404, 404, 404, 404, 311, 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, 379, 379, 379, 379, 379, 379, 379, 379, 379 + 379 + } ; static yy_state_type yy_last_accepting_state; @@ -705,16 +709,16 @@ int yy_flex_debug = 1; 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, 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, 304, - 306, 326, 338, 342, 343, 344, 345, 346, 347, 348, - 349, 350, 356, 367, 373, 374, 376, 378, 396, 402, - 403, 405, 407, 425, 428, 431, 432, 435, 446, 457, - 459, 461, 464, 465, 468, 488, 495, 496, 497, 517 + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 163, 164, 165, 166, 168, 169, 170, 176, + 179, 182, 185, 186, 189, 192, 195, 203, 209, 225, + 226, 237, 249, 250, 251, 268, 278, 280, 300, 316, + 318, 338, 350, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 368, 379, 385, 386, 388, 390, 408, 414, + 415, 417, 419, 437, 440, 443, 444, 447, 458, 470, + 472, 474, 477, 478, 481, 501, 508, 509, 510, 530 } ; @@ -763,14 +767,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 @@ -808,6 +812,14 @@ scanner_last_string_free (void) static int braces_level = 0; static int percent_percent_count = 0; +/* 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 PARAMS ((braced_code_t code_kind, char *cp, location_t location)); static void handle_at PARAMS ((braced_code_t code_kind, @@ -825,7 +837,7 @@ static void handle_at PARAMS ((braced_code_t code_kind, #define SC_PROLOGUE 7 #define SC_EPILOGUE 8 -#line 829 "lex.yy.c" +#line 841 "scan-gram.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -987,7 +999,7 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 98 "scan-gram.l" +#line 106 "scan-gram.l" /* At each yylex invocation, mark the current position as the @@ -1010,7 +1022,7 @@ YY_DECL /*----------------------------. | Scanning Bison directives. | `----------------------------*/ -#line 1014 "lex.yy.c" +#line 1026 "scan-gram.c" if ( yy_init ) { @@ -1067,7 +1079,7 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 840 ); + while ( yy_base[yy_current_state] != 841 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1112,246 +1124,247 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 122 "scan-gram.l" +#line 130 "scan-gram.l" return PERCENT_NONASSOC; YY_BREAK case 2: YY_RULE_SETUP -#line 123 "scan-gram.l" +#line 131 "scan-gram.l" return PERCENT_DEBUG; YY_BREAK case 3: YY_RULE_SETUP -#line 124 "scan-gram.l" +#line 132 "scan-gram.l" return PERCENT_DEFINE; YY_BREAK case 4: YY_RULE_SETUP -#line 125 "scan-gram.l" +#line 133 "scan-gram.l" return PERCENT_DEFINES; YY_BREAK case 5: YY_RULE_SETUP -#line 126 "scan-gram.l" +#line 134 "scan-gram.l" return PERCENT_DESTRUCTOR; YY_BREAK case 6: YY_RULE_SETUP -#line 127 "scan-gram.l" +#line 135 "scan-gram.l" return PERCENT_DPREC; YY_BREAK case 7: YY_RULE_SETUP -#line 128 "scan-gram.l" +#line 136 "scan-gram.l" return PERCENT_ERROR_VERBOSE; YY_BREAK case 8: YY_RULE_SETUP -#line 129 "scan-gram.l" +#line 137 "scan-gram.l" return PERCENT_EXPECT; YY_BREAK case 9: YY_RULE_SETUP -#line 130 "scan-gram.l" +#line 138 "scan-gram.l" return PERCENT_FILE_PREFIX; YY_BREAK case 10: YY_RULE_SETUP -#line 131 "scan-gram.l" +#line 139 "scan-gram.l" return PERCENT_YACC; YY_BREAK case 11: YY_RULE_SETUP -#line 132 "scan-gram.l" +#line 140 "scan-gram.l" return PERCENT_GLR_PARSER; YY_BREAK case 12: YY_RULE_SETUP -#line 133 "scan-gram.l" +#line 141 "scan-gram.l" return PERCENT_LEFT; YY_BREAK case 13: YY_RULE_SETUP -#line 134 "scan-gram.l" +#line 142 "scan-gram.l" return PERCENT_LOCATIONS; YY_BREAK case 14: YY_RULE_SETUP -#line 135 "scan-gram.l" +#line 143 "scan-gram.l" return PERCENT_MERGE; YY_BREAK case 15: YY_RULE_SETUP -#line 136 "scan-gram.l" +#line 144 "scan-gram.l" return PERCENT_NAME_PREFIX; YY_BREAK case 16: YY_RULE_SETUP -#line 137 "scan-gram.l" +#line 145 "scan-gram.l" return PERCENT_NO_LINES; YY_BREAK case 17: YY_RULE_SETUP -#line 138 "scan-gram.l" +#line 146 "scan-gram.l" return PERCENT_NONASSOC; YY_BREAK case 18: YY_RULE_SETUP -#line 139 "scan-gram.l" +#line 147 "scan-gram.l" return PERCENT_NTERM; YY_BREAK case 19: YY_RULE_SETUP -#line 140 "scan-gram.l" +#line 148 "scan-gram.l" return PERCENT_OUTPUT; YY_BREAK case 20: YY_RULE_SETUP -#line 141 "scan-gram.l" -return PERCENT_PREC; +#line 149 "scan-gram.l" +{ rule_length--; return PERCENT_PREC; } YY_BREAK case 21: YY_RULE_SETUP -#line 142 "scan-gram.l" +#line 150 "scan-gram.l" return PERCENT_PRINTER; YY_BREAK case 22: YY_RULE_SETUP -#line 143 "scan-gram.l" +#line 151 "scan-gram.l" return PERCENT_PURE_PARSER; YY_BREAK case 23: YY_RULE_SETUP -#line 144 "scan-gram.l" +#line 152 "scan-gram.l" return PERCENT_RIGHT; YY_BREAK case 24: YY_RULE_SETUP -#line 145 "scan-gram.l" +#line 153 "scan-gram.l" return PERCENT_SKELETON; YY_BREAK case 25: YY_RULE_SETUP -#line 146 "scan-gram.l" +#line 154 "scan-gram.l" return PERCENT_START; YY_BREAK case 26: YY_RULE_SETUP -#line 147 "scan-gram.l" +#line 155 "scan-gram.l" return PERCENT_TOKEN; YY_BREAK case 27: YY_RULE_SETUP -#line 148 "scan-gram.l" +#line 156 "scan-gram.l" return PERCENT_TOKEN; YY_BREAK case 28: YY_RULE_SETUP -#line 149 "scan-gram.l" +#line 157 "scan-gram.l" return PERCENT_TOKEN_TABLE; YY_BREAK case 29: YY_RULE_SETUP -#line 150 "scan-gram.l" +#line 158 "scan-gram.l" return PERCENT_TYPE; YY_BREAK case 30: YY_RULE_SETUP -#line 151 "scan-gram.l" +#line 159 "scan-gram.l" return PERCENT_UNION; YY_BREAK case 31: YY_RULE_SETUP -#line 152 "scan-gram.l" +#line 160 "scan-gram.l" return PERCENT_VERBOSE; YY_BREAK case 32: YY_RULE_SETUP -#line 153 "scan-gram.l" +#line 161 "scan-gram.l" return PERCENT_YACC; YY_BREAK case 33: YY_RULE_SETUP -#line 155 "scan-gram.l" +#line 163 "scan-gram.l" return EQUAL; YY_BREAK case 34: YY_RULE_SETUP -#line 156 "scan-gram.l" -return COLON; +#line 164 "scan-gram.l" +{ rule_length = 0; return COLON; } YY_BREAK case 35: YY_RULE_SETUP -#line 157 "scan-gram.l" -return PIPE; +#line 165 "scan-gram.l" +{ rule_length = 0; return PIPE; } YY_BREAK case 36: YY_RULE_SETUP -#line 158 "scan-gram.l" +#line 166 "scan-gram.l" return SEMICOLON; YY_BREAK case 37: YY_RULE_SETUP -#line 160 "scan-gram.l" +#line 168 "scan-gram.l" YY_LINES; YY_STEP; YY_BREAK case 38: YY_RULE_SETUP -#line 161 "scan-gram.l" +#line 169 "scan-gram.l" YY_STEP; YY_BREAK case 39: YY_RULE_SETUP -#line 162 "scan-gram.l" +#line 170 "scan-gram.l" { yylval->symbol = symbol_get (yytext, *yylloc); + rule_length++; return ID; } YY_BREAK case 40: YY_RULE_SETUP -#line 167 "scan-gram.l" +#line 176 "scan-gram.l" yylval->integer = strtol (yytext, 0, 10); return INT; YY_BREAK /* Characters. We don't check there is only one. */ case 41: YY_RULE_SETUP -#line 170 "scan-gram.l" +#line 179 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER); YY_BREAK /* Strings. */ case 42: YY_RULE_SETUP -#line 173 "scan-gram.l" +#line 182 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING); YY_BREAK /* Comments. */ case 43: YY_RULE_SETUP -#line 176 "scan-gram.l" +#line 185 "scan-gram.l" yy_push_state (SC_COMMENT); YY_BREAK case 44: YY_RULE_SETUP -#line 177 "scan-gram.l" +#line 186 "scan-gram.l" YY_STEP; YY_BREAK /* Prologue. */ case 45: YY_RULE_SETUP -#line 180 "scan-gram.l" +#line 189 "scan-gram.l" yy_push_state (SC_PROLOGUE); YY_BREAK /* Code in between braces. */ case 46: YY_RULE_SETUP -#line 183 "scan-gram.l" +#line 192 "scan-gram.l" YY_OBS_GROW; ++braces_level; yy_push_state (SC_BRACED_CODE); YY_BREAK /* A type. */ case 47: YY_RULE_SETUP -#line 186 "scan-gram.l" +#line 195 "scan-gram.l" { obstack_grow (&string_obstack, yytext + 1, yyleng - 2); YY_OBS_FINISH; @@ -1361,7 +1374,7 @@ YY_RULE_SETUP YY_BREAK case 48: YY_RULE_SETUP -#line 194 "scan-gram.l" +#line 203 "scan-gram.l" { if (++percent_percent_count == 2) yy_push_state (SC_EPILOGUE); @@ -1370,10 +1383,10 @@ YY_RULE_SETUP YY_BREAK case 49: YY_RULE_SETUP -#line 200 "scan-gram.l" +#line 209 "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 @@ -1387,12 +1400,12 @@ YY_RULE_SETUP case 50: YY_RULE_SETUP -#line 216 "scan-gram.l" +#line 225 "scan-gram.l" if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@<:@"); YY_BREAK case 51: YY_RULE_SETUP -#line 217 "scan-gram.l" +#line 226 "scan-gram.l" if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); YY_BREAK @@ -1403,7 +1416,7 @@ if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); case 52: YY_RULE_SETUP -#line 228 "scan-gram.l" +#line 237 "scan-gram.l" { /* End of the comment. */ if (yy_top_state () == INITIAL) { @@ -1418,24 +1431,24 @@ YY_RULE_SETUP YY_BREAK case 53: YY_RULE_SETUP -#line 240 "scan-gram.l" +#line 249 "scan-gram.l" if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_BREAK case 54: YY_RULE_SETUP -#line 241 "scan-gram.l" +#line 250 "scan-gram.l" if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_LINES; YY_BREAK case 55: YY_RULE_SETUP -#line 242 "scan-gram.l" +#line 251 "scan-gram.l" /* Stray `*'. */if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_COMMENT): -#line 244 "scan-gram.l" +#line 253 "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 @@ -1448,31 +1461,32 @@ case YY_STATE_EOF(SC_COMMENT): case 56: YY_RULE_SETUP -#line 259 "scan-gram.l" +#line 268 "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 57: YY_RULE_SETUP -#line 268 "scan-gram.l" +#line 278 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 58: YY_RULE_SETUP -#line 270 "scan-gram.l" +#line 280 "scan-gram.l" obstack_1grow (&string_obstack, '\n'); YY_LINES; YY_BREAK case YY_STATE_EOF(SC_ESCAPED_STRING): -#line 272 "scan-gram.l" +#line 282 "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; @@ -1489,7 +1503,7 @@ case YY_STATE_EOF(SC_ESCAPED_STRING): case 59: YY_RULE_SETUP -#line 290 "scan-gram.l" +#line 300 "scan-gram.l" { YY_OBS_GROW; assert (yy_top_state () == INITIAL); @@ -1497,28 +1511,30 @@ YY_RULE_SETUP YY_OBS_FINISH; yylval->symbol = symbol_get (last_string, *yylloc); symbol_class_set (yylval->symbol, token_sym, *yylloc); - symbol_user_token_number_set (yylval->symbol, last_string[1], *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 60: YY_RULE_SETUP -#line 304 "scan-gram.l" +#line 316 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 61: YY_RULE_SETUP -#line 306 "scan-gram.l" +#line 318 "scan-gram.l" obstack_1grow (&string_obstack, '\n'); YY_LINES; YY_BREAK case YY_STATE_EOF(SC_ESCAPED_CHARACTER): -#line 308 "scan-gram.l" +#line 320 "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; @@ -1534,13 +1550,13 @@ case YY_STATE_EOF(SC_ESCAPED_CHARACTER): case 62: YY_RULE_SETUP -#line 326 "scan-gram.l" +#line 338 "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 @@ -1549,64 +1565,64 @@ YY_RULE_SETUP YY_BREAK case 63: YY_RULE_SETUP -#line 338 "scan-gram.l" +#line 350 "scan-gram.l" { obstack_1grow (&string_obstack, strtol (yytext + 2, 0, 16)); } YY_BREAK case 64: YY_RULE_SETUP -#line 342 "scan-gram.l" +#line 354 "scan-gram.l" obstack_1grow (&string_obstack, '\a'); YY_BREAK case 65: YY_RULE_SETUP -#line 343 "scan-gram.l" +#line 355 "scan-gram.l" obstack_1grow (&string_obstack, '\b'); YY_BREAK case 66: YY_RULE_SETUP -#line 344 "scan-gram.l" +#line 356 "scan-gram.l" obstack_1grow (&string_obstack, '\f'); YY_BREAK case 67: YY_RULE_SETUP -#line 345 "scan-gram.l" +#line 357 "scan-gram.l" obstack_1grow (&string_obstack, '\n'); YY_BREAK case 68: YY_RULE_SETUP -#line 346 "scan-gram.l" +#line 358 "scan-gram.l" obstack_1grow (&string_obstack, '\r'); YY_BREAK case 69: YY_RULE_SETUP -#line 347 "scan-gram.l" +#line 359 "scan-gram.l" obstack_1grow (&string_obstack, '\t'); YY_BREAK case 70: YY_RULE_SETUP -#line 348 "scan-gram.l" +#line 360 "scan-gram.l" obstack_1grow (&string_obstack, '\v'); YY_BREAK case 71: YY_RULE_SETUP -#line 349 "scan-gram.l" +#line 361 "scan-gram.l" obstack_1grow (&string_obstack, yytext[1]); YY_BREAK case 72: YY_RULE_SETUP -#line 350 "scan-gram.l" +#line 362 "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 73: YY_RULE_SETUP -#line 356 "scan-gram.l" +#line 368 "scan-gram.l" YY_OBS_GROW; YY_BREAK @@ -1618,7 +1634,7 @@ YY_OBS_GROW; case 74: YY_RULE_SETUP -#line 367 "scan-gram.l" +#line 379 "scan-gram.l" { YY_OBS_GROW; assert (yy_top_state () != INITIAL); @@ -1627,30 +1643,30 @@ YY_RULE_SETUP YY_BREAK case 75: YY_RULE_SETUP -#line 373 "scan-gram.l" +#line 385 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 76: YY_RULE_SETUP -#line 374 "scan-gram.l" +#line 386 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* FLex wants this rule, in case of a `\<>'. */ case 77: YY_RULE_SETUP -#line 376 "scan-gram.l" +#line 388 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 78: YY_RULE_SETUP -#line 378 "scan-gram.l" +#line 390 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK case YY_STATE_EOF(SC_CHARACTER): -#line 380 "scan-gram.l" +#line 392 "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 (); } @@ -1664,7 +1680,7 @@ case YY_STATE_EOF(SC_CHARACTER): case 79: YY_RULE_SETUP -#line 396 "scan-gram.l" +#line 408 "scan-gram.l" { assert (yy_top_state () != INITIAL); YY_OBS_GROW; @@ -1673,30 +1689,30 @@ YY_RULE_SETUP YY_BREAK case 80: YY_RULE_SETUP -#line 402 "scan-gram.l" +#line 414 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 81: YY_RULE_SETUP -#line 403 "scan-gram.l" +#line 415 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* FLex wants this rule, in case of a `\<>'. */ case 82: YY_RULE_SETUP -#line 405 "scan-gram.l" +#line 417 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 83: YY_RULE_SETUP -#line 407 "scan-gram.l" +#line 419 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK case YY_STATE_EOF(SC_STRING): -#line 409 "scan-gram.l" +#line 421 "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 (); } @@ -1710,30 +1726,30 @@ case YY_STATE_EOF(SC_STRING): /* Characters. We don't check there is only one. */ case 84: YY_RULE_SETUP -#line 425 "scan-gram.l" +#line 437 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_CHARACTER); YY_BREAK /* Strings. */ case 85: YY_RULE_SETUP -#line 428 "scan-gram.l" +#line 440 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_STRING); YY_BREAK /* Comments. */ case 86: YY_RULE_SETUP -#line 431 "scan-gram.l" +#line 443 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_COMMENT); YY_BREAK case 87: YY_RULE_SETUP -#line 432 "scan-gram.l" +#line 444 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* Not comments. */ case 88: YY_RULE_SETUP -#line 435 "scan-gram.l" +#line 447 "scan-gram.l" YY_OBS_GROW; YY_BREAK @@ -1745,7 +1761,7 @@ YY_OBS_GROW; case 89: YY_RULE_SETUP -#line 446 "scan-gram.l" +#line 458 "scan-gram.l" { YY_OBS_GROW; if (--braces_level == 0) @@ -1753,48 +1769,49 @@ YY_RULE_SETUP yy_pop_state (); YY_OBS_FINISH; yylval->string = last_string; + rule_length++; return BRACED_CODE; } } YY_BREAK case 90: YY_RULE_SETUP -#line 457 "scan-gram.l" +#line 470 "scan-gram.l" YY_OBS_GROW; braces_level++; YY_BREAK case 91: YY_RULE_SETUP -#line 459 "scan-gram.l" +#line 472 "scan-gram.l" { handle_dollar (current_braced_code, yytext, *yylloc); } YY_BREAK case 92: YY_RULE_SETUP -#line 461 "scan-gram.l" +#line 474 "scan-gram.l" { handle_at (current_braced_code, yytext, *yylloc); } YY_BREAK case 93: YY_RULE_SETUP -#line 464 "scan-gram.l" +#line 477 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 94: YY_RULE_SETUP -#line 465 "scan-gram.l" +#line 478 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK /* A lose $, or /, or etc. */ case 95: YY_RULE_SETUP -#line 468 "scan-gram.l" +#line 481 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_BRACED_CODE): -#line 470 "scan-gram.l" +#line 483 "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; @@ -1809,7 +1826,7 @@ case YY_STATE_EOF(SC_BRACED_CODE): case 96: YY_RULE_SETUP -#line 488 "scan-gram.l" +#line 501 "scan-gram.l" { yy_pop_state (); YY_OBS_FINISH; @@ -1819,24 +1836,24 @@ YY_RULE_SETUP YY_BREAK case 97: YY_RULE_SETUP -#line 495 "scan-gram.l" +#line 508 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 98: YY_RULE_SETUP -#line 496 "scan-gram.l" +#line 509 "scan-gram.l" YY_OBS_GROW; YY_BREAK case 99: YY_RULE_SETUP -#line 497 "scan-gram.l" +#line 510 "scan-gram.l" YY_OBS_GROW; YY_LINES; YY_BREAK case YY_STATE_EOF(SC_PROLOGUE): -#line 499 "scan-gram.l" +#line 512 "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; @@ -1852,11 +1869,11 @@ case YY_STATE_EOF(SC_PROLOGUE): case 100: YY_RULE_SETUP -#line 517 "scan-gram.l" +#line 530 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_EPILOGUE): -#line 519 "scan-gram.l" +#line 532 "scan-gram.l" { yy_pop_state (); YY_OBS_FINISH; @@ -1867,10 +1884,10 @@ case YY_STATE_EOF(SC_EPILOGUE): case 101: YY_RULE_SETUP -#line 528 "scan-gram.l" +#line 541 "scan-gram.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1874 "lex.yy.c" +#line 1891 "scan-gram.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2760,7 +2777,7 @@ int main() return 0; } #endif -#line 528 "scan-gram.l" +#line 541 "scan-gram.l" /*------------------------------------------------------------------. @@ -2799,13 +2816,8 @@ handle_action_dollar (char *text, location_t location) 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 - 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) @@ -2886,13 +2898,8 @@ handle_action_at (char *text, location_t location) { obstack_sgrow (&string_obstack, "]b4_lhs_location["); } - 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 - 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) @@ -2966,4 +2973,6 @@ void scanner_free (void) { obstack_free (&string_obstack, 0); + /* Reclaim Flex's buffers. */ + yy_delete_buffer (YY_CURRENT_BUFFER); }