diff --git a/reactos/include/reactos/wine/wpp.h b/reactos/include/reactos/wine/wpp.h index a6e8657c61c..10b71e0c785 100644 --- a/reactos/include/reactos/wine/wpp.h +++ b/reactos/include/reactos/wine/wpp.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __WINE_WPP_H @@ -29,7 +29,7 @@ extern void wpp_add_cmdline_define( const char *value ); extern void wpp_set_debug( int lex_debug, int parser_debug, int msg_debug ); extern void wpp_set_pedantic( int on ); extern void wpp_add_include_path( const char *path ); -char *wpp_find_include( const char *name, const char *parent_name, int type ); +extern char *wpp_find_include( const char *name, const char *parent_name ); extern int wpp_parse( const char *input, FILE *output ); extern int wpp_parse_temp( const char *input, const char *output_base, char **output_name ); diff --git a/reactos/tools/widl/ChangeLog b/reactos/tools/widl/ChangeLog index 44da20de7f2..40c0dcb94e6 100644 --- a/reactos/tools/widl/ChangeLog +++ b/reactos/tools/widl/ChangeLog @@ -1,5 +1,14 @@ ChangeLog +2007-05-17 ekohl + + tools/widl/lex.yy.c + tools/widl/parser.l + tools/widl/typelib.c + +- Update wpp and fix the wpp_find_include issue! + + 2006-07-30 ekohl - Synchronized with WINE widl 20060729. diff --git a/reactos/tools/widl/lex.yy.c b/reactos/tools/widl/lex.yy.c index 25e254f4033..c5601a7d0cc 100644 --- a/reactos/tools/widl/lex.yy.c +++ b/reactos/tools/widl/lex.yy.c @@ -5052,7 +5052,7 @@ int do_import(char *fname) import->next = first_import; first_import = import; - if (!(path = wpp_find_include( fname, input_name, 1 ))) + if (!(path = wpp_find_include( fname, input_name ))) yyerror("Unable to open include file %s", fname); import_stack[ptr].temp_name = temp_name; diff --git a/reactos/tools/widl/parser.l b/reactos/tools/widl/parser.l index 511b3e41dea..4fedd341b1b 100644 --- a/reactos/tools/widl/parser.l +++ b/reactos/tools/widl/parser.l @@ -413,7 +413,7 @@ int do_import(char *fname) import->next = first_import; first_import = import; - if (!(path = wpp_find_include( fname, input_name, 1 ))) + if (!(path = wpp_find_include( fname, input_name ))) yyerror("Unable to open include file %s", fname); import_stack[ptr].temp_name = temp_name; diff --git a/reactos/tools/widl/typelib.c b/reactos/tools/widl/typelib.c index 11e2c4de30c..5ff101beeb6 100644 --- a/reactos/tools/widl/typelib.c +++ b/reactos/tools/widl/typelib.c @@ -370,7 +370,7 @@ static void read_importlib(importlib_t *importlib) INT magic; char *file_name; - file_name = wpp_find_include(importlib->name, NULL, 1); + file_name = wpp_find_include(importlib->name, NULL); if(file_name) { fd = open(file_name, O_RDONLY); free(file_name); diff --git a/reactos/tools/wpp/lex.yy.c b/reactos/tools/wpp/lex.yy.c index a94686a90ea..25716f55d16 100644 --- a/reactos/tools/wpp/lex.yy.c +++ b/reactos/tools/wpp/lex.yy.c @@ -1,22 +1,22 @@ -#define yy_create_buffer pp_create_buffer -#define yy_delete_buffer pp_delete_buffer -#define yy_scan_buffer pp_scan_buffer -#define yy_scan_string pp_scan_string -#define yy_scan_bytes pp_scan_bytes -#define yy_flex_debug pp_flex_debug -#define yy_init_buffer pp_init_buffer -#define yy_flush_buffer pp_flush_buffer -#define yy_load_buffer_state pp_load_buffer_state -#define yy_switch_to_buffer pp_switch_to_buffer -#define yyin ppin -#define yyleng ppleng -#define yylex pplex -#define yyout ppout -#define yyrestart pprestart -#define yytext pptext -#define yywrap ppwrap +#define yy_create_buffer ppy__create_buffer +#define yy_delete_buffer ppy__delete_buffer +#define yy_scan_buffer ppy__scan_buffer +#define yy_scan_string ppy__scan_string +#define yy_scan_bytes ppy__scan_bytes +#define yy_flex_debug ppy__flex_debug +#define yy_init_buffer ppy__init_buffer +#define yy_flush_buffer ppy__flush_buffer +#define yy_load_buffer_state ppy__load_buffer_state +#define yy_switch_to_buffer ppy__switch_to_buffer +#define yyin ppy_in +#define yyleng ppy_leng +#define yylex ppy_lex +#define yyout ppy_out +#define yyrestart ppy_restart +#define yytext ppy_text +#define yywrap ppy_wrap -#line 20 "tools/wpp/lex.yy.c" +#line 20 "tools\\wpp_new\\lex.yy.c" /* A lexical scanner generated by flex */ /* Scanner skeleton version: @@ -28,7 +28,6 @@ #define YY_FLEX_MINOR_VERSION 5 #include -#include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ @@ -42,6 +41,7 @@ #ifdef __cplusplus #include +#include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -301,56 +301,56 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 144 -#define YY_END_OF_BUFFER 145 -static yyconst short int yy_accept[421] = +#define YY_NUM_RULES 143 +#define YY_END_OF_BUFFER 144 +static yyconst short int yy_accept[415] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 118, 0, 0, 0, 0, + 0, 0, 0, 0, 117, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 145, 134, 135, 136, 122, 143, - 123, 134, 133, 134, 135, 1, 22, 17, 19, 17, - 22, 21, 18, 18, 18, 18, 18, 18, 18, 18, - 69, 72, 70, 71, 29, 26, 27, 25, 29, 24, - 29, 29, 124, 132, 125, 143, 126, 127, 143, 128, - 129, 118, 119, 118, 78, 76, 78, 78, 75, 78, + 0, 0, 0, 0, 144, 133, 134, 135, 121, 142, + 122, 133, 132, 133, 134, 1, 21, 16, 18, 16, + 21, 20, 17, 17, 17, 17, 17, 17, 17, 17, + 68, 71, 69, 70, 28, 25, 26, 24, 28, 23, + 28, 28, 123, 131, 124, 142, 125, 126, 142, 127, + 128, 117, 118, 117, 77, 75, 77, 77, 74, 77, - 79, 83, 85, 84, 143, 80, 91, 87, 91, 86, - 89, 91, 91, 88, 91, 93, 101, 103, 96, 102, - 98, 97, 94, 98, 93, 107, 107, 105, 104, 107, - 115, 114, 111, 112, 108, 109, 110, 115, 115, 134, - 135, 139, 122, 139, 123, 134, 133, 134, 54, 51, - 48, 54, 53, 54, 52, 54, 34, 36, 54, 54, - 54, 54, 50, 54, 54, 59, 56, 57, 59, 55, - 59, 63, 60, 61, 63, 63, 23, 68, 65, 68, - 66, 68, 64, 68, 30, 31, 33, 33, 33, 30, - 1, 141, 144, 142, 140, 140, 134, 135, 134, 117, + 78, 82, 84, 83, 142, 79, 90, 86, 90, 85, + 88, 90, 90, 87, 90, 92, 100, 102, 95, 101, + 97, 96, 93, 97, 92, 106, 106, 104, 103, 106, + 114, 113, 110, 111, 107, 108, 109, 114, 114, 133, + 134, 138, 121, 138, 122, 133, 132, 133, 53, 50, + 47, 53, 52, 53, 51, 53, 33, 35, 53, 53, + 53, 53, 49, 53, 53, 58, 55, 56, 58, 54, + 58, 62, 59, 60, 62, 62, 22, 67, 64, 67, + 65, 67, 63, 67, 29, 30, 32, 32, 32, 29, + 1, 140, 143, 141, 139, 139, 133, 134, 133, 116, - 121, 133, 137, 138, 135, 1, 17, 18, 18, 18, - 18, 18, 18, 18, 18, 19, 20, 21, 18, 18, - 18, 18, 18, 12, 18, 18, 18, 18, 18, 69, - 70, 71, 73, 71, 26, 28, 29, 124, 131, 130, - 131, 126, 128, 118, 118, 118, 120, 76, 74, 75, - 77, 78, 79, 80, 82, 80, 87, 86, 91, 88, - 92, 91, 93, 95, 98, 97, 94, 100, 98, 93, - 107, 105, 104, 107, 106, 107, 115, 115, 113, 116, - 115, 134, 139, 139, 51, 45, 42, 34, 35, 34, - 34, 38, 36, 36, 36, 40, 46, 44, 47, 41, + 120, 132, 136, 137, 134, 1, 16, 17, 17, 17, + 17, 17, 17, 17, 17, 18, 19, 20, 17, 17, + 17, 17, 17, 11, 17, 17, 17, 17, 17, 68, + 69, 70, 72, 70, 25, 27, 28, 123, 130, 129, + 130, 125, 127, 117, 117, 117, 119, 75, 73, 74, + 76, 77, 78, 79, 81, 79, 86, 85, 90, 87, + 91, 90, 92, 94, 97, 96, 93, 99, 97, 92, + 106, 104, 103, 106, 105, 106, 114, 114, 112, 115, + 114, 133, 138, 138, 50, 44, 41, 33, 34, 33, + 33, 37, 35, 35, 35, 39, 45, 43, 46, 40, - 49, 50, 133, 43, 56, 55, 58, 59, 60, 62, - 0, 23, 65, 64, 68, 67, 68, 30, 32, 33, - 30, 141, 140, 121, 121, 18, 18, 18, 18, 18, - 18, 12, 18, 18, 18, 18, 18, 18, 18, 70, - 81, 90, 99, 35, 35, 34, 34, 34, 37, 36, - 36, 36, 133, 121, 18, 13, 14, 18, 18, 18, - 18, 18, 18, 16, 18, 18, 18, 35, 35, 35, - 34, 37, 37, 36, 133, 18, 13, 14, 15, 5, - 8, 10, 18, 18, 16, 18, 9, 18, 35, 37, - 37, 37, 133, 4, 15, 5, 8, 10, 11, 18, + 48, 49, 132, 42, 55, 54, 57, 58, 59, 61, + 0, 22, 64, 63, 67, 66, 67, 29, 31, 32, + 29, 140, 139, 120, 120, 17, 17, 17, 17, 17, + 17, 11, 17, 17, 17, 17, 17, 17, 17, 69, + 80, 89, 98, 34, 34, 33, 33, 33, 36, 35, + 35, 35, 132, 120, 17, 12, 13, 17, 17, 17, + 17, 17, 17, 15, 17, 17, 17, 34, 34, 34, + 33, 36, 36, 35, 132, 17, 12, 13, 14, 4, + 7, 9, 17, 17, 15, 17, 8, 17, 34, 36, + 36, 36, 132, 3, 14, 4, 7, 9, 10, 17, - 7, 9, 18, 37, 133, 4, 11, 2, 7, 6, - 39, 2, 0, 6, 0, 0, 0, 3, 3, 0 + 6, 8, 17, 36, 132, 3, 10, 2, 6, 5, + 38, 2, 5, 0 } ; static yyconst int yy_ec[256] = @@ -394,114 +394,112 @@ static yyconst int yy_meta[50] = 15, 15, 15, 15, 15, 15, 15, 15, 1 } ; -static yyconst short int yy_base[464] = +static yyconst short int yy_base[458] = { 0, 0, 48, 55, 0, 102, 103, 130, 0, 177, 178, 179, 182, 186, 187, 104, 107, 214, 0, 261, 262, 289, 0, 338, 0, 386, 389, 414, 439, 466, 0, 515, 0, 564, 0, 399, 403, 612, 638, 665, 0, - 428, 618, 714, 763, 1354, 0, 49, 1771, 1771, 1771, - 1771, 96, 0, 109, 118, 1771, 1771, 811, 1771, 1350, - 111, 111, 858, 1316, 154, 161, 1307, 1300, 1302, 1312, + 428, 618, 714, 763, 1132, 0, 49, 1771, 1771, 1771, + 1771, 96, 0, 109, 118, 1771, 1771, 811, 1771, 1128, + 111, 111, 858, 1097, 154, 161, 1092, 1085, 1087, 1097, 0, 1771, 184, 124, 1771, 196, 1771, 1771, 254, 1771, - 0, 199, 0, 1771, 1771, 269, 0, 1771, 1337, 0, - 1771, 0, 1771, 263, 1771, 208, 1771, 267, 1123, 277, + 0, 199, 0, 1771, 1771, 269, 0, 1771, 1122, 0, + 1771, 0, 1771, 263, 1771, 208, 1771, 267, 1114, 277, 0, 1771, 1771, 1771, 271, 281, 1771, 393, 1771, 396, - 1771, 1118, 396, 0, 406, 0, 1771, 1771, 1124, 1771, + 1771, 1109, 396, 0, 406, 0, 1771, 1771, 1115, 1771, 400, 0, 0, 418, 905, 1771, 430, 1771, 1771, 433, 0, 1771, 1771, 1771, 1771, 1771, 1771, 432, 435, 0, 449, 1771, 1771, 1771, 1771, 444, 0, 954, 1771, 456, - 1771, 1110, 1771, 1121, 1771, 449, 988, 714, 443, 1108, - 603, 0, 623, 1094, 1077, 1771, 615, 1771, 619, 0, + 1771, 1101, 1771, 1112, 1771, 449, 988, 714, 443, 1099, + 603, 0, 623, 1085, 1068, 1771, 615, 1771, 619, 0, 632, 1771, 644, 1771, 635, 634, 635, 1771, 655, 1771, 1771, 646, 0, 659, 0, 1771, 1771, 725, 738, 741, 1771, 742, 1771, 1771, 0, 735, 0, 747, 741, 1771, - 0, 0, 1771, 1122, 755, 1771, 0, 0, 1091, 747, - 754, 1086, 1079, 1081, 1091, 1771, 1771, 1116, 1084, 717, - 1085, 1073, 1082, 777, 1083, 1073, 1083, 1079, 1067, 0, - 0, 1771, 1771, 1106, 787, 1771, 1105, 0, 1771, 1771, - 1104, 0, 0, 0, 743, 765, 1771, 791, 1771, 1093, - 1771, 1099, 0, 1771, 794, 1098, 795, 798, 1086, 0, - 1771, 1096, 0, 1771, 789, 0, 0, 801, 1081, 0, - 804, 1771, 1771, 807, 1771, 1080, 0, 804, 1771, 1771, - 1079, 806, 1771, 0, 818, 1771, 1771, 847, 843, 874, + 0, 0, 1771, 1113, 755, 1771, 0, 0, 1082, 747, + 754, 1077, 1070, 1072, 1082, 1771, 1771, 1107, 1075, 717, + 1076, 1064, 1070, 777, 1071, 1061, 1071, 1067, 1045, 0, + 0, 1771, 1771, 1081, 787, 1771, 1080, 0, 1771, 1771, + 1079, 0, 0, 0, 743, 765, 1771, 791, 1771, 1071, + 1771, 1077, 0, 1771, 794, 1076, 795, 798, 1064, 0, + 1771, 1074, 0, 1771, 789, 0, 0, 801, 1073, 0, + 804, 1771, 1771, 807, 1771, 1072, 0, 804, 1771, 1771, + 1071, 806, 1771, 0, 818, 1771, 1771, 847, 843, 874, 799, 0, 905, 903, 800, 1771, 1771, 1771, 1771, 1771, - 1771, 1078, 1046, 1771, 823, 0, 1771, 1076, 824, 1771, - 1075, 816, 871, 0, 1771, 1771, 1051, 0, 1771, 1036, - 872, 876, 0, 1036, 0, 995, 990, 988, 979, 970, - 942, 880, 917, 915, 906, 881, 873, 870, 862, 0, + 1771, 1051, 1005, 1771, 823, 0, 1771, 1029, 824, 1771, + 1021, 816, 871, 0, 1771, 1771, 1018, 0, 1771, 1013, + 872, 876, 0, 1036, 0, 974, 948, 917, 910, 903, + 874, 880, 875, 871, 864, 844, 835, 833, 799, 0, 884, 1771, 890, 907, 845, 618, 863, 873, 910, 911, - 914, 922, 840, 1085, 830, 935, 938, 832, 796, 791, - 801, 797, 783, 974, 753, 702, 691, 938, 942, 945, - 1771, 961, 953, 1771, 620, 616, 977, 985, 986, 990, - 991, 994, 598, 433, 998, 417, 1006, 388, 1771, 972, - 977, 985, 386, 1015, 1018, 1023, 1026, 1027, 1031, 371, + 914, 922, 799, 1085, 795, 935, 938, 796, 786, 747, + 702, 695, 614, 974, 610, 598, 428, 938, 942, 945, + 1771, 961, 953, 1771, 406, 395, 977, 985, 986, 990, + 991, 994, 385, 372, 998, 365, 1006, 247, 1771, 972, + 977, 985, 241, 1015, 1018, 1023, 1026, 1027, 1031, 153, - 1048, 1049, 359, 1771, 255, 1056, 1057, 1060, 1061, 1064, - 0, 1065, 234, 1068, 153, 61, 9, 1069, 1072, 1771, - 1134, 1151, 1168, 1185, 1202, 1219, 1236, 1253, 1270, 1287, - 1304, 1321, 1338, 1351, 1353, 1370, 1387, 1404, 1421, 1438, - 1455, 1472, 1489, 1500, 1517, 1534, 1540, 1557, 1574, 1591, - 1597, 1614, 1631, 1648, 1654, 1660, 1677, 1694, 1702, 1719, - 1736, 1063, 1753 + 1048, 1049, 74, 1771, 22, 1056, 1057, 1060, 1061, 1064, + 0, 1065, 1068, 1771, 1134, 1151, 1168, 1185, 1202, 1219, + 1236, 1253, 1270, 1287, 1304, 1321, 1338, 1351, 1353, 1370, + 1387, 1404, 1421, 1438, 1455, 1472, 1489, 1500, 1517, 1534, + 1540, 1557, 1574, 1591, 1597, 1614, 1631, 1648, 1654, 1660, + 1677, 1694, 1702, 1719, 1736, 1059, 1753 } ; -static yyconst short int yy_def[464] = +static yyconst short int yy_def[458] = { 0, - 420, 1, 420, 3, 421, 421, 420, 7, 422, 422, - 423, 423, 424, 424, 425, 425, 420, 17, 426, 426, - 420, 21, 420, 23, 427, 427, 428, 428, 420, 29, - 420, 31, 420, 33, 429, 429, 430, 430, 420, 39, - 431, 431, 432, 432, 420, 433, 420, 420, 420, 420, - 420, 434, 435, 434, 420, 420, 420, 420, 420, 58, - 420, 420, 58, 63, 63, 63, 63, 63, 63, 63, - 436, 420, 437, 420, 420, 420, 420, 420, 420, 420, - 435, 420, 438, 420, 420, 439, 440, 420, 439, 441, - 420, 442, 420, 443, 420, 420, 420, 420, 444, 420, + 414, 1, 414, 3, 415, 415, 414, 7, 416, 416, + 417, 417, 418, 418, 419, 419, 414, 17, 420, 420, + 414, 21, 414, 23, 421, 421, 422, 422, 414, 29, + 414, 31, 414, 33, 423, 423, 424, 424, 414, 39, + 425, 425, 426, 426, 414, 427, 414, 414, 414, 414, + 414, 428, 429, 428, 414, 414, 414, 414, 414, 58, + 414, 414, 58, 63, 63, 63, 63, 63, 63, 63, + 430, 414, 431, 414, 414, 414, 414, 414, 414, 414, + 429, 414, 432, 414, 414, 433, 434, 414, 433, 435, + 414, 436, 414, 437, 414, 414, 414, 414, 438, 414, - 445, 420, 420, 420, 446, 420, 420, 420, 420, 420, - 420, 420, 420, 447, 420, 448, 420, 420, 420, 420, - 449, 450, 451, 420, 451, 420, 420, 420, 420, 420, - 452, 420, 420, 420, 420, 420, 420, 453, 420, 433, - 420, 420, 420, 420, 420, 434, 435, 454, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 435, 420, 435, 420, 420, 420, 420, 420, 455, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 456, 457, 458, 420, 420, 420, 420, 458, - 420, 420, 420, 420, 459, 459, 433, 420, 434, 420, + 439, 414, 414, 414, 440, 414, 414, 414, 414, 414, + 414, 414, 414, 441, 414, 442, 414, 414, 414, 414, + 443, 444, 445, 414, 445, 414, 414, 414, 414, 414, + 446, 414, 414, 414, 414, 414, 414, 447, 414, 427, + 414, 414, 414, 414, 414, 428, 429, 448, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 429, 414, 429, 414, 414, 414, 414, 414, 449, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 450, 451, 452, 414, 414, 414, 414, 452, + 414, 414, 414, 414, 453, 453, 427, 414, 428, 414, - 460, 435, 420, 420, 420, 420, 58, 63, 63, 63, - 63, 63, 63, 63, 63, 420, 420, 420, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 436, - 461, 420, 420, 420, 420, 420, 420, 438, 420, 420, - 420, 440, 441, 442, 443, 443, 420, 420, 420, 444, - 420, 420, 445, 420, 420, 420, 420, 420, 420, 447, - 420, 420, 448, 420, 449, 450, 451, 420, 420, 125, - 420, 420, 420, 420, 420, 420, 452, 453, 420, 420, - 420, 434, 420, 454, 420, 420, 420, 420, 420, 420, - 420, 462, 420, 420, 420, 420, 420, 420, 420, 420, + 454, 429, 414, 414, 414, 414, 58, 63, 63, 63, + 63, 63, 63, 63, 63, 414, 414, 414, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 430, + 455, 414, 414, 414, 414, 414, 414, 432, 414, 414, + 414, 434, 435, 436, 437, 437, 414, 414, 414, 438, + 414, 414, 439, 414, 414, 414, 414, 414, 414, 441, + 414, 414, 442, 414, 443, 444, 445, 414, 414, 125, + 414, 414, 414, 414, 414, 414, 446, 447, 414, 414, + 414, 428, 414, 448, 414, 414, 414, 414, 414, 414, + 414, 456, 414, 414, 414, 414, 414, 414, 414, 414, - 420, 420, 435, 420, 420, 455, 420, 420, 420, 420, - 420, 420, 420, 456, 420, 420, 420, 458, 420, 420, - 458, 420, 459, 463, 460, 63, 63, 63, 63, 63, - 63, 420, 63, 63, 63, 63, 63, 63, 63, 461, - 420, 420, 420, 420, 420, 420, 420, 420, 462, 420, - 420, 420, 435, 463, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 420, 420, 420, - 420, 420, 420, 420, 435, 63, 420, 420, 63, 63, - 63, 63, 63, 63, 420, 63, 63, 63, 420, 420, - 420, 420, 435, 63, 420, 420, 420, 420, 63, 63, + 414, 414, 429, 414, 414, 449, 414, 414, 414, 414, + 414, 414, 414, 450, 414, 414, 414, 452, 414, 414, + 452, 414, 453, 457, 454, 63, 63, 63, 63, 63, + 63, 414, 63, 63, 63, 63, 63, 63, 63, 455, + 414, 414, 414, 414, 414, 414, 414, 414, 456, 414, + 414, 414, 429, 457, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 414, 414, 414, + 414, 414, 414, 414, 429, 63, 414, 414, 63, 63, + 63, 63, 63, 63, 414, 63, 63, 63, 414, 414, + 414, 414, 429, 63, 414, 414, 414, 414, 63, 63, - 63, 420, 63, 420, 435, 420, 420, 63, 420, 63, - 435, 420, 420, 420, 420, 420, 420, 420, 420, 0, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420 + 63, 414, 63, 414, 429, 414, 414, 63, 414, 63, + 429, 414, 414, 0, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414 } ; static yyconst short int yy_nxt[1821] = @@ -511,21 +509,21 @@ static yyconst short int yy_nxt[1821] = 46, 53, 53, 53, 53, 53, 54, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 46, 55, - 198, 55, 198, 418, 56, 57, 58, 59, 60, 57, + 198, 55, 198, 411, 56, 57, 58, 59, 60, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 61, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 62, 57, 63, 63, 63, 64, 65, 63, 63, 63, 66, 67, 63, 63, 63, 68, 63, 63, 63, - 69, 70, 63, 57, 72, 72, 93, 200, 417, 93, + 69, 70, 63, 57, 72, 72, 93, 200, 410, 93, 201, 203, 204, 217, 218, 94, 73, 73, 94, 205, - 420, 205, 200, 420, 206, 201, 233, 234, 74, 74, + 414, 205, 200, 414, 206, 201, 233, 234, 74, 74, 75, 76, 77, 76, 75, 78, 75, 75, 75, 75, 75, 75, 75, 75, 79, 75, 75, 75, 80, 75, 75, 81, 81, 81, 81, 81, 82, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 75, 84, - 84, 84, 85, 85, 84, 416, 232, 88, 84, 84, + 84, 84, 85, 85, 84, 408, 232, 88, 84, 84, 88, 220, 223, 221, 224, 200, 222, 235, 201, 235, 225, 236, 237, 86, 86, 89, 91, 91, 89, 248, @@ -535,8 +533,8 @@ static yyconst short int yy_nxt[1821] = 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 95, 102, 102, 200, 103, 103, 201, 104, - 104, 240, 241, 415, 246, 105, 105, 247, 200, 251, - 252, 201, 200, 255, 256, 201, 411, 106, 106, 107, + 104, 240, 241, 405, 246, 105, 105, 247, 200, 251, + 252, 201, 200, 255, 256, 201, 403, 106, 106, 107, 108, 109, 108, 107, 107, 107, 107, 107, 107, 110, 107, 111, 112, 113, 107, 107, 107, 107, 107, 107, @@ -548,15 +546,15 @@ static yyconst short int yy_nxt[1821] = 123, 123, 123, 123, 124, 125, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 116, 127, 128, 127, - 127, 128, 127, 410, 257, 129, 257, 258, 129, 258, + 127, 128, 127, 401, 257, 129, 257, 258, 129, 258, - 173, 174, 173, 408, 173, 174, 173, 200, 261, 262, - 201, 200, 130, 175, 201, 130, 132, 175, 405, 133, - 268, 269, 134, 135, 136, 176, 137, 403, 138, 176, + 173, 174, 173, 400, 173, 174, 173, 200, 261, 262, + 201, 200, 130, 175, 201, 130, 132, 175, 399, 133, + 268, 269, 134, 135, 136, 176, 137, 394, 138, 176, 186, 271, 272, 271, 187, 275, 276, 280, 281, 273, - 139, 132, 188, 279, 133, 401, 201, 134, 135, 136, - 198, 137, 198, 138, 189, 420, 274, 285, 420, 285, - 200, 296, 297, 201, 400, 139, 140, 141, 142, 141, + 139, 132, 188, 279, 133, 393, 201, 134, 135, 136, + 198, 137, 198, 138, 189, 414, 274, 285, 414, 285, + 200, 296, 297, 201, 388, 139, 140, 141, 142, 141, 140, 143, 144, 140, 145, 140, 140, 140, 140, 140, 146, 140, 140, 140, 140, 140, 140, 147, 147, 147, 147, 147, 148, 147, 147, 147, 147, 147, 147, 147, @@ -575,9 +573,9 @@ static yyconst short int yy_nxt[1821] = 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 166, 76, 77, 76, 305, 78, 305, 190, 186, 190, 299, 300, 191, 301, 302, 177, 177, 177, - 200, 399, 188, 201, 307, 308, 310, 311, 82, 76, - 77, 76, 371, 78, 189, 309, 200, 309, 394, 201, - 312, 312, 312, 177, 177, 177, 313, 200, 313, 393, + 200, 387, 188, 201, 307, 308, 310, 311, 82, 76, + 77, 76, 371, 78, 189, 309, 200, 309, 386, 201, + 312, 312, 312, 177, 177, 177, 313, 200, 313, 384, 201, 316, 317, 371, 82, 178, 179, 180, 179, 178, 178, 178, 178, 178, 181, 181, 178, 178, 178, 182, 178, 178, 178, 178, 178, 178, 183, 183, 183, 183, @@ -585,52 +583,52 @@ static yyconst short int yy_nxt[1821] = 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 178, 50, 192, 193, 192, 50, 194, - 50, 50, 50, 50, 50, 50, 50, 388, 196, 293, - 293, 293, 50, 50, 50, 387, 200, 294, 295, 201, + 50, 50, 50, 50, 50, 50, 50, 383, 196, 293, + 293, 293, 50, 50, 50, 382, 200, 294, 295, 201, 319, 320, 321, 322, 321, 322, 200, 206, 198, 324, - 198, 294, 420, 327, 420, 420, 205, 420, 205, 295, + 198, 294, 414, 327, 414, 414, 205, 414, 205, 295, 328, 206, 50, 50, 192, 193, 192, 50, 194, 50, 50, 50, 50, 50, 50, 50, 246, 196, 332, 247, 332, 50, 50, 50, 220, 223, 221, 224, 235, 222, - 235, 386, 248, 225, 248, 341, 257, 341, 257, 258, + 235, 381, 248, 225, 248, 341, 257, 341, 257, 258, - 420, 258, 343, 420, 343, 271, 272, 271, 333, 275, - 276, 50, 207, 273, 207, 420, 334, 420, 420, 285, - 420, 285, 348, 352, 305, 309, 305, 309, 384, 383, - 274, 312, 312, 312, 382, 381, 348, 352, 380, 208, + 414, 258, 343, 414, 343, 271, 272, 271, 333, 275, + 276, 50, 207, 273, 207, 414, 334, 414, 414, 285, + 414, 285, 348, 352, 305, 309, 305, 309, 380, 379, + 274, 312, 312, 312, 376, 375, 348, 352, 367, 208, 208, 208, 209, 210, 208, 208, 208, 211, 212, 208, - 208, 208, 213, 208, 208, 208, 214, 215, 208, 420, - 289, 420, 288, 288, 289, 379, 344, 345, 370, 376, - 290, 291, 313, 321, 313, 321, 375, 322, 206, 322, + 208, 208, 213, 208, 208, 208, 214, 215, 208, 414, + 289, 414, 288, 288, 289, 366, 344, 345, 370, 365, + 290, 291, 313, 321, 313, 321, 364, 322, 206, 322, 344, 332, 370, 332, 290, 341, 371, 341, 345, 208, 208, 343, 291, 343, 208, 208, 371, 346, 347, 208, - 371, 367, 366, 208, 208, 263, 263, 365, 263, 263, - 371, 346, 263, 364, 263, 263, 263, 263, 263, 347, + 371, 363, 362, 208, 208, 263, 263, 361, 263, 263, + 371, 346, 263, 360, 263, 263, 263, 263, 263, 347, 293, 293, 293, 263, 263, 263, 350, 351, 294, 295, 368, 369, 270, 372, 373, 374, 377, 374, 377, 378, - 350, 378, 294, 363, 368, 374, 362, 372, 351, 361, + 350, 378, 294, 359, 368, 374, 358, 372, 351, 357, 295, 374, 369, 263, 282, 373, 374, 284, 282, 374, 282, 282, 389, 282, 282, 389, 282, 282, 389, 282, 282, 282, 282, 282, 282, 385, 392, 385, 377, 389, - 377, 360, 389, 389, 390, 391, 378, 395, 378, 395, + 377, 356, 389, 389, 390, 391, 378, 395, 378, 395, 392, 396, 397, 396, 397, 398, 404, 398, 390, 385, 404, 385, 282, 288, 288, 289, 391, 402, 404, 402, - 359, 290, 291, 292, 404, 358, 406, 404, 406, 395, - 357, 395, 404, 356, 396, 290, 396, 397, 398, 397, - 398, 355, 407, 291, 407, 292, 325, 325, 319, 325, + 355, 290, 291, 292, 404, 319, 406, 404, 406, 395, + 316, 395, 404, 310, 396, 290, 396, 397, 398, 397, + 398, 307, 407, 291, 407, 292, 325, 325, 353, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 409, - 402, 409, 402, 316, 325, 325, 325, 406, 407, 406, - 407, 412, 409, 412, 409, 414, 412, 414, 412, 414, - 419, 414, 419, 419, 349, 419, 349, 310, 307, 353, - 301, 280, 275, 268, 325, 325, 325, 413, 325, 325, - 325, 325, 325, 325, 325, 325, 325, 325, 261, 342, + 402, 409, 402, 301, 325, 325, 325, 406, 407, 406, + 407, 412, 409, 412, 409, 413, 412, 413, 412, 413, + 349, 413, 349, 280, 275, 268, 261, 342, 255, 251, + 249, 240, 236, 233, 325, 325, 325, 339, 325, 325, + 325, 325, 325, 325, 325, 325, 325, 325, 338, 337, - 255, 251, 249, 325, 325, 325, 240, 236, 233, 339, - 338, 337, 336, 335, 331, 330, 329, 326, 217, 229, - 228, 227, 226, 219, 203, 304, 303, 298, 287, 286, - 264, 259, 249, 325, 71, 71, 71, 71, 71, 71, + 336, 335, 331, 325, 325, 325, 330, 329, 326, 217, + 229, 228, 227, 226, 219, 203, 304, 303, 298, 287, + 286, 264, 259, 249, 414, 229, 228, 227, 226, 219, + 216, 414, 414, 325, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 87, 87, @@ -652,60 +650,60 @@ static yyconst short int yy_nxt[1821] = 75, 75, 75, 75, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 197, 420, - 229, 228, 227, 226, 197, 197, 197, 197, 219, 197, - 197, 199, 216, 420, 420, 199, 420, 199, 199, 199, - 199, 199, 199, 199, 202, 420, 202, 202, 420, 202, - 230, 230, 420, 230, 230, 230, 230, 230, 230, 230, - 420, 230, 230, 230, 230, 420, 230, 231, 231, 231, + 195, 195, 195, 195, 195, 195, 195, 195, 197, 414, + 414, 414, 414, 414, 197, 197, 197, 197, 414, 197, + 197, 199, 414, 414, 414, 199, 414, 199, 199, 199, + 199, 199, 199, 199, 202, 414, 202, 202, 414, 202, + 230, 230, 414, 230, 230, 230, 230, 230, 230, 230, + 414, 230, 230, 230, 230, 414, 230, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 238, 238, 420, 420, 238, 238, - 238, 238, 238, 238, 238, 238, 238, 238, 238, 420, + 231, 231, 231, 231, 238, 238, 414, 414, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 238, 238, 414, 238, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 242, 242, - 420, 242, 242, 420, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 420, 242, 243, 243, 420, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 420, 243, 243, - 420, 243, 244, 244, 420, 244, 244, 244, 244, 244, - 420, 244, 244, 244, 244, 244, 244, 244, 244, 245, - 245, 420, 245, 245, 245, 245, 245, 245, 245, 245, + 414, 242, 242, 414, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 414, 242, 243, 243, 414, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 414, 243, 243, + 414, 243, 244, 244, 414, 244, 244, 244, 244, 244, + 414, 244, 244, 244, 244, 244, 244, 244, 244, 245, + 245, 414, 245, 245, 245, 245, 245, 245, 245, 245, - 245, 245, 245, 245, 245, 245, 250, 420, 420, 420, - 420, 250, 420, 250, 250, 420, 250, 253, 253, 420, - 420, 253, 420, 253, 253, 253, 253, 420, 253, 253, - 253, 253, 420, 253, 254, 254, 254, 254, 254, 254, + 245, 245, 245, 245, 245, 245, 250, 414, 414, 414, + 414, 250, 414, 250, 250, 414, 250, 253, 253, 414, + 414, 253, 414, 253, 253, 253, 253, 414, 253, 253, + 253, 253, 414, 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 260, 420, 260, 260, 420, 260, 263, 263, 420, - 420, 420, 420, 263, 263, 263, 263, 420, 420, 263, - 420, 420, 420, 263, 265, 265, 420, 420, 420, 420, - 265, 265, 265, 265, 265, 265, 265, 265, 265, 420, - 265, 266, 266, 420, 420, 420, 420, 266, 266, 266, + 254, 260, 414, 260, 260, 414, 260, 263, 263, 414, + 414, 414, 414, 263, 263, 263, 263, 414, 414, 263, + 414, 414, 414, 263, 265, 265, 414, 414, 414, 414, + 265, 265, 265, 265, 265, 265, 265, 265, 265, 414, + 265, 266, 266, 414, 414, 414, 414, 266, 266, 266, - 266, 420, 266, 266, 266, 266, 420, 266, 267, 420, - 267, 267, 420, 267, 277, 277, 420, 420, 277, 420, - 420, 420, 277, 277, 420, 277, 277, 277, 277, 420, - 277, 278, 278, 420, 420, 278, 420, 420, 420, 278, - 278, 278, 278, 278, 278, 278, 420, 278, 283, 283, + 266, 414, 266, 266, 266, 266, 414, 266, 267, 414, + 267, 267, 414, 267, 277, 277, 414, 414, 277, 414, + 414, 414, 277, 277, 414, 277, 277, 277, 277, 414, + 277, 278, 278, 414, 414, 278, 414, 414, 414, 278, + 278, 278, 278, 278, 278, 278, 414, 278, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 306, 420, 306, 306, 420, - 306, 314, 420, 314, 314, 420, 314, 315, 315, 315, + 283, 283, 283, 283, 283, 306, 414, 306, 306, 414, + 306, 314, 414, 314, 314, 414, 314, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 318, 318, 420, 318, 420, 318, + 315, 315, 315, 315, 318, 318, 414, 318, 414, 318, - 318, 318, 318, 318, 420, 318, 318, 318, 318, 420, - 318, 323, 323, 323, 420, 323, 323, 323, 323, 325, - 325, 420, 325, 325, 325, 325, 325, 325, 325, 325, - 325, 325, 325, 325, 325, 325, 340, 340, 420, 340, - 340, 340, 340, 340, 420, 340, 420, 340, 340, 340, - 340, 420, 340, 354, 354, 420, 354, 354, 354, 354, + 318, 318, 318, 318, 414, 318, 318, 318, 318, 414, + 318, 323, 323, 323, 414, 323, 323, 323, 323, 325, + 325, 414, 325, 325, 325, 325, 325, 325, 325, 325, + 325, 325, 325, 325, 325, 325, 340, 340, 414, 340, + 340, 340, 340, 340, 414, 340, 414, 340, 340, 340, + 340, 414, 340, 354, 354, 414, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 45, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, + 45, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420 + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414 } ; static yyconst short int yy_chk[1821] = @@ -715,13 +713,13 @@ static yyconst short int yy_chk[1821] = 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, 2, - 47, 2, 47, 417, 2, 3, 3, 3, 3, 3, + 47, 2, 47, 405, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 5, 6, 15, 52, 416, 16, + 3, 3, 3, 3, 5, 6, 15, 52, 403, 16, 52, 54, 54, 62, 62, 15, 5, 6, 16, 55, 54, 55, 61, 54, 55, 61, 74, 74, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, @@ -729,7 +727,7 @@ static yyconst short int yy_chk[1821] = 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, - 10, 11, 9, 10, 12, 415, 73, 11, 13, 14, + 10, 11, 9, 10, 12, 400, 73, 11, 13, 14, 12, 65, 66, 65, 66, 73, 65, 76, 73, 76, 66, 82, 82, 9, 10, 11, 13, 14, 12, 96, @@ -739,8 +737,8 @@ static yyconst short int yy_chk[1821] = 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 20, 79, 19, 20, 79, 19, - 20, 86, 86, 413, 94, 19, 20, 94, 98, 100, - 100, 98, 105, 106, 106, 105, 405, 19, 20, 21, + 20, 86, 86, 393, 94, 19, 20, 94, 98, 100, + 100, 98, 105, 106, 106, 105, 388, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, @@ -752,15 +750,15 @@ static yyconst short int yy_chk[1821] = 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, - 26, 26, 26, 403, 108, 25, 108, 110, 26, 110, + 26, 26, 26, 386, 108, 25, 108, 110, 26, 110, - 35, 35, 35, 400, 36, 36, 36, 113, 115, 115, - 113, 121, 25, 35, 121, 26, 27, 36, 393, 27, - 124, 124, 27, 27, 27, 35, 27, 388, 27, 36, + 35, 35, 35, 384, 36, 36, 36, 113, 115, 115, + 113, 121, 25, 35, 121, 26, 27, 36, 383, 27, + 124, 124, 27, 27, 27, 35, 27, 376, 27, 36, 41, 127, 127, 127, 41, 130, 130, 139, 139, 127, - 27, 28, 41, 138, 28, 386, 138, 28, 28, 28, + 27, 28, 41, 138, 28, 375, 138, 28, 28, 28, 141, 28, 141, 28, 41, 146, 127, 150, 146, 150, - 156, 159, 159, 156, 384, 28, 29, 29, 29, 29, + 156, 159, 159, 156, 367, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, @@ -779,9 +777,9 @@ static yyconst short int yy_chk[1821] = 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 37, 37, 37, 167, 37, 167, 42, 42, 42, 161, 161, 42, 163, 163, 37, 37, 37, - 169, 383, 42, 169, 171, 171, 176, 176, 37, 38, - 38, 38, 346, 38, 42, 173, 175, 173, 376, 175, - 177, 177, 177, 38, 38, 38, 179, 182, 179, 375, + 169, 366, 42, 169, 171, 171, 176, 176, 37, 38, + 38, 38, 346, 38, 42, 173, 175, 173, 365, 175, + 177, 177, 177, 38, 38, 38, 179, 182, 179, 363, 182, 184, 184, 346, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, @@ -789,127 +787,127 @@ static yyconst short int yy_chk[1821] = 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 367, 43, 158, - 158, 158, 43, 43, 43, 366, 188, 158, 158, 188, + 43, 43, 43, 43, 43, 43, 43, 362, 43, 158, + 158, 158, 43, 43, 43, 361, 188, 158, 158, 188, 189, 189, 190, 192, 190, 192, 196, 190, 198, 196, 198, 158, 199, 220, 245, 199, 205, 245, 205, 158, 220, 205, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 246, 44, 224, 246, 224, 44, 44, 44, 210, 211, 210, 211, 235, 210, - 235, 365, 248, 211, 248, 255, 257, 255, 257, 258, + 235, 360, 248, 211, 248, 255, 257, 255, 257, 258, 265, 258, 268, 265, 268, 271, 271, 271, 224, 274, 274, 44, 58, 271, 58, 278, 224, 282, 278, 285, - 282, 285, 291, 295, 305, 309, 305, 309, 363, 362, - 271, 312, 312, 312, 361, 360, 291, 295, 359, 58, + 282, 285, 291, 295, 305, 309, 305, 309, 359, 358, + 271, 312, 312, 312, 355, 353, 291, 295, 339, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 63, - 289, 63, 288, 288, 288, 358, 289, 289, 345, 355, - 288, 288, 313, 321, 313, 321, 353, 322, 321, 322, + 289, 63, 288, 288, 288, 338, 289, 289, 345, 337, + 288, 288, 313, 321, 313, 321, 336, 322, 321, 322, 289, 332, 345, 332, 288, 341, 347, 341, 289, 63, 63, 343, 288, 343, 63, 63, 348, 290, 290, 63, - 347, 339, 338, 63, 63, 125, 125, 337, 125, 125, - 348, 290, 125, 336, 125, 125, 125, 125, 125, 290, + 347, 335, 334, 63, 63, 125, 125, 333, 125, 125, + 348, 290, 125, 331, 125, 125, 125, 125, 125, 290, 293, 293, 293, 125, 125, 125, 294, 294, 293, 293, 344, 344, 125, 349, 349, 350, 356, 351, 356, 357, - 294, 357, 293, 335, 344, 352, 334, 349, 294, 333, + 294, 357, 293, 330, 344, 352, 329, 349, 294, 328, 293, 351, 344, 125, 148, 349, 350, 148, 148, 352, 148, 148, 368, 148, 148, 369, 148, 148, 370, 148, 148, 148, 148, 148, 148, 364, 373, 364, 377, 369, - 377, 331, 370, 368, 372, 372, 378, 379, 378, 379, + 377, 327, 370, 368, 372, 372, 378, 379, 378, 379, 373, 380, 381, 380, 381, 382, 390, 382, 372, 385, 391, 385, 148, 157, 157, 157, 372, 387, 392, 387, - 330, 157, 157, 157, 391, 329, 394, 390, 394, 395, - 328, 395, 392, 327, 396, 157, 396, 397, 398, 397, - 398, 326, 399, 157, 399, 157, 324, 324, 320, 324, + 326, 157, 157, 157, 391, 320, 394, 390, 394, 395, + 317, 395, 392, 311, 396, 157, 396, 397, 398, 397, + 398, 308, 399, 157, 399, 157, 324, 324, 303, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 401, - 402, 401, 402, 317, 324, 324, 324, 406, 407, 406, - 407, 408, 409, 408, 409, 410, 412, 410, 412, 414, - 418, 414, 418, 419, 462, 419, 462, 311, 308, 303, - 302, 281, 276, 269, 324, 354, 354, 408, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 262, 259, + 402, 401, 402, 302, 324, 324, 324, 406, 407, 406, + 407, 408, 409, 408, 409, 410, 412, 410, 412, 413, + 456, 413, 456, 281, 276, 269, 262, 259, 256, 252, + 250, 241, 237, 234, 324, 354, 354, 229, 354, 354, + 354, 354, 354, 354, 354, 354, 354, 354, 228, 227, - 256, 252, 250, 354, 354, 354, 241, 237, 234, 229, - 228, 227, 226, 225, 223, 222, 221, 219, 218, 215, - 214, 213, 212, 209, 204, 165, 164, 160, 154, 152, - 119, 112, 99, 354, 421, 421, 421, 421, 421, 421, + 226, 225, 223, 354, 354, 354, 222, 221, 219, 218, + 215, 214, 213, 212, 209, 204, 165, 164, 160, 154, + 152, 119, 112, 99, 89, 70, 69, 68, 67, 64, + 60, 45, 0, 354, 415, 415, 415, 415, 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, 416, 416, 416, 416, 417, 417, + 417, 417, 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, 418, 418, + + 418, 418, 419, 419, 419, 419, 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, 420, 420, 420, 420, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, - 421, 422, 422, 422, 422, 422, 422, 422, 422, 422, - 422, 422, 422, 422, 422, 422, 422, 422, 423, 423, + 421, 421, 421, 422, 422, 422, 422, 422, 422, 422, + 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 424, 424, 424, 424, 424, + 423, 423, 423, 423, 423, 423, 423, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 425, 425, 425, 425, 425, 425, 425, 425, - 425, 425, 425, 425, 425, 425, 425, 425, 425, 426, - 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, - 426, 426, 426, 426, 426, 426, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, - 429, 429, 429, 429, 429, 429, 429, 430, 430, 430, - 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, - - 430, 430, 430, 430, 431, 431, 431, 431, 431, 431, + 424, 424, 424, 424, 425, 425, 425, 425, 425, 425, + 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, + 425, 426, 426, 426, 426, 426, 426, 426, 426, 426, + 426, 426, 426, 426, 426, 426, 426, 426, 427, 0, + 0, 0, 0, 0, 427, 427, 427, 427, 0, 427, + 427, 428, 0, 0, 0, 428, 0, 428, 428, 428, + 428, 428, 428, 428, 429, 0, 429, 429, 0, 429, + 430, 430, 0, 430, 430, 430, 430, 430, 430, 430, + 0, 430, 430, 430, 430, 0, 430, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, - 431, 432, 432, 432, 432, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, 433, 89, - 70, 69, 68, 67, 433, 433, 433, 433, 64, 433, - 433, 434, 60, 45, 0, 434, 0, 434, 434, 434, - 434, 434, 434, 434, 435, 0, 435, 435, 0, 435, - 436, 436, 0, 436, 436, 436, 436, 436, 436, 436, - 0, 436, 436, 436, 436, 0, 436, 437, 437, 437, - 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, - 437, 437, 437, 437, 438, 438, 0, 0, 438, 438, - 438, 438, 438, 438, 438, 438, 438, 438, 438, 0, - 438, 439, 439, 439, 439, 439, 439, 439, 439, 439, - 439, 439, 439, 439, 439, 439, 439, 439, 440, 440, - 0, 440, 440, 0, 440, 440, 440, 440, 440, 440, - 440, 440, 440, 0, 440, 441, 441, 0, 441, 441, - 441, 441, 441, 441, 441, 441, 441, 0, 441, 441, - 0, 441, 442, 442, 0, 442, 442, 442, 442, 442, - 0, 442, 442, 442, 442, 442, 442, 442, 442, 443, - 443, 0, 443, 443, 443, 443, 443, 443, 443, 443, + 431, 431, 431, 431, 432, 432, 0, 0, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, 432, 0, + 432, 433, 433, 433, 433, 433, 433, 433, 433, 433, + 433, 433, 433, 433, 433, 433, 433, 433, 434, 434, + 0, 434, 434, 0, 434, 434, 434, 434, 434, 434, + 434, 434, 434, 0, 434, 435, 435, 0, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 0, 435, 435, + 0, 435, 436, 436, 0, 436, 436, 436, 436, 436, + 0, 436, 436, 436, 436, 436, 436, 436, 436, 437, + 437, 0, 437, 437, 437, 437, 437, 437, 437, 437, - 443, 443, 443, 443, 443, 443, 444, 0, 0, 0, - 0, 444, 0, 444, 444, 0, 444, 445, 445, 0, - 0, 445, 0, 445, 445, 445, 445, 0, 445, 445, - 445, 445, 0, 445, 446, 446, 446, 446, 446, 446, - 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, - 446, 447, 0, 447, 447, 0, 447, 448, 448, 0, - 0, 0, 0, 448, 448, 448, 448, 0, 0, 448, - 0, 0, 0, 448, 449, 449, 0, 0, 0, 0, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 0, - 449, 450, 450, 0, 0, 0, 0, 450, 450, 450, + 437, 437, 437, 437, 437, 437, 438, 0, 0, 0, + 0, 438, 0, 438, 438, 0, 438, 439, 439, 0, + 0, 439, 0, 439, 439, 439, 439, 0, 439, 439, + 439, 439, 0, 439, 440, 440, 440, 440, 440, 440, + 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, + 440, 441, 0, 441, 441, 0, 441, 442, 442, 0, + 0, 0, 0, 442, 442, 442, 442, 0, 0, 442, + 0, 0, 0, 442, 443, 443, 0, 0, 0, 0, + 443, 443, 443, 443, 443, 443, 443, 443, 443, 0, + 443, 444, 444, 0, 0, 0, 0, 444, 444, 444, - 450, 0, 450, 450, 450, 450, 0, 450, 451, 0, - 451, 451, 0, 451, 452, 452, 0, 0, 452, 0, - 0, 0, 452, 452, 0, 452, 452, 452, 452, 0, - 452, 453, 453, 0, 0, 453, 0, 0, 0, 453, - 453, 453, 453, 453, 453, 453, 0, 453, 454, 454, - 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, - 454, 454, 454, 454, 454, 455, 0, 455, 455, 0, - 455, 456, 0, 456, 456, 0, 456, 457, 457, 457, + 444, 0, 444, 444, 444, 444, 0, 444, 445, 0, + 445, 445, 0, 445, 446, 446, 0, 0, 446, 0, + 0, 0, 446, 446, 0, 446, 446, 446, 446, 0, + 446, 447, 447, 0, 0, 447, 0, 0, 0, 447, + 447, 447, 447, 447, 447, 447, 0, 447, 448, 448, + 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 448, 448, 449, 0, 449, 449, 0, + 449, 450, 0, 450, 450, 0, 450, 451, 451, 451, + 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, + 451, 451, 451, 451, 452, 452, 0, 452, 0, 452, + + 452, 452, 452, 452, 0, 452, 452, 452, 452, 0, + 452, 453, 453, 453, 0, 453, 453, 453, 453, 454, + 454, 0, 454, 454, 454, 454, 454, 454, 454, 454, + 454, 454, 454, 454, 454, 454, 455, 455, 0, 455, + 455, 455, 455, 455, 0, 455, 0, 455, 455, 455, + 455, 0, 455, 457, 457, 0, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - 457, 457, 457, 457, 458, 458, 0, 458, 0, 458, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, - 458, 458, 458, 458, 0, 458, 458, 458, 458, 0, - 458, 459, 459, 459, 0, 459, 459, 459, 459, 460, - 460, 0, 460, 460, 460, 460, 460, 460, 460, 460, - 460, 460, 460, 460, 460, 460, 461, 461, 0, 461, - 461, 461, 461, 461, 0, 461, 0, 461, 461, 461, - 461, 0, 461, 463, 463, 0, 463, 463, 463, 463, - 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420 + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 414, 414, 414 } ; static yy_state_type yy_last_accepting_state; @@ -923,7 +921,7 @@ static char *yy_last_accepting_cpos; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "tools/wpp/ppl.l" +#line 1 "tools\\wpp_new\\ppl.l" #define INITIAL 0 /* -*-C-*- * Wrc preprocessor lexical analysis @@ -942,7 +940,7 @@ char *yytext; * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * History: * 24-Apr-2000 BS - Started from scratch to restructure everything @@ -965,8 +963,6 @@ char *yytext; * | {ws} # {ws} endif {ws} \n * | {ws} # {ws} include {ws} < {anytext} > \n * | {ws} # {ws} include {ws} " {anytext} " \n - * | {ws} # {ws} include_next {ws} < {anytext} > \n - * | {ws} # {ws} include_next {ws} " {anytext} " \n * | {ws} # {ws} define {ws} {anytext} \n * | {ws} # {ws} define( {arglist} ) {ws} {expansion} \n * | {ws} # {ws} pragma {ws} {anytext} \n @@ -1097,7 +1093,8 @@ char *yytext; #define RCINCL 21 -#line 161 "tools/wpp/ppl.l" +#line 159 "tools\\wpp_new\\ppl.l" +#include #include #include #include @@ -1122,7 +1119,7 @@ char *yytext; /* * Always update the current character position within a line */ -#define YY_USER_ACTION pp_status.char_number+=ppleng; +#define YY_USER_ACTION pp_status.char_number+=ppy_leng; /* * Buffer management for includes and expansions @@ -1233,7 +1230,7 @@ includelogicentry_t *pp_includelogiclist = NULL; * The scanner starts here ************************************************************************** */ -#line 1237 "tools/wpp/lex.yy.c" +#line 1234 "tools\\wpp_new\\lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1384,10 +1381,10 @@ YY_MALLOC_DECL YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp = NULL, *yy_bp = NULL; + register char *yy_cp, *yy_bp; register int yy_act; -#line 299 "tools/wpp/ppl.l" +#line 298 "tools\\wpp_new\\ppl.l" /* * Catch line-continuations. @@ -1401,7 +1398,7 @@ YY_DECL /* * Detect the leading # of a preprocessor directive. */ -#line 1405 "tools/wpp/lex.yy.c" +#line 1402 "tools\\wpp_new\\lex.yy.c" if ( yy_init ) { @@ -1453,7 +1450,7 @@ 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 >= 421 ) + if ( yy_current_state >= 415 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1487,7 +1484,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 312 "tools/wpp/ppl.l" +#line 311 "tools\\wpp_new\\ppl.l" pp_incl_state.seen_junk++; yy_push_state(pp_pp); YY_BREAK /* @@ -1495,168 +1492,163 @@ pp_incl_state.seen_junk++; yy_push_state(pp_pp); */ case 2: YY_RULE_SETUP -#line 317 "tools/wpp/ppl.l" +#line 316 "tools\\wpp_new\\ppl.l" if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE;} else {yy_pp_state(pp_eol);} YY_BREAK case 3: YY_RULE_SETUP -#line 318 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE_NEXT;} else {yy_pp_state(pp_eol);} +#line 317 "tools\\wpp_new\\ppl.l" +yy_pp_state(yy_current_state() != pp_ignore ? pp_def : pp_eol); YY_BREAK case 4: YY_RULE_SETUP -#line 319 "tools/wpp/ppl.l" -yy_pp_state(yy_current_state() != pp_ignore ? pp_def : pp_eol); +#line 318 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tERROR; YY_BREAK case 5: YY_RULE_SETUP -#line 320 "tools/wpp/ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tERROR; +#line 319 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tWARNING; YY_BREAK case 6: YY_RULE_SETUP -#line 321 "tools/wpp/ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tWARNING; +#line 320 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPRAGMA; YY_BREAK case 7: YY_RULE_SETUP -#line 322 "tools/wpp/ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPRAGMA; +#line 321 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPPIDENT; YY_BREAK case 8: YY_RULE_SETUP -#line 323 "tools/wpp/ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPPIDENT; +#line 322 "tools\\wpp_new\\ppl.l" +if(yy_top_state() != pp_ignore) {yy_pp_state(pp_ifd); return tUNDEF;} else {yy_pp_state(pp_eol);} YY_BREAK case 9: YY_RULE_SETUP -#line 324 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_ifd); return tUNDEF;} else {yy_pp_state(pp_eol);} +#line 323 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_ifd); return tIFDEF; YY_BREAK case 10: YY_RULE_SETUP -#line 325 "tools/wpp/ppl.l" -yy_pp_state(pp_ifd); return tIFDEF; +#line 324 "tools\\wpp_new\\ppl.l" +pp_incl_state.seen_junk--; yy_pp_state(pp_ifd); return tIFNDEF; YY_BREAK case 11: YY_RULE_SETUP -#line 326 "tools/wpp/ppl.l" -pp_incl_state.seen_junk--; yy_pp_state(pp_ifd); return tIFNDEF; +#line 325 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_if); return tIF; YY_BREAK case 12: YY_RULE_SETUP -#line 327 "tools/wpp/ppl.l" -yy_pp_state(pp_if); return tIF; +#line 326 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_if); return tELIF; YY_BREAK case 13: YY_RULE_SETUP -#line 328 "tools/wpp/ppl.l" -yy_pp_state(pp_if); return tELIF; +#line 327 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_endif); return tELSE; YY_BREAK case 14: YY_RULE_SETUP -#line 329 "tools/wpp/ppl.l" -yy_pp_state(pp_endif); return tELSE; +#line 328 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_endif); return tENDIF; YY_BREAK case 15: YY_RULE_SETUP -#line 330 "tools/wpp/ppl.l" -yy_pp_state(pp_endif); return tENDIF; +#line 329 "tools\\wpp_new\\ppl.l" +if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);} YY_BREAK case 16: YY_RULE_SETUP -#line 331 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);} +#line 330 "tools\\wpp_new\\ppl.l" +if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);} YY_BREAK case 17: YY_RULE_SETUP -#line 332 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);} +#line 331 "tools\\wpp_new\\ppl.l" +ppy_error("Invalid preprocessor token '%s'", ppy_text); YY_BREAK case 18: YY_RULE_SETUP -#line 333 "tools/wpp/ppl.l" -pperror("Invalid preprocessor token '%s'", pptext); +#line 332 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; /* This could be the null-token */ YY_BREAK case 19: YY_RULE_SETUP -#line 334 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; /* This could be the null-token */ +#line 333 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 20: YY_RULE_SETUP -#line 335 "tools/wpp/ppl.l" -newline(0); +#line 334 "tools\\wpp_new\\ppl.l" +ppy_error("Preprocessor junk '%s'", ppy_text); YY_BREAK case 21: YY_RULE_SETUP -#line 336 "tools/wpp/ppl.l" -pperror("Preprocessor junk '%s'", pptext); - YY_BREAK -case 22: -YY_RULE_SETUP -#line 337 "tools/wpp/ppl.l" -return *pptext; +#line 335 "tools\\wpp_new\\ppl.l" +return *ppy_text; YY_BREAK /* * Handle #include and #line */ +case 22: +YY_RULE_SETUP +#line 340 "tools\\wpp_new\\ppl.l" +return make_number(10, &ppy_lval, ppy_text, ppy_leng); + YY_BREAK case 23: YY_RULE_SETUP -#line 342 "tools/wpp/ppl.l" -return make_number(10, &pplval, pptext, ppleng); +#line 341 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_iqs); YY_BREAK case 24: YY_RULE_SETUP -#line 343 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_iqs); +#line 342 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); YY_BREAK case 25: YY_RULE_SETUP -#line 344 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +#line 343 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 26: YY_RULE_SETUP -#line 345 "tools/wpp/ppl.l" -; +#line 344 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; YY_BREAK case 27: YY_RULE_SETUP -#line 346 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; +#line 345 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 28: YY_RULE_SETUP -#line 347 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 29: -YY_RULE_SETUP -#line 348 "tools/wpp/ppl.l" -pperror(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line"); +#line 346 "tools\\wpp_new\\ppl.l" +ppy_error(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line"); YY_BREAK /* * Ignore all input when a false clause is parsed */ +case 29: +YY_RULE_SETUP +#line 351 "tools\\wpp_new\\ppl.l" +; + YY_BREAK case 30: YY_RULE_SETUP -#line 353 "tools/wpp/ppl.l" -; +#line 352 "tools\\wpp_new\\ppl.l" +newline(1); YY_BREAK case 31: YY_RULE_SETUP -#line 354 "tools/wpp/ppl.l" -newline(1); +#line 353 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 32: YY_RULE_SETUP -#line 355 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 33: -YY_RULE_SETUP -#line 356 "tools/wpp/ppl.l" +#line 354 "tools\\wpp_new\\ppl.l" ; YY_BREAK /* @@ -1665,192 +1657,192 @@ YY_RULE_SETUP * want to jam the scanner normally when we see these tokens. * Note: tIDENT is handled below. */ +case 33: +YY_RULE_SETUP +#line 363 "tools\\wpp_new\\ppl.l" +return make_number(8, &ppy_lval, ppy_text, ppy_leng); + YY_BREAK case 34: YY_RULE_SETUP -#line 365 "tools/wpp/ppl.l" -return make_number(8, &pplval, pptext, ppleng); +#line 364 "tools\\wpp_new\\ppl.l" +ppy_error("Invalid octal digit"); YY_BREAK case 35: YY_RULE_SETUP -#line 366 "tools/wpp/ppl.l" -pperror("Invalid octal digit"); +#line 365 "tools\\wpp_new\\ppl.l" +return make_number(10, &ppy_lval, ppy_text, ppy_leng); YY_BREAK case 36: YY_RULE_SETUP -#line 367 "tools/wpp/ppl.l" -return make_number(10, &pplval, pptext, ppleng); +#line 366 "tools\\wpp_new\\ppl.l" +return make_number(16, &ppy_lval, ppy_text, ppy_leng); YY_BREAK case 37: YY_RULE_SETUP -#line 368 "tools/wpp/ppl.l" -return make_number(16, &pplval, pptext, ppleng); +#line 367 "tools\\wpp_new\\ppl.l" +ppy_error("Invalid hex number"); YY_BREAK case 38: YY_RULE_SETUP -#line 369 "tools/wpp/ppl.l" -pperror("Invalid hex number"); +#line 368 "tools\\wpp_new\\ppl.l" +yy_push_state(pp_defined); return tDEFINED; YY_BREAK case 39: YY_RULE_SETUP -#line 370 "tools/wpp/ppl.l" -yy_push_state(pp_defined); return tDEFINED; +#line 369 "tools\\wpp_new\\ppl.l" +return tLSHIFT; YY_BREAK case 40: YY_RULE_SETUP -#line 371 "tools/wpp/ppl.l" -return tLSHIFT; +#line 370 "tools\\wpp_new\\ppl.l" +return tRSHIFT; YY_BREAK case 41: YY_RULE_SETUP -#line 372 "tools/wpp/ppl.l" -return tRSHIFT; +#line 371 "tools\\wpp_new\\ppl.l" +return tLOGAND; YY_BREAK case 42: YY_RULE_SETUP -#line 373 "tools/wpp/ppl.l" -return tLOGAND; +#line 372 "tools\\wpp_new\\ppl.l" +return tLOGOR; YY_BREAK case 43: YY_RULE_SETUP -#line 374 "tools/wpp/ppl.l" -return tLOGOR; +#line 373 "tools\\wpp_new\\ppl.l" +return tEQ; YY_BREAK case 44: YY_RULE_SETUP -#line 375 "tools/wpp/ppl.l" -return tEQ; +#line 374 "tools\\wpp_new\\ppl.l" +return tNE; YY_BREAK case 45: YY_RULE_SETUP -#line 376 "tools/wpp/ppl.l" -return tNE; +#line 375 "tools\\wpp_new\\ppl.l" +return tLTE; YY_BREAK case 46: YY_RULE_SETUP -#line 377 "tools/wpp/ppl.l" -return tLTE; +#line 376 "tools\\wpp_new\\ppl.l" +return tGTE; YY_BREAK case 47: YY_RULE_SETUP -#line 378 "tools/wpp/ppl.l" -return tGTE; +#line 377 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; YY_BREAK case 48: YY_RULE_SETUP -#line 379 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; +#line 378 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 49: YY_RULE_SETUP -#line 380 "tools/wpp/ppl.l" -newline(0); +#line 379 "tools\\wpp_new\\ppl.l" +ppy_error("Junk in conditional expression"); YY_BREAK case 50: YY_RULE_SETUP -#line 381 "tools/wpp/ppl.l" -pperror("Junk in conditional expression"); +#line 380 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 51: YY_RULE_SETUP -#line 382 "tools/wpp/ppl.l" -; +#line 381 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); YY_BREAK case 52: YY_RULE_SETUP -#line 383 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); +#line 382 "tools\\wpp_new\\ppl.l" +ppy_error("String constants not allowed in conditionals"); YY_BREAK case 53: YY_RULE_SETUP -#line 384 "tools/wpp/ppl.l" -pperror("String constants not allowed in conditionals"); - YY_BREAK -case 54: -YY_RULE_SETUP -#line 385 "tools/wpp/ppl.l" -return *pptext; +#line 383 "tools\\wpp_new\\ppl.l" +return *ppy_text; YY_BREAK /* * Handle #ifdef, #ifndef and #undef * to get only an untranslated/unexpanded identifier */ +case 54: +YY_RULE_SETUP +#line 389 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; + YY_BREAK case 55: YY_RULE_SETUP -#line 391 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tIDENT; +#line 390 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 56: YY_RULE_SETUP -#line 392 "tools/wpp/ppl.l" -; +#line 391 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; YY_BREAK case 57: YY_RULE_SETUP -#line 393 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; +#line 392 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 58: YY_RULE_SETUP -#line 394 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 59: -YY_RULE_SETUP -#line 395 "tools/wpp/ppl.l" -pperror("Identifier expected"); +#line 393 "tools\\wpp_new\\ppl.l" +ppy_error("Identifier expected"); YY_BREAK /* * Handle #else and #endif. */ +case 59: +YY_RULE_SETUP +#line 398 "tools\\wpp_new\\ppl.l" +; + YY_BREAK case 60: YY_RULE_SETUP -#line 400 "tools/wpp/ppl.l" -; +#line 399 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; YY_BREAK case 61: YY_RULE_SETUP -#line 401 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; +#line 400 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 62: YY_RULE_SETUP -#line 402 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 63: -YY_RULE_SETUP -#line 403 "tools/wpp/ppl.l" -pperror("Garbage after #else or #endif."); +#line 401 "tools\\wpp_new\\ppl.l" +ppy_error("Garbage after #else or #endif."); YY_BREAK /* * Handle the special 'defined' keyword. * This is necessary to get the identifier prior to any * substitutions. */ +case 63: +YY_RULE_SETUP +#line 408 "tools\\wpp_new\\ppl.l" +yy_pop_state(); ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; + YY_BREAK case 64: YY_RULE_SETUP -#line 410 "tools/wpp/ppl.l" -yy_pop_state(); pplval.cptr = pp_xstrdup(pptext); return tIDENT; +#line 409 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 65: YY_RULE_SETUP -#line 411 "tools/wpp/ppl.l" -; +#line 410 "tools\\wpp_new\\ppl.l" +return *ppy_text; YY_BREAK case 66: YY_RULE_SETUP -#line 412 "tools/wpp/ppl.l" -return *pptext; +#line 411 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 67: YY_RULE_SETUP -#line 413 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 68: -YY_RULE_SETUP -#line 414 "tools/wpp/ppl.l" -pperror("Identifier expected"); +#line 412 "tools\\wpp_new\\ppl.l" +ppy_error("Identifier expected"); YY_BREAK /* * Handle #error, #warning, #pragma and #ident. @@ -1858,192 +1850,192 @@ pperror("Identifier expected"); * will act appropriately. * Comments are stripped from the literal text. */ +case 68: +YY_RULE_SETUP +#line 420 "tools\\wpp_new\\ppl.l" +if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } + YY_BREAK case 69: YY_RULE_SETUP -#line 422 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) { pplval.cptr = pp_xstrdup(pptext); return tLITERAL; } +#line 421 "tools\\wpp_new\\ppl.l" +if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } YY_BREAK case 70: YY_RULE_SETUP -#line 423 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) { pplval.cptr = pp_xstrdup(pptext); return tLITERAL; } +#line 422 "tools\\wpp_new\\ppl.l" +if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } YY_BREAK case 71: YY_RULE_SETUP -#line 424 "tools/wpp/ppl.l" -if(yy_top_state() != pp_ignore) { pplval.cptr = pp_xstrdup(pptext); return tLITERAL; } +#line 423 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); if(yy_current_state() != pp_ignore) { return tNL; } YY_BREAK case 72: YY_RULE_SETUP -#line 425 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); if(yy_current_state() != pp_ignore) { return tNL; } - YY_BREAK -case 73: -YY_RULE_SETUP -#line 426 "tools/wpp/ppl.l" +#line 424 "tools\\wpp_new\\ppl.l" newline(0); YY_BREAK /* * Handle left side of #define */ +case 73: +YY_RULE_SETUP +#line 429 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); ppy_lval.cptr[ppy_leng-1] = '\0'; yy_pp_state(pp_macro); return tMACRO; + YY_BREAK case 74: YY_RULE_SETUP -#line 431 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); pplval.cptr[ppleng-1] = '\0'; yy_pp_state(pp_macro); return tMACRO; +#line 430 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); yy_pp_state(pp_define); return tDEFINE; YY_BREAK case 75: YY_RULE_SETUP -#line 432 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); yy_pp_state(pp_define); return tDEFINE; +#line 431 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 76: YY_RULE_SETUP -#line 433 "tools/wpp/ppl.l" -; +#line 432 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 77: YY_RULE_SETUP -#line 434 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 78: -YY_RULE_SETUP -#line 435 "tools/wpp/ppl.l" +#line 433 "tools\\wpp_new\\ppl.l" perror("Identifier expected"); YY_BREAK /* * Scan the substitution of a define */ +case 78: +YY_RULE_SETUP +#line 438 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; + YY_BREAK case 79: YY_RULE_SETUP -#line 440 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tLITERAL; +#line 439 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; YY_BREAK case 80: YY_RULE_SETUP -#line 441 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tLITERAL; +#line 440 "tools\\wpp_new\\ppl.l" +newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; YY_BREAK case 81: YY_RULE_SETUP -#line 442 "tools/wpp/ppl.l" -newline(0); pplval.cptr = pp_xstrdup(" "); return tLITERAL; +#line 441 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 82: YY_RULE_SETUP -#line 443 "tools/wpp/ppl.l" -newline(0); +#line 442 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; YY_BREAK case 83: YY_RULE_SETUP -#line 444 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; +#line 443 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); YY_BREAK case 84: YY_RULE_SETUP -#line 445 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); - YY_BREAK -case 85: -YY_RULE_SETUP -#line 446 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +#line 444 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); YY_BREAK /* * Scan the definition macro arguments */ +case 85: +YY_RULE_SETUP +#line 449 "tools\\wpp_new\\ppl.l" +yy_pp_state(pp_mbody); return tMACROEND; + YY_BREAK case 86: YY_RULE_SETUP -#line 451 "tools/wpp/ppl.l" -yy_pp_state(pp_mbody); return tMACROEND; +#line 450 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 87: YY_RULE_SETUP -#line 452 "tools/wpp/ppl.l" -; +#line 451 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; YY_BREAK case 88: YY_RULE_SETUP -#line 453 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tIDENT; +#line 452 "tools\\wpp_new\\ppl.l" +return ','; YY_BREAK case 89: YY_RULE_SETUP -#line 454 "tools/wpp/ppl.l" -return ','; +#line 453 "tools\\wpp_new\\ppl.l" +return tELIPSIS; YY_BREAK case 90: YY_RULE_SETUP -#line 455 "tools/wpp/ppl.l" -return tELIPSIS; +#line 454 "tools\\wpp_new\\ppl.l" +ppy_error("Argument identifier expected"); YY_BREAK case 91: YY_RULE_SETUP -#line 456 "tools/wpp/ppl.l" -pperror("Argument identifier expected"); - YY_BREAK -case 92: -YY_RULE_SETUP -#line 457 "tools/wpp/ppl.l" +#line 455 "tools\\wpp_new\\ppl.l" newline(0); YY_BREAK /* * Scan the substitution of a macro */ +case 92: +YY_RULE_SETUP +#line 460 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; + YY_BREAK case 93: YY_RULE_SETUP -#line 462 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tLITERAL; +#line 461 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; YY_BREAK case 94: YY_RULE_SETUP -#line 463 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tIDENT; +#line 462 "tools\\wpp_new\\ppl.l" +return tCONCAT; YY_BREAK case 95: YY_RULE_SETUP -#line 464 "tools/wpp/ppl.l" -return tCONCAT; +#line 463 "tools\\wpp_new\\ppl.l" +return tSTRINGIZE; YY_BREAK case 96: YY_RULE_SETUP -#line 465 "tools/wpp/ppl.l" -return tSTRINGIZE; +#line 464 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; YY_BREAK case 97: YY_RULE_SETUP -#line 466 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tLITERAL; +#line 465 "tools\\wpp_new\\ppl.l" +ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; YY_BREAK case 98: YY_RULE_SETUP -#line 467 "tools/wpp/ppl.l" -pplval.cptr = pp_xstrdup(pptext); return tLITERAL; +#line 466 "tools\\wpp_new\\ppl.l" +newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; YY_BREAK case 99: YY_RULE_SETUP -#line 468 "tools/wpp/ppl.l" -newline(0); pplval.cptr = pp_xstrdup(" "); return tLITERAL; +#line 467 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 100: YY_RULE_SETUP -#line 469 "tools/wpp/ppl.l" -newline(0); +#line 468 "tools\\wpp_new\\ppl.l" +newline(1); yy_pop_state(); return tNL; YY_BREAK case 101: YY_RULE_SETUP -#line 470 "tools/wpp/ppl.l" -newline(1); yy_pop_state(); return tNL; +#line 469 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); YY_BREAK case 102: YY_RULE_SETUP -#line 471 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); - YY_BREAK -case 103: -YY_RULE_SETUP -#line 472 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +#line 470 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); YY_BREAK /* * Macro expansion text scanning. @@ -2054,35 +2046,35 @@ new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); * If we do not see a '(' as next trailing token, then we have * a false alarm. We just continue with a nose-bleed... */ -case 104: +case 103: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 483 "tools/wpp/ppl.l" +#line 481 "tools\\wpp_new\\ppl.l" yy_pp_state(pp_macscan); YY_BREAK -case 105: +case 104: YY_RULE_SETUP -#line 484 "tools/wpp/ppl.l" +#line 482 "tools\\wpp_new\\ppl.l" { if(yy_top_state() != pp_macscan) newline(0); } YY_BREAK -case 106: +case 105: YY_RULE_SETUP -#line 488 "tools/wpp/ppl.l" +#line 486 "tools\\wpp_new\\ppl.l" newline(0); YY_BREAK -case 107: +case 106: YY_RULE_SETUP -#line 489 "tools/wpp/ppl.l" +#line 487 "tools\\wpp_new\\ppl.l" { macexpstackentry_t *mac = pop_macro(); yy_pop_state(); put_buffer(mac->ppp->ident, strlen(mac->ppp->ident)); - put_buffer(pptext, ppleng); + put_buffer(ppy_text, ppy_leng); free_macro(mac); } YY_BREAK @@ -2090,17 +2082,17 @@ YY_RULE_SETUP * Macro expansion argument text scanning. * This state is active when a macro's arguments are being read for expansion. */ -case 108: +case 107: YY_RULE_SETUP -#line 501 "tools/wpp/ppl.l" +#line 499 "tools\\wpp_new\\ppl.l" { if(++MACROPARENTHESES() > 1) - add_text_to_macro(pptext, ppleng); + add_text_to_macro(ppy_text, ppy_leng); } YY_BREAK -case 109: +case 108: YY_RULE_SETUP -#line 505 "tools/wpp/ppl.l" +#line 503 "tools\\wpp_new\\ppl.l" { if(--MACROPARENTHESES() == 0) { @@ -2108,106 +2100,106 @@ YY_RULE_SETUP macro_add_arg(1); } else - add_text_to_macro(pptext, ppleng); + add_text_to_macro(ppy_text, ppy_leng); } YY_BREAK -case 110: +case 109: YY_RULE_SETUP -#line 514 "tools/wpp/ppl.l" +#line 512 "tools\\wpp_new\\ppl.l" { if(MACROPARENTHESES() > 1) - add_text_to_macro(pptext, ppleng); + add_text_to_macro(ppy_text, ppy_leng); else macro_add_arg(0); } YY_BREAK +case 110: +YY_RULE_SETUP +#line 518 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); + YY_BREAK case 111: YY_RULE_SETUP -#line 520 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +#line 519 "tools\\wpp_new\\ppl.l" +new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); YY_BREAK case 112: YY_RULE_SETUP -#line 521 "tools/wpp/ppl.l" -new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); +#line 520 "tools\\wpp_new\\ppl.l" +yy_push_state(pp_comment); add_text_to_macro(" ", 1); YY_BREAK case 113: YY_RULE_SETUP -#line 522 "tools/wpp/ppl.l" -yy_push_state(pp_comment); add_text_to_macro(" ", 1); +#line 521 "tools\\wpp_new\\ppl.l" +pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(ppy_text, ppy_leng); YY_BREAK case 114: YY_RULE_SETUP -#line 523 "tools/wpp/ppl.l" -pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(pptext, ppleng); +#line 522 "tools\\wpp_new\\ppl.l" +add_text_to_macro(ppy_text, ppy_leng); YY_BREAK case 115: YY_RULE_SETUP -#line 524 "tools/wpp/ppl.l" -add_text_to_macro(pptext, ppleng); - YY_BREAK -case 116: -YY_RULE_SETUP -#line 525 "tools/wpp/ppl.l" +#line 523 "tools\\wpp_new\\ppl.l" newline(0); YY_BREAK /* * Comment handling (almost all start-conditions) */ +case 116: +YY_RULE_SETUP +#line 528 "tools\\wpp_new\\ppl.l" +yy_push_state(pp_comment); + YY_BREAK case 117: YY_RULE_SETUP -#line 530 "tools/wpp/ppl.l" -yy_push_state(pp_comment); +#line 529 "tools\\wpp_new\\ppl.l" +; YY_BREAK case 118: YY_RULE_SETUP -#line 531 "tools/wpp/ppl.l" -; +#line 530 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 119: YY_RULE_SETUP -#line 532 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 120: -YY_RULE_SETUP -#line 533 "tools/wpp/ppl.l" +#line 531 "tools\\wpp_new\\ppl.l" yy_pop_state(); YY_BREAK /* * Remove C++ style comment (almost all start-conditions) */ -case 121: +case 120: YY_RULE_SETUP -#line 538 "tools/wpp/ppl.l" +#line 536 "tools\\wpp_new\\ppl.l" { - if(pptext[ppleng-1] == '\\') - ppwarning("C++ style comment ends with an escaped newline (escape ignored)"); + if(ppy_text[ppy_leng-1] == '\\') + ppy_warning("C++ style comment ends with an escaped newline (escape ignored)"); } YY_BREAK /* * Single, double and <> quoted constants */ +case 121: +YY_RULE_SETUP +#line 544 "tools\\wpp_new\\ppl.l" +pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); + YY_BREAK case 122: YY_RULE_SETUP -#line 546 "tools/wpp/ppl.l" -pp_incl_state.seen_junk++; new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +#line 545 "tools\\wpp_new\\ppl.l" +pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); YY_BREAK case 123: YY_RULE_SETUP -#line 547 "tools/wpp/ppl.l" -pp_incl_state.seen_junk++; new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); +#line 546 "tools\\wpp_new\\ppl.l" +add_string(ppy_text, ppy_leng); YY_BREAK case 124: YY_RULE_SETUP -#line 548 "tools/wpp/ppl.l" -add_string(pptext, ppleng); - YY_BREAK -case 125: -YY_RULE_SETUP -#line 549 "tools/wpp/ppl.l" +#line 547 "tools\\wpp_new\\ppl.l" { - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); yy_pop_state(); switch(yy_current_state()) { @@ -2217,11 +2209,11 @@ YY_RULE_SETUP case pp_inc: case RCINCL: if (yy_current_state()==RCINCL) yy_pop_state(); - pplval.cptr = get_string(); + ppy_lval.cptr = get_string(); return tDQSTRING; case pp_line: - pplval.cptr = get_string(); - if (is_c_h_include(pplval.cptr, 1)) pass_data=0; + ppy_lval.cptr = get_string(); + if (is_c_h_include(ppy_lval.cptr, 1)) pass_data=0; else pass_data=1; return tDQSTRING; default: @@ -2229,47 +2221,47 @@ YY_RULE_SETUP } } YY_BREAK +case 125: +YY_RULE_SETUP +#line 569 "tools\\wpp_new\\ppl.l" +add_string(ppy_text, ppy_leng); + YY_BREAK case 126: YY_RULE_SETUP -#line 571 "tools/wpp/ppl.l" -add_string(pptext, ppleng); - YY_BREAK -case 127: -YY_RULE_SETUP -#line 572 "tools/wpp/ppl.l" +#line 570 "tools\\wpp_new\\ppl.l" { - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); yy_pop_state(); switch(yy_current_state()) { case pp_if: case pp_define: case pp_mbody: - pplval.cptr = get_string(); + ppy_lval.cptr = get_string(); return tSQSTRING; default: put_string(); } } YY_BREAK +case 127: +YY_RULE_SETUP +#line 584 "tools\\wpp_new\\ppl.l" +add_string(ppy_text, ppy_leng); + YY_BREAK case 128: YY_RULE_SETUP -#line 586 "tools/wpp/ppl.l" -add_string(pptext, ppleng); - YY_BREAK -case 129: -YY_RULE_SETUP -#line 587 "tools/wpp/ppl.l" +#line 585 "tools\\wpp_new\\ppl.l" { - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); yy_pop_state(); - pplval.cptr = get_string(); + ppy_lval.cptr = get_string(); return tIQSTRING; } YY_BREAK -case 130: +case 129: YY_RULE_SETUP -#line 593 "tools/wpp/ppl.l" +#line 591 "tools\\wpp_new\\ppl.l" { /* * This is tricky; we need to remove the line-continuation @@ -2290,50 +2282,50 @@ YY_RULE_SETUP newline(0); break; default: - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); newline(-1); } } YY_BREAK +case 130: +YY_RULE_SETUP +#line 615 "tools\\wpp_new\\ppl.l" +add_string(ppy_text, ppy_leng); + YY_BREAK case 131: YY_RULE_SETUP -#line 617 "tools/wpp/ppl.l" -add_string(pptext, ppleng); - YY_BREAK -case 132: -YY_RULE_SETUP -#line 618 "tools/wpp/ppl.l" +#line 616 "tools\\wpp_new\\ppl.l" { newline(1); - add_string(pptext, ppleng); - ppwarning("Newline in string constant encounterd (started line %d)", string_start()); + add_string(ppy_text, ppy_leng); + ppy_warning("Newline in string constant encounterd (started line %d)", string_start()); } YY_BREAK /* * Identifier scanning */ -case 133: +case 132: YY_RULE_SETUP -#line 627 "tools/wpp/ppl.l" +#line 625 "tools\\wpp_new\\ppl.l" { pp_entry_t *ppp; pp_incl_state.seen_junk++; - if(!(ppp = pplookup(pptext))) + if(!(ppp = pplookup(ppy_text))) { if(yy_current_state() == pp_inc) - pperror("Expected include filename"); + ppy_error("Expected include filename"); if(yy_current_state() == pp_if) { - pplval.cptr = pp_xstrdup(pptext); + ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; } else { - if((yy_current_state()==INITIAL) && (strcasecmp(pptext,"RCINCLUDE")==0)){ + if((yy_current_state()==INITIAL) && (strcasecmp(ppy_text,"RCINCLUDE")==0)){ yy_push_state(RCINCL); return tRCINCLUDE; } - else put_buffer(pptext, ppleng); + else put_buffer(ppy_text, ppy_leng); } } else if(!ppp->expanding) @@ -2354,75 +2346,76 @@ YY_RULE_SETUP pp_internal_error(__FILE__, __LINE__, "Invalid define type %d\n", ppp->type); } } + else put_buffer(ppy_text, ppy_leng); } YY_BREAK /* * Everything else that needs to be passed and * newline and continuation handling */ +case 133: +YY_RULE_SETUP +#line 671 "tools\\wpp_new\\ppl.l" +pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); + YY_BREAK case 134: YY_RULE_SETUP -#line 672 "tools/wpp/ppl.l" -pp_incl_state.seen_junk++; put_buffer(pptext, ppleng); +#line 672 "tools\\wpp_new\\ppl.l" +put_buffer(ppy_text, ppy_leng); YY_BREAK case 135: YY_RULE_SETUP -#line 673 "tools/wpp/ppl.l" -put_buffer(pptext, ppleng); +#line 673 "tools\\wpp_new\\ppl.l" +newline(1); YY_BREAK case 136: YY_RULE_SETUP -#line 674 "tools/wpp/ppl.l" -newline(1); +#line 674 "tools\\wpp_new\\ppl.l" +newline(0); YY_BREAK case 137: YY_RULE_SETUP -#line 675 "tools/wpp/ppl.l" -newline(0); - YY_BREAK -case 138: -YY_RULE_SETUP -#line 676 "tools/wpp/ppl.l" -pp_incl_state.seen_junk++; put_buffer(pptext, ppleng); +#line 675 "tools\\wpp_new\\ppl.l" +pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); YY_BREAK /* * Special catcher for macro argmument expansion to prevent * newlines to propagate to the output or admin. */ +case 138: +YY_RULE_SETUP +#line 681 "tools\\wpp_new\\ppl.l" +put_buffer(ppy_text, ppy_leng); + YY_BREAK case 139: YY_RULE_SETUP -#line 682 "tools/wpp/ppl.l" -put_buffer(pptext, ppleng); - YY_BREAK -case 140: -YY_RULE_SETUP -#line 684 "tools/wpp/ppl.l" +#line 683 "tools\\wpp_new\\ppl.l" { - pplval.cptr=pp_xstrdup(pptext); + ppy_lval.cptr=pp_xstrdup(ppy_text); yy_pop_state(); return tRCINCLUDEPATH; } YY_BREAK -case 141: +case 140: YY_RULE_SETUP -#line 690 "tools/wpp/ppl.l" +#line 689 "tools\\wpp_new\\ppl.l" ; YY_BREAK -case 142: +case 141: YY_RULE_SETUP -#line 692 "tools/wpp/ppl.l" +#line 691 "tools\\wpp_new\\ppl.l" { - new_string(); add_string(pptext,ppleng);yy_push_state(pp_dqs); + new_string(); add_string(ppy_text,ppy_leng);yy_push_state(pp_dqs); } YY_BREAK /* * This is a 'catch-all' rule to discover errors in the scanner * in an orderly manner. */ -case 143: +case 142: YY_RULE_SETUP -#line 700 "tools/wpp/ppl.l" -pp_incl_state.seen_junk++; ppwarning("Unmatched text '%c' (0x%02x); please report\n", isprint(*pptext & 0xff) ? *pptext : ' ', *pptext); +#line 699 "tools\\wpp_new\\ppl.l" +pp_incl_state.seen_junk++; ppy_warning("Unmatched text '%c' (0x%02x); please report\n", isprint(*ppy_text & 0xff) ? *ppy_text : ' ', *ppy_text); YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(pp_pp): @@ -2446,18 +2439,18 @@ case YY_STATE_EOF(pp_line): case YY_STATE_EOF(pp_defined): case YY_STATE_EOF(pp_ignore): case YY_STATE_EOF(RCINCL): -#line 702 "tools/wpp/ppl.l" +#line 701 "tools\\wpp_new\\ppl.l" { YY_BUFFER_STATE b = YY_CURRENT_BUFFER; bufferstackentry_t *bep = pop_buffer(); if((!bep && pp_get_if_depth()) || (bep && pp_get_if_depth() != bep->if_depth)) - ppwarning("Unmatched #if/#endif at end of file"); + ppy_warning("Unmatched #if/#endif at end of file"); if(!bep) { if(YY_START != INITIAL) - pperror("Unexpected end of file during preprocessing"); + ppy_error("Unexpected end of file during preprocessing"); yyterminate(); } else if(bep->should_pop == 2) @@ -2466,15 +2459,15 @@ case YY_STATE_EOF(RCINCL): mac = pop_macro(); expand_macro(mac); } - pp_delete_buffer(b); + ppy__delete_buffer(b); } YY_BREAK -case 144: +case 143: YY_RULE_SETUP -#line 724 "tools/wpp/ppl.l" +#line 723 "tools\\wpp_new\\ppl.l" ECHO; YY_BREAK -#line 2478 "tools/wpp/lex.yy.c" +#line 2471 "tools\\wpp_new\\lex.yy.c" case YY_END_OF_BUFFER: { @@ -2765,7 +2758,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 >= 421 ) + if ( yy_current_state >= 415 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2800,11 +2793,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 >= 421 ) + if ( yy_current_state >= 415 ) 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 == 420); + yy_is_jam = (yy_current_state == 414); return yy_is_jam ? 0 : yy_current_state; } @@ -2855,7 +2848,6 @@ register char *yy_bp; #endif /* ifndef YY_NO_UNPUT */ -#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -2928,7 +2920,7 @@ static int input() return c; } -#endif /* YY_NO_INPUT */ + #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) @@ -3039,6 +3031,11 @@ YY_BUFFER_STATE b; } +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) @@ -3356,7 +3353,7 @@ int main() return 0; } #endif -#line 724 "tools/wpp/ppl.l" +#line 723 "tools\\wpp_new\\ppl.l" /* ************************************************************************** @@ -3364,8 +3361,8 @@ int main() ************************************************************************** */ -#ifndef ppwrap -int ppwrap(void) +#ifndef ppy_wrap +int ppy_wrap(void) { return 1; } @@ -3435,7 +3432,7 @@ static int make_number(int radix, YYSTYPE *val, const char *str, int len) ext[0] = len > 2 ? toupper(str[len-3]) : ' '; if(!strcmp(ext, "LUL")) - pperror("Invalid constant suffix"); + ppy_error("Invalid constant suffix"); else if(!strcmp(ext, "LLU") || !strcmp(ext, "ULL")) { is_ll++; @@ -3460,9 +3457,24 @@ static int make_number(int radix, YYSTYPE *val, const char *str, int len) } if(is_ll) - pp_internal_error(__FILE__, __LINE__, "long long constants not implemented yet"); - - if(is_u && is_l) + { +/* Assume as in the declaration of wrc_ull_t and wrc_sll_t */ +#ifdef HAVE_LONG_LONG + if (is_u) + { + val->ull = strtoull(str, NULL, radix); + return tULONGLONG; + } + else + { + val->sll = strtoll(str, NULL, radix); + return tSLONGLONG; + } +#else + pp_internal_error(__FILE__, __LINE__, "long long constants not supported on this platform"); +#endif + } + else if(is_u && is_l) { val->ulong = strtoul(str, NULL, radix); return tULONG; @@ -3559,7 +3571,7 @@ static void add_text(const char *str, int len) curdef_alloc += (len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1); curdef_text = pp_xrealloc(curdef_text, curdef_alloc * sizeof(curdef_text[0])); if(curdef_alloc > 65536) - ppwarning("Reallocating macro-expansion buffer larger than 64kB"); + ppy_warning("Reallocating macro-expansion buffer larger than 64kB"); } memcpy(&curdef_text[curdef_idx], str, len); curdef_idx += len; @@ -3675,7 +3687,7 @@ static void expand_macro(macexpstackentry_t *mep) assert(ppp->expanding == 0); if((ppp->nargs >= 0 && nargs != ppp->nargs) || (ppp->nargs < 0 && nargs < -ppp->nargs)) - pperror("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs); + ppy_error("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs); for(n = 0; n < nargs; n++) nnl += mep->nnls[n]; @@ -3744,7 +3756,7 @@ static void new_string(void) { #ifdef DEBUG if(strbuf_idx) - ppwarning("new_string: strbuf_idx != 0"); + ppy_warning("new_string: strbuf_idx != 0"); #endif strbuf_idx = 0; str_startline = pp_status.line_number; @@ -3759,7 +3771,7 @@ static void add_string(const char *str, int len) strbuf_alloc += (len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1); strbuffer = pp_xrealloc(strbuffer, strbuf_alloc * sizeof(strbuffer[0])); if(strbuf_alloc > 65536) - ppwarning("Reallocating string buffer larger than 64kB"); + ppy_warning("Reallocating string buffer larger than 64kB"); } memcpy(&strbuffer[strbuf_idx], str, len); strbuf_idx += len; @@ -3797,7 +3809,7 @@ static int string_start(void) */ static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop) { - if(ppdebug) + if(ppy_debug) printf("push_buffer(%d): %p %p %p %d\n", bufferstackidx, ppp, filename, incname, pop); if(bufferstackidx >= MAXBUFFERSTACK) pp_internal_error(__FILE__, __LINE__, "Buffer stack overflow"); @@ -3819,7 +3831,7 @@ static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop) ppp->expanding = 1; else if(filename) { - /* These will track the pperror to the correct file and line */ + /* These will track the ppy_error to the correct file and line */ pp_status.line_number = 1; pp_status.char_number = 1; pp_status.input = filename; @@ -3850,8 +3862,8 @@ static bufferstackentry_t *pop_buffer(void) ncontinuations = bufferstack[bufferstackidx].ncontinuations; if(!bufferstack[bufferstackidx].should_pop) { - fclose(ppin); - fprintf(ppout, "# %d \"%s\" 2\n", pp_status.line_number, pp_status.input); + fclose(ppy_in); + fprintf(ppy_out, "# %d \"%s\" 2\n", pp_status.line_number, pp_status.input); /* We have EOF, check the include logic */ if(pp_incl_state.state == 2 && !pp_incl_state.seen_junk && pp_incl_state.ppp) @@ -3871,18 +3883,17 @@ static bufferstackentry_t *pop_buffer(void) if(pp_status.debug) fprintf(stderr, "pop_buffer: %s:%d: includelogic added, include_ppp='%s', file='%s'\n", pp_status.input, pp_status.line_number, pp_incl_state.ppp, iep->filename); } - else if(bufferstack[bufferstackidx].include_filename) + else free(bufferstack[bufferstackidx].include_filename); } - if(pp_incl_state.ppp) - free(pp_incl_state.ppp); + free(pp_incl_state.ppp); pp_incl_state = bufferstack[bufferstackidx].incl; pass_data = bufferstack[bufferstackidx].pass_data; } } - if(ppdebug) + if(ppy_debug) printf("pop_buffer(%d): %p %p (%d, %d, %d) %p %d\n", bufferstackidx, bufferstack[bufferstackidx].bufferstate, @@ -3893,7 +3904,7 @@ static bufferstackentry_t *pop_buffer(void) bufferstack[bufferstackidx].filename, bufferstack[bufferstackidx].should_pop); - pp_switch_to_buffer(bufferstack[bufferstackidx].bufferstate); + ppy__switch_to_buffer(bufferstack[bufferstackidx].bufferstate); if(bufferstack[bufferstackidx].should_pop) { @@ -3916,7 +3927,7 @@ static bufferstackentry_t *pop_buffer(void) static void push_macro(pp_entry_t *ppp) { if(macexpstackidx >= MAXMACEXPSTACK) - pperror("Too many nested macros"); + ppy_error("Too many nested macros"); macexpstack[macexpstackidx] = pp_xmalloc(sizeof(macexpstack[0][0])); memset( macexpstack[macexpstackidx], 0, sizeof(macexpstack[0][0])); @@ -3942,12 +3953,9 @@ static void free_macro(macexpstackentry_t *mep) for(i = 0; i < mep->nargs; i++) free(mep->args[i]); - if(mep->args) - free(mep->args); - if(mep->nnls) - free(mep->nnls); - if(mep->curarg) - free(mep->curarg); + free(mep->args); + free(mep->nnls); + free(mep->curarg); free(mep); } @@ -4038,7 +4046,7 @@ static void put_buffer(const char *s, int len) add_text_to_macro(s, len); else { if(pass_data) - fwrite(s, 1, len, ppout); + fwrite(s, 1, len, ppy_out); } } @@ -4079,13 +4087,13 @@ void pp_do_include(char *fname, int type) n = strlen(fname); if(n <= 2) - pperror("Empty include filename"); + ppy_error("Empty include filename"); /* Undo the effect of the quotation */ fname[n-1] = '\0'; - if((ppin = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath, type)) == NULL) - pperror("Unable to open include file %s", fname+1); + if((ppy_in = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL) + ppy_error("Unable to open include file %s", fname+1); fname[n-1] = *fname; /* Redo the quotes */ push_buffer(NULL, newpath, fname, 0); @@ -4098,9 +4106,9 @@ void pp_do_include(char *fname, int type) if(pp_status.debug) fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d ,pass_data=%d\n", pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth, pass_data); - pp_switch_to_buffer(pp_create_buffer(ppin, YY_BUF_SIZE)); + ppy__switch_to_buffer(ppy__create_buffer(ppy_in, YY_BUF_SIZE)); - fprintf(ppout, "# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); + fprintf(ppy_out, "# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); } /* diff --git a/reactos/tools/wpp/ppl.l b/reactos/tools/wpp/ppl.l index def799f2c58..58fda7bc30b 100644 --- a/reactos/tools/wpp/ppl.l +++ b/reactos/tools/wpp/ppl.l @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * History: * 24-Apr-2000 BS - Started from scratch to restructure everything @@ -38,8 +38,6 @@ * | {ws} # {ws} endif {ws} \n * | {ws} # {ws} include {ws} < {anytext} > \n * | {ws} # {ws} include {ws} " {anytext} " \n - * | {ws} # {ws} include_next {ws} < {anytext} > \n - * | {ws} # {ws} include_next {ws} " {anytext} " \n * | {ws} # {ws} define {ws} {anytext} \n * | {ws} # {ws} define( {arglist} ) {ws} {expansion} \n * | {ws} # {ws} pragma {ws} {anytext} \n @@ -129,7 +127,7 @@ %option stack %option 8bit never-interactive %option nounput -%option prefix="pp" +%option prefix="ppy_" %x pp_pp %x pp_eol @@ -158,6 +156,7 @@ cident [a-zA-Z_][0-9a-zA-Z_]* ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL] %{ +#include #include #include #include @@ -182,7 +181,7 @@ ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL] /* * Always update the current character position within a line */ -#define YY_USER_ACTION pp_status.char_number+=ppleng; +#define YY_USER_ACTION pp_status.char_number+=ppy_leng; /* * Buffer management for includes and expansions @@ -315,7 +314,6 @@ includelogicentry_t *pp_includelogiclist = NULL; * Scan for the preprocessor directives */ {ws}*include{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE;} else {yy_pp_state(pp_eol);} -{ws}*include_next{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE_NEXT;} else {yy_pp_state(pp_eol);} {ws}*define{ws}* yy_pp_state(yy_current_state() != pp_ignore ? pp_def : pp_eol); {ws}*error{ws}* yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tERROR; {ws}*warning{ws}* yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tWARNING; @@ -330,22 +328,22 @@ includelogicentry_t *pp_includelogiclist = NULL; {ws}*endif{ws}* yy_pp_state(pp_endif); return tENDIF; {ws}*line{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);} {ws}+ if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);} -{ws}*[a-z]+ pperror("Invalid preprocessor token '%s'", pptext); +{ws}*[a-z]+ ppy_error("Invalid preprocessor token '%s'", ppy_text); \r?\n newline(1); yy_pop_state(); return tNL; /* This could be the null-token */ \\\r?\n newline(0); -\\\r? pperror("Preprocessor junk '%s'", pptext); -. return *pptext; +\\\r? ppy_error("Preprocessor junk '%s'", ppy_text); +. return *ppy_text; /* * Handle #include and #line */ -[0-9]+ return make_number(10, &pplval, pptext, ppleng); -\< new_string(); add_string(pptext, ppleng); yy_push_state(pp_iqs); -\" new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +[0-9]+ return make_number(10, &ppy_lval, ppy_text, ppy_leng); +\< new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_iqs); +\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); {ws}+ ; \n newline(1); yy_pop_state(); return tNL; \\\r?\n newline(0); -(\\\r?)|(.) pperror(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line"); +(\\\r?)|(.) ppy_error(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line"); /* * Ignore all input when a false clause is parsed @@ -362,11 +360,11 @@ includelogicentry_t *pp_includelogiclist = NULL; * Note: tIDENT is handled below. */ -0[0-7]*{ul}? return make_number(8, &pplval, pptext, ppleng); -0[0-7]*[8-9]+{ul}? pperror("Invalid octal digit"); -[1-9][0-9]*{ul}? return make_number(10, &pplval, pptext, ppleng); -0[xX][0-9a-fA-F]+{ul}? return make_number(16, &pplval, pptext, ppleng); -0[xX] pperror("Invalid hex number"); +0[0-7]*{ul}? return make_number(8, &ppy_lval, ppy_text, ppy_leng); +0[0-7]*[8-9]+{ul}? ppy_error("Invalid octal digit"); +[1-9][0-9]*{ul}? return make_number(10, &ppy_lval, ppy_text, ppy_leng); +0[xX][0-9a-fA-F]+{ul}? return make_number(16, &ppy_lval, ppy_text, ppy_leng); +0[xX] ppy_error("Invalid hex number"); defined yy_push_state(pp_defined); return tDEFINED; "<<" return tLSHIFT; ">>" return tRSHIFT; @@ -378,21 +376,21 @@ includelogicentry_t *pp_includelogiclist = NULL; ">=" return tGTE; \n newline(1); yy_pop_state(); return tNL; \\\r?\n newline(0); -\\\r? pperror("Junk in conditional expression"); +\\\r? ppy_error("Junk in conditional expression"); {ws}+ ; -\' new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); -\" pperror("String constants not allowed in conditionals"); -. return *pptext; +\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); +\" ppy_error("String constants not allowed in conditionals"); +. return *ppy_text; /* * Handle #ifdef, #ifndef and #undef * to get only an untranslated/unexpanded identifier */ -{cident} pplval.cptr = pp_xstrdup(pptext); return tIDENT; +{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; {ws}+ ; \n newline(1); yy_pop_state(); return tNL; \\\r?\n newline(0); -(\\\r?)|(.) pperror("Identifier expected"); +(\\\r?)|(.) ppy_error("Identifier expected"); /* * Handle #else and #endif. @@ -400,18 +398,18 @@ includelogicentry_t *pp_includelogiclist = NULL; {ws}+ ; \n newline(1); yy_pop_state(); return tNL; \\\r?\n newline(0); -. pperror("Garbage after #else or #endif."); +. ppy_error("Garbage after #else or #endif."); /* * Handle the special 'defined' keyword. * This is necessary to get the identifier prior to any * substitutions. */ -{cident} yy_pop_state(); pplval.cptr = pp_xstrdup(pptext); return tIDENT; +{cident} yy_pop_state(); ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; {ws}+ ; -(\()|(\)) return *pptext; +(\()|(\)) return *ppy_text; \\\r?\n newline(0); -(\\.)|(\n)|(.) pperror("Identifier expected"); +(\\.)|(\n)|(.) ppy_error("Identifier expected"); /* * Handle #error, #warning, #pragma and #ident. @@ -419,17 +417,17 @@ includelogicentry_t *pp_includelogiclist = NULL; * will act appropriately. * Comments are stripped from the literal text. */ -[^/\\\n]+ if(yy_top_state() != pp_ignore) { pplval.cptr = pp_xstrdup(pptext); return tLITERAL; } -\/[^/\\\n*]* if(yy_top_state() != pp_ignore) { pplval.cptr = pp_xstrdup(pptext); return tLITERAL; } -(\\\r?)|(\/[^/*]) if(yy_top_state() != pp_ignore) { pplval.cptr = pp_xstrdup(pptext); return tLITERAL; } +[^/\\\n]+ if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } +\/[^/\\\n*]* if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } +(\\\r?)|(\/[^/*]) if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } \n newline(1); yy_pop_state(); if(yy_current_state() != pp_ignore) { return tNL; } \\\r?\n newline(0); /* * Handle left side of #define */ -{cident}\( pplval.cptr = pp_xstrdup(pptext); pplval.cptr[ppleng-1] = '\0'; yy_pp_state(pp_macro); return tMACRO; -{cident} pplval.cptr = pp_xstrdup(pptext); yy_pp_state(pp_define); return tDEFINE; +{cident}\( ppy_lval.cptr = pp_xstrdup(ppy_text); ppy_lval.cptr[ppy_leng-1] = '\0'; yy_pp_state(pp_macro); return tMACRO; +{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); yy_pp_state(pp_define); return tDEFINE; {ws}+ ; \\\r?\n newline(0); (\\\r?)|(\n)|(.) perror("Identifier expected"); @@ -437,39 +435,39 @@ includelogicentry_t *pp_includelogiclist = NULL; /* * Scan the substitution of a define */ -[^'"/\\\n]+ pplval.cptr = pp_xstrdup(pptext); return tLITERAL; -(\\\r?)|(\/[^/*]) pplval.cptr = pp_xstrdup(pptext); return tLITERAL; -\\\r?\n{ws}+ newline(0); pplval.cptr = pp_xstrdup(" "); return tLITERAL; +[^'"/\\\n]+ ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; +(\\\r?)|(\/[^/*]) ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; +\\\r?\n{ws}+ newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; \\\r?\n newline(0); \n newline(1); yy_pop_state(); return tNL; -\' new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); -\" new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); +\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); /* * Scan the definition macro arguments */ \){ws}* yy_pp_state(pp_mbody); return tMACROEND; {ws}+ ; -{cident} pplval.cptr = pp_xstrdup(pptext); return tIDENT; +{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; , return ','; "..." return tELIPSIS; -(\\\r?)|(\n)|(.)|(\.\.?) pperror("Argument identifier expected"); +(\\\r?)|(\n)|(.)|(\.\.?) ppy_error("Argument identifier expected"); \\\r?\n newline(0); /* * Scan the substitution of a macro */ -[^a-zA-Z0-9'"#/\\\n]+ pplval.cptr = pp_xstrdup(pptext); return tLITERAL; -{cident} pplval.cptr = pp_xstrdup(pptext); return tIDENT; +[^a-zA-Z0-9'"#/\\\n]+ ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; +{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; \#\# return tCONCAT; \# return tSTRINGIZE; -[0-9][^'"#/\\\n]* pplval.cptr = pp_xstrdup(pptext); return tLITERAL; -(\\\r?)|(\/[^/*'"#\\\n]*) pplval.cptr = pp_xstrdup(pptext); return tLITERAL; -\\\r?\n{ws}+ newline(0); pplval.cptr = pp_xstrdup(" "); return tLITERAL; +[0-9][^'"#/\\\n]* ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; +(\\\r?)|(\/[^/*'"#\\\n]*) ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; +\\\r?\n{ws}+ newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; \\\r?\n newline(0); \n newline(1); yy_pop_state(); return tNL; -\' new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); -\" new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); +\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); +\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); /* * Macro expansion text scanning. @@ -490,7 +488,7 @@ includelogicentry_t *pp_includelogiclist = NULL; macexpstackentry_t *mac = pop_macro(); yy_pop_state(); put_buffer(mac->ppp->ident, strlen(mac->ppp->ident)); - put_buffer(pptext, ppleng); + put_buffer(ppy_text, ppy_leng); free_macro(mac); } @@ -500,7 +498,7 @@ includelogicentry_t *pp_includelogiclist = NULL; */ \( { if(++MACROPARENTHESES() > 1) - add_text_to_macro(pptext, ppleng); + add_text_to_macro(ppy_text, ppy_leng); } \) { if(--MACROPARENTHESES() == 0) @@ -509,19 +507,19 @@ includelogicentry_t *pp_includelogiclist = NULL; macro_add_arg(1); } else - add_text_to_macro(pptext, ppleng); + add_text_to_macro(ppy_text, ppy_leng); } , { if(MACROPARENTHESES() > 1) - add_text_to_macro(pptext, ppleng); + add_text_to_macro(ppy_text, ppy_leng); else macro_add_arg(0); } -\" new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); -\' new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); +\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); +\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); "/*" yy_push_state(pp_comment); add_text_to_macro(" ", 1); -\n pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(pptext, ppleng); -([^/(),\\\n"']+)|(\/[^/*(),\\\n'"]*)|(\\\r?)|(.) add_text_to_macro(pptext, ppleng); +\n pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(ppy_text, ppy_leng); +([^/(),\\\n"']+)|(\/[^/*(),\\\n'"]*)|(\\\r?)|(.) add_text_to_macro(ppy_text, ppy_leng); \\\r?\n newline(0); /* @@ -536,18 +534,18 @@ includelogicentry_t *pp_includelogiclist = NULL; * Remove C++ style comment (almost all start-conditions) */ "//"[^\n]* { - if(pptext[ppleng-1] == '\\') - ppwarning("C++ style comment ends with an escaped newline (escape ignored)"); + if(ppy_text[ppy_leng-1] == '\\') + ppy_warning("C++ style comment ends with an escaped newline (escape ignored)"); } /* * Single, double and <> quoted constants */ -\" pp_incl_state.seen_junk++; new_string(); add_string(pptext, ppleng); yy_push_state(pp_dqs); -\' pp_incl_state.seen_junk++; new_string(); add_string(pptext, ppleng); yy_push_state(pp_sqs); -[^"\\\n]+ add_string(pptext, ppleng); +\" pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); +\' pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); +[^"\\\n]+ add_string(ppy_text, ppy_leng); \" { - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); yy_pop_state(); switch(yy_current_state()) { @@ -557,37 +555,37 @@ includelogicentry_t *pp_includelogiclist = NULL; case pp_inc: case RCINCL: if (yy_current_state()==RCINCL) yy_pop_state(); - pplval.cptr = get_string(); + ppy_lval.cptr = get_string(); return tDQSTRING; case pp_line: - pplval.cptr = get_string(); - if (is_c_h_include(pplval.cptr, 1)) pass_data=0; + ppy_lval.cptr = get_string(); + if (is_c_h_include(ppy_lval.cptr, 1)) pass_data=0; else pass_data=1; return tDQSTRING; default: put_string(); } } -[^'\\\n]+ add_string(pptext, ppleng); +[^'\\\n]+ add_string(ppy_text, ppy_leng); \' { - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); yy_pop_state(); switch(yy_current_state()) { case pp_if: case pp_define: case pp_mbody: - pplval.cptr = get_string(); + ppy_lval.cptr = get_string(); return tSQSTRING; default: put_string(); } } -[^\>\\\n]+ add_string(pptext, ppleng); +[^\>\\\n]+ add_string(ppy_text, ppy_leng); \> { - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); yy_pop_state(); - pplval.cptr = get_string(); + ppy_lval.cptr = get_string(); return tIQSTRING; } \\\r?\n { @@ -610,15 +608,15 @@ includelogicentry_t *pp_includelogiclist = NULL; newline(0); break; default: - add_string(pptext, ppleng); + add_string(ppy_text, ppy_leng); newline(-1); } } -\\. add_string(pptext, ppleng); +\\. add_string(ppy_text, ppy_leng); \n { newline(1); - add_string(pptext, ppleng); - ppwarning("Newline in string constant encounterd (started line %d)", string_start()); + add_string(ppy_text, ppy_leng); + ppy_warning("Newline in string constant encounterd (started line %d)", string_start()); } /* @@ -627,22 +625,22 @@ includelogicentry_t *pp_includelogiclist = NULL; {cident} { pp_entry_t *ppp; pp_incl_state.seen_junk++; - if(!(ppp = pplookup(pptext))) + if(!(ppp = pplookup(ppy_text))) { if(yy_current_state() == pp_inc) - pperror("Expected include filename"); + ppy_error("Expected include filename"); if(yy_current_state() == pp_if) { - pplval.cptr = pp_xstrdup(pptext); + ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; } else { - if((yy_current_state()==INITIAL) && (strcasecmp(pptext,"RCINCLUDE")==0)){ + if((yy_current_state()==INITIAL) && (strcasecmp(ppy_text,"RCINCLUDE")==0)){ yy_push_state(RCINCL); return tRCINCLUDE; } - else put_buffer(pptext, ppleng); + else put_buffer(ppy_text, ppy_leng); } } else if(!ppp->expanding) @@ -663,26 +661,27 @@ includelogicentry_t *pp_includelogiclist = NULL; pp_internal_error(__FILE__, __LINE__, "Invalid define type %d\n", ppp->type); } } + else put_buffer(ppy_text, ppy_leng); } /* * Everything else that needs to be passed and * newline and continuation handling */ -[^a-zA-Z_#'"/\\\n \r\t\f\v]+|(\/|\\)[^a-zA-Z_/*'"\\\n \r\t\v\f]* pp_incl_state.seen_junk++; put_buffer(pptext, ppleng); -{ws}+ put_buffer(pptext, ppleng); +[^a-zA-Z_#'"/\\\n \r\t\f\v]+|(\/|\\)[^a-zA-Z_/*'"\\\n \r\t\v\f]* pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); +{ws}+ put_buffer(ppy_text, ppy_leng); \n newline(1); \\\r?\n newline(0); -\\\r? pp_incl_state.seen_junk++; put_buffer(pptext, ppleng); +\\\r? pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); /* * Special catcher for macro argmument expansion to prevent * newlines to propagate to the output or admin. */ -(\n)|(.)|(\\\r?(\n|.)) put_buffer(pptext, ppleng); +(\n)|(.)|(\\\r?(\n|.)) put_buffer(ppy_text, ppy_leng); [A-Za-z0-9_\.\\/]+ { - pplval.cptr=pp_xstrdup(pptext); + ppy_lval.cptr=pp_xstrdup(ppy_text); yy_pop_state(); return tRCINCLUDEPATH; } @@ -690,26 +689,26 @@ includelogicentry_t *pp_includelogiclist = NULL; {ws}+ ; \" { - new_string(); add_string(pptext,ppleng);yy_push_state(pp_dqs); + new_string(); add_string(ppy_text,ppy_leng);yy_push_state(pp_dqs); } /* * This is a 'catch-all' rule to discover errors in the scanner * in an orderly manner. */ -<*>. pp_incl_state.seen_junk++; ppwarning("Unmatched text '%c' (0x%02x); please report\n", isprint(*pptext & 0xff) ? *pptext : ' ', *pptext); +<*>. pp_incl_state.seen_junk++; ppy_warning("Unmatched text '%c' (0x%02x); please report\n", isprint(*ppy_text & 0xff) ? *ppy_text : ' ', *ppy_text); <> { YY_BUFFER_STATE b = YY_CURRENT_BUFFER; bufferstackentry_t *bep = pop_buffer(); if((!bep && pp_get_if_depth()) || (bep && pp_get_if_depth() != bep->if_depth)) - ppwarning("Unmatched #if/#endif at end of file"); + ppy_warning("Unmatched #if/#endif at end of file"); if(!bep) { if(YY_START != INITIAL) - pperror("Unexpected end of file during preprocessing"); + ppy_error("Unexpected end of file during preprocessing"); yyterminate(); } else if(bep->should_pop == 2) @@ -718,7 +717,7 @@ includelogicentry_t *pp_includelogiclist = NULL; mac = pop_macro(); expand_macro(mac); } - pp_delete_buffer(b); + ppy__delete_buffer(b); } %% @@ -728,8 +727,8 @@ includelogicentry_t *pp_includelogiclist = NULL; ************************************************************************** */ -#ifndef ppwrap -int ppwrap(void) +#ifndef ppy_wrap +int ppy_wrap(void) { return 1; } @@ -799,7 +798,7 @@ static int make_number(int radix, YYSTYPE *val, const char *str, int len) ext[0] = len > 2 ? toupper(str[len-3]) : ' '; if(!strcmp(ext, "LUL")) - pperror("Invalid constant suffix"); + ppy_error("Invalid constant suffix"); else if(!strcmp(ext, "LLU") || !strcmp(ext, "ULL")) { is_ll++; @@ -824,9 +823,24 @@ static int make_number(int radix, YYSTYPE *val, const char *str, int len) } if(is_ll) - pp_internal_error(__FILE__, __LINE__, "long long constants not implemented yet"); - - if(is_u && is_l) + { +/* Assume as in the declaration of wrc_ull_t and wrc_sll_t */ +#ifdef HAVE_LONG_LONG + if (is_u) + { + val->ull = strtoull(str, NULL, radix); + return tULONGLONG; + } + else + { + val->sll = strtoll(str, NULL, radix); + return tSLONGLONG; + } +#else + pp_internal_error(__FILE__, __LINE__, "long long constants not supported on this platform"); +#endif + } + else if(is_u && is_l) { val->ulong = strtoul(str, NULL, radix); return tULONG; @@ -923,7 +937,7 @@ static void add_text(const char *str, int len) curdef_alloc += (len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1); curdef_text = pp_xrealloc(curdef_text, curdef_alloc * sizeof(curdef_text[0])); if(curdef_alloc > 65536) - ppwarning("Reallocating macro-expansion buffer larger than 64kB"); + ppy_warning("Reallocating macro-expansion buffer larger than 64kB"); } memcpy(&curdef_text[curdef_idx], str, len); curdef_idx += len; @@ -1039,7 +1053,7 @@ static void expand_macro(macexpstackentry_t *mep) assert(ppp->expanding == 0); if((ppp->nargs >= 0 && nargs != ppp->nargs) || (ppp->nargs < 0 && nargs < -ppp->nargs)) - pperror("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs); + ppy_error("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs); for(n = 0; n < nargs; n++) nnl += mep->nnls[n]; @@ -1108,7 +1122,7 @@ static void new_string(void) { #ifdef DEBUG if(strbuf_idx) - ppwarning("new_string: strbuf_idx != 0"); + ppy_warning("new_string: strbuf_idx != 0"); #endif strbuf_idx = 0; str_startline = pp_status.line_number; @@ -1123,7 +1137,7 @@ static void add_string(const char *str, int len) strbuf_alloc += (len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1); strbuffer = pp_xrealloc(strbuffer, strbuf_alloc * sizeof(strbuffer[0])); if(strbuf_alloc > 65536) - ppwarning("Reallocating string buffer larger than 64kB"); + ppy_warning("Reallocating string buffer larger than 64kB"); } memcpy(&strbuffer[strbuf_idx], str, len); strbuf_idx += len; @@ -1161,7 +1175,7 @@ static int string_start(void) */ static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop) { - if(ppdebug) + if(ppy_debug) printf("push_buffer(%d): %p %p %p %d\n", bufferstackidx, ppp, filename, incname, pop); if(bufferstackidx >= MAXBUFFERSTACK) pp_internal_error(__FILE__, __LINE__, "Buffer stack overflow"); @@ -1183,7 +1197,7 @@ static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop) ppp->expanding = 1; else if(filename) { - /* These will track the pperror to the correct file and line */ + /* These will track the ppy_error to the correct file and line */ pp_status.line_number = 1; pp_status.char_number = 1; pp_status.input = filename; @@ -1214,8 +1228,8 @@ static bufferstackentry_t *pop_buffer(void) ncontinuations = bufferstack[bufferstackidx].ncontinuations; if(!bufferstack[bufferstackidx].should_pop) { - fclose(ppin); - fprintf(ppout, "# %d \"%s\" 2\n", pp_status.line_number, pp_status.input); + fclose(ppy_in); + fprintf(ppy_out, "# %d \"%s\" 2\n", pp_status.line_number, pp_status.input); /* We have EOF, check the include logic */ if(pp_incl_state.state == 2 && !pp_incl_state.seen_junk && pp_incl_state.ppp) @@ -1235,18 +1249,17 @@ static bufferstackentry_t *pop_buffer(void) if(pp_status.debug) fprintf(stderr, "pop_buffer: %s:%d: includelogic added, include_ppp='%s', file='%s'\n", pp_status.input, pp_status.line_number, pp_incl_state.ppp, iep->filename); } - else if(bufferstack[bufferstackidx].include_filename) + else free(bufferstack[bufferstackidx].include_filename); } - if(pp_incl_state.ppp) - free(pp_incl_state.ppp); + free(pp_incl_state.ppp); pp_incl_state = bufferstack[bufferstackidx].incl; pass_data = bufferstack[bufferstackidx].pass_data; } } - if(ppdebug) + if(ppy_debug) printf("pop_buffer(%d): %p %p (%d, %d, %d) %p %d\n", bufferstackidx, bufferstack[bufferstackidx].bufferstate, @@ -1257,7 +1270,7 @@ static bufferstackentry_t *pop_buffer(void) bufferstack[bufferstackidx].filename, bufferstack[bufferstackidx].should_pop); - pp_switch_to_buffer(bufferstack[bufferstackidx].bufferstate); + ppy__switch_to_buffer(bufferstack[bufferstackidx].bufferstate); if(bufferstack[bufferstackidx].should_pop) { @@ -1280,7 +1293,7 @@ static bufferstackentry_t *pop_buffer(void) static void push_macro(pp_entry_t *ppp) { if(macexpstackidx >= MAXMACEXPSTACK) - pperror("Too many nested macros"); + ppy_error("Too many nested macros"); macexpstack[macexpstackidx] = pp_xmalloc(sizeof(macexpstack[0][0])); memset( macexpstack[macexpstackidx], 0, sizeof(macexpstack[0][0])); @@ -1306,12 +1319,9 @@ static void free_macro(macexpstackentry_t *mep) for(i = 0; i < mep->nargs; i++) free(mep->args[i]); - if(mep->args) - free(mep->args); - if(mep->nnls) - free(mep->nnls); - if(mep->curarg) - free(mep->curarg); + free(mep->args); + free(mep->nnls); + free(mep->curarg); free(mep); } @@ -1402,7 +1412,7 @@ static void put_buffer(const char *s, int len) add_text_to_macro(s, len); else { if(pass_data) - fwrite(s, 1, len, ppout); + fwrite(s, 1, len, ppy_out); } } @@ -1443,13 +1453,13 @@ void pp_do_include(char *fname, int type) n = strlen(fname); if(n <= 2) - pperror("Empty include filename"); + ppy_error("Empty include filename"); /* Undo the effect of the quotation */ fname[n-1] = '\0'; - if((ppin = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath, type)) == NULL) - pperror("Unable to open include file %s", fname+1); + if((ppy_in = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL) + ppy_error("Unable to open include file %s", fname+1); fname[n-1] = *fname; /* Redo the quotes */ push_buffer(NULL, newpath, fname, 0); @@ -1462,9 +1472,9 @@ void pp_do_include(char *fname, int type) if(pp_status.debug) fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d ,pass_data=%d\n", pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth, pass_data); - pp_switch_to_buffer(pp_create_buffer(ppin, YY_BUF_SIZE)); + ppy__switch_to_buffer(ppy__create_buffer(ppy_in, YY_BUF_SIZE)); - fprintf(ppout, "# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); + fprintf(ppy_out, "# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); } /* diff --git a/reactos/tools/wpp/ppy.tab.c b/reactos/tools/wpp/ppy.tab.c index f622320bb28..e907a64b873 100644 --- a/reactos/tools/wpp/ppy.tab.c +++ b/reactos/tools/wpp/ppy.tab.c @@ -1,7 +1,7 @@ -/* A Bison parser, made by GNU Bison 1.875b. */ +/* A Bison parser, made by GNU Bison 2.1. */ /* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. @@ -36,6 +36,9 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.1" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -45,15 +48,14 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ -#define yyparse ppparse -#define yylex pplex -#define yyerror pperror -#define yylval pplval -#define yychar ppchar -#define yydebug ppdebug -#define yynerrs ppnerrs +/* Substitute the variable and function names. */ +#define yyparse ppy_parse +#define yylex ppy_lex +#define yyerror ppy_error +#define yylval ppy_lval +#define yychar ppy_char +#define yydebug ppy_debug +#define yynerrs ppy_nerrs /* Tokens. */ @@ -72,42 +74,42 @@ tDEFINED = 265, tNL = 266, tINCLUDE = 267, - tINCLUDE_NEXT = 268, - tLINE = 269, - tGCCLINE = 270, - tERROR = 271, - tWARNING = 272, - tPRAGMA = 273, - tPPIDENT = 274, - tUNDEF = 275, - tMACROEND = 276, - tCONCAT = 277, - tELIPSIS = 278, - tSTRINGIZE = 279, - tIDENT = 280, - tLITERAL = 281, - tMACRO = 282, - tDEFINE = 283, - tDQSTRING = 284, - tSQSTRING = 285, - tIQSTRING = 286, - tUINT = 287, - tSINT = 288, - tULONG = 289, - tSLONG = 290, - tULONGLONG = 291, - tSLONGLONG = 292, - tRCINCLUDEPATH = 293, - tLOGOR = 294, - tLOGAND = 295, - tNE = 296, - tEQ = 297, - tGTE = 298, - tLTE = 299, - tRSHIFT = 300, - tLSHIFT = 301 + tLINE = 268, + tGCCLINE = 269, + tERROR = 270, + tWARNING = 271, + tPRAGMA = 272, + tPPIDENT = 273, + tUNDEF = 274, + tMACROEND = 275, + tCONCAT = 276, + tELIPSIS = 277, + tSTRINGIZE = 278, + tIDENT = 279, + tLITERAL = 280, + tMACRO = 281, + tDEFINE = 282, + tDQSTRING = 283, + tSQSTRING = 284, + tIQSTRING = 285, + tUINT = 286, + tSINT = 287, + tULONG = 288, + tSLONG = 289, + tULONGLONG = 290, + tSLONGLONG = 291, + tRCINCLUDEPATH = 292, + tLOGOR = 293, + tLOGAND = 294, + tNE = 295, + tEQ = 296, + tGTE = 297, + tLTE = 298, + tRSHIFT = 299, + tLSHIFT = 300 }; #endif +/* Tokens. */ #define tRCINCLUDE 258 #define tIF 259 #define tIFDEF 260 @@ -118,48 +120,48 @@ #define tDEFINED 265 #define tNL 266 #define tINCLUDE 267 -#define tINCLUDE_NEXT 268 -#define tLINE 269 -#define tGCCLINE 270 -#define tERROR 271 -#define tWARNING 272 -#define tPRAGMA 273 -#define tPPIDENT 274 -#define tUNDEF 275 -#define tMACROEND 276 -#define tCONCAT 277 -#define tELIPSIS 278 -#define tSTRINGIZE 279 -#define tIDENT 280 -#define tLITERAL 281 -#define tMACRO 282 -#define tDEFINE 283 -#define tDQSTRING 284 -#define tSQSTRING 285 -#define tIQSTRING 286 -#define tUINT 287 -#define tSINT 288 -#define tULONG 289 -#define tSLONG 290 -#define tULONGLONG 291 -#define tSLONGLONG 292 -#define tRCINCLUDEPATH 293 -#define tLOGOR 294 -#define tLOGAND 295 -#define tNE 296 -#define tEQ 297 -#define tGTE 298 -#define tLTE 299 -#define tRSHIFT 300 -#define tLSHIFT 301 +#define tLINE 268 +#define tGCCLINE 269 +#define tERROR 270 +#define tWARNING 271 +#define tPRAGMA 272 +#define tPPIDENT 273 +#define tUNDEF 274 +#define tMACROEND 275 +#define tCONCAT 276 +#define tELIPSIS 277 +#define tSTRINGIZE 278 +#define tIDENT 279 +#define tLITERAL 280 +#define tMACRO 281 +#define tDEFINE 282 +#define tDQSTRING 283 +#define tSQSTRING 284 +#define tIQSTRING 285 +#define tUINT 286 +#define tSINT 287 +#define tULONG 288 +#define tSLONG 289 +#define tULONGLONG 290 +#define tSLONGLONG 291 +#define tRCINCLUDEPATH 292 +#define tLOGOR 293 +#define tLOGAND 294 +#define tNE 295 +#define tEQ 296 +#define tGTE 297 +#define tLTE 298 +#define tRSHIFT 299 +#define tLSHIFT 300 /* Copy the first part of user declarations. */ -#line 30 "wpp/ppy.y" +#line 30 "tools\\wpp_new\\ppy.y" #include "config.h" +#include "wine/port.h" #include #include @@ -255,7 +257,7 @@ static int nmacro_args; /* Enabling traces. */ #ifndef YYDEBUG -# define YYDEBUG 1 +# define YYDEBUG 0 #endif /* Enabling verbose error messages. */ @@ -266,8 +268,13 @@ static int nmacro_args; # define YYERROR_VERBOSE 0 #endif +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 126 "wpp/ppy.y" +#line 126 "tools\\wpp_new\\ppy.y" typedef union YYSTYPE { int sint; unsigned int uint; @@ -281,8 +288,8 @@ typedef union YYSTYPE { marg_t *marg; mtext_t *mtext; } YYSTYPE; -/* Line 191 of yacc.c. */ -#line 287 "wpp/ppy.tab.c" +/* Line 196 of yacc.c. */ +#line 293 "tools\\wpp_new\\ppy.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -293,22 +300,48 @@ typedef union YYSTYPE { /* Copy the second part of user declarations. */ -/* Line 214 of yacc.c. */ -#line 299 "wpp/ppy.tab.c" +/* Line 219 of yacc.c. */ +#line 305 "tools\\wpp_new\\ppy.tab.c" + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif #if ! defined (yyoverflow) || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca # else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca +# define YYSTACK_ALLOC alloca +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYINCLUDED_STDLIB_H # endif # endif # endif @@ -317,25 +350,51 @@ typedef union YYSTYPE { # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) +# endif +# ifdef __cplusplus +extern "C" { +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifdef __cplusplus +} # endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ - || (YYSTYPE_IS_TRIVIAL))) + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short yyss; + short int yyss; YYSTYPE yyvs; }; @@ -345,20 +404,20 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if 1 < __GNUC__ +# if defined (__GNUC__) && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ - register YYSIZE_T yyi; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ @@ -387,28 +446,28 @@ union yyalloc #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else - typedef short yysigned_char; + typedef short int yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 308 +#define YYLAST 303 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 63 +#define YYNTOKENS 62 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 13 /* YYNRULES -- Number of rules. */ -#define YYNRULES 86 +#define YYNRULES 84 /* YYNRULES -- Number of states. */ -#define YYNSTATES 158 +#define YYNSTATES 153 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 301 +#define YYMAXUTOK 300 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ @@ -417,16 +476,16 @@ static const unsigned char yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 59, 2, 2, 2, 2, 45, 2, - 61, 62, 56, 54, 60, 55, 2, 57, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 40, 2, - 48, 2, 49, 39, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 58, 2, 2, 2, 2, 44, 2, + 60, 61, 55, 53, 59, 54, 2, 56, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 39, 2, + 47, 2, 48, 38, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 44, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 43, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 43, 2, 58, 2, 2, 2, + 2, 2, 2, 2, 42, 2, 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -443,137 +502,135 @@ static const unsigned char yytranslate[] = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 41, 42, 46, 47, 50, 51, - 52, 53 + 35, 36, 37, 40, 41, 45, 46, 49, 50, 51, + 52 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short yyprhs[] = +static const unsigned short int yyprhs[] = { 0, 0, 3, 4, 7, 11, 15, 19, 23, 27, - 31, 35, 39, 42, 45, 49, 53, 60, 65, 70, - 76, 83, 91, 100, 103, 107, 111, 115, 119, 122, - 125, 126, 128, 130, 132, 134, 137, 140, 143, 144, - 145, 147, 149, 153, 157, 159, 160, 162, 164, 167, - 169, 171, 173, 175, 178, 180, 182, 184, 186, 188, - 190, 192, 195, 200, 202, 206, 210, 214, 218, 222, + 31, 34, 37, 41, 45, 52, 57, 62, 68, 75, + 83, 92, 95, 99, 103, 107, 111, 114, 117, 118, + 120, 122, 124, 126, 129, 132, 135, 136, 137, 139, + 141, 145, 149, 151, 152, 154, 156, 159, 161, 163, + 165, 167, 170, 172, 174, 176, 178, 180, 182, 184, + 187, 192, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, 258, 262, - 266, 270, 273, 276, 279, 282, 286 + 265, 268, 271, 274, 278 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yysigned_char yyrhs[] = { - 64, 0, -1, -1, 64, 65, -1, 12, 29, 11, - -1, 12, 31, 11, -1, 13, 29, 11, -1, 13, - 31, 11, -1, 4, 75, 11, -1, 5, 25, 11, - -1, 6, 25, 11, -1, 8, 75, 11, -1, 7, - 11, -1, 9, 11, -1, 20, 25, 11, -1, 28, - 66, 11, -1, 27, 68, 69, 21, 72, 11, -1, - 14, 33, 29, 11, -1, 15, 33, 29, 11, -1, - 15, 33, 29, 33, 11, -1, 15, 33, 29, 33, - 33, 11, -1, 15, 33, 29, 33, 33, 33, 11, - -1, 15, 33, 29, 33, 33, 33, 33, 11, -1, - 15, 11, -1, 16, 66, 11, -1, 17, 66, 11, - -1, 18, 66, 11, -1, 19, 66, 11, -1, 3, - 38, -1, 3, 29, -1, -1, 67, -1, 26, -1, - 29, -1, 30, -1, 67, 26, -1, 67, 29, -1, - 67, 30, -1, -1, -1, 70, -1, 71, -1, 71, - 60, 23, -1, 71, 60, 25, -1, 25, -1, -1, - 73, -1, 74, -1, 73, 74, -1, 26, -1, 29, - -1, 30, -1, 22, -1, 24, 25, -1, 25, -1, - 33, -1, 32, -1, 35, -1, 34, -1, 37, -1, - 36, -1, 10, 25, -1, 10, 61, 25, 62, -1, - 25, -1, 75, 41, 75, -1, 75, 42, 75, -1, - 75, 47, 75, -1, 75, 46, 75, -1, 75, 48, - 75, -1, 75, 49, 75, -1, 75, 51, 75, -1, - 75, 50, 75, -1, 75, 54, 75, -1, 75, 55, - 75, -1, 75, 44, 75, -1, 75, 45, 75, -1, - 75, 43, 75, -1, 75, 56, 75, -1, 75, 57, - 75, -1, 75, 53, 75, -1, 75, 52, 75, -1, - 54, 75, -1, 55, 75, -1, 58, 75, -1, 59, - 75, -1, 61, 75, 62, -1, 75, 39, 75, 40, - 75, -1 + 63, 0, -1, -1, 63, 64, -1, 12, 28, 11, + -1, 12, 30, 11, -1, 4, 74, 11, -1, 5, + 24, 11, -1, 6, 24, 11, -1, 8, 74, 11, + -1, 7, 11, -1, 9, 11, -1, 19, 24, 11, + -1, 27, 65, 11, -1, 26, 67, 68, 20, 71, + 11, -1, 13, 32, 28, 11, -1, 14, 32, 28, + 11, -1, 14, 32, 28, 32, 11, -1, 14, 32, + 28, 32, 32, 11, -1, 14, 32, 28, 32, 32, + 32, 11, -1, 14, 32, 28, 32, 32, 32, 32, + 11, -1, 14, 11, -1, 15, 65, 11, -1, 16, + 65, 11, -1, 17, 65, 11, -1, 18, 65, 11, + -1, 3, 37, -1, 3, 28, -1, -1, 66, -1, + 25, -1, 28, -1, 29, -1, 66, 25, -1, 66, + 28, -1, 66, 29, -1, -1, -1, 69, -1, 70, + -1, 70, 59, 22, -1, 70, 59, 24, -1, 24, + -1, -1, 72, -1, 73, -1, 72, 73, -1, 25, + -1, 28, -1, 29, -1, 21, -1, 23, 24, -1, + 24, -1, 32, -1, 31, -1, 34, -1, 33, -1, + 36, -1, 35, -1, 10, 24, -1, 10, 60, 24, + 61, -1, 24, -1, 74, 40, 74, -1, 74, 41, + 74, -1, 74, 46, 74, -1, 74, 45, 74, -1, + 74, 47, 74, -1, 74, 48, 74, -1, 74, 50, + 74, -1, 74, 49, 74, -1, 74, 53, 74, -1, + 74, 54, 74, -1, 74, 43, 74, -1, 74, 44, + 74, -1, 74, 42, 74, -1, 74, 55, 74, -1, + 74, 56, 74, -1, 74, 52, 74, -1, 74, 51, + 74, -1, 53, 74, -1, 54, 74, -1, 57, 74, + -1, 58, 74, -1, 60, 74, 61, -1, 74, 38, + 74, 39, 74, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = +static const unsigned short int yyrline[] = { - 0, 181, 181, 182, 186, 187, 188, 189, 190, 191, - 192, 212, 233, 256, 271, 272, 273, 276, 277, 278, - 280, 282, 284, 286, 287, 288, 289, 290, 291, 298, - 304, 305, 308, 309, 310, 311, 312, 313, 316, 319, - 320, 323, 324, 327, 328, 332, 333, 339, 340, 343, - 344, 345, 346, 347, 353, 362, 363, 364, 365, 366, + 0, 181, 181, 182, 186, 187, 188, 189, 190, 210, + 231, 254, 269, 270, 271, 274, 275, 276, 278, 280, + 282, 284, 285, 286, 287, 288, 289, 296, 302, 303, + 306, 307, 308, 309, 310, 311, 314, 317, 318, 321, + 322, 325, 326, 330, 331, 337, 338, 341, 342, 343, + 344, 345, 351, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, - 387, 388, 389, 390, 391, 392, 393 + 387, 388, 389, 390, 391 }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "tRCINCLUDE", "tIF", "tIFDEF", "tIFNDEF", - "tELSE", "tELIF", "tENDIF", "tDEFINED", "tNL", "tINCLUDE", - "tINCLUDE_NEXT", "tLINE", "tGCCLINE", "tERROR", "tWARNING", "tPRAGMA", - "tPPIDENT", "tUNDEF", "tMACROEND", "tCONCAT", "tELIPSIS", "tSTRINGIZE", - "tIDENT", "tLITERAL", "tMACRO", "tDEFINE", "tDQSTRING", "tSQSTRING", - "tIQSTRING", "tUINT", "tSINT", "tULONG", "tSLONG", "tULONGLONG", - "tSLONGLONG", "tRCINCLUDEPATH", "'?'", "':'", "tLOGOR", "tLOGAND", - "'|'", "'^'", "'&'", "tNE", "tEQ", "'<'", "'>'", "tGTE", "tLTE", - "tRSHIFT", "tLSHIFT", "'+'", "'-'", "'*'", "'/'", "'~'", "'!'", "','", - "'('", "')'", "$accept", "pp_file", "preprocessor", "opt_text", "text", - "res_arg", "allmargs", "emargs", "margs", "opt_mtexts", "mtexts", - "mtext", "pp_expr", 0 + "$end", "error", "$undefined", "tRCINCLUDE", "tIF", "tIFDEF", "tIFNDEF", + "tELSE", "tELIF", "tENDIF", "tDEFINED", "tNL", "tINCLUDE", "tLINE", + "tGCCLINE", "tERROR", "tWARNING", "tPRAGMA", "tPPIDENT", "tUNDEF", + "tMACROEND", "tCONCAT", "tELIPSIS", "tSTRINGIZE", "tIDENT", "tLITERAL", + "tMACRO", "tDEFINE", "tDQSTRING", "tSQSTRING", "tIQSTRING", "tUINT", + "tSINT", "tULONG", "tSLONG", "tULONGLONG", "tSLONGLONG", + "tRCINCLUDEPATH", "'?'", "':'", "tLOGOR", "tLOGAND", "'|'", "'^'", "'&'", + "tNE", "tEQ", "'<'", "'>'", "tGTE", "tLTE", "tRSHIFT", "tLSHIFT", "'+'", + "'-'", "'*'", "'/'", "'~'", "'!'", "','", "'('", "')'", "$accept", + "pp_file", "preprocessor", "opt_text", "text", "res_arg", "allmargs", + "emargs", "margs", "opt_mtexts", "mtexts", "mtext", "pp_expr", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short yytoknum[] = +static const unsigned short int yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 63, - 58, 294, 295, 124, 94, 38, 296, 297, 60, 62, - 298, 299, 300, 301, 43, 45, 42, 47, 126, 33, - 44, 40, 41 + 285, 286, 287, 288, 289, 290, 291, 292, 63, 58, + 293, 294, 124, 94, 38, 295, 296, 60, 62, 297, + 298, 299, 300, 43, 45, 42, 47, 126, 33, 44, + 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 63, 64, 64, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 66, 66, 67, 67, 67, 67, 67, 67, 68, 69, - 69, 70, 70, 71, 71, 72, 72, 73, 73, 74, - 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75 + 0, 62, 63, 63, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, + 66, 66, 66, 66, 66, 66, 67, 68, 68, 69, + 69, 70, 70, 71, 71, 72, 72, 73, 73, 73, + 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { 0, 2, 0, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 3, 3, 6, 4, 4, 5, - 6, 7, 8, 2, 3, 3, 3, 3, 2, 2, - 0, 1, 1, 1, 1, 2, 2, 2, 0, 0, - 1, 1, 3, 3, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 5 + 2, 2, 3, 3, 6, 4, 4, 5, 6, 7, + 8, 2, 3, 3, 3, 3, 2, 2, 0, 1, + 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, + 3, 3, 1, 0, 1, 1, 2, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, + 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, + 2, 2, 2, 3, 5 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -582,58 +639,58 @@ static const unsigned char yyr2[] = static const unsigned char yydefact[] = { 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 30, 30, 30, 30, 0, 38, - 30, 3, 29, 28, 0, 63, 56, 55, 58, 57, - 60, 59, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 0, 13, 0, 0, 0, 0, 0, 23, 0, - 32, 33, 34, 0, 31, 0, 0, 0, 0, 39, - 0, 61, 0, 81, 82, 83, 84, 0, 8, 0, + 0, 0, 0, 28, 28, 28, 28, 0, 36, 28, + 3, 27, 26, 0, 61, 54, 53, 56, 55, 58, + 57, 0, 0, 0, 0, 0, 0, 0, 0, 10, + 0, 11, 0, 0, 0, 21, 0, 30, 31, 32, + 0, 29, 0, 0, 0, 0, 37, 0, 59, 0, + 79, 80, 81, 82, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, - 4, 5, 6, 7, 0, 0, 24, 35, 36, 37, - 25, 26, 27, 14, 44, 0, 40, 41, 15, 0, - 85, 0, 64, 65, 76, 74, 75, 67, 66, 68, - 69, 71, 70, 80, 79, 72, 73, 77, 78, 17, - 18, 0, 45, 0, 62, 0, 19, 0, 52, 0, - 54, 49, 50, 51, 0, 46, 47, 42, 43, 86, - 20, 0, 53, 16, 48, 21, 0, 22 + 0, 0, 0, 0, 7, 8, 9, 4, 5, 0, + 0, 22, 33, 34, 35, 23, 24, 25, 12, 42, + 0, 38, 39, 13, 0, 83, 0, 62, 63, 74, + 72, 73, 65, 64, 66, 67, 69, 68, 78, 77, + 70, 71, 75, 76, 15, 16, 0, 43, 0, 60, + 0, 17, 0, 50, 0, 52, 47, 48, 49, 0, + 44, 45, 40, 41, 84, 18, 0, 51, 14, 46, + 19, 0, 20 }; /* YYDEFGOTO[NTERM-NUM]. */ -static const short yydefgoto[] = +static const short int yydefgoto[] = { - -1, 1, 21, 53, 54, 59, 105, 106, 107, 144, - 145, 146, 37 + -1, 1, 20, 50, 51, 56, 100, 101, 102, 139, + 140, 141, 36 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -28 -static const short yypact[] = +#define YYPACT_NINF -27 +static const short int yypact[] = { - -28, 126, -28, -27, -3, -13, -5, 4, -3, 12, - -10, 28, 21, 2, -20, -20, -20, -20, 35, -28, - -20, -28, -28, -28, -24, -28, -28, -28, -28, -28, - -28, -28, -3, -3, -3, -3, -3, 42, 95, 97, - -28, 68, -28, 117, 137, 138, 141, 127, -28, 170, - -28, -28, -28, 277, 121, 281, 282, 285, 286, 273, - 288, -28, 275, 80, 80, -28, -28, 116, -28, -3, + -27, 142, -27, -26, -3, -12, -2, 30, -3, 41, + 91, 21, 2, -19, -19, -19, -19, 32, -27, -19, + -27, -27, -27, -23, -27, -27, -27, -27, -27, -27, + -27, -3, -3, -3, -3, -3, 38, 66, 109, -27, + 85, -27, 113, 133, 115, -27, 124, -27, -27, -27, + 179, -9, 278, 280, 281, 282, 129, 283, -27, 271, + -10, -10, -27, -27, 57, -27, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, - -3, -3, -3, -3, -3, -3, -3, -28, -28, -28, - -28, -28, -28, -28, 290, 3, -28, -28, -28, -28, - -28, -28, -28, -28, -28, 283, -28, 242, -28, 241, - -28, 140, 175, 190, 204, 217, 229, -7, -7, 48, - 48, 48, 48, 120, 120, 80, 80, -28, -28, -28, - -28, 5, 265, 57, -28, -3, -28, 6, -28, 280, - -28, -28, -28, -28, 295, 265, -28, -28, -28, 159, - -28, 7, -28, -28, -28, -28, 296, -28 + -3, -3, -3, -3, -27, -27, -27, -27, -27, 285, + 3, -27, -27, -27, -27, -27, -27, -27, -27, -27, + 277, -27, 239, -27, 238, -27, 132, 167, 182, 196, + 209, 221, 231, 231, 111, 111, 111, 111, 61, 61, + -10, -10, -27, -27, -27, -27, 4, 19, 266, -27, + -3, -27, 6, -27, 276, -27, -27, -27, -27, 290, + 19, -27, -27, -27, 151, -27, 7, -27, -27, -27, + -27, 291, -27 }; /* YYPGOTO[NTERM-NUM]. */ -static const short yypgoto[] = +static const short int yypgoto[] = { - -28, -28, -28, -12, -28, -28, -28, -28, -28, -28, - -28, 163, -8 + -27, -27, -27, -11, -27, -27, -27, -27, -27, -27, + -27, 163, -8 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -643,112 +700,96 @@ static const short yypgoto[] = #define YYTABLE_NINF -1 static const unsigned char yytable[] = { - 41, 61, 22, 55, 56, 57, 50, 24, 60, 51, - 52, 23, 38, 48, 130, 40, 136, 150, 155, 43, - 39, 44, 25, 42, 63, 64, 65, 66, 67, 26, - 27, 28, 29, 30, 31, 49, 131, 62, 137, 151, - 156, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 32, 33, 68, 47, 34, 35, 45, 36, 46, - 58, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 89, - 147, 69, 148, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 81, 82, 83, 84, 85, 86, 87, 69, 88, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 2, 149, 90, 3, - 4, 5, 6, 7, 8, 9, 85, 86, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 97, 91, 92, - 98, 99, 93, 19, 20, 69, 94, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 83, 84, 85, 86, 110, 69, - 135, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 69, 95, + 40, 58, 21, 52, 53, 54, 47, 23, 57, 48, + 49, 22, 37, 45, 125, 131, 92, 145, 150, 93, + 94, 24, 38, 60, 61, 62, 63, 64, 25, 26, + 27, 28, 29, 30, 46, 126, 132, 59, 146, 151, + 133, 39, 134, 135, 136, 82, 83, 137, 138, 65, + 31, 32, 41, 44, 33, 34, 55, 35, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 66, 84, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 66, 86, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 138, 96, 139, - 140, 141, 100, 101, 142, 143, 102, 103, 104, 108, - 109, 129, 133, 134, 132, 152, 153, 157, 154 + 80, 81, 82, 83, 80, 81, 82, 83, 105, 42, + 85, 43, 144, 66, 87, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 2, 89, 88, 3, 4, 5, 6, 7, + 8, 9, 90, 99, 10, 11, 12, 13, 14, 15, + 16, 17, 78, 79, 80, 81, 82, 83, 18, 19, + 66, 130, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 66, + 91, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 142, 95, + 143, 96, 97, 98, 103, 104, 124, 127, 128, 129, + 147, 148, 152, 149 }; static const unsigned char yycheck[] = { - 8, 25, 29, 15, 16, 17, 26, 10, 20, 29, - 30, 38, 25, 11, 11, 11, 11, 11, 11, 29, - 25, 31, 25, 11, 32, 33, 34, 35, 36, 32, - 33, 34, 35, 36, 37, 33, 33, 61, 33, 33, - 33, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 54, 55, 11, 33, 58, 59, 29, 61, 31, - 25, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 11, - 23, 39, 25, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 52, 53, 54, 55, 56, 57, 11, 39, 11, 41, + 8, 24, 28, 14, 15, 16, 25, 10, 19, 28, + 29, 37, 24, 11, 11, 11, 25, 11, 11, 28, + 29, 24, 24, 31, 32, 33, 34, 35, 31, 32, + 33, 34, 35, 36, 32, 32, 32, 60, 32, 32, + 21, 11, 23, 24, 25, 55, 56, 28, 29, 11, + 53, 54, 11, 32, 57, 58, 24, 60, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 38, 11, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 0, 135, 11, 3, - 4, 5, 6, 7, 8, 9, 56, 57, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 26, 11, 11, - 29, 30, 11, 27, 28, 39, 29, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 54, 55, 56, 57, 62, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 39, 29, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 42, 43, 44, + 52, 53, 54, 55, 56, 38, 11, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 53, 54, 55, 56, 61, 28, + 11, 30, 130, 38, 11, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 22, 11, 24, - 25, 26, 11, 11, 29, 30, 11, 11, 25, 11, - 25, 11, 60, 62, 21, 25, 11, 11, 145 + 55, 56, 0, 28, 11, 3, 4, 5, 6, 7, + 8, 9, 28, 24, 12, 13, 14, 15, 16, 17, + 18, 19, 51, 52, 53, 54, 55, 56, 26, 27, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 38, + 11, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 22, 11, + 24, 11, 11, 11, 11, 24, 11, 20, 59, 61, + 24, 11, 11, 140 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 64, 0, 3, 4, 5, 6, 7, 8, 9, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, - 28, 65, 29, 38, 10, 25, 32, 33, 34, 35, - 36, 37, 54, 55, 58, 59, 61, 75, 25, 25, - 11, 75, 11, 29, 31, 29, 31, 33, 11, 33, - 26, 29, 30, 66, 67, 66, 66, 66, 25, 68, - 66, 25, 61, 75, 75, 75, 75, 75, 11, 39, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 11, 11, 11, - 11, 11, 11, 11, 29, 29, 11, 26, 29, 30, - 11, 11, 11, 11, 25, 69, 70, 71, 11, 25, - 62, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 11, - 11, 33, 21, 60, 62, 40, 11, 33, 22, 24, - 25, 26, 29, 30, 72, 73, 74, 23, 25, 75, - 11, 33, 25, 11, 74, 11, 33, 11 + 0, 63, 0, 3, 4, 5, 6, 7, 8, 9, + 12, 13, 14, 15, 16, 17, 18, 19, 26, 27, + 64, 28, 37, 10, 24, 31, 32, 33, 34, 35, + 36, 53, 54, 57, 58, 60, 74, 24, 24, 11, + 74, 11, 28, 30, 32, 11, 32, 25, 28, 29, + 65, 66, 65, 65, 65, 24, 67, 65, 24, 60, + 74, 74, 74, 74, 74, 11, 38, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 11, 11, 11, 11, 11, 28, + 28, 11, 25, 28, 29, 11, 11, 11, 11, 24, + 68, 69, 70, 11, 24, 61, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 11, 11, 32, 20, 59, 61, + 39, 11, 32, 21, 23, 24, 25, 28, 29, 71, + 72, 73, 22, 24, 74, 11, 32, 24, 11, 73, + 11, 32, 11 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -756,7 +797,7 @@ static const unsigned char yystos[] = #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily @@ -778,26 +819,59 @@ do \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ + { \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -820,36 +894,30 @@ do { \ YYFPRINTF Args; \ } while (0) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) - -# define YYDSYMPRINTF(Title, Token, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ + yysymprint (stderr, \ + Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (cinluded). | +| TOP (included). | `------------------------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (short *bottom, short *top) +yy_stack_print (short int *bottom, short int *top) #else static void yy_stack_print (bottom, top) - short *bottom; - short *top; + short int *bottom; + short int *top; #endif { YYFPRINTF (stderr, "Stack now"); @@ -879,13 +947,13 @@ yy_reduce_print (yyrule) #endif { int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", yyrule - 1, yylno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ @@ -899,8 +967,7 @@ do { \ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -915,13 +982,9 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -943,7 +1006,7 @@ yystrlen (yystr) const char *yystr; # endif { - register const char *yys = yystr; + const char *yys = yystr; while (*yys++ != '\0') continue; @@ -968,8 +1031,8 @@ yystpcpy (yydest, yysrc) const char *yysrc; # endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -979,7 +1042,55 @@ yystpcpy (yydest, yysrc) # endif # endif -#endif /* !YYERROR_VERBOSE */ +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + size_t yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +#endif /* YYERROR_VERBOSE */ @@ -1003,15 +1114,15 @@ yysymprint (yyoutput, yytype, yyvaluep) (void) yyvaluep; if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif switch (yytype) { default: @@ -1027,10 +1138,11 @@ yysymprint (yyoutput, yytype, yyvaluep) #if defined (__STDC__) || defined (__cplusplus) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif @@ -1038,6 +1150,10 @@ yydestruct (yytype, yyvaluep) /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + switch (yytype) { @@ -1065,10 +1181,10 @@ int yyparse (); -/* The lookahead symbol. */ +/* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -1094,17 +1210,17 @@ yyparse (void) #else int yyparse () - + ; #endif #endif { - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ + /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; /* Three stacks and their tools: @@ -1116,14 +1232,14 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp; @@ -1180,14 +1296,14 @@ yyparse () these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; + short int *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -1198,21 +1314,21 @@ yyparse () } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short *yyss1 = yyss; + short int *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -1244,18 +1360,18 @@ yyparse () yybackup: /* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ +/* Read a look-ahead token if we need one and don't already have one. */ /* yyresume: */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1270,7 +1386,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1290,8 +1406,8 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) @@ -1341,52 +1457,42 @@ yyreduce: switch (yyn) { case 4: -#line 186 "wpp/ppy.y" - { pp_do_include(yyvsp[-1].cptr, LOCAL_INCLUDE); ;} +#line 186 "tools\\wpp_new\\ppy.y" + { pp_do_include((yyvsp[-1].cptr), 1); ;} break; case 5: -#line 187 "wpp/ppy.y" - { pp_do_include(yyvsp[-1].cptr, GLOBAL_INCLUDE); ;} +#line 187 "tools\\wpp_new\\ppy.y" + { pp_do_include((yyvsp[-1].cptr), 0); ;} break; case 6: -#line 188 "wpp/ppy.y" - { pp_do_include(yyvsp[-1].cptr, INCLUDE_NEXT); ;} +#line 188 "tools\\wpp_new\\ppy.y" + { pp_next_if_state(boolean(&(yyvsp[-1].cval))); ;} break; case 7: -#line 189 "wpp/ppy.y" - { pp_do_include(yyvsp[-1].cptr, INCLUDE_NEXT); ;} +#line 189 "tools\\wpp_new\\ppy.y" + { pp_next_if_state(pplookup((yyvsp[-1].cptr)) != NULL); free((yyvsp[-1].cptr)); ;} break; case 8: -#line 190 "wpp/ppy.y" - { pp_next_if_state(boolean(&yyvsp[-1].cval)); ;} - break; - - case 9: -#line 191 "wpp/ppy.y" - { pp_next_if_state(pplookup(yyvsp[-1].cptr) != NULL); free(yyvsp[-1].cptr); ;} - break; - - case 10: -#line 192 "wpp/ppy.y" +#line 190 "tools\\wpp_new\\ppy.y" { - int t = pplookup(yyvsp[-1].cptr) == NULL; + int t = pplookup((yyvsp[-1].cptr)) == NULL; if(pp_incl_state.state == 0 && t && !pp_incl_state.seen_junk) { pp_incl_state.state = 1; - pp_incl_state.ppp = yyvsp[-1].cptr; + pp_incl_state.ppp = (yyvsp[-1].cptr); pp_incl_state.ifdepth = pp_get_if_depth(); } else if(pp_incl_state.state != 1) { pp_incl_state.state = -1; - free(yyvsp[-1].cptr); + free((yyvsp[-1].cptr)); } else - free(yyvsp[-1].cptr); + free((yyvsp[-1].cptr)); pp_next_if_state(t); if(pp_status.debug) fprintf(stderr, "tIFNDEF: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", @@ -1394,8 +1500,8 @@ yyreduce: ;} break; - case 11: -#line 212 "wpp/ppy.y" + case 9: +#line 210 "tools\\wpp_new\\ppy.y" { pp_if_state_t s = pp_pop_if(); switch(s) @@ -1405,22 +1511,22 @@ yyreduce: pp_push_if(if_elif); break; case if_false: - pp_push_if(boolean(&yyvsp[-1].cval) ? if_true : if_false); + pp_push_if(boolean(&(yyvsp[-1].cval)) ? if_true : if_false); break; case if_ignore: pp_push_if(if_ignore); break; case if_elsetrue: case if_elsefalse: - pperror("#elif cannot follow #else"); + ppy_error("#elif cannot follow #else"); default: pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #elif directive", s); } ;} break; - case 12: -#line 233 "wpp/ppy.y" + case 10: +#line 231 "tools\\wpp_new\\ppy.y" { pp_if_state_t s = pp_pop_if(); switch(s) @@ -1439,15 +1545,15 @@ yyreduce: break; case if_elsetrue: case if_elsefalse: - pperror("#else clause already defined"); + ppy_error("#else clause already defined"); default: pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #else directive", s); } ;} break; - case 13: -#line 256 "wpp/ppy.y" + case 11: +#line 254 "tools\\wpp_new\\ppy.y" { pp_pop_if(); if(pp_incl_state.ifdepth == pp_get_if_depth() && pp_incl_state.state == 1) @@ -1465,395 +1571,396 @@ yyreduce: ;} break; + case 12: +#line 269 "tools\\wpp_new\\ppy.y" + { pp_del_define((yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); ;} + break; + + case 13: +#line 270 "tools\\wpp_new\\ppy.y" + { pp_add_define((yyvsp[-2].cptr), (yyvsp[-1].cptr)); ;} + break; + case 14: -#line 271 "wpp/ppy.y" - { pp_del_define(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;} - break; - - case 15: -#line 272 "wpp/ppy.y" - { pp_add_define(yyvsp[-2].cptr, yyvsp[-1].cptr); ;} - break; - - case 16: -#line 273 "wpp/ppy.y" +#line 271 "tools\\wpp_new\\ppy.y" { - pp_add_macro(yyvsp[-5].cptr, macro_args, nmacro_args, yyvsp[-1].mtext); + pp_add_macro((yyvsp[-5].cptr), macro_args, nmacro_args, (yyvsp[-1].mtext)); ;} break; + case 15: +#line 274 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "# %d %s\n", (yyvsp[-2].sint) , (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); ;} + break; + + case 16: +#line 275 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "# %d %s\n", (yyvsp[-2].sint) , (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); ;} + break; + case 17: -#line 276 "wpp/ppy.y" - { fprintf(ppout, "# %d %s\n", yyvsp[-2].sint , yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;} +#line 277 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "# %d %s %d\n", (yyvsp[-3].sint), (yyvsp[-2].cptr), (yyvsp[-1].sint)); free((yyvsp[-2].cptr)); ;} break; case 18: -#line 277 "wpp/ppy.y" - { fprintf(ppout, "# %d %s\n", yyvsp[-2].sint , yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;} +#line 279 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "# %d %s %d %d\n", (yyvsp[-4].sint) ,(yyvsp[-3].cptr), (yyvsp[-2].sint), (yyvsp[-1].sint)); free((yyvsp[-3].cptr)); ;} break; case 19: -#line 279 "wpp/ppy.y" - { fprintf(ppout, "# %d %s %d\n", yyvsp[-3].sint, yyvsp[-2].cptr, yyvsp[-1].sint); free(yyvsp[-2].cptr); ;} +#line 281 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "# %d %s %d %d %d\n", (yyvsp[-5].sint) ,(yyvsp[-4].cptr) ,(yyvsp[-3].sint) ,(yyvsp[-2].sint), (yyvsp[-1].sint)); free((yyvsp[-4].cptr)); ;} break; case 20: -#line 281 "wpp/ppy.y" - { fprintf(ppout, "# %d %s %d %d\n", yyvsp[-4].sint ,yyvsp[-3].cptr, yyvsp[-2].sint, yyvsp[-1].sint); free(yyvsp[-3].cptr); ;} - break; - - case 21: -#line 283 "wpp/ppy.y" - { fprintf(ppout, "# %d %s %d %d %d\n", yyvsp[-5].sint ,yyvsp[-4].cptr ,yyvsp[-3].sint ,yyvsp[-2].sint, yyvsp[-1].sint); free(yyvsp[-4].cptr); ;} +#line 283 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "# %d %s %d %d %d %d\n", (yyvsp[-6].sint) ,(yyvsp[-5].cptr) ,(yyvsp[-4].sint) ,(yyvsp[-3].sint), (yyvsp[-2].sint), (yyvsp[-1].sint)); free((yyvsp[-5].cptr)); ;} break; case 22: -#line 285 "wpp/ppy.y" - { fprintf(ppout, "# %d %s %d %d %d %d\n", yyvsp[-6].sint ,yyvsp[-5].cptr ,yyvsp[-4].sint ,yyvsp[-3].sint, yyvsp[-2].sint, yyvsp[-1].sint); free(yyvsp[-5].cptr); ;} +#line 285 "tools\\wpp_new\\ppy.y" + { ppy_error("#error directive: '%s'", (yyvsp[-1].cptr)); if((yyvsp[-1].cptr)) free((yyvsp[-1].cptr)); ;} + break; + + case 23: +#line 286 "tools\\wpp_new\\ppy.y" + { ppy_warning("#warning directive: '%s'", (yyvsp[-1].cptr)); if((yyvsp[-1].cptr)) free((yyvsp[-1].cptr)); ;} break; case 24: -#line 287 "wpp/ppy.y" - { pperror("#error directive: '%s'", yyvsp[-1].cptr); if(yyvsp[-1].cptr) free(yyvsp[-1].cptr); ;} +#line 287 "tools\\wpp_new\\ppy.y" + { fprintf(ppy_out, "#pragma %s\n", (yyvsp[-1].cptr) ? (yyvsp[-1].cptr) : ""); if ((yyvsp[-1].cptr)) free((yyvsp[-1].cptr)); ;} break; case 25: -#line 288 "wpp/ppy.y" - { ppwarning("#warning directive: '%s'", yyvsp[-1].cptr); if(yyvsp[-1].cptr) free(yyvsp[-1].cptr); ;} +#line 288 "tools\\wpp_new\\ppy.y" + { if(pp_status.pedantic) ppy_warning("#ident ignored (arg: '%s')", (yyvsp[-1].cptr)); if((yyvsp[-1].cptr)) free((yyvsp[-1].cptr)); ;} break; case 26: -#line 289 "wpp/ppy.y" - { fprintf(ppout, "#pragma %s\n", yyvsp[-1].cptr ? yyvsp[-1].cptr : ""); if (yyvsp[-1].cptr) free(yyvsp[-1].cptr); ;} +#line 289 "tools\\wpp_new\\ppy.y" + { + int nl=strlen((yyvsp[0].cptr)) +3; + char *fn=pp_xmalloc(nl); + sprintf(fn,"\"%s\"",(yyvsp[0].cptr)); + free((yyvsp[0].cptr)); + pp_do_include(fn,1); + ;} break; case 27: -#line 290 "wpp/ppy.y" - { if(pp_status.pedantic) ppwarning("#ident ignored (arg: '%s')", yyvsp[-1].cptr); if(yyvsp[-1].cptr) free(yyvsp[-1].cptr); ;} +#line 296 "tools\\wpp_new\\ppy.y" + { + pp_do_include((yyvsp[0].cptr),1); + ;} break; case 28: -#line 291 "wpp/ppy.y" - { - int nl=strlen(yyvsp[0].cptr) +3; - char *fn=pp_xmalloc(nl); - sprintf(fn,"\"%s\"",yyvsp[0].cptr); - free(yyvsp[0].cptr); - pp_do_include(fn,LOCAL_INCLUDE); - ;} +#line 302 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = NULL; ;} break; case 29: -#line 298 "wpp/ppy.y" - { - pp_do_include(yyvsp[0].cptr,LOCAL_INCLUDE); - ;} +#line 303 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = (yyvsp[0].cptr); ;} break; case 30: -#line 304 "wpp/ppy.y" - { yyval.cptr = NULL; ;} +#line 306 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = (yyvsp[0].cptr); ;} break; case 31: -#line 305 "wpp/ppy.y" - { yyval.cptr = yyvsp[0].cptr; ;} +#line 307 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = (yyvsp[0].cptr); ;} break; case 32: -#line 308 "wpp/ppy.y" - { yyval.cptr = yyvsp[0].cptr; ;} +#line 308 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = (yyvsp[0].cptr); ;} break; case 33: -#line 309 "wpp/ppy.y" - { yyval.cptr = yyvsp[0].cptr; ;} +#line 309 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = merge_text((yyvsp[-1].cptr), (yyvsp[0].cptr)); ;} break; case 34: -#line 310 "wpp/ppy.y" - { yyval.cptr = yyvsp[0].cptr; ;} +#line 310 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = merge_text((yyvsp[-1].cptr), (yyvsp[0].cptr)); ;} break; case 35: -#line 311 "wpp/ppy.y" - { yyval.cptr = merge_text(yyvsp[-1].cptr, yyvsp[0].cptr); ;} +#line 311 "tools\\wpp_new\\ppy.y" + { (yyval.cptr) = merge_text((yyvsp[-1].cptr), (yyvsp[0].cptr)); ;} break; case 36: -#line 312 "wpp/ppy.y" - { yyval.cptr = merge_text(yyvsp[-1].cptr, yyvsp[0].cptr); ;} - break; - - case 37: -#line 313 "wpp/ppy.y" - { yyval.cptr = merge_text(yyvsp[-1].cptr, yyvsp[0].cptr); ;} - break; - - case 38: -#line 316 "wpp/ppy.y" +#line 314 "tools\\wpp_new\\ppy.y" { macro_args = NULL; nmacro_args = 0; ;} break; + case 37: +#line 317 "tools\\wpp_new\\ppy.y" + { (yyval.sint) = 0; macro_args = NULL; nmacro_args = 0; ;} + break; + + case 38: +#line 318 "tools\\wpp_new\\ppy.y" + { (yyval.sint) = nmacro_args; ;} + break; + case 39: -#line 319 "wpp/ppy.y" - { yyval.sint = 0; macro_args = NULL; nmacro_args = 0; ;} +#line 321 "tools\\wpp_new\\ppy.y" + { (yyval.marg) = (yyvsp[0].marg); ;} break; case 40: -#line 320 "wpp/ppy.y" - { yyval.sint = nmacro_args; ;} +#line 322 "tools\\wpp_new\\ppy.y" + { (yyval.marg) = add_new_marg(NULL, arg_list); nmacro_args *= -1; ;} break; case 41: -#line 323 "wpp/ppy.y" - { yyval.marg = yyvsp[0].marg; ;} +#line 325 "tools\\wpp_new\\ppy.y" + { (yyval.marg) = add_new_marg((yyvsp[0].cptr), arg_single); ;} break; case 42: -#line 324 "wpp/ppy.y" - { yyval.marg = add_new_marg(NULL, arg_list); nmacro_args *= -1; ;} +#line 326 "tools\\wpp_new\\ppy.y" + { (yyval.marg) = add_new_marg((yyvsp[0].cptr), arg_single); ;} break; case 43: -#line 327 "wpp/ppy.y" - { yyval.marg = add_new_marg(yyvsp[0].cptr, arg_single); ;} +#line 330 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = NULL; ;} break; case 44: -#line 328 "wpp/ppy.y" - { yyval.marg = add_new_marg(yyvsp[0].cptr, arg_single); ;} - break; - - case 45: -#line 332 "wpp/ppy.y" - { yyval.mtext = NULL; ;} - break; - - case 46: -#line 333 "wpp/ppy.y" +#line 331 "tools\\wpp_new\\ppy.y" { - for(yyval.mtext = yyvsp[0].mtext; yyval.mtext && yyval.mtext->prev; yyval.mtext = yyval.mtext->prev) + for((yyval.mtext) = (yyvsp[0].mtext); (yyval.mtext) && (yyval.mtext)->prev; (yyval.mtext) = (yyval.mtext)->prev) ; ;} break; + case 45: +#line 337 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = (yyvsp[0].mtext); ;} + break; + + case 46: +#line 338 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = combine_mtext((yyvsp[-1].mtext), (yyvsp[0].mtext)); ;} + break; + case 47: -#line 339 "wpp/ppy.y" - { yyval.mtext = yyvsp[0].mtext; ;} +#line 341 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); ;} break; case 48: -#line 340 "wpp/ppy.y" - { yyval.mtext = combine_mtext(yyvsp[-1].mtext, yyvsp[0].mtext); ;} +#line 342 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); ;} break; case 49: -#line 343 "wpp/ppy.y" - { yyval.mtext = new_mtext(yyvsp[0].cptr, 0, exp_text); ;} +#line 343 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); ;} break; case 50: -#line 344 "wpp/ppy.y" - { yyval.mtext = new_mtext(yyvsp[0].cptr, 0, exp_text); ;} +#line 344 "tools\\wpp_new\\ppy.y" + { (yyval.mtext) = new_mtext(NULL, 0, exp_concat); ;} break; case 51: -#line 345 "wpp/ppy.y" - { yyval.mtext = new_mtext(yyvsp[0].cptr, 0, exp_text); ;} +#line 345 "tools\\wpp_new\\ppy.y" + { + int mat = marg_index((yyvsp[0].cptr)); + if(mat < 0) + ppy_error("Stringification identifier must be an argument parameter"); + (yyval.mtext) = new_mtext(NULL, mat, exp_stringize); + ;} break; case 52: -#line 346 "wpp/ppy.y" - { yyval.mtext = new_mtext(NULL, 0, exp_concat); ;} +#line 351 "tools\\wpp_new\\ppy.y" + { + int mat = marg_index((yyvsp[0].cptr)); + if(mat >= 0) + (yyval.mtext) = new_mtext(NULL, mat, exp_subst); + else + (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); + ;} break; case 53: -#line 347 "wpp/ppy.y" - { - int mat = marg_index(yyvsp[0].cptr); - if(mat < 0) - pperror("Stringification identifier must be an argument parameter"); - yyval.mtext = new_mtext(NULL, mat, exp_stringize); - ;} +#line 360 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = (yyvsp[0].sint); ;} break; case 54: -#line 353 "wpp/ppy.y" - { - int mat = marg_index(yyvsp[0].cptr); - if(mat >= 0) - yyval.mtext = new_mtext(NULL, mat, exp_subst); - else - yyval.mtext = new_mtext(yyvsp[0].cptr, 0, exp_text); - ;} +#line 361 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_uint; (yyval.cval).val.ui = (yyvsp[0].uint); ;} break; case 55: -#line 362 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = yyvsp[0].sint; ;} +#line 362 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_slong; (yyval.cval).val.sl = (yyvsp[0].slong); ;} break; case 56: -#line 363 "wpp/ppy.y" - { yyval.cval.type = cv_uint; yyval.cval.val.ui = yyvsp[0].uint; ;} +#line 363 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_ulong; (yyval.cval).val.ul = (yyvsp[0].ulong); ;} break; case 57: -#line 364 "wpp/ppy.y" - { yyval.cval.type = cv_slong; yyval.cval.val.sl = yyvsp[0].slong; ;} +#line 364 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sll; (yyval.cval).val.sll = (yyvsp[0].sll); ;} break; case 58: -#line 365 "wpp/ppy.y" - { yyval.cval.type = cv_ulong; yyval.cval.val.ul = yyvsp[0].ulong; ;} +#line 365 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_ull; (yyval.cval).val.ull = (yyvsp[0].ull); ;} break; case 59: -#line 366 "wpp/ppy.y" - { yyval.cval.type = cv_sll; yyval.cval.val.sl = yyvsp[0].sll; ;} +#line 366 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = pplookup((yyvsp[0].cptr)) != NULL; ;} break; case 60: -#line 367 "wpp/ppy.y" - { yyval.cval.type = cv_ull; yyval.cval.val.ul = yyvsp[0].ull; ;} +#line 367 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = pplookup((yyvsp[-1].cptr)) != NULL; ;} break; case 61: -#line 368 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = pplookup(yyvsp[0].cptr) != NULL; ;} +#line 368 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = 0; ;} break; case 62: -#line 369 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = pplookup(yyvsp[-1].cptr) != NULL; ;} +#line 369 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = boolean(&(yyvsp[-2].cval)) || boolean(&(yyvsp[0].cval)); ;} break; case 63: -#line 370 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = 0; ;} +#line 370 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = boolean(&(yyvsp[-2].cval)) && boolean(&(yyvsp[0].cval)); ;} break; case 64: -#line 371 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = boolean(&yyvsp[-2].cval) || boolean(&yyvsp[0].cval); ;} +#line 371 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), ==) ;} break; case 65: -#line 372 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = boolean(&yyvsp[-2].cval) && boolean(&yyvsp[0].cval); ;} +#line 372 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), !=) ;} break; case 66: -#line 373 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, ==) ;} +#line 373 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), <) ;} break; case 67: -#line 374 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, !=) ;} +#line 374 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), >) ;} break; case 68: -#line 375 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, <) ;} +#line 375 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), <=) ;} break; case 69: -#line 376 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, >) ;} +#line 376 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), >=) ;} break; case 70: -#line 377 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, <=) ;} +#line 377 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), +) ;} break; case 71: -#line 378 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, >=) ;} +#line 378 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), -) ;} break; case 72: -#line 379 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, +) ;} +#line 379 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), ^) ;} break; case 73: -#line 380 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, -) ;} +#line 380 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), &) ;} break; case 74: -#line 381 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, ^) ;} +#line 381 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), |) ;} break; case 75: -#line 382 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, &) ;} +#line 382 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), *) ;} break; case 76: -#line 383 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, |) ;} +#line 383 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), /) ;} break; case 77: -#line 384 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, *) ;} +#line 384 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), <<) ;} break; case 78: -#line 385 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, /) ;} +#line 385 "tools\\wpp_new\\ppy.y" + { promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), >>) ;} break; case 79: -#line 386 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, <<) ;} +#line 386 "tools\\wpp_new\\ppy.y" + { (yyval.cval) = (yyvsp[0].cval); ;} break; case 80: -#line 387 "wpp/ppy.y" - { promote_equal_size(&yyvsp[-2].cval, &yyvsp[0].cval); BIN_OP(yyval.cval, yyvsp[-2].cval, yyvsp[0].cval, >>) ;} +#line 387 "tools\\wpp_new\\ppy.y" + { UNARY_OP((yyval.cval), (yyvsp[0].cval), -) ;} break; case 81: -#line 388 "wpp/ppy.y" - { yyval.cval = yyvsp[0].cval; ;} +#line 388 "tools\\wpp_new\\ppy.y" + { UNARY_OP((yyval.cval), (yyvsp[0].cval), ~) ;} break; case 82: -#line 389 "wpp/ppy.y" - { UNARY_OP(yyval.cval, yyvsp[0].cval, -) ;} +#line 389 "tools\\wpp_new\\ppy.y" + { (yyval.cval).type = cv_sint; (yyval.cval).val.si = !boolean(&(yyvsp[0].cval)); ;} break; case 83: -#line 390 "wpp/ppy.y" - { UNARY_OP(yyval.cval, yyvsp[0].cval, ~) ;} +#line 390 "tools\\wpp_new\\ppy.y" + { (yyval.cval) = (yyvsp[-1].cval); ;} break; case 84: -#line 391 "wpp/ppy.y" - { yyval.cval.type = cv_sint; yyval.cval.val.si = !boolean(&yyvsp[0].cval); ;} - break; - - case 85: -#line 392 "wpp/ppy.y" - { yyval.cval = yyvsp[-1].cval; ;} - break; - - case 86: -#line 393 "wpp/ppy.y" - { yyval.cval = boolean(&yyvsp[-4].cval) ? yyvsp[-2].cval : yyvsp[0].cval; ;} +#line 391 "tools\\wpp_new\\ppy.y" + { (yyval.cval) = boolean(&(yyvsp[-4].cval)) ? (yyvsp[-2].cval) : (yyvsp[0].cval); ;} break; + default: break; } -/* Line 999 of yacc.c. */ -#line 1858 "wpp/ppy.tab.c" +/* Line 1126 of yacc.c. */ +#line 1964 "tools\\wpp_new\\ppy.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -1892,12 +1999,36 @@ yyerrlab: if (YYPACT_NINF < yyn && yyn < YYLAST) { - YYSIZE_T yysize = 0; int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + char *yymsg = 0; +# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; +#if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +#endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; @@ -1905,86 +2036,115 @@ yyerrlab: /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); - yyprefix = ", expecting "; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { - yysize = 0; + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; break; } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - if (yycount < 5) + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + + if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yymsg; + int yyi = 0; + while ((*yyp = *yyf)) { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else - yyerror ("syntax error; also virtual memory exhausted"); + { + yyerror (YY_("syntax error")); + goto yyexhaustedlab; + } } else #endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + yyerror (YY_("syntax error")); } if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ - /* Return failure if at end of input. */ - if (yychar == YYEOF) + if (yychar <= YYEOF) { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; } - - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - + else + { + yydestruct ("Error: discarding", yytoken, &yylval); + yychar = YYEMPTY; + } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; -/*----------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action. | -`----------------------------------------------------*/ +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (0) + goto yyerrorlab; + +yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ @@ -2006,22 +2166,22 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - yyvsp--; - yystate = *--yyssp; + yydestruct ("Error: popping", yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -2041,16 +2201,25 @@ yyabortlab: goto yyreturn; #ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK; + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); @@ -2059,7 +2228,7 @@ yyreturn: } -#line 396 "wpp/ppy.y" +#line 394 "tools\\wpp_new\\ppy.y" /* diff --git a/reactos/tools/wpp/ppy.tab.h b/reactos/tools/wpp/ppy.tab.h index a8eed262d7e..d152cc64534 100644 --- a/reactos/tools/wpp/ppy.tab.h +++ b/reactos/tools/wpp/ppy.tab.h @@ -1,7 +1,7 @@ -/* A Bison parser, made by GNU Bison 1.875b. */ +/* A Bison parser, made by GNU Bison 2.1. */ /* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. @@ -39,42 +39,42 @@ tDEFINED = 265, tNL = 266, tINCLUDE = 267, - tINCLUDE_NEXT = 268, - tLINE = 269, - tGCCLINE = 270, - tERROR = 271, - tWARNING = 272, - tPRAGMA = 273, - tPPIDENT = 274, - tUNDEF = 275, - tMACROEND = 276, - tCONCAT = 277, - tELIPSIS = 278, - tSTRINGIZE = 279, - tIDENT = 280, - tLITERAL = 281, - tMACRO = 282, - tDEFINE = 283, - tDQSTRING = 284, - tSQSTRING = 285, - tIQSTRING = 286, - tUINT = 287, - tSINT = 288, - tULONG = 289, - tSLONG = 290, - tULONGLONG = 291, - tSLONGLONG = 292, - tRCINCLUDEPATH = 293, - tLOGOR = 294, - tLOGAND = 295, - tNE = 296, - tEQ = 297, - tGTE = 298, - tLTE = 299, - tRSHIFT = 300, - tLSHIFT = 301 + tLINE = 268, + tGCCLINE = 269, + tERROR = 270, + tWARNING = 271, + tPRAGMA = 272, + tPPIDENT = 273, + tUNDEF = 274, + tMACROEND = 275, + tCONCAT = 276, + tELIPSIS = 277, + tSTRINGIZE = 278, + tIDENT = 279, + tLITERAL = 280, + tMACRO = 281, + tDEFINE = 282, + tDQSTRING = 283, + tSQSTRING = 284, + tIQSTRING = 285, + tUINT = 286, + tSINT = 287, + tULONG = 288, + tSLONG = 289, + tULONGLONG = 290, + tSLONGLONG = 291, + tRCINCLUDEPATH = 292, + tLOGOR = 293, + tLOGAND = 294, + tNE = 295, + tEQ = 296, + tGTE = 297, + tLTE = 298, + tRSHIFT = 299, + tLSHIFT = 300 }; #endif +/* Tokens. */ #define tRCINCLUDE 258 #define tIF 259 #define tIFDEF 260 @@ -85,46 +85,45 @@ #define tDEFINED 265 #define tNL 266 #define tINCLUDE 267 -#define tINCLUDE_NEXT 268 -#define tLINE 269 -#define tGCCLINE 270 -#define tERROR 271 -#define tWARNING 272 -#define tPRAGMA 273 -#define tPPIDENT 274 -#define tUNDEF 275 -#define tMACROEND 276 -#define tCONCAT 277 -#define tELIPSIS 278 -#define tSTRINGIZE 279 -#define tIDENT 280 -#define tLITERAL 281 -#define tMACRO 282 -#define tDEFINE 283 -#define tDQSTRING 284 -#define tSQSTRING 285 -#define tIQSTRING 286 -#define tUINT 287 -#define tSINT 288 -#define tULONG 289 -#define tSLONG 290 -#define tULONGLONG 291 -#define tSLONGLONG 292 -#define tRCINCLUDEPATH 293 -#define tLOGOR 294 -#define tLOGAND 295 -#define tNE 296 -#define tEQ 297 -#define tGTE 298 -#define tLTE 299 -#define tRSHIFT 300 -#define tLSHIFT 301 +#define tLINE 268 +#define tGCCLINE 269 +#define tERROR 270 +#define tWARNING 271 +#define tPRAGMA 272 +#define tPPIDENT 273 +#define tUNDEF 274 +#define tMACROEND 275 +#define tCONCAT 276 +#define tELIPSIS 277 +#define tSTRINGIZE 278 +#define tIDENT 279 +#define tLITERAL 280 +#define tMACRO 281 +#define tDEFINE 282 +#define tDQSTRING 283 +#define tSQSTRING 284 +#define tIQSTRING 285 +#define tUINT 286 +#define tSINT 287 +#define tULONG 288 +#define tSLONG 289 +#define tULONGLONG 290 +#define tSLONGLONG 291 +#define tRCINCLUDEPATH 292 +#define tLOGOR 293 +#define tLOGAND 294 +#define tNE 295 +#define tEQ 296 +#define tGTE 297 +#define tLTE 298 +#define tRSHIFT 299 +#define tLSHIFT 300 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 126 "wpp/ppy.y" +#line 126 "tools\\wpp_new\\ppy.y" typedef union YYSTYPE { int sint; unsigned int uint; @@ -138,14 +137,14 @@ typedef union YYSTYPE { marg_t *marg; mtext_t *mtext; } YYSTYPE; -/* Line 1252 of yacc.c. */ -#line 143 "wpp/ppy.tab.h" +/* Line 1447 of yacc.c. */ +#line 142 "tools\\wpp_new\\ppy.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif -extern YYSTYPE pplval; +extern YYSTYPE ppy_lval; diff --git a/reactos/tools/wpp/ppy.y b/reactos/tools/wpp/ppy.y index 63b25a0d99d..3209ee2cc36 100644 --- a/reactos/tools/wpp/ppy.y +++ b/reactos/tools/wpp/ppy.y @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * History: * 24-Apr-2000 BS Restructured the lot to fit the new scanner @@ -29,6 +29,7 @@ %{ #include "config.h" +#include "wine/port.h" #include #include @@ -138,7 +139,7 @@ static int nmacro_args; %token tRCINCLUDE %token tIF tIFDEF tIFNDEF tELSE tELIF tENDIF tDEFINED tNL -%token tINCLUDE tINCLUDE_NEXT tLINE tGCCLINE tERROR tWARNING tPRAGMA tPPIDENT +%token tINCLUDE tLINE tGCCLINE tERROR tWARNING tPRAGMA tPPIDENT %token tUNDEF tMACROEND tCONCAT tELIPSIS tSTRINGIZE %token tIDENT tLITERAL tMACRO tDEFINE %token tDQSTRING tSQSTRING tIQSTRING @@ -182,10 +183,8 @@ pp_file : /* Empty */ ; preprocessor - : tINCLUDE tDQSTRING tNL { pp_do_include($2, LOCAL_INCLUDE); } - | tINCLUDE tIQSTRING tNL { pp_do_include($2, GLOBAL_INCLUDE); } - | tINCLUDE_NEXT tDQSTRING tNL { pp_do_include($2, INCLUDE_NEXT); } - | tINCLUDE_NEXT tIQSTRING tNL { pp_do_include($2, INCLUDE_NEXT); } + : tINCLUDE tDQSTRING tNL { pp_do_include($2, 1); } + | tINCLUDE tIQSTRING tNL { pp_do_include($2, 0); } | tIF pp_expr tNL { pp_next_if_state(boolean(&$2)); } | tIFDEF tIDENT tNL { pp_next_if_state(pplookup($2) != NULL); free($2); } | tIFNDEF tIDENT tNL { @@ -224,7 +223,7 @@ preprocessor break; case if_elsetrue: case if_elsefalse: - pperror("#elif cannot follow #else"); + ppy_error("#elif cannot follow #else"); default: pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #elif directive", s); } @@ -247,7 +246,7 @@ preprocessor break; case if_elsetrue: case if_elsefalse: - pperror("#else clause already defined"); + ppy_error("#else clause already defined"); default: pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #else directive", s); } @@ -272,30 +271,30 @@ preprocessor | tMACRO res_arg allmargs tMACROEND opt_mtexts tNL { pp_add_macro($1, macro_args, nmacro_args, $5); } - | tLINE tSINT tDQSTRING tNL { fprintf(ppout, "# %d %s\n", $2 , $3); free($3); } - | tGCCLINE tSINT tDQSTRING tNL { fprintf(ppout, "# %d %s\n", $2 , $3); free($3); } + | tLINE tSINT tDQSTRING tNL { fprintf(ppy_out, "# %d %s\n", $2 , $3); free($3); } + | tGCCLINE tSINT tDQSTRING tNL { fprintf(ppy_out, "# %d %s\n", $2 , $3); free($3); } | tGCCLINE tSINT tDQSTRING tSINT tNL - { fprintf(ppout, "# %d %s %d\n", $2, $3, $4); free($3); } + { fprintf(ppy_out, "# %d %s %d\n", $2, $3, $4); free($3); } | tGCCLINE tSINT tDQSTRING tSINT tSINT tNL - { fprintf(ppout, "# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); } + { fprintf(ppy_out, "# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); } | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tNL - { fprintf(ppout, "# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); } + { fprintf(ppy_out, "# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); } | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL - { fprintf(ppout, "# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); } + { fprintf(ppy_out, "# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); } | tGCCLINE tNL /* The null-token */ - | tERROR opt_text tNL { pperror("#error directive: '%s'", $2); if($2) free($2); } - | tWARNING opt_text tNL { ppwarning("#warning directive: '%s'", $2); if($2) free($2); } - | tPRAGMA opt_text tNL { fprintf(ppout, "#pragma %s\n", $2 ? $2 : ""); if ($2) free($2); } - | tPPIDENT opt_text tNL { if(pp_status.pedantic) ppwarning("#ident ignored (arg: '%s')", $2); if($2) free($2); } + | tERROR opt_text tNL { ppy_error("#error directive: '%s'", $2); if($2) free($2); } + | tWARNING opt_text tNL { ppy_warning("#warning directive: '%s'", $2); if($2) free($2); } + | tPRAGMA opt_text tNL { fprintf(ppy_out, "#pragma %s\n", $2 ? $2 : ""); if ($2) free($2); } + | tPPIDENT opt_text tNL { if(pp_status.pedantic) ppy_warning("#ident ignored (arg: '%s')", $2); if($2) free($2); } | tRCINCLUDE tRCINCLUDEPATH { int nl=strlen($2) +3; char *fn=pp_xmalloc(nl); sprintf(fn,"\"%s\"",$2); free($2); - pp_do_include(fn,LOCAL_INCLUDE); + pp_do_include(fn,1); } | tRCINCLUDE tDQSTRING { - pp_do_include($2,LOCAL_INCLUDE); + pp_do_include($2,1); } /*| tNL*/ ; @@ -346,7 +345,7 @@ mtext : tLITERAL { $$ = new_mtext($1, 0, exp_text); } | tSTRINGIZE tIDENT { int mat = marg_index($2); if(mat < 0) - pperror("Stringification identifier must be an argument parameter"); + ppy_error("Stringification identifier must be an argument parameter"); $$ = new_mtext(NULL, mat, exp_stringize); } | tIDENT { @@ -362,8 +361,8 @@ pp_expr : tSINT { $$.type = cv_sint; $$.val.si = $1; } | tUINT { $$.type = cv_uint; $$.val.ui = $1; } | tSLONG { $$.type = cv_slong; $$.val.sl = $1; } | tULONG { $$.type = cv_ulong; $$.val.ul = $1; } - | tSLONGLONG { $$.type = cv_sll; $$.val.sl = $1; } - | tULONGLONG { $$.type = cv_ull; $$.val.ul = $1; } + | tSLONGLONG { $$.type = cv_sll; $$.val.sll = $1; } + | tULONGLONG { $$.type = cv_ull; $$.val.ull = $1; } | tDEFINED tIDENT { $$.type = cv_sint; $$.val.si = pplookup($2) != NULL; } | tDEFINED '(' tIDENT ')' { $$.type = cv_sint; $$.val.si = pplookup($3) != NULL; } | tIDENT { $$.type = cv_sint; $$.val.si = 0; } diff --git a/reactos/tools/wpp/preproc.c b/reactos/tools/wpp/preproc.c index 08c8fba218d..c1fa3fc6ec7 100644 --- a/reactos/tools/wpp/preproc.c +++ b/reactos/tools/wpp/preproc.c @@ -13,10 +13,11 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" +#include "wine/port.h" #include #include @@ -202,7 +203,7 @@ void pp_del_define(const char *name) if((ppp = pplookup(name)) == NULL) { if(pp_status.pedantic) - ppwarning("%s was not defined", name); + ppy_warning("%s was not defined", name); return; } @@ -222,7 +223,7 @@ pp_entry_t *pp_add_define(char *def, char *text) if((ppp = pplookup(def)) != NULL) { if(pp_status.pedantic) - ppwarning("Redefinition of %s\n\tPrevious definition: %s:%d", def, ppp->filename, ppp->linenumber); + ppy_warning("Redefinition of %s\n\tPrevious definition: %s:%d", def, ppp->filename, ppp->linenumber); pp_del_define(def); } ppp = pp_xmalloc(sizeof(pp_entry_t)); @@ -264,7 +265,7 @@ pp_entry_t *pp_add_macro(char *id, marg_t *args[], int nargs, mtext_t *exp) if((ppp = pplookup(id)) != NULL) { if(pp_status.pedantic) - ppwarning("Redefinition of %s\n\tPrevious definition: %s:%d", id, ppp->filename, ppp->linenumber); + ppy_warning("Redefinition of %s\n\tPrevious definition: %s:%d", id, ppp->filename, ppp->linenumber); pp_del_define(id); } ppp = pp_xmalloc(sizeof(pp_entry_t)); @@ -313,7 +314,7 @@ pp_entry_t *pp_add_macro(char *id, marg_t *args[], int nargs, mtext_t *exp) * Include management *------------------------------------------------------------------------- */ -#if defined(_WIN32) || defined(__MSDOS__) +#if defined(_Windows) || defined(__MSDOS__) #define INCLUDESEPARATOR ";" #else #define INCLUDESEPARATOR ":" @@ -354,7 +355,7 @@ void wpp_add_include_path(const char *path) free(cpy); } -char *wpp_find_include(const char *name, const char *parent_name, int type) +char *wpp_find_include(const char *name, const char *parent_name) { char *cpy; char *cptr; @@ -380,7 +381,7 @@ char *wpp_find_include(const char *name, const char *parent_name, int type) } *cptr = '\0'; - if(type == LOCAL_INCLUDE && parent_name) + if(parent_name) { /* Search directory of parent include and then -I path */ const char *p; @@ -399,32 +400,8 @@ char *wpp_find_include(const char *name, const char *parent_name, int type) } free( path ); } - - /* Skip all directories till the current include file for #include_next. */ - if(type == INCLUDE_NEXT) - { - for(i = 1; i < nincludepath; i++) - { - char *path; - path = pp_xmalloc(strlen(includepath[i]) + strlen(cpy) + 2); - strcpy(path, includepath[i - 1]); - strcat(path, "/"); - strcat(path, cpy); - if(!strcmp(pp_status.input, path)) - { - free( path ); - break; - } - free( path ); - } - } - else - { - i = 0; - } - /* Search -I path */ - for(; i < nincludepath; i++) + for(i = 0; i < nincludepath; i++) { path = pp_xmalloc(strlen(includepath[i]) + strlen(cpy) + 2); strcpy(path, includepath[i]); @@ -443,12 +420,12 @@ char *wpp_find_include(const char *name, const char *parent_name, int type) return NULL; } -FILE *pp_open_include(const char *name, const char *parent_name, char **newpath, int type) +FILE *pp_open_include(const char *name, const char *parent_name, char **newpath) { char *path; FILE *fp; - if (!(path = wpp_find_include( name, parent_name, type ))) return NULL; + if (!(path = wpp_find_include( name, parent_name ))) return NULL; fp = fopen(path, "rt"); if (fp) @@ -547,7 +524,7 @@ void pp_push_if(pp_if_state_t s) pp_if_state_t pp_pop_if(void) { if(if_stack_idx <= 0) - pperror("#{endif,else,elif} without #{if,ifdef,ifndef} (#if-stack underflow)"); + ppy_error("#{endif,else,elif} without #{if,ifdef,ifndef} (#if-stack underflow)"); switch(pp_if_state()) { @@ -629,21 +606,21 @@ static void generic_msg(const char *s, const char *t, const char *n, va_list ap) fprintf(stderr, "\n"); } -int pperror(const char *s, ...) +int ppy_error(const char *s, ...) { va_list ap; va_start(ap, s); - generic_msg(s, "Error", pptext, ap); + generic_msg(s, "Error", ppy_text, ap); va_end(ap); exit(1); return 1; } -int ppwarning(const char *s, ...) +int ppy_warning(const char *s, ...) { va_list ap; va_start(ap, s); - generic_msg(s, "Warning", pptext, ap); + generic_msg(s, "Warning", ppy_text, ap); va_end(ap); return 0; } diff --git a/reactos/tools/wpp/wpp.c b/reactos/tools/wpp/wpp.c index d7b2dc842ce..7b87c367c15 100644 --- a/reactos/tools/wpp/wpp.c +++ b/reactos/tools/wpp/wpp.c @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" @@ -28,7 +28,7 @@ #include "wpp_private.h" #include "wine/wpp.h" -int ppdebug, pp_flex_debug; +int ppy_debug, pp_flex_debug; struct define { @@ -80,7 +80,7 @@ void wpp_add_define( const char *name, const char *value ) { if (!strcmp( def->name, name )) { - if (def->value) free( def->value ); + free( def->value ); def->value = pp_xstrdup(value); return; } @@ -103,7 +103,7 @@ void wpp_del_define( const char *name ) { if (!strcmp( def->name, name )) { - if (def->value) free( def->value ); + free( def->value ); def->value = NULL; return; } @@ -126,7 +126,7 @@ void wpp_add_cmdline_define( const char *value ) void wpp_set_debug( int lex_debug, int parser_debug, int msg_debug ) { pp_flex_debug = lex_debug; - ppdebug = parser_debug; + ppy_debug = parser_debug; pp_status.debug = msg_debug; } @@ -149,8 +149,8 @@ int wpp_parse( const char *input, FILE *output ) add_cmdline_defines(); add_special_defines(); - if (!input) ppin = stdin; - else if (!(ppin = fopen(input, "rt"))) + if (!input) ppy_in = stdin; + else if (!(ppy_in = fopen(input, "rt"))) { fprintf(stderr,"Could not open %s\n", input); exit(2); @@ -158,12 +158,12 @@ int wpp_parse( const char *input, FILE *output ) pp_status.input = input; - ppout = output; - fprintf(ppout, "# 1 \"%s\" 1\n", input ? input : ""); + ppy_out = output; + fprintf(ppy_out, "# 1 \"%s\" 1\n", input ? input : ""); - ret = ppparse(); + ret = ppy_parse(); - if (input) fclose(ppin); + if (input) fclose(ppy_in); pp_pop_define_state(); return ret; } diff --git a/reactos/tools/wpp/wpp.mak b/reactos/tools/wpp/wpp.mak index 0fca3844207..f58a361cbf8 100644 --- a/reactos/tools/wpp/wpp.mak +++ b/reactos/tools/wpp/wpp.mak @@ -53,6 +53,16 @@ $(WPP_INT_)ppy.tab.o: $(WPP_BASE_)ppy.tab.c | $(WPP_INT) $(ECHO_CC) ${host_gcc} $(WPP_HOST_CFLAGS) -c $< -o $@ +# +#$(WPP_BASE_)ppy.tab.c: $(WPP_BASE_)ppy.y +# bison -p ppy_ -d -o tools\wpp\ppy.tab.c tools\wpp\ppy.y +# + +# +#$(WPP_BASE_)lex.yy.c: $(WPP_BASE_)ppl.l +# flex -otools\wpp\lex.yy.c tools\wpp\ppl.l +# + .PHONY: wpp_clean wpp_clean: -@$(rm) $(WPP_TARGET) $(WPP_OBJECTS) 2>$(NUL) diff --git a/reactos/tools/wpp/wpp_private.h b/reactos/tools/wpp/wpp_private.h index 43f078e9169..ff0fae7a2f5 100644 --- a/reactos/tools/wpp/wpp_private.h +++ b/reactos/tools/wpp/wpp_private.h @@ -14,12 +14,16 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __WINE_WPP_PRIVATE_H #define __WINE_WPP_PRIVATE_H +#ifndef __WINE_CONFIG_H +# error You must include config.h to use this header +#endif + #include #include @@ -36,10 +40,6 @@ typedef struct includelogicentry { char *filename; /* The filename of the include */ } includelogicentry_t; -#define GLOBAL_INCLUDE 0 /* #include */ -#define LOCAL_INCLUDE 1 /* #include "foo.h" */ -#define INCLUDE_NEXT 2 /* #include_next */ - /* * The arguments of a macrodefinition */ @@ -137,14 +137,16 @@ typedef struct /* - * I assume that 'long long' exists in the compiler when it has a size - * of 8 or bigger. If not, then we revert to a simple 'long' for now. + * If the configure says we have long long then we can use it. Presumably + * if we have long long then we have strtoull and strtoll too. If that is + * not the case we will need to add to the configure tests. + * If we do not have long long , then we revert to a simple 'long' for now. * This should prevent most unexpected things with other compilers than * gcc and egcs for now. * In the future it should be possible to use another way, like a * structure, so that we can emulate the MS compiler. */ -#if defined(SIZEOF_LONGLONG) && SIZEOF_LONGLONG >= 8 +#ifdef HAVE_LONG_LONG typedef long long wrc_sll_t; typedef unsigned long long wrc_ull_t; #else @@ -204,7 +206,7 @@ void pp_pop_define_state(void); pp_entry_t *pp_add_define(char *def, char *text); pp_entry_t *pp_add_macro(char *ident, marg_t *args[], int nargs, mtext_t *exp); void pp_del_define(const char *name); -FILE *pp_open_include(const char *name, const char *parent_name, char **newpath, int type); +FILE *pp_open_include(const char *name, const char *parent_name, char **newpath); void pp_push_if(pp_if_state_t s); void pp_next_if_state(int); pp_if_state_t pp_pop_if(void); @@ -215,8 +217,8 @@ int pp_get_if_depth(void); #define __attribute__(x) /*nothing*/ #endif -int pperror(const char *s, ...) __attribute__((format (printf, 1, 2))); -int ppwarning(const char *s, ...) __attribute__((format (printf, 1, 2))); +int ppy_error(const char *s, ...) __attribute__((format (printf, 1, 2))); +int ppy_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); void pp_internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4))); /* current preprocessor state */ @@ -237,11 +239,11 @@ extern includelogicentry_t *pp_includelogiclist; /* * From ppl.l */ -extern FILE *ppin; -extern FILE *ppout; -extern char *pptext; +extern FILE *ppy_in; +extern FILE *ppy_out; +extern char *ppy_text; extern int pp_flex_debug; -int pplex(void); +int ppy_lex(void); void pp_do_include(char *fname, int type); void pp_push_ignore_state(void); @@ -251,7 +253,7 @@ void pp_pop_ignore_state(void); /* * From ppy.y */ -int ppparse(void); -extern int ppdebug; +int ppy_parse(void); +extern int ppy_debug; #endif /* __WINE_WPP_PRIVATE_H */ diff --git a/reactos/tools/wrc/parser.tab.c b/reactos/tools/wrc/parser.tab.c index dc5b617027b..931a82578bc 100644 --- a/reactos/tools/wrc/parser.tab.c +++ b/reactos/tools/wrc/parser.tab.c @@ -4859,7 +4859,7 @@ static raw_data_t *load_file(string_t *filename, language_t *lang) if (codepage <= 0 && filename->type != str_char) yyerror("Cannot convert filename to ASCII string"); name = convert_string( filename, str_char, codepage ); - if (!(path = wpp_find_include(name->str.cstr, input_name, 1))) + if (!(path = wpp_find_include(name->str.cstr, input_name))) yyerror("Cannot open file %s", name->str.cstr); if (!(fp = fopen( path, "rb" ))) yyerror("Cannot open file %s", name->str.cstr); diff --git a/reactos/tools/wrc/parser.y b/reactos/tools/wrc/parser.y index e113390ce77..59c524c9479 100644 --- a/reactos/tools/wrc/parser.y +++ b/reactos/tools/wrc/parser.y @@ -2320,7 +2320,7 @@ static raw_data_t *load_file(string_t *filename, language_t *lang) if (codepage <= 0 && filename->type != str_char) yyerror("Cannot convert filename to ASCII string"); name = convert_string( filename, str_char, codepage ); - if (!(path = wpp_find_include(name->str.cstr, input_name, 1))) + if (!(path = wpp_find_include(name->str.cstr, input_name))) yyerror("Cannot open file %s", name->str.cstr); if (!(fp = fopen( path, "rb" ))) yyerror("Cannot open file %s", name->str.cstr);