From: Akim Demaille Date: Wed, 6 Nov 2002 08:08:46 +0000 (+0000) Subject: * src/main.c (main): Free `infile'. X-Git-Tag: BISON-1_875~334 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/900c5db5379673765a18c6746fd9139a278cc9a9 * src/main.c (main): Free `infile'. * src/scan-gram.l (handle_syncline): New. Recognize `#line'. * src/output.c (user_actions_output, symbol_destructors_output) (symbol_printers_output): Use the location's file name, not infile. * src/reader.c (prologue_augment, epilogue_set): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 051fd503..204e8960 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-11-06 Akim Demaille + + * src/main.c (main): Free `infile'. + * src/scan-gram.l (handle_syncline): New. + Recognize `#line'. + * src/output.c (user_actions_output, symbol_destructors_output) + (symbol_printers_output): Use the location's file name, not + infile. + * src/reader.c (prologue_augment, epilogue_set): Likewise. + 2002-11-05 Paul Hilfinger * src/tables.c (matching_state): Don't allow states to match if diff --git a/NEWS b/NEWS index bfc31882..b0ec9fda 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ Changes in version 1.75a, 2002-10-24: In addition, they provide a means for yyerror to remain pure, and to access to the current location. +* #line + Bison now recognizes #line in its input, and forwards them. + Changes in version 1.75, 2002-10-14: * Bison should now work on 64-bit hosts. diff --git a/TODO b/TODO index 7f8e80ea..0e3b95d9 100644 --- a/TODO +++ b/TODO @@ -185,10 +185,6 @@ skeleton muscles. [] ** tests/pure-parser.at [] New tests. -* input synclines -Some users create their foo.y files, and equip them with #line. Bison -should recognize these, and preserve them. - * BTYacc See if we can integrate backtracking in Bison. Charles-Henri de Boysson is working on this, and already has some diff --git a/src/getargs.c b/src/getargs.c index 37d59859..061ec7f9 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -419,5 +419,5 @@ getargs (int argc, char *argv[]) usage (EXIT_FAILURE); } - infile = argv[optind]; + infile = xstrdup (argv[optind]); } diff --git a/src/main.c b/src/main.c index 79cd950d..04957a2b 100644 --- a/src/main.c +++ b/src/main.c @@ -158,6 +158,8 @@ main (int argc, char *argv[]) reduce_free (); conflicts_free (); grammar_free (); + /* FIXME: We are leaking all the other file names. */ + free (infile); /* The scanner memory cannot be released right after parsing, as it contains things such as user actions, prologue, epilogue etc. */ diff --git a/src/output.c b/src/output.c index 43016473..d13e51f2 100644 --- a/src/output.c +++ b/src/output.c @@ -280,7 +280,7 @@ user_actions_output (FILE *out) fprintf (out, muscle_find ("linef"), rules[r].action_location.first_line, quotearg_style (c_quoting_style, - muscle_find ("filename"))); + rules[r].action_location.file)); fprintf (out, " %s\n break;\n\n", rules[r].action); } @@ -381,7 +381,8 @@ symbol_destructors_output (FILE *out) destructor, typename. */ fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]", first ? "" : ",\n", - infile, symbol->destructor_location.first_line, + symbol->destructor_location.file, + symbol->destructor_location.first_line, symbol->tag, symbol->number, symbol->destructor, @@ -414,7 +415,8 @@ symbol_printers_output (FILE *out) printer, typename. */ fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]", first ? "" : ",\n", - infile, symbol->printer_location.first_line, + symbol->printer_location.file, + symbol->printer_location.first_line, symbol->tag, symbol->number, symbol->printer, diff --git a/src/reader.c b/src/reader.c index 99e951e2..1c145c1f 100644 --- a/src/reader.c +++ b/src/reader.c @@ -74,7 +74,7 @@ prologue_augment (const char *prologue, location_t location) obstack_fgrow2 (oout, muscle_find ("linef"), location.first_line, quotearg_style (c_quoting_style, - muscle_find ("filename"))); + location.file)); } obstack_sgrow (oout, prologue); } @@ -94,7 +94,7 @@ epilogue_set (const char *epilogue, location_t location) obstack_fgrow2 (&muscle_obstack, muscle_find ("linef"), location.first_line, quotearg_style (c_quoting_style, - muscle_find ("filename"))); + location.file)); } obstack_sgrow (&muscle_obstack, epilogue); obstack_1grow (&muscle_obstack, 0); diff --git a/src/scan-gram.c b/src/scan-gram.c index ce16934b..7999cd2d 100644 --- a/src/scan-gram.c +++ b/src/scan-gram.c @@ -27,7 +27,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include - +#include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus @@ -40,7 +40,9 @@ #ifdef __cplusplus #include +#ifndef _WIN32 #include +#endif /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -307,54 +309,55 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 103 -#define YY_END_OF_BUFFER 104 -static yyconst short int yy_accept[399] = +#define YY_NUM_RULES 104 +#define YY_END_OF_BUFFER 105 +static yyconst short int yy_accept[411] = { 0, - 0, 0, 0, 0, 60, 60, 0, 0, 86, 86, - 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 104, 52, 41, 41, 45, 52, 44, 39, - 42, 52, 43, 37, 40, 52, 36, 49, 38, 58, - 58, 53, 54, 60, 59, 60, 56, 56, 84, 83, - 87, 79, 78, 82, 62, 61, 77, 64, 63, 98, - 89, 98, 98, 88, 92, 98, 98, 93, 95, 100, - 101, 92, 102, 89, 88, 92, 41, 51, 35, 35, + 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, 48, 42, 46, 47, 43, - - 0, 58, 57, 0, 60, 60, 60, 60, 56, 55, - 84, 85, 85, 85, 85, 79, 80, 80, 80, 80, - 62, 76, 74, 65, 76, 67, 68, 69, 70, 71, - 72, 76, 73, 76, 64, 98, 96, 0, 96, 0, - 94, 0, 90, 91, 0, 93, 98, 0, 97, 0, - 97, 100, 99, 102, 90, 91, 102, 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, 47, 50, 0, 0, 0, 86, - 0, 0, 0, 0, 81, 0, 0, 0, 65, 0, + 35, 35, 35, 35, 35, 35, 48, 51, 0, 0, + 0, 0, 87, 0, 0, 0, 0, 82, 0, 0, - 0, 66, 0, 0, 0, 0, 0, 0, 0, 102, - 102, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 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, 65, 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, 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, 75, - 1, 3, 35, 35, 8, 35, 35, 35, 35, 35, - 35, 35, 35, 19, 35, 35, 35, 35, 35, 35, - 4, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 22, 35, 35, 35, 33, 35, 35, 35, - 35, 35, 35, 35, 35, 16, 17, 35, 35, 26, - 35, 35, 35, 35, 35, 35, 25, 13, 35, 35, - 35, 35, 5, 35, 35, 35, 11, 35, 35, 35, - 35, 35, 9, 35, 15, 20, 23, 30, 35, 35, - 7, 35, 35, 35, 35, 35, 10, 0 - + 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] = @@ -362,17 +365,17 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 4, 1, 5, 6, 1, 7, 1, - 1, 8, 1, 9, 10, 11, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 14, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 22, 22, 22, 22, 22, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 23, 11, 11, 11, 11, 11, - 24, 25, 26, 1, 27, 1, 28, 29, 30, 31, - - 32, 33, 34, 35, 36, 11, 37, 38, 39, 40, - 41, 42, 11, 43, 44, 45, 46, 47, 11, 48, - 49, 11, 50, 51, 52, 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, @@ -389,324 +392,338 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[54] = +static yyconst int yy_meta[56] = { 0, - 1, 1, 2, 3, 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 + 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[436] = +static yyconst short int yy_base[449] = { 0, - 0, 0, 46, 47, 53, 56, 836, 835, 59, 62, - 50, 82, 65, 87, 85, 86, 109, 158, 93, 116, - 120, 127, 842, 845, 58, 62, 845, 205, 845, 845, - 0, 50, 54, 845, 845, 0, 845, 845, 845, 0, - 84, 845, 845, 816, 845, 100, 0, 828, 0, 845, - 135, 0, 845, 146, 0, 845, 252, 0, 845, 0, - 845, 163, 76, 845, 133, 130, 173, 845, 845, 0, - 787, 142, 0, 0, 0, 144, 186, 845, 0, 802, - 62, 142, 801, 798, 125, 803, 153, 788, 163, 797, - 155, 163, 792, 799, 802, 845, 0, 845, 0, 183, - - 810, 0, 845, 199, 803, 258, 261, 802, 0, 845, - 0, 845, 211, 801, 215, 0, 845, 217, 800, 219, - 0, 845, 845, 811, 0, 845, 845, 845, 845, 845, - 845, 0, 845, 0, 0, 0, 845, 210, 212, 0, - 845, 227, 845, 845, 255, 845, 845, 264, 845, 255, - 257, 0, 845, 0, 0, 0, 271, 0, 783, 249, - 779, 778, 778, 155, 776, 243, 788, 774, 777, 269, - 783, 769, 770, 252, 769, 777, 778, 781, 765, 770, - 764, 769, 761, 773, 0, 845, 287, 282, 299, 777, - 301, 303, 776, 308, 775, 310, 312, 774, 785, 0, - - 0, 0, 778, 314, 180, 316, 312, 319, 317, 323, - 319, 768, 749, 758, 748, 760, 750, 758, 757, 756, - 777, 741, 775, 756, 749, 750, 743, 752, 736, 736, - 733, 746, 735, 742, 738, 734, 728, 731, 737, 736, - 726, 737, 735, 845, 0, 0, 325, 721, 729, 722, - 718, 730, 716, 728, 747, 725, 713, 0, 712, 708, - 720, 318, 715, 706, 710, 702, 715, 0, 701, 319, - 700, 712, 698, 0, 702, 0, 701, 699, 0, 0, - 0, 690, 0, 706, 691, 0, 322, 691, 693, 323, - 706, 705, 696, 0, 689, 690, 685, 0, 683, 717, - - 694, 683, 0, 679, 0, 326, 0, 679, 0, 845, - 0, 678, 691, 673, 0, 676, 677, 674, 673, 674, - 671, 681, 671, 0, 669, 667, 681, 667, 662, 674, - 0, 660, 672, 671, 656, 657, 672, 659, 666, 653, - 666, 667, 0, 649, 643, 642, 0, 623, 608, 612, - 599, 610, 599, 588, 598, 0, 0, 587, 585, 0, - 591, 549, 559, 535, 522, 501, 0, 0, 499, 499, - 485, 476, 0, 468, 452, 445, 0, 308, 316, 311, - 320, 307, 0, 303, 0, 0, 0, 0, 315, 330, - 0, 310, 305, 270, 255, 218, 0, 845, 357, 370, - - 383, 396, 409, 422, 435, 448, 461, 474, 479, 489, - 502, 515, 528, 541, 552, 565, 576, 589, 601, 614, - 626, 639, 652, 658, 668, 221, 205, 197, 681, 164, - 162, 133, 119, 108, 88 + 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[436] = +static yyconst short int yy_def[449] = { 0, - 398, 1, 399, 399, 400, 400, 401, 401, 402, 402, - 403, 403, 404, 404, 405, 405, 406, 406, 407, 407, - 408, 408, 398, 398, 398, 398, 398, 398, 398, 398, - 409, 398, 398, 398, 398, 410, 398, 398, 398, 411, - 398, 398, 398, 412, 398, 412, 413, 398, 414, 398, - 415, 416, 398, 417, 418, 398, 419, 420, 398, 421, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 422, - 398, 398, 423, 423, 423, 423, 398, 398, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 398, 409, 398, 425, 398, - - 410, 411, 398, 398, 412, 412, 412, 412, 413, 398, - 414, 398, 398, 398, 398, 416, 398, 398, 398, 398, - 418, 398, 398, 398, 426, 398, 398, 398, 398, 398, - 398, 427, 398, 428, 420, 421, 398, 398, 398, 429, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 422, 398, 423, 423, 423, 423, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 425, 398, 398, 398, 398, 398, - 398, 398, 415, 398, 398, 398, 398, 417, 398, 430, - - 431, 428, 429, 398, 398, 398, 398, 398, 398, 423, - 423, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 398, 432, 433, 398, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 434, - 435, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - - 424, 424, 424, 424, 424, 424, 424, 424, 427, 398, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 0, 398, 398, - - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398 + 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[899] = +static yyconst short int yy_nxt[959] = { 0, - 24, 25, 26, 27, 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, + 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, 38, - 39, 24, 24, 41, 41, 45, 53, 98, 45, 77, - 77, 99, 50, 77, 77, 50, 100, 100, 56, 42, - 42, 43, 43, 42, 54, 43, 42, 46, 43, 42, - 46, 43, 42, 51, 43, 42, 51, 43, 53, 57, - 56, 59, 59, 160, 141, 103, 61, 310, 71, 64, - - 142, 107, 108, 161, 72, 42, 54, 43, 104, 57, - 57, 57, 61, 62, 63, 64, 42, 309, 43, 61, - 65, 71, 64, 74, 106, 66, 75, 72, 281, 67, - 74, 76, 42, 75, 43, 146, 113, 114, 76, 42, - 143, 43, 280, 42, 144, 43, 147, 118, 119, 143, - 42, 155, 43, 144, 148, 156, 166, 145, 68, 115, - 69, 61, 62, 63, 64, 167, 145, 137, 157, 65, - 120, 246, 138, 245, 66, 139, 139, 149, 67, 140, - 169, 42, 150, 43, 162, 151, 151, 77, 77, 163, - 173, 177, 219, 170, 179, 100, 100, 171, 141, 178, - - 187, 188, 220, 180, 142, 174, 202, 68, 175, 69, - 78, 181, 189, 190, 201, 79, 192, 193, 194, 195, - 197, 198, 139, 139, 139, 139, 79, 79, 204, 205, - 200, 79, 79, 80, 79, 81, 82, 83, 84, 79, - 79, 79, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 79, 95, 96, 123, 206, 207, 123, 107, - 108, 397, 107, 108, 124, 208, 209, 151, 151, 151, - 151, 123, 210, 211, 125, 222, 123, 213, 227, 126, - 127, 214, 106, 232, 128, 106, 396, 233, 187, 188, - 223, 129, 215, 103, 130, 227, 131, 132, 133, 134, - - 189, 190, 189, 190, 192, 193, 104, 395, 228, 194, - 195, 194, 195, 197, 198, 204, 205, 206, 207, 143, - 208, 209, 146, 144, 210, 211, 155, 295, 302, 137, - 156, 314, 317, 147, 138, 329, 145, 139, 139, 392, - 394, 148, 393, 157, 295, 302, 391, 390, 314, 317, - 389, 388, 329, 387, 386, 385, 392, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 49, 49, 49, 49, - - 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 70, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 97, 97, 101, - 384, 101, 101, 101, 101, 101, 101, 101, 101, 383, - - 101, 101, 102, 102, 102, 102, 102, 102, 382, 102, - 102, 102, 102, 381, 102, 105, 380, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 379, 105, 109, 109, - 109, 109, 109, 109, 378, 109, 109, 109, 109, 109, - 109, 111, 111, 377, 111, 111, 111, 111, 111, 111, - 111, 111, 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 376, 112, 116, 116, 116, 116, 116, - 375, 116, 116, 116, 116, 116, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 374, 117, 121, - 121, 373, 121, 121, 121, 121, 121, 121, 121, 121, - - 121, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 135, 135, 135, 135, 135, 372, - 135, 135, 135, 135, 135, 135, 136, 136, 371, 370, - 369, 368, 136, 136, 136, 136, 136, 367, 136, 152, - 152, 366, 152, 365, 364, 152, 152, 152, 152, 152, - 363, 152, 154, 154, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 362, 154, 158, 158, 158, 185, 361, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 203, 360, 203, 203, 203, 203, 203, 203, 203, - 203, 359, 203, 203, 358, 357, 356, 355, 354, 353, - - 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, - 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, - 332, 331, 330, 328, 327, 326, 325, 324, 323, 322, - 321, 320, 319, 318, 316, 315, 313, 312, 311, 308, - 307, 306, 305, 304, 303, 301, 300, 299, 298, 297, - 296, 294, 293, 292, 291, 290, 289, 288, 287, 286, - 285, 284, 283, 282, 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, 250, 249, 248, 247, 244, 120, 196, - - 115, 191, 243, 242, 241, 240, 239, 238, 237, 236, - 235, 234, 231, 230, 229, 226, 225, 224, 221, 218, - 217, 216, 212, 199, 196, 191, 106, 106, 186, 184, - 183, 182, 176, 172, 168, 165, 164, 159, 153, 110, - 106, 398, 48, 48, 23, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398 - + 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[899] = +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, - 1, 1, 1, 3, 4, 5, 11, 32, 6, 25, - 25, 32, 9, 26, 26, 10, 33, 33, 13, 3, - 4, 3, 4, 11, 11, 11, 5, 5, 5, 6, - 6, 6, 9, 9, 9, 10, 10, 10, 12, 13, - 14, 15, 16, 81, 63, 41, 19, 435, 19, 19, - - 63, 46, 46, 81, 19, 12, 12, 12, 41, 15, - 16, 14, 17, 17, 17, 17, 19, 434, 19, 20, - 17, 20, 20, 21, 46, 17, 21, 20, 433, 17, - 22, 21, 17, 22, 17, 66, 51, 51, 22, 20, - 65, 20, 432, 21, 65, 21, 66, 54, 54, 72, - 22, 76, 22, 72, 66, 76, 85, 65, 17, 51, - 17, 18, 18, 18, 18, 85, 72, 62, 76, 18, - 54, 431, 62, 430, 18, 62, 62, 67, 18, 62, - 87, 18, 67, 18, 82, 67, 67, 77, 77, 82, - 89, 91, 164, 87, 92, 100, 100, 87, 205, 91, - - 104, 104, 164, 92, 205, 89, 428, 18, 89, 18, - 28, 92, 113, 113, 427, 28, 115, 115, 118, 118, - 120, 120, 138, 138, 139, 139, 28, 28, 142, 142, - 426, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 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, 57, 145, 145, 57, 106, - 106, 396, 107, 107, 57, 148, 148, 150, 150, 151, - 151, 57, 157, 157, 57, 166, 57, 160, 170, 57, - 57, 160, 106, 174, 57, 107, 395, 174, 187, 187, - 166, 57, 160, 188, 57, 170, 57, 57, 57, 57, - - 189, 189, 191, 191, 192, 192, 188, 394, 170, 194, - 194, 196, 196, 197, 197, 204, 204, 206, 206, 207, - 208, 208, 209, 207, 210, 210, 211, 262, 270, 247, - 211, 287, 290, 209, 247, 306, 207, 247, 247, 390, - 393, 209, 392, 211, 262, 270, 389, 384, 287, 290, - 382, 381, 306, 380, 379, 378, 390, 399, 399, 399, - 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, - 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, - 400, 400, 400, 401, 401, 401, 401, 401, 401, 401, - 401, 401, 401, 401, 401, 401, 402, 402, 402, 402, - - 402, 402, 402, 402, 402, 402, 402, 402, 402, 403, - 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, 405, 405, 405, 405, 405, - 405, 405, 405, 405, 405, 405, 405, 405, 406, 406, - 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, - 406, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 409, 409, 410, - 376, 410, 410, 410, 410, 410, 410, 410, 410, 375, - - 410, 410, 411, 411, 411, 411, 411, 411, 374, 411, - 411, 411, 411, 372, 411, 412, 371, 412, 412, 412, - 412, 412, 412, 412, 412, 412, 370, 412, 413, 413, - 413, 413, 413, 413, 369, 413, 413, 413, 413, 413, - 413, 414, 414, 366, 414, 414, 414, 414, 414, 414, - 414, 414, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 365, 415, 416, 416, 416, 416, 416, - 364, 416, 416, 416, 416, 416, 417, 417, 417, 417, - 417, 417, 417, 417, 417, 417, 417, 363, 417, 418, - 418, 362, 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, 361, - 420, 420, 420, 420, 420, 420, 421, 421, 359, 358, - 355, 354, 421, 421, 421, 421, 421, 353, 421, 422, - 422, 352, 422, 351, 350, 422, 422, 422, 422, 422, - 349, 422, 423, 423, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 348, 423, 424, 424, 424, 425, 346, - 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, - 425, 429, 345, 429, 429, 429, 429, 429, 429, 429, - 429, 344, 429, 429, 342, 341, 340, 339, 338, 337, - - 336, 335, 334, 333, 332, 330, 329, 328, 327, 326, - 325, 323, 322, 321, 320, 319, 318, 317, 316, 314, - 313, 312, 308, 304, 302, 301, 300, 299, 297, 296, - 295, 293, 292, 291, 289, 288, 285, 284, 282, 278, - 277, 275, 273, 272, 271, 269, 267, 266, 265, 264, - 263, 261, 260, 259, 257, 256, 255, 254, 253, 252, - 251, 250, 249, 248, 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, 214, 213, 212, 203, 199, 198, 195, - - 193, 190, 184, 183, 182, 181, 180, 179, 178, 177, - 176, 175, 173, 172, 171, 169, 168, 167, 165, 163, - 162, 161, 159, 124, 119, 114, 108, 105, 101, 95, - 94, 93, 90, 88, 86, 84, 83, 80, 71, 48, - 44, 23, 8, 7, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398 - + 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; @@ -715,20 +732,20 @@ static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; -static yyconst short int yy_rule_linenum[103] = +static yyconst short int yy_rule_linenum[104] = { 0, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 252, 257, 258, 259, 260, 261, - 263, 265, 271, 285, 288, 291, 292, 295, 298, 301, - 309, 315, 330, 331, 341, 346, 361, 362, 377, 378, - 390, 400, 419, 435, 454, 465, 478, 479, 480, 481, - 482, 483, 484, 485, 486, 496, 501, 512, 518, 519, - 520, 522, 539, 545, 546, 547, 549, 566, 569, 572, - 573, 576, 587, 588, 589, 602, 604, 609, 628, 635, - - 636, 655 + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 253, 258, 260, 261, 262, 263, + 264, 266, 268, 274, 288, 291, 294, 295, 298, 301, + 304, 312, 318, 333, 334, 344, 349, 364, 365, 380, + 381, 393, 403, 422, 438, 457, 469, 483, 484, 485, + 486, 487, 488, 489, 490, 491, 502, 508, 519, 525, + 526, 527, 529, 546, 552, 553, 554, 556, 573, 576, + 579, 580, 583, 594, 595, 596, 609, 611, 616, 635, + + 642, 643, 662 } ; /* The intent behind this definition is that it'll catch @@ -919,6 +936,7 @@ 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 @@ -940,7 +958,7 @@ static int convert_ucn_to_byte (char const *hex_text); 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 944 "scan-gram.c" +#line 962 "scan-gram.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1040,9 +1058,20 @@ YY_MALLOC_DECL YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + } #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -1083,6 +1112,9 @@ YY_MALLOC_DECL #endif #define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION YY_DECL @@ -1091,7 +1123,7 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 202 "scan-gram.l" +#line 203 "scan-gram.l" int braces_level IF_LINT (= 0); @@ -1105,7 +1137,7 @@ YY_DECL /*----------------------------. | Scanning Bison directives. | `----------------------------*/ -#line 1109 "scan-gram.c" +#line 1141 "scan-gram.c" if ( yy_init ) { @@ -1144,6 +1176,7 @@ YY_DECL yy_bp = yy_cp; yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); yy_match: do { @@ -1156,13 +1189,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 >= 399 ) + 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] != 845 ); + while ( yy_base[yy_current_state] != 903 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1182,13 +1215,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 < 103 ) + else if ( yy_act < 104 ) fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 103 ) + else if ( yy_act == 104 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 104 ) + else if ( yy_act == 105 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -1207,177 +1240,177 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 217 "scan-gram.l" +#line 218 "scan-gram.l" return PERCENT_NONASSOC; YY_BREAK case 2: YY_RULE_SETUP -#line 218 "scan-gram.l" +#line 219 "scan-gram.l" return PERCENT_DEBUG; YY_BREAK case 3: YY_RULE_SETUP -#line 219 "scan-gram.l" +#line 220 "scan-gram.l" return PERCENT_DEFINE; YY_BREAK case 4: YY_RULE_SETUP -#line 220 "scan-gram.l" +#line 221 "scan-gram.l" return PERCENT_DEFINES; YY_BREAK case 5: YY_RULE_SETUP -#line 221 "scan-gram.l" +#line 222 "scan-gram.l" return PERCENT_DESTRUCTOR; YY_BREAK case 6: YY_RULE_SETUP -#line 222 "scan-gram.l" +#line 223 "scan-gram.l" return PERCENT_DPREC; YY_BREAK case 7: YY_RULE_SETUP -#line 223 "scan-gram.l" +#line 224 "scan-gram.l" return PERCENT_ERROR_VERBOSE; YY_BREAK case 8: YY_RULE_SETUP -#line 224 "scan-gram.l" +#line 225 "scan-gram.l" return PERCENT_EXPECT; YY_BREAK case 9: YY_RULE_SETUP -#line 225 "scan-gram.l" +#line 226 "scan-gram.l" return PERCENT_FILE_PREFIX; YY_BREAK case 10: YY_RULE_SETUP -#line 226 "scan-gram.l" +#line 227 "scan-gram.l" return PERCENT_YACC; YY_BREAK case 11: YY_RULE_SETUP -#line 227 "scan-gram.l" +#line 228 "scan-gram.l" return PERCENT_GLR_PARSER; YY_BREAK case 12: YY_RULE_SETUP -#line 228 "scan-gram.l" +#line 229 "scan-gram.l" return PERCENT_LEFT; YY_BREAK case 13: YY_RULE_SETUP -#line 229 "scan-gram.l" +#line 230 "scan-gram.l" return PERCENT_LOCATIONS; YY_BREAK case 14: YY_RULE_SETUP -#line 230 "scan-gram.l" +#line 231 "scan-gram.l" return PERCENT_MERGE; YY_BREAK case 15: YY_RULE_SETUP -#line 231 "scan-gram.l" +#line 232 "scan-gram.l" return PERCENT_NAME_PREFIX; YY_BREAK case 16: YY_RULE_SETUP -#line 232 "scan-gram.l" +#line 233 "scan-gram.l" return PERCENT_NO_LINES; YY_BREAK case 17: YY_RULE_SETUP -#line 233 "scan-gram.l" +#line 234 "scan-gram.l" return PERCENT_NONASSOC; YY_BREAK case 18: YY_RULE_SETUP -#line 234 "scan-gram.l" +#line 235 "scan-gram.l" return PERCENT_NTERM; YY_BREAK case 19: YY_RULE_SETUP -#line 235 "scan-gram.l" +#line 236 "scan-gram.l" return PERCENT_OUTPUT; YY_BREAK case 20: YY_RULE_SETUP -#line 236 "scan-gram.l" +#line 237 "scan-gram.l" return PERCENT_PARSE_PARAM; YY_BREAK case 21: YY_RULE_SETUP -#line 237 "scan-gram.l" +#line 238 "scan-gram.l" rule_length--; return PERCENT_PREC; YY_BREAK case 22: YY_RULE_SETUP -#line 238 "scan-gram.l" +#line 239 "scan-gram.l" return PERCENT_PRINTER; YY_BREAK case 23: YY_RULE_SETUP -#line 239 "scan-gram.l" +#line 240 "scan-gram.l" return PERCENT_PURE_PARSER; YY_BREAK case 24: YY_RULE_SETUP -#line 240 "scan-gram.l" +#line 241 "scan-gram.l" return PERCENT_RIGHT; YY_BREAK case 25: YY_RULE_SETUP -#line 241 "scan-gram.l" +#line 242 "scan-gram.l" return PERCENT_LEX_PARAM; YY_BREAK case 26: YY_RULE_SETUP -#line 242 "scan-gram.l" +#line 243 "scan-gram.l" return PERCENT_SKELETON; YY_BREAK case 27: YY_RULE_SETUP -#line 243 "scan-gram.l" +#line 244 "scan-gram.l" return PERCENT_START; YY_BREAK case 28: YY_RULE_SETUP -#line 244 "scan-gram.l" +#line 245 "scan-gram.l" return PERCENT_TOKEN; YY_BREAK case 29: YY_RULE_SETUP -#line 245 "scan-gram.l" +#line 246 "scan-gram.l" return PERCENT_TOKEN; YY_BREAK case 30: YY_RULE_SETUP -#line 246 "scan-gram.l" +#line 247 "scan-gram.l" return PERCENT_TOKEN_TABLE; YY_BREAK case 31: YY_RULE_SETUP -#line 247 "scan-gram.l" +#line 248 "scan-gram.l" return PERCENT_TYPE; YY_BREAK case 32: YY_RULE_SETUP -#line 248 "scan-gram.l" +#line 249 "scan-gram.l" return PERCENT_UNION; YY_BREAK case 33: YY_RULE_SETUP -#line 249 "scan-gram.l" +#line 250 "scan-gram.l" return PERCENT_VERBOSE; YY_BREAK case 34: YY_RULE_SETUP -#line 250 "scan-gram.l" +#line 251 "scan-gram.l" return PERCENT_YACC; YY_BREAK case 35: YY_RULE_SETUP -#line 252 "scan-gram.l" +#line 253 "scan-gram.l" { complain_at (*yylloc, _("invalid directive: %s"), quote (yytext)); YY_STEP; @@ -1385,53 +1418,58 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 257 "scan-gram.l" -return EQUAL; +#line 258 "scan-gram.l" +handle_syncline (yytext + strlen ("#line "), yylloc); YY_STEP; YY_BREAK case 37: YY_RULE_SETUP -#line 258 "scan-gram.l" -rule_length = 0; return COLON; +#line 260 "scan-gram.l" +return EQUAL; YY_BREAK case 38: YY_RULE_SETUP -#line 259 "scan-gram.l" -rule_length = 0; return PIPE; +#line 261 "scan-gram.l" +rule_length = 0; return COLON; YY_BREAK case 39: YY_RULE_SETUP -#line 260 "scan-gram.l" -return COMMA; +#line 262 "scan-gram.l" +rule_length = 0; return PIPE; YY_BREAK case 40: YY_RULE_SETUP -#line 261 "scan-gram.l" -return SEMICOLON; +#line 263 "scan-gram.l" +return COMMA; YY_BREAK case 41: YY_RULE_SETUP -#line 263 "scan-gram.l" -YY_STEP; +#line 264 "scan-gram.l" +return SEMICOLON; YY_BREAK case 42: YY_RULE_SETUP -#line 265 "scan-gram.l" +#line 266 "scan-gram.l" +YY_STEP; + YY_BREAK +case 43: +YY_RULE_SETUP +#line 268 "scan-gram.l" { yylval->symbol = symbol_get (yytext, *yylloc); rule_length++; return ID; } YY_BREAK -case 43: +case 44: YY_RULE_SETUP -#line 271 "scan-gram.l" +#line 274 "scan-gram.l" { unsigned long num; errno = 0; num = strtoul (yytext, 0, 10); if (INT_MAX < num || errno) { - complain_at (*yylloc, _("invalid value: %s"), quote (yytext)); + complain_at (*yylloc, _("integer out of range: %s"), quote (yytext)); num = INT_MAX; } yylval->integer = num; @@ -1439,44 +1477,44 @@ YY_RULE_SETUP } YY_BREAK /* Characters. We don't check there is only one. */ -case 44: +case 45: YY_RULE_SETUP -#line 285 "scan-gram.l" +#line 288 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER); YY_BREAK /* Strings. */ -case 45: +case 46: YY_RULE_SETUP -#line 288 "scan-gram.l" +#line 291 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING); YY_BREAK /* Comments. */ -case 46: +case 47: YY_RULE_SETUP -#line 291 "scan-gram.l" +#line 294 "scan-gram.l" BEGIN SC_YACC_COMMENT; YY_BREAK -case 47: +case 48: YY_RULE_SETUP -#line 292 "scan-gram.l" +#line 295 "scan-gram.l" YY_STEP; YY_BREAK /* Prologue. */ -case 48: +case 49: YY_RULE_SETUP -#line 295 "scan-gram.l" +#line 298 "scan-gram.l" yy_push_state (SC_PROLOGUE); YY_BREAK /* Code in between braces. */ -case 49: +case 50: YY_RULE_SETUP -#line 298 "scan-gram.l" +#line 301 "scan-gram.l" YY_OBS_GROW; braces_level = 0; yy_push_state (SC_BRACED_CODE); YY_BREAK /* A type. */ -case 50: +case 51: YY_RULE_SETUP -#line 301 "scan-gram.l" +#line 304 "scan-gram.l" { obstack_grow (&string_obstack, yytext + 1, yyleng - 2); YY_OBS_FINISH; @@ -1484,18 +1522,18 @@ YY_RULE_SETUP return TYPE; } YY_BREAK -case 51: +case 52: YY_RULE_SETUP -#line 309 "scan-gram.l" +#line 312 "scan-gram.l" { if (++percent_percent_count == 2) yy_push_state (SC_EPILOGUE); return PERCENT_PERCENT; } YY_BREAK -case 52: +case 53: YY_RULE_SETUP -#line 315 "scan-gram.l" +#line 318 "scan-gram.l" { complain_at (*yylloc, _("invalid character: %s"), quote (yytext)); YY_STEP; @@ -1509,14 +1547,14 @@ YY_RULE_SETUP `-------------------------------------------------------------------*/ -case 53: +case 54: YY_RULE_SETUP -#line 330 "scan-gram.l" +#line 333 "scan-gram.l" obstack_sgrow (&string_obstack, "@<:@"); YY_BREAK -case 54: +case 55: YY_RULE_SETUP -#line 331 "scan-gram.l" +#line 334 "scan-gram.l" obstack_sgrow (&string_obstack, "@:>@"); YY_BREAK @@ -1525,21 +1563,21 @@ obstack_sgrow (&string_obstack, "@:>@"); `---------------------------------------------------------------*/ -case 55: +case 56: YY_RULE_SETUP -#line 341 "scan-gram.l" +#line 344 "scan-gram.l" { YY_STEP; BEGIN INITIAL; } YY_BREAK -case 56: +case 57: YY_RULE_SETUP -#line 346 "scan-gram.l" +#line 349 "scan-gram.l" ; YY_BREAK case YY_STATE_EOF(SC_YACC_COMMENT): -#line 348 "scan-gram.l" +#line 351 "scan-gram.l" { complain_at (*yylloc, _("unexpected end of file in a comment")); BEGIN INITIAL; @@ -1551,18 +1589,18 @@ case YY_STATE_EOF(SC_YACC_COMMENT): `------------------------------------------------------------*/ -case 57: +case 58: YY_RULE_SETUP -#line 361 "scan-gram.l" +#line 364 "scan-gram.l" YY_OBS_GROW; yy_pop_state (); YY_BREAK -case 58: +case 59: YY_RULE_SETUP -#line 362 "scan-gram.l" +#line 365 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_COMMENT): -#line 364 "scan-gram.l" +#line 367 "scan-gram.l" { complain_at (*yylloc, _("unexpected end of file in a comment")); yy_pop_state (); @@ -1574,18 +1612,18 @@ case YY_STATE_EOF(SC_COMMENT): `--------------------------------------------------------------*/ -case 59: +case 60: YY_RULE_SETUP -#line 377 "scan-gram.l" +#line 380 "scan-gram.l" YY_OBS_GROW; yy_pop_state (); YY_BREAK -case 60: +case 61: YY_RULE_SETUP -#line 378 "scan-gram.l" +#line 381 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_LINE_COMMENT): -#line 379 "scan-gram.l" +#line 382 "scan-gram.l" yy_pop_state (); YY_BREAK @@ -1595,9 +1633,9 @@ yy_pop_state (); `----------------------------------------------------------------*/ -case 61: +case 62: YY_RULE_SETUP -#line 390 "scan-gram.l" +#line 393 "scan-gram.l" { assert (yy_top_state () == INITIAL); YY_OBS_GROW; @@ -1608,13 +1646,13 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 400 "scan-gram.l" +#line 403 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_ESCAPED_STRING): -#line 402 "scan-gram.l" +#line 405 "scan-gram.l" { complain_at (*yylloc, _("unexpected end of file in a string")); assert (yy_top_state () == INITIAL); @@ -1631,9 +1669,9 @@ case YY_STATE_EOF(SC_ESCAPED_STRING): `---------------------------------------------------------------*/ -case 63: +case 64: YY_RULE_SETUP -#line 419 "scan-gram.l" +#line 422 "scan-gram.l" { YY_OBS_GROW; assert (yy_top_state () == INITIAL); @@ -1650,15 +1688,15 @@ YY_RULE_SETUP } } YY_BREAK -case 64: +case 65: YY_RULE_SETUP -#line 435 "scan-gram.l" +#line 438 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_ESCAPED_CHARACTER): -#line 437 "scan-gram.l" +#line 440 "scan-gram.l" { - complain_at (*yylloc, _("unexpected end of file in a character")); + complain_at (*yylloc, _("unexpected end of file in a character literal")); assert (yy_top_state () == INITIAL); YY_OBS_FINISH; yylval->string = last_string; @@ -1672,102 +1710,106 @@ case YY_STATE_EOF(SC_ESCAPED_CHARACTER): `----------------------------*/ -case 65: +case 66: YY_RULE_SETUP -#line 454 "scan-gram.l" +#line 457 "scan-gram.l" { unsigned long c = strtoul (yytext + 1, 0, 8); if (UCHAR_MAX < c) { - complain_at (*yylloc, _("invalid escape: %s"), quote (yytext)); + complain_at (*yylloc, _("invalid escape sequence: %s"), + quote (yytext)); YY_STEP; } else obstack_1grow (&string_obstack, c); } YY_BREAK -case 66: +case 67: YY_RULE_SETUP -#line 465 "scan-gram.l" +#line 469 "scan-gram.l" { unsigned long c; errno = 0; c = strtoul (yytext + 2, 0, 16); if (UCHAR_MAX < c || errno) { - complain_at (*yylloc, _("invalid escape: %s"), quote (yytext)); + complain_at (*yylloc, _("invalid escape sequence: %s"), + quote (yytext)); YY_STEP; } else obstack_1grow (&string_obstack, c); } YY_BREAK -case 67: +case 68: YY_RULE_SETUP -#line 478 "scan-gram.l" +#line 483 "scan-gram.l" obstack_1grow (&string_obstack, '\a'); YY_BREAK -case 68: +case 69: YY_RULE_SETUP -#line 479 "scan-gram.l" +#line 484 "scan-gram.l" obstack_1grow (&string_obstack, '\b'); YY_BREAK -case 69: +case 70: YY_RULE_SETUP -#line 480 "scan-gram.l" +#line 485 "scan-gram.l" obstack_1grow (&string_obstack, '\f'); YY_BREAK -case 70: +case 71: YY_RULE_SETUP -#line 481 "scan-gram.l" +#line 486 "scan-gram.l" obstack_1grow (&string_obstack, '\n'); YY_BREAK -case 71: +case 72: YY_RULE_SETUP -#line 482 "scan-gram.l" +#line 487 "scan-gram.l" obstack_1grow (&string_obstack, '\r'); YY_BREAK -case 72: +case 73: YY_RULE_SETUP -#line 483 "scan-gram.l" +#line 488 "scan-gram.l" obstack_1grow (&string_obstack, '\t'); YY_BREAK -case 73: +case 74: YY_RULE_SETUP -#line 484 "scan-gram.l" +#line 489 "scan-gram.l" obstack_1grow (&string_obstack, '\v'); YY_BREAK -case 74: +case 75: YY_RULE_SETUP -#line 485 "scan-gram.l" +#line 490 "scan-gram.l" obstack_1grow (&string_obstack, yytext[1]); YY_BREAK -case 75: +case 76: YY_RULE_SETUP -#line 486 "scan-gram.l" +#line 491 "scan-gram.l" { int c = convert_ucn_to_byte (yytext); if (c < 0) { - complain_at (*yylloc, _("invalid escape: %s"), quote (yytext)); + complain_at (*yylloc, _("invalid escape sequence: %s"), + quote (yytext)); YY_STEP; } else obstack_1grow (&string_obstack, c); } YY_BREAK -case 76: +case 77: YY_RULE_SETUP -#line 496 "scan-gram.l" +#line 502 "scan-gram.l" { - complain_at (*yylloc, _("unrecognized escape: %s"), quote (yytext)); + complain_at (*yylloc, _("unrecognized escape sequence: %s"), + quote (yytext)); YY_OBS_GROW; } YY_BREAK /* FLex wants this rule, in case of a `\<>'. */ -case 77: +case 78: YY_RULE_SETUP -#line 501 "scan-gram.l" +#line 508 "scan-gram.l" YY_OBS_GROW; YY_BREAK @@ -1777,40 +1819,40 @@ YY_OBS_GROW; `----------------------------------------------------------*/ -case 78: +case 79: YY_RULE_SETUP -#line 512 "scan-gram.l" +#line 519 "scan-gram.l" { YY_OBS_GROW; assert (yy_top_state () != INITIAL); yy_pop_state (); } YY_BREAK -case 79: +case 80: YY_RULE_SETUP -#line 518 "scan-gram.l" +#line 525 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 80: +case 81: YY_RULE_SETUP -#line 519 "scan-gram.l" +#line 526 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 81: +case 82: YY_RULE_SETUP -#line 520 "scan-gram.l" +#line 527 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* Needed for `\<>', `\\<>[', and `\\<>]'. */ -case 82: +case 83: YY_RULE_SETUP -#line 522 "scan-gram.l" +#line 529 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_CHARACTER): -#line 524 "scan-gram.l" +#line 531 "scan-gram.l" { - complain_at (*yylloc, _("unexpected end of file in a character")); + complain_at (*yylloc, _("unexpected end of file in a character literal")); assert (yy_top_state () != INITIAL); yy_pop_state (); } @@ -1822,38 +1864,38 @@ case YY_STATE_EOF(SC_CHARACTER): `----------------------------------------------------------------*/ -case 83: +case 84: YY_RULE_SETUP -#line 539 "scan-gram.l" +#line 546 "scan-gram.l" { assert (yy_top_state () != INITIAL); YY_OBS_GROW; yy_pop_state (); } YY_BREAK -case 84: +case 85: YY_RULE_SETUP -#line 545 "scan-gram.l" +#line 552 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 85: +case 86: YY_RULE_SETUP -#line 546 "scan-gram.l" +#line 553 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 86: +case 87: YY_RULE_SETUP -#line 547 "scan-gram.l" +#line 554 "scan-gram.l" YY_OBS_GROW; YY_BREAK /* Needed for `\<>', `\\<>[', and `\\<>]'. */ -case 87: +case 88: YY_RULE_SETUP -#line 549 "scan-gram.l" +#line 556 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_STRING): -#line 551 "scan-gram.l" +#line 558 "scan-gram.l" { complain_at (*yylloc, _("unexpected end of file in a string")); assert (yy_top_state () != INITIAL); @@ -1867,32 +1909,32 @@ case YY_STATE_EOF(SC_STRING): /* Characters. We don't check there is only one. */ -case 88: +case 89: YY_RULE_SETUP -#line 566 "scan-gram.l" +#line 573 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_CHARACTER); YY_BREAK /* Strings. */ -case 89: +case 90: YY_RULE_SETUP -#line 569 "scan-gram.l" +#line 576 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_STRING); YY_BREAK /* Comments. */ -case 90: +case 91: YY_RULE_SETUP -#line 572 "scan-gram.l" +#line 579 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_COMMENT); YY_BREAK -case 91: +case 92: YY_RULE_SETUP -#line 573 "scan-gram.l" +#line 580 "scan-gram.l" YY_OBS_GROW; yy_push_state (SC_LINE_COMMENT); YY_BREAK /* Not comments. */ -case 92: +case 93: YY_RULE_SETUP -#line 576 "scan-gram.l" +#line 583 "scan-gram.l" YY_OBS_GROW; YY_BREAK @@ -1902,19 +1944,19 @@ YY_OBS_GROW; `---------------------------------------------------------------*/ -case 93: +case 94: YY_RULE_SETUP -#line 587 "scan-gram.l" +#line 594 "scan-gram.l" YY_OBS_GROW; braces_level++; YY_BREAK -case 94: +case 95: YY_RULE_SETUP -#line 588 "scan-gram.l" +#line 595 "scan-gram.l" YY_OBS_GROW; braces_level--; YY_BREAK -case 95: +case 96: YY_RULE_SETUP -#line 589 "scan-gram.l" +#line 596 "scan-gram.l" { YY_OBS_GROW; braces_level--; @@ -1928,29 +1970,29 @@ YY_RULE_SETUP } } YY_BREAK -case 96: +case 97: YY_RULE_SETUP -#line 602 "scan-gram.l" +#line 609 "scan-gram.l" { handle_dollar (current_braced_code, yytext, *yylloc); } YY_BREAK -case 97: +case 98: YY_RULE_SETUP -#line 604 "scan-gram.l" +#line 611 "scan-gram.l" { handle_at (current_braced_code, yytext, *yylloc); } YY_BREAK /* `"<"{splice}"<"' tokenizes `<<%' correctly (as `<<' `%') rather than incorrrectly (as `<' `<%'). */ -case 98: +case 99: YY_RULE_SETUP -#line 609 "scan-gram.l" +#line 616 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_BRACED_CODE): -#line 611 "scan-gram.l" +#line 618 "scan-gram.l" { - complain_at (*yylloc, _("unexpected end of file in a braced code")); + complain_at (*yylloc, _("unexpected end of file in `{ ... }'")); yy_pop_state (); YY_OBS_FINISH; yylval->string = last_string; @@ -1963,9 +2005,9 @@ case YY_STATE_EOF(SC_BRACED_CODE): `--------------------------------------------------------------*/ -case 99: +case 100: YY_RULE_SETUP -#line 628 "scan-gram.l" +#line 635 "scan-gram.l" { yy_pop_state (); YY_OBS_FINISH; @@ -1973,20 +2015,20 @@ YY_RULE_SETUP return PROLOGUE; } YY_BREAK -case 100: +case 101: YY_RULE_SETUP -#line 635 "scan-gram.l" +#line 642 "scan-gram.l" YY_OBS_GROW; YY_BREAK -case 101: +case 102: YY_RULE_SETUP -#line 636 "scan-gram.l" +#line 643 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_PROLOGUE): -#line 638 "scan-gram.l" +#line 645 "scan-gram.l" { - complain_at (*yylloc, _("unexpected end of file in a prologue")); + complain_at (*yylloc, _("unexpected end of file in `%%{ ... %%}'")); yy_pop_state (); YY_OBS_FINISH; yylval->string = last_string; @@ -2000,13 +2042,13 @@ case YY_STATE_EOF(SC_PROLOGUE): `---------------------------------------------------------------*/ -case 102: +case 103: YY_RULE_SETUP -#line 655 "scan-gram.l" +#line 662 "scan-gram.l" YY_OBS_GROW; YY_BREAK case YY_STATE_EOF(SC_EPILOGUE): -#line 657 "scan-gram.l" +#line 664 "scan-gram.l" { yy_pop_state (); YY_OBS_FINISH; @@ -2015,12 +2057,12 @@ case YY_STATE_EOF(SC_EPILOGUE): } YY_BREAK -case 103: +case 104: YY_RULE_SETUP -#line 666 "scan-gram.l" +#line 673 "scan-gram.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2024 "scan-gram.c" +#line 2066 "scan-gram.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2300,10 +2342,11 @@ static yy_state_type yy_get_previous_state() 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)] : 53); + 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; @@ -2312,7 +2355,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 >= 399 ) + 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]; @@ -2338,7 +2381,7 @@ yy_state_type yy_current_state; register int yy_is_jam; register char *yy_cp = yy_c_buf_p; - register YY_CHAR yy_c = 53; + register YY_CHAR yy_c = 55; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; @@ -2347,11 +2390,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 >= 399 ) + 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 == 398); + yy_is_jam = (yy_current_state == 410); return yy_is_jam ? 0 : yy_current_state; } @@ -2470,6 +2513,7 @@ static int input() *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; + yy_current_buffer->yy_at_bol = (c == '\n'); return c; } @@ -2584,11 +2628,15 @@ YY_BUFFER_STATE b; } +#ifndef _WIN32 +#include +#else #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) @@ -2906,7 +2954,7 @@ int main() return 0; } #endif -#line 666 "scan-gram.l" +#line 673 "scan-gram.l" /*------------------------------------------------------------------. @@ -2967,7 +3015,7 @@ handle_action_dollar (char *text, location_t location) rule_length, n, type_name); } else - complain_at (location, _("invalid value: %s"), quote (text)); + complain_at (location, _("integer out of range: %s"), quote (text)); } } @@ -3039,7 +3087,7 @@ handle_action_at (char *text, location_t location) rule_length, n); } else - complain_at (location, _("invalid value: %s"), quote (text)); + complain_at (location, _("integer out of range: %s"), quote (text)); } } @@ -3139,6 +3187,24 @@ convert_ucn_to_byte (char const *ucn) } +/*----------------------------------------------------------------. +| 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. | `-------------------------*/ diff --git a/src/scan-gram.l b/src/scan-gram.l index 95aab985..96706873 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -177,6 +177,7 @@ 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); %} @@ -254,6 +255,8 @@ splice (\\[ \f\t\v]*\n)* YY_STEP; } + ^"#line "{int}" \""[^\"]*"\"\n" handle_syncline (yytext + strlen ("#line "), yylloc); YY_STEP; + "=" return EQUAL; ":" rule_length = 0; return COLON; "|" rule_length = 0; return PIPE; @@ -899,6 +902,24 @@ convert_ucn_to_byte (char const *ucn) } +/*----------------------------------------------------------------. +| 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. | `-------------------------*/