blob: 39c7613e355ea714e78fe178cff84a4da8393ae4 [file] [log] [blame]
/* A Bison parser, made by GNU Bison 3.8.2. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output, and Bison version. */
#define YYBISON 30802
/* Bison version string. */
#define YYBISON_VERSION "3.8.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 2
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* First part of user prologue. */
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_parser.py from glslang.y
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// glslang.y:
// Parser for the OpenGL shading language.
// Ignore errors in auto-generated code.
#if defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wunused-function"
# pragma GCC diagnostic ignored "-Wunused-variable"
# pragma GCC diagnostic ignored "-Wswitch-enum"
#elif defined(_MSC_VER)
# pragma warning(disable : 4065)
# pragma warning(disable : 4189)
# pragma warning(disable : 4244)
# pragma warning(disable : 4505)
# pragma warning(disable : 4701)
# pragma warning(disable : 4702)
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wunreachable-code"
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
#endif
#include "GLSLANG/ShaderLang.h"
#include "angle_gl.h"
#include "compiler/translator/Declarator.h"
#include "compiler/translator/ParseContext.h"
#include "compiler/translator/SymbolTable.h"
#define YYENABLE_NLS 0
using namespace sh;
#ifndef YY_CAST
# ifdef __cplusplus
# define YY_CAST(Type, Val) static_cast<Type>(Val)
# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type>(Val)
# else
# define YY_CAST(Type, Val) ((Type)(Val))
# define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val))
# endif
#endif
#ifndef YY_NULLPTR
# if defined __cplusplus
# if 201103L <= __cplusplus
# define YY_NULLPTR nullptr
# else
# define YY_NULLPTR 0
# endif
# else
# define YY_NULLPTR ((void *)0)
# endif
#endif
#include "glslang_tab_autogen.h"
/* Symbol kind. */
enum yysymbol_kind_t
{
YYSYMBOL_YYEMPTY = -2,
YYSYMBOL_YYEOF = 0, /* "end of file" */
YYSYMBOL_YYerror = 1, /* error */
YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
YYSYMBOL_INVARIANT = 3, /* INVARIANT */
YYSYMBOL_PRECISE = 4, /* PRECISE */
YYSYMBOL_HIGH_PRECISION = 5, /* HIGH_PRECISION */
YYSYMBOL_MEDIUM_PRECISION = 6, /* MEDIUM_PRECISION */
YYSYMBOL_LOW_PRECISION = 7, /* LOW_PRECISION */
YYSYMBOL_PRECISION = 8, /* PRECISION */
YYSYMBOL_ATTRIBUTE = 9, /* ATTRIBUTE */
YYSYMBOL_CONST_QUAL = 10, /* CONST_QUAL */
YYSYMBOL_BOOL_TYPE = 11, /* BOOL_TYPE */
YYSYMBOL_FLOAT_TYPE = 12, /* FLOAT_TYPE */
YYSYMBOL_INT_TYPE = 13, /* INT_TYPE */
YYSYMBOL_UINT_TYPE = 14, /* UINT_TYPE */
YYSYMBOL_BREAK = 15, /* BREAK */
YYSYMBOL_CONTINUE = 16, /* CONTINUE */
YYSYMBOL_DO = 17, /* DO */
YYSYMBOL_ELSE = 18, /* ELSE */
YYSYMBOL_FOR = 19, /* FOR */
YYSYMBOL_IF = 20, /* IF */
YYSYMBOL_DISCARD = 21, /* DISCARD */
YYSYMBOL_RETURN = 22, /* RETURN */
YYSYMBOL_SWITCH = 23, /* SWITCH */
YYSYMBOL_CASE = 24, /* CASE */
YYSYMBOL_DEFAULT = 25, /* DEFAULT */
YYSYMBOL_BVEC2 = 26, /* BVEC2 */
YYSYMBOL_BVEC3 = 27, /* BVEC3 */
YYSYMBOL_BVEC4 = 28, /* BVEC4 */
YYSYMBOL_IVEC2 = 29, /* IVEC2 */
YYSYMBOL_IVEC3 = 30, /* IVEC3 */
YYSYMBOL_IVEC4 = 31, /* IVEC4 */
YYSYMBOL_VEC2 = 32, /* VEC2 */
YYSYMBOL_VEC3 = 33, /* VEC3 */
YYSYMBOL_VEC4 = 34, /* VEC4 */
YYSYMBOL_UVEC2 = 35, /* UVEC2 */
YYSYMBOL_UVEC3 = 36, /* UVEC3 */
YYSYMBOL_UVEC4 = 37, /* UVEC4 */
YYSYMBOL_MATRIX2 = 38, /* MATRIX2 */
YYSYMBOL_MATRIX3 = 39, /* MATRIX3 */
YYSYMBOL_MATRIX4 = 40, /* MATRIX4 */
YYSYMBOL_IN_QUAL = 41, /* IN_QUAL */
YYSYMBOL_OUT_QUAL = 42, /* OUT_QUAL */
YYSYMBOL_INOUT_QUAL = 43, /* INOUT_QUAL */
YYSYMBOL_UNIFORM = 44, /* UNIFORM */
YYSYMBOL_BUFFER = 45, /* BUFFER */
YYSYMBOL_VARYING = 46, /* VARYING */
YYSYMBOL_MATRIX2x3 = 47, /* MATRIX2x3 */
YYSYMBOL_MATRIX3x2 = 48, /* MATRIX3x2 */
YYSYMBOL_MATRIX2x4 = 49, /* MATRIX2x4 */
YYSYMBOL_MATRIX4x2 = 50, /* MATRIX4x2 */
YYSYMBOL_MATRIX3x4 = 51, /* MATRIX3x4 */
YYSYMBOL_MATRIX4x3 = 52, /* MATRIX4x3 */
YYSYMBOL_SAMPLE = 53, /* SAMPLE */
YYSYMBOL_CENTROID = 54, /* CENTROID */
YYSYMBOL_FLAT = 55, /* FLAT */
YYSYMBOL_SMOOTH = 56, /* SMOOTH */
YYSYMBOL_NOPERSPECTIVE = 57, /* NOPERSPECTIVE */
YYSYMBOL_PATCH = 58, /* PATCH */
YYSYMBOL_READONLY = 59, /* READONLY */
YYSYMBOL_WRITEONLY = 60, /* WRITEONLY */
YYSYMBOL_COHERENT = 61, /* COHERENT */
YYSYMBOL_RESTRICT = 62, /* RESTRICT */
YYSYMBOL_VOLATILE = 63, /* VOLATILE */
YYSYMBOL_SHARED = 64, /* SHARED */
YYSYMBOL_STRUCT = 65, /* STRUCT */
YYSYMBOL_VOID_TYPE = 66, /* VOID_TYPE */
YYSYMBOL_WHILE = 67, /* WHILE */
YYSYMBOL_SAMPLER2D = 68, /* SAMPLER2D */
YYSYMBOL_SAMPLERCUBE = 69, /* SAMPLERCUBE */
YYSYMBOL_SAMPLER_EXTERNAL_OES = 70, /* SAMPLER_EXTERNAL_OES */
YYSYMBOL_SAMPLER2DRECT = 71, /* SAMPLER2DRECT */
YYSYMBOL_SAMPLER2DARRAY = 72, /* SAMPLER2DARRAY */
YYSYMBOL_ISAMPLER2D = 73, /* ISAMPLER2D */
YYSYMBOL_ISAMPLER3D = 74, /* ISAMPLER3D */
YYSYMBOL_ISAMPLERCUBE = 75, /* ISAMPLERCUBE */
YYSYMBOL_ISAMPLER2DARRAY = 76, /* ISAMPLER2DARRAY */
YYSYMBOL_USAMPLER2D = 77, /* USAMPLER2D */
YYSYMBOL_USAMPLER3D = 78, /* USAMPLER3D */
YYSYMBOL_USAMPLERCUBE = 79, /* USAMPLERCUBE */
YYSYMBOL_USAMPLER2DARRAY = 80, /* USAMPLER2DARRAY */
YYSYMBOL_SAMPLER2DMS = 81, /* SAMPLER2DMS */
YYSYMBOL_ISAMPLER2DMS = 82, /* ISAMPLER2DMS */
YYSYMBOL_USAMPLER2DMS = 83, /* USAMPLER2DMS */
YYSYMBOL_SAMPLER2DMSARRAY = 84, /* SAMPLER2DMSARRAY */
YYSYMBOL_ISAMPLER2DMSARRAY = 85, /* ISAMPLER2DMSARRAY */
YYSYMBOL_USAMPLER2DMSARRAY = 86, /* USAMPLER2DMSARRAY */
YYSYMBOL_SAMPLER3D = 87, /* SAMPLER3D */
YYSYMBOL_SAMPLER3DRECT = 88, /* SAMPLER3DRECT */
YYSYMBOL_SAMPLER2DSHADOW = 89, /* SAMPLER2DSHADOW */
YYSYMBOL_SAMPLERCUBESHADOW = 90, /* SAMPLERCUBESHADOW */
YYSYMBOL_SAMPLER2DARRAYSHADOW = 91, /* SAMPLER2DARRAYSHADOW */
YYSYMBOL_SAMPLERVIDEOWEBGL = 92, /* SAMPLERVIDEOWEBGL */
YYSYMBOL_SAMPLERCUBEARRAYOES = 93, /* SAMPLERCUBEARRAYOES */
YYSYMBOL_SAMPLERCUBEARRAYSHADOWOES = 94, /* SAMPLERCUBEARRAYSHADOWOES */
YYSYMBOL_ISAMPLERCUBEARRAYOES = 95, /* ISAMPLERCUBEARRAYOES */
YYSYMBOL_USAMPLERCUBEARRAYOES = 96, /* USAMPLERCUBEARRAYOES */
YYSYMBOL_SAMPLERCUBEARRAYEXT = 97, /* SAMPLERCUBEARRAYEXT */
YYSYMBOL_SAMPLERCUBEARRAYSHADOWEXT = 98, /* SAMPLERCUBEARRAYSHADOWEXT */
YYSYMBOL_ISAMPLERCUBEARRAYEXT = 99, /* ISAMPLERCUBEARRAYEXT */
YYSYMBOL_USAMPLERCUBEARRAYEXT = 100, /* USAMPLERCUBEARRAYEXT */
YYSYMBOL_SAMPLERBUFFER = 101, /* SAMPLERBUFFER */
YYSYMBOL_ISAMPLERBUFFER = 102, /* ISAMPLERBUFFER */
YYSYMBOL_USAMPLERBUFFER = 103, /* USAMPLERBUFFER */
YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 104, /* SAMPLEREXTERNAL2DY2YEXT */
YYSYMBOL_IMAGE2D = 105, /* IMAGE2D */
YYSYMBOL_IIMAGE2D = 106, /* IIMAGE2D */
YYSYMBOL_UIMAGE2D = 107, /* UIMAGE2D */
YYSYMBOL_IMAGE3D = 108, /* IMAGE3D */
YYSYMBOL_IIMAGE3D = 109, /* IIMAGE3D */
YYSYMBOL_UIMAGE3D = 110, /* UIMAGE3D */
YYSYMBOL_IMAGE2DARRAY = 111, /* IMAGE2DARRAY */
YYSYMBOL_IIMAGE2DARRAY = 112, /* IIMAGE2DARRAY */
YYSYMBOL_UIMAGE2DARRAY = 113, /* UIMAGE2DARRAY */
YYSYMBOL_IMAGECUBE = 114, /* IMAGECUBE */
YYSYMBOL_IIMAGECUBE = 115, /* IIMAGECUBE */
YYSYMBOL_UIMAGECUBE = 116, /* UIMAGECUBE */
YYSYMBOL_IMAGECUBEARRAYOES = 117, /* IMAGECUBEARRAYOES */
YYSYMBOL_IIMAGECUBEARRAYOES = 118, /* IIMAGECUBEARRAYOES */
YYSYMBOL_UIMAGECUBEARRAYOES = 119, /* UIMAGECUBEARRAYOES */
YYSYMBOL_IMAGECUBEARRAYEXT = 120, /* IMAGECUBEARRAYEXT */
YYSYMBOL_IIMAGECUBEARRAYEXT = 121, /* IIMAGECUBEARRAYEXT */
YYSYMBOL_UIMAGECUBEARRAYEXT = 122, /* UIMAGECUBEARRAYEXT */
YYSYMBOL_IMAGEBUFFER = 123, /* IMAGEBUFFER */
YYSYMBOL_IIMAGEBUFFER = 124, /* IIMAGEBUFFER */
YYSYMBOL_UIMAGEBUFFER = 125, /* UIMAGEBUFFER */
YYSYMBOL_ATOMICUINT = 126, /* ATOMICUINT */
YYSYMBOL_PIXELLOCALANGLE = 127, /* PIXELLOCALANGLE */
YYSYMBOL_IPIXELLOCALANGLE = 128, /* IPIXELLOCALANGLE */
YYSYMBOL_UPIXELLOCALANGLE = 129, /* UPIXELLOCALANGLE */
YYSYMBOL_LAYOUT = 130, /* LAYOUT */
YYSYMBOL_YUVCSCSTANDARDEXT = 131, /* YUVCSCSTANDARDEXT */
YYSYMBOL_YUVCSCSTANDARDEXTCONSTANT = 132, /* YUVCSCSTANDARDEXTCONSTANT */
YYSYMBOL_IDENTIFIER = 133, /* IDENTIFIER */
YYSYMBOL_TYPE_NAME = 134, /* TYPE_NAME */
YYSYMBOL_FLOATCONSTANT = 135, /* FLOATCONSTANT */
YYSYMBOL_INTCONSTANT = 136, /* INTCONSTANT */
YYSYMBOL_UINTCONSTANT = 137, /* UINTCONSTANT */
YYSYMBOL_BOOLCONSTANT = 138, /* BOOLCONSTANT */
YYSYMBOL_FIELD_SELECTION = 139, /* FIELD_SELECTION */
YYSYMBOL_LEFT_OP = 140, /* LEFT_OP */
YYSYMBOL_RIGHT_OP = 141, /* RIGHT_OP */
YYSYMBOL_INC_OP = 142, /* INC_OP */
YYSYMBOL_DEC_OP = 143, /* DEC_OP */
YYSYMBOL_LE_OP = 144, /* LE_OP */
YYSYMBOL_GE_OP = 145, /* GE_OP */
YYSYMBOL_EQ_OP = 146, /* EQ_OP */
YYSYMBOL_NE_OP = 147, /* NE_OP */
YYSYMBOL_AND_OP = 148, /* AND_OP */
YYSYMBOL_OR_OP = 149, /* OR_OP */
YYSYMBOL_XOR_OP = 150, /* XOR_OP */
YYSYMBOL_MUL_ASSIGN = 151, /* MUL_ASSIGN */
YYSYMBOL_DIV_ASSIGN = 152, /* DIV_ASSIGN */
YYSYMBOL_ADD_ASSIGN = 153, /* ADD_ASSIGN */
YYSYMBOL_MOD_ASSIGN = 154, /* MOD_ASSIGN */
YYSYMBOL_LEFT_ASSIGN = 155, /* LEFT_ASSIGN */
YYSYMBOL_RIGHT_ASSIGN = 156, /* RIGHT_ASSIGN */
YYSYMBOL_AND_ASSIGN = 157, /* AND_ASSIGN */
YYSYMBOL_XOR_ASSIGN = 158, /* XOR_ASSIGN */
YYSYMBOL_OR_ASSIGN = 159, /* OR_ASSIGN */
YYSYMBOL_SUB_ASSIGN = 160, /* SUB_ASSIGN */
YYSYMBOL_LEFT_PAREN = 161, /* LEFT_PAREN */
YYSYMBOL_RIGHT_PAREN = 162, /* RIGHT_PAREN */
YYSYMBOL_LEFT_BRACKET = 163, /* LEFT_BRACKET */
YYSYMBOL_RIGHT_BRACKET = 164, /* RIGHT_BRACKET */
YYSYMBOL_LEFT_BRACE = 165, /* LEFT_BRACE */
YYSYMBOL_RIGHT_BRACE = 166, /* RIGHT_BRACE */
YYSYMBOL_DOT = 167, /* DOT */
YYSYMBOL_COMMA = 168, /* COMMA */
YYSYMBOL_COLON = 169, /* COLON */
YYSYMBOL_EQUAL = 170, /* EQUAL */
YYSYMBOL_SEMICOLON = 171, /* SEMICOLON */
YYSYMBOL_BANG = 172, /* BANG */
YYSYMBOL_DASH = 173, /* DASH */
YYSYMBOL_TILDE = 174, /* TILDE */
YYSYMBOL_PLUS = 175, /* PLUS */
YYSYMBOL_STAR = 176, /* STAR */
YYSYMBOL_SLASH = 177, /* SLASH */
YYSYMBOL_PERCENT = 178, /* PERCENT */
YYSYMBOL_LEFT_ANGLE = 179, /* LEFT_ANGLE */
YYSYMBOL_RIGHT_ANGLE = 180, /* RIGHT_ANGLE */
YYSYMBOL_VERTICAL_BAR = 181, /* VERTICAL_BAR */
YYSYMBOL_CARET = 182, /* CARET */
YYSYMBOL_AMPERSAND = 183, /* AMPERSAND */
YYSYMBOL_QUESTION = 184, /* QUESTION */
YYSYMBOL_YYACCEPT = 185, /* $accept */
YYSYMBOL_identifier = 186, /* identifier */
YYSYMBOL_variable_identifier = 187, /* variable_identifier */
YYSYMBOL_primary_expression = 188, /* primary_expression */
YYSYMBOL_postfix_expression = 189, /* postfix_expression */
YYSYMBOL_integer_expression = 190, /* integer_expression */
YYSYMBOL_function_call = 191, /* function_call */
YYSYMBOL_function_call_or_method = 192, /* function_call_or_method */
YYSYMBOL_function_call_generic = 193, /* function_call_generic */
YYSYMBOL_function_call_header_no_parameters = 194, /* function_call_header_no_parameters */
YYSYMBOL_function_call_header_with_parameters = 195, /* function_call_header_with_parameters */
YYSYMBOL_function_call_header = 196, /* function_call_header */
YYSYMBOL_function_identifier = 197, /* function_identifier */
YYSYMBOL_unary_expression = 198, /* unary_expression */
YYSYMBOL_unary_operator = 199, /* unary_operator */
YYSYMBOL_multiplicative_expression = 200, /* multiplicative_expression */
YYSYMBOL_additive_expression = 201, /* additive_expression */
YYSYMBOL_shift_expression = 202, /* shift_expression */
YYSYMBOL_relational_expression = 203, /* relational_expression */
YYSYMBOL_equality_expression = 204, /* equality_expression */
YYSYMBOL_and_expression = 205, /* and_expression */
YYSYMBOL_exclusive_or_expression = 206, /* exclusive_or_expression */
YYSYMBOL_inclusive_or_expression = 207, /* inclusive_or_expression */
YYSYMBOL_logical_and_expression = 208, /* logical_and_expression */
YYSYMBOL_209_1 = 209, /* $@1 */
YYSYMBOL_logical_xor_expression = 210, /* logical_xor_expression */
YYSYMBOL_logical_or_expression = 211, /* logical_or_expression */
YYSYMBOL_212_2 = 212, /* $@2 */
YYSYMBOL_conditional_expression = 213, /* conditional_expression */
YYSYMBOL_214_3 = 214, /* $@3 */
YYSYMBOL_215_4 = 215, /* $@4 */
YYSYMBOL_assignment_expression = 216, /* assignment_expression */
YYSYMBOL_assignment_operator = 217, /* assignment_operator */
YYSYMBOL_expression = 218, /* expression */
YYSYMBOL_219_5 = 219, /* $@5 */
YYSYMBOL_constant_expression = 220, /* constant_expression */
YYSYMBOL_enter_struct = 221, /* enter_struct */
YYSYMBOL_declaration = 222, /* declaration */
YYSYMBOL_function_prototype = 223, /* function_prototype */
YYSYMBOL_function_declarator = 224, /* function_declarator */
YYSYMBOL_function_header_with_parameters = 225, /* function_header_with_parameters */
YYSYMBOL_function_header = 226, /* function_header */
YYSYMBOL_parameter_declarator = 227, /* parameter_declarator */
YYSYMBOL_parameter_declaration = 228, /* parameter_declaration */
YYSYMBOL_parameter_type_specifier = 229, /* parameter_type_specifier */
YYSYMBOL_init_declarator_list = 230, /* init_declarator_list */
YYSYMBOL_single_declaration = 231, /* single_declaration */
YYSYMBOL_fully_specified_type = 232, /* fully_specified_type */
YYSYMBOL_interpolation_qualifier = 233, /* interpolation_qualifier */
YYSYMBOL_type_qualifier = 234, /* type_qualifier */
YYSYMBOL_invariant_qualifier = 235, /* invariant_qualifier */
YYSYMBOL_precise_qualifier = 236, /* precise_qualifier */
YYSYMBOL_single_type_qualifier = 237, /* single_type_qualifier */
YYSYMBOL_storage_qualifier = 238, /* storage_qualifier */
YYSYMBOL_type_specifier = 239, /* type_specifier */
YYSYMBOL_precision_qualifier = 240, /* precision_qualifier */
YYSYMBOL_layout_qualifier = 241, /* layout_qualifier */
YYSYMBOL_layout_qualifier_id_list = 242, /* layout_qualifier_id_list */
YYSYMBOL_layout_qualifier_id = 243, /* layout_qualifier_id */
YYSYMBOL_type_specifier_no_prec = 244, /* type_specifier_no_prec */
YYSYMBOL_array_specifier = 245, /* array_specifier */
YYSYMBOL_type_specifier_nonarray = 246, /* type_specifier_nonarray */
YYSYMBOL_struct_specifier = 247, /* struct_specifier */
YYSYMBOL_248_6 = 248, /* $@6 */
YYSYMBOL_249_7 = 249, /* $@7 */
YYSYMBOL_struct_declaration_list = 250, /* struct_declaration_list */
YYSYMBOL_struct_declaration = 251, /* struct_declaration */
YYSYMBOL_struct_declarator_list = 252, /* struct_declarator_list */
YYSYMBOL_struct_declarator = 253, /* struct_declarator */
YYSYMBOL_initializer = 254, /* initializer */
YYSYMBOL_declaration_statement = 255, /* declaration_statement */
YYSYMBOL_statement = 256, /* statement */
YYSYMBOL_simple_statement = 257, /* simple_statement */
YYSYMBOL_compound_statement_with_scope = 258, /* compound_statement_with_scope */
YYSYMBOL_259_8 = 259, /* $@8 */
YYSYMBOL_260_9 = 260, /* $@9 */
YYSYMBOL_statement_no_new_scope = 261, /* statement_no_new_scope */
YYSYMBOL_statement_with_scope = 262, /* statement_with_scope */
YYSYMBOL_263_10 = 263, /* $@10 */
YYSYMBOL_264_11 = 264, /* $@11 */
YYSYMBOL_compound_statement_no_new_scope = 265, /* compound_statement_no_new_scope */
YYSYMBOL_statement_list = 266, /* statement_list */
YYSYMBOL_expression_statement = 267, /* expression_statement */
YYSYMBOL_selection_statement = 268, /* selection_statement */
YYSYMBOL_269_12 = 269, /* $@12 */
YYSYMBOL_selection_rest_statement = 270, /* selection_rest_statement */
YYSYMBOL_271_13 = 271, /* $@13 */
YYSYMBOL_switch_statement = 272, /* switch_statement */
YYSYMBOL_273_14 = 273, /* $@14 */
YYSYMBOL_case_label = 274, /* case_label */
YYSYMBOL_condition = 275, /* condition */
YYSYMBOL_iteration_statement = 276, /* iteration_statement */
YYSYMBOL_277_15 = 277, /* $@15 */
YYSYMBOL_278_16 = 278, /* $@16 */
YYSYMBOL_279_17 = 279, /* $@17 */
YYSYMBOL_280_18 = 280, /* $@18 */
YYSYMBOL_281_19 = 281, /* $@19 */
YYSYMBOL_282_20 = 282, /* $@20 */
YYSYMBOL_for_init_statement = 283, /* for_init_statement */
YYSYMBOL_conditionopt = 284, /* conditionopt */
YYSYMBOL_for_rest_statement = 285, /* for_rest_statement */
YYSYMBOL_286_21 = 286, /* $@21 */
YYSYMBOL_jump_statement = 287, /* jump_statement */
YYSYMBOL_translation_unit = 288, /* translation_unit */
YYSYMBOL_external_declaration = 289, /* external_declaration */
YYSYMBOL_function_definition = 290, /* function_definition */
YYSYMBOL_291_22 = 291 /* $@22 */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
/* Second part of user prologue. */
extern int yylex(YYSTYPE *yylval, YYLTYPE *yylloc, void *yyscanner);
extern void yyerror(YYLTYPE *yylloc, TParseContext *context, void *scanner, const char *reason);
#define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
{ \
if (N) \
{ \
(Current).first_file = YYRHSLOC(Rhs, 1).first_file; \
(Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
(Current).last_file = YYRHSLOC(Rhs, N).last_file; \
(Current).last_line = YYRHSLOC(Rhs, N).last_line; \
} \
else \
{ \
(Current).first_file = YYRHSLOC(Rhs, 0).last_file; \
(Current).first_line = YYRHSLOC(Rhs, 0).last_line; \
(Current).last_file = YYRHSLOC(Rhs, 0).last_file; \
(Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
} \
} while (0)
#define VERTEX_ONLY(S, L) \
do \
{ \
if (context->getShaderType() != GL_VERTEX_SHADER) \
{ \
context->error(L, " supported in vertex shaders only", S); \
} \
} while (0)
#define COMPUTE_ONLY(S, L) \
do \
{ \
if (context->getShaderType() != GL_COMPUTE_SHADER) \
{ \
context->error(L, " supported in compute shaders only", S); \
} \
} while (0)
#define ES2_ONLY(S, L) \
do \
{ \
if (context->getShaderVersion() != 100) \
{ \
context->error(L, " supported in GLSL ES 1.00 only", S); \
} \
} while (0)
#define ES3_OR_NEWER(TOKEN, LINE, REASON) \
do \
{ \
if (context->getShaderVersion() < 300) \
{ \
context->error(LINE, REASON " supported in GLSL ES 3.00 and above only", TOKEN); \
} \
} while (0)
#define ES3_1_OR_NEWER(TOKEN, LINE, REASON) \
do \
{ \
if (context->getShaderVersion() < 310) \
{ \
context->error(LINE, REASON " supported in GLSL ES 3.10 and above only", TOKEN); \
} \
} while (0)
#ifdef short
# undef short
#endif
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
<limits.h> and (if available) <stdint.h> are included
so that the code can choose integer types of a good width. */
#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
# define YY_STDINT_H
# endif
#endif
/* Narrow types that promote to a signed type and that can represent a
signed or unsigned integer of at least N bits. In tables they can
save space and decrease cache pressure. Promoting to a signed type
helps avoid bugs in integer arithmetic. */
#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif
#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif
/* Work around bug in HP-UX 11.23, which defines these macros
incorrectly for preprocessor constants. This workaround can likely
be removed in 2023, as HPE has promised support for HP-UX 11.23
(aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
<https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif
#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
# define YYPTRDIFF_T __PTRDIFF_TYPE__
# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
# ifndef ptrdiff_t
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define YYPTRDIFF_T ptrdiff_t
# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
# define YYPTRDIFF_T long
# define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned
# endif
#endif
#define YYSIZE_MAXIMUM \
YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM \
: YY_CAST(YYSIZE_T, -1)))
#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X))
/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;
/* State numbers in computations. */
typedef int yy_state_fast_t;
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(Msgid) dgettext("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
# define YY_(Msgid) Msgid
# endif
#endif
#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
# define YY_ATTRIBUTE_PURE __attribute__((__pure__))
# else
# define YY_ATTRIBUTE_PURE
# endif
#endif
#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
# define YY_ATTRIBUTE_UNUSED __attribute__((__unused__))
# else
# define YY_ATTRIBUTE_UNUSED
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if !defined lint || defined __GNUC__
# define YY_USE(E) ((void)(E))
#else
# define YY_USE(E) /* empty */
#endif
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"")
# else
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#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
#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN \
_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif
#define YY_ASSERT(E) ((void)(0 && (E)))
#if !defined yyoverflow
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# elif defined __BUILTIN_VA_ARG_INCR
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
# elif defined _AIX
# define YYSTACK_ALLOC __alloca
# elif defined _MSC_VER
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
# if !defined _ALLOCA_H && !defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's 'empty if-body' warning. */
# define YYSTACK_FREE(Ptr) \
do \
{ /* empty */ \
; \
} while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus && !defined EXIT_SUCCESS && \
!((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if !defined malloc && !defined EXIT_SUCCESS
void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if !defined free && !defined EXIT_SUCCESS
void free(void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
#endif /* !defined yyoverflow */
#if (!defined yyoverflow && \
(!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \
defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yy_state_t yyss_alloc;
YYSTYPE yyvs_alloc;
YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + \
2 * YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF(*yyptr); \
} while (0)
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
__builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYPTRDIFF_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 167
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 3577
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 185
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 107
/* YYNRULES -- Number of rules. */
#define YYNRULES 340
/* YYNSTATES -- Number of states. */
#define YYNSTATES 464
/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 439
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, with out-of-bounds checking. */
#define YYTRANSLATE(YYX) \
(0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) \
: YYSYMBOL_YYUNDEF)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex. */
static const yytype_uint8 yytranslate[] = {
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
182, 183, 184};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] = {
0, 259, 259, 260, 263, 270, 273, 278, 283, 288, 293, 302, 308, 311, 314, 317,
320, 323, 329, 336, 342, 345, 353, 356, 362, 365, 371, 375, 382, 390, 393, 396,
402, 405, 408, 411, 418, 419, 420, 421, 429, 430, 433, 436, 443, 444, 447, 453,
454, 458, 465, 466, 469, 472, 475, 481, 482, 485, 491, 492, 499, 500, 507, 508,
515, 516, 516, 524, 525, 531, 532, 532, 540, 541, 543, 541, 551, 552, 558, 559,
560, 561, 565, 566, 567, 571, 575, 579, 583, 590, 593, 593, 601, 608, 615, 618,
621, 625, 629, 633, 637, 641, 648, 655, 658, 665, 678, 701, 711, 714, 720, 724,
728, 732, 739, 745, 748, 752, 756, 761, 768, 772, 776, 780, 785, 792, 796, 802,
805, 808, 818, 822, 829, 835, 841, 845, 849, 852, 855, 859, 867, 872, 876, 879,
882, 885, 888, 892, 902, 905, 909, 912, 915, 918, 921, 924, 928, 935, 942, 945,
948, 954, 961, 964, 970, 973, 976, 979, 985, 988, 995, 1000, 1007, 1015, 1029, 1032,
1035, 1038, 1041, 1044, 1048, 1052, 1056, 1060, 1064, 1068, 1072, 1076, 1080, 1084, 1088, 1092,
1096, 1100, 1104, 1108, 1112, 1116, 1120, 1124, 1128, 1135, 1138, 1141, 1144, 1147, 1150, 1153,
1161, 1169, 1179, 1182, 1185, 1188, 1191, 1194, 1197, 1205, 1213, 1223, 1226, 1229, 1232, 1235,
1238, 1241, 1249, 1257, 1267, 1270, 1273, 1276, 1284, 1292, 1299, 1309, 1316, 1323, 1326, 1329,
1332, 1335, 1338, 1341, 1344, 1347, 1350, 1353, 1356, 1359, 1367, 1375, 1383, 1391, 1399, 1407,
1417, 1427, 1437, 1440, 1447, 1454, 1461, 1464, 1474, 1474, 1477, 1477, 1483, 1486, 1492, 1495,
1502, 1506, 1512, 1515, 1521, 1525, 1529, 1530, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1546,
1550, 1550, 1550, 1557, 1558, 1565, 1565, 1566, 1566, 1575, 1579, 1586, 1590, 1597, 1598, 1605,
1605, 1613, 1613, 1621, 1631, 1631, 1637, 1640, 1646, 1650, 1656, 1659, 1656, 1665, 1668, 1665,
1673, 1673, 1673, 1682, 1686, 1692, 1695, 1701, 1707, 1707, 1717, 1720, 1723, 1726, 1729, 1737,
1743, 1749, 1752, 1758, 1758};
#endif
/** Accessing symbol of state STATE. */
#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State])
#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
YYSYMBOL. No bounds checking. */
static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] = {"\"end of file\"",
"error",
"\"invalid token\"",
"INVARIANT",
"PRECISE",
"HIGH_PRECISION",
"MEDIUM_PRECISION",
"LOW_PRECISION",
"PRECISION",
"ATTRIBUTE",
"CONST_QUAL",
"BOOL_TYPE",
"FLOAT_TYPE",
"INT_TYPE",
"UINT_TYPE",
"BREAK",
"CONTINUE",
"DO",
"ELSE",
"FOR",
"IF",
"DISCARD",
"RETURN",
"SWITCH",
"CASE",
"DEFAULT",
"BVEC2",
"BVEC3",
"BVEC4",
"IVEC2",
"IVEC3",
"IVEC4",
"VEC2",
"VEC3",
"VEC4",
"UVEC2",
"UVEC3",
"UVEC4",
"MATRIX2",
"MATRIX3",
"MATRIX4",
"IN_QUAL",
"OUT_QUAL",
"INOUT_QUAL",
"UNIFORM",
"BUFFER",
"VARYING",
"MATRIX2x3",
"MATRIX3x2",
"MATRIX2x4",
"MATRIX4x2",
"MATRIX3x4",
"MATRIX4x3",
"SAMPLE",
"CENTROID",
"FLAT",
"SMOOTH",
"NOPERSPECTIVE",
"PATCH",
"READONLY",
"WRITEONLY",
"COHERENT",
"RESTRICT",
"VOLATILE",
"SHARED",
"STRUCT",
"VOID_TYPE",
"WHILE",
"SAMPLER2D",
"SAMPLERCUBE",
"SAMPLER_EXTERNAL_OES",
"SAMPLER2DRECT",
"SAMPLER2DARRAY",
"ISAMPLER2D",
"ISAMPLER3D",
"ISAMPLERCUBE",
"ISAMPLER2DARRAY",
"USAMPLER2D",
"USAMPLER3D",
"USAMPLERCUBE",
"USAMPLER2DARRAY",
"SAMPLER2DMS",
"ISAMPLER2DMS",
"USAMPLER2DMS",
"SAMPLER2DMSARRAY",
"ISAMPLER2DMSARRAY",
"USAMPLER2DMSARRAY",
"SAMPLER3D",
"SAMPLER3DRECT",
"SAMPLER2DSHADOW",
"SAMPLERCUBESHADOW",
"SAMPLER2DARRAYSHADOW",
"SAMPLERVIDEOWEBGL",
"SAMPLERCUBEARRAYOES",
"SAMPLERCUBEARRAYSHADOWOES",
"ISAMPLERCUBEARRAYOES",
"USAMPLERCUBEARRAYOES",
"SAMPLERCUBEARRAYEXT",
"SAMPLERCUBEARRAYSHADOWEXT",
"ISAMPLERCUBEARRAYEXT",
"USAMPLERCUBEARRAYEXT",
"SAMPLERBUFFER",
"ISAMPLERBUFFER",
"USAMPLERBUFFER",
"SAMPLEREXTERNAL2DY2YEXT",
"IMAGE2D",
"IIMAGE2D",
"UIMAGE2D",
"IMAGE3D",
"IIMAGE3D",
"UIMAGE3D",
"IMAGE2DARRAY",
"IIMAGE2DARRAY",
"UIMAGE2DARRAY",
"IMAGECUBE",
"IIMAGECUBE",
"UIMAGECUBE",
"IMAGECUBEARRAYOES",
"IIMAGECUBEARRAYOES",
"UIMAGECUBEARRAYOES",
"IMAGECUBEARRAYEXT",
"IIMAGECUBEARRAYEXT",
"UIMAGECUBEARRAYEXT",
"IMAGEBUFFER",
"IIMAGEBUFFER",
"UIMAGEBUFFER",
"ATOMICUINT",
"PIXELLOCALANGLE",
"IPIXELLOCALANGLE",
"UPIXELLOCALANGLE",
"LAYOUT",
"YUVCSCSTANDARDEXT",
"YUVCSCSTANDARDEXTCONSTANT",
"IDENTIFIER",
"TYPE_NAME",
"FLOATCONSTANT",
"INTCONSTANT",
"UINTCONSTANT",
"BOOLCONSTANT",
"FIELD_SELECTION",
"LEFT_OP",
"RIGHT_OP",
"INC_OP",
"DEC_OP",
"LE_OP",
"GE_OP",
"EQ_OP",
"NE_OP",
"AND_OP",
"OR_OP",
"XOR_OP",
"MUL_ASSIGN",
"DIV_ASSIGN",
"ADD_ASSIGN",
"MOD_ASSIGN",
"LEFT_ASSIGN",
"RIGHT_ASSIGN",
"AND_ASSIGN",
"XOR_ASSIGN",
"OR_ASSIGN",
"SUB_ASSIGN",
"LEFT_PAREN",
"RIGHT_PAREN",
"LEFT_BRACKET",
"RIGHT_BRACKET",
"LEFT_BRACE",
"RIGHT_BRACE",
"DOT",
"COMMA",
"COLON",
"EQUAL",
"SEMICOLON",
"BANG",
"DASH",
"TILDE",
"PLUS",
"STAR",
"SLASH",
"PERCENT",
"LEFT_ANGLE",
"RIGHT_ANGLE",
"VERTICAL_BAR",
"CARET",
"AMPERSAND",
"QUESTION",
"$accept",
"identifier",
"variable_identifier",
"primary_expression",
"postfix_expression",
"integer_expression",
"function_call",
"function_call_or_method",
"function_call_generic",
"function_call_header_no_parameters",
"function_call_header_with_parameters",
"function_call_header",
"function_identifier",
"unary_expression",
"unary_operator",
"multiplicative_expression",
"additive_expression",
"shift_expression",
"relational_expression",
"equality_expression",
"and_expression",
"exclusive_or_expression",
"inclusive_or_expression",
"logical_and_expression",
"$@1",
"logical_xor_expression",
"logical_or_expression",
"$@2",
"conditional_expression",
"$@3",
"$@4",
"assignment_expression",
"assignment_operator",
"expression",
"$@5",
"constant_expression",
"enter_struct",
"declaration",
"function_prototype",
"function_declarator",
"function_header_with_parameters",
"function_header",
"parameter_declarator",
"parameter_declaration",
"parameter_type_specifier",
"init_declarator_list",
"single_declaration",
"fully_specified_type",
"interpolation_qualifier",
"type_qualifier",
"invariant_qualifier",
"precise_qualifier",
"single_type_qualifier",
"storage_qualifier",
"type_specifier",
"precision_qualifier",
"layout_qualifier",
"layout_qualifier_id_list",
"layout_qualifier_id",
"type_specifier_no_prec",
"array_specifier",
"type_specifier_nonarray",
"struct_specifier",
"$@6",
"$@7",
"struct_declaration_list",
"struct_declaration",
"struct_declarator_list",
"struct_declarator",
"initializer",
"declaration_statement",
"statement",
"simple_statement",
"compound_statement_with_scope",
"$@8",
"$@9",
"statement_no_new_scope",
"statement_with_scope",
"$@10",
"$@11",
"compound_statement_no_new_scope",
"statement_list",
"expression_statement",
"selection_statement",
"$@12",
"selection_rest_statement",
"$@13",
"switch_statement",
"$@14",
"case_label",
"condition",
"iteration_statement",
"$@15",
"$@16",
"$@17",
"$@18",
"$@19",
"$@20",
"for_init_statement",
"conditionopt",
"for_rest_statement",
"$@21",
"jump_statement",
"translation_unit",
"external_declaration",
"function_definition",
"$@22",
YY_NULLPTR};
static const char *yysymbol_name(yysymbol_kind_t yysymbol)
{
return yytname[yysymbol];
}
#endif
#define YYPACT_NINF (-413)
#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF)
#define YYTABLE_NINF (-328)
#define yytable_value_is_error(Yyn) 0
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
static const yytype_int16 yypact[] = {
3063, -413, -413, -413, -413, -413, 125, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -106, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
-413, -413, -413, -107, -413, -413, -413, -68, -121, -104, 3195, -119, -413, -26, -413, 1620,
-413, -413, -413, -413, -413, -413, -413, -413, -71, -413, 2931, -413, -413, 3443, -413, -413,
-413, -40, -49, -413, -32, -413, 3195, -413, -413, -413, 3195, 12, 12, -413, -24, -134,
-127, -413, 3195, -413, -413, 1745, -23, -413, -413, -29, 3195, -413, -413, -17, -81, -413,
449, -413, -413, -413, -413, -71, -103, -413, 2204, -94, -413, -413, 3195, 12, 2508, -413,
-413, -12, -413, -413, -413, -413, -413, 2204, 2204, 2204, -413, -413, -413, -413, -413, -413,
-413, -65, -413, -413, -413, 7, -80, 2355, 18, -413, 2204, -21, -39, 19, -122, 17,
-22, 1, 3, 34, 35, -129, -413, 22, -413, 1899, -413, 2649, 3195, 29, -413, -49,
16, 20, -413, 28, 31, 23, 2053, 32, 2204, 26, 36, 33, -413, -413, 101, -413,
-413, -105, -413, -68, 37, -413, -413, -413, -413, 622, -413, -413, -413, -413, -413, -413,
-23, 2204, -84, -413, -413, 2204, 12, -71, -48, -413, -115, -413, -413, -413, -79, -413,
-413, 2204, 3319, -413, -413, 2204, 38, -413, -413, -413, 2204, 2204, 2204, 2204, 2204, 2204,
2204, 2204, 2204, 2204, 2204, 2204, 2204, 2204, 2204, 2204, -413, 2204, -413, -413, -413, -413,
39, -413, 2790, -413, -413, -413, -413, -413, 41, -413, 2204, -413, -413, -47, 2204, 55,
-413, -413, -413, 795, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 2204,
-413, -413, -413, -413, -413, 2204, -413, -42, -23, 12, -413, -137, -413, -413, 40, 58,
-413, 66, -413, -413, -413, -413, -413, -21, -21, -39, -39, 19, 19, 19, 19, -122,
-122, 17, -22, 1, 2204, 34, 2204, 2204, -413, -413, 134, -32, 1141, 1314, -72, -413,
-69, -413, 1467, 795, -413, 2204, -413, -413, -413, -413, -128, -413, 3, 35, -1, 69,
-413, -413, -413, -413, -413, -413, -413, 58, 12, 3195, -413, 65, -413, -413, -413, -413,
1467, 41, -32, 62, 71, -413, 2204, 2204, -413, 63, 76, 221, -413, -413, 2204, 968,
-413, -62, 78, 968, -413, -413, -413, -413, -413, 70, 2204, -413, 41, -413, 58, -413};
/* 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_int16 yydefact[] = {
0, 132, 133, 158, 159, 160, 0, 140, 142, 178, 175, 176, 177, 182, 183, 184, 185, 186, 187,
179, 180, 181, 188, 189, 190, 191, 192, 193, 143, 144, 145, 148, 149, 141, 194, 195, 196, 197,
198, 199, 156, 146, 128, 127, 129, 147, 150, 151, 152, 153, 154, 155, 0, 174, 201, 203, 234,
236, 204, 210, 211, 212, 213, 219, 220, 221, 222, 205, 214, 223, 206, 215, 224, 202, 228, 229,
230, 233, 207, 231, 216, 225, 208, 232, 217, 226, 209, 218, 227, 235, 237, 238, 239, 240, 241,
242, 243, 244, 245, 246, 247, 248, 249, 251, 253, 250, 252, 254, 255, 256, 257, 258, 259, 260,
261, 0, 200, 263, 338, 339, 0, 104, 103, 0, 115, 120, 137, 0, 138, 139, 130, 134, 125,
136, 135, 157, 168, 262, 0, 335, 337, 0, 2, 3, 266, 0, 0, 94, 0, 102, 0, 111,
105, 113, 0, 114, 0, 95, 2, 121, 0, 100, 0, 131, 126, 0, 169, 1, 336, 0, 0,
264, 167, 164, 0, 162, 0, 340, 106, 110, 112, 108, 116, 107, 0, 122, 93, 101, 0, 0,
0, 268, 10, 4, 8, 6, 7, 9, 31, 0, 0, 0, 170, 38, 37, 39, 36, 5, 12,
32, 14, 19, 20, 0, 0, 25, 0, 40, 0, 44, 47, 50, 55, 58, 60, 62, 64, 67,
69, 72, 92, 0, 29, 0, 96, 0, 0, 0, 161, 0, 0, 0, 317, 0, 0, 0, 0,
0, 0, 0, 0, 288, 297, 301, 40, 76, 89, 0, 277, 0, 157, 280, 299, 279, 278, 0,
281, 282, 283, 284, 285, 286, 109, 0, 117, 276, 124, 0, 0, 274, 0, 272, 0, 269, 33,
34, 0, 16, 17, 0, 0, 23, 22, 0, 174, 26, 28, 35, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 70, 73, 171, 172, 0, 267, 0,
165, 166, 163, 331, 330, 295, 320, 0, 334, 332, 0, 0, 0, 311, 314, 287, 0, 79, 80,
82, 81, 84, 85, 86, 87, 88, 83, 78, 0, 90, 302, 298, 300, 119, 0, 123, 0, 275,
0, 270, 0, 97, 11, 0, 18, 30, 15, 21, 27, 41, 42, 43, 46, 45, 48, 49, 53,
54, 51, 52, 56, 57, 59, 61, 63, 0, 68, 0, 0, 173, 265, 0, 0, 0, 0, 0,
333, 0, 310, 0, 289, 77, 0, 118, 271, 273, 98, 0, 13, 66, 71, 0, 0, 294, 296,
324, 323, 321, 303, 308, 312, 0, 0, 315, 0, 91, 99, 74, 318, 326, 295, 0, 0, 0,
290, 0, 0, 325, 0, 0, 307, 304, 309, 0, 0, 75, 0, 328, 0, 305, 313, 292, 316,
291, 0, 0, 322, 295, 319, 329, 306};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] = {
-413, -51, -413, -413, -413, -413, -413, -413, -45, -413, -413, -413, -413, -90, -413, -130,
-126, -194, -136, -64, -70, -67, -140, -66, -413, -147, -413, -413, -153, -413, -413, -176,
-413, -195, -413, -208, -413, 9, 13, -413, -413, -413, 97, 114, 112, -413, -413, -370,
-413, -120, -413, -413, -123, -413, -117, 261, -413, -413, 30, 0, -135, -413, -413, -413,
-413, -151, -174, -10, -89, -266, -124, -251, -379, -413, -413, -413, -177, -412, -413, -413,
-145, -63, -118, -413, -413, -413, -413, -413, -413, -413, -157, -413, -413, -413, -413, -413,
-413, -413, -413, -413, -413, -413, -413, -413, 139, -413, -413};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] = {
0, 279, 207, 208, 209, 366, 210, 211, 212, 213, 214, 215, 216, 254, 218, 219, 220, 221,
222, 223, 224, 225, 226, 227, 388, 228, 229, 390, 255, 391, 438, 256, 351, 257, 405, 231,
162, 258, 259, 120, 121, 122, 151, 152, 153, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 174, 175, 232, 166, 136, 137, 236, 170, 190, 191, 280, 281, 276, 261, 262,
263, 264, 339, 427, 455, 394, 395, 396, 456, 265, 266, 267, 433, 444, 460, 268, 434, 269,
426, 270, 402, 436, 328, 439, 397, 432, 420, 441, 442, 458, 271, 138, 139, 140, 148};
/* 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_int16 yytable[] = {
135, 145, 154, 177, 163, 155, 286, 356, 275, 118, 164, 358, 230, 119, 355, 172, 283, 417, 363,
235, 316, 443, 305, 306, 185, 320, 165, 142, 143, 165, 154, 163, 424, 155, 409, 233, 184, 155,
186, 295, 335, 149, 188, 429, 187, 189, 272, 274, 463, 156, 188, 333, 157, 189, 146, 317, 364,
307, 308, 144, 165, 283, 424, 352, 150, 163, 353, 273, 454, 233, 188, 278, 454, 189, 159, 217,
277, 287, 288, 233, 230, 238, 292, 365, 173, 322, 357, 239, 293, 352, 421, 406, 165, 422, 367,
230, 352, 275, 289, 352, 457, 275, 290, 147, 181, 182, 352, 158, 143, 284, 285, 379, 380, 381,
382, 188, 188, 371, 189, 189, 361, 352, 135, 362, 399, 171, 361, 135, 297, 407, 3, 4, 5,
176, 301, 398, 302, 183, 135, 400, 233, 169, 234, 217, 360, 142, 143, 118, 283, -30, 135, 119,
355, 237, 135, 298, 299, 300, 217, 303, 304, 311, 135, 309, 310, 323, 324, 352, 430, 291, 135,
375, 376, 383, 384, 404, 260, 377, 378, 296, 453, 275, 314, 312, 313, 315, 318, 326, 135, 329,
135, 327, 330, 334, 331, 336, 414, 337, -29, 338, -24, 415, 188, 392, 411, 189, -293, 423, 372,
373, 374, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 401, 217, 352, -31,
410, 428, 431, 437, 446, 447, 450, 135, 135, 423, 451, 452, -327, 461, 386, 413, 449, 370, 387,
385, 412, 389, 416, 179, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 448, 462, 178, 260,
180, 141, 359, 325, 275, 350, 408, 418, 459, 440, 403, 168, 0, 419, 0, 0, 425, 0, 0,
0, 0, 0, 0, 445, 0, 0, 0, 0, 0, 0, 0, 0, 217, 0, 217, 0, 163, 0,
0, 0, 0, 0, 164, 0, 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 260, 0,
0, 0, 0, 260, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, 260, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 240, 241, 242, 0, 243, 244, 245, 246, 247, 248, 249,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 250, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198,
0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 201, 0, 0, 0, 251, 252, 0, 0, 0, 0, 253, 203, 204, 205, 206, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 240, 241, 242, 0, 243, 244, 245, 246, 247,
248, 249, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 250, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 192, 193, 117, 194, 195, 196,
197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 201, 0, 0, 0, 251, 354, 0, 0, 0, 0, 253, 203, 204, 205, 206,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 240, 241, 242, 0, 243, 244, 245,
246, 247, 248, 249, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 250, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 192, 193, 117, 194,
195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 251, 0, 0, 0, 0, 0, 253, 203, 204,
205, 206, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 240, 241, 242, 0, 243,
244, 245, 246, 247, 248, 249, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 250, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 192, 193,
117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 176, 0, 0, 0, 0, 0, 253,
203, 204, 205, 206, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 240, 241, 242,
0, 243, 244, 245, 246, 247, 248, 249, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 250, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0,
0, 253, 203, 204, 205, 206, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 201, 7, 8, 9, 10, 11, 12,
0, 0, 0, 253, 203, 204, 205, 206, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 201, 7, 8, 9, 10, 11,
12, 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 0, 160, 117, 0, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
0, 0, 0, 0, 0, 161, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116, 192, 193, 117, 194,
195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 201, 0, 0, 202, 9, 10, 11, 12, 0, 0, 0, 203, 204,
205, 206, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116, 192, 193,
117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 319, 9, 10, 11, 12, 0, 0, 0,
203, 204, 205, 206, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116,
192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 9, 10, 11, 12, 0, 0, 0, 0,
0, 332, 203, 204, 205, 206, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116, 192,
193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 9, 10, 11, 12, 0, 0, 0, 0, 0,
0, 203, 204, 205, 206, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 52, 294, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116, 192, 193,
117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 2, 3, 4, 5, 201, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0,
203, 204, 205, 206, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0,
0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 7, 8,
9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 321, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 0,
0, 0, 0, 0, 0, 167, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 0, 0, 117, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 0, 0, 117, 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 0, 0, 117, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0,
0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116, 0, 368, 117, 9, 10, 11, 12,
369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 0, 116, 0, 0, 117};
static const yytype_int16 yycheck[] = {
0, 52, 122, 148, 127, 122, 201, 273, 184, 0, 127, 277, 165, 0, 265, 64, 190, 396, 133,
170, 149, 433, 144, 145, 159, 233, 163, 133, 134, 163, 150, 154, 402, 150, 171, 163, 170, 154,
165, 215, 248, 162, 162, 171, 171, 162, 181, 182, 460, 168, 170, 246, 171, 170, 161, 184, 171,
179, 180, 165, 163, 235, 432, 168, 168, 188, 171, 170, 447, 163, 190, 188, 451, 190, 125, 165,
170, 142, 143, 163, 233, 162, 162, 162, 133, 236, 170, 168, 168, 168, 162, 357, 163, 162, 289,
248, 168, 273, 163, 168, 162, 277, 167, 171, 155, 156, 168, 133, 134, 199, 200, 305, 306, 307,
308, 235, 236, 293, 235, 236, 168, 168, 122, 171, 171, 165, 168, 127, 218, 171, 5, 6, 7,
165, 173, 330, 175, 161, 138, 334, 163, 141, 171, 233, 279, 133, 134, 138, 322, 161, 150, 138,
403, 170, 154, 176, 177, 178, 248, 140, 141, 183, 162, 146, 147, 136, 137, 168, 169, 162, 170,
301, 302, 309, 310, 351, 176, 303, 304, 161, 446, 357, 148, 182, 181, 150, 164, 171, 188, 161,
190, 171, 161, 161, 171, 169, 391, 161, 161, 166, 162, 67, 322, 164, 164, 322, 165, 402, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 169, 315, 168, 161,
363, 405, 161, 166, 170, 162, 171, 235, 236, 432, 162, 18, 162, 171, 312, 390, 439, 290, 313,
311, 388, 315, 395, 154, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 438, 458, 150, 265,
154, 6, 278, 239, 446, 170, 361, 397, 451, 432, 339, 138, -1, 397, -1, -1, 402, -1, -1,
-1, -1, -1, -1, 434, -1, -1, -1, -1, -1, -1, -1, -1, 388, -1, 390, -1, 425, -1,
-1, -1, -1, -1, 425, -1, -1, -1, 432, -1, -1, -1, -1, -1, -1, -1, -1, -1, 322,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 424, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 396, 397, -1,
-1, -1, -1, 402, 403, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 425, -1, -1, -1, -1, -1, -1, 432, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 447, -1, -1, -1, 451, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
-1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 161, -1, -1, -1, 165, 166, -1, -1, -1, -1, 171, 172, 173, 174, 175, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 161, -1, -1, -1, 165, 166, -1, -1, -1, -1, 171, 172, 173, 174, 175,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 161, -1, -1, -1, 165, -1, -1, -1, -1, -1, 171, 172, 173,
174, 175, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, -1, 165, -1, -1, -1, -1, -1, 171,
172, 173, 174, 175, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
-1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 171, 172, 173, 174, 175, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 161, 9, 10, 11, 12, 13, 14,
-1, -1, -1, 171, 172, 173, 174, 175, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 161, 9, 10, 11, 12, 13,
14, -1, -1, -1, -1, 172, 173, 174, 175, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, -1, 133, 134, -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-1, -1, -1, -1, -1, 171, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131, 132, 133, 134, 135,
136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 161, -1, -1, 164, 11, 12, 13, 14, -1, -1, -1, 172, 173,
174, 175, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131, 132, 133,
134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, 164, 11, 12, 13, 14, -1, -1, -1,
172, 173, 174, 175, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131,
132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, 11, 12, 13, 14, -1, -1, -1, -1,
-1, 171, 172, 173, 174, 175, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131, 132,
133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 161, 11, 12, 13, 14, -1, -1, -1, -1, -1,
-1, 172, 173, 174, 175, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131, 132, 133,
134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 3, 4, 5, 6, 7, 161, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1,
172, 173, 174, 175, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1,
-1, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 9, 10,
11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 166, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, -1, -1, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 166, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, -1, 134, -1,
-1, -1, -1, -1, -1, 0, -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 166, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, -1, -1, 134, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
129, 130, 131, -1, -1, 134, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
130, 131, -1, -1, 134, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1,
-1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131, -1, 133, 134, 11, 12, 13, 14,
139, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
129, -1, 131, -1, -1, 134};
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
state STATE-NUM. */
static const yytype_int16 yystos[] = {
0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
129, 130, 131, 134, 222, 223, 224, 225, 226, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 244, 246, 247, 288, 289, 290, 240, 133, 134, 165, 186, 161, 171, 291, 162, 168, 227,
228, 229, 234, 239, 168, 171, 133, 186, 133, 171, 221, 237, 239, 163, 245, 0, 289, 244, 249,
165, 64, 133, 242, 243, 165, 265, 228, 227, 229, 186, 186, 161, 170, 245, 165, 171, 234, 239,
250, 251, 132, 133, 135, 136, 137, 138, 139, 142, 143, 161, 164, 172, 173, 174, 175, 187, 188,
189, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
210, 211, 213, 220, 244, 163, 171, 250, 248, 170, 162, 168, 15, 16, 17, 19, 20, 21, 22,
23, 24, 25, 67, 165, 166, 171, 198, 213, 216, 218, 222, 223, 244, 255, 256, 257, 258, 266,
267, 268, 272, 274, 276, 287, 245, 170, 245, 216, 254, 170, 239, 186, 252, 253, 166, 251, 198,
198, 218, 142, 143, 163, 167, 162, 162, 168, 66, 216, 161, 198, 176, 177, 178, 173, 175, 140,
141, 144, 145, 179, 180, 146, 147, 183, 182, 181, 148, 150, 149, 184, 164, 164, 220, 166, 250,
136, 137, 243, 171, 171, 279, 161, 161, 171, 171, 218, 161, 220, 169, 161, 166, 259, 151, 152,
153, 154, 155, 156, 157, 158, 159, 160, 170, 217, 168, 171, 166, 256, 254, 170, 254, 252, 245,
168, 171, 133, 171, 162, 190, 218, 133, 139, 193, 216, 198, 198, 198, 200, 200, 201, 201, 202,
202, 202, 202, 203, 203, 204, 205, 206, 209, 208, 212, 214, 164, 166, 262, 263, 264, 281, 218,
171, 218, 169, 277, 266, 216, 219, 254, 171, 253, 171, 245, 164, 207, 210, 218, 67, 265, 257,
255, 267, 283, 162, 162, 218, 232, 234, 275, 260, 216, 171, 169, 161, 282, 269, 273, 186, 278,
166, 215, 280, 275, 284, 285, 262, 270, 265, 170, 162, 216, 218, 171, 162, 18, 254, 257, 261,
265, 162, 286, 261, 271, 171, 218, 262};
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
static const yytype_int16 yyr1[] = {
0, 185, 186, 186, 187, 188, 188, 188, 188, 188, 188, 188, 189, 189, 189, 189, 189, 189, 190,
191, 192, 192, 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, 198, 198, 198, 198, 199, 199,
199, 199, 200, 200, 200, 200, 201, 201, 201, 202, 202, 202, 203, 203, 203, 203, 203, 204, 204,
204, 205, 205, 206, 206, 207, 207, 208, 209, 208, 210, 210, 211, 212, 211, 213, 214, 215, 213,
216, 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 218, 219, 218, 220, 221, 222,
222, 222, 222, 222, 222, 222, 222, 223, 224, 224, 225, 225, 226, 227, 227, 228, 228, 228, 228,
229, 230, 230, 230, 230, 230, 231, 231, 231, 231, 231, 232, 232, 233, 233, 233, 234, 234, 235,
236, 237, 237, 237, 237, 237, 237, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
238, 238, 238, 238, 238, 239, 240, 240, 240, 241, 242, 242, 243, 243, 243, 243, 244, 244, 245,
245, 245, 245, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 248, 247,
249, 247, 250, 250, 251, 251, 252, 252, 253, 253, 254, 255, 256, 256, 257, 257, 257, 257, 257,
257, 257, 258, 259, 260, 258, 261, 261, 263, 262, 264, 262, 265, 265, 266, 266, 267, 267, 269,
268, 271, 270, 270, 273, 272, 274, 274, 275, 275, 277, 278, 276, 279, 280, 276, 281, 282, 276,
283, 283, 284, 284, 285, 286, 285, 287, 287, 287, 287, 287, 288, 288, 289, 289, 291, 290};
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
static const yytype_int8 yyr2[] = {
0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 3, 2, 2, 1, 1, 1, 3, 2, 2, 2, 1, 2, 3, 2, 1, 1,
1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3,
1, 3, 1, 0, 4, 1, 3, 1, 0, 4, 1, 0, 0, 7, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 4, 1,
2, 2, 2, 4, 5, 6, 7, 2, 3, 2, 1, 1, 2, 3, 3, 2, 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, 2, 3, 5,
4, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 4, 1, 3, 1, 3, 3, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, 0, 5, 1, 2, 3, 4, 1, 3, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, 1, 0, 2, 0, 2, 2, 3, 1, 2, 1, 2, 0, 6, 0, 4, 1, 0, 6,
3, 2, 1, 4, 0, 0, 7, 0, 0, 9, 0, 0, 8, 1, 1, 1, 0, 2, 0, 4, 2, 2, 2, 3, 2, 1, 2, 1, 1, 0, 3};
enum
{
YYENOMEM = -2
};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYNOMEM goto yyexhaustedlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK(yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror(&yylloc, context, scanner, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
/* Backward compatibility with an undocumented macro.
Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (N) \
{ \
(Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC(Rhs, N).last_line; \
(Current).last_column = YYRHSLOC(Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \
} \
while (0)
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do \
{ \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
/* YYLOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
# ifndef YYLOCATION_PRINT
# if defined YY_LOCATION_PRINT
/* Temporary convenience wrapper in case some people defined the
undocumented and private YY_LOCATION_PRINT macros. */
# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
YY_ATTRIBUTE_UNUSED
static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp)
{
int res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
res += YYFPRINTF(yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
{
res += YYFPRINTF(yyo, ".%d", yylocp->first_column);
}
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
res += YYFPRINTF(yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
{
res += YYFPRINTF(yyo, ".%d", end_col);
}
}
else if (0 <= end_col && yylocp->first_column < end_col)
{
res += YYFPRINTF(yyo, "-%d", end_col);
}
}
return res;
}
# define YYLOCATION_PRINT yy_location_print_
/* Temporary convenience wrapper in case some people defined the
undocumented and private YY_LOCATION_PRINT macros. */
# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
# else
# define YYLOCATION_PRINT(File, Loc) ((void)0)
/* Temporary convenience wrapper in case some people defined the
undocumented and private YY_LOCATION_PRINT macros. */
# define YY_LOCATION_PRINT YYLOCATION_PRINT
# endif
# endif /* !defined YYLOCATION_PRINT */
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
do \
{ \
if (yydebug) \
{ \
YYFPRINTF(stderr, "%s ", Title); \
yy_symbol_print(stderr, Kind, Value, Location, context, scanner); \
YYFPRINTF(stderr, "\n"); \
} \
} while (0)
/*-----------------------------------.
| Print this symbol's value on YYO. |
`-----------------------------------*/
static void yy_symbol_value_print(FILE *yyo,
yysymbol_kind_t yykind,
YYSTYPE const *const yyvaluep,
YYLTYPE const *const yylocationp,
TParseContext *context,
void *scanner)
{
FILE *yyoutput = yyo;
YY_USE(yyoutput);
YY_USE(yylocationp);
YY_USE(context);
YY_USE(scanner);
if (!yyvaluep)
{
return;
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YY_USE(yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
/*---------------------------.
| Print this symbol on YYO. |
`---------------------------*/
static void yy_symbol_print(FILE *yyo,
yysymbol_kind_t yykind,
YYSTYPE const *const yyvaluep,
YYLTYPE const *const yylocationp,
TParseContext *context,
void *scanner)
{
YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind));
YYLOCATION_PRINT(yyo, yylocationp);
YYFPRINTF(yyo, ": ");
yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, context, scanner);
YYFPRINTF(yyo, ")");
}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
{
YYFPRINTF(stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
{
int yybot = *yybottom;
YYFPRINTF(stderr, " %d", yybot);
}
YYFPRINTF(stderr, "\n");
}
# define YY_STACK_PRINT(Bottom, Top) \
do \
{ \
if (yydebug) \
yy_stack_print((Bottom), (Top)); \
} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
static void yy_reduce_print(yy_state_t *yyssp,
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
TParseContext *context,
void *scanner)
{
int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF(stderr, " $%d = ", yyi + 1);
yy_symbol_print(stderr, YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]),
&yyvsp[(yyi + 1) - (yynrhs)], &(yylsp[(yyi + 1) - (yynrhs)]), context,
scanner);
YYFPRINTF(stderr, "\n");
}
}
# define YY_REDUCE_PRINT(Rule) \
do \
{ \
if (yydebug) \
yy_reduce_print(yyssp, yyvsp, yylsp, Rule, context, scanner); \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args) ((void)0)
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void yydestruct(const char *yymsg,
yysymbol_kind_t yykind,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
TParseContext *context,
void *scanner)
{
YY_USE(yyvaluep);
YY_USE(yylocationp);
YY_USE(context);
YY_USE(scanner);
if (!yymsg)
{
yymsg = "Deleting";
}
YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YY_USE(yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
/*----------.
| yyparse. |
`----------*/
int yyparse(TParseContext *context, void *scanner)
{
/* Lookahead token kind. */
int yychar;
/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
YY_INITIAL_VALUE(static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default);
/* Location data for the lookahead symbol. */
static YYLTYPE yyloc_default
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
= {1, 1, 1, 1}
#endif
;
YYLTYPE yylloc = yyloc_default;
/* Number of syntax errors so far. */
int yynerrs = 0;
yy_state_fast_t yystate = 0;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus = 0;
/* Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* Their size. */
YYPTRDIFF_T yystacksize = YYINITDEPTH;
/* The state stack: array, bottom, top. */
yy_state_t yyssa[YYINITDEPTH];
yy_state_t *yyss = yyssa;
yy_state_t *yyssp = yyss;
/* The semantic value stack: array, bottom, top. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp = yyvs;
/* The location stack: array, bottom, top. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp = yyls;
int yyn;
/* The return value of yyparse. */
int yyresult;
/* Lookahead symbol kind. */
yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
/* The locations where the error started and ended. */
YYLTYPE yyerror_range[3];
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
YYDPRINTF((stderr, "Starting parse\n"));
yychar = YYEMPTY; /* Cause a token to be read. */
yylsp[0] = yylloc;
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
/*--------------------------------------------------------------------.
| yysetstate -- set current state (the top of the stack) to yystate. |
`--------------------------------------------------------------------*/
yysetstate:
YYDPRINTF((stderr, "Entering state %d\n", yystate));
YY_ASSERT(0 <= yystate && yystate < YYNSTATES);
YY_IGNORE_USELESS_CAST_BEGIN
*yyssp = YY_CAST(yy_state_t, yystate);
YY_IGNORE_USELESS_CAST_END
YY_STACK_PRINT(yyss, yyssp);
if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
YYNOMEM;
#else
{
/* Get the current used size of the three stacks, in elements. */
YYPTRDIFF_T yysize = yyssp - yyss + 1;
# if defined yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
yy_state_t *yyss1 = yyss;
YYSTYPE *yyvs1 = yyvs;
YYLTYPE *yyls1 = yyls;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow(YY_("memory exhausted"), &yyss1, yysize * YYSIZEOF(*yyssp), &yyvs1,
yysize * YYSIZEOF(*yyvsp), &yyls1, yysize * YYSIZEOF(*yylsp), &yystacksize);
yyss = yyss1;
yyvs = yyvs1;
yyls = yyls1;
}
# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
{
YYNOMEM;
}
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
{
yystacksize = YYMAXDEPTH;
}
{
yy_state_t *yyss1 = yyss;
union yyalloc *yyptr = YY_CAST(
union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize))));
if (!yyptr)
{
YYNOMEM;
}
YYSTACK_RELOCATE(yyss_alloc, yyss);
YYSTACK_RELOCATE(yyvs_alloc, yyvs);
YYSTACK_RELOCATE(yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
{
YYSTACK_FREE(yyss1);
}
}
# endif
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
yylsp = yyls + yysize - 1;
YY_IGNORE_USELESS_CAST_BEGIN
YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize)));
YY_IGNORE_USELESS_CAST_END
if (yyss + yystacksize - 1 <= yyssp)
{
YYABORT;
}
}
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
if (yystate == YYFINAL)
{
YYACCEPT;
}
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yypact_value_is_default(yyn))
{
goto yydefault;
}
/* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
if (yychar == YYEMPTY)
{
YYDPRINTF((stderr, "Reading a token\n"));
yychar = yylex(&yylval, &yylloc, scanner);
}
if (yychar <= YYEOF)
{
yychar = YYEOF;
yytoken = YYSYMBOL_YYEOF;
YYDPRINTF((stderr, "Now at end of input.\n"));
}
else if (yychar == YYerror)
{
/* The scanner already issued an error message, process directly
to error recovery. But do not keep the error token as
lookahead, it is too special and may lead us to an endless
loop in error recovery. */
yychar = YYUNDEF;
yytoken = YYSYMBOL_YYerror;
yyerror_range[1] = yylloc;
goto yyerrlab1;
}
else
{
yytoken = YYTRANSLATE(yychar);
YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
{
goto yydefault;
}
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yytable_value_is_error(yyn))
{
goto yyerrlab;
}
yyn = -yyn;
goto yyreduce;
}
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
{
yyerrstatus--;
}
/* Shift the lookahead token. */
YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc);
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
*++yylsp = yylloc;
/* Discard the shifted token. */
yychar = YYEMPTY;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
{
goto yyerrlab;
}
goto yyreduce;
/*-----------------------------.
| yyreduce -- do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
'$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1 - yylen];
/* Default location. */
YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen);
yyerror_range[1] = yyloc;
YY_REDUCE_PRINT(yyn);
switch (yyn)
{
case 4: /* variable_identifier: IDENTIFIER */
{
// The symbol table search was done in the lexical phase
(yyval.interm.intermTypedNode) = context->parseVariableIdentifier(
(yylsp[0]), ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol);
}
break;
case 5: /* primary_expression: variable_identifier */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 6: /* primary_expression: INTCONSTANT */
{
TConstantUnion *unionArray = new TConstantUnion[1];
unionArray->setIConst((yyvsp[0].lex).i);
(yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0]));
}
break;
case 7: /* primary_expression: UINTCONSTANT */
{
TConstantUnion *unionArray = new TConstantUnion[1];
unionArray->setUConst((yyvsp[0].lex).u);
(yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0]));
}
break;
case 8: /* primary_expression: FLOATCONSTANT */
{
TConstantUnion *unionArray = new TConstantUnion[1];
unionArray->setFConst((yyvsp[0].lex).f);
(yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0]));
}
break;
case 9: /* primary_expression: BOOLCONSTANT */
{
TConstantUnion *unionArray = new TConstantUnion[1];
unionArray->setBConst((yyvsp[0].lex).b);
(yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0]));
}
break;
case 10: /* primary_expression: YUVCSCSTANDARDEXTCONSTANT */
{
if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target))
{
context->error((yylsp[0]), "unsupported value",
ImmutableString((yyvsp[0].lex).string));
}
TConstantUnion *unionArray = new TConstantUnion[1];
unionArray->setYuvCscStandardEXTConst(
getYuvCscStandardEXT(ImmutableString((yyvsp[0].lex).string)));
(yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0]));
}
break;
case 11: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */
{
(yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
}
break;
case 12: /* postfix_expression: primary_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 13: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression
RIGHT_BRACKET */
{
(yyval.interm.intermTypedNode) =
context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]),
(yyvsp[-1].interm.intermTypedNode));
}
break;
case 14: /* postfix_expression: function_call */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 15: /* postfix_expression: postfix_expression DOT FIELD_SELECTION */
{
(yyval.interm.intermTypedNode) = context->addFieldSelectionExpression(
(yyvsp[-2].interm.intermTypedNode), (yylsp[-1]),
ImmutableString((yyvsp[0].lex).string), (yylsp[0]));
}
break;
case 16: /* postfix_expression: postfix_expression INC_OP */
{
(yyval.interm.intermTypedNode) = context->addUnaryMathLValue(
EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
}
break;
case 17: /* postfix_expression: postfix_expression DEC_OP */
{
(yyval.interm.intermTypedNode) = context->addUnaryMathLValue(
EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
}
break;
case 18: /* integer_expression: expression */
{
context->checkIsScalarInteger((yyvsp[0].interm.intermTypedNode), "[]");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 19: /* function_call: function_call_or_method */
{
(yyval.interm.intermTypedNode) =
context->addFunctionCallOrMethod((yyvsp[0].interm.functionLookup), (yylsp[0]));
}
break;
case 20: /* function_call_or_method: function_call_generic */
{
(yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup);
}
break;
case 21: /* function_call_or_method: postfix_expression DOT function_call_generic */
{
ES3_OR_NEWER("", (yylsp[0]), "methods");
(yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup);
(yyval.interm.functionLookup)->setThisNode((yyvsp[-2].interm.intermTypedNode));
}
break;
case 22: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */
{
(yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup);
}
break;
case 23: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */
{
(yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup);
}
break;
case 24: /* function_call_header_no_parameters: function_call_header VOID_TYPE */
{
(yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup);
}
break;
case 25: /* function_call_header_no_parameters: function_call_header */
{
(yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup);
}
break;
case 26: /* function_call_header_with_parameters: function_call_header assignment_expression
*/
{
(yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup);
(yyval.interm.functionLookup)->addArgument((yyvsp[0].interm.intermTypedNode));
}
break;
case 27: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA
assignment_expression */
{
(yyval.interm.functionLookup) = (yyvsp[-2].interm.functionLookup);
(yyval.interm.functionLookup)->addArgument((yyvsp[0].interm.intermTypedNode));
}
break;
case 28: /* function_call_header: function_identifier LEFT_PAREN */
{
(yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup);
}
break;
case 29: /* function_identifier: type_specifier_no_prec */
{
(yyval.interm.functionLookup) = context->addConstructorFunc((yyvsp[0].interm.type));
}
break;
case 30: /* function_identifier: IDENTIFIER */
{
(yyval.interm.functionLookup) = context->addNonConstructorFunc(
ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol);
}
break;
case 31: /* function_identifier: FIELD_SELECTION */
{
(yyval.interm.functionLookup) = context->addNonConstructorFunc(
ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol);
}
break;
case 32: /* unary_expression: postfix_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 33: /* unary_expression: INC_OP unary_expression */
{
(yyval.interm.intermTypedNode) = context->addUnaryMathLValue(
EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 34: /* unary_expression: DEC_OP unary_expression */
{
(yyval.interm.intermTypedNode) = context->addUnaryMathLValue(
EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 35: /* unary_expression: unary_operator unary_expression */
{
(yyval.interm.intermTypedNode) = context->addUnaryMath(
(yyvsp[-1].interm.op), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 36: /* unary_operator: PLUS */
{
(yyval.interm.op) = EOpPositive;
}
break;
case 37: /* unary_operator: DASH */
{
(yyval.interm.op) = EOpNegative;
}
break;
case 38: /* unary_operator: BANG */
{
(yyval.interm.op) = EOpLogicalNot;
}
break;
case 39: /* unary_operator: TILDE */
{
ES3_OR_NEWER("~", (yyloc), "bit-wise operator");
(yyval.interm.op) = EOpBitwiseNot;
}
break;
case 40: /* multiplicative_expression: unary_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 41: /* multiplicative_expression: multiplicative_expression STAR unary_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 42: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 43: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */
{
ES3_OR_NEWER("%", (yylsp[-1]), "integer modulus operator");
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 44: /* additive_expression: multiplicative_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 45: /* additive_expression: additive_expression PLUS multiplicative_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 46: /* additive_expression: additive_expression DASH multiplicative_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 47: /* shift_expression: additive_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 48: /* shift_expression: shift_expression LEFT_OP additive_expression */
{
ES3_OR_NEWER("<<", (yylsp[-1]), "bit-wise operator");
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 49: /* shift_expression: shift_expression RIGHT_OP additive_expression */
{
ES3_OR_NEWER(">>", (yylsp[-1]), "bit-wise operator");
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 50: /* relational_expression: shift_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 51: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 52: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */
{
(yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(
EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 53: /* relational_expression: relational_expression LE_OP shift_expression */
{
(yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(
EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 54: /* relational_expression: relational_expression GE_OP shift_expression */
{
(yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(
EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 55: /* equality_expression: relational_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 56: /* equality_expression: equality_expression EQ_OP relational_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 57: /* equality_expression: equality_expression NE_OP relational_expression */
{
(yyval.interm.intermTypedNode) =
context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 58: /* and_expression: equality_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 59: /* and_expression: and_expression AMPERSAND equality_expression */
{
ES3_OR_NEWER("&", (yylsp[-1]), "bit-wise operator");
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 60: /* exclusive_or_expression: and_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 61: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */
{
ES3_OR_NEWER("^", (yylsp[-1]), "bit-wise operator");
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 62: /* inclusive_or_expression: exclusive_or_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 63: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR
exclusive_or_expression */
{
ES3_OR_NEWER("|", (yylsp[-1]), "bit-wise operator");
(yyval.interm.intermTypedNode) =
context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 64: /* logical_and_expression: inclusive_or_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 65: /* $@1: %empty */
{
context->onShortCircuitAndBegin((yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
}
break;
case 66: /* logical_and_expression: logical_and_expression AND_OP $@1
inclusive_or_expression */
{
(yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(
EOpLogicalAnd, (yyvsp[-3].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-2]));
}
break;
case 67: /* logical_xor_expression: logical_and_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 68: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */
{
(yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(
EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 69: /* logical_or_expression: logical_xor_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 70: /* $@2: %empty */
{
context->onShortCircuitOrBegin((yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
}
break;
case 71: /* logical_or_expression: logical_or_expression OR_OP $@2 logical_xor_expression */
{
(yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(
EOpLogicalOr, (yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode),
(yylsp[-2]));
}
break;
case 72: /* conditional_expression: logical_or_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 73: /* $@3: %empty */
{
context->onTernaryConditionParsed((yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
}
break;
case 74: /* $@4: %empty */
{
context->onTernaryTrueExpressionParsed((yyvsp[-1].interm.intermTypedNode), (yylsp[-3]));
}
break;
case 75: /* conditional_expression: logical_or_expression QUESTION $@3 expression COLON $@4
assignment_expression */
{
(yyval.interm.intermTypedNode) = context->addTernarySelection(
(yyvsp[-6].interm.intermTypedNode), (yyvsp[-3].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-5]));
}
break;
case 76: /* assignment_expression: conditional_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 77: /* assignment_expression: unary_expression assignment_operator
assignment_expression */
{
(yyval.interm.intermTypedNode) =
context->addAssign((yyvsp[-1].interm.op), (yyvsp[-2].interm.intermTypedNode),
(yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
}
break;
case 78: /* assignment_operator: EQUAL */
{
(yyval.interm.op) = EOpAssign;
}
break;
case 79: /* assignment_operator: MUL_ASSIGN */
{
(yyval.interm.op) = EOpMulAssign;
}
break;
case 80: /* assignment_operator: DIV_ASSIGN */
{
(yyval.interm.op) = EOpDivAssign;
}
break;
case 81: /* assignment_operator: MOD_ASSIGN */
{
ES3_OR_NEWER("%=", (yyloc), "integer modulus operator");
(yyval.interm.op) = EOpIModAssign;
}
break;
case 82: /* assignment_operator: ADD_ASSIGN */
{
(yyval.interm.op) = EOpAddAssign;
}
break;
case 83: /* assignment_operator: SUB_ASSIGN */
{
(yyval.interm.op) = EOpSubAssign;
}
break;
case 84: /* assignment_operator: LEFT_ASSIGN */
{
ES3_OR_NEWER("<<=", (yyloc), "bit-wise operator");
(yyval.interm.op) = EOpBitShiftLeftAssign;
}
break;
case 85: /* assignment_operator: RIGHT_ASSIGN */
{
ES3_OR_NEWER(">>=", (yyloc), "bit-wise operator");
(yyval.interm.op) = EOpBitShiftRightAssign;
}
break;
case 86: /* assignment_operator: AND_ASSIGN */
{
ES3_OR_NEWER("&=", (yyloc), "bit-wise operator");
(yyval.interm.op) = EOpBitwiseAndAssign;
}
break;
case 87: /* assignment_operator: XOR_ASSIGN */
{
ES3_OR_NEWER("^=", (yyloc), "bit-wise operator");
(yyval.interm.op) = EOpBitwiseXorAssign;
}
break;
case 88: /* assignment_operator: OR_ASSIGN */
{
ES3_OR_NEWER("|=", (yyloc), "bit-wise operator");
(yyval.interm.op) = EOpBitwiseOrAssign;
}
break;
case 89: /* expression: assignment_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 90: /* $@5: %empty */
{
context->onCommaLeftHandSideParsed((yyvsp[-1].interm.intermTypedNode));
}
break;
case 91: /* expression: expression COMMA $@5 assignment_expression */
{
(yyval.interm.intermTypedNode) = context->addComma(
(yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-2]));
}
break;
case 92: /* constant_expression: conditional_expression */
{
context->checkIsConst((yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 93: /* enter_struct: IDENTIFIER LEFT_BRACE */
{
context->enterStructDeclaration((yylsp[-1]), ImmutableString((yyvsp[-1].lex).string));
(yyval.lex) = (yyvsp[-1].lex);
}
break;
case 94: /* declaration: function_prototype SEMICOLON */
{
(yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration(
*((yyvsp[-1].interm).function), (yylsp[-1]));
}
break;
case 95: /* declaration: init_declarator_list SEMICOLON */
{
(yyval.interm.intermNode) = (yyvsp[-1].interm).intermDeclaration;
}
break;
case 96: /* declaration: PRECISION precision_qualifier type_specifier_no_prec SEMICOLON */
{
context->parseDefaultPrecisionQualifier((yyvsp[-2].interm.precision),
(yyvsp[-1].interm.type), (yylsp[-3]));
(yyval.interm.intermNode) = nullptr;
}
break;
case 97: /* declaration: type_qualifier enter_struct struct_declaration_list RIGHT_BRACE
SEMICOLON */
{
ES3_OR_NEWER(ImmutableString((yyvsp[-3].lex).string), (yylsp[-4]), "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock(
*(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]),
ImmutableString((yyvsp[-3].lex).string), (yyvsp[-2].interm.fieldList),
kEmptyImmutableString, (yyloc), NULL, (yyloc));
}
break;
case 98: /* declaration: type_qualifier enter_struct struct_declaration_list RIGHT_BRACE
IDENTIFIER SEMICOLON */
{
ES3_OR_NEWER(ImmutableString((yyvsp[-4].lex).string), (yylsp[-5]), "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock(
*(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]),
ImmutableString((yyvsp[-4].lex).string), (yyvsp[-3].interm.fieldList),
ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), NULL, (yyloc));
}
break;
case 99: /* declaration: type_qualifier enter_struct struct_declaration_list RIGHT_BRACE
IDENTIFIER array_specifier SEMICOLON */
{
ES3_OR_NEWER(ImmutableString((yyvsp[-5].lex).string), (yylsp[-6]), "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock(
*(yyvsp[-6].interm.typeQualifierBuilder), (yylsp[-5]),
ImmutableString((yyvsp[-5].lex).string), (yyvsp[-4].interm.fieldList),
ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[-1].interm.arraySizes),
(yylsp[-1]));
}
break;
case 100: /* declaration: type_qualifier SEMICOLON */
{
context->parseGlobalLayoutQualifier(*(yyvsp[-1].interm.typeQualifierBuilder));
(yyval.interm.intermNode) = nullptr;
}
break;
case 101: /* declaration: type_qualifier IDENTIFIER SEMICOLON */
{
(yyval.interm.intermNode) = context->parseGlobalQualifierDeclaration(
*(yyvsp[-2].interm.typeQualifierBuilder), (yylsp[-1]),
ImmutableString((yyvsp[-1].lex).string), (yyvsp[-1].lex).symbol);
}
break;
case 102: /* function_prototype: function_declarator RIGHT_PAREN */
{
(yyval.interm).function =
context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function));
context->exitFunctionDeclaration();
}
break;
case 103: /* function_declarator: function_header */
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
break;
case 104: /* function_declarator: function_header_with_parameters */
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
break;
case 105: /* function_header_with_parameters: function_header parameter_declaration */
{
// Add the parameter
(yyval.interm.function) = (yyvsp[-1].interm.function);
if ((yyvsp[0].interm.param).type.getBasicType() != EbtVoid)
{
context->addParameter((yyvsp[-1].interm.function), &(yyvsp[0].interm.param));
}
else
{
// Remember that void was seen, so error can be generated if another parameter is
// seen.
(yyvsp[-1].interm.function)->setHasVoidParameter();
}
}
break;
case 106: /* function_header_with_parameters: function_header_with_parameters COMMA
parameter_declaration */
{
(yyval.interm.function) = (yyvsp[-2].interm.function);
// Only first parameter of one-parameter functions can be void
// The check for named parameters not being void is done in parameter_declarator
if ((yyvsp[0].interm.param).type.getBasicType() == EbtVoid)
{
// This parameter > first is void
context->error((yylsp[-1]), "cannot be a parameter type except for '(void)'",
"void");
}
else
{
if ((yyvsp[-2].interm.function)->hasVoidParameter())
{
// Only first parameter of one-parameter functions can be void. This check
// prevents (void, non_void) parameters.
context->error((yylsp[-1]), "cannot be a parameter type except for '(void)'",
"void");
}
context->addParameter((yyvsp[-2].interm.function), &(yyvsp[0].interm.param));
}
}
break;
case 107: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */
{
(yyval.interm.function) = context->parseFunctionHeader(
(yyvsp[-2].interm.type), ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]));
context->symbolTable.push();
context->enterFunctionDeclaration();
}
break;
case 108: /* parameter_declarator: type_specifier identifier */
{
(yyval.interm.param) = context->parseParameterDeclarator(
(yyvsp[-1].interm.type), ImmutableString((yyvsp[0].lex).string), (yylsp[0]));
}
break;
case 109: /* parameter_declarator: type_specifier identifier array_specifier */
{
(yyval.interm.param) = context->parseParameterArrayDeclarator(
(yyvsp[-2].interm.type), ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]),
(yyvsp[0].interm.arraySizes), (yylsp[0]));
}
break;
case 110: /* parameter_declaration: type_qualifier parameter_declarator */
{
(yyval.interm.param) = (yyvsp[0].interm.param);
context->parseParameterQualifier((yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder),
(yyval.interm.param).type);
}
break;
case 111: /* parameter_declaration: parameter_declarator */
{
(yyval.interm.param) = (yyvsp[0].interm.param);
(yyval.interm.param).type.setQualifier(EvqParamIn);
}
break;
case 112: /* parameter_declaration: type_qualifier parameter_type_specifier */
{
(yyval.interm.param) = context->parseParameterDeclarator(
(yyvsp[0].interm.type), kEmptyImmutableString, (yylsp[0]));
context->parseParameterQualifier((yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder),
(yyval.interm.param).type);
}
break;
case 113: /* parameter_declaration: parameter_type_specifier */
{
(yyval.interm.param) = context->parseParameterDeclarator(
(yyvsp[0].interm.type), kEmptyImmutableString, (yylsp[0]));
(yyval.interm.param).type.setQualifier(EvqParamIn);
}
break;
case 114: /* parameter_type_specifier: type_specifier */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
break;
case 115: /* init_declarator_list: single_declaration */
{
(yyval.interm) = (yyvsp[0].interm);
}
break;
case 116: /* init_declarator_list: init_declarator_list COMMA identifier */
{
(yyval.interm) = (yyvsp[-2].interm);
context->parseDeclarator((yyval.interm).type, (yylsp[0]),
ImmutableString((yyvsp[0].lex).string),
(yyval.interm).intermDeclaration);
}
break;
case 117: /* init_declarator_list: init_declarator_list COMMA identifier array_specifier */
{
(yyval.interm) = (yyvsp[-3].interm);
context->parseArrayDeclarator(
(yyval.interm).type, (yylsp[-1]), ImmutableString((yyvsp[-1].lex).string),
(yylsp[0]), *((yyvsp[0].interm.arraySizes)), (yyval.interm).intermDeclaration);
}
break;
case 118: /* init_declarator_list: init_declarator_list COMMA identifier array_specifier
EQUAL initializer */
{
ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)");
(yyval.interm) = (yyvsp[-5].interm);
context->parseArrayInitDeclarator(
(yyval.interm).type, (yylsp[-3]), ImmutableString((yyvsp[-3].lex).string),
(yylsp[-2]), *((yyvsp[-2].interm.arraySizes)), (yylsp[-1]),
(yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration);
}
break;
case 119: /* init_declarator_list: init_declarator_list COMMA identifier EQUAL initializer
*/
{
(yyval.interm) = (yyvsp[-4].interm);
context->parseInitDeclarator(
(yyval.interm).type, (yylsp[-2]), ImmutableString((yyvsp[-2].lex).string),
(yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration);
}
break;
case 120: /* single_declaration: fully_specified_type */
{
(yyval.interm).type = (yyvsp[0].interm.type);
(yyval.interm).intermDeclaration = context->parseSingleDeclaration(
(yyval.interm).type, (yylsp[0]), kEmptyImmutableString);
}
break;
case 121: /* single_declaration: fully_specified_type identifier */
{
(yyval.interm).type = (yyvsp[-1].interm.type);
(yyval.interm).intermDeclaration = context->parseSingleDeclaration(
(yyval.interm).type, (yylsp[0]), ImmutableString((yyvsp[0].lex).string));
}
break;
case 122: /* single_declaration: fully_specified_type identifier array_specifier */
{
(yyval.interm).type = (yyvsp[-2].interm.type);
(yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration(
(yyval.interm).type, (yylsp[-1]), ImmutableString((yyvsp[-1].lex).string),
(yylsp[0]), *((yyvsp[0].interm.arraySizes)));
}
break;
case 123: /* single_declaration: fully_specified_type identifier array_specifier EQUAL
initializer */
{
ES3_OR_NEWER("[]", (yylsp[-2]), "first-class arrays (array initializer)");
(yyval.interm).type = (yyvsp[-4].interm.type);
(yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration(
(yyval.interm).type, (yylsp[-3]), ImmutableString((yyvsp[-3].lex).string),
(yylsp[-2]), *((yyvsp[-2].interm.arraySizes)), (yylsp[-1]),
(yyvsp[0].interm.intermTypedNode));
}
break;
case 124: /* single_declaration: fully_specified_type identifier EQUAL initializer */
{
(yyval.interm).type = (yyvsp[-3].interm.type);
(yyval.interm).intermDeclaration = context->parseSingleInitDeclaration(
(yyval.interm).type, (yylsp[-2]), ImmutableString((yyvsp[-2].lex).string),
(yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
}
break;
case 125: /* fully_specified_type: type_specifier */
{
context->addFullySpecifiedType(&(yyvsp[0].interm.type));
(yyval.interm.type) = (yyvsp[0].interm.type);
}
break;
case 126: /* fully_specified_type: type_qualifier type_specifier */
{
(yyval.interm.type) = context->addFullySpecifiedType(
*(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.type));
}
break;
case 127: /* interpolation_qualifier: SMOOTH */
{
(yyval.interm.qualifier) = EvqSmooth;
}
break;
case 128: /* interpolation_qualifier: FLAT */
{
(yyval.interm.qualifier) = EvqFlat;
}
break;
case 129: /* interpolation_qualifier: NOPERSPECTIVE */
{
if (!context->checkCanUseExtension((yylsp[0]),
TExtension::NV_shader_noperspective_interpolation))
{
context->error((yylsp[0]), "unsupported interpolation qualifier", "noperspective");
}
(yyval.interm.qualifier) = EvqNoPerspective;
}
break;
case 130: /* type_qualifier: single_type_qualifier */
{
(yyval.interm.typeQualifierBuilder) = context->createTypeQualifierBuilder((yylsp[0]));
(yyval.interm.typeQualifierBuilder)
->appendQualifier((yyvsp[0].interm.qualifierWrapper));
}
break;
case 131: /* type_qualifier: type_qualifier single_type_qualifier */
{
(yyval.interm.typeQualifierBuilder) = (yyvsp[-1].interm.typeQualifierBuilder);
(yyval.interm.typeQualifierBuilder)
->appendQualifier((yyvsp[0].interm.qualifierWrapper));
}
break;
case 132: /* invariant_qualifier: INVARIANT */
{
// empty
}
break;
case 133: /* precise_qualifier: PRECISE */
{
context->markShaderHasPrecise();
}
break;
case 134: /* single_type_qualifier: storage_qualifier */
{
context->checkLocalVariableConstStorageQualifier(*(yyvsp[0].interm.qualifierWrapper));
(yyval.interm.qualifierWrapper) = (yyvsp[0].interm.qualifierWrapper);
}
break;
case 135: /* single_type_qualifier: layout_qualifier */
{
context->checkIsAtGlobalLevel((yylsp[0]), "layout");
(yyval.interm.qualifierWrapper) =
new TLayoutQualifierWrapper((yyvsp[0].interm.layoutQualifier), (yylsp[0]));
}
break;
case 136: /* single_type_qualifier: precision_qualifier */
{
(yyval.interm.qualifierWrapper) =
new TPrecisionQualifierWrapper((yyvsp[0].interm.precision), (yylsp[0]));
}
break;
case 137: /* single_type_qualifier: interpolation_qualifier */
{
(yyval.interm.qualifierWrapper) =
new TInterpolationQualifierWrapper((yyvsp[0].interm.qualifier), (yylsp[0]));
}
break;
case 138: /* single_type_qualifier: invariant_qualifier */
{
context->checkIsAtGlobalLevel((yylsp[0]), "invariant");
(yyval.interm.qualifierWrapper) = new TInvariantQualifierWrapper((yylsp[0]));
}
break;
case 139: /* single_type_qualifier: precise_qualifier */
{
(yyval.interm.qualifierWrapper) = new TPreciseQualifierWrapper((yylsp[0]));
}
break;
case 140: /* storage_qualifier: ATTRIBUTE */
{
VERTEX_ONLY("attribute", (yylsp[0]));
ES2_ONLY("attribute", (yylsp[0]));
(yyval.interm.qualifierWrapper) =
context->parseGlobalStorageQualifier(EvqAttribute, (yylsp[0]));
}
break;
case 141: /* storage_qualifier: VARYING */
{
ES2_ONLY("varying", (yylsp[0]));
(yyval.interm.qualifierWrapper) = context->parseVaryingQualifier((yylsp[0]));
}
break;
case 142: /* storage_qualifier: CONST_QUAL */
{
(yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqConst, (yylsp[0]));
}
break;
case 143: /* storage_qualifier: IN_QUAL */
{
(yyval.interm.qualifierWrapper) = context->parseInQualifier((yylsp[0]));
}
break;
case 144: /* storage_qualifier: OUT_QUAL */
{
(yyval.interm.qualifierWrapper) = context->parseOutQualifier((yylsp[0]));
}
break;
case 145: /* storage_qualifier: INOUT_QUAL */
{
(yyval.interm.qualifierWrapper) = context->parseInOutQualifier((yylsp[0]));
}
break;
case 146: /* storage_qualifier: CENTROID */
{
ES3_OR_NEWER("centroid", (yylsp[0]), "storage qualifier");
(yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqCentroid, (yylsp[0]));
}
break;
case 147: /* storage_qualifier: PATCH */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_tessellation_shader, TExtension::EXT_tessellation_shader}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported storage qualifier", "patch");
}
(yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqPatch, (yylsp[0]));
}
break;
case 148: /* storage_qualifier: UNIFORM */
{
(yyval.interm.qualifierWrapper) =
context->parseGlobalStorageQualifier(EvqUniform, (yylsp[0]));
}
break;
case 149: /* storage_qualifier: BUFFER */
{
ES3_1_OR_NEWER("buffer", (yylsp[0]), "storage qualifier");
(yyval.interm.qualifierWrapper) =
context->parseGlobalStorageQualifier(EvqBuffer, (yylsp[0]));
}
break;
case 150: /* storage_qualifier: READONLY */
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqReadOnly, (yylsp[0]));
}
break;
case 151: /* storage_qualifier: WRITEONLY */
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqWriteOnly, (yylsp[0]));
}
break;
case 152: /* storage_qualifier: COHERENT */
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqCoherent, (yylsp[0]));
}
break;
case 153: /* storage_qualifier: RESTRICT */
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqRestrict, (yylsp[0]));
}
break;
case 154: /* storage_qualifier: VOLATILE */
{
(yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqVolatile, (yylsp[0]));
}
break;
case 155: /* storage_qualifier: SHARED */
{
COMPUTE_ONLY("shared", (yylsp[0]));
(yyval.interm.qualifierWrapper) =
context->parseGlobalStorageQualifier(EvqShared, (yylsp[0]));
}
break;
case 156: /* storage_qualifier: SAMPLE */
{
ES3_OR_NEWER("sample", (yylsp[0]), "storage qualifier");
(yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqSample, (yylsp[0]));
}
break;
case 157: /* type_specifier: type_specifier_no_prec */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
(yyval.interm.type).precision =
context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).getBasicType());
}
break;
case 158: /* precision_qualifier: HIGH_PRECISION */
{
(yyval.interm.precision) = EbpHigh;
}
break;
case 159: /* precision_qualifier: MEDIUM_PRECISION */
{
(yyval.interm.precision) = EbpMedium;
}
break;
case 160: /* precision_qualifier: LOW_PRECISION */
{
(yyval.interm.precision) = EbpLow;
}
break;
case 161: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */
{
context->checkCanUseLayoutQualifier((yylsp[-3]));
(yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
}
break;
case 162: /* layout_qualifier_id_list: layout_qualifier_id */
{
(yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
}
break;
case 163: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */
{
(yyval.interm.layoutQualifier) = context->joinLayoutQualifiers(
(yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0]));
}
break;
case 164: /* layout_qualifier_id: IDENTIFIER */
{
(yyval.interm.layoutQualifier) =
context->parseLayoutQualifier(ImmutableString((yyvsp[0].lex).string), (yylsp[0]));
}
break;
case 165: /* layout_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */
{
(yyval.interm.layoutQualifier) = context->parseLayoutQualifier(
ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0]));
}
break;
case 166: /* layout_qualifier_id: IDENTIFIER EQUAL UINTCONSTANT */
{
(yyval.interm.layoutQualifier) = context->parseLayoutQualifier(
ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0]));
}
break;
case 167: /* layout_qualifier_id: SHARED */
{
(yyval.interm.layoutQualifier) =
context->parseLayoutQualifier(ImmutableString("shared"), (yylsp[0]));
}
break;
case 168: /* type_specifier_no_prec: type_specifier_nonarray */
{
(yyval.interm.type)
.initialize((yyvsp[0].interm.typeSpecifierNonArray),
(context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
}
break;
case 169: /* type_specifier_no_prec: type_specifier_nonarray array_specifier */
{
(yyval.interm.type)
.initialize((yyvsp[-1].interm.typeSpecifierNonArray),
(context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary));
(yyval.interm.type).setArraySizes((yyvsp[0].interm.arraySizes));
}
break;
case 170: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */
{
ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array");
(yyval.interm.arraySizes) = new TVector<unsigned int>();
(yyval.interm.arraySizes)->push_back(0u);
}
break;
case 171: /* array_specifier: LEFT_BRACKET constant_expression RIGHT_BRACKET */
{
(yyval.interm.arraySizes) = new TVector<unsigned int>();
unsigned int size =
context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
// Make the type an array even if size check failed.
// This ensures useless error messages regarding a variable's non-arrayness won't
// follow.
(yyval.interm.arraySizes)->push_back(size);
}
break;
case 172: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */
{
ES3_1_OR_NEWER("[]", (yylsp[-1]), "arrays of arrays");
(yyval.interm.arraySizes) = (yyvsp[-2].interm.arraySizes);
(yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), 0u);
if (!context->checkIsValidArrayDimension((yylsp[-1]), (yyval.interm.arraySizes)))
{
YYABORT;
}
}
break;
case 173: /* array_specifier: array_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET
*/
{
ES3_1_OR_NEWER("[]", (yylsp[-2]), "arrays of arrays");
(yyval.interm.arraySizes) = (yyvsp[-3].interm.arraySizes);
unsigned int size =
context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
// Make the type an array even if size check failed.
// This ensures useless error messages regarding a variable's non-arrayness won't
// follow.
(yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), size);
if (!context->checkIsValidArrayDimension((yylsp[-2]), (yyval.interm.arraySizes)))
{
YYABORT;
}
}
break;
case 174: /* type_specifier_nonarray: VOID_TYPE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtVoid, (yylsp[0]));
}
break;
case 175: /* type_specifier_nonarray: FLOAT_TYPE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
}
break;
case 176: /* type_specifier_nonarray: INT_TYPE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
}
break;
case 177: /* type_specifier_nonarray: UINT_TYPE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
}
break;
case 178: /* type_specifier_nonarray: BOOL_TYPE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
}
break;
case 179: /* type_specifier_nonarray: VEC2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
case 180: /* type_specifier_nonarray: VEC3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
case 181: /* type_specifier_nonarray: VEC4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
case 182: /* type_specifier_nonarray: BVEC2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
case 183: /* type_specifier_nonarray: BVEC3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
case 184: /* type_specifier_nonarray: BVEC4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
case 185: /* type_specifier_nonarray: IVEC2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
case 186: /* type_specifier_nonarray: IVEC3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
case 187: /* type_specifier_nonarray: IVEC4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
case 188: /* type_specifier_nonarray: UVEC2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(2);
}
break;
case 189: /* type_specifier_nonarray: UVEC3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(3);
}
break;
case 190: /* type_specifier_nonarray: UVEC4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setAggregate(4);
}
break;
case 191: /* type_specifier_nonarray: MATRIX2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(2, 2);
}
break;
case 192: /* type_specifier_nonarray: MATRIX3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(3, 3);
}
break;
case 193: /* type_specifier_nonarray: MATRIX4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(4, 4);
}
break;
case 194: /* type_specifier_nonarray: MATRIX2x3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(2, 3);
}
break;
case 195: /* type_specifier_nonarray: MATRIX3x2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(3, 2);
}
break;
case 196: /* type_specifier_nonarray: MATRIX2x4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(2, 4);
}
break;
case 197: /* type_specifier_nonarray: MATRIX4x2 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(4, 2);
}
break;
case 198: /* type_specifier_nonarray: MATRIX3x4 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(3, 4);
}
break;
case 199: /* type_specifier_nonarray: MATRIX4x3 */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0]));
(yyval.interm.typeSpecifierNonArray).setMatrix(4, 3);
}
break;
case 200: /* type_specifier_nonarray: YUVCSCSTANDARDEXT */
{
if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target))
{
context->error((yylsp[0]), "unsupported type", "yuvCscStandardEXT");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtYuvCscStandardEXT, (yylsp[0]));
}
break;
case 201: /* type_specifier_nonarray: SAMPLER2D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2D, (yylsp[0]));
}
break;
case 202: /* type_specifier_nonarray: SAMPLER3D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler3D, (yylsp[0]));
}
break;
case 203: /* type_specifier_nonarray: SAMPLERCUBE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCube, (yylsp[0]));
}
break;
case 204: /* type_specifier_nonarray: SAMPLER2DARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArray, (yylsp[0]));
}
break;
case 205: /* type_specifier_nonarray: SAMPLER2DMS */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMS, (yylsp[0]));
}
break;
case 206: /* type_specifier_nonarray: SAMPLER2DMSARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMSArray, (yylsp[0]));
}
break;
case 207: /* type_specifier_nonarray: SAMPLERCUBEARRAYOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__samplerCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArray, (yylsp[0]));
}
break;
case 208: /* type_specifier_nonarray: SAMPLERCUBEARRAYEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__samplerCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArray, (yylsp[0]));
}
break;
case 209: /* type_specifier_nonarray: SAMPLERBUFFER */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "__samplerBuffer");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerBuffer, (yylsp[0]));
}
break;
case 210: /* type_specifier_nonarray: ISAMPLER2D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2D, (yylsp[0]));
}
break;
case 211: /* type_specifier_nonarray: ISAMPLER3D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler3D, (yylsp[0]));
}
break;
case 212: /* type_specifier_nonarray: ISAMPLERCUBE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCube, (yylsp[0]));
}
break;
case 213: /* type_specifier_nonarray: ISAMPLER2DARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DArray, (yylsp[0]));
}
break;
case 214: /* type_specifier_nonarray: ISAMPLER2DMS */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMS, (yylsp[0]));
}
break;
case 215: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMSArray, (yylsp[0]));
}
break;
case 216: /* type_specifier_nonarray: ISAMPLERCUBEARRAYOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__isamplerCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCubeArray, (yylsp[0]));
}
break;
case 217: /* type_specifier_nonarray: ISAMPLERCUBEARRAYEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__isamplerCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCubeArray, (yylsp[0]));
}
break;
case 218: /* type_specifier_nonarray: ISAMPLERBUFFER */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "__isamplerBuffer");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerBuffer, (yylsp[0]));
}
break;
case 219: /* type_specifier_nonarray: USAMPLER2D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2D, (yylsp[0]));
}
break;
case 220: /* type_specifier_nonarray: USAMPLER3D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler3D, (yylsp[0]));
}
break;
case 221: /* type_specifier_nonarray: USAMPLERCUBE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCube, (yylsp[0]));
}
break;
case 222: /* type_specifier_nonarray: USAMPLER2DARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DArray, (yylsp[0]));
}
break;
case 223: /* type_specifier_nonarray: USAMPLER2DMS */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMS, (yylsp[0]));
}
break;
case 224: /* type_specifier_nonarray: USAMPLER2DMSARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMSArray, (yylsp[0]));
}
break;
case 225: /* type_specifier_nonarray: USAMPLERCUBEARRAYOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__usamplerCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCubeArray, (yylsp[0]));
}
break;
case 226: /* type_specifier_nonarray: USAMPLERCUBEARRAYEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__usamplerCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCubeArray, (yylsp[0]));
}
break;
case 227: /* type_specifier_nonarray: USAMPLERBUFFER */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "__usamplerBuffer");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerBuffer, (yylsp[0]));
}
break;
case 228: /* type_specifier_nonarray: SAMPLER2DSHADOW */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DShadow, (yylsp[0]));
}
break;
case 229: /* type_specifier_nonarray: SAMPLERCUBESHADOW */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeShadow, (yylsp[0]));
}
break;
case 230: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArrayShadow, (yylsp[0]));
}
break;
case 231: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOWOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__samplerCubeArrayShadow");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArrayShadow, (yylsp[0]));
}
break;
case 232: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOWEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__samplerCubeArrayShadow");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArrayShadow, (yylsp[0]));
}
break;
case 233: /* type_specifier_nonarray: SAMPLERVIDEOWEBGL */
{
if (!context->checkCanUseExtension((yylsp[0]), TExtension::WEBGL_video_texture))
{
context->error((yylsp[0]), "unsupported type", "samplerVideoWEBGL");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerVideoWEBGL, (yylsp[0]));
}
break;
case 234: /* type_specifier_nonarray: SAMPLER_EXTERNAL_OES */
{
constexpr std::array<TExtension, 3u> extensions{
{TExtension::NV_EGL_stream_consumer_external,
TExtension::OES_EGL_image_external_essl3, TExtension::OES_EGL_image_external}};
if (!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "samplerExternalOES");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternalOES, (yylsp[0]));
}
break;
case 235: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */
{
if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target))
{
context->error((yylsp[0]), "unsupported type", "__samplerExternal2DY2YEXT");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternal2DY2YEXT, (yylsp[0]));
}
break;
case 236: /* type_specifier_nonarray: SAMPLER2DRECT */
{
if (!context->checkCanUseExtension((yylsp[0]), TExtension::ARB_texture_rectangle))
{
context->error((yylsp[0]), "unsupported type", "sampler2DRect");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DRect, (yylsp[0]));
}
break;
case 237: /* type_specifier_nonarray: IMAGE2D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImage2D, (yylsp[0]));
}
break;
case 238: /* type_specifier_nonarray: IIMAGE2D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2D, (yylsp[0]));
}
break;
case 239: /* type_specifier_nonarray: UIMAGE2D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2D, (yylsp[0]));
}
break;
case 240: /* type_specifier_nonarray: IMAGE3D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImage3D, (yylsp[0]));
}
break;
case 241: /* type_specifier_nonarray: IIMAGE3D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImage3D, (yylsp[0]));
}
break;
case 242: /* type_specifier_nonarray: UIMAGE3D */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImage3D, (yylsp[0]));
}
break;
case 243: /* type_specifier_nonarray: IMAGE2DARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImage2DArray, (yylsp[0]));
}
break;
case 244: /* type_specifier_nonarray: IIMAGE2DARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2DArray, (yylsp[0]));
}
break;
case 245: /* type_specifier_nonarray: UIMAGE2DARRAY */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2DArray, (yylsp[0]));
}
break;
case 246: /* type_specifier_nonarray: IMAGECUBE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtImageCube, (yylsp[0]));
}
break;
case 247: /* type_specifier_nonarray: IIMAGECUBE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCube, (yylsp[0]));
}
break;
case 248: /* type_specifier_nonarray: UIMAGECUBE */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCube, (yylsp[0]));
}
break;
case 249: /* type_specifier_nonarray: IMAGECUBEARRAYOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__imageCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtImageCubeArray, (yylsp[0]));
}
break;
case 250: /* type_specifier_nonarray: IMAGECUBEARRAYEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__imageCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtImageCubeArray, (yylsp[0]));
}
break;
case 251: /* type_specifier_nonarray: IIMAGECUBEARRAYOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__iimageCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCubeArray, (yylsp[0]));
}
break;
case 252: /* type_specifier_nonarray: IIMAGECUBEARRAYEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__iimageCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCubeArray, (yylsp[0]));
}
break;
case 253: /* type_specifier_nonarray: UIMAGECUBEARRAYOES */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__uimageCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCubeArray, (yylsp[0]));
}
break;
case 254: /* type_specifier_nonarray: UIMAGECUBEARRAYEXT */
{
if (context->getShaderVersion() < 320 &&
!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array))
{
context->error((yylsp[0]), "unsupported type", "__uimageCubeArray");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCubeArray, (yylsp[0]));
}
break;
case 255: /* type_specifier_nonarray: IMAGEBUFFER */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "__imageBuffer");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtImageBuffer, (yylsp[0]));
}
break;
case 256: /* type_specifier_nonarray: IIMAGEBUFFER */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "__iimageBuffer");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtIImageBuffer, (yylsp[0]));
}
break;
case 257: /* type_specifier_nonarray: UIMAGEBUFFER */
{
constexpr std::array<TExtension, 2u> extensions{
{TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}};
if (context->getShaderVersion() < 320 &&
!context->checkCanUseOneOfExtensions((yylsp[0]), extensions))
{
context->error((yylsp[0]), "unsupported type", "__uimageBuffer");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUImageBuffer, (yylsp[0]));
}
break;
case 258: /* type_specifier_nonarray: ATOMICUINT */
{
(yyval.interm.typeSpecifierNonArray).initialize(EbtAtomicCounter, (yylsp[0]));
}
break;
case 259: /* type_specifier_nonarray: PIXELLOCALANGLE */
{
if (!context->checkCanUseExtension((yylsp[0]),
TExtension::ANGLE_shader_pixel_local_storage))
{
context->error((yylsp[0]), "unsupported type", "__pixelLocalANGLE");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtPixelLocalANGLE, (yylsp[0]));
}
break;
case 260: /* type_specifier_nonarray: IPIXELLOCALANGLE */
{
if (!context->checkCanUseExtension((yylsp[0]),
TExtension::ANGLE_shader_pixel_local_storage))
{
context->error((yylsp[0]), "unsupported type", "__ipixelLocalANGLE");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtIPixelLocalANGLE, (yylsp[0]));
}
break;
case 261: /* type_specifier_nonarray: UPIXELLOCALANGLE */
{
if (!context->checkCanUseExtension((yylsp[0]),
TExtension::ANGLE_shader_pixel_local_storage))
{
context->error((yylsp[0]), "unsupported type", "__upixelLocalANGLE");
}
(yyval.interm.typeSpecifierNonArray).initialize(EbtUPixelLocalANGLE, (yylsp[0]));
}
break;
case 262: /* type_specifier_nonarray: struct_specifier */
{
(yyval.interm.typeSpecifierNonArray) = (yyvsp[0].interm.typeSpecifierNonArray);
}
break;
case 263: /* type_specifier_nonarray: TYPE_NAME */
{
// This is for user defined type names. The lexical phase looked up the type.
const TStructure *structure = static_cast<const TStructure *>((yyvsp[0].lex).symbol);
// Temporary check until VK and Metal backends support type name like
// gl_DepthRangeParameters.
context->checkIsNotReserved((yylsp[0]), ImmutableString((yyvsp[0].lex).string));
(yyval.interm.typeSpecifierNonArray).initializeStruct(structure, false, (yylsp[0]));
}
break;
case 264: /* $@6: %empty */
{
context->enterStructDeclaration((yylsp[-1]), ImmutableString((yyvsp[-1].lex).string));
}
break;
case 265: /* struct_specifier: STRUCT identifier LEFT_BRACE $@6 struct_declaration_list
RIGHT_BRACE */
{
(yyval.interm.typeSpecifierNonArray) = context->addStructure(
(yylsp[-5]), (yylsp[-4]), ImmutableString((yyvsp[-4].lex).string),
(yyvsp[-1].interm.fieldList));
}
break;
case 266: /* $@7: %empty */
{
context->enterStructDeclaration((yylsp[0]), kEmptyImmutableString);
}
break;
case 267: /* struct_specifier: STRUCT LEFT_BRACE $@7 struct_declaration_list RIGHT_BRACE */
{
(yyval.interm.typeSpecifierNonArray) = context->addStructure(
(yylsp[-4]), (yyloc), kEmptyImmutableString, (yyvsp[-1].interm.fieldList));
}
break;
case 268: /* struct_declaration_list: struct_declaration */
{
(yyval.interm.fieldList) =
context->addStructFieldList((yyvsp[0].interm.fieldList), (yylsp[0]));
}
break;
case 269: /* struct_declaration_list: struct_declaration_list struct_declaration */
{
(yyval.interm.fieldList) = context->combineStructFieldLists(
(yyvsp[-1].interm.fieldList), (yyvsp[0].interm.fieldList), (yylsp[0]));
}
break;
case 270: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */
{
(yyval.interm.fieldList) = context->addStructDeclaratorList(
(yyvsp[-2].interm.type), (yyvsp[-1].interm.declaratorList));
}
break;
case 271: /* struct_declaration: type_qualifier type_specifier struct_declarator_list
SEMICOLON */
{
// ES3 Only, but errors should be handled elsewhere
(yyval.interm.fieldList) = context->addStructDeclaratorListWithQualifiers(
*(yyvsp[-3].interm.typeQualifierBuilder), &(yyvsp[-2].interm.type),
(yyvsp[-1].interm.declaratorList));
}
break;
case 272: /* struct_declarator_list: struct_declarator */
{
(yyval.interm.declaratorList) = new TDeclaratorList();
(yyval.interm.declaratorList)->push_back((yyvsp[0].interm.declarator));
}
break;
case 273: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */
{
(yyval.interm.declaratorList)->push_back((yyvsp[0].interm.declarator));
}
break;
case 274: /* struct_declarator: identifier */
{
(yyval.interm.declarator) =
context->parseStructDeclarator(ImmutableString((yyvsp[0].lex).string), (yylsp[0]));
}
break;
case 275: /* struct_declarator: identifier array_specifier */
{
(yyval.interm.declarator) = context->parseStructArrayDeclarator(
ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), (yyvsp[0].interm.arraySizes));
}
break;
case 276: /* initializer: assignment_expression */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
break;
case 277: /* declaration_statement: declaration */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 278: /* statement: compound_statement_with_scope */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock);
}
break;
case 279: /* statement: simple_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 280: /* simple_statement: declaration_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 281: /* simple_statement: expression_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 282: /* simple_statement: selection_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 283: /* simple_statement: switch_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch);
}
break;
case 284: /* simple_statement: case_label */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermCase);
}
break;
case 285: /* simple_statement: iteration_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 286: /* simple_statement: jump_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 287: /* compound_statement_with_scope: LEFT_BRACE RIGHT_BRACE */
{
(yyval.interm.intermBlock) = new TIntermBlock();
(yyval.interm.intermBlock)->setLine((yyloc));
}
break;
case 288: /* $@8: %empty */
{
context->beginNestedScope();
}
break;
case 289: /* $@9: %empty */
{
context->endNestedScope();
}
break;
case 290: /* compound_statement_with_scope: LEFT_BRACE $@8 statement_list $@9 RIGHT_BRACE */
{
(yyvsp[-2].interm.intermBlock)->setLine((yyloc));
(yyval.interm.intermBlock) = (yyvsp[-2].interm.intermBlock);
}
break;
case 291: /* statement_no_new_scope: compound_statement_no_new_scope */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock);
}
break;
case 292: /* statement_no_new_scope: simple_statement */
{
context->endStatementWithValue((yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 293: /* $@10: %empty */
{
context->beginNestedScope();
}
break;
case 294: /* statement_with_scope: $@10 compound_statement_no_new_scope */
{
context->endNestedScope();
(yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock);
}
break;
case 295: /* $@11: %empty */
{
context->beginNestedScope();
}
break;
case 296: /* statement_with_scope: $@11 simple_statement */
{
context->endStatementWithValue((yyvsp[0].interm.intermNode));
context->endNestedScope();
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 297: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */
{
(yyval.interm.intermBlock) = new TIntermBlock();
(yyval.interm.intermBlock)->setLine((yyloc));
}
break;
case 298: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */
{
(yyvsp[-1].interm.intermBlock)->setLine((yyloc));
(yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock);
}
break;
case 299: /* statement_list: statement */
{
(yyval.interm.intermBlock) = new TIntermBlock();
context->appendStatement((yyval.interm.intermBlock), (yyvsp[0].interm.intermNode));
}
break;
case 300: /* statement_list: statement_list statement */
{
(yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock);
context->appendStatement((yyval.interm.intermBlock), (yyvsp[0].interm.intermNode));
}
break;
case 301: /* expression_statement: SEMICOLON */
{
(yyval.interm.intermNode) = context->addEmptyStatement((yyloc));
}
break;
case 302: /* expression_statement: expression SEMICOLON */
{
context->checkIsValidExpressionStatement((yyloc), (yyvsp[-1].interm.intermTypedNode));
(yyval.interm.intermNode) = (yyvsp[-1].interm.intermTypedNode);
}
break;
case 303: /* $@12: %empty */
{
context->onIfTrueBlockBegin((yyvsp[-1].interm.intermTypedNode), (yylsp[-3]));
}
break;
case 304: /* selection_statement: IF LEFT_PAREN expression RIGHT_PAREN $@12
selection_rest_statement */
{
(yyval.interm.intermNode) = context->addIfElse((yyvsp[-3].interm.intermTypedNode),
(yyvsp[0].interm.nodePair), (yylsp[-5]));
}
break;
case 305: /* $@13: %empty */
{
context->onIfTrueBlockEnd();
context->onIfFalseBlockBegin();
}
break;
case 306: /* selection_rest_statement: statement_with_scope ELSE $@13 statement_with_scope
*/
{
context->onIfFalseBlockEnd();
(yyval.interm.nodePair).node1 = (yyvsp[-3].interm.intermNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
}
break;
case 307: /* selection_rest_statement: statement_with_scope */
{
context->onIfTrueBlockEnd();
(yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
(yyval.interm.nodePair).node2 = nullptr;
}
break;
case 308: /* $@14: %empty */
{
context->beginSwitch((yylsp[-3]), (yyvsp[-1].interm.intermTypedNode));
}
break;
case 309: /* switch_statement: SWITCH LEFT_PAREN expression RIGHT_PAREN $@14
compound_statement_no_new_scope */
{
(yyval.interm.intermSwitch) = context->addSwitch(
(yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermBlock), (yylsp[-5]));
}
break;
case 310: /* case_label: CASE constant_expression COLON */
{
(yyval.interm.intermCase) =
context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
}
break;
case 311: /* case_label: DEFAULT COLON */
{
(yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
}
break;
case 312: /* condition: expression */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode);
context->checkIsScalarBool((yyvsp[0].interm.intermTypedNode)->getLine(),
(yyvsp[0].interm.intermTypedNode));
}
break;
case 313: /* condition: fully_specified_type identifier EQUAL initializer */
{
(yyval.interm.intermNode) = context->addConditionInitializer(
(yyvsp[-3].interm.type), ImmutableString((yyvsp[-2].lex).string),
(yyvsp[0].interm.intermTypedNode), (yylsp[-2]));
}
break;
case 314: /* $@15: %empty */
{
context->symbolTable.push();
context->beginLoop(ELoopWhile, (yylsp[-1]));
context->onLoopConditionBegin(nullptr, (yylsp[-1]));
}
break;
case 315: /* $@16: %empty */
{
context->onLoopConditionEnd((yyvsp[0].interm.intermNode), (yylsp[0]));
}
break;
case 316: /* iteration_statement: WHILE LEFT_PAREN $@15 condition $@16 RIGHT_PAREN
statement_no_new_scope */
{
context->symbolTable.pop();
(yyval.interm.intermNode) =
context->addLoop(ELoopWhile, 0, (yyvsp[-3].interm.intermNode), 0,
(yyvsp[0].interm.intermNode), (yylsp[-6]));
}
break;
case 317: /* $@17: %empty */
{
context->beginLoop(ELoopDoWhile, (yylsp[0]));
context->onDoLoopBegin();
}
break;
case 318: /* $@18: %empty */
{
context->onDoLoopConditionBegin();
}
break;
case 319: /* iteration_statement: DO $@17 statement_with_scope WHILE LEFT_PAREN $@18
expression RIGHT_PAREN SEMICOLON */
{
(yyval.interm.intermNode) =
context->addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0,
(yyvsp[-6].interm.intermNode), (yylsp[-5]));
}
break;
case 320: /* $@19: %empty */
{
context->symbolTable.push();
context->beginLoop(ELoopFor, (yylsp[-1]));
}
break;
case 321: /* $@20: %empty */
{
context->onLoopConditionBegin((yyvsp[0].interm.intermNode), (yylsp[0]));
}
break;
case 322: /* iteration_statement: FOR LEFT_PAREN $@19 for_init_statement $@20
for_rest_statement RIGHT_PAREN statement_no_new_scope */
{
context->symbolTable.pop();
(yyval.interm.intermNode) = context->addLoop(
ELoopFor, (yyvsp[-4].interm.intermNode), (yyvsp[-2].interm.nodePair).node1,
reinterpret_cast<TIntermTyped *>((yyvsp[-2].interm.nodePair).node2),
(yyvsp[0].interm.intermNode), (yylsp[-7]));
}
break;
case 323: /* for_init_statement: expression_statement */
{
context->endStatementWithValue((yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 324: /* for_init_statement: declaration_statement */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 325: /* conditionopt: condition */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 326: /* conditionopt: %empty */
{
(yyval.interm.intermNode) = nullptr;
}
break;
case 327: /* for_rest_statement: conditionopt SEMICOLON */
{
context->onLoopConditionEnd((yyvsp[-1].interm.intermNode), (yylsp[-1]));
context->onLoopContinueEnd(nullptr, (yylsp[-1]));
(yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermNode);
(yyval.interm.nodePair).node2 = 0;
}
break;
case 328: /* $@21: %empty */
{
context->onLoopConditionEnd((yyvsp[-1].interm.intermNode), (yylsp[-1]));
}
break;
case 329: /* for_rest_statement: conditionopt SEMICOLON $@21 expression */
{
context->onLoopContinueEnd((yyvsp[0].interm.intermTypedNode), (yylsp[0]));
(yyval.interm.nodePair).node1 = (yyvsp[-3].interm.intermNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
}
break;
case 330: /* jump_statement: CONTINUE SEMICOLON */
{
(yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
}
break;
case 331: /* jump_statement: BREAK SEMICOLON */
{
(yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
}
break;
case 332: /* jump_statement: RETURN SEMICOLON */
{
(yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
}
break;
case 333: /* jump_statement: RETURN expression SEMICOLON */
{
(yyval.interm.intermNode) =
context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
}
break;
case 334: /* jump_statement: DISCARD SEMICOLON */
{
(yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
}
break;
case 335: /* translation_unit: external_declaration */
{
(yyval.interm.intermBlock) = new TIntermBlock();
(yyval.interm.intermBlock)->setLine((yyloc));
(yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode));
context->setTreeRoot((yyval.interm.intermBlock));
}
break;
case 336: /* translation_unit: translation_unit external_declaration */
{
(yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode));
}
break;
case 337: /* external_declaration: function_definition */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 338: /* external_declaration: declaration */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
break;
case 339: /* $@22: %empty */
{
context->parseFunctionDefinitionHeader((yylsp[0]), (yyvsp[0].interm).function,
&((yyvsp[0].interm).intermFunctionPrototype));
}
break;
case 340: /* function_definition: function_prototype $@22 compound_statement_no_new_scope */
{
(yyval.interm.intermNode) =
context->addFunctionDefinition((yyvsp[-2].interm).intermFunctionPrototype,
(yyvsp[0].interm.intermBlock), (yylsp[-2]));
}
break;
default:
break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
YYPOPSTACK(yylen);
yylen = 0;
*++yyvsp = yyval;
*++yylsp = yyloc;
/* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
{
const int yylhs = yyr1[yyn] - YYNTOKENS;
const int yyi = yypgoto[yylhs] + *yyssp;
yystate =
(0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]);
}
goto yynewstate;
/*--------------------------------------.
| yyerrlab -- here on detecting error. |
`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
yyerror(&yylloc, context, scanner, YY_("syntax error"));
}
yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
{
YYABORT;
}
}
else
{
yydestruct("Error: discarding", yytoken, &yylval, &yylloc, context, scanner);
yychar = YYEMPTY;
}
}
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/* Pacify compilers when the user code never invokes YYERROR and the
label yyerrorlab therefore never appears in user code. */
if (0)
{
YYERROR;
}
++yynerrs;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK(yylen);
yylen = 0;
YY_STACK_PRINT(yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
/* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default(yyn))
{
yyn += YYSYMBOL_YYerror;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
{
yyn = yytable[yyn];
if (0 < yyn)
{
break;
}
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
{
YYABORT;
}
yyerror_range[1] = *yylsp;
yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, context, scanner);
YYPOPSTACK(1);
yystate = *yyssp;
YY_STACK_PRINT(yyss, yyssp);
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
yyerror_range[2] = yylloc;
++yylsp;
YYLLOC_DEFAULT(*yylsp, yyerror_range, 2);
/* Shift the error token. */
YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturnlab;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturnlab;
/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
`-----------------------------------------------------------*/
yyexhaustedlab:
yyerror(&yylloc, context, scanner, YY_("memory exhausted"));
yyresult = 2;
goto yyreturnlab;
/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return. |
`----------------------------------------------------------*/
yyreturnlab:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE(yychar);
yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, context, scanner);
}
/* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK(yylen);
YY_STACK_PRINT(yyss, yyssp);
while (yyssp != yyss)
{
yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, context,
scanner);
YYPOPSTACK(1);
}
#ifndef yyoverflow
if (yyss != yyssa)
{
YYSTACK_FREE(yyss);
}
#endif
return yyresult;
}
int glslang_parse(TParseContext *context)
{
return yyparse(context, context->getScanner());
}