Commit 185de884 by Jamie Madill

Update ANGLE's translator to Bison 3.

BUG=angle:462 Change-Id: I2c1c18027dee1c3b4efb87374caaadbf58367841 Reviewed-on: https://chromium-review.googlesource.com/236930Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent d5663b1c
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@@ -179,6 +180,11 @@ typedef void* yyscan_t; @@ -179,6 +180,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif #endif
+#ifndef YY_TYPEDEF_YY_SIZE_T +#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t; +typedef size_t yy_size_t;
...@@ -20,36 +20,6 @@ ...@@ -20,36 +20,6 @@
#define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2 #define EOB_ACT_LAST_MATCH 2
@@ -201,11 +207,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -223,7 +224,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -302,7 +303,7 @@ static void pp_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *ppalloc (yy_size_t ,yyscan_t yyscanner );
void *pprealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -353,7 +354,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); @@ -353,7 +354,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/ */
#define YY_DO_BEFORE_ACTION \ #define YY_DO_BEFORE_ACTION \
...@@ -59,101 +29,3 @@ ...@@ -59,101 +29,3 @@
yyg->yy_hold_char = *yy_cp; \ yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
@@ -579,8 +580,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -637,7 +638,7 @@ FILE *ppget_out (yyscan_t yyscanner );
void ppset_out (FILE * out_str ,yyscan_t yyscanner );
-int ppget_leng (yyscan_t yyscanner );
+yy_size_t ppget_leng (yyscan_t yyscanner );
char *ppget_text (yyscan_t yyscanner );
@@ -704,7 +705,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1338,7 +1339,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1352,7 +1353,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1383,7 +1384,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1508,7 +1509,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1788,7 +1789,7 @@ void pppop_buffer_state (yyscan_t yyscanner)
*/
static void ppensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -1886,12 +1887,11 @@ YY_BUFFER_STATE pp_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2001,7 +2001,7 @@ FILE *ppget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int ppget_leng (yyscan_t yyscanner)
+yy_size_t ppget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
/* A Bison parser, made by GNU Bison 2.7.1. */ /* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public Bison output files to be licensed under the GNU General Public
License without this special exception. License without this special exception.
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.7.1" #define YYBISON_VERSION "3.0.2"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -63,11 +63,10 @@ ...@@ -63,11 +63,10 @@
#define yyparse ppparse #define yyparse ppparse
#define yylex pplex #define yylex pplex
#define yyerror pperror #define yyerror pperror
#define yylval pplval
#define yychar ppchar
#define yydebug ppdebug #define yydebug ppdebug
#define yynerrs ppnerrs #define yynerrs ppnerrs
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
...@@ -132,11 +131,11 @@ static void yyerror(Context* context, const char* reason); ...@@ -132,11 +131,11 @@ static void yyerror(Context* context, const char* reason);
# ifndef YY_NULL # ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus # if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr # define YY_NULLPTR nullptr
# else # else
# define YY_NULL 0 # define YY_NULLPTR 0
# endif # endif
# endif # endif
...@@ -149,7 +148,7 @@ static void yyerror(Context* context, const char* reason); ...@@ -149,7 +148,7 @@ static void yyerror(Context* context, const char* reason);
#endif #endif
/* Enabling traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 0 # define YYDEBUG 0
#endif #endif
...@@ -157,47 +156,34 @@ static void yyerror(Context* context, const char* reason); ...@@ -157,47 +156,34 @@ static void yyerror(Context* context, const char* reason);
extern int ppdebug; extern int ppdebug;
#endif #endif
/* Tokens. */ /* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype { TOK_CONST_INT = 258,
TOK_CONST_INT = 258, TOK_OP_OR = 259,
TOK_OP_OR = 259, TOK_OP_AND = 260,
TOK_OP_AND = 260, TOK_OP_EQ = 261,
TOK_OP_NE = 261, TOK_OP_NE = 262,
TOK_OP_EQ = 262, TOK_OP_LE = 263,
TOK_OP_GE = 263, TOK_OP_GE = 264,
TOK_OP_LE = 264, TOK_OP_LEFT = 265,
TOK_OP_RIGHT = 265, TOK_OP_RIGHT = 266,
TOK_OP_LEFT = 266, TOK_UNARY = 267
TOK_UNARY = 267 };
};
#endif #endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE; typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int ppparse (void *YYPARSE_PARAM);
#else
int ppparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int ppparse (Context *context); int ppparse (Context *context);
#else
int ppparse ();
#endif
#endif /* ! YYPARSE_PARAM */
...@@ -217,11 +203,8 @@ typedef unsigned char yytype_uint8; ...@@ -217,11 +203,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8 #ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8; typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else #else
typedef short int yytype_int8; typedef signed char yytype_int8;
#endif #endif
#ifdef YYTYPE_UINT16 #ifdef YYTYPE_UINT16
...@@ -241,8 +224,7 @@ typedef short int yytype_int16; ...@@ -241,8 +224,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__
# elif defined size_t # elif defined size_t
# define YYSIZE_T size_t # define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ # elif ! defined YYSIZE_T
|| defined __cplusplus || defined _MSC_VER)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t # define YYSIZE_T size_t
# else # else
...@@ -264,11 +246,30 @@ typedef short int yytype_int16; ...@@ -264,11 +246,30 @@ typedef short int yytype_int16;
# endif # endif
#endif #endif
#ifndef __attribute__ #ifndef YY_ATTRIBUTE
/* This feature is available in gcc versions 2.5 and later. */ # if (defined __GNUC__ \
# if (! defined __GNUC__ || __GNUC__ < 2 \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
# define __attribute__(Spec) /* empty */ # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
# else
# define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif
#ifndef YY_ATTRIBUTE_PURE
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
#endif
#ifndef YY_ATTRIBUTE_UNUSED
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif
#if !defined _Noreturn \
&& (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
# if defined _MSC_VER && 1200 <= _MSC_VER
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif # endif
#endif #endif
...@@ -279,25 +280,26 @@ typedef short int yytype_int16; ...@@ -279,25 +280,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */ # define YYUSE(E) /* empty */
#endif #endif
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Identity function, used to suppress warnings about constant conditions. */ /* Suppress an incorrect diagnostic about yylval being uninitialized. */
#ifndef lint # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
# define YYID(N) (N) _Pragma ("GCC diagnostic push") \
#else _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
#if (defined __STDC__ || defined __C99__FUNC__ \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|| defined __cplusplus || defined _MSC_VER) # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
static int _Pragma ("GCC diagnostic pop")
YYID (int yyi)
#else #else
static int # define YY_INITIAL_VALUE(Value) Value
YYID (yyi)
int yyi;
#endif #endif
{ #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
return yyi; # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
} # define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif #endif
#if ! defined yyoverflow || YYERROR_VERBOSE #if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */ /* The parser invokes alloca or malloc; define the necessary symbols. */
...@@ -315,8 +317,7 @@ YYID (yyi) ...@@ -315,8 +317,7 @@ YYID (yyi)
# define alloca _alloca # define alloca _alloca
# else # else
# define YYSTACK_ALLOC alloca # define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS # ifndef EXIT_SUCCESS
...@@ -328,8 +329,8 @@ YYID (yyi) ...@@ -328,8 +329,8 @@ YYID (yyi)
# endif # endif
# ifdef YYSTACK_ALLOC # ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */ /* Pacify GCC's 'empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM # ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack, /* 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 and a page size can be as small as 4096 bytes. So we cannot safely
...@@ -345,7 +346,7 @@ YYID (yyi) ...@@ -345,7 +346,7 @@ YYID (yyi)
# endif # endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \ && ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free))) && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS # ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0 # define EXIT_SUCCESS 0
...@@ -353,15 +354,13 @@ YYID (yyi) ...@@ -353,15 +354,13 @@ YYID (yyi)
# endif # endif
# ifndef YYMALLOC # ifndef YYMALLOC
# define YYMALLOC malloc # define YYMALLOC malloc
# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined malloc && ! defined EXIT_SUCCESS
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# ifndef YYFREE # ifndef YYFREE
# define YYFREE free # define YYFREE free
# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined free && ! defined EXIT_SUCCESS
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
...@@ -371,7 +370,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ ...@@ -371,7 +370,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \ #if (! defined yyoverflow \
&& (! defined __cplusplus \ && (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */ /* A type that is properly aligned for any stack member. */
union yyalloc union yyalloc
...@@ -396,16 +395,16 @@ union yyalloc ...@@ -396,16 +395,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next stack. Advance YYPTR to a properly aligned location for the next
stack. */ stack. */
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \ do \
{ \ { \
YYSIZE_T yynewbytes; \ YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \ yyptr += yynewbytes / sizeof (*yyptr); \
} \ } \
while (YYID (0)) while (0)
#endif #endif
...@@ -424,7 +423,7 @@ union yyalloc ...@@ -424,7 +423,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \ for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \ (Dst)[yyi] = (Src)[yyi]; \
} \ } \
while (YYID (0)) while (0)
# endif # endif
# endif # endif
#endif /* !YYCOPY_NEEDED */ #endif /* !YYCOPY_NEEDED */
...@@ -440,17 +439,19 @@ union yyalloc ...@@ -440,17 +439,19 @@ union yyalloc
#define YYNNTS 3 #define YYNNTS 3
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 26 #define YYNRULES 26
/* YYNRULES -- Number of states. */ /* YYNSTATES -- Number of states. */
#define YYNSTATES 52 #define YYNSTATES 52
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
#define YYMAXUTOK 267 #define YYMAXUTOK 267
#define YYTRANSLATE(YYX) \ #define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] = static const yytype_uint8 yytranslate[] =
{ {
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
...@@ -483,31 +484,7 @@ static const yytype_uint8 yytranslate[] = ...@@ -483,31 +484,7 @@ static const yytype_uint8 yytranslate[] =
}; };
#if YYDEBUG #if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
YYRHS. */
static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 5, 7, 11, 15, 19, 23, 27,
31, 35, 39, 43, 47, 51, 55, 59, 63, 67,
71, 75, 79, 82, 85, 88, 91
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
28, 0, -1, 29, -1, 3, -1, 29, 4, 29,
-1, 29, 5, 29, -1, 29, 6, 29, -1, 29,
7, 29, -1, 29, 8, 29, -1, 29, 9, 29,
-1, 29, 10, 29, -1, 29, 13, 29, -1, 29,
14, 29, -1, 29, 12, 29, -1, 29, 11, 29,
-1, 29, 15, 29, -1, 29, 16, 29, -1, 29,
18, 29, -1, 29, 17, 29, -1, 29, 21, 29,
-1, 29, 20, 29, -1, 29, 19, 29, -1, 23,
29, -1, 24, 29, -1, 18, 29, -1, 17, 29,
-1, 25, 29, 26, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] = static const yytype_uint8 yyrline[] =
{ {
0, 97, 97, 104, 105, 108, 111, 114, 117, 120, 0, 97, 97, 104, 105, 108, 111, 114, 117, 120,
...@@ -522,16 +499,16 @@ static const yytype_uint8 yyrline[] = ...@@ -522,16 +499,16 @@ static const yytype_uint8 yyrline[] =
static const char *const yytname[] = static const char *const yytname[] =
{ {
"$end", "error", "$undefined", "TOK_CONST_INT", "TOK_OP_OR", "$end", "error", "$undefined", "TOK_CONST_INT", "TOK_OP_OR",
"TOK_OP_AND", "'|'", "'^'", "'&'", "TOK_OP_NE", "TOK_OP_EQ", "'<'", "TOK_OP_AND", "'|'", "'^'", "'&'", "TOK_OP_EQ", "TOK_OP_NE", "'<'",
"'>'", "TOK_OP_GE", "TOK_OP_LE", "TOK_OP_RIGHT", "TOK_OP_LEFT", "'+'", "'>'", "TOK_OP_LE", "TOK_OP_GE", "TOK_OP_LEFT", "TOK_OP_RIGHT", "'+'",
"'-'", "'*'", "'/'", "'%'", "TOK_UNARY", "'!'", "'~'", "'('", "')'", "'-'", "'*'", "'/'", "'%'", "TOK_UNARY", "'!'", "'~'", "'('", "')'",
"$accept", "input", "expression", YY_NULL "$accept", "input", "expression", YY_NULLPTR
}; };
#endif #endif
# ifdef YYPRINT # ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to /* YYTOKNUM[NUM] -- (External) token number corresponding to the
token YYLEX-NUM. */ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] = static const yytype_uint16 yytoknum[] =
{ {
0, 256, 257, 258, 259, 260, 124, 94, 38, 261, 0, 256, 257, 258, 259, 260, 124, 94, 38, 261,
...@@ -540,44 +517,18 @@ static const yytype_uint16 yytoknum[] = ...@@ -540,44 +517,18 @@ static const yytype_uint16 yytoknum[] =
}; };
# endif # endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ #define YYPACT_NINF -11
static const yytype_uint8 yyr1[] =
{
0, 27, 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
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ #define yypact_value_is_default(Yystate) \
static const yytype_uint8 yyr2[] = (!!((Yystate) == (-11)))
{
0, 2, 1, 1, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 2, 2, 2, 2, 3
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. #define YYTABLE_NINF -1
Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 3, 0, 0, 0, 0, 0, 0, 2, 25,
24, 22, 23, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 26, 4, 5, 6, 7, 8, 9,
10, 14, 13, 11, 12, 15, 16, 18, 17, 21,
20, 19
};
/* YYDEFGOTO[NTERM-NUM]. */ #define yytable_value_is_error(Yytable_value) \
static const yytype_int8 yydefgoto[] = 0
{
-1, 7, 8
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -11
static const yytype_int16 yypact[] = static const yytype_int16 yypact[] =
{ {
46, -11, 46, 46, 46, 46, 46, 12, 68, -11, 46, -11, 46, 46, 46, 46, 46, 12, 68, -11,
...@@ -588,16 +539,34 @@ static const yytype_int16 yypact[] = ...@@ -588,16 +539,34 @@ static const yytype_int16 yypact[] =
-11, -11 -11, -11
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE does not specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 3, 0, 0, 0, 0, 0, 0, 2, 25,
24, 22, 23, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 26, 4, 5, 6, 7, 8, 10,
9, 14, 13, 12, 11, 16, 15, 18, 17, 21,
20, 19
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] = static const yytype_int8 yypgoto[] =
{ {
-11, -11, -2 -11, -11, -2
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYDEFGOTO[NTERM-NUM]. */
positive, shift that token. If negative, reduce the rule which static const yytype_int8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */ {
#define YYTABLE_NINF -1 -1, 7, 8
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule whose
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
9, 10, 11, 12, 13, 26, 27, 28, 29, 30, 9, 10, 11, 12, 13, 26, 27, 28, 29, 30,
...@@ -620,12 +589,6 @@ static const yytype_uint8 yytable[] = ...@@ -620,12 +589,6 @@ static const yytype_uint8 yytable[] =
27, 28, 29, 30, 31, 32 27, 28, 29, 30, 31, 32
}; };
#define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-11)))
#define yytable_value_is_error(Yytable_value) \
YYID (0)
static const yytype_int8 yycheck[] = static const yytype_int8 yycheck[] =
{ {
2, 3, 4, 5, 6, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 15, 16, 17, 18, 19,
...@@ -648,8 +611,8 @@ static const yytype_int8 yycheck[] = ...@@ -648,8 +611,8 @@ static const yytype_int8 yycheck[] =
16, 17, 18, 19, 20, 21 16, 17, 18, 19, 20, 21
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] = static const yytype_uint8 yystos[] =
{ {
0, 3, 17, 18, 23, 24, 25, 28, 29, 29, 0, 3, 17, 18, 23, 24, 25, 28, 29, 29,
...@@ -660,30 +623,32 @@ static const yytype_uint8 yystos[] = ...@@ -660,30 +623,32 @@ static const yytype_uint8 yystos[] =
29, 29 29, 29
}; };
#define yyerrok (yyerrstatus = 0) /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
#define yyclearin (yychar = YYEMPTY) static const yytype_uint8 yyr1[] =
#define YYEMPTY (-2) {
#define YYEOF 0 0, 27, 28, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
#define YYACCEPT goto yyacceptlab 29, 29, 29, 29, 29, 29, 29
#define YYABORT goto yyabortlab };
#define YYERROR goto yyerrorlab
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
/* Like YYERROR except do call yyerror. This remains here temporarily {
to ease the transition to the new meaning of YYERROR, for GCC. 0, 2, 1, 1, 3, 3, 3, 3, 3, 3,
Once GCC version 2 has supplanted version 1, this can go. However, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
YYFAIL appears to be in use. Nevertheless, it is formally deprecated 3, 3, 2, 2, 2, 2, 3
in Bison 2.4.2's NEWS entry, where a plan to phase it out is };
discussed. */
#define YYFAIL goto yyerrlab #define yyerrok (yyerrstatus = 0)
#if defined YYFAIL #define yyclearin (yychar = YYEMPTY)
/* This is here to suppress warnings from the GCC cpp's #define YYEMPTY (-2)
-Wunused-macros. Normally we don't worry about that warning, but #define YYEOF 0
some users do, and we want to make it easy for users to remove
YYFAIL uses, which will produce warnings from Bison 2.5. */ #define YYACCEPT goto yyacceptlab
#endif #define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus) #define YYRECOVERING() (!!yyerrstatus)
...@@ -700,27 +665,15 @@ do \ ...@@ -700,27 +665,15 @@ do \
else \ else \
{ \ { \
yyerror (context, YY_("syntax error: cannot back up")); \ yyerror (context, YY_("syntax error: cannot back up")); \
YYERROR; \ YYERROR; \
} \ } \
while (YYID (0)) while (0)
/* Error token number */ /* Error token number */
#define YYTERROR 1 #define YYTERROR 1
#define YYERRCODE 256 #define YYERRCODE 256
/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval, context)
#endif
/* Enable debugging if requested. */ /* Enable debugging if requested. */
#if YYDEBUG #if YYDEBUG
...@@ -730,52 +683,45 @@ while (YYID (0)) ...@@ -730,52 +683,45 @@ while (YYID (0))
# define YYFPRINTF fprintf # define YYFPRINTF fprintf
# endif # endif
# define YYDPRINTF(Args) \ # define YYDPRINTF(Args) \
do { \ do { \
if (yydebug) \ if (yydebug) \
YYFPRINTF Args; \ YYFPRINTF Args; \
} while (YYID (0)) } while (0)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ /* This macro is provided for backward compatibility. */
do { \ #ifndef YY_LOCATION_PRINT
if (yydebug) \ # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
{ \ #endif
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, context); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
/*--------------------------------. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
| Print this symbol on YYOUTPUT. | do { \
`--------------------------------*/ if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, context); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
/*----------------------------------------.
| Print this symbol's value on YYOUTPUT. |
`----------------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Context *context) yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Context *context)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep, context)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
Context *context;
#endif
{ {
FILE *yyo = yyoutput; FILE *yyo = yyoutput;
YYUSE (yyo); YYUSE (yyo);
YYUSE (context);
if (!yyvaluep) if (!yyvaluep)
return; return;
YYUSE (context);
# ifdef YYPRINT # ifdef YYPRINT
if (yytype < YYNTOKENS) if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
YYUSE (yyoutput);
# endif # endif
YYUSE (yytype); YYUSE (yytype);
} }
...@@ -785,23 +731,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, context) ...@@ -785,23 +731,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, context)
| Print this symbol on YYOUTPUT. | | Print this symbol on YYOUTPUT. |
`--------------------------------*/ `--------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Context *context) yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Context *context)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep, context)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
Context *context;
#endif
{ {
if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "%s %s (",
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep, context); yy_symbol_value_print (yyoutput, yytype, yyvaluep, context);
YYFPRINTF (yyoutput, ")"); YYFPRINTF (yyoutput, ")");
...@@ -812,16 +746,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, context) ...@@ -812,16 +746,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, context)
| TOP (included). | | TOP (included). |
`------------------------------------------------------------------*/ `------------------------------------------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
yy_stack_print (yybottom, yytop)
yytype_int16 *yybottom;
yytype_int16 *yytop;
#endif
{ {
YYFPRINTF (stderr, "Stack now"); YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++) for (; yybottom <= yytop; yybottom++)
...@@ -832,50 +758,42 @@ yy_stack_print (yybottom, yytop) ...@@ -832,50 +758,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
# define YY_STACK_PRINT(Bottom, Top) \ # define YY_STACK_PRINT(Bottom, Top) \
do { \ do { \
if (yydebug) \ if (yydebug) \
yy_stack_print ((Bottom), (Top)); \ yy_stack_print ((Bottom), (Top)); \
} while (YYID (0)) } while (0)
/*------------------------------------------------. /*------------------------------------------------.
| Report that the YYRULE is going to be reduced. | | Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/ `------------------------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule, Context *context) yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, Context *context)
#else
static void
yy_reduce_print (yyvsp, yyrule, context)
YYSTYPE *yyvsp;
int yyrule;
Context *context;
#endif
{ {
unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule]; int yynrhs = yyr2[yyrule];
int yyi; int yyi;
unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
yyrule - 1, yylno); yyrule - 1, yylno);
/* The symbols being reduced. */ /* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++) for (yyi = 0; yyi < yynrhs; yyi++)
{ {
YYFPRINTF (stderr, " $%d = ", yyi + 1); YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], yy_symbol_print (stderr,
&(yyvsp[(yyi + 1) - (yynrhs)]) yystos[yyssp[yyi + 1 - yynrhs]],
, context); &(yyvsp[(yyi + 1) - (yynrhs)])
, context);
YYFPRINTF (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
} }
# define YY_REDUCE_PRINT(Rule) \ # define YY_REDUCE_PRINT(Rule) \
do { \ do { \
if (yydebug) \ if (yydebug) \
yy_reduce_print (yyvsp, Rule, context); \ yy_reduce_print (yyssp, yyvsp, Rule, context); \
} while (YYID (0)) } while (0)
/* Nonzero means print parse trace. It is left uninitialized so that /* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */ multiple parsers can coexist. */
...@@ -889,7 +807,7 @@ int yydebug; ...@@ -889,7 +807,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */ /* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH #ifndef YYINITDEPTH
# define YYINITDEPTH 200 # define YYINITDEPTH 200
#endif #endif
...@@ -912,15 +830,8 @@ int yydebug; ...@@ -912,15 +830,8 @@ int yydebug;
# define yystrlen strlen # define yystrlen strlen
# else # else
/* Return the length of YYSTR. */ /* Return the length of YYSTR. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static YYSIZE_T static YYSIZE_T
yystrlen (const char *yystr) yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
const char *yystr;
#endif
{ {
YYSIZE_T yylen; YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++) for (yylen = 0; yystr[yylen]; yylen++)
...@@ -936,16 +847,8 @@ yystrlen (yystr) ...@@ -936,16 +847,8 @@ yystrlen (yystr)
# else # else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */ YYDEST. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static char * static char *
yystpcpy (char *yydest, const char *yysrc) yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
#endif
{ {
char *yyd = yydest; char *yyd = yydest;
const char *yys = yysrc; const char *yys = yysrc;
...@@ -975,27 +878,27 @@ yytnamerr (char *yyres, const char *yystr) ...@@ -975,27 +878,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr; char const *yyp = yystr;
for (;;) for (;;)
switch (*++yyp) switch (*++yyp)
{ {
case '\'': case '\'':
case ',': case ',':
goto do_not_strip_quotes; goto do_not_strip_quotes;
case '\\': case '\\':
if (*++yyp != '\\') if (*++yyp != '\\')
goto do_not_strip_quotes; goto do_not_strip_quotes;
/* Fall through. */ /* Fall through. */
default: default:
if (yyres) if (yyres)
yyres[yyn] = *yyp; yyres[yyn] = *yyp;
yyn++; yyn++;
break; break;
case '"': case '"':
if (yyres) if (yyres)
yyres[yyn] = '\0'; yyres[yyn] = '\0';
return yyn; return yyn;
} }
do_not_strip_quotes: ; do_not_strip_quotes: ;
} }
...@@ -1018,11 +921,11 @@ static int ...@@ -1018,11 +921,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken) yytype_int16 *yyssp, int yytoken)
{ {
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0; YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */ /* Internationalized format string. */
const char *yyformat = YY_NULL; const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */ /* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per /* Number of reported tokens (one for the "unexpected", one per
...@@ -1030,10 +933,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, ...@@ -1030,10 +933,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0; int yycount = 0;
/* There are many possibilities here to consider: /* There are many possibilities here to consider:
- Assume YYFAIL is not used. It's too flawed to consider. See
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
for details. YYERROR is fine as it does not invoke this
function.
- If this state is a consistent state with a default action, then - If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected is an error action. In that case, don't check for expected
...@@ -1083,7 +982,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, ...@@ -1083,7 +982,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
} }
yyarg[yycount++] = yytname[yyx]; yyarg[yycount++] = yytname[yyx];
{ {
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1 if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM)) && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2; return 2;
...@@ -1150,28 +1049,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, ...@@ -1150,28 +1049,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
`-----------------------------------------------*/ `-----------------------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, Context *context) yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, Context *context)
#else
static void
yydestruct (yymsg, yytype, yyvaluep, context)
const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
Context *context;
#endif
{ {
YYUSE (yyvaluep); YYUSE (yyvaluep);
YYUSE (context); YYUSE (context);
if (!yymsg) if (!yymsg)
yymsg = "Deleting"; yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype); YYUSE (yytype);
YY_IGNORE_MAYBE_UNINITIALIZED_END
} }
...@@ -1181,56 +1070,18 @@ yydestruct (yymsg, yytype, yyvaluep, context) ...@@ -1181,56 +1070,18 @@ yydestruct (yymsg, yytype, yyvaluep, context)
| yyparse. | | yyparse. |
`----------*/ `----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
int int
yyparse (Context *context) yyparse (Context *context)
#else
int
yyparse (context)
Context *context;
#endif
#endif
{ {
/* The lookahead symbol. */ /* The lookahead symbol. */
int yychar; int yychar;
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* The semantic value of the lookahead symbol. */
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
/* Default value used for initialization, for pacifying older GCCs /* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */ or non-GCC compilers. */
static YYSTYPE yyval_default; YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
# define YY_INITIAL_VALUE(Value) = Value YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
int yynerrs; int yynerrs;
...@@ -1240,8 +1091,8 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); ...@@ -1240,8 +1091,8 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
int yyerrstatus; int yyerrstatus;
/* The stacks and their tools: /* The stacks and their tools:
`yyss': related to states. 'yyss': related to states.
`yyvs': related to semantic values. 'yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */ to reallocate them elsewhere. */
...@@ -1309,23 +1160,23 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); ...@@ -1309,23 +1160,23 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
#ifdef yyoverflow #ifdef yyoverflow
{ {
/* Give user a chance to reallocate the stack. Use copies of /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into these so that the &'s don't force the real ones into
memory. */ memory. */
YYSTYPE *yyvs1 = yyvs; YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss; yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the /* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */ be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"), yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp), &yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp), &yyvs1, yysize * sizeof (*yyvsp),
&yystacksize); &yystacksize);
yyss = yyss1; yyss = yyss1;
yyvs = yyvs1; yyvs = yyvs1;
} }
#else /* no yyoverflow */ #else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE # ifndef YYSTACK_RELOCATE
...@@ -1333,22 +1184,22 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); ...@@ -1333,22 +1184,22 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
# else # else
/* Extend the stack our own way. */ /* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize) if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab; goto yyexhaustedlab;
yystacksize *= 2; yystacksize *= 2;
if (YYMAXDEPTH < yystacksize) if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH; yystacksize = YYMAXDEPTH;
{ {
yytype_int16 *yyss1 = yyss; yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr = union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr) if (! yyptr)
goto yyexhaustedlab; goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE # undef YYSTACK_RELOCATE
if (yyss1 != yyssa) if (yyss1 != yyssa)
YYSTACK_FREE (yyss1); YYSTACK_FREE (yyss1);
} }
# endif # endif
#endif /* no yyoverflow */ #endif /* no yyoverflow */
...@@ -1357,10 +1208,10 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); ...@@ -1357,10 +1208,10 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
yyvsp = yyvs + yysize - 1; yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n", YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize)); (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp) if (yyss + yystacksize - 1 <= yyssp)
YYABORT; YYABORT;
} }
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YYDPRINTF ((stderr, "Entering state %d\n", yystate));
...@@ -1389,7 +1240,7 @@ yybackup: ...@@ -1389,7 +1240,7 @@ yybackup:
if (yychar == YYEMPTY) if (yychar == YYEMPTY)
{ {
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX; yychar = yylex (&yylval, context);
} }
if (yychar <= YYEOF) if (yychar <= YYEOF)
...@@ -1454,7 +1305,7 @@ yyreduce: ...@@ -1454,7 +1305,7 @@ yyreduce:
yylen = yyr2[yyn]; yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action: /* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'. '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage. Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison This behavior is undocumented and Bison
...@@ -1470,190 +1321,214 @@ yyreduce: ...@@ -1470,190 +1321,214 @@ yyreduce:
case 2: case 2:
{ {
*(context->result) = static_cast<int>((yyvsp[(1) - (1)])); *(context->result) = static_cast<int>((yyvsp[0]));
YYACCEPT; YYACCEPT;
} }
break; break;
case 4: case 4:
{ {
(yyval) = (yyvsp[(1) - (3)]) || (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) || (yyvsp[0]);
} }
break; break;
case 5: case 5:
{ {
(yyval) = (yyvsp[(1) - (3)]) && (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) && (yyvsp[0]);
} }
break; break;
case 6: case 6:
{ {
(yyval) = (yyvsp[(1) - (3)]) | (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) | (yyvsp[0]);
} }
break; break;
case 7: case 7:
{ {
(yyval) = (yyvsp[(1) - (3)]) ^ (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) ^ (yyvsp[0]);
} }
break; break;
case 8: case 8:
{ {
(yyval) = (yyvsp[(1) - (3)]) & (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) & (yyvsp[0]);
} }
break; break;
case 9: case 9:
{ {
(yyval) = (yyvsp[(1) - (3)]) != (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) != (yyvsp[0]);
} }
break; break;
case 10: case 10:
{ {
(yyval) = (yyvsp[(1) - (3)]) == (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) == (yyvsp[0]);
} }
break; break;
case 11: case 11:
{ {
(yyval) = (yyvsp[(1) - (3)]) >= (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) >= (yyvsp[0]);
} }
break; break;
case 12: case 12:
{ {
(yyval) = (yyvsp[(1) - (3)]) <= (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) <= (yyvsp[0]);
} }
break; break;
case 13: case 13:
{ {
(yyval) = (yyvsp[(1) - (3)]) > (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) > (yyvsp[0]);
} }
break; break;
case 14: case 14:
{ {
(yyval) = (yyvsp[(1) - (3)]) < (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) < (yyvsp[0]);
} }
break; break;
case 15: case 15:
{ {
(yyval) = (yyvsp[(1) - (3)]) >> (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) >> (yyvsp[0]);
} }
break; break;
case 16: case 16:
{ {
(yyval) = (yyvsp[(1) - (3)]) << (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) << (yyvsp[0]);
} }
break; break;
case 17: case 17:
{ {
(yyval) = (yyvsp[(1) - (3)]) - (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) - (yyvsp[0]);
} }
break; break;
case 18: case 18:
{ {
(yyval) = (yyvsp[(1) - (3)]) + (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) + (yyvsp[0]);
} }
break; break;
case 19: case 19:
{ {
if ((yyvsp[(3) - (3)]) == 0) { if ((yyvsp[0]) == 0) {
std::ostringstream stream; std::ostringstream stream;
stream << (yyvsp[(1) - (3)]) << " % " << (yyvsp[(3) - (3)]); stream << (yyvsp[-2]) << " % " << (yyvsp[0]);
std::string text = stream.str(); std::string text = stream.str();
context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO, context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
context->token->location, context->token->location,
text.c_str()); text.c_str());
YYABORT; YYABORT;
} else { } else {
(yyval) = (yyvsp[(1) - (3)]) % (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) % (yyvsp[0]);
} }
} }
break; break;
case 20: case 20:
{ {
if ((yyvsp[(3) - (3)]) == 0) { if ((yyvsp[0]) == 0) {
std::ostringstream stream; std::ostringstream stream;
stream << (yyvsp[(1) - (3)]) << " / " << (yyvsp[(3) - (3)]); stream << (yyvsp[-2]) << " / " << (yyvsp[0]);
std::string text = stream.str(); std::string text = stream.str();
context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO, context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
context->token->location, context->token->location,
text.c_str()); text.c_str());
YYABORT; YYABORT;
} else { } else {
(yyval) = (yyvsp[(1) - (3)]) / (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) / (yyvsp[0]);
} }
} }
break; break;
case 21: case 21:
{ {
(yyval) = (yyvsp[(1) - (3)]) * (yyvsp[(3) - (3)]); (yyval) = (yyvsp[-2]) * (yyvsp[0]);
} }
break; break;
case 22: case 22:
{ {
(yyval) = ! (yyvsp[(2) - (2)]); (yyval) = ! (yyvsp[0]);
} }
break; break;
case 23: case 23:
{ {
(yyval) = ~ (yyvsp[(2) - (2)]); (yyval) = ~ (yyvsp[0]);
} }
break; break;
case 24: case 24:
{ {
(yyval) = - (yyvsp[(2) - (2)]); (yyval) = - (yyvsp[0]);
} }
break; break;
case 25: case 25:
{ {
(yyval) = + (yyvsp[(2) - (2)]); (yyval) = + (yyvsp[0]);
} }
break; break;
case 26: case 26:
{ {
(yyval) = (yyvsp[(2) - (3)]); (yyval) = (yyvsp[-1]);
} }
break; break;
...@@ -1679,7 +1554,7 @@ yyreduce: ...@@ -1679,7 +1554,7 @@ yyreduce:
*++yyvsp = yyval; *++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule that goes to, based on the state we popped back to and the rule
number reduced by. */ number reduced by. */
...@@ -1694,9 +1569,9 @@ yyreduce: ...@@ -1694,9 +1569,9 @@ yyreduce:
goto yynewstate; goto yynewstate;
/*------------------------------------. /*--------------------------------------.
| yyerrlab -- here on detecting error | | yyerrlab -- here on detecting error. |
`------------------------------------*/ `--------------------------------------*/
yyerrlab: yyerrlab:
/* Make sure we have latest lookahead translation. See comments at /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */ user semantic actions for why this is necessary. */
...@@ -1747,20 +1622,20 @@ yyerrlab: ...@@ -1747,20 +1622,20 @@ yyerrlab:
if (yyerrstatus == 3) if (yyerrstatus == 3)
{ {
/* If just tried and failed to reuse lookahead token after an /* If just tried and failed to reuse lookahead token after an
error, discard it. */ error, discard it. */
if (yychar <= YYEOF) if (yychar <= YYEOF)
{ {
/* Return failure if at end of input. */ /* Return failure if at end of input. */
if (yychar == YYEOF) if (yychar == YYEOF)
YYABORT; YYABORT;
} }
else else
{ {
yydestruct ("Error: discarding", yydestruct ("Error: discarding",
yytoken, &yylval, context); yytoken, &yylval, context);
yychar = YYEMPTY; yychar = YYEMPTY;
} }
} }
/* Else will try to reuse lookahead token after shifting the error /* Else will try to reuse lookahead token after shifting the error
...@@ -1779,7 +1654,7 @@ yyerrorlab: ...@@ -1779,7 +1654,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0) if (/*CONSTCOND*/ 0)
goto yyerrorlab; goto yyerrorlab;
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */ this YYERROR. */
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
yylen = 0; yylen = 0;
...@@ -1792,29 +1667,29 @@ yyerrorlab: ...@@ -1792,29 +1667,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. | | yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/ `-------------------------------------------------------------*/
yyerrlab1: yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;) for (;;)
{ {
yyn = yypact[yystate]; yyn = yypact[yystate];
if (!yypact_value_is_default (yyn)) if (!yypact_value_is_default (yyn))
{ {
yyn += YYTERROR; yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{ {
yyn = yytable[yyn]; yyn = yytable[yyn];
if (0 < yyn) if (0 < yyn)
break; break;
} }
} }
/* Pop the current state because it cannot handle the error token. */ /* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss) if (yyssp == yyss)
YYABORT; YYABORT;
yydestruct ("Error: popping", yydestruct ("Error: popping",
yystos[yystate], yyvsp, context); yystos[yystate], yyvsp, context);
YYPOPSTACK (1); YYPOPSTACK (1);
yystate = *yyssp; yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
...@@ -1865,14 +1740,14 @@ yyreturn: ...@@ -1865,14 +1740,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead", yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, context); yytoken, &yylval, context);
} }
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */ this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss) while (yyssp != yyss)
{ {
yydestruct ("Cleanup: popping", yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp, context); yystos[*yyssp], yyvsp, context);
YYPOPSTACK (1); YYPOPSTACK (1);
} }
#ifndef yyoverflow #ifndef yyoverflow
...@@ -1883,14 +1758,11 @@ yyreturn: ...@@ -1883,14 +1758,11 @@ yyreturn:
if (yymsg != yymsgbuf) if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg); YYSTACK_FREE (yymsg);
#endif #endif
/* Make sure YYID is used. */ return yyresult;
return YYID (yyresult);
} }
int yylex(YYSTYPE *lvalp, Context *context) int yylex(YYSTYPE *lvalp, Context *context)
{ {
int type = 0; int type = 0;
......
...@@ -69,7 +69,7 @@ struct Context ...@@ -69,7 +69,7 @@ struct Context
%} %}
%pure-parser %pure-parser
%name-prefix="pp" %name-prefix "pp"
%parse-param {Context *context} %parse-param {Context *context}
%lex-param {Context *context} %lex-param {Context *context}
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#define FLEX_SCANNER #define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 37 #define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0 #if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA #define FLEX_BETA
#endif #endif
...@@ -196,6 +196,7 @@ typedef size_t yy_size_t; ...@@ -196,6 +196,7 @@ typedef size_t yy_size_t;
#define EOB_ACT_LAST_MATCH 2 #define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n) #define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */ /* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \ #define yyless(n) \
...@@ -814,8 +815,6 @@ YY_DECL ...@@ -814,8 +815,6 @@ YY_DECL
register int yy_act; register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Line comment */
yylval = yylval_param; yylval = yylval_param;
yylloc = yylloc_param; yylloc = yylloc_param;
...@@ -846,6 +845,10 @@ YY_DECL ...@@ -846,6 +845,10 @@ YY_DECL
pp_load_buffer_state(yyscanner ); pp_load_buffer_state(yyscanner );
} }
{
/* Line comment */
while ( 1 ) /* loops until end-of-file is reached */ while ( 1 ) /* loops until end-of-file is reached */
{ {
yy_cp = yyg->yy_c_buf_p; yy_cp = yyg->yy_c_buf_p;
...@@ -862,7 +865,7 @@ YY_DECL ...@@ -862,7 +865,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_state = yy_current_state;
...@@ -1307,6 +1310,7 @@ ECHO; ...@@ -1307,6 +1310,7 @@ ECHO;
"fatal flex scanner internal error--no action found" ); "fatal flex scanner internal error--no action found" );
} /* end of action switch */ } /* end of action switch */
} /* end of scanning one token */ } /* end of scanning one token */
} /* end of user's declarations */
} /* end of pplex */ } /* end of pplex */
/* yy_get_next_buffer - try to read in a new buffer /* yy_get_next_buffer - try to read in a new buffer
......
...@@ -267,7 +267,9 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".") ...@@ -267,7 +267,9 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
namespace pp { namespace pp {
Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(0) Tokenizer::Tokenizer(Diagnostics *diagnostics)
: mHandle(0),
mMaxTokenSize(256)
{ {
mContext.diagnostics = diagnostics; mContext.diagnostics = diagnostics;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@@ -191,6 +192,11 @@ typedef void* yyscan_t; @@ -191,6 +192,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif #endif
+#ifndef YY_TYPEDEF_YY_SIZE_T +#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t; +typedef size_t yy_size_t;
...@@ -29,36 +29,6 @@ ...@@ -29,36 +29,6 @@
for ( yyl = n; yyl < yyleng; ++yyl )\ for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\ if ( yytext[yyl] == '\n' )\
--yylineno;\ --yylineno;\
@@ -226,11 +232,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -248,7 +249,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -327,7 +328,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); @@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/ */
#define YY_DO_BEFORE_ACTION \ #define YY_DO_BEFORE_ACTION \
...@@ -68,110 +38,3 @@ ...@@ -68,110 +38,3 @@
yyg->yy_hold_char = *yy_cp; \ yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
@@ -1035,8 +1036,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -1089,7 +1090,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int yyget_leng (yyscan_t yyscanner );
+yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
@@ -1158,7 +1159,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1317,7 +1318,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
+ yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -2203,7 +2204,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -2217,7 +2218,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2248,7 +2249,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -2373,7 +2374,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2660,7 +2661,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
*/
static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2758,12 +2759,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2913,7 +2913,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int yyget_leng (yyscan_t yyscanner)
+yy_size_t yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
...@@ -492,8 +492,8 @@ int floatsuffix_check(TParseContext* context) ...@@ -492,8 +492,8 @@ int floatsuffix_check(TParseContext* context)
return(FLOATCONSTANT); return(FLOATCONSTANT);
} }
void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) { void yyerror(YYLTYPE* lloc, TParseContext* context, void *scanner, const char* reason) {
context->error(*lloc, reason, yyget_text(context->scanner)); context->error(*lloc, reason, yyget_text(scanner));
context->recover(); context->recover();
} }
......
...@@ -41,12 +41,11 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -41,12 +41,11 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
#define YYENABLE_NLS 0 #define YYENABLE_NLS 0
#define YYLEX_PARAM context->scanner
%} %}
%expect 1 /* One shift reduce conflict because of if | else */ %expect 1 /* One shift reduce conflict because of if | else */
%pure-parser
%parse-param {TParseContext* context} %parse-param {TParseContext* context}
%param {void *scanner}
%define api.pure full
%locations %locations
%code requires { %code requires {
...@@ -88,11 +87,11 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -88,11 +87,11 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
%{ %{
extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
extern void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason); extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, const char* reason);
#define YYLLOC_DEFAULT(Current, Rhs, N) \ #define YYLLOC_DEFAULT(Current, Rhs, N) \
do { \ do { \
if (YYID(N)) { \ if (N) { \
(Current).first_file = YYRHSLOC(Rhs, 1).first_file; \ (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \
(Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
(Current).last_file = YYRHSLOC(Rhs, N).last_file; \ (Current).last_file = YYRHSLOC(Rhs, N).last_file; \
...@@ -1923,5 +1922,5 @@ function_definition ...@@ -1923,5 +1922,5 @@ function_definition
%% %%
int glslang_parse(TParseContext* context) { int glslang_parse(TParseContext* context) {
return yyparse(context); return yyparse(context, context->scanner);
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#define FLEX_SCANNER #define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 37 #define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0 #if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA #define FLEX_BETA
#endif #endif
...@@ -221,6 +221,13 @@ typedef size_t yy_size_t; ...@@ -221,6 +221,13 @@ typedef size_t yy_size_t;
if ( yytext[yyl] == '\n' )\ if ( yytext[yyl] == '\n' )\
--yylineno;\ --yylineno;\
}while(0) }while(0)
#define YY_LINENO_REWIND_TO(dst) \
do {\
const char *p;\
for ( p = yy_cp-1; p >= (dst); --p)\
if ( *p == '\n' )\
--yylineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */ /* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \ #define yyless(n) \
...@@ -1256,8 +1263,6 @@ YY_DECL ...@@ -1256,8 +1263,6 @@ YY_DECL
register int yy_act; register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
TParseContext* context = yyextra;
yylval = yylval_param; yylval = yylval_param;
yylloc = yylloc_param; yylloc = yylloc_param;
...@@ -1288,6 +1293,10 @@ YY_DECL ...@@ -1288,6 +1293,10 @@ YY_DECL
yy_load_buffer_state(yyscanner ); yy_load_buffer_state(yyscanner );
} }
{
TParseContext* context = yyextra;
while ( 1 ) /* loops until end-of-file is reached */ while ( 1 ) /* loops until end-of-file is reached */
{ {
yy_cp = yyg->yy_c_buf_p; yy_cp = yyg->yy_c_buf_p;
...@@ -1304,7 +1313,7 @@ YY_DECL ...@@ -1304,7 +1313,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_state = yy_current_state;
...@@ -2167,6 +2176,7 @@ ECHO; ...@@ -2167,6 +2176,7 @@ ECHO;
"fatal flex scanner internal error--no action found" ); "fatal flex scanner internal error--no action found" );
} /* end of action switch */ } /* end of action switch */
} /* end of scanning one token */ } /* end of scanning one token */
} /* end of user's declarations */
} /* end of yylex */ } /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer /* yy_get_next_buffer - try to read in a new buffer
...@@ -3294,8 +3304,8 @@ int floatsuffix_check(TParseContext* context) ...@@ -3294,8 +3304,8 @@ int floatsuffix_check(TParseContext* context)
return(FLOATCONSTANT); return(FLOATCONSTANT);
} }
void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) { void yyerror(YYLTYPE* lloc, TParseContext* context, void *scanner, const char* reason) {
context->error(*lloc, reason, yyget_text(context->scanner)); context->error(*lloc, reason, yyget_text(scanner));
context->recover(); context->recover();
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public Bison output files to be licensed under the GNU General Public
License without this special exception. License without this special exception.
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
#ifndef YY_YY_GLSLANG_TAB_H_INCLUDED #ifndef YY_YY_GLSLANG_TAB_H_INCLUDED
# define YY_YY_GLSLANG_TAB_H_INCLUDED # define YY_YY_GLSLANG_TAB_H_INCLUDED
/* Enabling traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 0 # define YYDEBUG 0
#endif #endif
...@@ -47,144 +47,143 @@ extern int yydebug; ...@@ -47,144 +47,143 @@ extern int yydebug;
/* Token type. */
/* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype { INVARIANT = 258,
INVARIANT = 258, HIGH_PRECISION = 259,
HIGH_PRECISION = 259, MEDIUM_PRECISION = 260,
MEDIUM_PRECISION = 260, LOW_PRECISION = 261,
LOW_PRECISION = 261, PRECISION = 262,
PRECISION = 262, ATTRIBUTE = 263,
ATTRIBUTE = 263, CONST_QUAL = 264,
CONST_QUAL = 264, BOOL_TYPE = 265,
BOOL_TYPE = 265, FLOAT_TYPE = 266,
FLOAT_TYPE = 266, INT_TYPE = 267,
INT_TYPE = 267, UINT_TYPE = 268,
UINT_TYPE = 268, BREAK = 269,
BREAK = 269, CONTINUE = 270,
CONTINUE = 270, DO = 271,
DO = 271, ELSE = 272,
ELSE = 272, FOR = 273,
FOR = 273, IF = 274,
IF = 274, DISCARD = 275,
DISCARD = 275, RETURN = 276,
RETURN = 276, SWITCH = 277,
SWITCH = 277, CASE = 278,
CASE = 278, DEFAULT = 279,
DEFAULT = 279, BVEC2 = 280,
BVEC2 = 280, BVEC3 = 281,
BVEC3 = 281, BVEC4 = 282,
BVEC4 = 282, IVEC2 = 283,
IVEC2 = 283, IVEC3 = 284,
IVEC3 = 284, IVEC4 = 285,
IVEC4 = 285, VEC2 = 286,
VEC2 = 286, VEC3 = 287,
VEC3 = 287, VEC4 = 288,
VEC4 = 288, UVEC2 = 289,
UVEC2 = 289, UVEC3 = 290,
UVEC3 = 290, UVEC4 = 291,
UVEC4 = 291, MATRIX2 = 292,
MATRIX2 = 292, MATRIX3 = 293,
MATRIX3 = 293, MATRIX4 = 294,
MATRIX4 = 294, IN_QUAL = 295,
IN_QUAL = 295, OUT_QUAL = 296,
OUT_QUAL = 296, INOUT_QUAL = 297,
INOUT_QUAL = 297, UNIFORM = 298,
UNIFORM = 298, VARYING = 299,
VARYING = 299, MATRIX2x3 = 300,
MATRIX2x3 = 300, MATRIX3x2 = 301,
MATRIX3x2 = 301, MATRIX2x4 = 302,
MATRIX2x4 = 302, MATRIX4x2 = 303,
MATRIX4x2 = 303, MATRIX3x4 = 304,
MATRIX3x4 = 304, MATRIX4x3 = 305,
MATRIX4x3 = 305, CENTROID = 306,
CENTROID = 306, FLAT = 307,
FLAT = 307, SMOOTH = 308,
SMOOTH = 308, STRUCT = 309,
STRUCT = 309, VOID_TYPE = 310,
VOID_TYPE = 310, WHILE = 311,
WHILE = 311, SAMPLER2D = 312,
SAMPLER2D = 312, SAMPLERCUBE = 313,
SAMPLERCUBE = 313, SAMPLER_EXTERNAL_OES = 314,
SAMPLER_EXTERNAL_OES = 314, SAMPLER2DRECT = 315,
SAMPLER2DRECT = 315, SAMPLER2DARRAY = 316,
SAMPLER2DARRAY = 316, ISAMPLER2D = 317,
ISAMPLER2D = 317, ISAMPLER3D = 318,
ISAMPLER3D = 318, ISAMPLERCUBE = 319,
ISAMPLERCUBE = 319, ISAMPLER2DARRAY = 320,
ISAMPLER2DARRAY = 320, USAMPLER2D = 321,
USAMPLER2D = 321, USAMPLER3D = 322,
USAMPLER3D = 322, USAMPLERCUBE = 323,
USAMPLERCUBE = 323, USAMPLER2DARRAY = 324,
USAMPLER2DARRAY = 324, SAMPLER3D = 325,
SAMPLER3D = 325, SAMPLER3DRECT = 326,
SAMPLER3DRECT = 326, SAMPLER2DSHADOW = 327,
SAMPLER2DSHADOW = 327, SAMPLERCUBESHADOW = 328,
SAMPLERCUBESHADOW = 328, SAMPLER2DARRAYSHADOW = 329,
SAMPLER2DARRAYSHADOW = 329, LAYOUT = 330,
LAYOUT = 330, IDENTIFIER = 331,
IDENTIFIER = 331, TYPE_NAME = 332,
TYPE_NAME = 332, FLOATCONSTANT = 333,
FLOATCONSTANT = 333, INTCONSTANT = 334,
INTCONSTANT = 334, UINTCONSTANT = 335,
UINTCONSTANT = 335, BOOLCONSTANT = 336,
BOOLCONSTANT = 336, FIELD_SELECTION = 337,
FIELD_SELECTION = 337, LEFT_OP = 338,
LEFT_OP = 338, RIGHT_OP = 339,
RIGHT_OP = 339, INC_OP = 340,
INC_OP = 340, DEC_OP = 341,
DEC_OP = 341, LE_OP = 342,
LE_OP = 342, GE_OP = 343,
GE_OP = 343, EQ_OP = 344,
EQ_OP = 344, NE_OP = 345,
NE_OP = 345, AND_OP = 346,
AND_OP = 346, OR_OP = 347,
OR_OP = 347, XOR_OP = 348,
XOR_OP = 348, MUL_ASSIGN = 349,
MUL_ASSIGN = 349, DIV_ASSIGN = 350,
DIV_ASSIGN = 350, ADD_ASSIGN = 351,
ADD_ASSIGN = 351, MOD_ASSIGN = 352,
MOD_ASSIGN = 352, LEFT_ASSIGN = 353,
LEFT_ASSIGN = 353, RIGHT_ASSIGN = 354,
RIGHT_ASSIGN = 354, AND_ASSIGN = 355,
AND_ASSIGN = 355, XOR_ASSIGN = 356,
XOR_ASSIGN = 356, OR_ASSIGN = 357,
OR_ASSIGN = 357, SUB_ASSIGN = 358,
SUB_ASSIGN = 358, LEFT_PAREN = 359,
LEFT_PAREN = 359, RIGHT_PAREN = 360,
RIGHT_PAREN = 360, LEFT_BRACKET = 361,
LEFT_BRACKET = 361, RIGHT_BRACKET = 362,
RIGHT_BRACKET = 362, LEFT_BRACE = 363,
LEFT_BRACE = 363, RIGHT_BRACE = 364,
RIGHT_BRACE = 364, DOT = 365,
DOT = 365, COMMA = 366,
COMMA = 366, COLON = 367,
COLON = 367, EQUAL = 368,
EQUAL = 368, SEMICOLON = 369,
SEMICOLON = 369, BANG = 370,
BANG = 370, DASH = 371,
DASH = 371, TILDE = 372,
TILDE = 372, PLUS = 373,
PLUS = 373, STAR = 374,
STAR = 374, SLASH = 375,
SLASH = 375, PERCENT = 376,
PERCENT = 376, LEFT_ANGLE = 377,
LEFT_ANGLE = 377, RIGHT_ANGLE = 378,
RIGHT_ANGLE = 378, VERTICAL_BAR = 379,
VERTICAL_BAR = 379, CARET = 380,
CARET = 380, AMPERSAND = 381,
AMPERSAND = 381, QUESTION = 382
QUESTION = 382 };
};
#endif #endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{ {
...@@ -219,39 +218,27 @@ typedef union YYSTYPE ...@@ -219,39 +218,27 @@ typedef union YYSTYPE
} interm; } interm;
};
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE typedef struct YYLTYPE YYLTYPE;
struct YYLTYPE
{ {
int first_line; int first_line;
int first_column; int first_column;
int last_line; int last_line;
int last_column; int last_column;
} YYLTYPE; };
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1 # define YYLTYPE_IS_TRIVIAL 1
#endif #endif
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus int yyparse (TParseContext* context, void *scanner);
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (TParseContext* context);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */ #endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment