-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 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
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
#include "glcpp.h"
#include "main/core.h" /* for struct gl_extensions */
+#include "main/mtypes.h" /* for gl_api enum */
#define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str)
#define glcpp_printf(stream, fmt, args, ...) \
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 187, 187, 189, 193, 196, 201, 202, 206, 209,
- 215, 218, 221, 224, 232, 251, 261, 266, 271, 290,
- 305, 308, 311, 320, 324, 333, 338, 339, 342, 345,
- 348, 351, 354, 357, 360, 363, 366, 369, 372, 375,
- 378, 381, 384, 387, 390, 393, 396, 399, 402, 405,
- 411, 416, 424, 425, 429, 435, 436, 439, 441, 448,
- 452, 456, 461, 467, 475, 481, 489, 493, 497, 501,
- 505, 512, 513, 514, 515, 516, 517, 518, 519, 520,
- 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
- 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
- 541, 542
+ 0, 188, 188, 190, 194, 197, 202, 203, 207, 210,
+ 216, 219, 222, 225, 233, 252, 262, 267, 272, 291,
+ 306, 309, 312, 324, 328, 337, 342, 343, 346, 349,
+ 352, 355, 358, 361, 364, 367, 370, 373, 376, 379,
+ 382, 385, 388, 391, 394, 397, 400, 403, 406, 409,
+ 415, 420, 428, 429, 433, 439, 440, 443, 445, 452,
+ 456, 460, 465, 471, 479, 485, 493, 497, 501, 505,
+ 509, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546
};
#endif
/* 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. */
+ 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. */
#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)
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ YYLTYPE yyerror_range[3];
YYSIZE_T yystacksize;
yyvsp = yyvs;
yylsp = yyls;
-#if YYLTYPE_IS_TRIVIAL
+#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
yylloc.first_column = yylloc.last_column = 1;
/* User initialization code. */
-/* Line 1242 of yacc.c */
-#line 154 "glcpp/glcpp-parse.y"
+/* Line 1251 of yacc.c */
+#line 155 "glcpp/glcpp-parse.y"
{
yylloc.first_line = 1;
yylloc.first_column = 1;
yylloc.source = 0;
}
-/* Line 1242 of yacc.c */
-#line 1616 "glcpp/glcpp-parse.c"
+/* Line 1251 of yacc.c */
+#line 1625 "glcpp/glcpp-parse.c"
yylsp[0] = yylloc;
goto yysetstate;
{
case 4:
-/* Line 1455 of yacc.c */
-#line 193 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 194 "glcpp/glcpp-parse.y"
{
glcpp_print(parser->output, "\n");
;}
case 5:
-/* Line 1455 of yacc.c */
-#line 196 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 197 "glcpp/glcpp-parse.y"
{
_glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list));
glcpp_print(parser->output, "\n");
case 8:
-/* Line 1455 of yacc.c */
-#line 206 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 207 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival));
;}
case 9:
-/* Line 1455 of yacc.c */
-#line 209 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 210 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival));
;}
case 10:
-/* Line 1455 of yacc.c */
-#line 215 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 216 "glcpp/glcpp-parse.y"
{
_define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list));
;}
case 11:
-/* Line 1455 of yacc.c */
-#line 218 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 219 "glcpp/glcpp-parse.y"
{
_define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list));
;}
case 12:
-/* Line 1455 of yacc.c */
-#line 221 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 222 "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));
;}
case 13:
-/* Line 1455 of yacc.c */
-#line 224 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 225 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str));
if (macro) {
case 14:
-/* Line 1455 of yacc.c */
-#line 232 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 233 "glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'if' expression if
* we are not skipping. When we are skipping, we
case 15:
-/* Line 1455 of yacc.c */
-#line 251 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 252 "glcpp/glcpp-parse.y"
{
/* #if without an expression is only an error if we
* are not skipping */
case 16:
-/* Line 1455 of yacc.c */
-#line 261 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 262 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
talloc_free ((yyvsp[(2) - (4)].str));
case 17:
-/* Line 1455 of yacc.c */
-#line 266 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 267 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
talloc_free ((yyvsp[(2) - (4)].str));
case 18:
-/* Line 1455 of yacc.c */
-#line 271 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 272 "glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'elif' expression
* if we are not skipping. When we are skipping, we
case 19:
-/* Line 1455 of yacc.c */
-#line 290 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 291 "glcpp/glcpp-parse.y"
{
/* #elif without an expression is an error unless we
* are skipping. */
case 20:
-/* Line 1455 of yacc.c */
-#line 305 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 306 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1);
;}
case 21:
-/* Line 1455 of yacc.c */
-#line 308 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 309 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)]));
;}
case 22:
-/* Line 1455 of yacc.c */
-#line 311 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 312 "glcpp/glcpp-parse.y"
{
+ if ((yyvsp[(2) - (3)].ival) == 100)
+ add_builtin_define (parser, "GL_ES", 1);
+
macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
if (macro) {
hash_table_remove (parser->defines, "__VERSION__");
case 24:
-/* Line 1455 of yacc.c */
-#line 324 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 328 "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);
case 25:
-/* Line 1455 of yacc.c */
-#line 333 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 337 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (1)].ival);
;}
case 27:
-/* Line 1455 of yacc.c */
-#line 339 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 343 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival);
;}
case 28:
-/* Line 1455 of yacc.c */
-#line 342 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 346 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival);
;}
case 29:
-/* Line 1455 of yacc.c */
-#line 345 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 349 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival);
;}
case 30:
-/* Line 1455 of yacc.c */
-#line 348 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 352 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival);
;}
case 31:
-/* Line 1455 of yacc.c */
-#line 351 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 355 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival);
;}
case 32:
-/* Line 1455 of yacc.c */
-#line 354 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 358 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival);
;}
case 33:
-/* Line 1455 of yacc.c */
-#line 357 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 361 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival);
;}
case 34:
-/* Line 1455 of yacc.c */
-#line 360 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 364 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival);
;}
case 35:
-/* Line 1455 of yacc.c */
-#line 363 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 367 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival);
;}
case 36:
-/* Line 1455 of yacc.c */
-#line 366 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 370 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival);
;}
case 37:
-/* Line 1455 of yacc.c */
-#line 369 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 373 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival);
;}
case 38:
-/* Line 1455 of yacc.c */
-#line 372 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 376 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival);
;}
case 39:
-/* Line 1455 of yacc.c */
-#line 375 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 379 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival);
;}
case 40:
-/* Line 1455 of yacc.c */
-#line 378 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 382 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival);
;}
case 41:
-/* Line 1455 of yacc.c */
-#line 381 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 385 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival);
;}
case 42:
-/* Line 1455 of yacc.c */
-#line 384 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 388 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival);
;}
case 43:
-/* Line 1455 of yacc.c */
-#line 387 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 391 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival);
;}
case 44:
-/* Line 1455 of yacc.c */
-#line 390 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 394 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival);
;}
case 45:
-/* Line 1455 of yacc.c */
-#line 393 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 397 "glcpp/glcpp-parse.y"
{
(yyval.ival) = ! (yyvsp[(2) - (2)].ival);
;}
case 46:
-/* Line 1455 of yacc.c */
-#line 396 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 400 "glcpp/glcpp-parse.y"
{
(yyval.ival) = ~ (yyvsp[(2) - (2)].ival);
;}
case 47:
-/* Line 1455 of yacc.c */
-#line 399 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 403 "glcpp/glcpp-parse.y"
{
(yyval.ival) = - (yyvsp[(2) - (2)].ival);
;}
case 48:
-/* Line 1455 of yacc.c */
-#line 402 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 406 "glcpp/glcpp-parse.y"
{
(yyval.ival) = + (yyvsp[(2) - (2)].ival);
;}
case 49:
-/* Line 1455 of yacc.c */
-#line 405 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 409 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(2) - (3)].ival);
;}
case 50:
-/* Line 1455 of yacc.c */
-#line 411 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 415 "glcpp/glcpp-parse.y"
{
(yyval.string_list) = _string_list_create (parser);
_string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str));
case 51:
-/* Line 1455 of yacc.c */
-#line 416 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 420 "glcpp/glcpp-parse.y"
{
(yyval.string_list) = (yyvsp[(1) - (3)].string_list);
_string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str));
case 52:
-/* Line 1455 of yacc.c */
-#line 424 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 428 "glcpp/glcpp-parse.y"
{ (yyval.token_list) = NULL; ;}
break;
case 54:
-/* Line 1455 of yacc.c */
-#line 429 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 433 "glcpp/glcpp-parse.y"
{
yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #");
;}
case 55:
-/* Line 1455 of yacc.c */
-#line 435 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 439 "glcpp/glcpp-parse.y"
{ (yyval.token_list) = NULL; ;}
break;
case 58:
-/* Line 1455 of yacc.c */
-#line 441 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 445 "glcpp/glcpp-parse.y"
{
glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive");
;}
case 59:
-/* Line 1455 of yacc.c */
-#line 448 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 452 "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);
case 60:
-/* Line 1455 of yacc.c */
-#line 452 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 456 "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);
case 62:
-/* Line 1455 of yacc.c */
-#line 461 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 465 "glcpp/glcpp-parse.y"
{
parser->space_tokens = 1;
(yyval.token_list) = _token_list_create (parser);
case 63:
-/* Line 1455 of yacc.c */
-#line 467 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 471 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
case 64:
-/* Line 1455 of yacc.c */
-#line 475 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 479 "glcpp/glcpp-parse.y"
{
parser->space_tokens = 1;
(yyval.token_list) = _token_list_create (parser);
case 65:
-/* Line 1455 of yacc.c */
-#line 481 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 485 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
case 66:
-/* Line 1455 of yacc.c */
-#line 489 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 493 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
case 67:
-/* Line 1455 of yacc.c */
-#line 493 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 497 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
case 68:
-/* Line 1455 of yacc.c */
-#line 497 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 501 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival));
(yyval.token)->location = yylloc;
case 69:
-/* Line 1455 of yacc.c */
-#line 501 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 505 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
case 70:
-/* Line 1455 of yacc.c */
-#line 505 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 509 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, SPACE, SPACE);
(yyval.token)->location = yylloc;
case 71:
-/* Line 1455 of yacc.c */
-#line 512 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 516 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '['; ;}
break;
case 72:
-/* Line 1455 of yacc.c */
-#line 513 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 517 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ']'; ;}
break;
case 73:
-/* Line 1455 of yacc.c */
-#line 514 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 518 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '('; ;}
break;
case 74:
-/* Line 1455 of yacc.c */
-#line 515 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 519 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ')'; ;}
break;
case 75:
-/* Line 1455 of yacc.c */
-#line 516 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 520 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '{'; ;}
break;
case 76:
-/* Line 1455 of yacc.c */
-#line 517 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 521 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '}'; ;}
break;
case 77:
-/* Line 1455 of yacc.c */
-#line 518 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 522 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '.'; ;}
break;
case 78:
-/* Line 1455 of yacc.c */
-#line 519 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 523 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '&'; ;}
break;
case 79:
-/* Line 1455 of yacc.c */
-#line 520 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 524 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '*'; ;}
break;
case 80:
-/* Line 1455 of yacc.c */
-#line 521 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 525 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '+'; ;}
break;
case 81:
-/* Line 1455 of yacc.c */
-#line 522 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 526 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '-'; ;}
break;
case 82:
-/* Line 1455 of yacc.c */
-#line 523 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 527 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '~'; ;}
break;
case 83:
-/* Line 1455 of yacc.c */
-#line 524 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 528 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '!'; ;}
break;
case 84:
-/* Line 1455 of yacc.c */
-#line 525 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 529 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '/'; ;}
break;
case 85:
-/* Line 1455 of yacc.c */
-#line 526 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 530 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '%'; ;}
break;
case 86:
-/* Line 1455 of yacc.c */
-#line 527 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 531 "glcpp/glcpp-parse.y"
{ (yyval.ival) = LEFT_SHIFT; ;}
break;
case 87:
-/* Line 1455 of yacc.c */
-#line 528 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 532 "glcpp/glcpp-parse.y"
{ (yyval.ival) = RIGHT_SHIFT; ;}
break;
case 88:
-/* Line 1455 of yacc.c */
-#line 529 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 533 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '<'; ;}
break;
case 89:
-/* Line 1455 of yacc.c */
-#line 530 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 534 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '>'; ;}
break;
case 90:
-/* Line 1455 of yacc.c */
-#line 531 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 535 "glcpp/glcpp-parse.y"
{ (yyval.ival) = LESS_OR_EQUAL; ;}
break;
case 91:
-/* Line 1455 of yacc.c */
-#line 532 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 536 "glcpp/glcpp-parse.y"
{ (yyval.ival) = GREATER_OR_EQUAL; ;}
break;
case 92:
-/* Line 1455 of yacc.c */
-#line 533 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 537 "glcpp/glcpp-parse.y"
{ (yyval.ival) = EQUAL; ;}
break;
case 93:
-/* Line 1455 of yacc.c */
-#line 534 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 538 "glcpp/glcpp-parse.y"
{ (yyval.ival) = NOT_EQUAL; ;}
break;
case 94:
-/* Line 1455 of yacc.c */
-#line 535 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 539 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '^'; ;}
break;
case 95:
-/* Line 1455 of yacc.c */
-#line 536 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 540 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '|'; ;}
break;
case 96:
-/* Line 1455 of yacc.c */
-#line 537 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 541 "glcpp/glcpp-parse.y"
{ (yyval.ival) = AND; ;}
break;
case 97:
-/* Line 1455 of yacc.c */
-#line 538 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 542 "glcpp/glcpp-parse.y"
{ (yyval.ival) = OR; ;}
break;
case 98:
-/* Line 1455 of yacc.c */
-#line 539 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 543 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ';'; ;}
break;
case 99:
-/* Line 1455 of yacc.c */
-#line 540 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 544 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ','; ;}
break;
case 100:
-/* Line 1455 of yacc.c */
-#line 541 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 545 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '='; ;}
break;
case 101:
-/* Line 1455 of yacc.c */
-#line 542 "glcpp/glcpp-parse.y"
+/* Line 1464 of yacc.c */
+#line 546 "glcpp/glcpp-parse.y"
{ (yyval.ival) = PASTE; ;}
break;
-/* Line 1455 of yacc.c */
-#line 2643 "glcpp/glcpp-parse.c"
+/* Line 1464 of yacc.c */
+#line 2655 "glcpp/glcpp-parse.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
#endif
}
- yyerror_range[0] = yylloc;
+ yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[0] = yylsp[1-yylen];
+ yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
if (yyssp == yyss)
YYABORT;
- yyerror_range[0] = *yylsp;
+ yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, parser);
YYPOPSTACK (1);
*++yyvsp = yylval;
- yyerror_range[1] = yylloc;
+ yyerror_range[2] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the lookahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
*++yylsp = yyloc;
/* Shift the error token. */
-/* Line 1675 of yacc.c */
-#line 545 "glcpp/glcpp-parse.y"
+/* Line 1684 of yacc.c */
+#line 549 "glcpp/glcpp-parse.y"
string_list_t *
}
glcpp_parser_t *
-glcpp_parser_create (const struct gl_extensions *extensions)
+glcpp_parser_create (const struct gl_extensions *extensions, int api)
{
glcpp_parser_t *parser;
int language_version;
add_builtin_define(parser, "GL_ARB_draw_buffers", 1);
add_builtin_define(parser, "GL_ARB_texture_rectangle", 1);
+ if (api == API_OPENGLES2)
+ add_builtin_define(parser, "GL_ES", 1);
+
if (extensions != NULL) {
if (extensions->EXT_texture_array) {
add_builtin_define(parser, "GL_EXT_texture_array", 1);