diff options
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r-- | src/glsl/glcpp/glcpp-parse.c | 432 | ||||
-rw-r--r-- | src/glsl/glcpp/glcpp-parse.h | 7 |
2 files changed, 224 insertions, 215 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c index e93f83263d9..2ef00a0c8d7 100644 --- a/src/glsl/glcpp/glcpp-parse.c +++ b/src/glsl/glcpp/glcpp-parse.c @@ -1,9 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ + +/* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -45,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.2" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -211,7 +212,7 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value); /* Line 189 of yacc.c */ -#line 215 "glcpp/glcpp-parse.c" +#line 216 "glcpp/glcpp-parse.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -299,7 +300,7 @@ typedef struct YYLTYPE /* Line 264 of yacc.c */ -#line 303 "glcpp/glcpp-parse.c" +#line 304 "glcpp/glcpp-parse.c" #ifdef short # undef short @@ -349,7 +350,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -623,17 +624,17 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 172, 172, 174, 178, 181, 186, 187, 191, 194, - 200, 203, 206, 209, 217, 228, 233, 238, 247, 258, - 261, 264, 273, 277, 286, 291, 292, 295, 298, 301, - 304, 307, 310, 313, 316, 319, 322, 325, 328, 331, - 334, 337, 340, 343, 346, 349, 352, 355, 358, 364, - 369, 377, 378, 382, 388, 389, 392, 394, 401, 405, - 409, 414, 420, 428, 434, 442, 446, 450, 454, 458, - 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, - 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, - 495 + 0, 180, 180, 182, 186, 189, 194, 195, 199, 202, + 208, 211, 214, 217, 225, 236, 241, 246, 255, 266, + 269, 272, 281, 285, 294, 299, 300, 303, 306, 309, + 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, + 342, 345, 348, 351, 354, 357, 360, 363, 366, 372, + 377, 385, 386, 390, 396, 397, 400, 402, 409, 413, + 417, 422, 428, 436, 442, 450, 454, 458, 462, 466, + 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, + 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, + 503 }; #endif @@ -936,18 +937,9 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -1004,7 +996,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1593,12 +1585,28 @@ YYLTYPE yylloc; yyvsp = yyvs; yylsp = yyls; -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +#if YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; #endif +/* User initialization code. */ + +/* Line 1242 of yacc.c */ +#line 147 "glcpp/glcpp-parse.y" +{ + yylloc.first_line = 1; + yylloc.first_column = 1; + yylloc.last_line = 1; + yylloc.last_column = 1; + yylloc.source = 0; +} + +/* Line 1242 of yacc.c */ +#line 1608 "glcpp/glcpp-parse.c" + yylsp[0] = yylloc; + goto yysetstate; /*------------------------------------------------------------. @@ -1783,8 +1791,8 @@ yyreduce: { case 4: -/* Line 1464 of yacc.c */ -#line 178 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 186 "glcpp/glcpp-parse.y" { glcpp_print(parser->output, "\n"); ;} @@ -1792,8 +1800,8 @@ yyreduce: case 5: -/* Line 1464 of yacc.c */ -#line 181 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 189 "glcpp/glcpp-parse.y" { _glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list)); glcpp_print(parser->output, "\n"); @@ -1803,8 +1811,8 @@ yyreduce: case 8: -/* Line 1464 of yacc.c */ -#line 191 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 199 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival)); ;} @@ -1812,8 +1820,8 @@ yyreduce: case 9: -/* Line 1464 of yacc.c */ -#line 194 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 202 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival)); ;} @@ -1821,8 +1829,8 @@ yyreduce: case 10: -/* Line 1464 of yacc.c */ -#line 200 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 208 "glcpp/glcpp-parse.y" { _define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list)); ;} @@ -1830,8 +1838,8 @@ yyreduce: case 11: -/* Line 1464 of yacc.c */ -#line 203 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 211 "glcpp/glcpp-parse.y" { _define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list)); ;} @@ -1839,8 +1847,8 @@ yyreduce: case 12: -/* Line 1464 of yacc.c */ -#line 206 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 214 "glcpp/glcpp-parse.y" { _define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list)); ;} @@ -1848,8 +1856,8 @@ yyreduce: case 13: -/* Line 1464 of yacc.c */ -#line 209 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 217 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str)); if (macro) { @@ -1862,8 +1870,8 @@ yyreduce: case 14: -/* Line 1464 of yacc.c */ -#line 217 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 225 "glcpp/glcpp-parse.y" { /* If we're skipping to the next #elif/#else case or to #endif, * don't bother expanding or parsing the expression. @@ -1879,8 +1887,8 @@ yyreduce: case 15: -/* Line 1464 of yacc.c */ -#line 228 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 236 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); talloc_free ((yyvsp[(2) - (4)].str)); @@ -1890,8 +1898,8 @@ yyreduce: case 16: -/* Line 1464 of yacc.c */ -#line 233 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 241 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); talloc_free ((yyvsp[(2) - (4)].str)); @@ -1901,8 +1909,8 @@ yyreduce: case 17: -/* Line 1464 of yacc.c */ -#line 238 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 246 "glcpp/glcpp-parse.y" { /* If we just finished a non-skipped #if/#ifdef/#ifndef block, * don't bother expanding or parsing the expression. @@ -1916,8 +1924,8 @@ yyreduce: case 18: -/* Line 1464 of yacc.c */ -#line 247 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 255 "glcpp/glcpp-parse.y" { /* #elif without an expression results in a warning if the * condition doesn't matter (we just handled #if 1 or such) @@ -1933,8 +1941,8 @@ yyreduce: case 19: -/* Line 1464 of yacc.c */ -#line 258 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 266 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1); ;} @@ -1942,8 +1950,8 @@ yyreduce: case 20: -/* Line 1464 of yacc.c */ -#line 261 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 269 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)])); ;} @@ -1951,8 +1959,8 @@ yyreduce: case 21: -/* Line 1464 of yacc.c */ -#line 264 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 272 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, "__VERSION__"); if (macro) { @@ -1966,8 +1974,8 @@ yyreduce: case 23: -/* Line 1464 of yacc.c */ -#line 277 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 285 "glcpp/glcpp-parse.y" { if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) { (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str) + 2, NULL, 16); @@ -1981,8 +1989,8 @@ yyreduce: case 24: -/* Line 1464 of yacc.c */ -#line 286 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 294 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;} @@ -1990,8 +1998,8 @@ yyreduce: case 26: -/* Line 1464 of yacc.c */ -#line 292 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 300 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival); ;} @@ -1999,8 +2007,8 @@ yyreduce: case 27: -/* Line 1464 of yacc.c */ -#line 295 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 303 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival); ;} @@ -2008,8 +2016,8 @@ yyreduce: case 28: -/* Line 1464 of yacc.c */ -#line 298 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 306 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); ;} @@ -2017,8 +2025,8 @@ yyreduce: case 29: -/* Line 1464 of yacc.c */ -#line 301 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 309 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival); ;} @@ -2026,8 +2034,8 @@ yyreduce: case 30: -/* Line 1464 of yacc.c */ -#line 304 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 312 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival); ;} @@ -2035,8 +2043,8 @@ yyreduce: case 31: -/* Line 1464 of yacc.c */ -#line 307 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 315 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival); ;} @@ -2044,8 +2052,8 @@ yyreduce: case 32: -/* Line 1464 of yacc.c */ -#line 310 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 318 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival); ;} @@ -2053,8 +2061,8 @@ yyreduce: case 33: -/* Line 1464 of yacc.c */ -#line 313 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 321 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival); ;} @@ -2062,8 +2070,8 @@ yyreduce: case 34: -/* Line 1464 of yacc.c */ -#line 316 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 324 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival); ;} @@ -2071,8 +2079,8 @@ yyreduce: case 35: -/* Line 1464 of yacc.c */ -#line 319 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 327 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival); ;} @@ -2080,8 +2088,8 @@ yyreduce: case 36: -/* Line 1464 of yacc.c */ -#line 322 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 330 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival); ;} @@ -2089,8 +2097,8 @@ yyreduce: case 37: -/* Line 1464 of yacc.c */ -#line 325 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 333 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival); ;} @@ -2098,8 +2106,8 @@ yyreduce: case 38: -/* Line 1464 of yacc.c */ -#line 328 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 336 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival); ;} @@ -2107,8 +2115,8 @@ yyreduce: case 39: -/* Line 1464 of yacc.c */ -#line 331 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 339 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival); ;} @@ -2116,8 +2124,8 @@ yyreduce: case 40: -/* Line 1464 of yacc.c */ -#line 334 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 342 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival); ;} @@ -2125,8 +2133,8 @@ yyreduce: case 41: -/* Line 1464 of yacc.c */ -#line 337 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 345 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival); ;} @@ -2134,8 +2142,8 @@ yyreduce: case 42: -/* Line 1464 of yacc.c */ -#line 340 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 348 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival); ;} @@ -2143,8 +2151,8 @@ yyreduce: case 43: -/* Line 1464 of yacc.c */ -#line 343 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 351 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival); ;} @@ -2152,8 +2160,8 @@ yyreduce: case 44: -/* Line 1464 of yacc.c */ -#line 346 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 354 "glcpp/glcpp-parse.y" { (yyval.ival) = ! (yyvsp[(2) - (2)].ival); ;} @@ -2161,8 +2169,8 @@ yyreduce: case 45: -/* Line 1464 of yacc.c */ -#line 349 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 357 "glcpp/glcpp-parse.y" { (yyval.ival) = ~ (yyvsp[(2) - (2)].ival); ;} @@ -2170,8 +2178,8 @@ yyreduce: case 46: -/* Line 1464 of yacc.c */ -#line 352 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 360 "glcpp/glcpp-parse.y" { (yyval.ival) = - (yyvsp[(2) - (2)].ival); ;} @@ -2179,8 +2187,8 @@ yyreduce: case 47: -/* Line 1464 of yacc.c */ -#line 355 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 363 "glcpp/glcpp-parse.y" { (yyval.ival) = + (yyvsp[(2) - (2)].ival); ;} @@ -2188,8 +2196,8 @@ yyreduce: case 48: -/* Line 1464 of yacc.c */ -#line 358 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 366 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(2) - (3)].ival); ;} @@ -2197,8 +2205,8 @@ yyreduce: case 49: -/* Line 1464 of yacc.c */ -#line 364 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 372 "glcpp/glcpp-parse.y" { (yyval.string_list) = _string_list_create (parser); _string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str)); @@ -2208,8 +2216,8 @@ yyreduce: case 50: -/* Line 1464 of yacc.c */ -#line 369 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 377 "glcpp/glcpp-parse.y" { (yyval.string_list) = (yyvsp[(1) - (3)].string_list); _string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str)); @@ -2219,15 +2227,15 @@ yyreduce: case 51: -/* Line 1464 of yacc.c */ -#line 377 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 385 "glcpp/glcpp-parse.y" { (yyval.token_list) = NULL; ;} break; case 53: -/* Line 1464 of yacc.c */ -#line 382 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 390 "glcpp/glcpp-parse.y" { yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #"); ;} @@ -2235,15 +2243,15 @@ yyreduce: case 54: -/* Line 1464 of yacc.c */ -#line 388 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 396 "glcpp/glcpp-parse.y" { (yyval.token_list) = NULL; ;} break; case 57: -/* Line 1464 of yacc.c */ -#line 394 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 402 "glcpp/glcpp-parse.y" { glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive"); ;} @@ -2251,8 +2259,8 @@ yyreduce: case 58: -/* Line 1464 of yacc.c */ -#line 401 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 409 "glcpp/glcpp-parse.y" { int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0; (yyval.token) = _token_create_ival (parser, INTEGER, v); @@ -2261,8 +2269,8 @@ yyreduce: case 59: -/* Line 1464 of yacc.c */ -#line 405 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 413 "glcpp/glcpp-parse.y" { int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0; (yyval.token) = _token_create_ival (parser, INTEGER, v); @@ -2271,8 +2279,8 @@ yyreduce: case 61: -/* Line 1464 of yacc.c */ -#line 414 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 422 "glcpp/glcpp-parse.y" { parser->space_tokens = 1; (yyval.token_list) = _token_list_create (parser); @@ -2283,8 +2291,8 @@ yyreduce: case 62: -/* Line 1464 of yacc.c */ -#line 420 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 428 "glcpp/glcpp-parse.y" { (yyval.token_list) = (yyvsp[(1) - (2)].token_list); _token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token)); @@ -2294,8 +2302,8 @@ yyreduce: case 63: -/* Line 1464 of yacc.c */ -#line 428 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 436 "glcpp/glcpp-parse.y" { parser->space_tokens = 1; (yyval.token_list) = _token_list_create (parser); @@ -2306,8 +2314,8 @@ yyreduce: case 64: -/* Line 1464 of yacc.c */ -#line 434 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 442 "glcpp/glcpp-parse.y" { (yyval.token_list) = (yyvsp[(1) - (2)].token_list); _token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token)); @@ -2317,8 +2325,8 @@ yyreduce: case 65: -/* Line 1464 of yacc.c */ -#line 442 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 450 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str)); (yyval.token)->location = yylloc; @@ -2327,8 +2335,8 @@ yyreduce: case 66: -/* Line 1464 of yacc.c */ -#line 446 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 454 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str)); (yyval.token)->location = yylloc; @@ -2337,8 +2345,8 @@ yyreduce: case 67: -/* Line 1464 of yacc.c */ -#line 450 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 458 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival)); (yyval.token)->location = yylloc; @@ -2347,8 +2355,8 @@ yyreduce: case 68: -/* Line 1464 of yacc.c */ -#line 454 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 462 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str)); (yyval.token)->location = yylloc; @@ -2357,8 +2365,8 @@ yyreduce: case 69: -/* Line 1464 of yacc.c */ -#line 458 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 466 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_ival (parser, SPACE, SPACE); (yyval.token)->location = yylloc; @@ -2367,225 +2375,225 @@ yyreduce: case 70: -/* Line 1464 of yacc.c */ -#line 465 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 473 "glcpp/glcpp-parse.y" { (yyval.ival) = '['; ;} break; case 71: -/* Line 1464 of yacc.c */ -#line 466 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 474 "glcpp/glcpp-parse.y" { (yyval.ival) = ']'; ;} break; case 72: -/* Line 1464 of yacc.c */ -#line 467 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 475 "glcpp/glcpp-parse.y" { (yyval.ival) = '('; ;} break; case 73: -/* Line 1464 of yacc.c */ -#line 468 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 476 "glcpp/glcpp-parse.y" { (yyval.ival) = ')'; ;} break; case 74: -/* Line 1464 of yacc.c */ -#line 469 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 477 "glcpp/glcpp-parse.y" { (yyval.ival) = '{'; ;} break; case 75: -/* Line 1464 of yacc.c */ -#line 470 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 478 "glcpp/glcpp-parse.y" { (yyval.ival) = '}'; ;} break; case 76: -/* Line 1464 of yacc.c */ -#line 471 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 479 "glcpp/glcpp-parse.y" { (yyval.ival) = '.'; ;} break; case 77: -/* Line 1464 of yacc.c */ -#line 472 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 480 "glcpp/glcpp-parse.y" { (yyval.ival) = '&'; ;} break; case 78: -/* Line 1464 of yacc.c */ -#line 473 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 481 "glcpp/glcpp-parse.y" { (yyval.ival) = '*'; ;} break; case 79: -/* Line 1464 of yacc.c */ -#line 474 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 482 "glcpp/glcpp-parse.y" { (yyval.ival) = '+'; ;} break; case 80: -/* Line 1464 of yacc.c */ -#line 475 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 483 "glcpp/glcpp-parse.y" { (yyval.ival) = '-'; ;} break; case 81: -/* Line 1464 of yacc.c */ -#line 476 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 484 "glcpp/glcpp-parse.y" { (yyval.ival) = '~'; ;} break; case 82: -/* Line 1464 of yacc.c */ -#line 477 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 485 "glcpp/glcpp-parse.y" { (yyval.ival) = '!'; ;} break; case 83: -/* Line 1464 of yacc.c */ -#line 478 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 486 "glcpp/glcpp-parse.y" { (yyval.ival) = '/'; ;} break; case 84: -/* Line 1464 of yacc.c */ -#line 479 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 487 "glcpp/glcpp-parse.y" { (yyval.ival) = '%'; ;} break; case 85: -/* Line 1464 of yacc.c */ -#line 480 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 488 "glcpp/glcpp-parse.y" { (yyval.ival) = LEFT_SHIFT; ;} break; case 86: -/* Line 1464 of yacc.c */ -#line 481 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 489 "glcpp/glcpp-parse.y" { (yyval.ival) = RIGHT_SHIFT; ;} break; case 87: -/* Line 1464 of yacc.c */ -#line 482 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 490 "glcpp/glcpp-parse.y" { (yyval.ival) = '<'; ;} break; case 88: -/* Line 1464 of yacc.c */ -#line 483 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 491 "glcpp/glcpp-parse.y" { (yyval.ival) = '>'; ;} break; case 89: -/* Line 1464 of yacc.c */ -#line 484 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 492 "glcpp/glcpp-parse.y" { (yyval.ival) = LESS_OR_EQUAL; ;} break; case 90: -/* Line 1464 of yacc.c */ -#line 485 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 493 "glcpp/glcpp-parse.y" { (yyval.ival) = GREATER_OR_EQUAL; ;} break; case 91: -/* Line 1464 of yacc.c */ -#line 486 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 494 "glcpp/glcpp-parse.y" { (yyval.ival) = EQUAL; ;} break; case 92: -/* Line 1464 of yacc.c */ -#line 487 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 495 "glcpp/glcpp-parse.y" { (yyval.ival) = NOT_EQUAL; ;} break; case 93: -/* Line 1464 of yacc.c */ -#line 488 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 496 "glcpp/glcpp-parse.y" { (yyval.ival) = '^'; ;} break; case 94: -/* Line 1464 of yacc.c */ -#line 489 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 497 "glcpp/glcpp-parse.y" { (yyval.ival) = '|'; ;} break; case 95: -/* Line 1464 of yacc.c */ -#line 490 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 498 "glcpp/glcpp-parse.y" { (yyval.ival) = AND; ;} break; case 96: -/* Line 1464 of yacc.c */ -#line 491 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 499 "glcpp/glcpp-parse.y" { (yyval.ival) = OR; ;} break; case 97: -/* Line 1464 of yacc.c */ -#line 492 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 500 "glcpp/glcpp-parse.y" { (yyval.ival) = ';'; ;} break; case 98: -/* Line 1464 of yacc.c */ -#line 493 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 501 "glcpp/glcpp-parse.y" { (yyval.ival) = ','; ;} break; case 99: -/* Line 1464 of yacc.c */ -#line 494 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 502 "glcpp/glcpp-parse.y" { (yyval.ival) = '='; ;} break; case 100: -/* Line 1464 of yacc.c */ -#line 495 "glcpp/glcpp-parse.y" +/* Line 1455 of yacc.c */ +#line 503 "glcpp/glcpp-parse.y" { (yyval.ival) = PASTE; ;} break; -/* Line 1464 of yacc.c */ -#line 2589 "glcpp/glcpp-parse.c" +/* Line 1455 of yacc.c */ +#line 2597 "glcpp/glcpp-parse.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2803,8 +2811,8 @@ yyreturn: -/* Line 1684 of yacc.c */ -#line 498 "glcpp/glcpp-parse.y" +/* Line 1675 of yacc.c */ +#line 506 "glcpp/glcpp-parse.y" string_list_t * diff --git a/src/glsl/glcpp/glcpp-parse.h b/src/glsl/glcpp/glcpp-parse.h index 53e7af0305d..50758930e9c 100644 --- a/src/glsl/glcpp/glcpp-parse.h +++ b/src/glsl/glcpp/glcpp-parse.h @@ -1,9 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ + +/* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 |