Commit eced26a1 by Veranika Liaukevich

Modify glslang.y to support Bison 3.0.2.

For this patch lexer and parser files were regenerated with newer versions of Flex(2.5.39) and Bison(3.0.2). Because YYLEX_PARAM was deprecated and removed from Bison, it was replaced with %param. The change was inspired by Angle source code. Change-Id: I7ac60041aabb78567860653a0663ec9adb205e8a Reviewed-on: https://swiftshader-review.googlesource.com/4115Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarVeranika Liaukevich <veranika@google.com>
parent f33f4bc7
...@@ -526,8 +526,8 @@ int float_constant(yyscan_t yyscanner) { ...@@ -526,8 +526,8 @@ int float_constant(yyscan_t yyscanner) {
return FLOATCONSTANT; return FLOATCONSTANT;
} }
void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) { void yyerror(YYLTYPE* lloc, TParseContext* context, void* scanner, const char* reason) {
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); struct yyguts_t* yyg = (struct yyguts_t*) scanner;
if (context->AfterEOF) { if (context->AfterEOF) {
context->error(*lloc, reason, "unexpected EOF"); context->error(*lloc, reason, "unexpected EOF");
......
...@@ -38,13 +38,12 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -38,13 +38,12 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
#include "ParseHelper.h" #include "ParseHelper.h"
#define YYENABLE_NLS 0 #define YYENABLE_NLS 0
#define YYLEX_PARAM context->getScanner()
%} %}
%expect 1 /* One shift reduce conflict because of if | else */ %expect 1 /* One shift reduce conflict because of if | else */
%pure-parser %pure-parser
%parse-param {TParseContext* context} %parse-param {TParseContext* context}
%param {void* yyscanner}
%code requires { %code requires {
#define YYLTYPE TSourceLoc #define YYLTYPE TSourceLoc
...@@ -87,7 +86,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -87,7 +86,7 @@ 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* lloc, TParseContext* context, const char* reason); extern void yyerror(YYLTYPE* lloc, TParseContext* context, void* scanner, const char* reason);
#define YYLLOC_DEFAULT(Current, Rhs, N) \ #define YYLLOC_DEFAULT(Current, Rhs, N) \
do { \ do { \
...@@ -1747,5 +1746,5 @@ function_definition ...@@ -1747,5 +1746,5 @@ function_definition
%% %%
int glslang_parse(TParseContext* context) { int glslang_parse(TParseContext* context) {
return yyparse(context); return yyparse(context, context->getScanner());
} }
...@@ -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 35 #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
...@@ -180,15 +180,7 @@ typedef void* yyscan_t; ...@@ -180,15 +180,7 @@ typedef void* yyscan_t;
/* Size of default input buffer. */ /* Size of default input buffer. */
#ifndef YY_BUF_SIZE #ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384 #define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif #endif
/* The state buf must be large enough to hold one state per character in the main buffer. /* The state buf must be large enough to hold one state per character in the main buffer.
...@@ -200,6 +192,11 @@ typedef void* yyscan_t; ...@@ -200,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
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#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
...@@ -218,6 +215,13 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; ...@@ -218,6 +215,13 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
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) \
...@@ -235,11 +239,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; ...@@ -235,11 +239,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #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 #ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state struct yy_buffer_state
...@@ -257,7 +256,7 @@ struct yy_buffer_state ...@@ -257,7 +256,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB /* Number of characters read into yy_ch_buf, not including EOB
* characters. * characters.
*/ */
int yy_n_chars; yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it, /* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to * and can realloc() it to grow it, and should free() it to
...@@ -336,7 +335,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); ...@@ -336,7 +335,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_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_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 *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
...@@ -368,7 +367,7 @@ void yyfree (void * ,yyscan_t yyscanner ); ...@@ -368,7 +367,7 @@ void yyfree (void * ,yyscan_t yyscanner );
/* Begin user sect3 */ /* Begin user sect3 */
#define yywrap(n) 1 #define yywrap(yyscanner) 1
#define YY_SKIP_YYWRAP #define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR; typedef unsigned char YY_CHAR;
...@@ -1071,8 +1070,8 @@ struct yyguts_t ...@@ -1071,8 +1070,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char; char yy_hold_char;
int yy_n_chars; yy_size_t yy_n_chars;
int yyleng_r; yy_size_t yyleng_r;
char *yy_c_buf_p; char *yy_c_buf_p;
int yy_init; int yy_init;
int yy_start; int yy_start;
...@@ -1129,7 +1128,7 @@ FILE *yyget_out (yyscan_t yyscanner ); ...@@ -1129,7 +1128,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,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 ); char *yyget_text (yyscan_t yyscanner );
...@@ -1137,6 +1136,10 @@ int yyget_lineno (yyscan_t yyscanner ); ...@@ -1137,6 +1136,10 @@ int yyget_lineno (yyscan_t yyscanner );
void yyset_lineno (int line_number ,yyscan_t yyscanner ); void yyset_lineno (int line_number ,yyscan_t yyscanner );
int yyget_column (yyscan_t yyscanner );
void yyset_column (int column_no ,yyscan_t yyscanner );
YYSTYPE * yyget_lval (yyscan_t yyscanner ); YYSTYPE * yyget_lval (yyscan_t yyscanner );
void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
...@@ -1183,12 +1186,7 @@ static int input (yyscan_t yyscanner ); ...@@ -1183,12 +1186,7 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */ /* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE #ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192 #define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif #endif
/* Copy whatever the last rule matched to the standard output. */ /* Copy whatever the last rule matched to the standard output. */
...@@ -1292,10 +1290,6 @@ YY_DECL ...@@ -1292,10 +1290,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;
/* Single-line comments */
yylval = yylval_param; yylval = yylval_param;
yylloc = yylloc_param; yylloc = yylloc_param;
...@@ -1326,6 +1320,12 @@ YY_DECL ...@@ -1326,6 +1320,12 @@ YY_DECL
yy_load_buffer_state(yyscanner ); yy_load_buffer_state(yyscanner );
} }
{
TParseContext* context = yyextra;
/* Single-line comments */
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;
...@@ -1342,7 +1342,7 @@ YY_DECL ...@@ -1342,7 +1342,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;
...@@ -1368,7 +1368,7 @@ yy_find_action: ...@@ -1368,7 +1368,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) 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 ) for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' ) if ( yytext[yyl] == '\n' )
...@@ -2235,6 +2235,7 @@ ECHO; ...@@ -2235,6 +2235,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
...@@ -2291,21 +2292,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2291,21 +2292,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ {
int num_to_read = yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 ) while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */ { /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */ /* just a shorter name for the current buffer */
YY_BUFFER_STATE b = YY_CURRENT_BUFFER; YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset = int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf); (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer ) 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 ) if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8; b->yy_buf_size += b->yy_buf_size / 8;
...@@ -2336,7 +2337,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2336,7 +2337,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */ /* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 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; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
} }
...@@ -2433,6 +2434,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2433,6 +2434,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 827); yy_is_jam = (yy_current_state == 827);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
...@@ -2461,7 +2463,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2461,7 +2463,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ /* need more input */ { /* 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; ++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) ) switch ( yy_get_next_buffer( yyscanner ) )
...@@ -2748,7 +2750,7 @@ void yypop_buffer_state (yyscan_t yyscanner) ...@@ -2748,7 +2750,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
*/ */
static void yyensure_buffer_stack (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; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) { if (!yyg->yy_buffer_stack) {
...@@ -2846,12 +2848,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) ...@@ -2846,12 +2848,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state 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; YY_BUFFER_STATE b;
char *buf; char *buf;
yy_size_t n; yy_size_t n;
int i; yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */ /* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2; n = _yybytes_len + 2;
...@@ -3001,7 +3003,7 @@ FILE *yyget_out (yyscan_t yyscanner) ...@@ -3001,7 +3003,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token. /** Get the length of the current token.
* @param yyscanner The scanner object. * @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; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng; return yyleng;
...@@ -3037,7 +3039,7 @@ void yyset_lineno (int line_number , yyscan_t yyscanner) ...@@ -3037,7 +3039,7 @@ void yyset_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */ /* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER ) if (! YY_CURRENT_BUFFER )
yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
yylineno = line_number; yylineno = line_number;
} }
...@@ -3052,7 +3054,7 @@ void yyset_column (int column_no , yyscan_t yyscanner) ...@@ -3052,7 +3054,7 @@ void yyset_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */ /* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER ) if (! YY_CURRENT_BUFFER )
yy_fatal_error( "yyset_column called with no buffer" , yyscanner); YY_FATAL_ERROR( "yyset_column called with no buffer" );
yycolumn = column_no; yycolumn = column_no;
} }
...@@ -3418,8 +3420,8 @@ int float_constant(yyscan_t yyscanner) { ...@@ -3418,8 +3420,8 @@ int float_constant(yyscan_t yyscanner) {
return FLOATCONSTANT; return FLOATCONSTANT;
} }
void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) { void yyerror(YYLTYPE* lloc, TParseContext* context, void* scanner, const char* reason) {
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); struct yyguts_t* yyg = (struct yyguts_t*) scanner;
if (context->AfterEOF) { if (context->AfterEOF) {
context->error(*lloc, reason, "unexpected EOF"); context->error(*lloc, reason, "unexpected EOF");
......
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 3.0.4. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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/>. */
...@@ -28,10 +26,19 @@ ...@@ -28,10 +26,19 @@
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
# define YY_YY_GLSLANG_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* "%code requires" blocks. */ /* "%code requires" blocks. */
...@@ -40,145 +47,143 @@ ...@@ -40,145 +47,143 @@
/* 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
union YYSTYPE
{ {
...@@ -215,27 +220,29 @@ typedef union YYSTYPE ...@@ -215,27 +220,29 @@ typedef union YYSTYPE
} interm; } interm;
};
} YYSTYPE; typedef union YYSTYPE 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
int yyparse (TParseContext* context, void* yyscanner);
#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