From c9e3c3c941b4f56cd0abc6ee944b1b285ce593cb Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Fri, 29 Jul 2016 16:00:05 +0800 Subject: [PATCH] Parser: Implement extension GL_AMD_gpu_shader_half_float. - Add built-in types: float16_t, f16vec, f16mat. - Add support of half float constant: hf, HF. - Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=, *=, /=, ==, !=, >=, <=, >, <. - Add support of type conversions: float16_t -> XXX, XXX -> float16_t. - Add new built-in functions. --- SPIRV/CMakeLists.txt | 7 +- SPIRV/GLSL.ext.AMD.h | 5 +- SPIRV/GlslangToSpv.cpp | 106 +- SPIRV/SpvBuilder.cpp | 34 + SPIRV/SpvBuilder.h | 3 + SPIRV/bitutils.h | 81 + SPIRV/hex_float.h | 1076 +++ Test/baseResults/spv.float16.frag.out | 837 ++ Test/spv.float16.frag | 306 + glslang/Include/BaseTypes.h | 3 + glslang/Include/Types.h | 12 +- glslang/Include/intermediate.h | 35 + glslang/MachineIndependent/Constant.cpp | 9 + glslang/MachineIndependent/Initialize.cpp | 441 +- glslang/MachineIndependent/Intermediate.cpp | 170 +- glslang/MachineIndependent/ParseHelper.cpp | 26 + glslang/MachineIndependent/Scan.cpp | 52 +- glslang/MachineIndependent/SymbolTable.cpp | 3 + glslang/MachineIndependent/Versions.cpp | 15 + glslang/MachineIndependent/Versions.h | 9 +- glslang/MachineIndependent/gl_types.h | 18 + glslang/MachineIndependent/glslang.y | 141 +- glslang/MachineIndependent/glslang_tab.cpp | 8242 +++++++++++--------- glslang/MachineIndependent/glslang_tab.cpp.h | 612 +- glslang/MachineIndependent/intermOut.cpp | 38 + glslang/MachineIndependent/linkValidate.cpp | 3 + glslang/MachineIndependent/parseVersions.h | 3 + glslang/MachineIndependent/preprocessor/Pp.cpp | 6 + .../MachineIndependent/preprocessor/PpScanner.cpp | 33 + .../MachineIndependent/preprocessor/PpTokens.cpp | 9 + glslang/MachineIndependent/preprocessor/PpTokens.h | 3 + glslang/MachineIndependent/reflection.cpp | 32 + gtests/CMakeLists.txt | 1 + gtests/HexFloat.cpp | 1232 +++ gtests/Spv.FromFile.cpp | 24 + 35 files changed, 9511 insertions(+), 4116 deletions(-) create mode 100644 SPIRV/bitutils.h create mode 100644 SPIRV/hex_float.h create mode 100644 Test/baseResults/spv.float16.frag.out create mode 100644 Test/spv.float16.frag create mode 100644 gtests/HexFloat.cpp diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index ad72276..2c65d71 100755 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -11,10 +11,12 @@ set(SPVREMAP_SOURCES doc.cpp) set(HEADERS + bitutils.h spirv.hpp GLSL.std.450.h GLSL.ext.KHR.h GlslangToSpv.h + hex_float.h Logger.h SpvBuilder.h spvIR.h @@ -26,8 +28,9 @@ set(SPVREMAP_HEADERS doc.h) if(ENABLE_AMD_EXTENSIONS) - set(HEADERS - GLSL.ext.AMD.h) + list(APPEND + HEADERS + GLSL.ext.AMD.h) endif(ENABLE_AMD_EXTENSIONS) add_library(SPIRV STATIC ${SOURCES} ${HEADERS}) diff --git a/SPIRV/GLSL.ext.AMD.h b/SPIRV/GLSL.ext.AMD.h index 633cea0..d2098cc 100644 --- a/SPIRV/GLSL.ext.AMD.h +++ b/SPIRV/GLSL.ext.AMD.h @@ -32,7 +32,7 @@ enum Decoration; enum Op; static const int GLSLextAMDVersion = 100; -static const int GLSLextAMDRevision = 1; +static const int GLSLextAMDRevision = 2; // SPV_AMD_shader_ballot static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot"; @@ -110,4 +110,7 @@ enum GcnShaderAMD { GcnShaderCountAMD }; +// SPV_AMD_gpu_shader_half_float +static const char* const E_SPV_AMD_gpu_shader_half_float = "SPV_AMD_gpu_shader_half_float"; + #endif // #ifndef GLSLextAMD_H diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index c79b6c2..6e18b2b 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1215,6 +1215,10 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI one = builder.makeFloatConstant(1.0F); else if (node->getBasicType() == glslang::EbtDouble) one = builder.makeDoubleConstant(1.0); +#ifdef AMD_EXTENSIONS + else if (node->getBasicType() == glslang::EbtFloat16) + one = builder.makeFloat16Constant(1.0F); +#endif else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) one = builder.makeInt64Constant(1); else @@ -1388,6 +1392,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructDMat4x2: case glslang::EOpConstructDMat4x3: case glslang::EOpConstructDMat4x4: +#ifdef AMD_EXTENSIONS + case glslang::EOpConstructF16Mat2x2: + case glslang::EOpConstructF16Mat2x3: + case glslang::EOpConstructF16Mat2x4: + case glslang::EOpConstructF16Mat3x2: + case glslang::EOpConstructF16Mat3x3: + case glslang::EOpConstructF16Mat3x4: + case glslang::EOpConstructF16Mat4x2: + case glslang::EOpConstructF16Mat4x3: + case glslang::EOpConstructF16Mat4x4: +#endif isMatrix = true; // fall through case glslang::EOpConstructFloat: @@ -1398,6 +1413,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructDVec2: case glslang::EOpConstructDVec3: case glslang::EOpConstructDVec4: +#ifdef AMD_EXTENSIONS + case glslang::EOpConstructFloat16: + case glslang::EOpConstructF16Vec2: + case glslang::EOpConstructF16Vec3: + case glslang::EOpConstructF16Vec4: +#endif case glslang::EOpConstructBool: case glslang::EOpConstructBVec2: case glslang::EOpConstructBVec3: @@ -1901,7 +1922,6 @@ spv::Id TGlslangToSpvTraverser::createInvertedSwizzle(spv::Decoration precision, return builder.createRvalueSwizzle(precision, convertGlslangToSpvType(node.getType()), parentResult, swizzle); } - // Convert a glslang AST swizzle node to a swizzle vector for building SPIR-V. void TGlslangToSpvTraverser::convertSwizzle(const glslang::TIntermAggregate& node, std::vector& swizzle) { @@ -1936,6 +1956,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtDouble: spvType = builder.makeFloatType(64); break; +#ifdef AMD_EXTENSIONS + case glslang::EbtFloat16: + builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); + builder.addCapability(spv::CapabilityFloat16); + spvType = builder.makeFloatType(16); + break; +#endif case glslang::EbtBool: // "transparent" bool doesn't exist in SPIR-V. The GLSL convention is // a 32-bit int where non-0 means true. @@ -3040,7 +3067,11 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv glslang::TBasicType typeProxy, bool reduceComparison) { bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; +#ifdef AMD_EXTENSIONS + bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; +#else bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; +#endif bool isBool = typeProxy == glslang::EbtBool; spv::Op binOp = spv::OpNop; @@ -3366,7 +3397,11 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: int extBuiltins = -1; int libCall = -1; bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; +#ifdef AMD_EXTENSIONS + bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; +#else bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; +#endif switch (op) { case glslang::EOpNegative: @@ -3550,6 +3585,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: unaryOp = spv::OpBitcast; break; +#ifdef AMD_EXTENSIONS + case glslang::EOpPackFloat2x16: + case glslang::EOpUnpackFloat2x16: + unaryOp = spv::OpBitcast; + break; +#endif + case glslang::EOpDPdx: unaryOp = spv::OpDPdx; break; @@ -3746,22 +3788,40 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero); +#ifdef AMD_EXTENSIONS + case glslang::EOpConvFloat16ToBool: + zero = builder.makeFloat16Constant(0.0F); + zero = makeSmearedConstant(zero, vectorSize); + return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero); +#endif + case glslang::EOpConvBoolToFloat: convOp = spv::OpSelect; - zero = builder.makeFloatConstant(0.0); - one = builder.makeFloatConstant(1.0); + zero = builder.makeFloatConstant(0.0F); + one = builder.makeFloatConstant(1.0F); break; + case glslang::EOpConvBoolToDouble: convOp = spv::OpSelect; zero = builder.makeDoubleConstant(0.0); one = builder.makeDoubleConstant(1.0); break; + +#ifdef AMD_EXTENSIONS + case glslang::EOpConvBoolToFloat16: + convOp = spv::OpSelect; + zero = builder.makeFloat16Constant(0.0F); + one = builder.makeFloat16Constant(1.0F); + break; +#endif + case glslang::EOpConvBoolToInt: case glslang::EOpConvBoolToInt64: zero = (op == glslang::EOpConvBoolToInt64) ? builder.makeInt64Constant(0) : builder.makeIntConstant(0); one = (op == glslang::EOpConvBoolToInt64) ? builder.makeInt64Constant(1) : builder.makeIntConstant(1); convOp = spv::OpSelect; break; + case glslang::EOpConvBoolToUint: case glslang::EOpConvBoolToUint64: zero = (op == glslang::EOpConvBoolToUint64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0); @@ -3773,6 +3833,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvIntToDouble: case glslang::EOpConvInt64ToFloat: case glslang::EOpConvInt64ToDouble: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvIntToFloat16: + case glslang::EOpConvInt64ToFloat16: +#endif convOp = spv::OpConvertSToF; break; @@ -3780,11 +3844,21 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvUintToDouble: case glslang::EOpConvUint64ToFloat: case glslang::EOpConvUint64ToDouble: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvUintToFloat16: + case glslang::EOpConvUint64ToFloat16: +#endif convOp = spv::OpConvertUToF; break; case glslang::EOpConvDoubleToFloat: case glslang::EOpConvFloatToDouble: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvDoubleToFloat16: + case glslang::EOpConvFloat16ToDouble: + case glslang::EOpConvFloatToFloat16: + case glslang::EOpConvFloat16ToFloat: +#endif convOp = spv::OpFConvert; if (builder.isMatrixType(destType)) return createUnaryMatrixOperation(convOp, precision, noContraction, destType, operand, typeProxy); @@ -3794,6 +3868,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvDoubleToInt: case glslang::EOpConvFloatToInt64: case glslang::EOpConvDoubleToInt64: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvFloat16ToInt: + case glslang::EOpConvFloat16ToInt64: +#endif convOp = spv::OpConvertFToS; break; @@ -3818,6 +3896,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvDoubleToUint: case glslang::EOpConvFloatToUint64: case glslang::EOpConvDoubleToUint64: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvFloat16ToUint: + case glslang::EOpConvFloat16ToUint64: +#endif convOp = spv::OpConvertFToU; break; @@ -3987,7 +4069,11 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; +#ifdef AMD_EXTENSIONS + bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; +#else bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; +#endif spv::Op opCode = spv::OpNop; @@ -4185,7 +4271,11 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; +#ifdef AMD_EXTENSIONS + bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; +#else bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; +#endif spv::Op opCode = spv::OpNop; int extBuiltins = -1; @@ -4715,6 +4805,11 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtDouble: spvConsts.push_back(builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst())); break; +#ifdef AMD_EXTENSIONS + case glslang::EbtFloat16: + spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); + break; +#endif case glslang::EbtBool: spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst())); break; @@ -4747,6 +4842,11 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtDouble: scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant); break; +#ifdef AMD_EXTENSIONS + case glslang::EbtFloat16: + scalar = builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); + break; +#endif case glslang::EbtBool: scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant); break; diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 7aaa51f..c19f368 100644 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -46,6 +46,10 @@ #include "SpvBuilder.h" +#ifdef AMD_EXTENSIONS + #include "hex_float.h" +#endif + #ifndef _WIN32 #include #endif @@ -785,6 +789,36 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) return c->getResultId(); } +#ifdef AMD_EXTENSIONS +Id Builder::makeFloat16Constant(float f16, bool specConstant) +{ + Op opcode = specConstant ? OpSpecConstant : OpConstant; + Id typeId = makeFloatType(16); + + spvutils::HexFloat> fVal(f16); + spvutils::HexFloat> f16Val(0); + fVal.castTo(f16Val, spvutils::round_direction::kToZero); + + unsigned value = f16Val.value().getAsFloat().get_value(); + + // See if we already made it. Applies only to regular constants, because specialization constants + // must remain distinct for the purpose of applying a SpecId decoration. + if (!specConstant) { + Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value); + if (existing) + return existing; + } + + Instruction* c = new Instruction(getUniqueId(), typeId, opcode); + c->addImmediateOperand(value); + constantsTypesGlobals.push_back(std::unique_ptr(c)); + groupedConstants[OpTypeFloat].push_back(c); + module.mapInstruction(c); + + return c->getResultId(); +} +#endif + Id Builder::findCompositeConstant(Op typeClass, std::vector& comps) const { Instruction* constant = 0; diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 6e709ea..0e8d9ca 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -191,6 +191,9 @@ public: Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); } Id makeFloatConstant(float f, bool specConstant = false); Id makeDoubleConstant(double d, bool specConstant = false); +#ifdef AMD_EXTENSIONS + Id makeFloat16Constant(float f16, bool specConstant = false); +#endif // Turn the array of constants into a proper spv constant of the requested type. Id makeCompositeConstant(Id type, std::vector& comps, bool specConst = false); diff --git a/SPIRV/bitutils.h b/SPIRV/bitutils.h new file mode 100644 index 0000000..31288ab --- /dev/null +++ b/SPIRV/bitutils.h @@ -0,0 +1,81 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_UTIL_BITUTILS_H_ +#define LIBSPIRV_UTIL_BITUTILS_H_ + +#include +#include + +namespace spvutils { + +// Performs a bitwise copy of source to the destination type Dest. +template +Dest BitwiseCast(Src source) { + Dest dest; + static_assert(sizeof(source) == sizeof(dest), + "BitwiseCast: Source and destination must have the same size"); + std::memcpy(&dest, &source, sizeof(dest)); + return dest; +} + +// SetBits returns an integer of type with bits set +// for position through , counting from the least +// significant bit. In particular when Num == 0, no positions are set to 1. +// A static assert will be triggered if First + Num > sizeof(T) * 8, that is, +// a bit that will not fit in the underlying type is set. +template +struct SetBits { + static_assert(First < sizeof(T) * 8, + "Tried to set a bit that is shifted too far."); + const static T get = (T(1) << First) | SetBits::get; +}; + +template +struct SetBits { + const static T get = T(0); +}; + +// This is all compile-time so we can put our tests right here. +static_assert(SetBits::get == uint32_t(0x00000000), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0x00000001), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0x80000000), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0x00000006), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0xc0000000), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0x7FFFFFFF), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0xFFFFFFFF), + "SetBits failed"); +static_assert(SetBits::get == uint32_t(0xFFFF0000), + "SetBits failed"); + +static_assert(SetBits::get == uint64_t(0x0000000000000001LL), + "SetBits failed"); +static_assert(SetBits::get == uint64_t(0x8000000000000000LL), + "SetBits failed"); +static_assert(SetBits::get == uint64_t(0xc000000000000000LL), + "SetBits failed"); +static_assert(SetBits::get == uint64_t(0x0000000080000000LL), + "SetBits failed"); +static_assert(SetBits::get == uint64_t(0x00000000FFFF0000LL), + "SetBits failed"); + +} // namespace spvutils + +#endif // LIBSPIRV_UTIL_BITUTILS_H_ diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h new file mode 100644 index 0000000..ac7e002 --- /dev/null +++ b/SPIRV/hex_float.h @@ -0,0 +1,1076 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_UTIL_HEX_FLOAT_H_ +#define LIBSPIRV_UTIL_HEX_FLOAT_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include "bitutils.h" + +namespace spvutils { + +class Float16 { + public: + Float16(uint16_t v) : val(v) {} + Float16() = default; + static bool isNan(const Float16& val) { + return ((val.val & 0x7C00) == 0x7C00) && ((val.val & 0x3FF) != 0); + } + // Returns true if the given value is any kind of infinity. + static bool isInfinity(const Float16& val) { + return ((val.val & 0x7C00) == 0x7C00) && ((val.val & 0x3FF) == 0); + } + Float16(const Float16& other) { val = other.val; } + uint16_t get_value() const { return val; } + + // Returns the maximum normal value. + static Float16 max() { return Float16(0x7bff); } + // Returns the lowest normal value. + static Float16 lowest() { return Float16(0xfbff); } + + private: + uint16_t val; +}; + +// To specialize this type, you must override uint_type to define +// an unsigned integer that can fit your floating point type. +// You must also add a isNan function that returns true if +// a value is Nan. +template +struct FloatProxyTraits { + using uint_type = void; +}; + +template <> +struct FloatProxyTraits { + using uint_type = uint32_t; + static bool isNan(float f) { return std::isnan(f); } + // Returns true if the given value is any kind of infinity. + static bool isInfinity(float f) { return std::isinf(f); } + // Returns the maximum normal value. + static float max() { return std::numeric_limits::max(); } + // Returns the lowest normal value. + static float lowest() { return std::numeric_limits::lowest(); } +}; + +template <> +struct FloatProxyTraits { + using uint_type = uint64_t; + static bool isNan(double f) { return std::isnan(f); } + // Returns true if the given value is any kind of infinity. + static bool isInfinity(double f) { return std::isinf(f); } + // Returns the maximum normal value. + static double max() { return std::numeric_limits::max(); } + // Returns the lowest normal value. + static double lowest() { return std::numeric_limits::lowest(); } +}; + +template <> +struct FloatProxyTraits { + using uint_type = uint16_t; + static bool isNan(Float16 f) { return Float16::isNan(f); } + // Returns true if the given value is any kind of infinity. + static bool isInfinity(Float16 f) { return Float16::isInfinity(f); } + // Returns the maximum normal value. + static Float16 max() { return Float16::max(); } + // Returns the lowest normal value. + static Float16 lowest() { return Float16::lowest(); } +}; + +// Since copying a floating point number (especially if it is NaN) +// does not guarantee that bits are preserved, this class lets us +// store the type and use it as a float when necessary. +template +class FloatProxy { + public: + using uint_type = typename FloatProxyTraits::uint_type; + + // Since this is to act similar to the normal floats, + // do not initialize the data by default. + FloatProxy() = default; + + // Intentionally non-explicit. This is a proxy type so + // implicit conversions allow us to use it more transparently. + FloatProxy(T val) { data_ = BitwiseCast(val); } + + // Intentionally non-explicit. This is a proxy type so + // implicit conversions allow us to use it more transparently. + FloatProxy(uint_type val) { data_ = val; } + + // This is helpful to have and is guaranteed not to stomp bits. + FloatProxy operator-() const { + return static_cast(data_ ^ + (uint_type(0x1) << (sizeof(T) * 8 - 1))); + } + + // Returns the data as a floating point value. + T getAsFloat() const { return BitwiseCast(data_); } + + // Returns the raw data. + uint_type data() const { return data_; } + + // Returns true if the value represents any type of NaN. + bool isNan() { return FloatProxyTraits::isNan(getAsFloat()); } + // Returns true if the value represents any type of infinity. + bool isInfinity() { return FloatProxyTraits::isInfinity(getAsFloat()); } + + // Returns the maximum normal value. + static FloatProxy max() { + return FloatProxy(FloatProxyTraits::max()); + } + // Returns the lowest normal value. + static FloatProxy lowest() { + return FloatProxy(FloatProxyTraits::lowest()); + } + + private: + uint_type data_; +}; + +template +bool operator==(const FloatProxy& first, const FloatProxy& second) { + return first.data() == second.data(); +} + +// Reads a FloatProxy value as a normal float from a stream. +template +std::istream& operator>>(std::istream& is, FloatProxy& value) { + T float_val; + is >> float_val; + value = FloatProxy(float_val); + return is; +} + +// This is an example traits. It is not meant to be used in practice, but will +// be the default for any non-specialized type. +template +struct HexFloatTraits { + // Integer type that can store this hex-float. + using uint_type = void; + // Signed integer type that can store this hex-float. + using int_type = void; + // The numerical type that this HexFloat represents. + using underlying_type = void; + // The type needed to construct the underlying type. + using native_type = void; + // The number of bits that are actually relevant in the uint_type. + // This allows us to deal with, for example, 24-bit values in a 32-bit + // integer. + static const uint32_t num_used_bits = 0; + // Number of bits that represent the exponent. + static const uint32_t num_exponent_bits = 0; + // Number of bits that represent the fractional part. + static const uint32_t num_fraction_bits = 0; + // The bias of the exponent. (How much we need to subtract from the stored + // value to get the correct value.) + static const uint32_t exponent_bias = 0; +}; + +// Traits for IEEE float. +// 1 sign bit, 8 exponent bits, 23 fractional bits. +template <> +struct HexFloatTraits> { + using uint_type = uint32_t; + using int_type = int32_t; + using underlying_type = FloatProxy; + using native_type = float; + static const uint_type num_used_bits = 32; + static const uint_type num_exponent_bits = 8; + static const uint_type num_fraction_bits = 23; + static const uint_type exponent_bias = 127; +}; + +// Traits for IEEE double. +// 1 sign bit, 11 exponent bits, 52 fractional bits. +template <> +struct HexFloatTraits> { + using uint_type = uint64_t; + using int_type = int64_t; + using underlying_type = FloatProxy; + using native_type = double; + static const uint_type num_used_bits = 64; + static const uint_type num_exponent_bits = 11; + static const uint_type num_fraction_bits = 52; + static const uint_type exponent_bias = 1023; +}; + +// Traits for IEEE half. +// 1 sign bit, 5 exponent bits, 10 fractional bits. +template <> +struct HexFloatTraits> { + using uint_type = uint16_t; + using int_type = int16_t; + using underlying_type = uint16_t; + using native_type = uint16_t; + static const uint_type num_used_bits = 16; + static const uint_type num_exponent_bits = 5; + static const uint_type num_fraction_bits = 10; + static const uint_type exponent_bias = 15; +}; + +enum class round_direction { + kToZero, + kToNearestEven, + kToPositiveInfinity, + kToNegativeInfinity, + max = kToNegativeInfinity +}; + +// Template class that houses a floating pointer number. +// It exposes a number of constants based on the provided traits to +// assist in interpreting the bits of the value. +template > +class HexFloat { + public: + using uint_type = typename Traits::uint_type; + using int_type = typename Traits::int_type; + using underlying_type = typename Traits::underlying_type; + using native_type = typename Traits::native_type; + + explicit HexFloat(T f) : value_(f) {} + + T value() const { return value_; } + void set_value(T f) { value_ = f; } + + // These are all written like this because it is convenient to have + // compile-time constants for all of these values. + + // Pass-through values to save typing. + static const uint32_t num_used_bits = Traits::num_used_bits; + static const uint32_t exponent_bias = Traits::exponent_bias; + static const uint32_t num_exponent_bits = Traits::num_exponent_bits; + static const uint32_t num_fraction_bits = Traits::num_fraction_bits; + + // Number of bits to shift left to set the highest relevant bit. + static const uint32_t top_bit_left_shift = num_used_bits - 1; + // How many nibbles (hex characters) the fractional part takes up. + static const uint32_t fraction_nibbles = (num_fraction_bits + 3) / 4; + // If the fractional part does not fit evenly into a hex character (4-bits) + // then we have to left-shift to get rid of leading 0s. This is the amount + // we have to shift (might be 0). + static const uint32_t num_overflow_bits = + fraction_nibbles * 4 - num_fraction_bits; + + // The representation of the fraction, not the actual bits. This + // includes the leading bit that is usually implicit. + static const uint_type fraction_represent_mask = + spvutils::SetBits::get; + + // The topmost bit in the nibble-aligned fraction. + static const uint_type fraction_top_bit = + uint_type(1) << (num_fraction_bits + num_overflow_bits - 1); + + // The least significant bit in the exponent, which is also the bit + // immediately to the left of the significand. + static const uint_type first_exponent_bit = uint_type(1) + << (num_fraction_bits); + + // The mask for the encoded fraction. It does not include the + // implicit bit. + static const uint_type fraction_encode_mask = + spvutils::SetBits::get; + + // The bit that is used as a sign. + static const uint_type sign_mask = uint_type(1) << top_bit_left_shift; + + // The bits that represent the exponent. + static const uint_type exponent_mask = + spvutils::SetBits::get; + + // How far left the exponent is shifted. + static const uint32_t exponent_left_shift = num_fraction_bits; + + // How far from the right edge the fraction is shifted. + static const uint32_t fraction_right_shift = + static_cast(sizeof(uint_type) * 8) - num_fraction_bits; + + // The maximum representable unbiased exponent. + static const int_type max_exponent = + (exponent_mask >> num_fraction_bits) - exponent_bias; + // The minimum representable exponent for normalized numbers. + static const int_type min_exponent = -static_cast(exponent_bias); + + // Returns the bits associated with the value. + uint_type getBits() const { return spvutils::BitwiseCast(value_); } + + // Returns the bits associated with the value, without the leading sign bit. + uint_type getUnsignedBits() const { + return static_cast(spvutils::BitwiseCast(value_) & + ~sign_mask); + } + + // Returns the bits associated with the exponent, shifted to start at the + // lsb of the type. + const uint_type getExponentBits() const { + return static_cast((getBits() & exponent_mask) >> + num_fraction_bits); + } + + // Returns the exponent in unbiased form. This is the exponent in the + // human-friendly form. + const int_type getUnbiasedExponent() const { + return static_cast(getExponentBits() - exponent_bias); + } + + // Returns just the significand bits from the value. + const uint_type getSignificandBits() const { + return getBits() & fraction_encode_mask; + } + + // If the number was normalized, returns the unbiased exponent. + // If the number was denormal, normalize the exponent first. + const int_type getUnbiasedNormalizedExponent() const { + if ((getBits() & ~sign_mask) == 0) { // special case if everything is 0 + return 0; + } + int_type exp = getUnbiasedExponent(); + if (exp == min_exponent) { // We are in denorm land. + uint_type significand_bits = getSignificandBits(); + while ((significand_bits & (first_exponent_bit >> 1)) == 0) { + significand_bits = static_cast(significand_bits << 1); + exp = static_cast(exp - 1); + } + significand_bits &= fraction_encode_mask; + } + return exp; + } + + // Returns the signficand after it has been normalized. + const uint_type getNormalizedSignificand() const { + int_type unbiased_exponent = getUnbiasedNormalizedExponent(); + uint_type significand = getSignificandBits(); + for (int_type i = unbiased_exponent; i <= min_exponent; ++i) { + significand = static_cast(significand << 1); + } + significand &= fraction_encode_mask; + return significand; + } + + // Returns true if this number represents a negative value. + bool isNegative() const { return (getBits() & sign_mask) != 0; } + + // Sets this HexFloat from the individual components. + // Note this assumes EVERY significand is normalized, and has an implicit + // leading one. This means that the only way that this method will set 0, + // is if you set a number so denormalized that it underflows. + // Do not use this method with raw bits extracted from a subnormal number, + // since subnormals do not have an implicit leading 1 in the significand. + // The significand is also expected to be in the + // lowest-most num_fraction_bits of the uint_type. + // The exponent is expected to be unbiased, meaning an exponent of + // 0 actually means 0. + // If underflow_round_up is set, then on underflow, if a number is non-0 + // and would underflow, we round up to the smallest denorm. + void setFromSignUnbiasedExponentAndNormalizedSignificand( + bool negative, int_type exponent, uint_type significand, + bool round_denorm_up) { + bool significand_is_zero = significand == 0; + + if (exponent <= min_exponent) { + // If this was denormalized, then we have to shift the bit on, meaning + // the significand is not zero. + significand_is_zero = false; + significand |= first_exponent_bit; + significand = static_cast(significand >> 1); + } + + while (exponent < min_exponent) { + significand = static_cast(significand >> 1); + ++exponent; + } + + if (exponent == min_exponent) { + if (significand == 0 && !significand_is_zero && round_denorm_up) { + significand = static_cast(0x1); + } + } + + uint_type new_value = 0; + if (negative) { + new_value = static_cast(new_value | sign_mask); + } + exponent = static_cast(exponent + exponent_bias); + assert(exponent >= 0); + + // put it all together + exponent = static_cast((exponent << exponent_left_shift) & + exponent_mask); + significand = static_cast(significand & fraction_encode_mask); + new_value = static_cast(new_value | (exponent | significand)); + value_ = BitwiseCast(new_value); + } + + // Increments the significand of this number by the given amount. + // If this would spill the significand into the implicit bit, + // carry is set to true and the significand is shifted to fit into + // the correct location, otherwise carry is set to false. + // All significands and to_increment are assumed to be within the bounds + // for a valid significand. + static uint_type incrementSignificand(uint_type significand, + uint_type to_increment, bool* carry) { + significand = static_cast(significand + to_increment); + *carry = false; + if (significand & first_exponent_bit) { + *carry = true; + // The implicit 1-bit will have carried, so we should zero-out the + // top bit and shift back. + significand = static_cast(significand & ~first_exponent_bit); + significand = static_cast(significand >> 1); + } + return significand; + } + + // These exist because MSVC throws warnings on negative right-shifts + // even if they are not going to be executed. Eg: + // constant_number < 0? 0: constant_number + // These convert the negative left-shifts into right shifts. + + template + struct negatable_left_shift { + static uint_type val(uint_type val) { + return static_cast(val >> -N); + } + }; + + template + struct negatable_left_shift= 0>::type> { + static uint_type val(uint_type val) { + return static_cast(val << N); + } + }; + + template + struct negatable_right_shift { + static uint_type val(uint_type val) { + return static_cast(val << -N); + } + }; + + template + struct negatable_right_shift= 0>::type> { + static uint_type val(uint_type val) { + return static_cast(val >> N); + } + }; + + // Returns the significand, rounded to fit in a significand in + // other_T. This is shifted so that the most significant + // bit of the rounded number lines up with the most significant bit + // of the returned significand. + template + typename other_T::uint_type getRoundedNormalizedSignificand( + round_direction dir, bool* carry_bit) { + using other_uint_type = typename other_T::uint_type; + static const int_type num_throwaway_bits = + static_cast(num_fraction_bits) - + static_cast(other_T::num_fraction_bits); + + static const uint_type last_significant_bit = + (num_throwaway_bits < 0) + ? 0 + : negatable_left_shift::val(1u); + static const uint_type first_rounded_bit = + (num_throwaway_bits < 1) + ? 0 + : negatable_left_shift::val(1u); + + static const uint_type throwaway_mask_bits = + num_throwaway_bits > 0 ? num_throwaway_bits : 0; + static const uint_type throwaway_mask = + spvutils::SetBits::get; + + *carry_bit = false; + other_uint_type out_val = 0; + uint_type significand = getNormalizedSignificand(); + // If we are up-casting, then we just have to shift to the right location. + if (num_throwaway_bits <= 0) { + out_val = static_cast(significand); + uint_type shift_amount = static_cast(-num_throwaway_bits); + out_val = static_cast(out_val << shift_amount); + return out_val; + } + + // If every non-representable bit is 0, then we don't have any casting to + // do. + if ((significand & throwaway_mask) == 0) { + return static_cast( + negatable_right_shift::val(significand)); + } + + bool round_away_from_zero = false; + // We actually have to narrow the significand here, so we have to follow the + // rounding rules. + switch (dir) { + case round_direction::kToZero: + break; + case round_direction::kToPositiveInfinity: + round_away_from_zero = !isNegative(); + break; + case round_direction::kToNegativeInfinity: + round_away_from_zero = isNegative(); + break; + case round_direction::kToNearestEven: + // Have to round down, round bit is 0 + if ((first_rounded_bit & significand) == 0) { + break; + } + if (((significand & throwaway_mask) & ~first_rounded_bit) != 0) { + // If any subsequent bit of the rounded portion is non-0 then we round + // up. + round_away_from_zero = true; + break; + } + // We are exactly half-way between 2 numbers, pick even. + if ((significand & last_significant_bit) != 0) { + // 1 for our last bit, round up. + round_away_from_zero = true; + break; + } + break; + } + + if (round_away_from_zero) { + return static_cast( + negatable_right_shift::val(incrementSignificand( + significand, last_significant_bit, carry_bit))); + } else { + return static_cast( + negatable_right_shift::val(significand)); + } + } + + // Casts this value to another HexFloat. If the cast is widening, + // then round_dir is ignored. If the cast is narrowing, then + // the result is rounded in the direction specified. + // This number will retain Nan and Inf values. + // It will also saturate to Inf if the number overflows, and + // underflow to (0 or min depending on rounding) if the number underflows. + template + void castTo(other_T& other, round_direction round_dir) { + other = other_T(static_cast(0)); + bool negate = isNegative(); + if (getUnsignedBits() == 0) { + if (negate) { + other.set_value(-other.value()); + } + return; + } + uint_type significand = getSignificandBits(); + bool carried = false; + typename other_T::uint_type rounded_significand = + getRoundedNormalizedSignificand(round_dir, &carried); + + int_type exponent = getUnbiasedExponent(); + if (exponent == min_exponent) { + // If we are denormal, normalize the exponent, so that we can encode + // easily. + exponent = static_cast(exponent + 1); + for (uint_type check_bit = first_exponent_bit >> 1; check_bit != 0; + check_bit = static_cast(check_bit >> 1)) { + exponent = static_cast(exponent - 1); + if (check_bit & significand) break; + } + } + + bool is_nan = + (getBits() & exponent_mask) == exponent_mask && significand != 0; + bool is_inf = + !is_nan && + ((exponent + carried) > static_cast(other_T::exponent_bias) || + (significand == 0 && (getBits() & exponent_mask) == exponent_mask)); + + // If we are Nan or Inf we should pass that through. + if (is_inf) { + other.set_value(BitwiseCast( + static_cast( + (negate ? other_T::sign_mask : 0) | other_T::exponent_mask))); + return; + } + if (is_nan) { + typename other_T::uint_type shifted_significand; + shifted_significand = static_cast( + negatable_left_shift< + static_cast(other_T::num_fraction_bits) - + static_cast(num_fraction_bits)>::val(significand)); + + // We are some sort of Nan. We try to keep the bit-pattern of the Nan + // as close as possible. If we had to shift off bits so we are 0, then we + // just set the last bit. + other.set_value(BitwiseCast( + static_cast( + (negate ? other_T::sign_mask : 0) | other_T::exponent_mask | + (shifted_significand == 0 ? 0x1 : shifted_significand)))); + return; + } + + bool round_underflow_up = + isNegative() ? round_dir == round_direction::kToNegativeInfinity + : round_dir == round_direction::kToPositiveInfinity; + using other_int_type = typename other_T::int_type; + // setFromSignUnbiasedExponentAndNormalizedSignificand will + // zero out any underflowing value (but retain the sign). + other.setFromSignUnbiasedExponentAndNormalizedSignificand( + negate, static_cast(exponent), rounded_significand, + round_underflow_up); + return; + } + + private: + T value_; + + static_assert(num_used_bits == + Traits::num_exponent_bits + Traits::num_fraction_bits + 1, + "The number of bits do not fit"); + static_assert(sizeof(T) == sizeof(uint_type), "The type sizes do not match"); +}; + +// Returns 4 bits represented by the hex character. +inline uint8_t get_nibble_from_character(int character) { + const char* dec = "0123456789"; + const char* lower = "abcdef"; + const char* upper = "ABCDEF"; + const char* p = nullptr; + if ((p = strchr(dec, character))) { + return static_cast(p - dec); + } else if ((p = strchr(lower, character))) { + return static_cast(p - lower + 0xa); + } else if ((p = strchr(upper, character))) { + return static_cast(p - upper + 0xa); + } + + assert(false && "This was called with a non-hex character"); + return 0; +} + +// Outputs the given HexFloat to the stream. +template +std::ostream& operator<<(std::ostream& os, const HexFloat& value) { + using HF = HexFloat; + using uint_type = typename HF::uint_type; + using int_type = typename HF::int_type; + + static_assert(HF::num_used_bits != 0, + "num_used_bits must be non-zero for a valid float"); + static_assert(HF::num_exponent_bits != 0, + "num_exponent_bits must be non-zero for a valid float"); + static_assert(HF::num_fraction_bits != 0, + "num_fractin_bits must be non-zero for a valid float"); + + const uint_type bits = spvutils::BitwiseCast(value.value()); + const char* const sign = (bits & HF::sign_mask) ? "-" : ""; + const uint_type exponent = static_cast( + (bits & HF::exponent_mask) >> HF::num_fraction_bits); + + uint_type fraction = static_cast((bits & HF::fraction_encode_mask) + << HF::num_overflow_bits); + + const bool is_zero = exponent == 0 && fraction == 0; + const bool is_denorm = exponent == 0 && !is_zero; + + // exponent contains the biased exponent we have to convert it back into + // the normal range. + int_type int_exponent = static_cast(exponent - HF::exponent_bias); + // If the number is all zeros, then we actually have to NOT shift the + // exponent. + int_exponent = is_zero ? 0 : int_exponent; + + // If we are denorm, then start shifting, and decreasing the exponent until + // our leading bit is 1. + + if (is_denorm) { + while ((fraction & HF::fraction_top_bit) == 0) { + fraction = static_cast(fraction << 1); + int_exponent = static_cast(int_exponent - 1); + } + // Since this is denormalized, we have to consume the leading 1 since it + // will end up being implicit. + fraction = static_cast(fraction << 1); // eat the leading 1 + fraction &= HF::fraction_represent_mask; + } + + uint_type fraction_nibbles = HF::fraction_nibbles; + // We do not have to display any trailing 0s, since this represents the + // fractional part. + while (fraction_nibbles > 0 && (fraction & 0xF) == 0) { + // Shift off any trailing values; + fraction = static_cast(fraction >> 4); + --fraction_nibbles; + } + + const auto saved_flags = os.flags(); + const auto saved_fill = os.fill(); + + os << sign << "0x" << (is_zero ? '0' : '1'); + if (fraction_nibbles) { + // Make sure to keep the leading 0s in place, since this is the fractional + // part. + os << "." << std::setw(static_cast(fraction_nibbles)) + << std::setfill('0') << std::hex << fraction; + } + os << "p" << std::dec << (int_exponent >= 0 ? "+" : "") << int_exponent; + + os.flags(saved_flags); + os.fill(saved_fill); + + return os; +} + +// Returns true if negate_value is true and the next character on the +// input stream is a plus or minus sign. In that case we also set the fail bit +// on the stream and set the value to the zero value for its type. +template +inline bool RejectParseDueToLeadingSign(std::istream& is, bool negate_value, + HexFloat& value) { + if (negate_value) { + auto next_char = is.peek(); + if (next_char == '-' || next_char == '+') { + // Fail the parse. Emulate standard behaviour by setting the value to + // the zero value, and set the fail bit on the stream. + value = HexFloat(typename HexFloat::uint_type{0}); + is.setstate(std::ios_base::failbit); + return true; + } + } + return false; +} + +// Parses a floating point number from the given stream and stores it into the +// value parameter. +// If negate_value is true then the number may not have a leading minus or +// plus, and if it successfully parses, then the number is negated before +// being stored into the value parameter. +// If the value cannot be correctly parsed or overflows the target floating +// point type, then set the fail bit on the stream. +// TODO(dneto): Promise C++11 standard behavior in how the value is set in +// the error case, but only after all target platforms implement it correctly. +// In particular, the Microsoft C++ runtime appears to be out of spec. +template +inline std::istream& ParseNormalFloat(std::istream& is, bool negate_value, + HexFloat& value) { + if (RejectParseDueToLeadingSign(is, negate_value, value)) { + return is; + } + T val; + is >> val; + if (negate_value) { + val = -val; + } + value.set_value(val); + // In the failure case, map -0.0 to 0.0. + if (is.fail() && value.getUnsignedBits() == 0u) { + value = HexFloat(typename HexFloat::uint_type{0}); + } + if (val.isInfinity()) { + // Fail the parse. Emulate standard behaviour by setting the value to + // the closest normal value, and set the fail bit on the stream. + value.set_value((value.isNegative() | negate_value) ? T::lowest() + : T::max()); + is.setstate(std::ios_base::failbit); + } + return is; +} + +// Specialization of ParseNormalFloat for FloatProxy values. +// This will parse the float as it were a 32-bit floating point number, +// and then round it down to fit into a Float16 value. +// The number is rounded towards zero. +// If negate_value is true then the number may not have a leading minus or +// plus, and if it successfully parses, then the number is negated before +// being stored into the value parameter. +// If the value cannot be correctly parsed or overflows the target floating +// point type, then set the fail bit on the stream. +// TODO(dneto): Promise C++11 standard behavior in how the value is set in +// the error case, but only after all target platforms implement it correctly. +// In particular, the Microsoft C++ runtime appears to be out of spec. +template <> +inline std::istream& +ParseNormalFloat, HexFloatTraits>>( + std::istream& is, bool negate_value, + HexFloat, HexFloatTraits>>& value) { + // First parse as a 32-bit float. + HexFloat> float_val(0.0f); + ParseNormalFloat(is, negate_value, float_val); + + // Then convert to 16-bit float, saturating at infinities, and + // rounding toward zero. + float_val.castTo(value, round_direction::kToZero); + + // Overflow on 16-bit behaves the same as for 32- and 64-bit: set the + // fail bit and set the lowest or highest value. + if (Float16::isInfinity(value.value().getAsFloat())) { + value.set_value(value.isNegative() ? Float16::lowest() : Float16::max()); + is.setstate(std::ios_base::failbit); + } + return is; +} + +// Reads a HexFloat from the given stream. +// If the float is not encoded as a hex-float then it will be parsed +// as a regular float. +// This may fail if your stream does not support at least one unget. +// Nan values can be encoded with "0x1.p+exponent_bias". +// This would normally overflow a float and round to +// infinity but this special pattern is the exact representation for a NaN, +// and therefore is actually encoded as the correct NaN. To encode inf, +// either 0x0p+exponent_bias can be specified or any exponent greater than +// exponent_bias. +// Examples using IEEE 32-bit float encoding. +// 0x1.0p+128 (+inf) +// -0x1.0p-128 (-inf) +// +// 0x1.1p+128 (+Nan) +// -0x1.1p+128 (-Nan) +// +// 0x1p+129 (+inf) +// -0x1p+129 (-inf) +template +std::istream& operator>>(std::istream& is, HexFloat& value) { + using HF = HexFloat; + using uint_type = typename HF::uint_type; + using int_type = typename HF::int_type; + + value.set_value(static_cast(0.f)); + + if (is.flags() & std::ios::skipws) { + // If the user wants to skip whitespace , then we should obey that. + while (std::isspace(is.peek())) { + is.get(); + } + } + + auto next_char = is.peek(); + bool negate_value = false; + + if (next_char != '-' && next_char != '0') { + return ParseNormalFloat(is, negate_value, value); + } + + if (next_char == '-') { + negate_value = true; + is.get(); + next_char = is.peek(); + } + + if (next_char == '0') { + is.get(); // We may have to unget this. + auto maybe_hex_start = is.peek(); + if (maybe_hex_start != 'x' && maybe_hex_start != 'X') { + is.unget(); + return ParseNormalFloat(is, negate_value, value); + } else { + is.get(); // Throw away the 'x'; + } + } else { + return ParseNormalFloat(is, negate_value, value); + } + + // This "looks" like a hex-float so treat it as one. + bool seen_p = false; + bool seen_dot = false; + uint_type fraction_index = 0; + + uint_type fraction = 0; + int_type exponent = HF::exponent_bias; + + // Strip off leading zeros so we don't have to special-case them later. + while ((next_char = is.peek()) == '0') { + is.get(); + } + + bool is_denorm = + true; // Assume denorm "representation" until we hear otherwise. + // NB: This does not mean the value is actually denorm, + // it just means that it was written 0. + bool bits_written = false; // Stays false until we write a bit. + while (!seen_p && !seen_dot) { + // Handle characters that are left of the fractional part. + if (next_char == '.') { + seen_dot = true; + } else if (next_char == 'p') { + seen_p = true; + } else if (::isxdigit(next_char)) { + // We know this is not denormalized since we have stripped all leading + // zeroes and we are not a ".". + is_denorm = false; + int number = get_nibble_from_character(next_char); + for (int i = 0; i < 4; ++i, number <<= 1) { + uint_type write_bit = (number & 0x8) ? 0x1 : 0x0; + if (bits_written) { + // If we are here the bits represented belong in the fractional + // part of the float, and we have to adjust the exponent accordingly. + fraction = static_cast( + fraction | + static_cast( + write_bit << (HF::top_bit_left_shift - fraction_index++))); + exponent = static_cast(exponent + 1); + } + bits_written |= write_bit != 0; + } + } else { + // We have not found our exponent yet, so we have to fail. + is.setstate(std::ios::failbit); + return is; + } + is.get(); + next_char = is.peek(); + } + bits_written = false; + while (seen_dot && !seen_p) { + // Handle only fractional parts now. + if (next_char == 'p') { + seen_p = true; + } else if (::isxdigit(next_char)) { + int number = get_nibble_from_character(next_char); + for (int i = 0; i < 4; ++i, number <<= 1) { + uint_type write_bit = (number & 0x8) ? 0x01 : 0x00; + bits_written |= write_bit != 0; + if (is_denorm && !bits_written) { + // Handle modifying the exponent here this way we can handle + // an arbitrary number of hex values without overflowing our + // integer. + exponent = static_cast(exponent - 1); + } else { + fraction = static_cast( + fraction | + static_cast( + write_bit << (HF::top_bit_left_shift - fraction_index++))); + } + } + } else { + // We still have not found our 'p' exponent yet, so this is not a valid + // hex-float. + is.setstate(std::ios::failbit); + return is; + } + is.get(); + next_char = is.peek(); + } + + bool seen_sign = false; + int8_t exponent_sign = 1; + int_type written_exponent = 0; + while (true) { + if ((next_char == '-' || next_char == '+')) { + if (seen_sign) { + is.setstate(std::ios::failbit); + return is; + } + seen_sign = true; + exponent_sign = (next_char == '-') ? -1 : 1; + } else if (::isdigit(next_char)) { + // Hex-floats express their exponent as decimal. + written_exponent = static_cast(written_exponent * 10); + written_exponent = + static_cast(written_exponent + (next_char - '0')); + } else { + break; + } + is.get(); + next_char = is.peek(); + } + + written_exponent = static_cast(written_exponent * exponent_sign); + exponent = static_cast(exponent + written_exponent); + + bool is_zero = is_denorm && (fraction == 0); + if (is_denorm && !is_zero) { + fraction = static_cast(fraction << 1); + exponent = static_cast(exponent - 1); + } else if (is_zero) { + exponent = 0; + } + + if (exponent <= 0 && !is_zero) { + fraction = static_cast(fraction >> 1); + fraction |= static_cast(1) << HF::top_bit_left_shift; + } + + fraction = (fraction >> HF::fraction_right_shift) & HF::fraction_encode_mask; + + const int_type max_exponent = + SetBits::get; + + // Handle actual denorm numbers + while (exponent < 0 && !is_zero) { + fraction = static_cast(fraction >> 1); + exponent = static_cast(exponent + 1); + + fraction &= HF::fraction_encode_mask; + if (fraction == 0) { + // We have underflowed our fraction. We should clamp to zero. + is_zero = true; + exponent = 0; + } + } + + // We have overflowed so we should be inf/-inf. + if (exponent > max_exponent) { + exponent = max_exponent; + fraction = 0; + } + + uint_type output_bits = static_cast( + static_cast(negate_value ? 1 : 0) << HF::top_bit_left_shift); + output_bits |= fraction; + + uint_type shifted_exponent = static_cast( + static_cast(exponent << HF::exponent_left_shift) & + HF::exponent_mask); + output_bits |= shifted_exponent; + + T output_float = spvutils::BitwiseCast(output_bits); + value.set_value(output_float); + + return is; +} + +// Writes a FloatProxy value to a stream. +// Zero and normal numbers are printed in the usual notation, but with +// enough digits to fully reproduce the value. Other values (subnormal, +// NaN, and infinity) are printed as a hex float. +template +std::ostream& operator<<(std::ostream& os, const FloatProxy& value) { + auto float_val = value.getAsFloat(); + switch (std::fpclassify(float_val)) { + case FP_ZERO: + case FP_NORMAL: { + auto saved_precision = os.precision(); + os.precision(std::numeric_limits::digits10); + os << float_val; + os.precision(saved_precision); + } break; + default: + os << HexFloat>(value); + break; + } + return os; +} + +template <> +inline std::ostream& operator<<(std::ostream& os, + const FloatProxy& value) { + os << HexFloat>(value); + return os; +} +} + +#endif // LIBSPIRV_UTIL_HEX_FLOAT_H_ diff --git a/Test/baseResults/spv.float16.frag.out b/Test/baseResults/spv.float16.frag.out new file mode 100644 index 0000000..3c5b781 --- /dev/null +++ b/Test/baseResults/spv.float16.frag.out @@ -0,0 +1,837 @@ +spv.float16.frag +Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. + + +Linked fragment stage: + + +// Module Version 10000 +// Generated by (magic number): 80001 +// Id's are bound by 535 + + Capability Shader + Capability Float16 + Capability Float64 + Capability Int64 + Capability DerivativeControl + Capability InterpolationFunction + Extension "SPV_AMD_gpu_shader_half_float" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 465 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_AMD_gpu_shader_half_float" + SourceExtension "GL_ARB_gpu_shader_int64" + Name 4 "main" + Name 6 "literal(" + Name 8 "operators(" + Name 10 "typeCast(" + Name 12 "builtinAngleTrigFuncs(" + Name 14 "builtinExpFuncs(" + Name 16 "builtinCommonFuncs(" + Name 18 "builtinPackUnpackFuncs(" + Name 20 "builtinGeometryFuncs(" + Name 22 "builtinMatrixFuncs(" + Name 24 "builtinVecRelFuncs(" + Name 26 "builtinFragProcFuncs(" + Name 31 "f16v" + Name 42 "f16v" + Name 64 "f16m" + Name 87 "f16" + Name 111 "b" + Name 153 "f16v" + Name 156 "bv" + Name 167 "fv" + Name 175 "dv" + Name 186 "iv" + Name 193 "uv" + Name 201 "i64v" + Name 209 "u64v" + Name 216 "f16v2" + Name 217 "f16v1" + Name 249 "f16v2" + Name 250 "f16v1" + Name 266 "f16v2" + Name 267 "f16v1" + Name 288 "f16" + Name 292 "f16v3" + Name 332 "bv" + Name 353 "b" + Name 363 "iv" + Name 364 "ResType" + Name 372 "u" + Name 373 "f16v" + Name 378 "f16" + Name 379 "f16v1" + Name 383 "f16v2" + Name 389 "f16v3" + Name 408 "f16m3" + Name 409 "f16m1" + Name 411 "f16m2" + Name 420 "f16v1" + Name 422 "f16v2" + Name 427 "f16m4" + Name 430 "f16" + Name 433 "f16m5" + Name 438 "f16m6" + Name 439 "f16m7" + Name 442 "bv" + Name 443 "f16v1" + Name 445 "f16v2" + Name 463 "f16v" + Name 465 "if16v" + Name 515 "S" + MemberName 515(S) 0 "x" + MemberName 515(S) 1 "y" + MemberName 515(S) 2 "z" + Name 517 "B1" + MemberName 517(B1) 0 "a" + MemberName 517(B1) 1 "b" + MemberName 517(B1) 2 "c" + MemberName 517(B1) 3 "d" + MemberName 517(B1) 4 "e" + MemberName 517(B1) 5 "f" + MemberName 517(B1) 6 "g" + MemberName 517(B1) 7 "h" + Name 519 "" + Name 522 "S" + MemberName 522(S) 0 "x" + MemberName 522(S) 1 "y" + MemberName 522(S) 2 "z" + Name 524 "B2" + MemberName 524(B2) 0 "o" + MemberName 524(B2) 1 "p" + MemberName 524(B2) 2 "q" + MemberName 524(B2) 3 "r" + MemberName 524(B2) 4 "s" + MemberName 524(B2) 5 "t" + MemberName 524(B2) 6 "u" + MemberName 524(B2) 7 "v" + Name 526 "" + Decorate 513 ArrayStride 16 + Decorate 514 ArrayStride 32 + MemberDecorate 515(S) 0 Offset 0 + MemberDecorate 515(S) 1 Offset 4 + MemberDecorate 515(S) 2 Offset 8 + Decorate 516 ArrayStride 16 + MemberDecorate 517(B1) 0 Offset 0 + MemberDecorate 517(B1) 1 Offset 4 + MemberDecorate 517(B1) 2 Offset 8 + MemberDecorate 517(B1) 3 Offset 16 + MemberDecorate 517(B1) 4 ColMajor + MemberDecorate 517(B1) 4 Offset 48 + MemberDecorate 517(B1) 4 MatrixStride 16 + MemberDecorate 517(B1) 5 ColMajor + MemberDecorate 517(B1) 5 Offset 80 + MemberDecorate 517(B1) 5 MatrixStride 16 + MemberDecorate 517(B1) 6 Offset 144 + MemberDecorate 517(B1) 7 Offset 160 + Decorate 517(B1) Block + Decorate 519 DescriptorSet 0 + Decorate 520 ArrayStride 2 + Decorate 521 ArrayStride 12 + MemberDecorate 522(S) 0 Offset 0 + MemberDecorate 522(S) 1 Offset 4 + MemberDecorate 522(S) 2 Offset 8 + Decorate 523 ArrayStride 16 + MemberDecorate 524(B2) 0 Offset 0 + MemberDecorate 524(B2) 1 Offset 4 + MemberDecorate 524(B2) 2 Offset 8 + MemberDecorate 524(B2) 3 Offset 14 + MemberDecorate 524(B2) 4 RowMajor + MemberDecorate 524(B2) 4 Offset 20 + MemberDecorate 524(B2) 4 MatrixStride 4 + MemberDecorate 524(B2) 5 RowMajor + MemberDecorate 524(B2) 5 Offset 32 + MemberDecorate 524(B2) 5 MatrixStride 4 + MemberDecorate 524(B2) 6 Offset 56 + MemberDecorate 524(B2) 7 Offset 72 + Decorate 524(B2) BufferBlock + Decorate 526 DescriptorSet 0 + Decorate 527 SpecId 100 + Decorate 528 SpecId 101 + Decorate 529 SpecId 102 + 2: TypeVoid + 3: TypeFunction 2 + 28: TypeFloat 16 + 29: TypeVector 28(float) 2 + 30: TypePointer Function 29(fvec2) + 32: 28(float) Constant 16 + 33: TypeInt 32 0 + 34: 33(int) Constant 0 + 35: TypePointer Function 28(float) + 37: 28(float) Constant 46080 + 38: 28(float) Constant 10158 + 39: 29(fvec2) ConstantComposite 37 38 + 56: 28(float) Constant 15360 + 62: TypeMatrix 29(fvec2) 2 + 63: TypePointer Function 62 + 90: 33(int) Constant 1 + 109: TypeBool + 110: TypePointer Function 109(bool) + 151: TypeVector 28(float) 3 + 152: TypePointer Function 151(fvec3) + 154: TypeVector 109(bool) 3 + 155: TypePointer Function 154(bvec3) + 158: 28(float) Constant 0 + 159: 151(fvec3) ConstantComposite 158 158 158 + 160: 151(fvec3) ConstantComposite 56 56 56 + 164: TypeFloat 32 + 165: TypeVector 164(float) 3 + 166: TypePointer Function 165(fvec3) + 172: TypeFloat 64 + 173: TypeVector 172(float) 3 + 174: TypePointer Function 173(fvec3) + 183: TypeInt 32 1 + 184: TypeVector 183(int) 3 + 185: TypePointer Function 184(ivec3) + 191: TypeVector 33(int) 3 + 192: TypePointer Function 191(ivec3) + 198: TypeInt 64 1 + 199: TypeVector 198(int) 3 + 200: TypePointer Function 199(ivec3) + 206: TypeInt 64 0 + 207: TypeVector 206(int) 3 + 208: TypePointer Function 207(ivec3) + 214: TypeVector 28(float) 4 + 215: TypePointer Function 214(fvec4) + 364(ResType): TypeStruct 151(fvec3) 184(ivec3) + 371: TypePointer Function 33(int) + 406: TypeMatrix 151(fvec3) 2 + 407: TypePointer Function 406 + 425: TypeMatrix 29(fvec2) 3 + 426: TypePointer Function 425 + 431: TypeMatrix 151(fvec3) 3 + 432: TypePointer Function 431 + 436: TypeMatrix 214(fvec4) 4 + 437: TypePointer Function 436 + 464: TypePointer Input 151(fvec3) + 465(if16v): 464(ptr) Variable Input + 466: TypePointer Input 28(float) + 503: 183(int) Constant 1 + 508: TypeVector 164(float) 2 + 509: 164(float) Constant 1056964608 + 510: 508(fvec2) ConstantComposite 509 509 + 512: 33(int) Constant 2 + 513: TypeArray 28(float) 512 + 514: TypeArray 406 512 + 515(S): TypeStruct 28(float) 29(fvec2) 151(fvec3) + 516: TypeArray 515(S) 512 + 517(B1): TypeStruct 28(float) 29(fvec2) 151(fvec3) 513 406 514 515(S) 516 + 518: TypePointer Uniform 517(B1) + 519: 518(ptr) Variable Uniform + 520: TypeArray 28(float) 512 + 521: TypeArray 406 512 + 522(S): TypeStruct 28(float) 29(fvec2) 151(fvec3) + 523: TypeArray 522(S) 512 + 524(B2): TypeStruct 28(float) 29(fvec2) 151(fvec3) 520 406 521 522(S) 523 + 525: TypePointer Uniform 524(B2) + 526: 525(ptr) Variable Uniform + 527: 28(float) SpecConstant 12288 + 528: 164(float) SpecConstant 1048576000 + 529: 172(float) SpecConstant 0 1071644672 + 530: 164(float) SpecConstantOp 115 527 + 531: 164(float) SpecConstantOp 115 527 + 532: 172(float) SpecConstantOp 115 531 + 533: 28(float) SpecConstantOp 115 528 + 534: 28(float) SpecConstantOp 115 529 + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd + 6(literal(): 2 Function None 3 + 7: Label + 31(f16v): 30(ptr) Variable Function + 36: 35(ptr) AccessChain 31(f16v) 34 + Store 36 32 + 40: 29(fvec2) Load 31(f16v) + 41: 29(fvec2) FAdd 40 39 + Store 31(f16v) 41 + Return + FunctionEnd + 8(operators(): 2 Function None 3 + 9: Label + 42(f16v): 30(ptr) Variable Function + 64(f16m): 63(ptr) Variable Function + 87(f16): 35(ptr) Variable Function + 111(b): 110(ptr) Variable Function + 43: 29(fvec2) Load 42(f16v) + 44: 29(fvec2) Load 42(f16v) + 45: 29(fvec2) FAdd 44 43 + Store 42(f16v) 45 + 46: 29(fvec2) Load 42(f16v) + 47: 29(fvec2) Load 42(f16v) + 48: 29(fvec2) FSub 47 46 + Store 42(f16v) 48 + 49: 29(fvec2) Load 42(f16v) + 50: 29(fvec2) Load 42(f16v) + 51: 29(fvec2) FMul 50 49 + Store 42(f16v) 51 + 52: 29(fvec2) Load 42(f16v) + 53: 29(fvec2) Load 42(f16v) + 54: 29(fvec2) FDiv 53 52 + Store 42(f16v) 54 + 55: 29(fvec2) Load 42(f16v) + 57: 29(fvec2) CompositeConstruct 56 56 + 58: 29(fvec2) FAdd 55 57 + Store 42(f16v) 58 + 59: 29(fvec2) Load 42(f16v) + 60: 29(fvec2) CompositeConstruct 56 56 + 61: 29(fvec2) FSub 59 60 + Store 42(f16v) 61 + 65: 62 Load 64(f16m) + 66: 29(fvec2) CompositeConstruct 56 56 + 67: 29(fvec2) CompositeExtract 65 0 + 68: 29(fvec2) FAdd 67 66 + 69: 29(fvec2) CompositeExtract 65 1 + 70: 29(fvec2) FAdd 69 66 + 71: 62 CompositeConstruct 68 70 + Store 64(f16m) 71 + 72: 62 Load 64(f16m) + 73: 29(fvec2) CompositeConstruct 56 56 + 74: 29(fvec2) CompositeExtract 72 0 + 75: 29(fvec2) FSub 74 73 + 76: 29(fvec2) CompositeExtract 72 1 + 77: 29(fvec2) FSub 76 73 + 78: 62 CompositeConstruct 75 77 + Store 64(f16m) 78 + 79: 29(fvec2) Load 42(f16v) + 80: 29(fvec2) FNegate 79 + Store 42(f16v) 80 + 81: 62 Load 64(f16m) + 82: 29(fvec2) CompositeExtract 81 0 + 83: 29(fvec2) FNegate 82 + 84: 29(fvec2) CompositeExtract 81 1 + 85: 29(fvec2) FNegate 84 + 86: 62 CompositeConstruct 83 85 + Store 64(f16m) 86 + 88: 35(ptr) AccessChain 42(f16v) 34 + 89: 28(float) Load 88 + 91: 35(ptr) AccessChain 42(f16v) 90 + 92: 28(float) Load 91 + 93: 28(float) FAdd 89 92 + Store 87(f16) 93 + 94: 35(ptr) AccessChain 42(f16v) 34 + 95: 28(float) Load 94 + 96: 35(ptr) AccessChain 42(f16v) 90 + 97: 28(float) Load 96 + 98: 28(float) FSub 95 97 + Store 87(f16) 98 + 99: 35(ptr) AccessChain 42(f16v) 34 + 100: 28(float) Load 99 + 101: 35(ptr) AccessChain 42(f16v) 90 + 102: 28(float) Load 101 + 103: 28(float) FMul 100 102 + Store 87(f16) 103 + 104: 35(ptr) AccessChain 42(f16v) 34 + 105: 28(float) Load 104 + 106: 35(ptr) AccessChain 42(f16v) 90 + 107: 28(float) Load 106 + 108: 28(float) FDiv 105 107 + Store 87(f16) 108 + 112: 35(ptr) AccessChain 42(f16v) 34 + 113: 28(float) Load 112 + 114: 28(float) Load 87(f16) + 115: 109(bool) FOrdNotEqual 113 114 + Store 111(b) 115 + 116: 35(ptr) AccessChain 42(f16v) 90 + 117: 28(float) Load 116 + 118: 28(float) Load 87(f16) + 119: 109(bool) FOrdEqual 117 118 + Store 111(b) 119 + 120: 35(ptr) AccessChain 42(f16v) 34 + 121: 28(float) Load 120 + 122: 28(float) Load 87(f16) + 123: 109(bool) FOrdGreaterThan 121 122 + Store 111(b) 123 + 124: 35(ptr) AccessChain 42(f16v) 90 + 125: 28(float) Load 124 + 126: 28(float) Load 87(f16) + 127: 109(bool) FOrdLessThan 125 126 + Store 111(b) 127 + 128: 35(ptr) AccessChain 42(f16v) 34 + 129: 28(float) Load 128 + 130: 28(float) Load 87(f16) + 131: 109(bool) FOrdGreaterThanEqual 129 130 + Store 111(b) 131 + 132: 35(ptr) AccessChain 42(f16v) 90 + 133: 28(float) Load 132 + 134: 28(float) Load 87(f16) + 135: 109(bool) FOrdLessThanEqual 133 134 + Store 111(b) 135 + 136: 29(fvec2) Load 42(f16v) + 137: 28(float) Load 87(f16) + 138: 29(fvec2) VectorTimesScalar 136 137 + Store 42(f16v) 138 + 139: 62 Load 64(f16m) + 140: 28(float) Load 87(f16) + 141: 62 MatrixTimesScalar 139 140 + Store 64(f16m) 141 + 142: 62 Load 64(f16m) + 143: 29(fvec2) Load 42(f16v) + 144: 29(fvec2) MatrixTimesVector 142 143 + Store 42(f16v) 144 + 145: 29(fvec2) Load 42(f16v) + 146: 62 Load 64(f16m) + 147: 29(fvec2) VectorTimesMatrix 145 146 + Store 42(f16v) 147 + 148: 62 Load 64(f16m) + 149: 62 Load 64(f16m) + 150: 62 MatrixTimesMatrix 148 149 + Store 64(f16m) 150 + Return + FunctionEnd + 10(typeCast(): 2 Function None 3 + 11: Label + 153(f16v): 152(ptr) Variable Function + 156(bv): 155(ptr) Variable Function + 167(fv): 166(ptr) Variable Function + 175(dv): 174(ptr) Variable Function + 186(iv): 185(ptr) Variable Function + 193(uv): 192(ptr) Variable Function + 201(i64v): 200(ptr) Variable Function + 209(u64v): 208(ptr) Variable Function + 157: 154(bvec3) Load 156(bv) + 161: 151(fvec3) Select 157 160 159 + Store 153(f16v) 161 + 162: 151(fvec3) Load 153(f16v) + 163: 154(bvec3) FOrdNotEqual 162 159 + Store 156(bv) 163 + 168: 165(fvec3) Load 167(fv) + 169: 151(fvec3) FConvert 168 + Store 153(f16v) 169 + 170: 151(fvec3) Load 153(f16v) + 171: 165(fvec3) FConvert 170 + Store 167(fv) 171 + 176: 173(fvec3) Load 175(dv) + 177: 151(fvec3) FConvert 176 + Store 153(f16v) 177 + 178: 173(fvec3) Load 175(dv) + 179: 172(float) CompositeExtract 178 0 + 180: 172(float) CompositeExtract 178 1 + 181: 172(float) CompositeExtract 178 2 + 182: 173(fvec3) CompositeConstruct 179 180 181 + Store 175(dv) 182 + 187: 184(ivec3) Load 186(iv) + 188: 151(fvec3) ConvertSToF 187 + Store 153(f16v) 188 + 189: 151(fvec3) Load 153(f16v) + 190: 184(ivec3) ConvertFToS 189 + Store 186(iv) 190 + 194: 191(ivec3) Load 193(uv) + 195: 151(fvec3) ConvertUToF 194 + Store 153(f16v) 195 + 196: 151(fvec3) Load 153(f16v) + 197: 191(ivec3) ConvertFToU 196 + Store 193(uv) 197 + 202: 199(ivec3) Load 201(i64v) + 203: 151(fvec3) ConvertSToF 202 + Store 153(f16v) 203 + 204: 151(fvec3) Load 153(f16v) + 205: 199(ivec3) ConvertFToS 204 + Store 201(i64v) 205 + 210: 207(ivec3) Load 209(u64v) + 211: 151(fvec3) ConvertUToF 210 + Store 153(f16v) 211 + 212: 151(fvec3) Load 153(f16v) + 213: 207(ivec3) ConvertFToU 212 + Store 209(u64v) 213 + Return + FunctionEnd +12(builtinAngleTrigFuncs(): 2 Function None 3 + 13: Label + 216(f16v2): 215(ptr) Variable Function + 217(f16v1): 215(ptr) Variable Function + 218: 214(fvec4) Load 217(f16v1) + 219: 214(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 218 + Store 216(f16v2) 219 + 220: 214(fvec4) Load 217(f16v1) + 221: 214(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 220 + Store 216(f16v2) 221 + 222: 214(fvec4) Load 217(f16v1) + 223: 214(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 222 + Store 216(f16v2) 223 + 224: 214(fvec4) Load 217(f16v1) + 225: 214(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 224 + Store 216(f16v2) 225 + 226: 214(fvec4) Load 217(f16v1) + 227: 214(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 226 + Store 216(f16v2) 227 + 228: 214(fvec4) Load 217(f16v1) + 229: 214(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 228 + Store 216(f16v2) 229 + 230: 214(fvec4) Load 217(f16v1) + 231: 214(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 230 + Store 216(f16v2) 231 + 232: 214(fvec4) Load 217(f16v1) + 233: 214(fvec4) Load 216(f16v2) + 234: 214(fvec4) ExtInst 1(GLSL.std.450) 25(Atan2) 232 233 + Store 216(f16v2) 234 + 235: 214(fvec4) Load 217(f16v1) + 236: 214(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 235 + Store 216(f16v2) 236 + 237: 214(fvec4) Load 217(f16v1) + 238: 214(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 237 + Store 216(f16v2) 238 + 239: 214(fvec4) Load 217(f16v1) + 240: 214(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 239 + Store 216(f16v2) 240 + 241: 214(fvec4) Load 217(f16v1) + 242: 214(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 241 + Store 216(f16v2) 242 + 243: 214(fvec4) Load 217(f16v1) + 244: 214(fvec4) ExtInst 1(GLSL.std.450) 22(Asinh) 243 + Store 216(f16v2) 244 + 245: 214(fvec4) Load 217(f16v1) + 246: 214(fvec4) ExtInst 1(GLSL.std.450) 23(Acosh) 245 + Store 216(f16v2) 246 + 247: 214(fvec4) Load 217(f16v1) + 248: 214(fvec4) ExtInst 1(GLSL.std.450) 24(Atanh) 247 + Store 216(f16v2) 248 + Return + FunctionEnd +14(builtinExpFuncs(): 2 Function None 3 + 15: Label + 249(f16v2): 30(ptr) Variable Function + 250(f16v1): 30(ptr) Variable Function + 251: 29(fvec2) Load 250(f16v1) + 252: 29(fvec2) Load 249(f16v2) + 253: 29(fvec2) ExtInst 1(GLSL.std.450) 26(Pow) 251 252 + Store 249(f16v2) 253 + 254: 29(fvec2) Load 250(f16v1) + 255: 29(fvec2) ExtInst 1(GLSL.std.450) 27(Exp) 254 + Store 249(f16v2) 255 + 256: 29(fvec2) Load 250(f16v1) + 257: 29(fvec2) ExtInst 1(GLSL.std.450) 28(Log) 256 + Store 249(f16v2) 257 + 258: 29(fvec2) Load 250(f16v1) + 259: 29(fvec2) ExtInst 1(GLSL.std.450) 29(Exp2) 258 + Store 249(f16v2) 259 + 260: 29(fvec2) Load 250(f16v1) + 261: 29(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 260 + Store 249(f16v2) 261 + 262: 29(fvec2) Load 250(f16v1) + 263: 29(fvec2) ExtInst 1(GLSL.std.450) 31(Sqrt) 262 + Store 249(f16v2) 263 + 264: 29(fvec2) Load 250(f16v1) + 265: 29(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 264 + Store 249(f16v2) 265 + Return + FunctionEnd +16(builtinCommonFuncs(): 2 Function None 3 + 17: Label + 266(f16v2): 152(ptr) Variable Function + 267(f16v1): 152(ptr) Variable Function + 288(f16): 35(ptr) Variable Function + 292(f16v3): 152(ptr) Variable Function + 332(bv): 155(ptr) Variable Function + 353(b): 110(ptr) Variable Function + 363(iv): 185(ptr) Variable Function + 268: 151(fvec3) Load 267(f16v1) + 269: 151(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 268 + Store 266(f16v2) 269 + 270: 151(fvec3) Load 267(f16v1) + 271: 151(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 270 + Store 266(f16v2) 271 + 272: 151(fvec3) Load 267(f16v1) + 273: 151(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 272 + Store 266(f16v2) 273 + 274: 151(fvec3) Load 267(f16v1) + 275: 151(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 274 + Store 266(f16v2) 275 + 276: 151(fvec3) Load 267(f16v1) + 277: 151(fvec3) ExtInst 1(GLSL.std.450) 1(Round) 276 + Store 266(f16v2) 277 + 278: 151(fvec3) Load 267(f16v1) + 279: 151(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 278 + Store 266(f16v2) 279 + 280: 151(fvec3) Load 267(f16v1) + 281: 151(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 280 + Store 266(f16v2) 281 + 282: 151(fvec3) Load 267(f16v1) + 283: 151(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 282 + Store 266(f16v2) 283 + 284: 151(fvec3) Load 267(f16v1) + 285: 151(fvec3) Load 266(f16v2) + 286: 151(fvec3) FMod 284 285 + Store 266(f16v2) 286 + 287: 151(fvec3) Load 267(f16v1) + 289: 28(float) Load 288(f16) + 290: 151(fvec3) CompositeConstruct 289 289 289 + 291: 151(fvec3) FMod 287 290 + Store 266(f16v2) 291 + 293: 151(fvec3) Load 267(f16v1) + 294: 151(fvec3) ExtInst 1(GLSL.std.450) 35(Modf) 293 266(f16v2) + Store 292(f16v3) 294 + 295: 151(fvec3) Load 267(f16v1) + 296: 151(fvec3) Load 266(f16v2) + 297: 151(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 295 296 + Store 292(f16v3) 297 + 298: 151(fvec3) Load 267(f16v1) + 299: 28(float) Load 288(f16) + 300: 151(fvec3) CompositeConstruct 299 299 299 + 301: 151(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 298 300 + Store 292(f16v3) 301 + 302: 151(fvec3) Load 267(f16v1) + 303: 151(fvec3) Load 266(f16v2) + 304: 151(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 302 303 + Store 292(f16v3) 304 + 305: 151(fvec3) Load 267(f16v1) + 306: 28(float) Load 288(f16) + 307: 151(fvec3) CompositeConstruct 306 306 306 + 308: 151(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 305 307 + Store 292(f16v3) 308 + 309: 151(fvec3) Load 267(f16v1) + 310: 28(float) Load 288(f16) + 311: 35(ptr) AccessChain 266(f16v2) 34 + 312: 28(float) Load 311 + 313: 151(fvec3) CompositeConstruct 310 310 310 + 314: 151(fvec3) CompositeConstruct 312 312 312 + 315: 151(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 309 313 314 + Store 292(f16v3) 315 + 316: 151(fvec3) Load 267(f16v1) + 317: 151(fvec3) Load 266(f16v2) + 318: 28(float) Load 288(f16) + 319: 151(fvec3) CompositeConstruct 318 318 318 + 320: 151(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 316 317 319 + Store 292(f16v3) 320 + 321: 151(fvec3) Load 267(f16v1) + 322: 151(fvec3) Load 266(f16v2) + 323: 28(float) Load 288(f16) + 324: 151(fvec3) CompositeConstruct 323 323 323 + 325: 151(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 321 322 324 + Store 292(f16v3) 325 + 326: 151(fvec3) Load 267(f16v1) + 327: 151(fvec3) Load 266(f16v2) + 328: 151(fvec3) Load 292(f16v3) + 329: 151(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 326 327 328 + Store 292(f16v3) 329 + 330: 151(fvec3) Load 267(f16v1) + 331: 151(fvec3) Load 266(f16v2) + 333: 154(bvec3) Load 332(bv) + 334: 151(fvec3) Select 333 331 330 + Store 292(f16v3) 334 + 335: 151(fvec3) Load 267(f16v1) + 336: 151(fvec3) Load 266(f16v2) + 337: 151(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 335 336 + Store 292(f16v3) 337 + 338: 28(float) Load 288(f16) + 339: 151(fvec3) Load 292(f16v3) + 340: 151(fvec3) CompositeConstruct 338 338 338 + 341: 151(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 340 339 + Store 292(f16v3) 341 + 342: 151(fvec3) Load 267(f16v1) + 343: 151(fvec3) Load 266(f16v2) + 344: 151(fvec3) Load 292(f16v3) + 345: 151(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 342 343 344 + Store 292(f16v3) 345 + 346: 28(float) Load 288(f16) + 347: 35(ptr) AccessChain 267(f16v1) 34 + 348: 28(float) Load 347 + 349: 151(fvec3) Load 266(f16v2) + 350: 151(fvec3) CompositeConstruct 346 346 346 + 351: 151(fvec3) CompositeConstruct 348 348 348 + 352: 151(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 350 351 349 + Store 292(f16v3) 352 + 354: 28(float) Load 288(f16) + 355: 109(bool) IsNan 354 + Store 353(b) 355 + 356: 151(fvec3) Load 267(f16v1) + 357: 154(bvec3) IsInf 356 + Store 332(bv) 357 + 358: 151(fvec3) Load 267(f16v1) + 359: 151(fvec3) Load 266(f16v2) + 360: 151(fvec3) Load 292(f16v3) + 361: 151(fvec3) ExtInst 1(GLSL.std.450) 50(Fma) 358 359 360 + Store 292(f16v3) 361 + 362: 151(fvec3) Load 267(f16v1) + 365:364(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 362 + 366: 184(ivec3) CompositeExtract 365 1 + Store 363(iv) 366 + 367: 151(fvec3) CompositeExtract 365 0 + Store 266(f16v2) 367 + 368: 151(fvec3) Load 267(f16v1) + 369: 184(ivec3) Load 363(iv) + 370: 151(fvec3) ExtInst 1(GLSL.std.450) 53(Ldexp) 368 369 + Store 266(f16v2) 370 + Return + FunctionEnd +18(builtinPackUnpackFuncs(): 2 Function None 3 + 19: Label + 372(u): 371(ptr) Variable Function + 373(f16v): 30(ptr) Variable Function + 374: 29(fvec2) Load 373(f16v) + 375: 33(int) Bitcast 374 + Store 372(u) 375 + 376: 33(int) Load 372(u) + 377: 29(fvec2) Bitcast 376 + Store 373(f16v) 377 + Return + FunctionEnd +20(builtinGeometryFuncs(): 2 Function None 3 + 21: Label + 378(f16): 35(ptr) Variable Function + 379(f16v1): 152(ptr) Variable Function + 383(f16v2): 152(ptr) Variable Function + 389(f16v3): 152(ptr) Variable Function + 380: 151(fvec3) Load 379(f16v1) + 381: 28(float) ExtInst 1(GLSL.std.450) 66(Length) 380 + Store 378(f16) 381 + 382: 151(fvec3) Load 379(f16v1) + 384: 151(fvec3) Load 383(f16v2) + 385: 28(float) ExtInst 1(GLSL.std.450) 67(Distance) 382 384 + Store 378(f16) 385 + 386: 151(fvec3) Load 379(f16v1) + 387: 151(fvec3) Load 383(f16v2) + 388: 28(float) Dot 386 387 + Store 378(f16) 388 + 390: 151(fvec3) Load 379(f16v1) + 391: 151(fvec3) Load 383(f16v2) + 392: 151(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 390 391 + Store 389(f16v3) 392 + 393: 151(fvec3) Load 379(f16v1) + 394: 151(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 393 + Store 383(f16v2) 394 + 395: 151(fvec3) Load 379(f16v1) + 396: 151(fvec3) Load 383(f16v2) + 397: 151(fvec3) Load 389(f16v3) + 398: 151(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 395 396 397 + Store 389(f16v3) 398 + 399: 151(fvec3) Load 379(f16v1) + 400: 151(fvec3) Load 383(f16v2) + 401: 151(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 399 400 + Store 389(f16v3) 401 + 402: 151(fvec3) Load 379(f16v1) + 403: 151(fvec3) Load 383(f16v2) + 404: 28(float) Load 378(f16) + 405: 151(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 402 403 404 + Store 389(f16v3) 405 + Return + FunctionEnd +22(builtinMatrixFuncs(): 2 Function None 3 + 23: Label + 408(f16m3): 407(ptr) Variable Function + 409(f16m1): 407(ptr) Variable Function + 411(f16m2): 407(ptr) Variable Function + 420(f16v1): 152(ptr) Variable Function + 422(f16v2): 30(ptr) Variable Function + 427(f16m4): 426(ptr) Variable Function + 430(f16): 35(ptr) Variable Function + 433(f16m5): 432(ptr) Variable Function + 438(f16m6): 437(ptr) Variable Function + 439(f16m7): 437(ptr) Variable Function + 410: 406 Load 409(f16m1) + 412: 406 Load 411(f16m2) + 413: 151(fvec3) CompositeExtract 410 0 + 414: 151(fvec3) CompositeExtract 412 0 + 415: 151(fvec3) FMul 413 414 + 416: 151(fvec3) CompositeExtract 410 1 + 417: 151(fvec3) CompositeExtract 412 1 + 418: 151(fvec3) FMul 416 417 + 419: 406 CompositeConstruct 415 418 + Store 408(f16m3) 419 + 421: 151(fvec3) Load 420(f16v1) + 423: 29(fvec2) Load 422(f16v2) + 424: 406 OuterProduct 421 423 + Store 409(f16m1) 424 + 428: 406 Load 409(f16m1) + 429: 425 Transpose 428 + Store 427(f16m4) 429 + 434: 431 Load 433(f16m5) + 435: 28(float) ExtInst 1(GLSL.std.450) 33(Determinant) 434 + Store 430(f16) 435 + 440: 436 Load 439(f16m7) + 441: 436 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 440 + Store 438(f16m6) 441 + Return + FunctionEnd +24(builtinVecRelFuncs(): 2 Function None 3 + 25: Label + 442(bv): 155(ptr) Variable Function + 443(f16v1): 152(ptr) Variable Function + 445(f16v2): 152(ptr) Variable Function + 444: 151(fvec3) Load 443(f16v1) + 446: 151(fvec3) Load 445(f16v2) + 447: 154(bvec3) FOrdLessThan 444 446 + Store 442(bv) 447 + 448: 151(fvec3) Load 443(f16v1) + 449: 151(fvec3) Load 445(f16v2) + 450: 154(bvec3) FOrdLessThanEqual 448 449 + Store 442(bv) 450 + 451: 151(fvec3) Load 443(f16v1) + 452: 151(fvec3) Load 445(f16v2) + 453: 154(bvec3) FOrdGreaterThan 451 452 + Store 442(bv) 453 + 454: 151(fvec3) Load 443(f16v1) + 455: 151(fvec3) Load 445(f16v2) + 456: 154(bvec3) FOrdGreaterThanEqual 454 455 + Store 442(bv) 456 + 457: 151(fvec3) Load 443(f16v1) + 458: 151(fvec3) Load 445(f16v2) + 459: 154(bvec3) FOrdEqual 457 458 + Store 442(bv) 459 + 460: 151(fvec3) Load 443(f16v1) + 461: 151(fvec3) Load 445(f16v2) + 462: 154(bvec3) FOrdNotEqual 460 461 + Store 442(bv) 462 + Return + FunctionEnd +26(builtinFragProcFuncs(): 2 Function None 3 + 27: Label + 463(f16v): 152(ptr) Variable Function + 467: 466(ptr) AccessChain 465(if16v) 34 + 468: 28(float) Load 467 + 469: 28(float) DPdx 468 + 470: 35(ptr) AccessChain 463(f16v) 34 + Store 470 469 + 471: 466(ptr) AccessChain 465(if16v) 90 + 472: 28(float) Load 471 + 473: 28(float) DPdy 472 + 474: 35(ptr) AccessChain 463(f16v) 90 + Store 474 473 + 475: 151(fvec3) Load 465(if16v) + 476: 29(fvec2) VectorShuffle 475 475 0 1 + 477: 29(fvec2) DPdxFine 476 + 478: 151(fvec3) Load 463(f16v) + 479: 151(fvec3) VectorShuffle 478 477 3 4 2 + Store 463(f16v) 479 + 480: 151(fvec3) Load 465(if16v) + 481: 29(fvec2) VectorShuffle 480 480 0 1 + 482: 29(fvec2) DPdyFine 481 + 483: 151(fvec3) Load 463(f16v) + 484: 151(fvec3) VectorShuffle 483 482 3 4 2 + Store 463(f16v) 484 + 485: 151(fvec3) Load 465(if16v) + 486: 151(fvec3) DPdxCoarse 485 + Store 463(f16v) 486 + 487: 151(fvec3) Load 465(if16v) + 488: 151(fvec3) DPdxCoarse 487 + Store 463(f16v) 488 + 489: 466(ptr) AccessChain 465(if16v) 34 + 490: 28(float) Load 489 + 491: 28(float) Fwidth 490 + 492: 35(ptr) AccessChain 463(f16v) 34 + Store 492 491 + 493: 151(fvec3) Load 465(if16v) + 494: 29(fvec2) VectorShuffle 493 493 0 1 + 495: 29(fvec2) FwidthFine 494 + 496: 151(fvec3) Load 463(f16v) + 497: 151(fvec3) VectorShuffle 496 495 3 4 2 + Store 463(f16v) 497 + 498: 151(fvec3) Load 465(if16v) + 499: 151(fvec3) FwidthCoarse 498 + Store 463(f16v) 499 + 500: 466(ptr) AccessChain 465(if16v) 34 + 501: 28(float) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 500 + 502: 35(ptr) AccessChain 463(f16v) 34 + Store 502 501 + 504: 151(fvec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 465(if16v) 503 + 505: 29(fvec2) VectorShuffle 504 504 0 1 + 506: 151(fvec3) Load 463(f16v) + 507: 151(fvec3) VectorShuffle 506 505 3 4 2 + Store 463(f16v) 507 + 511: 151(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 465(if16v) 510 + Store 463(f16v) 511 + Return + FunctionEnd diff --git a/Test/spv.float16.frag b/Test/spv.float16.frag new file mode 100644 index 0000000..a88e2f1 --- /dev/null +++ b/Test/spv.float16.frag @@ -0,0 +1,306 @@ +#version 450 core + +#extension GL_AMD_gpu_shader_half_float: enable +#extension GL_ARB_gpu_shader_int64: enable + +void main() +{ +} + +// Half float literals +void literal() +{ + const float16_t f16c = 0.000001hf; + const f16vec2 f16cv = f16vec2(-0.25HF, 0.03HF); + + f16vec2 f16v; + f16v.x = f16c; + f16v += f16cv; +} + +// Block memory layout +struct S +{ + float16_t x; // rule 1: align = 2, takes offsets 0-1 + f16vec2 y; // rule 2: align = 4, takes offsets 4-7 + f16vec3 z; // rule 3: align = 8, takes offsets 8-13 +}; + +layout(column_major, std140) uniform B1 +{ + float16_t a; // rule 1: align = 2, takes offsets 0-1 + f16vec2 b; // rule 2: align = 4, takes offsets 4-7 + f16vec3 c; // rule 3: align = 8, takes offsets 8-15 + float16_t d[2]; // rule 4: align = 16, array stride = 16, + // takes offsets 16-47 + f16mat2x3 e; // rule 5: align = 16, matrix stride = 16, + // takes offsets 48-79 + f16mat2x3 f[2]; // rule 6: align = 16, matrix stride = 16, + // array stride = 32, f[0] takes + // offsets 80-111, f[1] takes offsets + // 112-143 + S g; // rule 9: align = 16, g.x takes offsets + // 144-145, g.y takes offsets 148-151, + // g.z takes offsets 152-159 + S h[2]; // rule 10: align = 16, array stride = 16, h[0] + // takes offsets 160-175, h[1] takes + // offsets 176-191 +}; + +layout(row_major, std430) buffer B2 +{ + float16_t o; // rule 1: align = 2, takes offsets 0-1 + f16vec2 p; // rule 2: align = 4, takes offsets 4-7 + f16vec3 q; // rule 3: align = 8, takes offsets 8-13 + float16_t r[2]; // rule 4: align = 2, array stride = 2, takes + // offsets 14-17 + f16mat2x3 s; // rule 7: align = 4, matrix stride = 4, takes + // offsets 20-31 + f16mat2x3 t[2]; // rule 8: align = 4, matrix stride = 4, array + // stride = 12, t[0] takes offsets + // 32-43, t[1] takes offsets 44-55 + S u; // rule 9: align = 8, u.x takes offsets + // 56-57, u.y takes offsets 60-63, u.z + // takes offsets 64-69 + S v[2]; // rule 10: align = 8, array stride = 16, v[0] + // takes offsets 72-87, v[1] takes + // offsets 88-103 +}; + +// Specialization constant +layout(constant_id = 100) const float16_t sf16 = 0.125hf; +layout(constant_id = 101) const float sf = 0.25; +layout(constant_id = 102) const double sd = 0.5lf; + +const float f16_to_f = float(sf16); +const double f16_to_d = float(sf16); + +const float16_t f_to_f16 = float16_t(sf); +const float16_t d_to_f16 = float16_t(sd); + +void operators() +{ + float16_t f16; + f16vec2 f16v; + f16mat2x2 f16m; + bool b; + + // Arithmetic + f16v += f16v; + f16v -= f16v; + f16v *= f16v; + f16v /= f16v; + f16v++; + f16v--; + ++f16m; + --f16m; + f16v = -f16v; + f16m = -f16m; + + f16 = f16v.x + f16v.y; + f16 = f16v.x - f16v.y; + f16 = f16v.x * f16v.y; + f16 = f16v.x / f16v.y; + + // Relational + b = (f16v.x != f16); + b = (f16v.y == f16); + b = (f16v.x > f16); + b = (f16v.y < f16); + b = (f16v.x >= f16); + b = (f16v.y <= f16); + + // Vector/matrix operations + f16v = f16v * f16; + f16m = f16m * f16; + f16v = f16m * f16v; + f16v = f16v * f16m; + f16m = f16m * f16m; +} + +void typeCast() +{ + bvec3 bv; + vec3 fv; + dvec3 dv; + ivec3 iv; + uvec3 uv; + i64vec3 i64v; + u64vec3 u64v; + + f16vec3 f16v; + + f16v = f16vec3(bv); // bool -> float16 + bv = bvec3(f16v); // float16 -> bool + + f16v = f16vec3(fv); // float -> float16 + fv = vec3(f16v); // float16 -> float + + f16v = f16vec3(dv); // double -> float16 + dv = dvec3(dv); // float16 -> double + + f16v = f16vec3(iv); // int -> float16 + iv = ivec3(f16v); // float16 -> int + + f16v = f16vec3(uv); // uint -> float16 + uv = uvec3(f16v); // float16 -> uint + + f16v = f16vec3(i64v); // int64 -> float16 + i64v = i64vec3(f16v); // float16 -> int64 + + f16v = f16vec3(u64v); // uint64 -> float16 + u64v = u64vec3(f16v); // float16 -> uint64 +} + +void builtinAngleTrigFuncs() +{ + f16vec4 f16v1, f16v2; + + f16v2 = radians(f16v1); + f16v2 = degrees(f16v1); + f16v2 = sin(f16v1); + f16v2 = cos(f16v1); + f16v2 = tan(f16v1); + f16v2 = asin(f16v1); + f16v2 = acos(f16v1); + f16v2 = atan(f16v1, f16v2); + f16v2 = atan(f16v1); + f16v2 = sinh(f16v1); + f16v2 = cosh(f16v1); + f16v2 = tanh(f16v1); + f16v2 = asinh(f16v1); + f16v2 = acosh(f16v1); + f16v2 = atanh(f16v1); +} + +void builtinExpFuncs() +{ + f16vec2 f16v1, f16v2; + + f16v2 = pow(f16v1, f16v2); + f16v2 = exp(f16v1); + f16v2 = log(f16v1); + f16v2 = exp2(f16v1); + f16v2 = log2(f16v1); + f16v2 = sqrt(f16v1); + f16v2 = inversesqrt(f16v1); +} + +void builtinCommonFuncs() +{ + f16vec3 f16v1, f16v2, f16v3; + float16_t f16; + bool b; + bvec3 bv; + ivec3 iv; + + f16v2 = abs(f16v1); + f16v2 = sign(f16v1); + f16v2 = floor(f16v1); + f16v2 = trunc(f16v1); + f16v2 = round(f16v1); + f16v2 = roundEven(f16v1); + f16v2 = ceil(f16v1); + f16v2 = fract(f16v1); + f16v2 = mod(f16v1, f16v2); + f16v2 = mod(f16v1, f16); + f16v3 = modf(f16v1, f16v2); + f16v3 = min(f16v1, f16v2); + f16v3 = min(f16v1, f16); + f16v3 = max(f16v1, f16v2); + f16v3 = max(f16v1, f16); + f16v3 = clamp(f16v1, f16, f16v2.x); + f16v3 = clamp(f16v1, f16v2, f16vec3(f16)); + f16v3 = mix(f16v1, f16v2, f16); + f16v3 = mix(f16v1, f16v2, f16v3); + f16v3 = mix(f16v1, f16v2, bv); + f16v3 = step(f16v1, f16v2); + f16v3 = step(f16, f16v3); + f16v3 = smoothstep(f16v1, f16v2, f16v3); + f16v3 = smoothstep(f16, f16v1.x, f16v2); + b = isnan(f16); + bv = isinf(f16v1); + f16v3 = fma(f16v1, f16v2, f16v3); + f16v2 = frexp(f16v1, iv); + f16v2 = ldexp(f16v1, iv); +} + +void builtinPackUnpackFuncs() +{ + uint u; + f16vec2 f16v; + + u = packFloat2x16(f16v); + f16v = unpackFloat2x16(u); +} + +void builtinGeometryFuncs() +{ + float16_t f16; + f16vec3 f16v1, f16v2, f16v3; + + f16 = length(f16v1); + f16 = distance(f16v1, f16v2); + f16 = dot(f16v1, f16v2); + f16v3 = cross(f16v1, f16v2); + f16v2 = normalize(f16v1); + f16v3 = faceforward(f16v1, f16v2, f16v3); + f16v3 = reflect(f16v1, f16v2); + f16v3 = refract(f16v1, f16v2, f16); +} + +void builtinMatrixFuncs() +{ + f16mat2x3 f16m1, f16m2, f16m3; + f16mat3x2 f16m4; + f16mat3 f16m5; + f16mat4 f16m6, f16m7; + + f16vec3 f16v1; + f16vec2 f16v2; + + float16_t f16; + + f16m3 = matrixCompMult(f16m1, f16m2); + f16m1 = outerProduct(f16v1, f16v2); + f16m4 = transpose(f16m1); + f16 = determinant(f16m5); + f16m6 = inverse(f16m7); +} + +void builtinVecRelFuncs() +{ + f16vec3 f16v1, f16v2; + bvec3 bv; + + bv = lessThan(f16v1, f16v2); + bv = lessThanEqual(f16v1, f16v2); + bv = greaterThan(f16v1, f16v2); + bv = greaterThanEqual(f16v1, f16v2); + bv = equal(f16v1, f16v2); + bv = notEqual(f16v1, f16v2); +} + +in f16vec3 if16v; + +void builtinFragProcFuncs() +{ + f16vec3 f16v; + + // Derivative + f16v.x = dFdx(if16v.x); + f16v.y = dFdy(if16v.y); + f16v.xy = dFdxFine(if16v.xy); + f16v.xy = dFdyFine(if16v.xy); + f16v = dFdxCoarse(if16v); + f16v = dFdxCoarse(if16v); + + f16v.x = fwidth(if16v.x); + f16v.xy = fwidthFine(if16v.xy); + f16v = fwidthCoarse(if16v); + + // Interpolation + f16v.x = interpolateAtCentroid(if16v.x); + f16v.xy = interpolateAtSample(if16v.xy, 1); + f16v = interpolateAtOffset(if16v, vec2(0.5)); +} diff --git a/glslang/Include/BaseTypes.h b/glslang/Include/BaseTypes.h index 64ef80c..f707440 100644 --- a/glslang/Include/BaseTypes.h +++ b/glslang/Include/BaseTypes.h @@ -46,6 +46,9 @@ enum TBasicType { EbtVoid, EbtFloat, EbtDouble, +#ifdef AMD_EXTENSIONS + EbtFloat16, +#endif EbtInt, EbtUint, EbtInt64, diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 6c2ded8..5aa59c6 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -185,8 +185,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, case EbtFloat: break; case EbtInt: s.append("i"); break; case EbtUint: s.append("u"); break; - case EbtInt64: s.append("i64"); break; - case EbtUint64: s.append("u64"); break; default: break; // some compilers want this } if (image) { @@ -1277,7 +1275,11 @@ public: virtual bool isImplicitlySizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage != EvqBuffer; } virtual bool isRuntimeSizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage == EvqBuffer; } virtual bool isStruct() const { return structure != nullptr; } +#ifdef AMD_EXTENSIONS + virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; } +#else virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; } +#endif virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; } @@ -1359,6 +1361,9 @@ public: case EbtVoid: case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif case EbtInt: case EbtUint: case EbtInt64: @@ -1451,6 +1456,9 @@ public: case EbtVoid: return "void"; case EbtFloat: return "float"; case EbtDouble: return "double"; +#ifdef AMD_EXTENSIONS + case EbtFloat16: return "float16_t"; +#endif case EbtInt: return "int"; case EbtUint: return "uint"; case EbtInt64: return "int64_t"; diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 5166e3d..27c798d 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -119,6 +119,22 @@ enum TOperator { EOpConvFloatToUint64, EOpConvDoubleToUint64, EOpConvInt64ToUint64, +#ifdef AMD_EXTENSIONS + EOpConvBoolToFloat16, + EOpConvIntToFloat16, + EOpConvUintToFloat16, + EOpConvFloatToFloat16, + EOpConvDoubleToFloat16, + EOpConvInt64ToFloat16, + EOpConvUint64ToFloat16, + EOpConvFloat16ToBool, + EOpConvFloat16ToInt, + EOpConvFloat16ToUint, + EOpConvFloat16ToFloat, + EOpConvFloat16ToDouble, + EOpConvFloat16ToInt64, + EOpConvFloat16ToUint64, +#endif // // binary operations @@ -236,6 +252,10 @@ enum TOperator { EOpUnpackInt2x32, EOpPackUint2x32, EOpUnpackUint2x32, +#ifdef AMD_EXTENSIONS + EOpPackFloat2x16, + EOpUnpackFloat2x16, +#endif EOpLength, EOpDistance, @@ -396,6 +416,21 @@ enum TOperator { EOpConstructDMat4x2, EOpConstructDMat4x3, EOpConstructDMat4x4, +#ifdef AMD_EXTENSIONS + EOpConstructFloat16, + EOpConstructF16Vec2, + EOpConstructF16Vec3, + EOpConstructF16Vec4, + EOpConstructF16Mat2x2, + EOpConstructF16Mat2x3, + EOpConstructF16Mat2x4, + EOpConstructF16Mat3x2, + EOpConstructF16Mat3x3, + EOpConstructF16Mat3x4, + EOpConstructF16Mat4x2, + EOpConstructF16Mat4x3, + EOpConstructF16Mat4x4, +#endif EOpConstructStruct, EOpConstructTextureSampler, EOpConstructGuardEnd, diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp index 4adfd47..804626f 100644 --- a/glslang/MachineIndependent/Constant.cpp +++ b/glslang/MachineIndependent/Constant.cpp @@ -176,6 +176,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right switch (getType().getBasicType()) { case EbtDouble: case EbtFloat: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif newConstArray[i].setDConst(leftUnionArray[i].getDConst() / rightUnionArray[i].getDConst()); break; @@ -450,6 +453,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpNegative: switch (getType().getBasicType()) { case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break; case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break; case EbtUint: newConstArray[i].setUConst(static_cast(-static_cast(unionArray[i].getUConst()))); break; @@ -688,6 +694,9 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) // Second, do the actual folding bool isFloatingPoint = children[0]->getAsTyped()->getBasicType() == EbtFloat || +#ifdef AMD_EXTENSIONS + children[0]->getAsTyped()->getBasicType() == EbtFloat16 || +#endif children[0]->getAsTyped()->getBasicType() == EbtDouble; bool isSigned = children[0]->getAsTyped()->getBasicType() == EbtInt || children[0]->getAsTyped()->getBasicType() == EbtInt64; diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 9578d45..0cead64 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -85,8 +85,6 @@ TBuiltIns::TBuiltIns() prefixes[EbtFloat] = ""; prefixes[EbtInt] = "i"; prefixes[EbtUint] = "u"; - prefixes[EbtInt64] = "i64"; - prefixes[EbtUint64] = "u64"; postfixes[2] = "2"; postfixes[3] = "3"; postfixes[4] = "4"; @@ -875,6 +873,21 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "uvec3 mid3(uvec3, uvec3, uvec3);" "uvec4 mid3(uvec4, uvec4, uvec4);" + "float16_t min3(float16_t, float16_t, float16_t);" + "f16vec2 min3(f16vec2, f16vec2, f16vec2);" + "f16vec3 min3(f16vec3, f16vec3, f16vec3);" + "f16vec4 min3(f16vec4, f16vec4, f16vec4);" + + "float16_t max3(float16_t, float16_t, float16_t);" + "f16vec2 max3(f16vec2, f16vec2, f16vec2);" + "f16vec3 max3(f16vec3, f16vec3, f16vec3);" + "f16vec4 max3(f16vec4, f16vec4, f16vec4);" + + "float16_t mid3(float16_t, float16_t, float16_t);" + "f16vec2 mid3(f16vec2, f16vec2, f16vec2);" + "f16vec3 mid3(f16vec3, f16vec3, f16vec3);" + "f16vec4 mid3(f16vec4, f16vec4, f16vec4);" + "\n" ); } @@ -1709,6 +1722,354 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + + // GL_AMD_gpu_shader_half_float + if (profile != EEsProfile && version >= 450) { + commonBuiltins.append( + "float16_t radians(float16_t);" + "f16vec2 radians(f16vec2);" + "f16vec3 radians(f16vec3);" + "f16vec4 radians(f16vec4);" + + "float16_t degrees(float16_t);" + "f16vec2 degrees(f16vec2);" + "f16vec3 degrees(f16vec3);" + "f16vec4 degrees(f16vec4);" + + "float16_t sin(float16_t);" + "f16vec2 sin(f16vec2);" + "f16vec3 sin(f16vec3);" + "f16vec4 sin(f16vec4);" + + "float16_t cos(float16_t);" + "f16vec2 cos(f16vec2);" + "f16vec3 cos(f16vec3);" + "f16vec4 cos(f16vec4);" + + "float16_t tan(float16_t);" + "f16vec2 tan(f16vec2);" + "f16vec3 tan(f16vec3);" + "f16vec4 tan(f16vec4);" + + "float16_t asin(float16_t);" + "f16vec2 asin(f16vec2);" + "f16vec3 asin(f16vec3);" + "f16vec4 asin(f16vec4);" + + "float16_t acos(float16_t);" + "f16vec2 acos(f16vec2);" + "f16vec3 acos(f16vec3);" + "f16vec4 acos(f16vec4);" + + "float16_t atan(float16_t, float16_t);" + "f16vec2 atan(f16vec2, f16vec2);" + "f16vec3 atan(f16vec3, f16vec3);" + "f16vec4 atan(f16vec4, f16vec4);" + + "float16_t atan(float16_t);" + "f16vec2 atan(f16vec2);" + "f16vec3 atan(f16vec3);" + "f16vec4 atan(f16vec4);" + + "float16_t sinh(float16_t);" + "f16vec2 sinh(f16vec2);" + "f16vec3 sinh(f16vec3);" + "f16vec4 sinh(f16vec4);" + + "float16_t cosh(float16_t);" + "f16vec2 cosh(f16vec2);" + "f16vec3 cosh(f16vec3);" + "f16vec4 cosh(f16vec4);" + + "float16_t tanh(float16_t);" + "f16vec2 tanh(f16vec2);" + "f16vec3 tanh(f16vec3);" + "f16vec4 tanh(f16vec4);" + + "float16_t asinh(float16_t);" + "f16vec2 asinh(f16vec2);" + "f16vec3 asinh(f16vec3);" + "f16vec4 asinh(f16vec4);" + + "float16_t acosh(float16_t);" + "f16vec2 acosh(f16vec2);" + "f16vec3 acosh(f16vec3);" + "f16vec4 acosh(f16vec4);" + + "float16_t atanh(float16_t);" + "f16vec2 atanh(f16vec2);" + "f16vec3 atanh(f16vec3);" + "f16vec4 atanh(f16vec4);" + + "float16_t pow(float16_t, float16_t);" + "f16vec2 pow(f16vec2, f16vec2);" + "f16vec3 pow(f16vec3, f16vec3);" + "f16vec4 pow(f16vec4, f16vec4);" + + "float16_t exp(float16_t);" + "f16vec2 exp(f16vec2);" + "f16vec3 exp(f16vec3);" + "f16vec4 exp(f16vec4);" + + "float16_t log(float16_t);" + "f16vec2 log(f16vec2);" + "f16vec3 log(f16vec3);" + "f16vec4 log(f16vec4);" + + "float16_t exp2(float16_t);" + "f16vec2 exp2(f16vec2);" + "f16vec3 exp2(f16vec3);" + "f16vec4 exp2(f16vec4);" + + "float16_t log2(float16_t);" + "f16vec2 log2(f16vec2);" + "f16vec3 log2(f16vec3);" + "f16vec4 log2(f16vec4);" + + "float16_t sqrt(float16_t);" + "f16vec2 sqrt(f16vec2);" + "f16vec3 sqrt(f16vec3);" + "f16vec4 sqrt(f16vec4);" + + "float16_t inversesqrt(float16_t);" + "f16vec2 inversesqrt(f16vec2);" + "f16vec3 inversesqrt(f16vec3);" + "f16vec4 inversesqrt(f16vec4);" + + "float16_t abs(float16_t);" + "f16vec2 abs(f16vec2);" + "f16vec3 abs(f16vec3);" + "f16vec4 abs(f16vec4);" + + "float16_t sign(float16_t);" + "f16vec2 sign(f16vec2);" + "f16vec3 sign(f16vec3);" + "f16vec4 sign(f16vec4);" + + "float16_t floor(float16_t);" + "f16vec2 floor(f16vec2);" + "f16vec3 floor(f16vec3);" + "f16vec4 floor(f16vec4);" + + "float16_t trunc(float16_t);" + "f16vec2 trunc(f16vec2);" + "f16vec3 trunc(f16vec3);" + "f16vec4 trunc(f16vec4);" + + "float16_t round(float16_t);" + "f16vec2 round(f16vec2);" + "f16vec3 round(f16vec3);" + "f16vec4 round(f16vec4);" + + "float16_t roundEven(float16_t);" + "f16vec2 roundEven(f16vec2);" + "f16vec3 roundEven(f16vec3);" + "f16vec4 roundEven(f16vec4);" + + "float16_t ceil(float16_t);" + "f16vec2 ceil(f16vec2);" + "f16vec3 ceil(f16vec3);" + "f16vec4 ceil(f16vec4);" + + "float16_t fract(float16_t);" + "f16vec2 fract(f16vec2);" + "f16vec3 fract(f16vec3);" + "f16vec4 fract(f16vec4);" + + "float16_t mod(float16_t, float16_t);" + "f16vec2 mod(f16vec2, float16_t);" + "f16vec3 mod(f16vec3, float16_t);" + "f16vec4 mod(f16vec4, float16_t);" + "f16vec2 mod(f16vec2, f16vec2);" + "f16vec3 mod(f16vec3, f16vec3);" + "f16vec4 mod(f16vec4, f16vec4);" + + "float16_t modf(float16_t, out float16_t);" + "f16vec2 modf(f16vec2, out f16vec2);" + "f16vec3 modf(f16vec3, out f16vec3);" + "f16vec4 modf(f16vec4, out f16vec4);" + + "float16_t min(float16_t, float16_t);" + "f16vec2 min(f16vec2, float16_t);" + "f16vec3 min(f16vec3, float16_t);" + "f16vec4 min(f16vec4, float16_t);" + "f16vec2 min(f16vec2, f16vec2);" + "f16vec3 min(f16vec3, f16vec3);" + "f16vec4 min(f16vec4, f16vec4);" + + "float16_t max(float16_t, float16_t);" + "f16vec2 max(f16vec2, float16_t);" + "f16vec3 max(f16vec3, float16_t);" + "f16vec4 max(f16vec4, float16_t);" + "f16vec2 max(f16vec2, f16vec2);" + "f16vec3 max(f16vec3, f16vec3);" + "f16vec4 max(f16vec4, f16vec4);" + + "float16_t clamp(float16_t, float16_t, float16_t);" + "f16vec2 clamp(f16vec2, float16_t, float16_t);" + "f16vec3 clamp(f16vec3, float16_t, float16_t);" + "f16vec4 clamp(f16vec4, float16_t, float16_t);" + "f16vec2 clamp(f16vec2, f16vec2, f16vec2);" + "f16vec3 clamp(f16vec3, f16vec3, f16vec3);" + "f16vec4 clamp(f16vec4, f16vec4, f16vec4);" + + "float16_t mix(float16_t, float16_t, float16_t);" + "f16vec2 mix(f16vec2, f16vec2, float16_t);" + "f16vec3 mix(f16vec3, f16vec3, float16_t);" + "f16vec4 mix(f16vec4, f16vec4, float16_t);" + "f16vec2 mix(f16vec2, f16vec2, f16vec2);" + "f16vec3 mix(f16vec3, f16vec3, f16vec3);" + "f16vec4 mix(f16vec4, f16vec4, f16vec4);" + "float16_t mix(float16_t, float16_t, bool);" + "f16vec2 mix(f16vec2, f16vec2, bvec2);" + "f16vec3 mix(f16vec3, f16vec3, bvec3);" + "f16vec4 mix(f16vec4, f16vec4, bvec4);" + + "float16_t step(float16_t, float16_t);" + "f16vec2 step(f16vec2, f16vec2);" + "f16vec3 step(f16vec3, f16vec3);" + "f16vec4 step(f16vec4, f16vec4);" + "f16vec2 step(float16_t, f16vec2);" + "f16vec3 step(float16_t, f16vec3);" + "f16vec4 step(float16_t, f16vec4);" + + "float16_t smoothstep(float16_t, float16_t, float16_t);" + "f16vec2 smoothstep(f16vec2, f16vec2, f16vec2);" + "f16vec3 smoothstep(f16vec3, f16vec3, f16vec3);" + "f16vec4 smoothstep(f16vec4, f16vec4, f16vec4);" + "f16vec2 smoothstep(float16_t, float16_t, f16vec2);" + "f16vec3 smoothstep(float16_t, float16_t, f16vec3);" + "f16vec4 smoothstep(float16_t, float16_t, f16vec4);" + + "bool isnan(float16_t);" + "bvec2 isnan(f16vec2);" + "bvec3 isnan(f16vec3);" + "bvec4 isnan(f16vec4);" + + "bool isinf(float16_t);" + "bvec2 isinf(f16vec2);" + "bvec3 isinf(f16vec3);" + "bvec4 isinf(f16vec4);" + + "float16_t fma(float16_t, float16_t, float16_t);" + "f16vec2 fma(f16vec2, f16vec2, f16vec2);" + "f16vec3 fma(f16vec3, f16vec3, f16vec3);" + "f16vec4 fma(f16vec4, f16vec4, f16vec4);" + + "float16_t frexp(float16_t, out int);" + "f16vec2 frexp(f16vec2, out ivec2);" + "f16vec3 frexp(f16vec3, out ivec3);" + "f16vec4 frexp(f16vec4, out ivec4);" + + "float16_t ldexp(float16_t, in int);" + "f16vec2 ldexp(f16vec2, in ivec2);" + "f16vec3 ldexp(f16vec3, in ivec3);" + "f16vec4 ldexp(f16vec4, in ivec4);" + + "uint packFloat2x16(f16vec2);" + "f16vec2 unpackFloat2x16(uint);" + + "float16_t length(float16_t);" + "float16_t length(f16vec2);" + "float16_t length(f16vec3);" + "float16_t length(f16vec4);" + + "float16_t distance(float16_t, float16_t);" + "float16_t distance(f16vec2, f16vec2);" + "float16_t distance(f16vec3, f16vec3);" + "float16_t distance(f16vec4, f16vec4);" + + "float16_t dot(float16_t, float16_t);" + "float16_t dot(f16vec2, f16vec2);" + "float16_t dot(f16vec3, f16vec3);" + "float16_t dot(f16vec4, f16vec4);" + + "f16vec3 cross(f16vec3, f16vec3);" + + "float16_t normalize(float16_t);" + "f16vec2 normalize(f16vec2);" + "f16vec3 normalize(f16vec3);" + "f16vec4 normalize(f16vec4);" + + "float16_t faceforward(float16_t, float16_t, float16_t);" + "f16vec2 faceforward(f16vec2, f16vec2, f16vec2);" + "f16vec3 faceforward(f16vec3, f16vec3, f16vec3);" + "f16vec4 faceforward(f16vec4, f16vec4, f16vec4);" + + "float16_t reflect(float16_t, float16_t);" + "f16vec2 reflect(f16vec2, f16vec2);" + "f16vec3 reflect(f16vec3, f16vec3);" + "f16vec4 reflect(f16vec4, f16vec4);" + + "float16_t refract(float16_t, float16_t, float16_t);" + "f16vec2 refract(f16vec2, f16vec2, float16_t);" + "f16vec3 refract(f16vec3, f16vec3, float16_t);" + "f16vec4 refract(f16vec4, f16vec4, float16_t);" + + "f16mat2 matrixCompMult(f16mat2, f16mat2);" + "f16mat3 matrixCompMult(f16mat3, f16mat3);" + "f16mat4 matrixCompMult(f16mat4, f16mat4);" + "f16mat2x3 matrixCompMult(f16mat2x3, f16mat2x3);" + "f16mat2x4 matrixCompMult(f16mat2x4, f16mat2x4);" + "f16mat3x2 matrixCompMult(f16mat3x2, f16mat3x2);" + "f16mat3x4 matrixCompMult(f16mat3x4, f16mat3x4);" + "f16mat4x2 matrixCompMult(f16mat4x2, f16mat4x2);" + "f16mat4x3 matrixCompMult(f16mat4x3, f16mat4x3);" + + "f16mat2 outerProduct(f16vec2, f16vec2);" + "f16mat3 outerProduct(f16vec3, f16vec3);" + "f16mat4 outerProduct(f16vec4, f16vec4);" + "f16mat2x3 outerProduct(f16vec3, f16vec2);" + "f16mat3x2 outerProduct(f16vec2, f16vec3);" + "f16mat2x4 outerProduct(f16vec4, f16vec2);" + "f16mat4x2 outerProduct(f16vec2, f16vec4);" + "f16mat3x4 outerProduct(f16vec4, f16vec3);" + "f16mat4x3 outerProduct(f16vec3, f16vec4);" + + "f16mat2 transpose(f16mat2);" + "f16mat3 transpose(f16mat3);" + "f16mat4 transpose(f16mat4);" + "f16mat2x3 transpose(f16mat3x2);" + "f16mat3x2 transpose(f16mat2x3);" + "f16mat2x4 transpose(f16mat4x2);" + "f16mat4x2 transpose(f16mat2x4);" + "f16mat3x4 transpose(f16mat4x3);" + "f16mat4x3 transpose(f16mat3x4);" + + "float16_t determinant(f16mat2);" + "float16_t determinant(f16mat3);" + "float16_t determinant(f16mat4);" + + "f16mat2 inverse(f16mat2);" + "f16mat3 inverse(f16mat3);" + "f16mat4 inverse(f16mat4);" + + "bvec2 lessThan(f16vec2, f16vec2);" + "bvec3 lessThan(f16vec3, f16vec3);" + "bvec4 lessThan(f16vec4, f16vec4);" + + "bvec2 lessThanEqual(f16vec2, f16vec2);" + "bvec3 lessThanEqual(f16vec3, f16vec3);" + "bvec4 lessThanEqual(f16vec4, f16vec4);" + + "bvec2 greaterThan(f16vec2, f16vec2);" + "bvec3 greaterThan(f16vec3, f16vec3);" + "bvec4 greaterThan(f16vec4, f16vec4);" + + "bvec2 greaterThanEqual(f16vec2, f16vec2);" + "bvec3 greaterThanEqual(f16vec3, f16vec3);" + "bvec4 greaterThanEqual(f16vec4, f16vec4);" + + "bvec2 equal(f16vec2, f16vec2);" + "bvec3 equal(f16vec3, f16vec3);" + "bvec4 equal(f16vec4, f16vec4);" + + "bvec2 notEqual(f16vec2, f16vec2);" + "bvec3 notEqual(f16vec3, f16vec3);" + "bvec4 notEqual(f16vec4, f16vec4);" + + "\n"); + } #endif //============================================================================ @@ -1975,6 +2336,77 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "uvec3 interpolateAtVertexAMD(uvec3, uint);" "uvec4 interpolateAtVertexAMD(uvec4, uint);" + "uint interpolateAtVertexAMD(float16_t, uint);" + "uvec2 interpolateAtVertexAMD(f16vec2, uint);" + "uvec3 interpolateAtVertexAMD(f16vec3, uint);" + "uvec4 interpolateAtVertexAMD(f16vec4, uint);" + + "\n"); + } + + // GL_AMD_gpu_shader_half_float + if (profile != EEsProfile && version >= 450) { + stageBuiltins[EShLangFragment].append( + "float16_t dFdx(float16_t);" + "f16vec2 dFdx(f16vec2);" + "f16vec3 dFdx(f16vec3);" + "f16vec4 dFdx(f16vec4);" + + "float16_t dFdy(float16_t);" + "f16vec2 dFdy(f16vec2);" + "f16vec3 dFdy(f16vec3);" + "f16vec4 dFdy(f16vec4);" + + "float16_t dFdxFine(float16_t);" + "f16vec2 dFdxFine(f16vec2);" + "f16vec3 dFdxFine(f16vec3);" + "f16vec4 dFdxFine(f16vec4);" + + "float16_t dFdyFine(float16_t);" + "f16vec2 dFdyFine(f16vec2);" + "f16vec3 dFdyFine(f16vec3);" + "f16vec4 dFdyFine(f16vec4);" + + "float16_t dFdxCoarse(float16_t);" + "f16vec2 dFdxCoarse(f16vec2);" + "f16vec3 dFdxCoarse(f16vec3);" + "f16vec4 dFdxCoarse(f16vec4);" + + "float16_t dFdyCoarse(float16_t);" + "f16vec2 dFdyCoarse(f16vec2);" + "f16vec3 dFdyCoarse(f16vec3);" + "f16vec4 dFdyCoarse(f16vec4);" + + "float16_t fwidth(float16_t);" + "f16vec2 fwidth(f16vec2);" + "f16vec3 fwidth(f16vec3);" + "f16vec4 fwidth(f16vec4);" + + "float16_t fwidthFine(float16_t);" + "f16vec2 fwidthFine(f16vec2);" + "f16vec3 fwidthFine(f16vec3);" + "f16vec4 fwidthFine(f16vec4);" + + "float16_t fwidthCoarse(float16_t);" + "f16vec2 fwidthCoarse(f16vec2);" + "f16vec3 fwidthCoarse(f16vec3);" + "f16vec4 fwidthCoarse(f16vec4);" + + "float16_t interpolateAtCentroid(float16_t);" + "f16vec2 interpolateAtCentroid(f16vec2);" + "f16vec3 interpolateAtCentroid(f16vec3);" + "f16vec4 interpolateAtCentroid(f16vec4);" + + "float16_t interpolateAtSample(float16_t, int);" + "f16vec2 interpolateAtSample(f16vec2, int);" + "f16vec3 interpolateAtSample(f16vec3, int);" + "f16vec4 interpolateAtSample(f16vec4, int);" + + "float16_t interpolateAtOffset(float16_t, vec2);" + "f16vec2 interpolateAtOffset(f16vec2, vec2);" + "f16vec3 interpolateAtOffset(f16vec3, vec2);" + "f16vec4 interpolateAtOffset(f16vec4, vec2);" + "\n"); } #endif @@ -4369,6 +4801,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("packUint2x32", EOpPackUint2x32); symbolTable.relateToOperator("unpackUint2x32", EOpUnpackUint2x32); +#ifdef AMD_EXTENSIONS + symbolTable.relateToOperator("packFloat2x16", EOpPackFloat2x16); + symbolTable.relateToOperator("unpackFloat2x16", EOpUnpackFloat2x16); +#endif + symbolTable.relateToOperator("length", EOpLength); symbolTable.relateToOperator("distance", EOpDistance); symbolTable.relateToOperator("dot", EOpDot); diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index a0bee74..cababc3 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -268,6 +268,9 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo case EOpConstructBool: newType = EbtBool; break; case EOpConstructFloat: newType = EbtFloat; break; case EOpConstructDouble: newType = EbtDouble; break; +#ifdef AMD_EXTENSIONS + case EOpConstructFloat16: newType = EbtFloat16; break; +#endif default: break; // some compilers want this } @@ -293,6 +296,9 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo case EOpConstructBool: case EOpConstructFloat: case EOpConstructDouble: +#ifdef AMD_EXTENSIONS + case EOpConstructFloat16: +#endif return child; default: break; // some compilers want this } @@ -471,6 +477,11 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructDouble: promoteTo = EbtDouble; break; +#ifdef AMD_EXTENSIONS + case EOpConstructFloat16: + promoteTo = EbtFloat16; + break; +#endif case EOpConstructInt: promoteTo = EbtInt; break; @@ -585,6 +596,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtUint: newOp = EOpConvUintToDouble; break; case EbtBool: newOp = EOpConvBoolToDouble; break; case EbtFloat: newOp = EOpConvFloatToDouble; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToDouble; break; +#endif case EbtInt64: newOp = EOpConvInt64ToDouble; break; case EbtUint64: newOp = EOpConvUint64ToDouble; break; default: @@ -597,18 +611,39 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtUint: newOp = EOpConvUintToFloat; break; case EbtBool: newOp = EOpConvBoolToFloat; break; case EbtDouble: newOp = EOpConvDoubleToFloat; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToFloat; break; +#endif case EbtInt64: newOp = EOpConvInt64ToFloat; break; case EbtUint64: newOp = EOpConvUint64ToFloat; break; default: return 0; } break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: + switch (node->getBasicType()) { + case EbtInt: newOp = EOpConvIntToFloat16; break; + case EbtUint: newOp = EOpConvUintToFloat16; break; + case EbtBool: newOp = EOpConvBoolToFloat16; break; + case EbtFloat: newOp = EOpConvFloatToFloat16; break; + case EbtDouble: newOp = EOpConvDoubleToFloat16; break; + case EbtInt64: newOp = EOpConvInt64ToFloat16; break; + case EbtUint64: newOp = EOpConvUint64ToFloat16; break; + default: + return 0; + } + break; +#endif case EbtBool: switch (node->getBasicType()) { case EbtInt: newOp = EOpConvIntToBool; break; case EbtUint: newOp = EOpConvUintToBool; break; case EbtFloat: newOp = EOpConvFloatToBool; break; case EbtDouble: newOp = EOpConvDoubleToBool; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToBool; break; +#endif case EbtInt64: newOp = EOpConvInt64ToBool; break; case EbtUint64: newOp = EOpConvUint64ToBool; break; default: @@ -621,6 +656,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtBool: newOp = EOpConvBoolToInt; break; case EbtFloat: newOp = EOpConvFloatToInt; break; case EbtDouble: newOp = EOpConvDoubleToInt; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToInt; break; +#endif case EbtInt64: newOp = EOpConvInt64ToInt; break; case EbtUint64: newOp = EOpConvUint64ToInt; break; default: @@ -633,6 +671,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtBool: newOp = EOpConvBoolToUint; break; case EbtFloat: newOp = EOpConvFloatToUint; break; case EbtDouble: newOp = EOpConvDoubleToUint; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToUint; break; +#endif case EbtInt64: newOp = EOpConvInt64ToUint; break; case EbtUint64: newOp = EOpConvUint64ToUint; break; default: @@ -646,6 +687,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtBool: newOp = EOpConvBoolToInt64; break; case EbtFloat: newOp = EOpConvFloatToInt64; break; case EbtDouble: newOp = EOpConvDoubleToInt64; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToInt64; break; +#endif case EbtUint64: newOp = EOpConvUint64ToInt64; break; default: return 0; @@ -658,6 +702,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtBool: newOp = EOpConvBoolToUint64; break; case EbtFloat: newOp = EOpConvFloatToUint64; break; case EbtDouble: newOp = EOpConvDoubleToUint64; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: newOp = EOpConvFloat16ToUint64; break; +#endif case EbtInt64: newOp = EOpConvInt64ToUint64; break; default: return 0; @@ -779,6 +826,9 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtUint64: case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif return true; default: return false; @@ -788,6 +838,9 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtInt: case EbtUint: case EbtFloat: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif return true; default: return false; @@ -923,6 +976,47 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const } } break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: + if (type.getMatrixCols()) { + switch (type.getMatrixCols()) { + case 2: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructF16Mat2x2; break; + case 3: op = EOpConstructF16Mat2x3; break; + case 4: op = EOpConstructF16Mat2x4; break; + default: break; // some compilers want this + } + break; + case 3: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructF16Mat3x2; break; + case 3: op = EOpConstructF16Mat3x3; break; + case 4: op = EOpConstructF16Mat3x4; break; + default: break; // some compilers want this + } + break; + case 4: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructF16Mat4x2; break; + case 3: op = EOpConstructF16Mat4x3; break; + case 4: op = EOpConstructF16Mat4x4; break; + default: break; // some compilers want this + } + break; + } + } + else { + switch (type.getVectorSize()) { + case 1: op = EOpConstructFloat16; break; + case 2: op = EOpConstructF16Vec2; break; + case 3: op = EOpConstructF16Vec3; break; + case 4: op = EOpConstructF16Vec4; break; + default: break; // some compilers want this + } + } + break; +#endif case EbtInt: switch(type.getVectorSize()) { case 1: op = EOpConstructInt; break; @@ -1196,7 +1290,11 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, const TSourceLoc& TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseType, const TSourceLoc& loc, bool literal) const { +#ifdef AMD_EXTENSIONS + assert(baseType == EbtFloat || baseType == EbtDouble || baseType == EbtFloat16); +#else assert(baseType == EbtFloat || baseType == EbtDouble); +#endif TConstUnionArray unionArray(1); unionArray[0].setDConst(d); @@ -1451,6 +1549,12 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const case EOpVectorSwizzle: case EOpConvFloatToDouble: case EOpConvDoubleToFloat: +#ifdef AMD_EXTENSIONS + case EOpConvFloat16ToFloat: + case EOpConvFloatToFloat16: + case EOpConvFloat16ToDouble: + case EOpConvDoubleToFloat16: +#endif return true; default: return false; @@ -1607,6 +1711,9 @@ bool TIntermUnary::promote() operand->getBasicType() != EbtInt64 && operand->getBasicType() != EbtUint64 && operand->getBasicType() != EbtFloat && +#ifdef AMD_EXTENSIONS + operand->getBasicType() != EbtFloat16 && +#endif operand->getBasicType() != EbtDouble) return false; @@ -1626,7 +1733,11 @@ bool TIntermUnary::promote() void TIntermUnary::updatePrecision() { +#ifdef AMD_EXTENSIONS + if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { +#else if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { +#endif if (operand->getQualifier().precision > getQualifier().precision) getQualifier().precision = operand->getQualifier().precision; } @@ -1955,7 +2066,11 @@ bool TIntermBinary::promote() void TIntermBinary::updatePrecision() { +#ifdef AMD_EXTENSIONS + if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { +#else if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { +#endif getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision); if (getQualifier().precision != EpqNone) { left->propagatePrecision(getQualifier().precision); @@ -1966,7 +2081,11 @@ void TIntermBinary::updatePrecision() void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision) { +#ifdef AMD_EXTENSIONS + if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat && getBasicType() != EbtFloat16)) +#else if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat)) +#endif return; getQualifier().precision = newPrecision; @@ -2040,16 +2159,46 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getBConst())); break; case EbtFloat: + case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif leftUnionArray[i] = rightUnionArray[i]; break; + default: + return node; + } + break; + case EbtDouble: + switch (node->getType().getBasicType()) { + case EbtInt: + leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getIConst())); + break; + case EbtUint: + leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getUConst())); + break; + case EbtInt64: + leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getI64Const())); + break; + case EbtUint64: + leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getU64Const())); + break; + case EbtBool: + leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getBConst())); + break; + case EbtFloat: case EbtDouble: - leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getDConst())); +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif + leftUnionArray[i] = rightUnionArray[i]; break; default: return node; } break; - case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: switch (node->getType().getBasicType()) { case EbtInt: leftUnionArray[i].setDConst(static_cast(rightUnionArray[i].getIConst())); @@ -2068,12 +2217,14 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: + case EbtFloat16: leftUnionArray[i] = rightUnionArray[i]; break; default: return node; } break; +#endif case EbtInt: switch (node->getType().getBasicType()) { case EbtInt: @@ -2093,6 +2244,9 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif leftUnionArray[i].setIConst(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -2118,6 +2272,9 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif leftUnionArray[i].setUConst(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -2143,6 +2300,9 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif leftUnionArray[i].setBConst(rightUnionArray[i].getDConst() != 0.0); break; default: @@ -2168,6 +2328,9 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif leftUnionArray[i].setI64Const(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -2193,6 +2356,9 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif leftUnionArray[i].setU64Const(static_cast(rightUnionArray[i].getDConst())); break; default: diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 3c9caf1..a24a92d 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -4559,6 +4559,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // containing a double, the offset must also be a multiple of 8..." if (type.containsBasicType(EbtDouble) && ! IsMultipleOfPow2(qualifier.layoutXfbOffset, 8)) error(loc, "type contains double; xfb_offset must be a multiple of 8", "xfb_offset", ""); +#ifdef AMD_EXTENSIONS + // ..., if applied to an aggregate containing a float16_t, the offset must also be a multiple of 2..." + else if (type.containsBasicType(EbtFloat16) && !IsMultipleOfPow2(qualifier.layoutXfbOffset, 2)) + error(loc, "type contains half float; xfb_offset must be a multiple of 2", "xfb_offset", ""); +#endif else if (! IsMultipleOfPow2(qualifier.layoutXfbOffset, 4)) error(loc, "must be a multiple of size of first component", "xfb_offset", ""); } @@ -4662,6 +4667,9 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) case EbtBool: case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif break; default: error(loc, "cannot be applied to this type", "constant_id", ""); @@ -5561,6 +5569,24 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T basicOp = EOpConstructDouble; break; +#ifdef AMD_EXTENSIONS + case EOpConstructF16Vec2: + case EOpConstructF16Vec3: + case EOpConstructF16Vec4: + case EOpConstructF16Mat2x2: + case EOpConstructF16Mat2x3: + case EOpConstructF16Mat2x4: + case EOpConstructF16Mat3x2: + case EOpConstructF16Mat3x3: + case EOpConstructF16Mat3x4: + case EOpConstructF16Mat4x2: + case EOpConstructF16Mat4x3: + case EOpConstructF16Mat4x4: + case EOpConstructFloat16: + basicOp = EOpConstructFloat16; + break; +#endif + case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index ee0dbb4..3750645 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -463,6 +463,25 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["u64vec3"] = U64VEC3; (*KeywordMap)["u64vec4"] = U64VEC4; +#ifdef AMD_EXTENSIONS + (*KeywordMap)["float16_t"] = FLOAT16_T; + (*KeywordMap)["f16vec2"] = F16VEC2; + (*KeywordMap)["f16vec3"] = F16VEC3; + (*KeywordMap)["f16vec4"] = F16VEC4; + (*KeywordMap)["f16mat2"] = F16MAT2; + (*KeywordMap)["f16mat3"] = F16MAT3; + (*KeywordMap)["f16mat4"] = F16MAT4; + (*KeywordMap)["f16mat2x2"] = F16MAT2X2; + (*KeywordMap)["f16mat2x3"] = F16MAT2X3; + (*KeywordMap)["f16mat2x4"] = F16MAT2X4; + (*KeywordMap)["f16mat3x2"] = F16MAT3X2; + (*KeywordMap)["f16mat3x3"] = F16MAT3X3; + (*KeywordMap)["f16mat3x4"] = F16MAT3X4; + (*KeywordMap)["f16mat4x2"] = F16MAT4X2; + (*KeywordMap)["f16mat4x3"] = F16MAT4X3; + (*KeywordMap)["f16mat4x4"] = F16MAT4X4; +#endif + (*KeywordMap)["sampler2D"] = SAMPLER2D; (*KeywordMap)["samplerCube"] = SAMPLERCUBE; (*KeywordMap)["samplerCubeArray"] = SAMPLERCUBEARRAY; @@ -687,6 +706,9 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; +#ifdef AMD_EXTENSIONS + case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; +#endif case PpAtomIdentifier: { int token = tokenizeIdentifier(); @@ -938,10 +960,38 @@ int TScanContext::tokenizeIdentifier() case U64VEC2: case U64VEC3: case U64VEC4: - if (parseContext.profile != EEsProfile && parseContext.version >= 450) + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) && + parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); +#ifdef AMD_EXTENSIONS + case FLOAT16_T: + case F16VEC2: + case F16VEC3: + case F16VEC4: + case F16MAT2: + case F16MAT3: + case F16MAT4: + case F16MAT2X2: + case F16MAT2X3: + case F16MAT2X4: + case F16MAT3X2: + case F16MAT3X3: + case F16MAT3X4: + case F16MAT4X2: + case F16MAT4X3: + case F16MAT4X4: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) && + parseContext.profile != EEsProfile && parseContext.version >= 450)) + return keyword; + return identifierOrType(); +#endif + case SAMPLERCUBEARRAY: case SAMPLERCUBEARRAYSHADOW: case ISAMPLERCUBEARRAY: diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index 2068f26..fb09fdf 100644 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -60,6 +60,9 @@ void TType::buildMangledName(TString& mangledName) switch (basicType) { case EbtFloat: mangledName += 'f'; break; case EbtDouble: mangledName += 'd'; break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: mangledName += "f16"; break; +#endif case EbtInt: mangledName += 'i'; break; case EbtUint: mangledName += 'u'; break; case EbtInt64: mangledName += "i64"; break; diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index 52d205d..8a29cb3 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -192,6 +192,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_AMD_shader_trinary_minmax] = EBhDisable; extensionBehavior[E_GL_AMD_shader_explicit_vertex_parameter] = EBhDisable; extensionBehavior[E_GL_AMD_gcn_shader] = EBhDisable; + extensionBehavior[E_GL_AMD_gpu_shader_half_float] = EBhDisable; #endif // AEP @@ -299,6 +300,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_AMD_shader_trinary_minmax 1\n" "#define GL_AMD_shader_explicit_vertex_parameter 1\n" "#define GL_AMD_gcn_shader 1\n" + "#define GL_AMD_gpu_shader_half_float 1\n" #endif ; } @@ -663,6 +665,19 @@ void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op) profileRequires(loc, ECompatibilityProfile, 400, nullptr, op); } +#ifdef AMD_EXTENSIONS +// Call for any operation needing GLSL float16 data-type support. +void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float, "shader half float"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} +#endif + // Call for any operation needing GLSL 64-bit integer data-type support. void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool builtIn) { diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h index 6fd08b0..17baf3b 100644 --- a/glslang/MachineIndependent/Versions.h +++ b/glslang/MachineIndependent/Versions.h @@ -136,10 +136,11 @@ const char* const E_GL_GOOGLE_cpp_style_line_directive = "GL_GOOGLE_cpp const char* const E_GL_GOOGLE_include_directive = "GL_GOOGLE_include_directive"; #ifdef AMD_EXTENSIONS -const char* const E_GL_AMD_shader_ballot = "GL_AMD_shader_ballot"; -const char* const E_GL_AMD_shader_trinary_minmax = "GL_AMD_shader_trinary_minmax"; -const char* const E_GL_AMD_shader_explicit_vertex_parameter = "GL_AMD_shader_explicit_vertex_parameter"; -const char* const E_GL_AMD_gcn_shader = "GL_AMD_gcn_shader"; +const char* const E_GL_AMD_shader_ballot = "GL_AMD_shader_ballot"; +const char* const E_GL_AMD_shader_trinary_minmax = "GL_AMD_shader_trinary_minmax"; +const char* const E_GL_AMD_shader_explicit_vertex_parameter = "GL_AMD_shader_explicit_vertex_parameter"; +const char* const E_GL_AMD_gcn_shader = "GL_AMD_gcn_shader"; +const char* const E_GL_AMD_gpu_shader_half_float = "GL_AMD_gpu_shader_half_float"; #endif // AEP diff --git a/glslang/MachineIndependent/gl_types.h b/glslang/MachineIndependent/gl_types.h index 9e877d3..d7cb31f 100644 --- a/glslang/MachineIndependent/gl_types.h +++ b/glslang/MachineIndependent/gl_types.h @@ -76,6 +76,24 @@ #define GL_DOUBLE_MAT4x2 0x8F4D #define GL_DOUBLE_MAT4x3 0x8F4E +#ifdef AMD_EXTENSIONS +// Those constants are borrowed from extension NV_gpu_shader5 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB + +#define GL_FLOAT16_MAT2_AMD 0x91C5 +#define GL_FLOAT16_MAT3_AMD 0x91C6 +#define GL_FLOAT16_MAT4_AMD 0x91C7 +#define GL_FLOAT16_MAT2x3_AMD 0x91C8 +#define GL_FLOAT16_MAT2x4_AMD 0x91C9 +#define GL_FLOAT16_MAT3x2_AMD 0x91CA +#define GL_FLOAT16_MAT3x4_AMD 0x91CB +#define GL_FLOAT16_MAT4x2_AMD 0x91CC +#define GL_FLOAT16_MAT4x3_AMD 0x91CD +#endif + #define GL_SAMPLER_1D 0x8B5D #define GL_SAMPLER_2D 0x8B5E #define GL_SAMPLER_3D 0x8B5F diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index a1628f6..060ffdd 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -119,13 +119,14 @@ extern int yylex(YYSTYPE*, TParseContext&); %expect 1 // One shift reduce conflict because of if | else %token ATTRIBUTE VARYING -%token CONST BOOL FLOAT DOUBLE INT UINT INT64_T UINT64_T +%token CONST BOOL FLOAT DOUBLE INT UINT INT64_T UINT64_T FLOAT16_T %token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT SUBROUTINE %token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 I64VEC2 I64VEC3 I64VEC4 UVEC2 UVEC3 UVEC4 U64VEC2 U64VEC3 U64VEC4 VEC2 VEC3 VEC4 %token MAT2 MAT3 MAT4 CENTROID IN OUT INOUT %token UNIFORM PATCH SAMPLE BUFFER SHARED %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY %token DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 +%token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 %token NOPERSPECTIVE FLAT SMOOTH LAYOUT __EXPLICITINTERPAMD %token MAT2X2 MAT2X3 MAT2X4 @@ -134,6 +135,9 @@ extern int yylex(YYSTYPE*, TParseContext&); %token DMAT2X2 DMAT2X3 DMAT2X4 %token DMAT3X2 DMAT3X3 DMAT3X4 %token DMAT4X2 DMAT4X3 DMAT4X4 +%token F16MAT2X2 F16MAT2X3 F16MAT2X4 +%token F16MAT3X2 F16MAT3X3 F16MAT3X4 +%token F16MAT4X2 F16MAT4X3 F16MAT4X4 %token ATOMIC_UINT // combined image/sampler @@ -182,7 +186,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token STRUCT VOID WHILE %token IDENTIFIER TYPE_NAME -%token FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT +%token FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT FLOAT16CONSTANT %token LEFT_OP RIGHT_OP %token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP %token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN @@ -274,6 +278,12 @@ primary_expression parseContext.doubleCheck($1.loc, "double literal"); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); } + | FLOAT16CONSTANT { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float literal"); + $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); +#endif + } | BOOLCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); } @@ -1324,6 +1334,13 @@ type_specifier_nonarray $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtDouble; } + | FLOAT16_T { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; +#endif + } | INT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtInt; @@ -1380,6 +1397,30 @@ type_specifier_nonarray $$.basicType = EbtDouble; $$.setVector(4); } + | F16VEC2 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setVector(2); +#endif + } + | F16VEC3 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setVector(3); +#endif + } + | F16VEC4 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setVector(4); +#endif + } | BVEC2 { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtBool; @@ -1596,6 +1637,102 @@ type_specifier_nonarray $$.basicType = EbtDouble; $$.setMatrix(4, 4); } + | F16MAT2 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(2, 2); +#endif + } + | F16MAT3 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(3, 3); +#endif + } + | F16MAT4 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(4, 4); +#endif + } + | F16MAT2X2 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(2, 2); +#endif + } + | F16MAT2X3 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(2, 3); +#endif + } + | F16MAT2X4 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(2, 4); +#endif + } + | F16MAT3X2 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(3, 2); +#endif + } + | F16MAT3X3 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(3, 3); +#endif + } + | F16MAT3X4 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(3, 4); +#endif + } + | F16MAT4X2 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(4, 2); +#endif + } + | F16MAT4X3 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(4, 3); +#endif + } + | F16MAT4X4 { +#ifdef AMD_EXTENSIONS + parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat16; + $$.setMatrix(4, 4); +#endif + } | ATOMIC_UINT { parseContext.vulkanRemoved($1.loc, "atomic counter types"); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); diff --git a/glslang/MachineIndependent/glslang_tab.cpp b/glslang/MachineIndependent/glslang_tab.cpp index 3d7dc8e..3507c04 100644 --- a/glslang/MachineIndependent/glslang_tab.cpp +++ b/glslang/MachineIndependent/glslang_tab.cpp @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2012 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 . */ @@ -26,7 +26,7 @@ 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. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "2.7" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -62,7 +62,8 @@ /* Copy the first part of user declarations. */ -#line 41 "MachineIndependent/glslang.y" /* yacc.c:339 */ +/* Line 371 of yacc.c */ +#line 41 "glslang.y" /* Based on: @@ -87,13 +88,14 @@ Jutta Degener, 1995 using namespace glslang; -#line 91 "MachineIndependent/glslang_tab.cpp" /* yacc.c:339 */ +/* Line 371 of yacc.c */ +#line 93 "glslang_tab.cpp" -# ifndef YY_NULLPTR +# ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# define YY_NULL nullptr # else -# define YY_NULLPTR 0 +# define YY_NULL 0 # endif # endif @@ -107,9 +109,9 @@ using namespace glslang; /* In a future release of Bison, this section will be replaced by #include "glslang_tab.cpp.h". */ -#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED -# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED -/* Debug traces. */ +#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED +# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED +/* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif @@ -117,288 +119,306 @@ using namespace glslang; extern int yydebug; #endif -/* Token type. */ +/* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - enum yytokentype - { - ATTRIBUTE = 258, - VARYING = 259, - CONST = 260, - BOOL = 261, - FLOAT = 262, - DOUBLE = 263, - INT = 264, - UINT = 265, - INT64_T = 266, - UINT64_T = 267, - BREAK = 268, - CONTINUE = 269, - DO = 270, - ELSE = 271, - FOR = 272, - IF = 273, - DISCARD = 274, - RETURN = 275, - SWITCH = 276, - CASE = 277, - DEFAULT = 278, - SUBROUTINE = 279, - BVEC2 = 280, - BVEC3 = 281, - BVEC4 = 282, - IVEC2 = 283, - IVEC3 = 284, - IVEC4 = 285, - I64VEC2 = 286, - I64VEC3 = 287, - I64VEC4 = 288, - UVEC2 = 289, - UVEC3 = 290, - UVEC4 = 291, - U64VEC2 = 292, - U64VEC3 = 293, - U64VEC4 = 294, - VEC2 = 295, - VEC3 = 296, - VEC4 = 297, - MAT2 = 298, - MAT3 = 299, - MAT4 = 300, - CENTROID = 301, - IN = 302, - OUT = 303, - INOUT = 304, - UNIFORM = 305, - PATCH = 306, - SAMPLE = 307, - BUFFER = 308, - SHARED = 309, - COHERENT = 310, - VOLATILE = 311, - RESTRICT = 312, - READONLY = 313, - WRITEONLY = 314, - DVEC2 = 315, - DVEC3 = 316, - DVEC4 = 317, - DMAT2 = 318, - DMAT3 = 319, - DMAT4 = 320, - NOPERSPECTIVE = 321, - FLAT = 322, - SMOOTH = 323, - LAYOUT = 324, - __EXPLICITINTERPAMD = 325, - MAT2X2 = 326, - MAT2X3 = 327, - MAT2X4 = 328, - MAT3X2 = 329, - MAT3X3 = 330, - MAT3X4 = 331, - MAT4X2 = 332, - MAT4X3 = 333, - MAT4X4 = 334, - DMAT2X2 = 335, - DMAT2X3 = 336, - DMAT2X4 = 337, - DMAT3X2 = 338, - DMAT3X3 = 339, - DMAT3X4 = 340, - DMAT4X2 = 341, - DMAT4X3 = 342, - DMAT4X4 = 343, - ATOMIC_UINT = 344, - SAMPLER1D = 345, - SAMPLER2D = 346, - SAMPLER3D = 347, - SAMPLERCUBE = 348, - SAMPLER1DSHADOW = 349, - SAMPLER2DSHADOW = 350, - SAMPLERCUBESHADOW = 351, - SAMPLER1DARRAY = 352, - SAMPLER2DARRAY = 353, - SAMPLER1DARRAYSHADOW = 354, - SAMPLER2DARRAYSHADOW = 355, - ISAMPLER1D = 356, - ISAMPLER2D = 357, - ISAMPLER3D = 358, - ISAMPLERCUBE = 359, - ISAMPLER1DARRAY = 360, - ISAMPLER2DARRAY = 361, - USAMPLER1D = 362, - USAMPLER2D = 363, - USAMPLER3D = 364, - USAMPLERCUBE = 365, - USAMPLER1DARRAY = 366, - USAMPLER2DARRAY = 367, - SAMPLER2DRECT = 368, - SAMPLER2DRECTSHADOW = 369, - ISAMPLER2DRECT = 370, - USAMPLER2DRECT = 371, - SAMPLERBUFFER = 372, - ISAMPLERBUFFER = 373, - USAMPLERBUFFER = 374, - SAMPLERCUBEARRAY = 375, - SAMPLERCUBEARRAYSHADOW = 376, - ISAMPLERCUBEARRAY = 377, - USAMPLERCUBEARRAY = 378, - SAMPLER2DMS = 379, - ISAMPLER2DMS = 380, - USAMPLER2DMS = 381, - SAMPLER2DMSARRAY = 382, - ISAMPLER2DMSARRAY = 383, - USAMPLER2DMSARRAY = 384, - SAMPLEREXTERNALOES = 385, - SAMPLER = 386, - SAMPLERSHADOW = 387, - TEXTURE1D = 388, - TEXTURE2D = 389, - TEXTURE3D = 390, - TEXTURECUBE = 391, - TEXTURE1DARRAY = 392, - TEXTURE2DARRAY = 393, - ITEXTURE1D = 394, - ITEXTURE2D = 395, - ITEXTURE3D = 396, - ITEXTURECUBE = 397, - ITEXTURE1DARRAY = 398, - ITEXTURE2DARRAY = 399, - UTEXTURE1D = 400, - UTEXTURE2D = 401, - UTEXTURE3D = 402, - UTEXTURECUBE = 403, - UTEXTURE1DARRAY = 404, - UTEXTURE2DARRAY = 405, - TEXTURE2DRECT = 406, - ITEXTURE2DRECT = 407, - UTEXTURE2DRECT = 408, - TEXTUREBUFFER = 409, - ITEXTUREBUFFER = 410, - UTEXTUREBUFFER = 411, - TEXTURECUBEARRAY = 412, - ITEXTURECUBEARRAY = 413, - UTEXTURECUBEARRAY = 414, - TEXTURE2DMS = 415, - ITEXTURE2DMS = 416, - UTEXTURE2DMS = 417, - TEXTURE2DMSARRAY = 418, - ITEXTURE2DMSARRAY = 419, - UTEXTURE2DMSARRAY = 420, - SUBPASSINPUT = 421, - SUBPASSINPUTMS = 422, - ISUBPASSINPUT = 423, - ISUBPASSINPUTMS = 424, - USUBPASSINPUT = 425, - USUBPASSINPUTMS = 426, - IMAGE1D = 427, - IIMAGE1D = 428, - UIMAGE1D = 429, - IMAGE2D = 430, - IIMAGE2D = 431, - UIMAGE2D = 432, - IMAGE3D = 433, - IIMAGE3D = 434, - UIMAGE3D = 435, - IMAGE2DRECT = 436, - IIMAGE2DRECT = 437, - UIMAGE2DRECT = 438, - IMAGECUBE = 439, - IIMAGECUBE = 440, - UIMAGECUBE = 441, - IMAGEBUFFER = 442, - IIMAGEBUFFER = 443, - UIMAGEBUFFER = 444, - IMAGE1DARRAY = 445, - IIMAGE1DARRAY = 446, - UIMAGE1DARRAY = 447, - IMAGE2DARRAY = 448, - IIMAGE2DARRAY = 449, - UIMAGE2DARRAY = 450, - IMAGECUBEARRAY = 451, - IIMAGECUBEARRAY = 452, - UIMAGECUBEARRAY = 453, - IMAGE2DMS = 454, - IIMAGE2DMS = 455, - UIMAGE2DMS = 456, - IMAGE2DMSARRAY = 457, - IIMAGE2DMSARRAY = 458, - UIMAGE2DMSARRAY = 459, - STRUCT = 460, - VOID = 461, - WHILE = 462, - IDENTIFIER = 463, - TYPE_NAME = 464, - FLOATCONSTANT = 465, - DOUBLECONSTANT = 466, - INTCONSTANT = 467, - UINTCONSTANT = 468, - INT64CONSTANT = 469, - UINT64CONSTANT = 470, - BOOLCONSTANT = 471, - LEFT_OP = 472, - RIGHT_OP = 473, - INC_OP = 474, - DEC_OP = 475, - LE_OP = 476, - GE_OP = 477, - EQ_OP = 478, - NE_OP = 479, - AND_OP = 480, - OR_OP = 481, - XOR_OP = 482, - MUL_ASSIGN = 483, - DIV_ASSIGN = 484, - ADD_ASSIGN = 485, - MOD_ASSIGN = 486, - LEFT_ASSIGN = 487, - RIGHT_ASSIGN = 488, - AND_ASSIGN = 489, - XOR_ASSIGN = 490, - OR_ASSIGN = 491, - SUB_ASSIGN = 492, - LEFT_PAREN = 493, - RIGHT_PAREN = 494, - LEFT_BRACKET = 495, - RIGHT_BRACKET = 496, - LEFT_BRACE = 497, - RIGHT_BRACE = 498, - DOT = 499, - COMMA = 500, - COLON = 501, - EQUAL = 502, - SEMICOLON = 503, - BANG = 504, - DASH = 505, - TILDE = 506, - PLUS = 507, - STAR = 508, - SLASH = 509, - PERCENT = 510, - LEFT_ANGLE = 511, - RIGHT_ANGLE = 512, - VERTICAL_BAR = 513, - CARET = 514, - AMPERSAND = 515, - QUESTION = 516, - INVARIANT = 517, - PRECISE = 518, - HIGH_PRECISION = 519, - MEDIUM_PRECISION = 520, - LOW_PRECISION = 521, - PRECISION = 522, - PACKED = 523, - RESOURCE = 524, - SUPERP = 525 - }; + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + ATTRIBUTE = 258, + VARYING = 259, + CONST = 260, + BOOL = 261, + FLOAT = 262, + DOUBLE = 263, + INT = 264, + UINT = 265, + INT64_T = 266, + UINT64_T = 267, + FLOAT16_T = 268, + BREAK = 269, + CONTINUE = 270, + DO = 271, + ELSE = 272, + FOR = 273, + IF = 274, + DISCARD = 275, + RETURN = 276, + SWITCH = 277, + CASE = 278, + DEFAULT = 279, + SUBROUTINE = 280, + BVEC2 = 281, + BVEC3 = 282, + BVEC4 = 283, + IVEC2 = 284, + IVEC3 = 285, + IVEC4 = 286, + I64VEC2 = 287, + I64VEC3 = 288, + I64VEC4 = 289, + UVEC2 = 290, + UVEC3 = 291, + UVEC4 = 292, + U64VEC2 = 293, + U64VEC3 = 294, + U64VEC4 = 295, + VEC2 = 296, + VEC3 = 297, + VEC4 = 298, + MAT2 = 299, + MAT3 = 300, + MAT4 = 301, + CENTROID = 302, + IN = 303, + OUT = 304, + INOUT = 305, + UNIFORM = 306, + PATCH = 307, + SAMPLE = 308, + BUFFER = 309, + SHARED = 310, + COHERENT = 311, + VOLATILE = 312, + RESTRICT = 313, + READONLY = 314, + WRITEONLY = 315, + DVEC2 = 316, + DVEC3 = 317, + DVEC4 = 318, + DMAT2 = 319, + DMAT3 = 320, + DMAT4 = 321, + F16VEC2 = 322, + F16VEC3 = 323, + F16VEC4 = 324, + F16MAT2 = 325, + F16MAT3 = 326, + F16MAT4 = 327, + NOPERSPECTIVE = 328, + FLAT = 329, + SMOOTH = 330, + LAYOUT = 331, + __EXPLICITINTERPAMD = 332, + MAT2X2 = 333, + MAT2X3 = 334, + MAT2X4 = 335, + MAT3X2 = 336, + MAT3X3 = 337, + MAT3X4 = 338, + MAT4X2 = 339, + MAT4X3 = 340, + MAT4X4 = 341, + DMAT2X2 = 342, + DMAT2X3 = 343, + DMAT2X4 = 344, + DMAT3X2 = 345, + DMAT3X3 = 346, + DMAT3X4 = 347, + DMAT4X2 = 348, + DMAT4X3 = 349, + DMAT4X4 = 350, + F16MAT2X2 = 351, + F16MAT2X3 = 352, + F16MAT2X4 = 353, + F16MAT3X2 = 354, + F16MAT3X3 = 355, + F16MAT3X4 = 356, + F16MAT4X2 = 357, + F16MAT4X3 = 358, + F16MAT4X4 = 359, + ATOMIC_UINT = 360, + SAMPLER1D = 361, + SAMPLER2D = 362, + SAMPLER3D = 363, + SAMPLERCUBE = 364, + SAMPLER1DSHADOW = 365, + SAMPLER2DSHADOW = 366, + SAMPLERCUBESHADOW = 367, + SAMPLER1DARRAY = 368, + SAMPLER2DARRAY = 369, + SAMPLER1DARRAYSHADOW = 370, + SAMPLER2DARRAYSHADOW = 371, + ISAMPLER1D = 372, + ISAMPLER2D = 373, + ISAMPLER3D = 374, + ISAMPLERCUBE = 375, + ISAMPLER1DARRAY = 376, + ISAMPLER2DARRAY = 377, + USAMPLER1D = 378, + USAMPLER2D = 379, + USAMPLER3D = 380, + USAMPLERCUBE = 381, + USAMPLER1DARRAY = 382, + USAMPLER2DARRAY = 383, + SAMPLER2DRECT = 384, + SAMPLER2DRECTSHADOW = 385, + ISAMPLER2DRECT = 386, + USAMPLER2DRECT = 387, + SAMPLERBUFFER = 388, + ISAMPLERBUFFER = 389, + USAMPLERBUFFER = 390, + SAMPLERCUBEARRAY = 391, + SAMPLERCUBEARRAYSHADOW = 392, + ISAMPLERCUBEARRAY = 393, + USAMPLERCUBEARRAY = 394, + SAMPLER2DMS = 395, + ISAMPLER2DMS = 396, + USAMPLER2DMS = 397, + SAMPLER2DMSARRAY = 398, + ISAMPLER2DMSARRAY = 399, + USAMPLER2DMSARRAY = 400, + SAMPLEREXTERNALOES = 401, + SAMPLER = 402, + SAMPLERSHADOW = 403, + TEXTURE1D = 404, + TEXTURE2D = 405, + TEXTURE3D = 406, + TEXTURECUBE = 407, + TEXTURE1DARRAY = 408, + TEXTURE2DARRAY = 409, + ITEXTURE1D = 410, + ITEXTURE2D = 411, + ITEXTURE3D = 412, + ITEXTURECUBE = 413, + ITEXTURE1DARRAY = 414, + ITEXTURE2DARRAY = 415, + UTEXTURE1D = 416, + UTEXTURE2D = 417, + UTEXTURE3D = 418, + UTEXTURECUBE = 419, + UTEXTURE1DARRAY = 420, + UTEXTURE2DARRAY = 421, + TEXTURE2DRECT = 422, + ITEXTURE2DRECT = 423, + UTEXTURE2DRECT = 424, + TEXTUREBUFFER = 425, + ITEXTUREBUFFER = 426, + UTEXTUREBUFFER = 427, + TEXTURECUBEARRAY = 428, + ITEXTURECUBEARRAY = 429, + UTEXTURECUBEARRAY = 430, + TEXTURE2DMS = 431, + ITEXTURE2DMS = 432, + UTEXTURE2DMS = 433, + TEXTURE2DMSARRAY = 434, + ITEXTURE2DMSARRAY = 435, + UTEXTURE2DMSARRAY = 436, + SUBPASSINPUT = 437, + SUBPASSINPUTMS = 438, + ISUBPASSINPUT = 439, + ISUBPASSINPUTMS = 440, + USUBPASSINPUT = 441, + USUBPASSINPUTMS = 442, + IMAGE1D = 443, + IIMAGE1D = 444, + UIMAGE1D = 445, + IMAGE2D = 446, + IIMAGE2D = 447, + UIMAGE2D = 448, + IMAGE3D = 449, + IIMAGE3D = 450, + UIMAGE3D = 451, + IMAGE2DRECT = 452, + IIMAGE2DRECT = 453, + UIMAGE2DRECT = 454, + IMAGECUBE = 455, + IIMAGECUBE = 456, + UIMAGECUBE = 457, + IMAGEBUFFER = 458, + IIMAGEBUFFER = 459, + UIMAGEBUFFER = 460, + IMAGE1DARRAY = 461, + IIMAGE1DARRAY = 462, + UIMAGE1DARRAY = 463, + IMAGE2DARRAY = 464, + IIMAGE2DARRAY = 465, + UIMAGE2DARRAY = 466, + IMAGECUBEARRAY = 467, + IIMAGECUBEARRAY = 468, + UIMAGECUBEARRAY = 469, + IMAGE2DMS = 470, + IIMAGE2DMS = 471, + UIMAGE2DMS = 472, + IMAGE2DMSARRAY = 473, + IIMAGE2DMSARRAY = 474, + UIMAGE2DMSARRAY = 475, + STRUCT = 476, + VOID = 477, + WHILE = 478, + IDENTIFIER = 479, + TYPE_NAME = 480, + FLOATCONSTANT = 481, + DOUBLECONSTANT = 482, + INTCONSTANT = 483, + UINTCONSTANT = 484, + INT64CONSTANT = 485, + UINT64CONSTANT = 486, + BOOLCONSTANT = 487, + FLOAT16CONSTANT = 488, + LEFT_OP = 489, + RIGHT_OP = 490, + INC_OP = 491, + DEC_OP = 492, + LE_OP = 493, + GE_OP = 494, + EQ_OP = 495, + NE_OP = 496, + AND_OP = 497, + OR_OP = 498, + XOR_OP = 499, + MUL_ASSIGN = 500, + DIV_ASSIGN = 501, + ADD_ASSIGN = 502, + MOD_ASSIGN = 503, + LEFT_ASSIGN = 504, + RIGHT_ASSIGN = 505, + AND_ASSIGN = 506, + XOR_ASSIGN = 507, + OR_ASSIGN = 508, + SUB_ASSIGN = 509, + LEFT_PAREN = 510, + RIGHT_PAREN = 511, + LEFT_BRACKET = 512, + RIGHT_BRACKET = 513, + LEFT_BRACE = 514, + RIGHT_BRACE = 515, + DOT = 516, + COMMA = 517, + COLON = 518, + EQUAL = 519, + SEMICOLON = 520, + BANG = 521, + DASH = 522, + TILDE = 523, + PLUS = 524, + STAR = 525, + SLASH = 526, + PERCENT = 527, + LEFT_ANGLE = 528, + RIGHT_ANGLE = 529, + VERTICAL_BAR = 530, + CARET = 531, + AMPERSAND = 532, + QUESTION = 533, + INVARIANT = 534, + PRECISE = 535, + HIGH_PRECISION = 536, + MEDIUM_PRECISION = 537, + LOW_PRECISION = 538, + PRECISION = 539, + PACKED = 540, + RESOURCE = 541, + SUPERP = 542 + }; #endif -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -union YYSTYPE +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE { -#line 66 "MachineIndependent/glslang.y" /* yacc.c:355 */ +/* Line 387 of yacc.c */ +#line 66 "glslang.y" struct { glslang::TSourceLoc loc; @@ -432,22 +452,35 @@ union YYSTYPE }; } interm; -#line 436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */ -}; -typedef union YYSTYPE YYSTYPE; +/* Line 387 of yacc.c */ +#line 458 "glslang_tab.cpp" +} YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif - +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus int yyparse (glslang::TParseContext* pParseContext); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ +#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 100 "MachineIndependent/glslang.y" /* yacc.c:358 */ +/* Line 390 of yacc.c */ +#line 100 "glslang.y" /* windows only pragma */ @@ -463,7 +496,8 @@ int yyparse (glslang::TParseContext* pParseContext); extern int yylex(YYSTYPE*, TParseContext&); -#line 467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */ +/* Line 390 of yacc.c */ +#line 501 "glslang_tab.cpp" #ifdef short # undef short @@ -477,8 +511,11 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#else +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; +#else +typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -498,7 +535,8 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -520,33 +558,6 @@ typedef short int yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -554,26 +565,24 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(N) (N) #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 +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; #endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +{ + return yyi; +} #endif - #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -591,7 +600,8 @@ typedef short int yytype_int16; # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -603,8 +613,8 @@ typedef short int yytype_int16; # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (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 @@ -620,7 +630,7 @@ typedef short int yytype_int16; # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -628,13 +638,15 @@ typedef short int yytype_int16; # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -644,7 +656,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -669,16 +681,16 @@ union yyalloc 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 \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) #endif @@ -697,35 +709,33 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 249 +#define YYFINAL 265 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 5966 +#define YYLAST 6373 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 271 +#define YYNTOKENS 288 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 100 /* YYNRULES -- Number of rules. */ -#define YYNRULES 422 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 554 +#define YYNRULES 439 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 571 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 525 +#define YYMAXUTOK 542 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint16 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -780,56 +790,224 @@ static const yytype_uint16 yytranslate[] = 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270 + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287 }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, + 19, 21, 23, 27, 29, 34, 36, 40, 43, 46, + 48, 50, 52, 55, 58, 61, 63, 66, 70, 73, + 75, 77, 79, 82, 85, 88, 90, 92, 94, 96, + 98, 102, 106, 110, 112, 116, 120, 122, 126, 130, + 132, 136, 140, 144, 148, 150, 154, 158, 160, 164, + 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, + 196, 197, 204, 206, 210, 212, 214, 216, 218, 220, + 222, 224, 226, 228, 230, 232, 234, 238, 240, 243, + 246, 251, 254, 258, 263, 266, 270, 275, 276, 283, + 286, 290, 293, 295, 297, 300, 304, 308, 311, 315, + 318, 320, 323, 325, 327, 329, 333, 338, 345, 351, + 353, 356, 360, 366, 371, 373, 376, 378, 380, 382, + 384, 386, 391, 393, 397, 399, 403, 405, 407, 409, + 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, + 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, + 452, 454, 456, 458, 460, 465, 467, 471, 473, 476, + 479, 483, 487, 492, 494, 496, 498, 500, 502, 504, + 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, + 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, + 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, + 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, + 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, + 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, + 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, + 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, + 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, + 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, + 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, + 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, + 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, + 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, + 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, + 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, + 826, 828, 830, 832, 834, 836, 838, 840, 842, 844, + 846, 848, 850, 852, 854, 856, 858, 860, 862, 864, + 866, 868, 870, 872, 873, 880, 881, 887, 889, 892, + 896, 901, 903, 907, 909, 912, 914, 918, 923, 925, + 929, 931, 933, 935, 937, 939, 941, 943, 945, 947, + 949, 952, 953, 954, 960, 962, 964, 965, 968, 969, + 972, 975, 979, 981, 984, 986, 989, 995, 999, 1001, + 1003, 1008, 1009, 1018, 1019, 1021, 1025, 1028, 1029, 1036, + 1037, 1046, 1047, 1055, 1057, 1059, 1061, 1062, 1065, 1069, + 1072, 1075, 1078, 1082, 1085, 1087, 1090, 1092, 1094, 1095 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 384, 0, -1, 224, -1, 289, -1, 228, -1, 229, + -1, 230, -1, 231, -1, 226, -1, 227, -1, 233, + -1, 232, -1, 255, 317, 256, -1, 290, -1, 291, + 257, 292, 258, -1, 293, -1, 291, 261, 224, -1, + 291, 236, -1, 291, 237, -1, 317, -1, 294, -1, + 295, -1, 297, 256, -1, 296, 256, -1, 298, 222, + -1, 298, -1, 298, 315, -1, 297, 262, 315, -1, + 299, 255, -1, 343, -1, 291, -1, 291, -1, 236, + 300, -1, 237, 300, -1, 301, 300, -1, 269, -1, + 267, -1, 266, -1, 268, -1, 300, -1, 302, 270, + 300, -1, 302, 271, 300, -1, 302, 272, 300, -1, + 302, -1, 303, 269, 302, -1, 303, 267, 302, -1, + 303, -1, 304, 234, 303, -1, 304, 235, 303, -1, + 304, -1, 305, 273, 304, -1, 305, 274, 304, -1, + 305, 238, 304, -1, 305, 239, 304, -1, 305, -1, + 306, 240, 305, -1, 306, 241, 305, -1, 306, -1, + 307, 277, 306, -1, 307, -1, 308, 276, 307, -1, + 308, -1, 309, 275, 308, -1, 309, -1, 310, 242, + 309, -1, 310, -1, 311, 244, 310, -1, 311, -1, + 312, 243, 311, -1, 312, -1, -1, 312, 278, 314, + 317, 263, 315, -1, 313, -1, 300, 316, 315, -1, + 264, -1, 245, -1, 246, -1, 248, -1, 247, -1, + 254, -1, 249, -1, 250, -1, 251, -1, 252, -1, + 253, -1, 315, -1, 317, 262, 315, -1, 313, -1, + 323, 265, -1, 330, 265, -1, 284, 346, 343, 265, + -1, 320, 265, -1, 320, 224, 265, -1, 320, 224, + 344, 265, -1, 339, 265, -1, 339, 224, 265, -1, + 339, 224, 322, 265, -1, -1, 339, 224, 259, 321, + 350, 260, -1, 262, 224, -1, 322, 262, 224, -1, + 324, 256, -1, 326, -1, 325, -1, 326, 328, -1, + 325, 262, 328, -1, 332, 224, 255, -1, 343, 224, + -1, 343, 224, 344, -1, 339, 327, -1, 327, -1, + 339, 329, -1, 329, -1, 343, -1, 331, -1, 330, + 262, 224, -1, 330, 262, 224, 344, -1, 330, 262, + 224, 344, 264, 354, -1, 330, 262, 224, 264, 354, + -1, 332, -1, 332, 224, -1, 332, 224, 344, -1, + 332, 224, 344, 264, 354, -1, 332, 224, 264, 354, + -1, 343, -1, 339, 343, -1, 279, -1, 75, -1, + 74, -1, 73, -1, 77, -1, 76, 255, 336, 256, + -1, 337, -1, 336, 262, 337, -1, 224, -1, 224, + 264, 318, -1, 55, -1, 280, -1, 340, -1, 339, + 340, -1, 341, -1, 335, -1, 346, -1, 334, -1, + 333, -1, 338, -1, 5, -1, 3, -1, 4, -1, + 50, -1, 48, -1, 49, -1, 47, -1, 52, -1, + 53, -1, 51, -1, 54, -1, 55, -1, 56, -1, + 57, -1, 58, -1, 59, -1, 60, -1, 25, -1, + 25, 255, 342, 256, -1, 225, -1, 342, 262, 225, + -1, 345, -1, 345, 344, -1, 257, 258, -1, 257, + 313, 258, -1, 344, 257, 258, -1, 344, 257, 313, + 258, -1, 222, -1, 7, -1, 8, -1, 13, -1, + 9, -1, 10, -1, 11, -1, 12, -1, 6, -1, + 41, -1, 42, -1, 43, -1, 61, -1, 62, -1, + 63, -1, 67, -1, 68, -1, 69, -1, 26, -1, + 27, -1, 28, -1, 29, -1, 30, -1, 31, -1, + 32, -1, 33, -1, 34, -1, 35, -1, 36, -1, + 37, -1, 38, -1, 39, -1, 40, -1, 44, -1, + 45, -1, 46, -1, 78, -1, 79, -1, 80, -1, + 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, + 86, -1, 64, -1, 65, -1, 66, -1, 87, -1, + 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, + 93, -1, 94, -1, 95, -1, 70, -1, 71, -1, + 72, -1, 96, -1, 97, -1, 98, -1, 99, -1, + 100, -1, 101, -1, 102, -1, 103, -1, 104, -1, + 105, -1, 106, -1, 107, -1, 108, -1, 109, -1, + 110, -1, 111, -1, 112, -1, 113, -1, 114, -1, + 115, -1, 116, -1, 136, -1, 137, -1, 117, -1, + 118, -1, 119, -1, 120, -1, 121, -1, 122, -1, + 138, -1, 123, -1, 124, -1, 125, -1, 126, -1, + 127, -1, 128, -1, 139, -1, 129, -1, 130, -1, + 131, -1, 132, -1, 133, -1, 134, -1, 135, -1, + 140, -1, 141, -1, 142, -1, 143, -1, 144, -1, + 145, -1, 147, -1, 148, -1, 149, -1, 150, -1, + 151, -1, 152, -1, 153, -1, 154, -1, 173, -1, + 155, -1, 156, -1, 157, -1, 158, -1, 159, -1, + 160, -1, 174, -1, 161, -1, 162, -1, 163, -1, + 164, -1, 165, -1, 166, -1, 175, -1, 167, -1, + 168, -1, 169, -1, 170, -1, 171, -1, 172, -1, + 176, -1, 177, -1, 178, -1, 179, -1, 180, -1, + 181, -1, 188, -1, 189, -1, 190, -1, 191, -1, + 192, -1, 193, -1, 194, -1, 195, -1, 196, -1, + 197, -1, 198, -1, 199, -1, 200, -1, 201, -1, + 202, -1, 203, -1, 204, -1, 205, -1, 206, -1, + 207, -1, 208, -1, 209, -1, 210, -1, 211, -1, + 212, -1, 213, -1, 214, -1, 215, -1, 216, -1, + 217, -1, 218, -1, 219, -1, 220, -1, 146, -1, + 182, -1, 183, -1, 184, -1, 185, -1, 186, -1, + 187, -1, 347, -1, 225, -1, 281, -1, 282, -1, + 283, -1, -1, 221, 224, 259, 348, 350, 260, -1, + -1, 221, 259, 349, 350, 260, -1, 351, -1, 350, + 351, -1, 343, 352, 265, -1, 339, 343, 352, 265, + -1, 353, -1, 352, 262, 353, -1, 224, -1, 224, + 344, -1, 315, -1, 259, 355, 260, -1, 259, 355, + 262, 260, -1, 354, -1, 355, 262, 354, -1, 319, + -1, 359, -1, 358, -1, 356, -1, 368, -1, 369, + -1, 372, -1, 375, -1, 376, -1, 383, -1, 259, + 260, -1, -1, -1, 259, 360, 367, 361, 260, -1, + 366, -1, 358, -1, -1, 364, 359, -1, -1, 365, + 358, -1, 259, 260, -1, 259, 367, 260, -1, 357, + -1, 367, 357, -1, 265, -1, 317, 265, -1, 19, + 255, 317, 256, 370, -1, 363, 17, 363, -1, 363, + -1, 317, -1, 332, 224, 264, 354, -1, -1, 22, + 255, 317, 256, 373, 259, 374, 260, -1, -1, 367, + -1, 23, 317, 263, -1, 24, 263, -1, -1, 223, + 255, 377, 371, 256, 362, -1, -1, 16, 378, 357, + 223, 255, 317, 256, 265, -1, -1, 18, 255, 379, + 380, 382, 256, 362, -1, 368, -1, 356, -1, 371, + -1, -1, 381, 265, -1, 381, 265, 317, -1, 15, + 265, -1, 14, 265, -1, 21, 265, -1, 21, 317, + 265, -1, 20, 265, -1, 385, -1, 384, 385, -1, + 386, -1, 319, -1, -1, 323, 387, 366, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 246, 246, 252, 255, 258, 262, 266, 270, 273, - 277, 280, 288, 291, 294, 297, 300, 305, 313, 320, - 327, 333, 337, 344, 347, 353, 360, 370, 378, 383, - 413, 419, 423, 427, 447, 448, 449, 450, 456, 457, - 462, 467, 476, 477, 482, 490, 491, 497, 506, 507, - 512, 517, 522, 530, 531, 539, 550, 551, 560, 561, - 570, 571, 580, 581, 589, 590, 598, 599, 607, 608, - 608, 626, 627, 642, 646, 650, 654, 659, 663, 667, - 671, 675, 679, 683, 690, 693, 704, 711, 716, 721, - 729, 733, 737, 741, 746, 751, 760, 760, 771, 775, - 782, 789, 792, 799, 807, 827, 845, 860, 883, 894, - 904, 914, 924, 933, 936, 940, 944, 949, 957, 962, - 967, 972, 977, 986, 997, 1024, 1033, 1040, 1047, 1054, - 1066, 1072, 1075, 1082, 1086, 1090, 1098, 1107, 1110, 1121, - 1124, 1127, 1131, 1135, 1139, 1146, 1150, 1162, 1176, 1181, - 1187, 1193, 1200, 1206, 1211, 1216, 1221, 1228, 1232, 1236, - 1240, 1244, 1248, 1254, 1266, 1269, 1274, 1278, 1287, 1292, - 1300, 1304, 1314, 1318, 1322, 1327, 1331, 1336, 1341, 1346, - 1350, 1355, 1360, 1365, 1371, 1377, 1383, 1388, 1393, 1398, - 1403, 1408, 1413, 1419, 1425, 1431, 1437, 1443, 1449, 1455, - 1461, 1467, 1472, 1477, 1482, 1487, 1492, 1497, 1502, 1507, - 1512, 1517, 1522, 1527, 1533, 1539, 1545, 1551, 1557, 1563, - 1569, 1575, 1581, 1587, 1593, 1599, 1604, 1609, 1614, 1619, - 1624, 1629, 1634, 1639, 1644, 1649, 1654, 1659, 1664, 1669, - 1674, 1679, 1684, 1689, 1694, 1699, 1704, 1709, 1714, 1719, - 1724, 1729, 1734, 1739, 1744, 1749, 1754, 1759, 1764, 1769, - 1774, 1779, 1784, 1789, 1794, 1799, 1804, 1809, 1814, 1819, - 1824, 1829, 1834, 1839, 1844, 1849, 1854, 1859, 1864, 1869, - 1874, 1879, 1884, 1889, 1894, 1899, 1904, 1909, 1914, 1919, - 1924, 1929, 1934, 1939, 1944, 1949, 1954, 1959, 1964, 1969, - 1974, 1979, 1984, 1989, 1994, 1999, 2004, 2009, 2014, 2019, - 2024, 2029, 2034, 2039, 2044, 2049, 2054, 2059, 2064, 2069, - 2074, 2079, 2084, 2089, 2094, 2099, 2104, 2109, 2114, 2119, - 2124, 2129, 2134, 2139, 2144, 2150, 2156, 2162, 2168, 2174, - 2180, 2186, 2191, 2207, 2212, 2217, 2225, 2225, 2236, 2236, - 2246, 2249, 2262, 2280, 2304, 2308, 2314, 2319, 2330, 2333, - 2339, 2348, 2351, 2357, 2361, 2362, 2368, 2369, 2370, 2371, - 2372, 2373, 2374, 2378, 2379, 2383, 2379, 2395, 2396, 2400, - 2400, 2407, 2407, 2421, 2424, 2432, 2440, 2451, 2452, 2456, - 2463, 2467, 2475, 2479, 2492, 2492, 2512, 2515, 2521, 2533, - 2545, 2545, 2560, 2560, 2576, 2576, 2597, 2600, 2606, 2609, - 2615, 2619, 2626, 2631, 2636, 2643, 2646, 2655, 2659, 2666, - 2669, 2675, 2675 + 0, 250, 250, 256, 259, 262, 266, 270, 274, 277, + 281, 287, 290, 298, 301, 304, 307, 310, 315, 323, + 330, 337, 343, 347, 354, 357, 363, 370, 380, 388, + 393, 423, 429, 433, 437, 457, 458, 459, 460, 466, + 467, 472, 477, 486, 487, 492, 500, 501, 507, 516, + 517, 522, 527, 532, 540, 541, 549, 560, 561, 570, + 571, 580, 581, 590, 591, 599, 600, 608, 609, 617, + 618, 618, 636, 637, 652, 656, 660, 664, 669, 673, + 677, 681, 685, 689, 693, 700, 703, 714, 721, 726, + 731, 739, 743, 747, 751, 756, 761, 770, 770, 781, + 785, 792, 799, 802, 809, 817, 837, 855, 870, 893, + 904, 914, 924, 934, 943, 946, 950, 954, 959, 967, + 972, 977, 982, 987, 996, 1007, 1034, 1043, 1050, 1057, + 1064, 1076, 1082, 1085, 1092, 1096, 1100, 1108, 1117, 1120, + 1131, 1134, 1137, 1141, 1145, 1149, 1156, 1160, 1172, 1186, + 1191, 1197, 1203, 1210, 1216, 1221, 1226, 1231, 1238, 1242, + 1246, 1250, 1254, 1258, 1264, 1276, 1279, 1284, 1288, 1297, + 1302, 1310, 1314, 1324, 1328, 1332, 1337, 1344, 1348, 1353, + 1358, 1363, 1367, 1372, 1377, 1382, 1388, 1394, 1400, 1408, + 1416, 1424, 1429, 1434, 1439, 1444, 1449, 1454, 1460, 1466, + 1472, 1478, 1484, 1490, 1496, 1502, 1508, 1513, 1518, 1523, + 1528, 1533, 1538, 1543, 1548, 1553, 1558, 1563, 1568, 1574, + 1580, 1586, 1592, 1598, 1604, 1610, 1616, 1622, 1628, 1634, + 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, + 1720, 1728, 1736, 1741, 1746, 1751, 1756, 1761, 1766, 1771, + 1776, 1781, 1786, 1791, 1796, 1801, 1806, 1811, 1816, 1821, + 1826, 1831, 1836, 1841, 1846, 1851, 1856, 1861, 1866, 1871, + 1876, 1881, 1886, 1891, 1896, 1901, 1906, 1911, 1916, 1921, + 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1961, 1966, 1971, + 1976, 1981, 1986, 1991, 1996, 2001, 2006, 2011, 2016, 2021, + 2026, 2031, 2036, 2041, 2046, 2051, 2056, 2061, 2066, 2071, + 2076, 2081, 2086, 2091, 2096, 2101, 2106, 2111, 2116, 2121, + 2126, 2131, 2136, 2141, 2146, 2151, 2156, 2161, 2166, 2171, + 2176, 2181, 2186, 2191, 2196, 2201, 2206, 2211, 2216, 2221, + 2226, 2231, 2236, 2241, 2246, 2251, 2256, 2261, 2266, 2271, + 2276, 2281, 2287, 2293, 2299, 2305, 2311, 2317, 2323, 2328, + 2344, 2349, 2354, 2362, 2362, 2373, 2373, 2383, 2386, 2399, + 2417, 2441, 2445, 2451, 2456, 2467, 2470, 2476, 2485, 2488, + 2494, 2498, 2499, 2505, 2506, 2507, 2508, 2509, 2510, 2511, + 2515, 2516, 2520, 2516, 2532, 2533, 2537, 2537, 2544, 2544, + 2558, 2561, 2569, 2577, 2588, 2589, 2593, 2600, 2604, 2612, + 2616, 2629, 2629, 2649, 2652, 2658, 2670, 2682, 2682, 2697, + 2697, 2713, 2713, 2734, 2737, 2743, 2746, 2752, 2756, 2763, + 2768, 2773, 2780, 2783, 2792, 2796, 2803, 2806, 2812, 2812 }; #endif @@ -839,31 +1017,34 @@ static const yytype_uint16 yyrline[] = static const char *const yytname[] = { "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "CONST", "BOOL", - "FLOAT", "DOUBLE", "INT", "UINT", "INT64_T", "UINT64_T", "BREAK", - "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH", - "CASE", "DEFAULT", "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", "IVEC2", - "IVEC3", "IVEC4", "I64VEC2", "I64VEC3", "I64VEC4", "UVEC2", "UVEC3", - "UVEC4", "U64VEC2", "U64VEC3", "U64VEC4", "VEC2", "VEC3", "VEC4", "MAT2", - "MAT3", "MAT4", "CENTROID", "IN", "OUT", "INOUT", "UNIFORM", "PATCH", - "SAMPLE", "BUFFER", "SHARED", "COHERENT", "VOLATILE", "RESTRICT", - "READONLY", "WRITEONLY", "DVEC2", "DVEC3", "DVEC4", "DMAT2", "DMAT3", - "DMAT4", "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", + "FLOAT", "DOUBLE", "INT", "UINT", "INT64_T", "UINT64_T", "FLOAT16_T", + "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", + "SWITCH", "CASE", "DEFAULT", "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", + "IVEC2", "IVEC3", "IVEC4", "I64VEC2", "I64VEC3", "I64VEC4", "UVEC2", + "UVEC3", "UVEC4", "U64VEC2", "U64VEC3", "U64VEC4", "VEC2", "VEC3", + "VEC4", "MAT2", "MAT3", "MAT4", "CENTROID", "IN", "OUT", "INOUT", + "UNIFORM", "PATCH", "SAMPLE", "BUFFER", "SHARED", "COHERENT", "VOLATILE", + "RESTRICT", "READONLY", "WRITEONLY", "DVEC2", "DVEC3", "DVEC4", "DMAT2", + "DMAT3", "DMAT4", "F16VEC2", "F16VEC3", "F16VEC4", "F16MAT2", "F16MAT3", + "F16MAT4", "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", "__EXPLICITINTERPAMD", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "DMAT2X2", "DMAT2X3", "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", "DMAT4X4", - "ATOMIC_UINT", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", - "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", - "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", - "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", - "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", - "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY", - "USAMPLER2DARRAY", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", - "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", - "USAMPLERBUFFER", "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", - "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", "SAMPLER2DMS", "ISAMPLER2DMS", - "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", - "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLER", "SAMPLERSHADOW", - "TEXTURE1D", "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE1DARRAY", + "F16MAT2X2", "F16MAT2X3", "F16MAT2X4", "F16MAT3X2", "F16MAT3X3", + "F16MAT3X4", "F16MAT4X2", "F16MAT4X3", "F16MAT4X4", "ATOMIC_UINT", + "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", "SAMPLER1DSHADOW", + "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER1DARRAY", + "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", "SAMPLER2DARRAYSHADOW", + "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", + "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", "USAMPLER2D", + "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY", "USAMPLER2DARRAY", + "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", + "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", + "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", + "USAMPLERCUBEARRAY", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", + "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", + "SAMPLEREXTERNALOES", "SAMPLER", "SAMPLERSHADOW", "TEXTURE1D", + "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE1DARRAY", "TEXTURE2DARRAY", "ITEXTURE1D", "ITEXTURE2D", "ITEXTURE3D", "ITEXTURECUBE", "ITEXTURE1DARRAY", "ITEXTURE2DARRAY", "UTEXTURE1D", "UTEXTURE2D", "UTEXTURE3D", "UTEXTURECUBE", "UTEXTURE1DARRAY", @@ -882,11 +1063,11 @@ static const char *const yytname[] = "UIMAGE2DMS", "IMAGE2DMSARRAY", "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", "STRUCT", "VOID", "WHILE", "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "DOUBLECONSTANT", "INTCONSTANT", "UINTCONSTANT", "INT64CONSTANT", - "UINT64CONSTANT", "BOOLCONSTANT", "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", + "UINT64CONSTANT", "BOOLCONSTANT", "FLOAT16CONSTANT", "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", @@ -925,13 +1106,13 @@ static const char *const yytname[] = "switch_statement_list", "case_label", "iteration_statement", "$@10", "$@11", "$@12", "for_init_statement", "conditionopt", "for_rest_statement", "jump_statement", "translation_unit", - "external_declaration", "function_definition", "$@13", YY_NULLPTR + "external_declaration", "function_definition", "$@13", YY_NULL }; #endif # ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -961,370 +1142,447 @@ static const yytype_uint16 yytoknum[] = 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, - 525 + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542 }; # endif -#define YYPACT_NINF -495 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-495))) - -#define YYTABLE_NINF -380 - -#define yytable_value_is_error(Yytable_value) \ - 0 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 288, 289, 290, 290, 290, 290, 290, 290, 290, + 290, 290, 290, 291, 291, 291, 291, 291, 291, 292, + 293, 294, 295, 295, 296, 296, 297, 297, 298, 299, + 299, 300, 300, 300, 300, 301, 301, 301, 301, 302, + 302, 302, 302, 303, 303, 303, 304, 304, 304, 305, + 305, 305, 305, 305, 306, 306, 306, 307, 307, 308, + 308, 309, 309, 310, 310, 311, 311, 312, 312, 313, + 314, 313, 315, 315, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 317, 317, 318, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 321, 320, 322, + 322, 323, 324, 324, 325, 325, 326, 327, 327, 328, + 328, 328, 328, 329, 330, 330, 330, 330, 330, 331, + 331, 331, 331, 331, 332, 332, 333, 334, 334, 334, + 334, 335, 336, 336, 337, 337, 337, 338, 339, 339, + 340, 340, 340, 340, 340, 340, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 342, 342, 343, 343, 344, + 344, 344, 344, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 346, 346, 346, 348, 347, 349, 347, 350, 350, 351, + 351, 352, 352, 353, 353, 354, 354, 354, 355, 355, + 356, 357, 357, 358, 358, 358, 358, 358, 358, 358, + 359, 360, 361, 359, 362, 362, 364, 363, 365, 363, + 366, 366, 367, 367, 368, 368, 369, 370, 370, 371, + 371, 373, 372, 374, 374, 375, 375, 377, 376, 378, + 376, 379, 376, 380, 380, 381, 381, 382, 382, 383, + 383, 383, 383, 383, 384, 384, 385, 385, 387, 386 +}; - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = { - 2402, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -216, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -198, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -190, -495, -495, -495, -495, -495, -495, -495, - -127, -495, -189, -193, -158, -149, 3885, -207, -495, -98, - -495, -495, -495, -495, 2910, -495, -495, -495, -106, -495, - -495, 547, -495, -495, -62, -45, -90, -495, 5757, -217, - -495, -495, -86, -495, 3885, -495, -495, -495, 3885, -51, - -50, -495, -208, -155, -495, -495, -495, 4339, -81, -495, - -495, -495, -185, -495, -87, -157, -495, -495, 3885, -83, - -495, -204, 812, -495, -495, -495, -495, -106, -183, -495, - 4575, -162, -495, -47, -495, -119, -495, -495, -495, -495, - -495, -495, -495, -495, 5291, 5291, 5291, -495, -495, -495, - -495, -495, -495, -495, -195, -495, -495, -495, -77, -150, - 5524, -72, -495, 5291, -111, -144, -167, -194, -147, -93, - -91, -89, -55, -56, -213, -69, -495, 4822, -495, -36, - 5291, -495, -45, 3885, 3885, -34, 3156, -495, -495, -495, - -73, -71, -495, -60, -59, -66, 5058, -54, 5291, -70, - -49, -58, -495, -495, -163, -495, -495, -118, -495, -193, - -46, -495, -495, -495, -495, 1077, -495, -495, -495, -495, - -495, -495, -81, 4575, -161, 4575, -495, -495, 4575, 3885, - -495, -25, -495, -495, -495, -145, -495, -495, 5291, -21, - -495, -495, 5291, -48, -495, -495, -495, 5291, 5291, 5291, - 5291, 5291, 5291, 5291, 5291, 5291, 5291, 5291, 5291, 5291, - 5291, 5291, 5291, 5291, 5291, 5291, -495, -495, -495, -44, - -495, -495, -495, -495, 3399, -34, -106, -117, -495, -495, - -495, -495, -495, 1342, -495, 5291, -495, -495, -113, 5291, - -154, -495, -495, -495, 1342, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, 5291, 5291, -495, -495, - -495, -495, 4575, -495, -92, -495, 3642, -495, -495, -43, - -57, -495, -495, -495, -495, -495, -111, -111, -144, -144, - -167, -167, -167, -167, -194, -194, -147, -93, -91, -89, - -55, -56, 5291, -495, -495, -112, -81, -34, -495, -14, - 2137, -136, -495, -134, -495, 2646, 1342, -495, -495, -495, - -495, 4092, -495, -495, -131, -495, -495, -42, -495, -495, - 2646, -39, -495, -57, -9, 3885, -35, -38, -495, -495, - 5291, 5291, -495, -41, -31, 184, -32, 1872, -495, -30, - -29, 1607, -495, -495, -132, 5291, 1607, -39, -495, -495, - 1342, 4575, -495, -495, -495, -37, -57, -495, -495, 1342, - -27, -495, -495, -495 + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 4, 1, 3, 2, 2, 1, + 1, 1, 2, 2, 2, 1, 2, 3, 2, 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, 3, 1, 3, 1, 3, 1, + 0, 6, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 2, 2, + 4, 2, 3, 4, 2, 3, 4, 0, 6, 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, + 1, 4, 1, 3, 1, 3, 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, 4, 1, 3, 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, 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, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 6, 0, 5, 1, 2, 3, + 4, 1, 3, 1, 2, 1, 3, 4, 1, 3, + 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, 5, 3, 1, 1, + 4, 0, 8, 0, 1, 3, 2, 0, 6, 0, + 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, + 2, 2, 3, 2, 1, 2, 1, 1, 0, 3 }; - /* 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. */ +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 146, 147, 145, 179, 173, 174, 175, 176, 177, - 178, 162, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 180, 181, 182, - 201, 202, 203, 151, 149, 150, 148, 154, 152, 153, - 155, 156, 157, 158, 159, 160, 161, 183, 184, 185, - 213, 214, 215, 128, 127, 126, 0, 129, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 239, 240, - 241, 242, 243, 244, 246, 247, 248, 249, 250, 251, - 253, 254, 255, 256, 257, 258, 259, 237, 238, 245, - 252, 260, 261, 262, 263, 264, 265, 334, 266, 267, - 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, - 279, 280, 282, 283, 284, 285, 286, 287, 289, 290, - 291, 292, 293, 294, 274, 281, 288, 295, 296, 297, - 298, 299, 300, 335, 336, 337, 338, 339, 340, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 0, 172, 342, 125, 136, 343, 344, 345, - 0, 420, 0, 421, 0, 102, 101, 0, 113, 118, - 143, 142, 140, 144, 0, 137, 139, 123, 166, 141, - 341, 0, 417, 419, 0, 0, 0, 348, 0, 0, - 90, 87, 0, 100, 0, 109, 103, 111, 0, 112, - 0, 88, 119, 0, 93, 138, 124, 0, 167, 1, - 418, 164, 0, 135, 133, 0, 131, 346, 0, 0, - 91, 0, 0, 422, 104, 108, 110, 106, 114, 105, - 0, 120, 96, 0, 94, 0, 2, 8, 9, 4, - 5, 6, 7, 10, 0, 0, 0, 168, 36, 35, - 37, 34, 3, 12, 30, 14, 19, 20, 0, 0, - 24, 0, 38, 0, 42, 45, 48, 53, 56, 58, - 60, 62, 64, 66, 68, 0, 28, 0, 163, 0, - 0, 130, 0, 0, 0, 0, 0, 350, 89, 92, - 0, 0, 402, 0, 0, 0, 0, 0, 0, 0, - 0, 374, 383, 387, 38, 71, 84, 0, 363, 0, - 123, 366, 385, 365, 364, 0, 367, 368, 369, 370, - 371, 372, 107, 0, 115, 0, 358, 122, 0, 0, - 98, 0, 95, 31, 32, 0, 16, 17, 0, 0, - 22, 21, 0, 172, 25, 27, 33, 0, 0, 0, + 0, 147, 148, 146, 181, 174, 175, 177, 178, 179, + 180, 176, 163, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 182, 183, + 184, 206, 207, 208, 152, 150, 151, 149, 155, 153, + 154, 156, 157, 158, 159, 160, 161, 162, 185, 186, + 187, 218, 219, 220, 188, 189, 190, 230, 231, 232, + 129, 128, 127, 0, 130, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 256, 257, 258, 259, 260, 261, + 263, 264, 265, 266, 267, 268, 270, 271, 272, 273, + 274, 275, 276, 254, 255, 262, 269, 277, 278, 279, + 280, 281, 282, 351, 283, 284, 285, 286, 287, 288, + 289, 290, 292, 293, 294, 295, 296, 297, 299, 300, + 301, 302, 303, 304, 306, 307, 308, 309, 310, 311, + 291, 298, 305, 312, 313, 314, 315, 316, 317, 352, + 353, 354, 355, 356, 357, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 0, 173, + 359, 126, 137, 360, 361, 362, 0, 437, 0, 438, + 0, 103, 102, 0, 114, 119, 144, 143, 141, 145, + 0, 138, 140, 124, 167, 142, 358, 0, 434, 436, + 0, 0, 0, 365, 0, 0, 91, 88, 0, 101, + 0, 110, 104, 112, 0, 113, 0, 89, 120, 0, + 94, 139, 125, 0, 168, 1, 435, 165, 0, 136, + 134, 0, 132, 363, 0, 0, 92, 0, 0, 439, + 105, 109, 111, 107, 115, 106, 0, 121, 97, 0, + 95, 0, 2, 8, 9, 4, 5, 6, 7, 11, + 10, 0, 0, 0, 169, 37, 36, 38, 35, 3, + 13, 31, 15, 20, 21, 0, 0, 25, 0, 39, + 0, 43, 46, 49, 54, 57, 59, 61, 63, 65, + 67, 69, 0, 29, 0, 164, 0, 0, 131, 0, + 0, 0, 0, 0, 367, 90, 93, 0, 0, 419, + 0, 0, 0, 0, 0, 0, 0, 0, 391, 400, + 404, 39, 72, 85, 0, 380, 0, 124, 383, 402, + 382, 381, 0, 384, 385, 386, 387, 388, 389, 108, + 0, 116, 0, 375, 123, 0, 0, 99, 0, 96, + 32, 33, 0, 17, 18, 0, 0, 23, 22, 0, + 173, 26, 28, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 69, 169, 170, 0, - 165, 86, 134, 132, 0, 0, 356, 0, 354, 349, - 351, 413, 412, 0, 404, 0, 416, 414, 0, 0, - 0, 399, 400, 373, 0, 74, 75, 77, 76, 79, - 80, 81, 82, 83, 78, 73, 0, 0, 388, 384, - 386, 117, 0, 361, 0, 121, 0, 99, 11, 0, - 18, 15, 26, 39, 40, 41, 44, 43, 46, 47, - 51, 52, 49, 50, 54, 55, 57, 59, 61, 63, - 65, 67, 0, 171, 347, 0, 357, 0, 352, 0, - 0, 0, 415, 0, 398, 0, 375, 72, 85, 116, - 359, 0, 97, 13, 0, 353, 355, 0, 407, 406, - 409, 381, 394, 392, 0, 0, 0, 0, 360, 362, - 0, 0, 408, 0, 0, 391, 0, 0, 389, 0, - 0, 0, 376, 70, 0, 410, 0, 381, 380, 382, - 396, 0, 378, 401, 377, 0, 411, 405, 390, 397, - 0, 393, 403, 395 + 0, 0, 0, 70, 170, 171, 0, 166, 87, 135, + 133, 0, 0, 373, 0, 371, 366, 368, 430, 429, + 0, 421, 0, 433, 431, 0, 0, 0, 416, 417, + 390, 0, 75, 76, 78, 77, 80, 81, 82, 83, + 84, 79, 74, 0, 0, 405, 401, 403, 118, 0, + 378, 0, 122, 0, 100, 12, 0, 19, 16, 27, + 40, 41, 42, 45, 44, 47, 48, 52, 53, 50, + 51, 55, 56, 58, 60, 62, 64, 66, 68, 0, + 172, 364, 0, 374, 0, 369, 0, 0, 0, 432, + 0, 415, 0, 392, 73, 86, 117, 376, 0, 98, + 14, 0, 370, 372, 0, 424, 423, 426, 398, 411, + 409, 0, 0, 0, 0, 377, 379, 0, 0, 425, + 0, 0, 408, 0, 0, 406, 0, 0, 0, 393, + 71, 0, 427, 0, 398, 397, 399, 413, 0, 395, + 418, 394, 0, 428, 422, 407, 414, 0, 410, 420, + 412 }; - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { - -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, - -495, -495, -53, -495, -271, -252, -272, -244, -187, -184, - -182, -181, -179, -186, -495, -237, -495, -266, -495, -280, - -495, 3, -495, -495, -495, 5, -495, -495, -495, -15, - -7, -5, -495, -495, -475, -495, -495, -495, -495, -85, - -495, -205, -212, -495, -495, 0, -221, -495, 29, -495, - -495, -495, -308, -310, -176, -251, -351, -495, -250, -348, - -494, -284, -495, -495, -293, -292, -495, -495, 12, -423, - -243, -495, -495, -264, -495, -495, -495, -495, -495, -495, - -495, -495, -495, -495, -495, -495, -495, 27, -495, -495 + -1, 309, 310, 311, 476, 312, 313, 314, 315, 316, + 317, 318, 361, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 362, 499, 363, 463, 364, + 429, 365, 218, 386, 291, 366, 220, 221, 222, 251, + 252, 253, 223, 224, 225, 226, 227, 228, 271, 272, + 229, 230, 231, 232, 268, 333, 264, 234, 235, 236, + 340, 274, 343, 344, 434, 435, 384, 471, 368, 369, + 370, 371, 451, 534, 560, 542, 543, 544, 561, 372, + 373, 374, 545, 533, 375, 546, 567, 376, 377, 512, + 440, 507, 527, 540, 541, 378, 237, 238, 239, 248 }; - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -512 +static const yytype_int16 yypact[] = +{ + 2538, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -235, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -201, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, -512, -203, -512, + -512, -512, -512, -512, -512, -512, -153, -512, -210, -220, + -152, -189, 4119, -160, -512, -128, -512, -512, -512, -512, + 3079, -512, -512, -512, -122, -512, -512, 564, -512, -512, + -72, -46, -105, -512, 6148, -216, -512, -512, -102, -512, + 4119, -512, -512, -512, 4119, -68, -66, -512, -225, -187, + -512, -512, -512, 4606, -98, -512, -512, -512, -179, -512, + -104, -172, -512, -512, 4119, -101, -512, -186, 846, -512, + -512, -512, -512, -122, -233, -512, 4870, -217, -512, -63, + -512, -151, -512, -512, -512, -512, -512, -512, -512, -512, + -512, 5648, 5648, 5648, -512, -512, -512, -512, -512, -512, + -512, -209, -512, -512, -512, -94, -170, 5898, -92, -512, + 5648, -139, -133, -109, -223, -103, -111, -108, -106, -71, + -74, -218, -86, -512, 5134, -512, -52, 5648, -512, -46, + 4119, 4119, -50, 3342, -512, -512, -512, -90, -89, -512, + -78, -76, -85, 5398, -70, 5648, -80, -69, -64, -512, + -512, -184, -512, -512, -150, -512, -220, -67, -512, -512, + -512, -512, 1128, -512, -512, -512, -512, -512, -512, -98, + 4870, -183, 4870, -512, -512, 4870, 4119, -512, -40, -512, + -512, -512, -169, -512, -512, 5648, -35, -512, -512, 5648, + -65, -512, -512, -512, 5648, 5648, 5648, 5648, 5648, 5648, + 5648, 5648, 5648, 5648, 5648, 5648, 5648, 5648, 5648, 5648, + 5648, 5648, 5648, -512, -512, -512, -61, -512, -512, -512, + -512, 3601, -50, -122, -144, -512, -512, -512, -512, -512, + 1410, -512, 5648, -512, -512, -142, 5648, -123, -512, -512, + -512, 1410, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -512, 5648, 5648, -512, -512, -512, -512, 4870, + -512, -226, -512, 3860, -512, -512, -60, -62, -512, -512, + -512, -512, -512, -139, -139, -133, -133, -109, -109, -109, + -109, -223, -223, -103, -111, -108, -106, -71, -74, 5648, + -512, -512, -138, -98, -50, -512, -33, 2256, -168, -512, + -167, -512, 2798, 1410, -512, -512, -512, -512, 4342, -512, + -512, -121, -512, -512, -56, -512, -512, 2798, -58, -512, + -62, -32, 4119, -49, -51, -512, -512, 5648, 5648, -512, + -57, -45, 177, -55, 1974, -512, -47, -44, 1692, -512, + -512, -165, 5648, 1692, -58, -512, -512, 1410, 4870, -512, + -512, -512, -48, -62, -512, -512, 1410, -42, -512, -512, + -512 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = { - -1, 292, 293, 294, 459, 295, 296, 297, 298, 299, - 300, 301, 344, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 345, 482, 346, 446, 347, - 412, 348, 202, 369, 275, 349, 204, 205, 206, 235, - 236, 237, 207, 208, 209, 210, 211, 212, 255, 256, - 213, 214, 215, 216, 252, 316, 248, 218, 219, 220, - 323, 258, 326, 327, 417, 418, 367, 454, 351, 352, - 353, 354, 434, 517, 543, 525, 526, 527, 544, 355, - 356, 357, 528, 516, 358, 529, 550, 359, 360, 495, - 423, 490, 510, 523, 524, 361, 221, 222, 223, 232 + -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, + -512, -512, -96, -512, -263, -262, -304, -264, -204, -199, + -205, -197, -206, -196, -512, -252, -512, -282, -512, -296, + -512, 3, -512, -512, -512, 6, -512, -512, -512, -29, + -23, -26, -512, -512, -489, -512, -512, -512, -512, -118, + -512, -221, -228, -512, -512, 0, -240, -512, 13, -512, + -512, -512, -328, -330, -200, -271, -363, -512, -273, -364, + -511, -308, -512, -512, -314, -309, -512, -512, -2, -441, + -260, -512, -512, -279, -512, -512, -512, -512, -512, -512, + -512, -512, -512, -512, -512, -512, -512, 12, -512, -512 }; - /* 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. */ +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -397 static const yytype_int16 yytable[] = { - 217, 238, 245, 201, 366, 203, 375, 450, 261, 253, - 315, 496, 451, 405, 453, 414, 420, 455, 226, 229, - 514, 271, 224, 247, 376, 377, 245, 394, 395, 238, - 269, 260, 247, 539, 384, 514, 317, 542, 240, 270, - 225, 241, 542, -29, 329, 378, 362, 364, 406, 379, - 392, 393, 227, 324, 318, 231, 428, 247, 430, 230, - 319, 456, 396, 397, 363, 435, 436, 437, 438, 439, - 440, 441, 442, 443, 444, 489, 398, 399, 317, 317, - 409, 233, 321, 411, 445, 368, 452, 272, 322, 381, - 273, 447, 494, 274, 458, 382, 234, 366, 460, 366, - 447, 499, 366, 511, 420, 512, 390, 545, 391, 447, - 242, 447, 245, 447, 447, 520, 462, 549, 324, 466, - 467, 324, 470, 471, 472, 473, 371, 447, 487, 372, - 448, 488, 447, 487, 247, 492, 505, 197, 198, 199, - 468, 469, 387, 388, 389, 491, 420, 251, 450, 493, - 519, 500, 257, 501, 474, 475, 262, 267, 268, 317, - 320, 370, 380, 254, 324, 328, 385, 400, 401, 402, - 403, 404, 407, 410, 416, 421, 431, 422, 424, 425, - 497, 498, 426, 457, 429, 433, 366, 461, 447, 432, - 551, -23, -28, 507, 302, 486, 521, 483, 503, 530, - 537, 450, 504, -379, 531, 532, 239, 535, 536, 324, - 341, 552, 540, 476, 246, 513, 553, 477, 541, 481, - 478, 217, 479, 265, 201, 480, 203, 264, 259, 228, - 513, 373, 374, 266, 239, 366, 506, 413, 239, 485, - 508, 534, 538, 547, 263, 548, 522, 509, 250, 0, - 386, 324, 0, 0, 533, 546, 0, 0, 325, 0, - 0, 0, 350, 0, 302, 0, 0, 302, 0, 0, - 0, 0, 0, 0, 0, 366, 0, 0, 0, 0, + 233, 254, 261, 217, 383, 277, 219, 392, 467, 269, + 513, 332, 431, 437, 245, 411, 412, 468, 287, 470, + 240, 242, 472, 531, 263, 422, 261, 393, 394, 254, + 285, 380, 263, 556, 517, 401, 518, 559, 531, 286, + 334, 263, 559, 379, 381, 247, -30, 385, 395, 276, + 413, 414, 396, 341, 241, 246, 243, 445, 473, 447, + 423, 452, 453, 454, 455, 456, 457, 458, 459, 460, + 461, 334, 288, 250, 334, 289, 506, 335, 290, 346, + 462, 469, 426, 336, 338, 428, 398, 475, 528, 529, + 339, 562, 399, 464, 464, 464, 258, 464, 383, 477, + 383, 437, 256, 383, 249, 257, 516, 487, 488, 489, + 490, 388, 464, 261, 389, 465, 566, 479, 504, 341, + 464, 505, 341, 509, 504, 409, 410, 522, 213, 214, + 215, 404, 405, 406, 407, 263, 408, 415, 416, 464, + 511, 464, 537, 437, 483, 484, 508, 485, 486, 467, + 510, 491, 492, 267, 273, 536, 283, 278, 284, 334, + 337, 387, 397, 402, 345, 341, 417, 319, 418, 419, + 421, 420, 424, 427, 433, 438, 439, 441, 270, 442, + 443, 514, 515, 448, 474, 446, 449, 383, -29, 478, + 524, -24, 547, 503, 554, 568, 450, 500, 520, 538, + 464, -396, 467, 521, 358, 390, 391, 548, 552, 549, + 341, 553, 557, 493, 495, 497, 530, 569, 570, 494, + 558, 430, 255, 496, 403, 281, 498, 280, 282, 244, + 262, 530, 502, 523, 525, 555, 383, 233, 319, 564, + 217, 319, 551, 219, 275, 565, 279, 526, 539, 266, + 255, 0, 341, 0, 255, 550, 563, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 245, 0, 515, 0, 0, 0, 0, + 0, 0, 0, 0, 342, 0, 383, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 325, 415, 0, 325, 0, 0, 0, - 0, 0, 0, 0, 463, 464, 465, 302, 302, 302, - 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, - 302, 302, 302, 0, 0, 350, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, + 0, 532, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 261, 0, 532, 0, 480, 481, + 482, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 342, 432, 0, 342, 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, 367, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 325, 0, 0, 0, 0, 0, - 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, + 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 350, 0, 0, 0, 0, 350, 350, 0, 0, 0, + 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 350, 0, 0, 0, 0, 246, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 350, 0, 0, - 0, 350, 0, 0, 0, 0, 350, 0, 0, 0, - 350, 0, 0, 0, 0, 0, 0, 249, 0, 350, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 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, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, + 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, + 0, 0, 262, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 367, 0, 0, 0, 367, 0, + 0, 0, 0, 367, 0, 0, 0, 367, 0, 0, + 0, 0, 0, 0, 265, 0, 367, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 0, 0, 210, 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, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, - 196, 197, 198, 199, 200, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 330, 331, 332, 0, 333, - 334, 335, 336, 337, 338, 339, 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 340, - 276, 194, 277, 278, 279, 280, 281, 282, 283, 0, - 0, 284, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 286, 0, 0, 0, 341, 342, 0, 0, 0, 0, - 343, 288, 289, 290, 291, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 195, 196, 197, 198, 199, 200, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 330, 331, 332, 0, 333, 334, 335, 336, 337, 338, - 339, 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, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 340, 276, 194, 277, 278, 279, - 280, 281, 282, 283, 0, 0, 284, 285, 0, 0, + 0, 0, 0, 211, 212, 213, 214, 215, 216, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 347, 348, 349, 0, 350, 351, 352, 353, 354, 355, + 356, 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, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 357, + 292, 210, 293, 294, 295, 296, 297, 298, 299, 300, + 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 286, 0, 0, 0, 341, - 449, 0, 0, 0, 0, 343, 288, 289, 290, 291, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, - 196, 197, 198, 199, 200, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 330, 331, 332, 0, 333, - 334, 335, 336, 337, 338, 339, 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 340, - 276, 194, 277, 278, 279, 280, 281, 282, 283, 0, - 0, 284, 285, 0, 0, 0, 0, 0, 0, 0, + 0, 303, 0, 0, 0, 358, 359, 0, 0, 0, + 0, 360, 305, 306, 307, 308, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 211, 212, 213, 214, 215, + 216, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 347, 348, 349, 0, 350, 351, 352, 353, + 354, 355, 356, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 357, 292, 210, 293, 294, 295, 296, 297, 298, + 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 286, 0, 0, 0, 341, 0, 0, 0, 0, 0, - 343, 288, 289, 290, 291, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 195, 196, 197, 198, 199, 200, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 330, 331, 332, 0, 333, 334, 335, 336, 337, 338, - 339, 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, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 340, 276, 194, 277, 278, 279, - 280, 281, 282, 283, 0, 0, 284, 285, 0, 0, + 0, 0, 0, 303, 0, 0, 0, 358, 466, 0, + 0, 0, 0, 360, 305, 306, 307, 308, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 211, 212, 213, + 214, 215, 216, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 347, 348, 349, 0, 350, 351, + 352, 353, 354, 355, 356, 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, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 357, 292, 210, 293, 294, 295, 296, + 297, 298, 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 286, 0, 0, 0, 262, - 0, 0, 0, 0, 0, 343, 288, 289, 290, 291, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, - 196, 197, 198, 199, 200, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 330, 331, 332, 0, 333, - 334, 335, 336, 337, 338, 339, 11, 12, 13, 14, + 0, 0, 0, 0, 0, 303, 0, 0, 0, 358, + 0, 0, 0, 0, 0, 360, 305, 306, 307, 308, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, + 212, 213, 214, 215, 216, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 347, 348, 349, 0, + 350, 351, 352, 353, 354, 355, 356, 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, @@ -1342,67 +1600,46 @@ static const yytype_int16 yytable[] = 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 340, - 276, 194, 277, 278, 279, 280, 281, 282, 283, 0, - 0, 284, 285, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 286, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 343, 288, 289, 290, 291, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 195, 196, 197, 198, 199, 200, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 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, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 0, 276, 194, 277, 278, 279, - 280, 281, 282, 283, 0, 0, 284, 285, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 286, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 343, 288, 289, 290, 291, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, - 196, 197, 198, 199, 200, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 0, - 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 357, 292, 210, 293, 294, + 295, 296, 297, 298, 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, + 0, 278, 0, 0, 0, 0, 0, 360, 305, 306, + 307, 308, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 211, 212, 213, 214, 215, 216, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 347, 348, + 349, 0, 350, 351, 352, 353, 354, 355, 356, 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, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 357, 292, 210, + 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, + 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, + 305, 306, 307, 308, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 211, 212, 213, 214, 215, 216, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, - 0, 0, 0, 0, 195, 196, 197, 198, 199, 200, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 0, 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, @@ -1420,64 +1657,71 @@ static const yytype_int16 yytable[] = 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 0, 276, 194, 277, 278, 279, 280, - 281, 282, 283, 0, 0, 284, 285, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 286, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 288, 289, 290, 291, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 195, 196, - 197, 198, 199, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 0, 243, 194, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 0, + 292, 210, 293, 294, 295, 296, 297, 298, 299, 300, + 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 303, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 360, 305, 306, 307, 308, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 211, 212, 213, 214, 215, + 216, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 0, 0, 210, 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, 0, 244, 1, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, - 0, 0, 195, 196, 197, 198, 199, 0, 0, 0, - 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, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 0, 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 0, 0, 0, 0, 0, 211, 212, 213, + 214, 215, 216, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 0, 292, 210, 293, 294, 295, 296, 297, 298, + 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 419, - 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 0, 0, 0, 0, 0, 0, 195, 196, - 197, 198, 199, 11, 12, 13, 14, 15, 16, 17, + 0, 0, 0, 303, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 305, 306, 307, 308, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 211, 212, 213, + 214, 215, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 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, @@ -1495,13 +1739,15 @@ static const yytype_int16 yytable[] = 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 0, 0, 194, 0, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 0, 259, 210, 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, 0, 0, - 0, 0, 484, 0, 0, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, - 0, 195, 196, 197, 198, 199, 11, 12, 13, 14, + 0, 0, 0, 0, 260, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 0, 0, 211, 212, + 213, 214, 215, 0, 0, 0, 0, 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, @@ -1519,63 +1765,71 @@ static const yytype_int16 yytable[] = 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 0, - 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 0, 0, 210, 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, 502, 0, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, - 0, 0, 0, 0, 195, 196, 197, 198, 199, 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, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 0, 0, 194, 0, 0, 0, 4, 5, - 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 195, 196, 197, - 198, 199, 47, 48, 49, 50, 51, 52, 0, 0, - 0, 0, 0, 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 0, - 276, 194, 277, 278, 279, 280, 281, 282, 283, 0, - 0, 284, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 286, 0, 0, 0, 365, 518, 0, 0, 0, 0, - 0, 288, 289, 290, 291, 4, 5, 6, 7, 8, - 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, + 0, 0, 436, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, + 0, 211, 212, 213, 214, 215, 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, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 0, 0, 210, 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, + 0, 501, 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, + 211, 212, 213, 214, 215, 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, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 0, 0, 210, 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, 0, + 519, 0, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 0, 0, 0, 0, 0, 0, 211, + 212, 213, 214, 215, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, - 48, 49, 50, 51, 52, 0, 0, 0, 0, 0, + 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, @@ -1589,42 +1843,16 @@ static const yytype_int16 yytable[] = 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 0, 276, 194, 277, - 278, 279, 280, 281, 282, 283, 0, 0, 284, 285, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 286, 0, 0, - 287, 4, 5, 6, 7, 8, 9, 10, 288, 289, - 290, 291, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 47, 48, 49, 50, 51, - 52, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 0, 276, 194, 277, 278, 279, 280, 281, - 282, 283, 0, 0, 284, 285, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 286, 0, 0, 0, 365, 0, 0, - 0, 0, 0, 0, 288, 289, 290, 291, 4, 5, - 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 0, 0, 210, 0, 0, 0, 4, 5, + 6, 7, 8, 9, 10, 11, 0, 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, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 47, 48, 49, 50, 51, 52, 0, 0, - 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 211, 212, + 213, 214, 215, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 0, 0, 0, 0, 0, 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, @@ -1637,65 +1865,74 @@ static const yytype_int16 yytable[] = 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 0, - 276, 194, 277, 278, 279, 280, 281, 282, 283, 0, - 0, 284, 285, 0, 0, 0, 0, 0, 0, 0, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 0, 292, 210, 293, 294, + 295, 296, 297, 298, 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 286, 0, 0, 408, 4, 5, 6, 7, 8, 9, - 10, 288, 289, 290, 291, 0, 0, 0, 0, 0, - 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, - 49, 50, 51, 52, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 0, 276, 194, 277, 278, - 279, 280, 281, 282, 283, 0, 0, 284, 285, 0, + 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, + 0, 382, 535, 0, 0, 0, 0, 0, 305, 306, + 307, 308, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 286, 4, 5, 6, - 7, 8, 9, 10, 0, 0, 427, 288, 289, 290, - 291, 0, 0, 0, 0, 0, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 0, + 0, 0, 0, 0, 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, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 0, + 292, 210, 293, 294, 295, 296, 297, 298, 299, 300, + 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 303, 0, 0, 304, 0, 0, 0, 0, 0, + 0, 0, 305, 306, 307, 308, 4, 5, 6, 7, + 8, 9, 10, 11, 0, 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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 0, 0, 0, 0, 0, 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, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 0, 292, 210, 293, 294, 295, 296, + 297, 298, 299, 300, 0, 0, 301, 302, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 303, 0, 0, 0, 382, + 0, 0, 0, 0, 0, 0, 305, 306, 307, 308, + 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 47, 48, 49, 50, 51, 52, 0, 0, 0, - 0, 0, 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, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 0, 276, - 194, 277, 278, 279, 280, 281, 282, 283, 0, 0, - 284, 285, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 286, - 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, - 288, 289, 290, 291, 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 48, 49, 50, 51, 52, - 0, 0, 0, 0, 0, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 0, 0, 0, + 0, 0, 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, @@ -1708,301 +1945,207 @@ static const yytype_int16 yytable[] = 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 383, 0, 276, 194, 277, 278, 279, 280, 281, 282, - 283, 0, 0, 284, 285, 0, 0, 0, 0, 0, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 0, 292, 210, + 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, + 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, + 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, + 305, 306, 307, 308, 4, 5, 6, 7, 8, 9, + 10, 11, 0, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 0, 292, 210, 293, 294, 295, 296, 297, 298, + 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 286, 4, 5, 6, 7, 8, 9, 10, - 0, 0, 0, 288, 289, 290, 291, 0, 0, 0, - 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, - 50, 51, 52, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 0, 0, 194 + 0, 0, 0, 303, 4, 5, 6, 7, 8, 9, + 10, 11, 0, 444, 305, 306, 307, 308, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 0, 292, 210, 293, 294, 295, 296, 297, 298, + 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 303, 4, 5, 6, 7, 8, 9, + 10, 11, 0, 0, 305, 306, 307, 308, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 400, 0, 292, 210, 293, 294, 295, 296, 297, 298, + 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 303, 4, 5, 6, 7, 8, 9, + 10, 11, 0, 0, 305, 306, 307, 308, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 0, 0, 0, 0, 0, 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, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 0, 0, 210 }; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-512))) + +#define yytable_value_is_error(Yytable_value) \ + YYID (0) + static const yytype_int16 yycheck[] = { - 0, 206, 214, 0, 270, 0, 286, 355, 229, 54, - 247, 434, 363, 226, 365, 323, 326, 368, 208, 208, - 495, 242, 238, 240, 219, 220, 238, 221, 222, 234, - 238, 248, 240, 527, 300, 510, 240, 531, 245, 247, - 238, 248, 536, 238, 248, 240, 267, 268, 261, 244, - 217, 218, 242, 258, 239, 248, 336, 240, 338, 248, - 245, 369, 256, 257, 247, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 423, 223, 224, 240, 240, - 317, 239, 239, 320, 247, 247, 247, 242, 245, 239, - 245, 245, 246, 248, 239, 245, 245, 363, 378, 365, - 245, 452, 368, 239, 414, 239, 250, 239, 252, 245, - 208, 245, 324, 245, 245, 246, 382, 540, 323, 390, - 391, 326, 394, 395, 396, 397, 245, 245, 245, 248, - 248, 248, 245, 245, 240, 248, 248, 264, 265, 266, - 392, 393, 253, 254, 255, 425, 456, 209, 496, 429, - 501, 243, 242, 245, 398, 399, 242, 208, 208, 240, - 247, 208, 239, 208, 369, 248, 238, 260, 259, 258, - 225, 227, 241, 209, 208, 248, 246, 248, 238, 238, - 446, 447, 248, 208, 238, 243, 452, 208, 245, 238, - 541, 239, 238, 207, 247, 416, 238, 241, 241, 208, - 16, 549, 482, 242, 239, 243, 206, 248, 239, 414, - 242, 248, 242, 400, 214, 495, 243, 401, 247, 405, - 402, 221, 403, 238, 221, 404, 221, 234, 228, 200, - 510, 284, 285, 238, 234, 501, 487, 322, 238, 415, - 490, 521, 526, 536, 232, 537, 510, 490, 221, -1, - 303, 456, -1, -1, 520, 535, -1, -1, 258, -1, - -1, -1, 262, -1, 317, -1, -1, 320, -1, -1, - -1, -1, -1, -1, -1, 541, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 495, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 515, -1, 510, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 323, 324, -1, 326, -1, -1, -1, - -1, -1, -1, -1, 387, 388, 389, 390, 391, 392, - 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, -1, -1, 355, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, + 0, 222, 230, 0, 286, 245, 0, 303, 372, 55, + 451, 263, 340, 343, 224, 238, 239, 380, 258, 382, + 255, 224, 385, 512, 257, 243, 254, 236, 237, 250, + 255, 264, 257, 544, 260, 317, 262, 548, 527, 264, + 257, 257, 553, 283, 284, 265, 255, 264, 257, 265, + 273, 274, 261, 274, 255, 265, 259, 353, 386, 355, + 278, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 257, 259, 262, 257, 262, 440, 256, 265, 265, + 264, 264, 334, 262, 256, 337, 256, 256, 256, 256, + 262, 256, 262, 262, 262, 262, 224, 262, 380, 395, + 382, 431, 262, 385, 256, 265, 469, 411, 412, 413, + 414, 262, 262, 341, 265, 265, 557, 399, 262, 340, + 262, 265, 343, 265, 262, 234, 235, 265, 281, 282, + 283, 270, 271, 272, 267, 257, 269, 240, 241, 262, + 263, 262, 263, 473, 407, 408, 442, 409, 410, 513, + 446, 415, 416, 225, 259, 518, 224, 259, 224, 257, + 264, 224, 256, 255, 265, 386, 277, 263, 276, 275, + 244, 242, 258, 225, 224, 265, 265, 255, 224, 255, + 265, 463, 464, 263, 224, 255, 255, 469, 255, 224, + 223, 256, 224, 433, 17, 558, 260, 258, 258, 255, + 262, 259, 566, 499, 259, 301, 302, 256, 265, 260, + 431, 256, 259, 417, 419, 421, 512, 265, 260, 418, + 264, 339, 222, 420, 320, 254, 422, 250, 254, 216, + 230, 527, 432, 504, 507, 543, 518, 237, 334, 553, + 237, 337, 538, 237, 244, 554, 248, 507, 527, 237, + 250, -1, 473, -1, 254, 537, 552, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 274, -1, 558, -1, 278, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 512, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 532, -1, 527, -1, 404, 405, + 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, + 416, 417, 418, 419, 420, 421, 422, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 340, 341, -1, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 414, -1, -1, -1, -1, -1, - -1, -1, -1, 423, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 434, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 456, -1, -1, -1, + -1, -1, 372, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 386, -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, - 490, -1, -1, -1, -1, 495, 496, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 510, -1, -1, -1, -1, 515, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 527, -1, -1, - -1, 531, -1, -1, -1, -1, 536, -1, -1, -1, - 540, -1, -1, -1, -1, -1, -1, 0, -1, 549, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + -1, 431, -1, -1, -1, -1, -1, -1, -1, -1, + 440, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 451, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 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, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, -1, -1, 209, -1, -1, -1, + -1, -1, -1, 473, -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, 507, -1, -1, + -1, -1, 512, 513, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 527, -1, -1, + -1, -1, 532, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 544, -1, -1, -1, 548, -1, + -1, -1, -1, 553, -1, -1, -1, 557, -1, -1, + -1, -1, -1, -1, 0, -1, 566, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 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, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, -1, -1, 225, -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, 262, - 263, 264, 265, 266, 267, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, -1, 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, -1, - -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 238, -1, -1, -1, 242, 243, -1, -1, -1, -1, - 248, 249, 250, 251, 252, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 262, 263, 264, 265, 266, 267, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, -1, 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, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, -1, -1, 219, 220, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 238, -1, -1, -1, 242, - 243, -1, -1, -1, -1, 248, 249, 250, 251, 252, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, - 263, 264, 265, 266, 267, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, -1, 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, -1, - -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 238, -1, -1, -1, 242, -1, -1, -1, -1, -1, - 248, 249, 250, 251, 252, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 262, 263, 264, 265, 266, 267, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, -1, 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, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, -1, -1, 219, 220, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 238, -1, -1, -1, 242, - -1, -1, -1, -1, -1, 248, 249, 250, 251, 252, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, - 263, 264, 265, 266, 267, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, -1, 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, -1, - -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 238, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 248, 249, 250, 251, 252, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 262, 263, 264, 265, 266, 267, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 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, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, -1, 208, 209, 210, 211, 212, - 213, 214, 215, 216, -1, -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 238, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 248, 249, 250, 251, 252, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, - 263, 264, 265, 266, 267, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, -1, - -1, 209, -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, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, - -1, -1, -1, -1, 262, 263, 264, 265, 266, 267, + -1, -1, -1, 279, 280, 281, 282, 283, 284, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, -1, 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, @@ -2021,15 +2164,45 @@ static const yytype_int16 yycheck[] = 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, -1, 208, 209, 210, 211, 212, 213, - 214, 215, 216, -1, -1, 219, 220, -1, -1, -1, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 255, -1, -1, -1, 259, 260, -1, -1, -1, + -1, 265, 266, 267, 268, 269, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 279, 280, 281, 282, 283, + 284, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, -1, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 238, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 249, 250, 251, 252, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, - 264, 265, 266, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 24, 25, 26, 27, 28, 29, + -1, -1, -1, 255, -1, -1, -1, 259, 260, -1, + -1, -1, -1, 265, 266, 267, 268, 269, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 279, 280, 281, + 282, 283, 284, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, -1, 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, @@ -2047,14 +2220,74 @@ static const yytype_int16 yycheck[] = 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, -1, 208, 209, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 255, -1, -1, -1, 259, + -1, -1, -1, -1, -1, 265, 266, 267, 268, 269, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 279, + 280, 281, 282, 283, 284, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, + 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, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 255, -1, -1, + -1, 259, -1, -1, -1, -1, -1, 265, 266, 267, + 268, 269, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 279, 280, 281, 282, 283, 284, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, -1, 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, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, -1, -1, + 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 255, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 265, + 266, 267, 268, 269, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 279, 280, 281, 282, 283, 284, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 248, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, - -1, -1, 262, 263, 264, 265, 266, -1, -1, -1, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + -1, 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, @@ -2072,111 +2305,75 @@ static const yytype_int16 yycheck[] = 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, -1, -1, 209, -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, 243, - -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, -1, -1, -1, -1, -1, -1, 262, 263, - 264, 265, 266, 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, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, -1, -1, 209, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, -1, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 255, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 265, 266, 267, 268, 269, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 279, 280, 281, 282, 283, + 284, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, -1, -1, 225, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 243, -1, -1, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, - -1, 262, 263, 264, 265, 266, 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, -1, - -1, 209, -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, 243, -1, -1, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, - -1, -1, -1, -1, 262, 263, 264, 265, 266, 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, -1, -1, 209, -1, -1, -1, 6, 7, - 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, - 265, 266, 60, 61, 62, 63, 64, 65, -1, -1, - -1, -1, -1, 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, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, -1, - 208, 209, 210, 211, 212, 213, 214, 215, 216, -1, - -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, -1, -1, -1, -1, -1, 279, 280, 281, + 282, 283, 284, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 238, -1, -1, -1, 242, 243, -1, -1, -1, -1, - -1, 249, 250, 251, 252, 6, 7, 8, 9, 10, - 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 255, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 266, 267, 268, 269, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 279, 280, 281, + 282, 283, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, - 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, + 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, @@ -2190,42 +2387,20 @@ static const yytype_int16 yycheck[] = 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, -1, 208, 209, 210, - 211, 212, 213, 214, 215, 216, -1, -1, 219, 220, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, -1, 224, 225, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 238, -1, -1, - 241, 6, 7, 8, 9, 10, 11, 12, 249, 250, - 251, 252, -1, -1, -1, -1, -1, -1, -1, -1, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 60, 61, 62, 63, 64, - 65, -1, -1, -1, -1, -1, 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, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, -1, 208, 209, 210, 211, 212, 213, 214, - 215, 216, -1, -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 238, -1, -1, -1, 242, -1, -1, - -1, -1, -1, -1, 249, 250, 251, 252, 6, 7, - 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 60, 61, 62, 63, 64, 65, -1, -1, - -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, + -1, -1, -1, -1, 265, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, -1, -1, 279, 280, + 281, 282, 283, -1, -1, -1, -1, 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, @@ -2238,41 +2413,20 @@ static const yytype_int16 yycheck[] = 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, -1, - 208, 209, 210, 211, 212, 213, 214, 215, 216, -1, - -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, -1, -1, 225, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 238, -1, -1, 241, 6, 7, 8, 9, 10, 11, - 12, 249, 250, 251, 252, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, - 62, 63, 64, 65, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, -1, 208, 209, 210, 211, - 212, 213, 214, 215, 216, -1, -1, 219, 220, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 238, 6, 7, 8, - 9, 10, 11, 12, -1, -1, 248, 249, 250, 251, - 252, -1, -1, -1, -1, -1, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 60, 61, 62, 63, 64, 65, -1, -1, -1, - -1, -1, 71, 72, 73, 74, 75, 76, 77, 78, + -1, -1, 260, -1, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, + -1, 279, 280, 281, 282, 283, 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, @@ -2285,18 +2439,148 @@ static const yytype_int16 yycheck[] = 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, -1, 208, - 209, 210, 211, 212, 213, 214, 215, 216, -1, -1, - 219, 220, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 238, - 6, 7, 8, 9, 10, 11, 12, -1, -1, -1, - 249, 250, 251, 252, -1, -1, -1, -1, -1, 25, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, -1, -1, 225, -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, 260, -1, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, + 279, 280, 281, 282, 283, 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, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, -1, -1, 225, -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, + 260, -1, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, -1, -1, -1, -1, -1, -1, 279, + 280, 281, 282, 283, 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, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, -1, -1, 225, -1, -1, -1, 6, 7, + 8, 9, 10, 11, 12, 13, -1, -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, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 279, 280, + 281, 282, 283, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, -1, + 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, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, -1, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, -1, -1, 236, 237, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 255, -1, -1, + -1, 259, 260, -1, -1, -1, -1, -1, 266, 267, + 268, 269, 6, 7, 8, 9, 10, 11, 12, 13, + -1, -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, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, + -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, -1, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 255, -1, -1, 258, -1, -1, -1, -1, -1, + -1, -1, 266, 267, 268, 269, 6, 7, 8, 9, + 10, 11, 12, 13, -1, -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, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, -1, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, -1, -1, 236, 237, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 255, -1, -1, -1, 259, + -1, -1, -1, -1, -1, -1, 266, 267, 268, 269, + 6, 7, 8, 9, 10, 11, 12, 13, -1, -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, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 60, 61, 62, 63, 64, 65, - -1, -1, -1, -1, -1, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, -1, -1, -1, + -1, -1, 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, @@ -2309,38 +2593,118 @@ static const yytype_int16 yycheck[] = 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, -1, 208, 209, 210, 211, 212, 213, 214, 215, - 216, -1, -1, 219, 220, -1, -1, -1, -1, -1, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, -1, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, -1, -1, + 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 255, + -1, -1, 258, -1, -1, -1, -1, -1, -1, -1, + 266, 267, 268, 269, 6, 7, 8, 9, 10, 11, + 12, 13, -1, -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, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 238, 6, 7, 8, 9, 10, 11, 12, - -1, -1, -1, 249, 250, 251, 252, -1, -1, -1, - -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, - 63, 64, 65, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, -1, -1, 209 + -1, -1, -1, 255, 6, 7, 8, 9, 10, 11, + 12, 13, -1, 265, 266, 267, 268, 269, -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, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 255, 6, 7, 8, 9, 10, 11, + 12, 13, -1, -1, 266, 267, 268, 269, -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, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 255, 6, 7, 8, 9, 10, 11, + 12, 13, -1, -1, 266, 267, 268, 269, -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, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, -1, -1, -1, -1, -1, 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, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, -1, -1, 225 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 12, 13, 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, @@ -2358,151 +2722,71 @@ static const yytype_uint16 yystos[] = 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 209, 262, 263, 264, 265, 266, - 267, 302, 303, 306, 307, 308, 309, 313, 314, 315, - 316, 317, 318, 321, 322, 323, 324, 326, 328, 329, - 330, 367, 368, 369, 238, 238, 208, 242, 329, 208, - 248, 248, 370, 239, 245, 310, 311, 312, 322, 326, - 245, 248, 208, 208, 248, 323, 326, 240, 327, 0, - 368, 209, 325, 54, 208, 319, 320, 242, 332, 326, - 248, 327, 242, 349, 311, 310, 312, 208, 208, 238, - 247, 327, 242, 245, 248, 305, 208, 210, 211, 212, - 213, 214, 215, 216, 219, 220, 238, 241, 249, 250, - 251, 252, 272, 273, 274, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 326, 240, 239, 245, - 247, 239, 245, 331, 322, 326, 333, 334, 248, 248, - 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, - 207, 242, 243, 248, 283, 296, 298, 300, 302, 306, - 326, 339, 340, 341, 342, 350, 351, 352, 355, 358, - 359, 366, 327, 247, 327, 242, 298, 337, 247, 304, - 208, 245, 248, 283, 283, 300, 219, 220, 240, 244, - 239, 239, 245, 206, 298, 238, 283, 253, 254, 255, - 250, 252, 217, 218, 221, 222, 256, 257, 223, 224, - 260, 259, 258, 225, 227, 226, 261, 241, 241, 296, - 209, 296, 301, 320, 333, 326, 208, 335, 336, 243, - 334, 248, 248, 361, 238, 238, 248, 248, 300, 238, - 300, 246, 238, 243, 343, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 247, 299, 245, 248, 243, - 340, 337, 247, 337, 338, 337, 333, 208, 239, 275, - 300, 208, 298, 283, 283, 283, 285, 285, 286, 286, - 287, 287, 287, 287, 288, 288, 289, 290, 291, 292, - 293, 294, 297, 241, 243, 335, 327, 245, 248, 340, - 362, 300, 248, 300, 246, 360, 350, 298, 298, 337, - 243, 245, 243, 241, 300, 248, 336, 207, 339, 351, - 363, 239, 239, 300, 315, 322, 354, 344, 243, 337, - 246, 238, 354, 364, 365, 346, 347, 348, 353, 356, - 208, 239, 243, 298, 300, 248, 239, 16, 342, 341, - 242, 247, 341, 345, 349, 239, 300, 345, 346, 350, - 357, 337, 248, 243 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 271, 272, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 274, 274, 274, 274, 274, 274, 275, 276, - 277, 278, 278, 279, 279, 280, 280, 281, 282, 282, - 283, 283, 283, 283, 284, 284, 284, 284, 285, 285, - 285, 285, 286, 286, 286, 287, 287, 287, 288, 288, - 288, 288, 288, 289, 289, 289, 290, 290, 291, 291, - 292, 292, 293, 293, 294, 294, 295, 295, 296, 297, - 296, 298, 298, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 300, 300, 301, 302, 302, 302, - 302, 302, 302, 302, 302, 302, 304, 303, 305, 305, - 306, 307, 307, 308, 308, 309, 310, 310, 311, 311, - 311, 311, 312, 313, 313, 313, 313, 313, 314, 314, - 314, 314, 314, 315, 315, 316, 317, 317, 317, 317, - 318, 319, 319, 320, 320, 320, 321, 322, 322, 323, - 323, 323, 323, 323, 323, 324, 324, 324, 324, 324, - 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, - 324, 324, 324, 324, 325, 325, 326, 326, 327, 327, - 327, 327, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, - 328, 328, 328, 329, 329, 329, 331, 330, 332, 330, - 333, 333, 334, 334, 335, 335, 336, 336, 337, 337, - 337, 338, 338, 339, 340, 340, 341, 341, 341, 341, - 341, 341, 341, 342, 343, 344, 342, 345, 345, 347, - 346, 348, 346, 349, 349, 350, 350, 351, 351, 352, - 353, 353, 354, 354, 356, 355, 357, 357, 358, 358, - 360, 359, 361, 359, 362, 359, 363, 363, 364, 364, - 365, 365, 366, 366, 366, 366, 366, 367, 367, 368, - 368, 370, 369 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 4, 1, 3, 2, 2, 1, 1, - 1, 2, 2, 2, 1, 2, 3, 2, 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, 3, 1, 3, 1, 3, 1, 0, - 6, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 2, 2, 4, - 2, 3, 4, 2, 3, 4, 0, 6, 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, 1, - 4, 1, 3, 1, 3, 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, 4, 1, 3, 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, 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, 3, - 4, 1, 3, 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, 5, - 3, 1, 1, 4, 0, 8, 0, 1, 3, 2, - 0, 6, 0, 8, 0, 7, 1, 1, 1, 0, - 2, 3, 2, 2, 2, 3, 2, 1, 2, 1, - 1, 0, 3 + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 225, 279, 280, 281, 282, 283, 284, 319, 320, 323, + 324, 325, 326, 330, 331, 332, 333, 334, 335, 338, + 339, 340, 341, 343, 345, 346, 347, 384, 385, 386, + 255, 255, 224, 259, 346, 224, 265, 265, 387, 256, + 262, 327, 328, 329, 339, 343, 262, 265, 224, 224, + 265, 340, 343, 257, 344, 0, 385, 225, 342, 55, + 224, 336, 337, 259, 349, 343, 265, 344, 259, 366, + 328, 327, 329, 224, 224, 255, 264, 344, 259, 262, + 265, 322, 224, 226, 227, 228, 229, 230, 231, 232, + 233, 236, 237, 255, 258, 266, 267, 268, 269, 289, + 290, 291, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 343, 257, 256, 262, 264, 256, 262, + 348, 339, 343, 350, 351, 265, 265, 14, 15, 16, + 18, 19, 20, 21, 22, 23, 24, 223, 259, 260, + 265, 300, 313, 315, 317, 319, 323, 343, 356, 357, + 358, 359, 367, 368, 369, 372, 375, 376, 383, 344, + 264, 344, 259, 315, 354, 264, 321, 224, 262, 265, + 300, 300, 317, 236, 237, 257, 261, 256, 256, 262, + 222, 315, 255, 300, 270, 271, 272, 267, 269, 234, + 235, 238, 239, 273, 274, 240, 241, 277, 276, 275, + 242, 244, 243, 278, 258, 258, 313, 225, 313, 318, + 337, 350, 343, 224, 352, 353, 260, 351, 265, 265, + 378, 255, 255, 265, 265, 317, 255, 317, 263, 255, + 260, 360, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 264, 316, 262, 265, 260, 357, 354, 264, + 354, 355, 354, 350, 224, 256, 292, 317, 224, 315, + 300, 300, 300, 302, 302, 303, 303, 304, 304, 304, + 304, 305, 305, 306, 307, 308, 309, 310, 311, 314, + 258, 260, 352, 344, 262, 265, 357, 379, 317, 265, + 317, 263, 377, 367, 315, 315, 354, 260, 262, 260, + 258, 317, 265, 353, 223, 356, 368, 380, 256, 256, + 317, 332, 339, 371, 361, 260, 354, 263, 255, 371, + 381, 382, 363, 364, 365, 370, 373, 224, 256, 260, + 315, 317, 265, 256, 17, 359, 358, 259, 264, 358, + 362, 366, 256, 317, 362, 363, 367, 374, 354, 265, + 260 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) @@ -2519,15 +2803,27 @@ do \ else \ { \ yyerror (pParseContext, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) + YYERROR; \ + } \ +while (YYID (0)) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif +/* YYLEX -- calling `yylex' with the right arguments. */ +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval, parseContext) +#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -2537,47 +2833,58 @@ while (0) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, pParseContext); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pParseContext); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + glslang::TParseContext* pParseContext; +#endif { FILE *yyo = yyoutput; YYUSE (yyo); - YYUSE (pParseContext); if (!yyvaluep) return; + YYUSE (pParseContext); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); # endif - YYUSE (yytype); + switch (yytype) + { + default: + break; + } } @@ -2585,11 +2892,23 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue | Print this symbol on YYOUTPUT. | `--------------------------------*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, pParseContext) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + glslang::TParseContext* pParseContext; +#endif { - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext); YYFPRINTF (yyoutput, ")"); @@ -2600,8 +2919,16 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, gls | TOP (included). | `------------------------------------------------------------------*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -2612,42 +2939,50 @@ yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) +#else +static void +yy_reduce_print (yyvsp, yyrule, pParseContext) + YYSTYPE *yyvsp; + int yyrule; + glslang::TParseContext* pParseContext; +#endif { - unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; + unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , pParseContext); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pParseContext); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, pParseContext); \ -} while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, pParseContext); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -2661,7 +2996,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -2684,8 +3019,15 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -2701,8 +3043,16 @@ yystrlen (const char *yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif { char *yyd = yydest; const char *yys = yysrc; @@ -2732,27 +3082,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -2775,11 +3125,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; + const char *yyformat = YY_NULL; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -2787,6 +3137,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -2836,7 +3190,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -2903,18 +3257,33 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, pParseContext) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + glslang::TParseContext* pParseContext; +#endif { YYUSE (yyvaluep); YYUSE (pParseContext); + if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END + switch (yytype) + { + + default: + break; + } } @@ -2924,18 +3293,56 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseCon | yyparse. | `----------*/ +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (glslang::TParseContext* pParseContext) +#else +int +yyparse (pParseContext) + glslang::TParseContext* pParseContext; +#endif +#endif { /* The lookahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); +static YYSTYPE yyval_default; +# 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 + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -2945,8 +3352,8 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); int yyerrstatus; /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. + `yyss': related to states. + `yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -3014,23 +3421,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); #ifdef 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. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* 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 * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* 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 * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -3038,22 +3445,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -3062,10 +3469,10 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -3094,7 +3501,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, parseContext); + yychar = YYLEX; } if (yychar <= YYEOF) @@ -3159,7 +3566,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. + `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -3173,247 +3580,259 @@ yyreduce: switch (yyn) { case 2: -#line 246 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 250 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); + (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[(1) - (1)].lex).loc, (yyvsp[(1) - (1)].lex).symbol, (yyvsp[(1) - (1)].lex).string); } -#line 3181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 3: -#line 252 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 256 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 3189 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 4: -#line 255 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 259 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).i, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3197 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 5: -#line 258 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 262 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).u, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 6: -#line 262 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 266 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).i64, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3215 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 7: -#line 266 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 270 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).u64, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 8: -#line 270 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 274 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtFloat, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 9: -#line 273 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 277 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtDouble, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 10: -#line 277 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 281 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtFloat16, (yyvsp[(1) - (1)].lex).loc, true); +#endif } -#line 3249 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 11: -#line 280 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 287 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); - if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) - (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).b, (yyvsp[(1) - (1)].lex).loc, true); } -#line 3259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 12: -#line 288 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 290 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); + if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) + (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } -#line 3267 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 13: -#line 291 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 298 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 3275 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 14: -#line 294 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 301 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[(2) - (4)].lex).loc, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode)); } -#line 3283 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 15: -#line 297 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 304 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 3291 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 16: -#line 300 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 307 "glslang.y" { - parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); - parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[(3) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode), *(yyvsp[(3) - (3)].lex).string); } -#line 3301 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 17: -#line 305 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 310 "glslang.y" { - parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); - parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); + parseContext.variableCheck((yyvsp[(1) - (2)].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[(2) - (2)].lex).loc, "++", (yyvsp[(1) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(2) - (2)].lex).loc, "++", EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode)); } -#line 3311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 18: -#line 313 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 315 "glslang.y" { - parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + parseContext.variableCheck((yyvsp[(1) - (2)].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[(2) - (2)].lex).loc, "--", (yyvsp[(1) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(2) - (2)].lex).loc, "--", EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode)); } -#line 3320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 19: -#line 320 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 323 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); - delete (yyvsp[0].interm).function; + parseContext.integerCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 3329 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 20: -#line 327 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 330 "glslang.y" { - (yyval.interm) = (yyvsp[0].interm); + (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[(1) - (1)].interm).loc, (yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode); + delete (yyvsp[(1) - (1)].interm).function; } -#line 3337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 21: -#line 333 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 337 "glslang.y" { - (yyval.interm) = (yyvsp[-1].interm); - (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm) = (yyvsp[(1) - (1)].interm); } -#line 3346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 22: -#line 337 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 343 "glslang.y" { - (yyval.interm) = (yyvsp[-1].interm); - (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm) = (yyvsp[(1) - (2)].interm); + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; } -#line 3355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 23: -#line 344 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 347 "glslang.y" { - (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm) = (yyvsp[(1) - (2)].interm); + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; } -#line 3363 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 24: -#line 347 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 354 "glslang.y" { - (yyval.interm) = (yyvsp[0].interm); + (yyval.interm) = (yyvsp[(1) - (2)].interm); } -#line 3371 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 25: -#line 353 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 357 "glslang.y" { - TParameter param = { 0, new TType }; - param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); - (yyvsp[-1].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[-1].interm).function; - (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); + (yyval.interm) = (yyvsp[(1) - (1)].interm); } -#line 3383 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 26: -#line 360 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 363 "glslang.y" { TParameter param = { 0, new TType }; - param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); - (yyvsp[-2].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[-2].interm).function; - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); + param.type->shallowCopy((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()); + (yyvsp[(1) - (2)].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[(1) - (2)].interm).function; + (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); } -#line 3395 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 27: -#line 370 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 370 "glslang.y" { - (yyval.interm) = (yyvsp[-1].interm); + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()); + (yyvsp[(1) - (3)].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[(1) - (3)].interm).function; + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).loc); } -#line 3403 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 28: -#line 378 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 380 "glslang.y" + { + (yyval.interm) = (yyvsp[(1) - (2)].interm); + } + break; + + case 29: +/* Line 1792 of yacc.c */ +#line 388 "glslang.y" { // Constructor (yyval.interm).intermNode = 0; - (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type)); } -#line 3413 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 29: -#line 383 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 30: +/* Line 1792 of yacc.c */ +#line 393 "glslang.y" { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. @@ -3421,18 +3840,18 @@ yyreduce: (yyval.interm).function = 0; (yyval.interm).intermNode = 0; - TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode(); + TIntermMethod* method = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsMethodNode(); if (method) { (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); (yyval.interm).intermNode = method->getObject(); } else { - TIntermSymbol* symbol = (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode(); + TIntermSymbol* symbol = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsSymbolNode(); if (symbol) { parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); (yyval.interm).function = function; } else - parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); + parseContext.error((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); } if ((yyval.interm).function == 0) { @@ -3441,3709 +3860,3916 @@ yyreduce: (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull); } } -#line 3445 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 30: -#line 413 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 31: +/* Line 1792 of yacc.c */ +#line 423 "glslang.y" { - parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) - parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); + parseContext.variableCheck((yyvsp[(1) - (1)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + if (TIntermMethod* method = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsMethodNode()) + parseContext.error((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } -#line 3456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 31: -#line 419 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 32: +/* Line 1792 of yacc.c */ +#line 429 "glslang.y" { - parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[(1) - (2)].lex).loc, "++", (yyvsp[(2) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].lex).loc, "++", EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode)); } -#line 3465 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 32: -#line 423 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 33: +/* Line 1792 of yacc.c */ +#line 433 "glslang.y" { - parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[(1) - (2)].lex).loc, "--", (yyvsp[(2) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].lex).loc, "--", EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode)); } -#line 3474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 33: -#line 427 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 34: +/* Line 1792 of yacc.c */ +#line 437 "glslang.y" { - if ((yyvsp[-1].interm).op != EOpNull) { + if ((yyvsp[(1) - (2)].interm).op != EOpNull) { char errorOp[2] = {0, 0}; - switch((yyvsp[-1].interm).op) { + switch((yyvsp[(1) - (2)].interm).op) { case EOpNegative: errorOp[0] = '-'; break; case EOpLogicalNot: errorOp[0] = '!'; break; case EOpBitwiseNot: errorOp[0] = '~'; break; default: break; // some compilers want this } - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].interm).loc, errorOp, (yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].interm).loc, errorOp, (yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode)); } else { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } -#line 3495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 34: -#line 447 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 3501 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 35: -#line 448 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } -#line 3507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 457 "glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpNull; } break; case 36: -#line 449 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } -#line 3513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 458 "glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpNegative; } break; case 37: -#line 450 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } -#line 3520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 459 "glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpLogicalNot; } break; case 38: -#line 456 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 460 "glslang.y" + { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpBitwiseNot; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise not"); } break; case 39: -#line 457 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); - } -#line 3536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 466 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; case 40: -#line 462 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 467 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "*", EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 41: -#line 467 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 472 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "/", EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3557 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 42: -#line 476 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 43: -#line 477 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 477 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "%"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "%", EOpMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3573 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 43: +/* Line 1792 of yacc.c */ +#line 486 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; case 44: -#line 482 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 487 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "+", EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3583 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 45: -#line 490 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3589 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 46: -#line 491 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 492 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "-", EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3600 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 46: +/* Line 1792 of yacc.c */ +#line 500 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; case 47: -#line 497 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 501 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bit shift left"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<<", EOpLeftShift, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3611 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 48: -#line 506 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 49: -#line 507 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 507 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bit shift right"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">>", EOpRightShift, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3627 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 49: +/* Line 1792 of yacc.c */ +#line 516 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; case 50: -#line 512 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 517 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<", EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3637 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 51: -#line 517 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 522 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">", EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3647 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 52: -#line 522 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 527 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<=", EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3657 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 53: -#line 530 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3663 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 54: -#line 531 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 532 "glslang.y" { - parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); - parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); - parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 54: +/* Line 1792 of yacc.c */ +#line 540 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; case 55: -#line 539 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 541 "glslang.y" { - parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); - parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); - parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.arrayObjectCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "=="); + parseContext.specializationCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "=="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "==", EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 56: -#line 550 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3695 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 549 "glslang.y" + { + parseContext.arrayObjectCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "!="); + parseContext.specializationCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "!="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "!=", EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + } break; case 57: -#line 551 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 560 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } + break; + + case 58: +/* Line 1792 of yacc.c */ +#line 561 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise and"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "&", EOpAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3706 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 58: -#line 560 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3712 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 59: +/* Line 1792 of yacc.c */ +#line 570 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; - case 59: -#line 561 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 60: +/* Line 1792 of yacc.c */ +#line 571 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise exclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "^", EOpExclusiveOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 60: -#line 570 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 61: +/* Line 1792 of yacc.c */ +#line 580 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; - case 61: -#line 571 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 62: +/* Line 1792 of yacc.c */ +#line 581 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise inclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "|", EOpInclusiveOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); } -#line 3740 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 62: -#line 580 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3746 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 63: +/* Line 1792 of yacc.c */ +#line 590 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; - case 63: -#line 581 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 64: +/* Line 1792 of yacc.c */ +#line 591 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "&&", EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 64: -#line 589 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3762 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 65: +/* Line 1792 of yacc.c */ +#line 599 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; - case 65: -#line 590 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 66: +/* Line 1792 of yacc.c */ +#line 600 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "^^", EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 66: -#line 598 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3778 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 67: +/* Line 1792 of yacc.c */ +#line 608 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; - case 67: -#line 599 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 68: +/* Line 1792 of yacc.c */ +#line 609 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "||", EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); } -#line 3788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 68: -#line 607 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3794 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 69: +/* Line 1792 of yacc.c */ +#line 617 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; - case 69: -#line 608 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 70: +/* Line 1792 of yacc.c */ +#line 618 "glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 3802 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 70: -#line 611 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 71: +/* Line 1792 of yacc.c */ +#line 621 "glslang.y" { --parseContext.controlFlowNestingLevel; - parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-4].lex).loc, "?", (yyvsp[-5].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc); + parseContext.boolCheck((yyvsp[(2) - (6)].lex).loc, (yyvsp[(1) - (6)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(2) - (6)].lex).loc, "?", (yyvsp[(1) - (6)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(5) - (6)].lex).loc, ":", (yyvsp[(4) - (6)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(5) - (6)].lex).loc, ":", (yyvsp[(6) - (6)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[(1) - (6)].interm.intermTypedNode), (yyvsp[(4) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermTypedNode), (yyvsp[(2) - (6)].lex).loc); if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + parseContext.binaryOpError((yyvsp[(2) - (6)].lex).loc, ":", (yyvsp[(4) - (6)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(6) - (6)].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[(6) - (6)].interm.intermTypedNode); } } -#line 3819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 71: -#line 626 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3825 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 72: -#line 627 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); - parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); - parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); - parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].interm).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); - } - } -#line 3842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 636 "glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } break; case 73: -#line 642 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpAssign; +/* Line 1792 of yacc.c */ +#line 637 "glslang.y" + { + parseContext.arrayObjectCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array assignment"); + parseContext.opaqueCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "="); + parseContext.specializationCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "="); + parseContext.lValueErrorCheck((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].interm).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.assignError((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + } } -#line 3851 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 74: -#line 646 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 652 "glslang.y" { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpMulAssign; + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpAssign; } -#line 3860 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 75: -#line 650 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 656 "glslang.y" { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpDivAssign; + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpMulAssign; } -#line 3869 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 76: -#line 654 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 660 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpModAssign; + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpDivAssign; } -#line 3879 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 77: -#line 659 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 664 "glslang.y" { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpAddAssign; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "%="); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpModAssign; } -#line 3888 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 78: -#line 663 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 669 "glslang.y" { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpSubAssign; + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpAddAssign; } -#line 3897 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 79: -#line 667 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 673 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm).op = EOpSubAssign; } -#line 3906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 80: -#line 671 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 677 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bit-shift left assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } -#line 3915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 81: -#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 681 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bit-shift right assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } -#line 3924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 82: -#line 679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 685 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-and assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpAndAssign; } -#line 3933 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 83: -#line 683 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 689 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-xor assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } -#line 3942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 84: -#line 690 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 693 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-or assign"); + (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } -#line 3950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 85: -#line 693 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 700 "glslang.y" { - parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - } + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 3963 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 86: -#line 704 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 703 "glslang.y" { - parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + parseContext.samplerConstructorLocationCheck((yyvsp[(2) - (3)].lex).loc, ",", (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.binaryOpError((yyvsp[(2) - (3)].lex).loc, ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); + } } -#line 3972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 87: -#line 711 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 714 "glslang.y" { - parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); - (yyval.interm.intermNode) = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + parseContext.constantValueCheck((yyvsp[(1) - (1)].interm.intermTypedNode), ""); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 3982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 88: -#line 716 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 721 "glslang.y" { - if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) - (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; + parseContext.handleFunctionDeclarator((yyvsp[(1) - (2)].interm).loc, *(yyvsp[(1) - (2)].interm).function, true /* prototype */); + (yyval.interm.intermNode) = 0; + // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 3992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 89: -#line 721 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 726 "glslang.y" { - parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); - - // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope - parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); - parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); - (yyval.interm.intermNode) = 0; + if ((yyvsp[(1) - (2)].interm).intermNode && (yyvsp[(1) - (2)].interm).intermNode->getAsAggregate()) + (yyvsp[(1) - (2)].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermNode; } -#line 4005 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 90: -#line 729 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 731 "glslang.y" { - parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); + parseContext.profileRequires((yyvsp[(1) - (4)].lex).loc, ENoProfile, 130, 0, "precision statement"); + + // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope + parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); + parseContext.setDefaultPrecision((yyvsp[(1) - (4)].lex).loc, (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } -#line 4014 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 91: -#line 733 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 739 "glslang.y" { - parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); + parseContext.declareBlock((yyvsp[(1) - (2)].interm).loc, *(yyvsp[(1) - (2)].interm).typeList); (yyval.interm.intermNode) = 0; } -#line 4023 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 92: -#line 737 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 743 "glslang.y" { - parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); + parseContext.declareBlock((yyvsp[(1) - (3)].interm).loc, *(yyvsp[(1) - (3)].interm).typeList, (yyvsp[(2) - (3)].lex).string); (yyval.interm.intermNode) = 0; } -#line 4032 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 93: -#line 741 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 747 "glslang.y" { - parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); - parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); + parseContext.declareBlock((yyvsp[(1) - (4)].interm).loc, *(yyvsp[(1) - (4)].interm).typeList, (yyvsp[(2) - (4)].lex).string, (yyvsp[(3) - (4)].interm).arraySizes); (yyval.interm.intermNode) = 0; } -#line 4042 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 94: -#line 746 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 751 "glslang.y" { - parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); - parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); + parseContext.globalQualifierFixCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier); + parseContext.updateStandaloneQualifierDefaults((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type)); (yyval.interm.intermNode) = 0; } -#line 4052 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 95: -#line 751 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 756 "glslang.y" { - parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); - (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); - parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); + parseContext.checkNoShaderLayouts((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).shaderQualifiers); + parseContext.addQualifierToExisting((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).qualifier, *(yyvsp[(2) - (3)].lex).string); (yyval.interm.intermNode) = 0; } -#line 4063 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 96: -#line 760 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 4069 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 761 "glslang.y" + { + parseContext.checkNoShaderLayouts((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).shaderQualifiers); + (yyvsp[(3) - (4)].interm.identifierList)->push_back((yyvsp[(2) - (4)].lex).string); + parseContext.addQualifierToExisting((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).qualifier, *(yyvsp[(3) - (4)].interm.identifierList)); + (yyval.interm.intermNode) = 0; + } break; case 97: -#line 760 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - --parseContext.structNestingLevel; - parseContext.blockName = (yyvsp[-4].lex).string; - parseContext.globalQualifierFixCheck((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).qualifier); - parseContext.checkNoShaderLayouts((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).shaderQualifiers); - parseContext.currentBlockQualifier = (yyvsp[-5].interm.type).qualifier; - (yyval.interm).loc = (yyvsp[-5].interm.type).loc; - (yyval.interm).typeList = (yyvsp[-1].interm.typeList); - } -#line 4083 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 770 "glslang.y" + { parseContext.nestedBlockCheck((yyvsp[(1) - (3)].interm.type).loc); } break; case 98: -#line 771 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 770 "glslang.y" { - (yyval.interm.identifierList) = new TIdentifierList; - (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); + --parseContext.structNestingLevel; + parseContext.blockName = (yyvsp[(2) - (6)].lex).string; + parseContext.globalQualifierFixCheck((yyvsp[(1) - (6)].interm.type).loc, (yyvsp[(1) - (6)].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[(1) - (6)].interm.type).loc, (yyvsp[(1) - (6)].interm.type).shaderQualifiers); + parseContext.currentBlockQualifier = (yyvsp[(1) - (6)].interm.type).qualifier; + (yyval.interm).loc = (yyvsp[(1) - (6)].interm.type).loc; + (yyval.interm).typeList = (yyvsp[(5) - (6)].interm.typeList); } -#line 4092 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 99: -#line 775 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 781 "glslang.y" { - (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); - (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); + (yyval.interm.identifierList) = new TIdentifierList; + (yyval.interm.identifierList)->push_back((yyvsp[(2) - (2)].lex).string); } -#line 4101 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 100: -#line 782 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 785 "glslang.y" { - (yyval.interm).function = (yyvsp[-1].interm.function); - (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm.identifierList) = (yyvsp[(1) - (3)].interm.identifierList); + (yyval.interm.identifierList)->push_back((yyvsp[(3) - (3)].lex).string); } -#line 4110 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 101: -#line 789 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 792 "glslang.y" { - (yyval.interm.function) = (yyvsp[0].interm.function); + (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; } -#line 4118 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 102: -#line 792 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 799 "glslang.y" { - (yyval.interm.function) = (yyvsp[0].interm.function); + (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); } -#line 4126 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 103: -#line 799 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 802 "glslang.y" + { + (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); + } + break; + + case 104: +/* Line 1792 of yacc.c */ +#line 809 "glslang.y" { // Add the parameter - (yyval.interm.function) = (yyvsp[-1].interm.function); - if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) - (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); + (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); + if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid) + (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); else - delete (yyvsp[0].interm).param.type; + delete (yyvsp[(2) - (2)].interm).param.type; } -#line 4139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 104: -#line 807 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 105: +/* Line 1792 of yacc.c */ +#line 817 "glslang.y" { // // 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) { + if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) { // // This parameter > first is void // - parseContext.error((yyvsp[-1].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); - delete (yyvsp[0].interm).param.type; + parseContext.error((yyvsp[(2) - (3)].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); + delete (yyvsp[(3) - (3)].interm).param.type; } else { // Add the parameter - (yyval.interm.function) = (yyvsp[-2].interm.function); - (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); + (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); + (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); } } -#line 4161 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 105: -#line 827 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 106: +/* Line 1792 of yacc.c */ +#line 837 "glslang.y" { - if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { - parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", - GetStorageQualifierString((yyvsp[-2].interm.type).qualifier.storage), ""); + if ((yyvsp[(1) - (3)].interm.type).qualifier.storage != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier.storage != EvqTemporary) { + parseContext.error((yyvsp[(2) - (3)].lex).loc, "no qualifiers allowed for function return", + GetStorageQualifierString((yyvsp[(1) - (3)].interm.type).qualifier.storage), ""); } - if ((yyvsp[-2].interm.type).arraySizes) - parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + if ((yyvsp[(1) - (3)].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); // Add the function as a prototype after parsing it (we do not support recursion) TFunction *function; - TType type((yyvsp[-2].interm.type)); - function = new TFunction((yyvsp[-1].lex).string, type); + TType type((yyvsp[(1) - (3)].interm.type)); + function = new TFunction((yyvsp[(2) - (3)].lex).string, type); (yyval.interm.function) = function; } -#line 4180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 106: -#line 845 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 107: +/* Line 1792 of yacc.c */ +#line 855 "glslang.y" { - if ((yyvsp[-1].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes); + if ((yyvsp[(1) - (2)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (2)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (2)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (2)].interm.type).loc, *(yyvsp[(1) - (2)].interm.type).arraySizes); } - if ((yyvsp[-1].interm.type).basicType == EbtVoid) { - parseContext.error((yyvsp[0].lex).loc, "illegal use of type 'void'", (yyvsp[0].lex).string->c_str(), ""); + if ((yyvsp[(1) - (2)].interm.type).basicType == EbtVoid) { + parseContext.error((yyvsp[(2) - (2)].lex).loc, "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str(), ""); } - parseContext.reservedErrorCheck((yyvsp[0].lex).loc, *(yyvsp[0].lex).string); + parseContext.reservedErrorCheck((yyvsp[(2) - (2)].lex).loc, *(yyvsp[(2) - (2)].lex).string); - TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))}; - (yyval.interm).loc = (yyvsp[0].lex).loc; + TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))}; + (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; (yyval.interm).param = param; } -#line 4200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 107: -#line 860 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 108: +/* Line 1792 of yacc.c */ +#line 870 "glslang.y" { - if ((yyvsp[-2].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + if ((yyvsp[(1) - (3)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); } - parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.type).arraySizes, (yyvsp[0].interm).arraySizes); + parseContext.arrayDimCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.type).arraySizes, (yyvsp[(3) - (3)].interm).arraySizes); - parseContext.arraySizeRequiredCheck((yyvsp[0].interm).loc, *(yyvsp[0].interm).arraySizes); - parseContext.reservedErrorCheck((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string); + parseContext.arraySizeRequiredCheck((yyvsp[(3) - (3)].interm).loc, *(yyvsp[(3) - (3)].interm).arraySizes); + parseContext.reservedErrorCheck((yyvsp[(2) - (3)].lex).loc, *(yyvsp[(2) - (3)].lex).string); - (yyvsp[-2].interm.type).arraySizes = (yyvsp[0].interm).arraySizes; + (yyvsp[(1) - (3)].interm.type).arraySizes = (yyvsp[(3) - (3)].interm).arraySizes; - TParameter param = { (yyvsp[-1].lex).string, new TType((yyvsp[-2].interm.type))}; - (yyval.interm).loc = (yyvsp[-1].lex).loc; + TParameter param = { (yyvsp[(2) - (3)].lex).string, new TType((yyvsp[(1) - (3)].interm.type))}; + (yyval.interm).loc = (yyvsp[(2) - (3)].lex).loc; (yyval.interm).param = param; } -#line 4222 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 108: -#line 883 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 109: +/* Line 1792 of yacc.c */ +#line 893 "glslang.y" { - (yyval.interm) = (yyvsp[0].interm); - if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) - (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; + (yyval.interm) = (yyvsp[(2) - (2)].interm); + if ((yyvsp[(1) - (2)].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[(1) - (2)].interm.type).qualifier.precision; parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); - parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); - parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); - - } -#line 4238 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 109: -#line 894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - (yyval.interm) = (yyvsp[0].interm); + parseContext.checkNoShaderLayouts((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(1) - (2)].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, *(yyval.interm).param.type); - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); - parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 4250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 110: -#line 904 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 904 "glslang.y" { - (yyval.interm) = (yyvsp[0].interm); - if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) - (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + (yyval.interm) = (yyvsp[(1) - (1)].interm); - parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); - parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); + parseContext.parameterTypeCheck((yyvsp[(1) - (1)].interm).loc, EvqIn, *(yyvsp[(1) - (1)].interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (1)].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 4265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 111: -#line 914 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 914 "glslang.y" { - (yyval.interm) = (yyvsp[0].interm); + (yyval.interm) = (yyvsp[(2) - (2)].interm); + if ((yyvsp[(1) - (2)].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[(1) - (2)].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyvsp[(1) - (2)].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); - parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.checkNoShaderLayouts((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(1) - (2)].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, *(yyval.interm).param.type); } -#line 4277 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 112: -#line 924 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 924 "glslang.y" { - TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; - (yyval.interm).param = param; - if ((yyvsp[0].interm.type).arraySizes) - parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); + (yyval.interm) = (yyvsp[(1) - (1)].interm); + + parseContext.parameterTypeCheck((yyvsp[(1) - (1)].interm).loc, EvqIn, *(yyvsp[(1) - (1)].interm).param.type); + parseContext.paramCheckFix((yyvsp[(1) - (1)].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 4288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 113: -#line 933 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 934 "glslang.y" { - (yyval.interm) = (yyvsp[0].interm); + TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; + (yyval.interm).param = param; + if ((yyvsp[(1) - (1)].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (1)].interm.type).loc, *(yyvsp[(1) - (1)].interm.type).arraySizes); } -#line 4296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 114: -#line 936 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 943 "glslang.y" { - (yyval.interm) = (yyvsp[-2].interm); - parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); + (yyval.interm) = (yyvsp[(1) - (1)].interm); } -#line 4305 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 115: -#line 940 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 946 "glslang.y" { - (yyval.interm) = (yyvsp[-3].interm); - parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); + (yyval.interm) = (yyvsp[(1) - (3)].interm); + parseContext.declareVariable((yyvsp[(3) - (3)].lex).loc, *(yyvsp[(3) - (3)].lex).string, (yyvsp[(1) - (3)].interm).type); } -#line 4314 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 116: -#line 944 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 950 "glslang.y" { - (yyval.interm).type = (yyvsp[-5].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); + (yyval.interm) = (yyvsp[(1) - (4)].interm); + parseContext.declareVariable((yyvsp[(3) - (4)].lex).loc, *(yyvsp[(3) - (4)].lex).string, (yyvsp[(1) - (4)].interm).type, (yyvsp[(4) - (4)].interm).arraySizes); } -#line 4324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 117: -#line 949 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 954 "glslang.y" { - (yyval.interm).type = (yyvsp[-4].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); + (yyval.interm).type = (yyvsp[(1) - (6)].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(3) - (6)].lex).loc, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, (yyvsp[(4) - (6)].interm).arraySizes, (yyvsp[(6) - (6)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, initNode, (yyvsp[(5) - (6)].lex).loc); } -#line 4334 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 118: -#line 957 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 959 "glslang.y" { - (yyval.interm).type = (yyvsp[0].interm.type); - (yyval.interm).intermNode = 0; - parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); + (yyval.interm).type = (yyvsp[(1) - (5)].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(3) - (5)].lex).loc, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, 0, (yyvsp[(5) - (5)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (5)].interm).intermNode, initNode, (yyvsp[(4) - (5)].lex).loc); } -#line 4344 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 119: -#line 962 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 967 "glslang.y" { - (yyval.interm).type = (yyvsp[-1].interm.type); + (yyval.interm).type = (yyvsp[(1) - (1)].interm.type); (yyval.interm).intermNode = 0; - parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); + parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } -#line 4354 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 120: -#line 967 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 972 "glslang.y" { - (yyval.interm).type = (yyvsp[-2].interm.type); + (yyval.interm).type = (yyvsp[(1) - (2)].interm.type); (yyval.interm).intermNode = 0; - parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); + parseContext.declareVariable((yyvsp[(2) - (2)].lex).loc, *(yyvsp[(2) - (2)].lex).string, (yyvsp[(1) - (2)].interm.type)); } -#line 4364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 121: -#line 972 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 977 "glslang.y" { - (yyval.interm).type = (yyvsp[-4].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); + (yyval.interm).type = (yyvsp[(1) - (3)].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[(2) - (3)].lex).loc, *(yyvsp[(2) - (3)].lex).string, (yyvsp[(1) - (3)].interm.type), (yyvsp[(3) - (3)].interm).arraySizes); } -#line 4374 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 122: -#line 977 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 982 "glslang.y" { - (yyval.interm).type = (yyvsp[-3].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); + (yyval.interm).type = (yyvsp[(1) - (5)].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (5)].lex).loc, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), (yyvsp[(3) - (5)].interm).arraySizes, (yyvsp[(5) - (5)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[(4) - (5)].lex).loc); } -#line 4384 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 123: -#line 986 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 987 "glslang.y" + { + (yyval.interm).type = (yyvsp[(1) - (4)].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (4)].lex).loc, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), 0, (yyvsp[(4) - (4)].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[(3) - (4)].lex).loc); + } + break; + + case 124: +/* Line 1792 of yacc.c */ +#line 996 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); - parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type)); - if ((yyvsp[0].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.globalQualifierTypeCheck((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type).qualifier, (yyval.interm.type)); + if ((yyvsp[(1) - (1)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (1)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (1)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); } -#line 4400 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 124: -#line 997 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 125: +/* Line 1792 of yacc.c */ +#line 1007 "glslang.y" { - parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); - parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); + parseContext.globalQualifierFixCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier); + parseContext.globalQualifierTypeCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, (yyvsp[(2) - (2)].interm.type)); - if ((yyvsp[0].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if ((yyvsp[(2) - (2)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(2) - (2)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(2) - (2)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } - if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier)) - (yyvsp[0].interm.type).arraySizes = 0; + if ((yyvsp[(2) - (2)].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier)) + (yyvsp[(2) - (2)].interm.type).arraySizes = 0; - parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); - (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); - parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); + (yyvsp[(2) - (2)].interm.type).shaderQualifiers.merge((yyvsp[(1) - (2)].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(2) - (2)].interm.type).qualifier, (yyvsp[(1) - (2)].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(2) - (2)].interm.type).basicType, (yyvsp[(2) - (2)].interm.type).qualifier); - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); if (! (yyval.interm.type).qualifier.isInterpolation() && ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) || (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } -#line 4429 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 125: -#line 1024 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); - parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.invariant = true; - } -#line 4440 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 126: -#line 1033 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1034 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.smooth = true; + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "invariant"); + parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.invariant = true; } -#line 4452 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 127: -#line 1040 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1043 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.flat = true; + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "smooth"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "smooth"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "smooth"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.smooth = true; } -#line 4464 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 128: -#line 1047 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1050 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); - parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "noperspective"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.nopersp = true; + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "flat"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "flat"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "flat"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.flat = true; } -#line 4476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 129: -#line 1054 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1057 "glslang.y" { -#ifdef AMD_EXTENSIONS - parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); - parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.explicitInterp = true; -#endif + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "noperspective"); + parseContext.requireProfile((yyvsp[(1) - (1)].lex).loc, ~EEsProfile, "noperspective"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "noperspective"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.nopersp = true; } -#line 4490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 130: -#line 1066 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1064 "glslang.y" { - (yyval.interm.type) = (yyvsp[-1].interm.type); +#ifdef AMD_EXTENSIONS + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "__explicitInterpAMD"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.explicitInterp = true; +#endif } -#line 4498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 131: -#line 1072 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1076 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(3) - (4)].interm.type); } -#line 4506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 132: -#line 1075 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1082 "glslang.y" { - (yyval.interm.type) = (yyvsp[-2].interm.type); - (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); - parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 133: -#line 1082 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1085 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); - parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); + (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type); + (yyval.interm.type).shaderQualifiers.merge((yyvsp[(3) - (3)].interm.type).shaderQualifiers); + parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[(3) - (3)].interm.type).qualifier, false); } -#line 4525 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 134: -#line 1086 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1092 "glslang.y" { - (yyval.interm.type).init((yyvsp[-2].lex).loc); - parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + parseContext.setLayoutQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type), *(yyvsp[(1) - (1)].lex).string); } -#line 4534 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 135: -#line 1090 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { // because "shared" is both an identifier and a keyword - (yyval.interm.type).init((yyvsp[0].lex).loc); - TString strShared("shared"); - parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); +/* Line 1792 of yacc.c */ +#line 1096 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (3)].lex).loc); + parseContext.setLayoutQualifier((yyvsp[(1) - (3)].lex).loc, (yyval.interm.type), *(yyvsp[(1) - (3)].lex).string, (yyvsp[(3) - (3)].interm.intermTypedNode)); } -#line 4544 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 136: -#line 1098 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.noContraction = true; +/* Line 1792 of yacc.c */ +#line 1100 "glslang.y" + { // because "shared" is both an identifier and a keyword + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + TString strShared("shared"); + parseContext.setLayoutQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type), strShared); } -#line 4555 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 137: -#line 1107 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1108 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.noContraction = true; } -#line 4563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 138: -#line 1110 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1117 "glslang.y" { - (yyval.interm.type) = (yyvsp[-1].interm.type); - if ((yyval.interm.type).basicType == EbtVoid) - (yyval.interm.type).basicType = (yyvsp[0].interm.type).basicType; - - (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); - parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 139: -#line 1121 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1120 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (2)].interm.type); + if ((yyval.interm.type).basicType == EbtVoid) + (yyval.interm.type).basicType = (yyvsp[(2) - (2)].interm.type).basicType; + + (yyval.interm.type).shaderQualifiers.merge((yyvsp[(2) - (2)].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[(2) - (2)].interm.type).qualifier, false); } -#line 4584 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 140: -#line 1124 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1131 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 141: -#line 1127 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1134 "glslang.y" { - parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4601 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 142: -#line 1131 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1137 "glslang.y" { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.checkPrecisionQualifier((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type).qualifier.precision); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 143: -#line 1135 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1141 "glslang.y" { // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 144: -#line 1139 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1145 "glslang.y" { // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4628 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 145: -#line 1146 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1149 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); } -#line 4637 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 146: -#line 1150 "MachineIndependent/glslang.y" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 1156 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + } + break; + + case 147: +/* Line 1792 of yacc.c */ +#line 1160 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); - parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); - parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "attribute"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "attribute"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "attribute"); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangVertex, "attribute"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 130, "attribute"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, "attribute"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 420, "attribute"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, "attribute"); - parseContext.globalCheck((yyvsp[0].lex).loc, "attribute"); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "attribute"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 4654 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 147: -#line 1162 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 148: +/* Line 1792 of yacc.c */ +#line 1172 "glslang.y" { - parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); - parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "varying"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "varying"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, "varying"); + parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 130, "varying"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 420, "varying"); + parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, "varying"); - parseContext.globalCheck((yyvsp[0].lex).loc, "varying"); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "varying"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); if (parseContext.language == EShLangVertex) (yyval.interm.type).qualifier.storage = EvqVaryingOut; else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 4673 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 148: -#line 1176 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 149: +/* Line 1792 of yacc.c */ +#line 1186 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "inout"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.storage = EvqInOut; } -#line 4683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 149: -#line 1181 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 150: +/* Line 1792 of yacc.c */ +#line 1191 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "in"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "in"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqIn; } -#line 4694 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 150: -#line 1187 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 151: +/* Line 1792 of yacc.c */ +#line 1197 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "out"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "out"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqOut; } -#line 4705 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 151: -#line 1193 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 152: +/* Line 1792 of yacc.c */ +#line 1203 "glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); - parseContext.globalCheck((yyvsp[0].lex).loc, "centroid"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 120, 0, "centroid"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "centroid"); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "centroid"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.centroid = true; } -#line 4717 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 152: -#line 1200 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 153: +/* Line 1792 of yacc.c */ +#line 1210 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); - parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "patch"); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.patch = true; } -#line 4728 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 153: -#line 1206 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 154: +/* Line 1792 of yacc.c */ +#line 1216 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "sample"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.sample = true; } -#line 4738 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 154: -#line 1211 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 155: +/* Line 1792 of yacc.c */ +#line 1221 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "uniform"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; } -#line 4748 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 155: -#line 1216 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 156: +/* Line 1792 of yacc.c */ +#line 1226 "glslang.y" { - parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "buffer"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.storage = EvqBuffer; } -#line 4758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 156: -#line 1221 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 157: +/* Line 1792 of yacc.c */ +#line 1231 "glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage((yyvsp[0].lex).loc, EShLangCompute, "shared"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 310, 0, "shared"); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangCompute, "shared"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } -#line 4770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 157: -#line 1228 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 158: +/* Line 1792 of yacc.c */ +#line 1238 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.coherent = true; } -#line 4779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 158: -#line 1232 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 159: +/* Line 1792 of yacc.c */ +#line 1242 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.volatil = true; } -#line 4788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 159: -#line 1236 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 160: +/* Line 1792 of yacc.c */ +#line 1246 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.restrict = true; } -#line 4797 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 160: -#line 1240 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 161: +/* Line 1792 of yacc.c */ +#line 1250 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.readonly = true; } -#line 4806 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 161: -#line 1244 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 162: +/* Line 1792 of yacc.c */ +#line 1254 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } -#line 4815 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 162: -#line 1248 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 163: +/* Line 1792 of yacc.c */ +#line 1258 "glslang.y" { - parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); - parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.spvRemoved((yyvsp[(1) - (1)].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; } -#line 4826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 163: -#line 1254 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 164: +/* Line 1792 of yacc.c */ +#line 1264 "glslang.y" { - parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); - parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); - (yyval.interm.type).init((yyvsp[-3].lex).loc); + parseContext.spvRemoved((yyvsp[(1) - (4)].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[(1) - (4)].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[(1) - (4)].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; // TODO: 4.0 semantics: subroutines // 1) make sure each identifier is a type declared earlier with SUBROUTINE // 2) save all of the identifiers for future comparison with the declared function } -#line 4840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 164: -#line 1266 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 165: +/* Line 1792 of yacc.c */ +#line 1276 "glslang.y" { // TODO: 4.0 functionality: subroutine type to list } -#line 4848 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 165: -#line 1269 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 166: +/* Line 1792 of yacc.c */ +#line 1279 "glslang.y" { } -#line 4855 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 166: -#line 1274 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 167: +/* Line 1792 of yacc.c */ +#line 1284 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); } -#line 4864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 167: -#line 1278 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 168: +/* Line 1792 of yacc.c */ +#line 1288 "glslang.y" { - parseContext.arrayDimCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes, 0); - (yyval.interm.type) = (yyvsp[-1].interm.type); + parseContext.arrayDimCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(2) - (2)].interm).arraySizes, 0); + (yyval.interm.type) = (yyvsp[(1) - (2)].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); - (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; + (yyval.interm.type).arraySizes = (yyvsp[(2) - (2)].interm).arraySizes; } -#line 4875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 168: -#line 1287 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 169: +/* Line 1792 of yacc.c */ +#line 1297 "glslang.y" { - (yyval.interm).loc = (yyvsp[-1].lex).loc; + (yyval.interm).loc = (yyvsp[(1) - (2)].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } -#line 4885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 169: -#line 1292 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 170: +/* Line 1792 of yacc.c */ +#line 1302 "glslang.y" { - (yyval.interm).loc = (yyvsp[-2].lex).loc; + (yyval.interm).loc = (yyvsp[(1) - (3)].lex).loc; (yyval.interm).arraySizes = new TArraySizes; TArraySize size; - parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); + parseContext.arraySizeCheck((yyvsp[(2) - (3)].interm.intermTypedNode)->getLoc(), (yyvsp[(2) - (3)].interm.intermTypedNode), size); (yyval.interm).arraySizes->addInnerSize(size); } -#line 4898 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 170: -#line 1300 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 171: +/* Line 1792 of yacc.c */ +#line 1310 "glslang.y" { - (yyval.interm) = (yyvsp[-2].interm); + (yyval.interm) = (yyvsp[(1) - (3)].interm); (yyval.interm).arraySizes->addInnerSize(); } -#line 4907 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 171: -#line 1304 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 172: +/* Line 1792 of yacc.c */ +#line 1314 "glslang.y" { - (yyval.interm) = (yyvsp[-3].interm); + (yyval.interm) = (yyvsp[(1) - (4)].interm); TArraySize size; - parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); + parseContext.arraySizeCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLoc(), (yyvsp[(3) - (4)].interm.intermTypedNode), size); (yyval.interm).arraySizes->addInnerSize(size); } -#line 4919 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 172: -#line 1314 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 173: +/* Line 1792 of yacc.c */ +#line 1324 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } -#line 4928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 173: -#line 1318 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 174: +/* Line 1792 of yacc.c */ +#line 1328 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 4937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 174: -#line 1322 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 175: +/* Line 1792 of yacc.c */ +#line 1332 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 4947 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 175: -#line 1327 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 176: +/* Line 1792 of yacc.c */ +#line 1337 "glslang.y" + { +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; +#endif + } + break; + + case 177: +/* Line 1792 of yacc.c */ +#line 1344 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 4956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 176: -#line 1331 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 178: +/* Line 1792 of yacc.c */ +#line 1348 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } -#line 4966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 177: -#line 1336 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 179: +/* Line 1792 of yacc.c */ +#line 1353 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; } -#line 4976 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 178: -#line 1341 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 180: +/* Line 1792 of yacc.c */ +#line 1358 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; } -#line 4986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 179: -#line 1346 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 181: +/* Line 1792 of yacc.c */ +#line 1363 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; } -#line 4995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 180: -#line 1350 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 182: +/* Line 1792 of yacc.c */ +#line 1367 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } -#line 5005 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 181: -#line 1355 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 183: +/* Line 1792 of yacc.c */ +#line 1372 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } -#line 5015 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 182: -#line 1360 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 184: +/* Line 1792 of yacc.c */ +#line 1377 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } -#line 5025 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 183: -#line 1365 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 185: +/* Line 1792 of yacc.c */ +#line 1382 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 5036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 184: -#line 1371 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 186: +/* Line 1792 of yacc.c */ +#line 1388 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 5047 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 185: -#line 1377 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 187: +/* Line 1792 of yacc.c */ +#line 1394 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } -#line 5058 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 186: -#line 1383 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 188: +/* Line 1792 of yacc.c */ +#line 1400 "glslang.y" + { +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(2); +#endif + } + break; + + case 189: +/* Line 1792 of yacc.c */ +#line 1408 "glslang.y" + { +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(3); +#endif + } + break; + + case 190: +/* Line 1792 of yacc.c */ +#line 1416 "glslang.y" + { +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(4); +#endif + } + break; + + case 191: +/* Line 1792 of yacc.c */ +#line 1424 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(2); } -#line 5068 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 187: -#line 1388 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 192: +/* Line 1792 of yacc.c */ +#line 1429 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(3); } -#line 5078 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 188: -#line 1393 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 193: +/* Line 1792 of yacc.c */ +#line 1434 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(4); } -#line 5088 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 189: -#line 1398 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 194: +/* Line 1792 of yacc.c */ +#line 1439 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } -#line 5098 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 190: -#line 1403 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 195: +/* Line 1792 of yacc.c */ +#line 1444 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } -#line 5108 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 191: -#line 1408 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 196: +/* Line 1792 of yacc.c */ +#line 1449 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } -#line 5118 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 192: -#line 1413 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 197: +/* Line 1792 of yacc.c */ +#line 1454 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(2); } -#line 5129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 193: -#line 1419 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 198: +/* Line 1792 of yacc.c */ +#line 1460 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(3); } -#line 5140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 194: -#line 1425 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 199: +/* Line 1792 of yacc.c */ +#line 1466 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(4); } -#line 5151 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 195: -#line 1431 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 200: +/* Line 1792 of yacc.c */ +#line 1472 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } -#line 5162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 196: -#line 1437 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 201: +/* Line 1792 of yacc.c */ +#line 1478 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } -#line 5173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 197: -#line 1443 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 202: +/* Line 1792 of yacc.c */ +#line 1484 "glslang.y" { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } -#line 5184 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 198: -#line 1449 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 203: +/* Line 1792 of yacc.c */ +#line 1490 "glslang.y" + { + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(2); + } + break; + + case 204: +/* Line 1792 of yacc.c */ +#line 1496 "glslang.y" + { + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(3); + } + break; + + case 205: +/* Line 1792 of yacc.c */ +#line 1502 "glslang.y" + { + parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(4); + } + break; + + case 206: +/* Line 1792 of yacc.c */ +#line 1508 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); + } + break; + + case 207: +/* Line 1792 of yacc.c */ +#line 1513 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); + } + break; + + case 208: +/* Line 1792 of yacc.c */ +#line 1518 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); + } + break; + + case 209: +/* Line 1792 of yacc.c */ +#line 1523 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); + } + break; + + case 210: +/* Line 1792 of yacc.c */ +#line 1528 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 3); + } + break; + + case 211: +/* Line 1792 of yacc.c */ +#line 1533 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 4); + } + break; + + case 212: +/* Line 1792 of yacc.c */ +#line 1538 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 2); + } + break; + + case 213: +/* Line 1792 of yacc.c */ +#line 1543 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); + } + break; + + case 214: +/* Line 1792 of yacc.c */ +#line 1548 "glslang.y" + { + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 4); + } + break; + + case 215: +/* Line 1792 of yacc.c */ +#line 1553 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(2); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 2); } -#line 5195 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 199: -#line 1455 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 216: +/* Line 1792 of yacc.c */ +#line 1558 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(3); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 3); } -#line 5206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 200: -#line 1461 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 217: +/* Line 1792 of yacc.c */ +#line 1563 "glslang.y" { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(4); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } -#line 5217 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 201: -#line 1467 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 218: +/* Line 1792 of yacc.c */ +#line 1568 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 5227 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 202: -#line 1472 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 219: +/* Line 1792 of yacc.c */ +#line 1574 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 5237 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 203: -#line 1477 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 220: +/* Line 1792 of yacc.c */ +#line 1580 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 5247 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 204: -#line 1482 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 221: +/* Line 1792 of yacc.c */ +#line 1586 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 5257 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 205: -#line 1487 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 222: +/* Line 1792 of yacc.c */ +#line 1592 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 5267 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 206: -#line 1492 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 223: +/* Line 1792 of yacc.c */ +#line 1598 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 5277 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 207: -#line 1497 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 224: +/* Line 1792 of yacc.c */ +#line 1604 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 5287 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 208: -#line 1502 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 225: +/* Line 1792 of yacc.c */ +#line 1610 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 5297 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 209: -#line 1507 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 226: +/* Line 1792 of yacc.c */ +#line 1616 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 5307 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 210: -#line 1512 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 227: +/* Line 1792 of yacc.c */ +#line 1622 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 5317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 211: -#line 1517 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 228: +/* Line 1792 of yacc.c */ +#line 1628 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 5327 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 212: -#line 1522 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 229: +/* Line 1792 of yacc.c */ +#line 1634 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 5337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 213: -#line 1527 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 230: +/* Line 1792 of yacc.c */ +#line 1640 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); +#endif } -#line 5348 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 214: -#line 1533 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 231: +/* Line 1792 of yacc.c */ +#line 1648 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); +#endif } -#line 5359 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 215: -#line 1539 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 232: +/* Line 1792 of yacc.c */ +#line 1656 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); +#endif } -#line 5370 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 216: -#line 1545 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 233: +/* Line 1792 of yacc.c */ +#line 1664 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); +#endif } -#line 5381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 217: -#line 1551 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 234: +/* Line 1792 of yacc.c */ +#line 1672 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 3); +#endif } -#line 5392 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 218: -#line 1557 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 235: +/* Line 1792 of yacc.c */ +#line 1680 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 4); +#endif } -#line 5403 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 219: -#line 1563 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 236: +/* Line 1792 of yacc.c */ +#line 1688 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 2); +#endif } -#line 5414 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 220: -#line 1569 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 237: +/* Line 1792 of yacc.c */ +#line 1696 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); +#endif } -#line 5425 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 221: -#line 1575 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 238: +/* Line 1792 of yacc.c */ +#line 1704 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 4); +#endif } -#line 5436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 222: -#line 1581 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 239: +/* Line 1792 of yacc.c */ +#line 1712 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 2); +#endif } -#line 5447 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 223: -#line 1587 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 240: +/* Line 1792 of yacc.c */ +#line 1720 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 3); +#endif } -#line 5458 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 224: -#line 1593 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 241: +/* Line 1792 of yacc.c */ +#line 1728 "glslang.y" { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); +#endif } -#line 5469 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 225: -#line 1599 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 242: +/* Line 1792 of yacc.c */ +#line 1736 "glslang.y" { - parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.vulkanRemoved((yyvsp[(1) - (1)].lex).loc, "atomic counter types"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAtomicUint; } -#line 5479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 226: -#line 1604 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 243: +/* Line 1792 of yacc.c */ +#line 1741 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } -#line 5489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 227: -#line 1609 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 244: +/* Line 1792 of yacc.c */ +#line 1746 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } -#line 5499 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 228: -#line 1614 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 245: +/* Line 1792 of yacc.c */ +#line 1751 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } -#line 5509 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 229: -#line 1619 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 246: +/* Line 1792 of yacc.c */ +#line 1756 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } -#line 5519 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 230: -#line 1624 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 247: +/* Line 1792 of yacc.c */ +#line 1761 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); } -#line 5529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 231: -#line 1629 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 248: +/* Line 1792 of yacc.c */ +#line 1766 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); } -#line 5539 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 232: -#line 1634 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 249: +/* Line 1792 of yacc.c */ +#line 1771 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); } -#line 5549 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 233: -#line 1639 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 250: +/* Line 1792 of yacc.c */ +#line 1776 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); } -#line 5559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 234: -#line 1644 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 251: +/* Line 1792 of yacc.c */ +#line 1781 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); } -#line 5569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 235: -#line 1649 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 252: +/* Line 1792 of yacc.c */ +#line 1786 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); } -#line 5579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 236: -#line 1654 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 253: +/* Line 1792 of yacc.c */ +#line 1791 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); } -#line 5589 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 237: -#line 1659 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 254: +/* Line 1792 of yacc.c */ +#line 1796 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); } -#line 5599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 238: -#line 1664 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 255: +/* Line 1792 of yacc.c */ +#line 1801 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); } -#line 5609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 239: -#line 1669 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 256: +/* Line 1792 of yacc.c */ +#line 1806 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D); } -#line 5619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 240: -#line 1674 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 257: +/* Line 1792 of yacc.c */ +#line 1811 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D); } -#line 5629 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 241: -#line 1679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 258: +/* Line 1792 of yacc.c */ +#line 1816 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd3D); } -#line 5639 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 242: -#line 1684 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 259: +/* Line 1792 of yacc.c */ +#line 1821 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube); } -#line 5649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 243: -#line 1689 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 260: +/* Line 1792 of yacc.c */ +#line 1826 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); } -#line 5659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 244: -#line 1694 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 261: +/* Line 1792 of yacc.c */ +#line 1831 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); } -#line 5669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 245: -#line 1699 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 262: +/* Line 1792 of yacc.c */ +#line 1836 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); } -#line 5679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 246: -#line 1704 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 263: +/* Line 1792 of yacc.c */ +#line 1841 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D); } -#line 5689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 247: -#line 1709 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 264: +/* Line 1792 of yacc.c */ +#line 1846 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D); } -#line 5699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 248: -#line 1714 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 265: +/* Line 1792 of yacc.c */ +#line 1851 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd3D); } -#line 5709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 249: -#line 1719 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 266: +/* Line 1792 of yacc.c */ +#line 1856 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube); } -#line 5719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 250: -#line 1724 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 267: +/* Line 1792 of yacc.c */ +#line 1861 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); } -#line 5729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 251: -#line 1729 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 268: +/* Line 1792 of yacc.c */ +#line 1866 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); } -#line 5739 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 252: -#line 1734 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 269: +/* Line 1792 of yacc.c */ +#line 1871 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); } -#line 5749 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 253: -#line 1739 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 270: +/* Line 1792 of yacc.c */ +#line 1876 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } -#line 5759 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 254: -#line 1744 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 271: +/* Line 1792 of yacc.c */ +#line 1881 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); } -#line 5769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 255: -#line 1749 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 272: +/* Line 1792 of yacc.c */ +#line 1886 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdRect); } -#line 5779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 256: -#line 1754 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 273: +/* Line 1792 of yacc.c */ +#line 1891 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdRect); } -#line 5789 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 257: -#line 1759 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 274: +/* Line 1792 of yacc.c */ +#line 1896 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } -#line 5799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 258: -#line 1764 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 275: +/* Line 1792 of yacc.c */ +#line 1901 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } -#line 5809 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 259: -#line 1769 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 276: +/* Line 1792 of yacc.c */ +#line 1906 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } -#line 5819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 260: -#line 1774 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 277: +/* Line 1792 of yacc.c */ +#line 1911 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); } -#line 5829 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 261: -#line 1779 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 278: +/* Line 1792 of yacc.c */ +#line 1916 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } -#line 5839 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 262: -#line 1784 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 279: +/* Line 1792 of yacc.c */ +#line 1921 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } -#line 5849 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 263: -#line 1789 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 280: +/* Line 1792 of yacc.c */ +#line 1926 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); } -#line 5859 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 264: -#line 1794 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 281: +/* Line 1792 of yacc.c */ +#line 1931 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } -#line 5869 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 265: -#line 1799 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 282: +/* Line 1792 of yacc.c */ +#line 1936 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } -#line 5879 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 266: -#line 1804 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 283: +/* Line 1792 of yacc.c */ +#line 1941 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(false); } -#line 5889 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 267: -#line 1809 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 284: +/* Line 1792 of yacc.c */ +#line 1946 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(true); } -#line 5899 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 268: -#line 1814 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 285: +/* Line 1792 of yacc.c */ +#line 1951 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } -#line 5909 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 269: -#line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 286: +/* Line 1792 of yacc.c */ +#line 1956 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } -#line 5919 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 270: -#line 1824 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 287: +/* Line 1792 of yacc.c */ +#line 1961 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } -#line 5929 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 271: -#line 1829 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 288: +/* Line 1792 of yacc.c */ +#line 1966 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } -#line 5939 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 272: -#line 1834 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 289: +/* Line 1792 of yacc.c */ +#line 1971 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); } -#line 5949 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 273: -#line 1839 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 290: +/* Line 1792 of yacc.c */ +#line 1976 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); } -#line 5959 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 274: -#line 1844 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 291: +/* Line 1792 of yacc.c */ +#line 1981 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); } -#line 5969 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 275: -#line 1849 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 292: +/* Line 1792 of yacc.c */ +#line 1986 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } -#line 5979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 276: -#line 1854 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 293: +/* Line 1792 of yacc.c */ +#line 1991 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } -#line 5989 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 277: -#line 1859 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 294: +/* Line 1792 of yacc.c */ +#line 1996 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } -#line 5999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 278: -#line 1864 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 295: +/* Line 1792 of yacc.c */ +#line 2001 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } -#line 6009 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 279: -#line 1869 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 296: +/* Line 1792 of yacc.c */ +#line 2006 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); } -#line 6019 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 280: -#line 1874 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 297: +/* Line 1792 of yacc.c */ +#line 2011 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); } -#line 6029 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 281: -#line 1879 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 298: +/* Line 1792 of yacc.c */ +#line 2016 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); } -#line 6039 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 282: -#line 1884 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 299: +/* Line 1792 of yacc.c */ +#line 2021 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } -#line 6049 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 283: -#line 1889 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 300: +/* Line 1792 of yacc.c */ +#line 2026 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } -#line 6059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 284: -#line 1894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 301: +/* Line 1792 of yacc.c */ +#line 2031 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } -#line 6069 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 285: -#line 1899 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 302: +/* Line 1792 of yacc.c */ +#line 2036 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } -#line 6079 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 286: -#line 1904 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 303: +/* Line 1792 of yacc.c */ +#line 2041 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); } -#line 6089 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 287: -#line 1909 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 304: +/* Line 1792 of yacc.c */ +#line 2046 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); } -#line 6099 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 288: -#line 1914 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 305: +/* Line 1792 of yacc.c */ +#line 2051 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); } -#line 6109 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 289: -#line 1919 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 306: +/* Line 1792 of yacc.c */ +#line 2056 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } -#line 6119 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 290: -#line 1924 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 307: +/* Line 1792 of yacc.c */ +#line 2061 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } -#line 6129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 291: -#line 1929 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 308: +/* Line 1792 of yacc.c */ +#line 2066 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } -#line 6139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 292: -#line 1934 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 309: +/* Line 1792 of yacc.c */ +#line 2071 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } -#line 6149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 293: -#line 1939 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 310: +/* Line 1792 of yacc.c */ +#line 2076 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } -#line 6159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 294: -#line 1944 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 311: +/* Line 1792 of yacc.c */ +#line 2081 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } -#line 6169 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 295: -#line 1949 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 312: +/* Line 1792 of yacc.c */ +#line 2086 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); } -#line 6179 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 296: -#line 1954 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 313: +/* Line 1792 of yacc.c */ +#line 2091 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } -#line 6189 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 297: -#line 1959 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 314: +/* Line 1792 of yacc.c */ +#line 2096 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } -#line 6199 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 298: -#line 1964 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 315: +/* Line 1792 of yacc.c */ +#line 2101 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); } -#line 6209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 299: -#line 1969 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 316: +/* Line 1792 of yacc.c */ +#line 2106 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } -#line 6219 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 300: -#line 1974 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 317: +/* Line 1792 of yacc.c */ +#line 2111 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } -#line 6229 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 301: -#line 1979 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 318: +/* Line 1792 of yacc.c */ +#line 2116 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } -#line 6239 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 302: -#line 1984 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 319: +/* Line 1792 of yacc.c */ +#line 2121 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } -#line 6249 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 303: -#line 1989 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 320: +/* Line 1792 of yacc.c */ +#line 2126 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } -#line 6259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 304: -#line 1994 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 321: +/* Line 1792 of yacc.c */ +#line 2131 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } -#line 6269 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 305: -#line 1999 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 322: +/* Line 1792 of yacc.c */ +#line 2136 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } -#line 6279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 306: -#line 2004 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 323: +/* Line 1792 of yacc.c */ +#line 2141 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } -#line 6289 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 307: -#line 2009 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 324: +/* Line 1792 of yacc.c */ +#line 2146 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } -#line 6299 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 308: -#line 2014 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 325: +/* Line 1792 of yacc.c */ +#line 2151 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } -#line 6309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 309: -#line 2019 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 326: +/* Line 1792 of yacc.c */ +#line 2156 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } -#line 6319 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 310: -#line 2024 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 327: +/* Line 1792 of yacc.c */ +#line 2161 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } -#line 6329 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 311: -#line 2029 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 328: +/* Line 1792 of yacc.c */ +#line 2166 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } -#line 6339 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 312: -#line 2034 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 329: +/* Line 1792 of yacc.c */ +#line 2171 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } -#line 6349 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 313: -#line 2039 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 330: +/* Line 1792 of yacc.c */ +#line 2176 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } -#line 6359 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 314: -#line 2044 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 331: +/* Line 1792 of yacc.c */ +#line 2181 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } -#line 6369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 315: -#line 2049 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 332: +/* Line 1792 of yacc.c */ +#line 2186 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } -#line 6379 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 316: -#line 2054 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 333: +/* Line 1792 of yacc.c */ +#line 2191 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } -#line 6389 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 317: -#line 2059 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 334: +/* Line 1792 of yacc.c */ +#line 2196 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } -#line 6399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 318: -#line 2064 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 335: +/* Line 1792 of yacc.c */ +#line 2201 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } -#line 6409 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 319: -#line 2069 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 336: +/* Line 1792 of yacc.c */ +#line 2206 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); } -#line 6419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 320: -#line 2074 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 337: +/* Line 1792 of yacc.c */ +#line 2211 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } -#line 6429 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 321: -#line 2079 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 338: +/* Line 1792 of yacc.c */ +#line 2216 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } -#line 6439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 322: -#line 2084 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 339: +/* Line 1792 of yacc.c */ +#line 2221 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); } -#line 6449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 323: -#line 2089 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 340: +/* Line 1792 of yacc.c */ +#line 2226 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } -#line 6459 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 324: -#line 2094 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 341: +/* Line 1792 of yacc.c */ +#line 2231 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); } -#line 6469 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 325: -#line 2099 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 342: +/* Line 1792 of yacc.c */ +#line 2236 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); } -#line 6479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 326: -#line 2104 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 343: +/* Line 1792 of yacc.c */ +#line 2241 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); } -#line 6489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 327: -#line 2109 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 344: +/* Line 1792 of yacc.c */ +#line 2246 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); } -#line 6499 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 328: -#line 2114 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 345: +/* Line 1792 of yacc.c */ +#line 2251 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); } -#line 6509 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 329: -#line 2119 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 346: +/* Line 1792 of yacc.c */ +#line 2256 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); } -#line 6519 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 330: -#line 2124 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 347: +/* Line 1792 of yacc.c */ +#line 2261 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); } -#line 6529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 331: -#line 2129 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 348: +/* Line 1792 of yacc.c */ +#line 2266 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); } -#line 6539 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 332: -#line 2134 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 349: +/* Line 1792 of yacc.c */ +#line 2271 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); } -#line 6549 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 333: -#line 2139 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 350: +/* Line 1792 of yacc.c */ +#line 2276 "glslang.y" { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); } -#line 6559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 334: -#line 2144 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 351: +/* Line 1792 of yacc.c */ +#line 2281 "glslang.y" { // GL_OES_EGL_image_external - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.external = true; } -#line 6570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 335: -#line 2150 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 352: +/* Line 1792 of yacc.c */ +#line 2287 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat); } -#line 6581 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 336: -#line 2156 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 353: +/* Line 1792 of yacc.c */ +#line 2293 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat, true); } -#line 6592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 337: -#line 2162 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 354: +/* Line 1792 of yacc.c */ +#line 2299 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt); } -#line 6603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 338: -#line 2168 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 355: +/* Line 1792 of yacc.c */ +#line 2305 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt, true); } -#line 6614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 339: -#line 2174 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 356: +/* Line 1792 of yacc.c */ +#line 2311 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint); } -#line 6625 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 340: -#line 2180 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 357: +/* Line 1792 of yacc.c */ +#line 2317 "glslang.y" { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint, true); } -#line 6636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 341: -#line 2186 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 358: +/* Line 1792 of yacc.c */ +#line 2323 "glslang.y" { - (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); } -#line 6646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 342: -#line 2191 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 359: +/* Line 1792 of yacc.c */ +#line 2328 "glslang.y" { // // This is for user defined type names. The lexical phase looked up the // type. // - if (const TVariable* variable = ((yyvsp[0].lex).symbol)->getAsVariable()) { + if (const TVariable* variable = ((yyvsp[(1) - (1)].lex).symbol)->getAsVariable()) { const TType& structure = variable->getType(); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = &structure; } else - parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); + parseContext.error((yyvsp[(1) - (1)].lex).loc, "expected type name", (yyvsp[(1) - (1)].lex).string->c_str(), ""); } -#line 6664 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 343: -#line 2207 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 360: +/* Line 1792 of yacc.c */ +#line 2344 "glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.handlePrecisionQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type).qualifier, EpqHigh); } -#line 6674 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 344: -#line 2212 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 361: +/* Line 1792 of yacc.c */ +#line 2349 "glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.handlePrecisionQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type).qualifier, EpqMedium); } -#line 6684 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 345: -#line 2217 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 362: +/* Line 1792 of yacc.c */ +#line 2354 "glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow); + parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); + (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.handlePrecisionQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type).qualifier, EpqLow); } -#line 6694 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 346: -#line 2225 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 6700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 363: +/* Line 1792 of yacc.c */ +#line 2362 "glslang.y" + { parseContext.nestedStructCheck((yyvsp[(1) - (3)].lex).loc); } break; - case 347: -#line 2225 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 364: +/* Line 1792 of yacc.c */ +#line 2362 "glslang.y" { - TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); - parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); - TVariable* userTypeDef = new TVariable((yyvsp[-4].lex).string, *structure, true); + TType* structure = new TType((yyvsp[(5) - (6)].interm.typeList), *(yyvsp[(2) - (6)].lex).string); + parseContext.structArrayCheck((yyvsp[(2) - (6)].lex).loc, *structure); + TVariable* userTypeDef = new TVariable((yyvsp[(2) - (6)].lex).string, *structure, true); if (! parseContext.symbolTable.insert(*userTypeDef)) - parseContext.error((yyvsp[-4].lex).loc, "redefinition", (yyvsp[-4].lex).string->c_str(), "struct"); - (yyval.interm.type).init((yyvsp[-5].lex).loc); + parseContext.error((yyvsp[(2) - (6)].lex).loc, "redefinition", (yyvsp[(2) - (6)].lex).string->c_str(), "struct"); + (yyval.interm.type).init((yyvsp[(1) - (6)].lex).loc); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 6716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 348: -#line 2236 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 6722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 365: +/* Line 1792 of yacc.c */ +#line 2373 "glslang.y" + { parseContext.nestedStructCheck((yyvsp[(1) - (2)].lex).loc); } break; - case 349: -#line 2236 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 366: +/* Line 1792 of yacc.c */ +#line 2373 "glslang.y" { - TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); - (yyval.interm.type).init((yyvsp[-4].lex).loc); + TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString("")); + (yyval.interm.type).init((yyvsp[(1) - (5)].lex).loc); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 6734 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 350: -#line 2246 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 367: +/* Line 1792 of yacc.c */ +#line 2383 "glslang.y" { - (yyval.interm.typeList) = (yyvsp[0].interm.typeList); + (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList); } -#line 6742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 351: -#line 2249 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 368: +/* Line 1792 of yacc.c */ +#line 2386 "glslang.y" { - (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); - for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { + (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList); + for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.typeList)->size(); ++i) { for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) { - if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[0].interm.typeList))[i].type->getFieldName()) - parseContext.error((*(yyvsp[0].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[0].interm.typeList))[i].type->getFieldName().c_str()); + if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName()) + parseContext.error((*(yyvsp[(2) - (2)].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName().c_str()); } - (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); + (yyval.interm.typeList)->push_back((*(yyvsp[(2) - (2)].interm.typeList))[i]); } } -#line 6757 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 352: -#line 2262 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 369: +/* Line 1792 of yacc.c */ +#line 2399 "glslang.y" { - if ((yyvsp[-2].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if ((yyvsp[(1) - (3)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); if (parseContext.profile == EEsProfile) - parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); } - (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); + (yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList); - parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + parseContext.voidErrorCheck((yyvsp[(1) - (3)].interm.type).loc, (*(yyvsp[(2) - (3)].interm.typeList))[0].type->getFieldName(), (yyvsp[(1) - (3)].interm.type).basicType); + parseContext.precisionQualifierCheck((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).basicType, (yyvsp[(1) - (3)].interm.type).qualifier); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { - parseContext.arrayDimCheck((yyvsp[-2].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes); - (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type)); + parseContext.arrayDimCheck((yyvsp[(1) - (3)].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[(1) - (3)].interm.type).arraySizes); + (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[(1) - (3)].interm.type)); } } -#line 6780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 353: -#line 2280 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 370: +/* Line 1792 of yacc.c */ +#line 2417 "glslang.y" { - parseContext.globalQualifierFixCheck((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier); - if ((yyvsp[-2].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.globalQualifierFixCheck((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).qualifier); + if ((yyvsp[(2) - (4)].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[(2) - (4)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[(2) - (4)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); if (parseContext.profile == EEsProfile) - parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + parseContext.arraySizeRequiredCheck((yyvsp[(2) - (4)].interm.type).loc, *(yyvsp[(2) - (4)].interm.type).arraySizes); } - (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); + (yyval.interm.typeList) = (yyvsp[(3) - (4)].interm.typeList); - parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); - parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); - parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).shaderQualifiers); + parseContext.voidErrorCheck((yyvsp[(2) - (4)].interm.type).loc, (*(yyvsp[(3) - (4)].interm.typeList))[0].type->getFieldName(), (yyvsp[(2) - (4)].interm.type).basicType); + parseContext.mergeQualifiers((yyvsp[(2) - (4)].interm.type).loc, (yyvsp[(2) - (4)].interm.type).qualifier, (yyvsp[(1) - (4)].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[(2) - (4)].interm.type).loc, (yyvsp[(2) - (4)].interm.type).basicType, (yyvsp[(2) - (4)].interm.type).qualifier); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { - parseContext.arrayDimCheck((yyvsp[-3].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes); - (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type)); + parseContext.arrayDimCheck((yyvsp[(1) - (4)].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[(2) - (4)].interm.type).arraySizes); + (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[(2) - (4)].interm.type)); } } -#line 6806 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 354: -#line 2304 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 371: +/* Line 1792 of yacc.c */ +#line 2441 "glslang.y" { (yyval.interm.typeList) = new TTypeList; - (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); + (yyval.interm.typeList)->push_back((yyvsp[(1) - (1)].interm.typeLine)); } -#line 6815 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 355: -#line 2308 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 372: +/* Line 1792 of yacc.c */ +#line 2445 "glslang.y" { - (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); + (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine)); } -#line 6823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 356: -#line 2314 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 373: +/* Line 1792 of yacc.c */ +#line 2451 "glslang.y" { (yyval.interm.typeLine).type = new TType(EbtVoid); - (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc; - (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string); + (yyval.interm.typeLine).loc = (yyvsp[(1) - (1)].lex).loc; + (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (1)].lex).string); } -#line 6833 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 357: -#line 2319 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 374: +/* Line 1792 of yacc.c */ +#line 2456 "glslang.y" { - parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes, 0); + parseContext.arrayDimCheck((yyvsp[(1) - (2)].lex).loc, (yyvsp[(2) - (2)].interm).arraySizes, 0); (yyval.interm.typeLine).type = new TType(EbtVoid); - (yyval.interm.typeLine).loc = (yyvsp[-1].lex).loc; - (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); - (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[0].interm).arraySizes); + (yyval.interm.typeLine).loc = (yyvsp[(1) - (2)].lex).loc; + (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (2)].lex).string); + (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[(2) - (2)].interm).arraySizes); } -#line 6846 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 358: -#line 2330 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 375: +/* Line 1792 of yacc.c */ +#line 2467 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 6854 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 359: -#line 2333 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 376: +/* Line 1792 of yacc.c */ +#line 2470 "glslang.y" { const char* initFeature = "{ } style initializers"; - parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature); - parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); + parseContext.requireProfile((yyvsp[(1) - (3)].lex).loc, ~EEsProfile, initFeature); + parseContext.profileRequires((yyvsp[(1) - (3)].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); } -#line 6865 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 360: -#line 2339 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 377: +/* Line 1792 of yacc.c */ +#line 2476 "glslang.y" { const char* initFeature = "{ } style initializers"; - parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature); - parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + parseContext.requireProfile((yyvsp[(1) - (4)].lex).loc, ~EEsProfile, initFeature); + parseContext.profileRequires((yyvsp[(1) - (4)].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); + (yyval.interm.intermTypedNode) = (yyvsp[(2) - (4)].interm.intermTypedNode); } -#line 6876 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 361: -#line 2348 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 378: +/* Line 1792 of yacc.c */ +#line 2485 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[(1) - (1)].interm.intermTypedNode), (yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc()); } -#line 6884 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 362: -#line 2351 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 379: +/* Line 1792 of yacc.c */ +#line 2488 "glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); } -#line 6892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 363: -#line 2357 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6898 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 380: +/* Line 1792 of yacc.c */ +#line 2494 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 364: -#line 2361 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6904 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 381: +/* Line 1792 of yacc.c */ +#line 2498 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 365: -#line 2362 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6910 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 382: +/* Line 1792 of yacc.c */ +#line 2499 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 366: -#line 2368 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6916 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 383: +/* Line 1792 of yacc.c */ +#line 2505 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 367: -#line 2369 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 384: +/* Line 1792 of yacc.c */ +#line 2506 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 368: -#line 2370 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 385: +/* Line 1792 of yacc.c */ +#line 2507 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 369: -#line 2371 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6934 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 386: +/* Line 1792 of yacc.c */ +#line 2508 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 370: -#line 2372 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 387: +/* Line 1792 of yacc.c */ +#line 2509 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 371: -#line 2373 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 388: +/* Line 1792 of yacc.c */ +#line 2510 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 372: -#line 2374 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 389: +/* Line 1792 of yacc.c */ +#line 2511 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 373: -#line 2378 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 390: +/* Line 1792 of yacc.c */ +#line 2515 "glslang.y" { (yyval.interm.intermNode) = 0; } -#line 6958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 374: -#line 2379 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 391: +/* Line 1792 of yacc.c */ +#line 2516 "glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 6967 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 375: -#line 2383 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 392: +/* Line 1792 of yacc.c */ +#line 2520 "glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 6976 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 376: -#line 2387 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 393: +/* Line 1792 of yacc.c */ +#line 2524 "glslang.y" { - if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) - (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); + if ((yyvsp[(3) - (5)].interm.intermNode) && (yyvsp[(3) - (5)].interm.intermNode)->getAsAggregate()) + (yyvsp[(3) - (5)].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[(3) - (5)].interm.intermNode); } -#line 6986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 377: -#line 2395 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 394: +/* Line 1792 of yacc.c */ +#line 2532 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 378: -#line 2396 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 6998 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 395: +/* Line 1792 of yacc.c */ +#line 2533 "glslang.y" + { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } break; - case 379: -#line 2400 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 396: +/* Line 1792 of yacc.c */ +#line 2537 "glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 7006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 380: -#line 2403 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 397: +/* Line 1792 of yacc.c */ +#line 2540 "glslang.y" { --parseContext.controlFlowNestingLevel; - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } -#line 7015 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 381: -#line 2407 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 398: +/* Line 1792 of yacc.c */ +#line 2544 "glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7025 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 382: -#line 2412 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 399: +/* Line 1792 of yacc.c */ +#line 2549 "glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } -#line 7036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 383: -#line 2421 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 400: +/* Line 1792 of yacc.c */ +#line 2558 "glslang.y" { (yyval.interm.intermNode) = 0; } -#line 7044 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 384: -#line 2424 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 401: +/* Line 1792 of yacc.c */ +#line 2561 "glslang.y" { - if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) - (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); + if ((yyvsp[(2) - (3)].interm.intermNode) && (yyvsp[(2) - (3)].interm.intermNode)->getAsAggregate()) + (yyvsp[(2) - (3)].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermNode); } -#line 7054 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 385: -#line 2432 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 402: +/* Line 1792 of yacc.c */ +#line 2569 "glslang.y" { - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); - if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || - (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence(0, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode)); + if ((yyvsp[(1) - (1)].interm.intermNode) && (yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode() && ((yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || + (yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { + parseContext.wrapupSwitchSubsequence(0, (yyvsp[(1) - (1)].interm.intermNode)); (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 7067 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 386: -#line 2440 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 403: +/* Line 1792 of yacc.c */ +#line 2577 "glslang.y" { - if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || - (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence((yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0, (yyvsp[0].interm.intermNode)); + if ((yyvsp[(2) - (2)].interm.intermNode) && (yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode() && ((yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || + (yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { + parseContext.wrapupSwitchSubsequence((yyvsp[(1) - (2)].interm.intermNode) ? (yyvsp[(1) - (2)].interm.intermNode)->getAsAggregate() : 0, (yyvsp[(2) - (2)].interm.intermNode)); (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } else - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode)); } -#line 7080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 387: -#line 2451 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 404: +/* Line 1792 of yacc.c */ +#line 2588 "glslang.y" { (yyval.interm.intermNode) = 0; } -#line 7086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 388: -#line 2452 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } -#line 7092 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 405: +/* Line 1792 of yacc.c */ +#line 2589 "glslang.y" + { (yyval.interm.intermNode) = static_cast((yyvsp[(1) - (2)].interm.intermTypedNode)); } break; - case 389: -#line 2456 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 406: +/* Line 1792 of yacc.c */ +#line 2593 "glslang.y" { - parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode)); - (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc); + parseContext.boolCheck((yyvsp[(1) - (5)].lex).loc, (yyvsp[(3) - (5)].interm.intermTypedNode)); + (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).loc); } -#line 7101 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 390: -#line 2463 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 407: +/* Line 1792 of yacc.c */ +#line 2600 "glslang.y" { - (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); - (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); + (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); } -#line 7110 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 391: -#line 2467 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 408: +/* Line 1792 of yacc.c */ +#line 2604 "glslang.y" { - (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } -#line 7119 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 392: -#line 2475 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 409: +/* Line 1792 of yacc.c */ +#line 2612 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + parseContext.boolCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), (yyvsp[(1) - (1)].interm.intermTypedNode)); } -#line 7128 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 393: -#line 2479 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 410: +/* Line 1792 of yacc.c */ +#line 2616 "glslang.y" { - parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); + parseContext.boolCheck((yyvsp[(2) - (4)].lex).loc, (yyvsp[(1) - (4)].interm.type)); - TType type((yyvsp[-3].interm.type)); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); + TType type((yyvsp[(1) - (4)].interm.type)); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (4)].lex).loc, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), 0, (yyvsp[(4) - (4)].interm.intermTypedNode)); if (initNode) (yyval.interm.intermTypedNode) = initNode->getAsTyped(); else (yyval.interm.intermTypedNode) = 0; } -#line 7143 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 394: -#line 2492 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 411: +/* Line 1792 of yacc.c */ +#line 2629 "glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -7152,13 +7778,13 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 7156 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 395: -#line 2500 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 412: +/* Line 1792 of yacc.c */ +#line 2637 "glslang.y" { - (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0); + (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[(1) - (8)].lex).loc, (yyvsp[(3) - (8)].interm.intermTypedNode), (yyvsp[(7) - (8)].interm.intermNode) ? (yyvsp[(7) - (8)].interm.intermNode)->getAsAggregate() : 0); delete parseContext.switchSequenceStack.back(); parseContext.switchSequenceStack.pop_back(); parseContext.switchLevel.pop_back(); @@ -7166,287 +7792,287 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7170 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 396: -#line 2512 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 413: +/* Line 1792 of yacc.c */ +#line 2649 "glslang.y" { (yyval.interm.intermNode) = 0; } -#line 7178 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 397: -#line 2515 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 414: +/* Line 1792 of yacc.c */ +#line 2652 "glslang.y" { - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } -#line 7186 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 398: -#line 2521 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 415: +/* Line 1792 of yacc.c */ +#line 2658 "glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) - parseContext.error((yyvsp[-2].lex).loc, "cannot appear outside switch statement", "case", ""); + parseContext.error((yyvsp[(1) - (3)].lex).loc, "cannot appear outside switch statement", "case", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error((yyvsp[-2].lex).loc, "cannot be nested inside control flow", "case", ""); + parseContext.error((yyvsp[(1) - (3)].lex).loc, "cannot be nested inside control flow", "case", ""); else { - parseContext.constantValueCheck((yyvsp[-1].interm.intermTypedNode), "case"); - parseContext.integerCheck((yyvsp[-1].interm.intermTypedNode), "case"); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); + parseContext.constantValueCheck((yyvsp[(2) - (3)].interm.intermTypedNode), "case"); + parseContext.integerCheck((yyvsp[(2) - (3)].interm.intermTypedNode), "case"); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).loc); } } -#line 7203 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 399: -#line 2533 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 416: +/* Line 1792 of yacc.c */ +#line 2670 "glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) - parseContext.error((yyvsp[-1].lex).loc, "cannot appear outside switch statement", "default", ""); + parseContext.error((yyvsp[(1) - (2)].lex).loc, "cannot appear outside switch statement", "default", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error((yyvsp[-1].lex).loc, "cannot be nested inside control flow", "default", ""); + parseContext.error((yyvsp[(1) - (2)].lex).loc, "cannot be nested inside control flow", "default", ""); else - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[(1) - (2)].lex).loc); } -#line 7217 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 400: -#line 2545 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 417: +/* Line 1792 of yacc.c */ +#line 2682 "glslang.y" { if (! parseContext.limits.whileLoops) - parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); + parseContext.error((yyvsp[(1) - (2)].lex).loc, "while loops not available", "limitation", ""); parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7230 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 401: -#line 2553 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 418: +/* Line 1792 of yacc.c */ +#line 2690 "glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[(6) - (6)].interm.intermNode), (yyvsp[(4) - (6)].interm.intermTypedNode), 0, true, (yyvsp[(1) - (6)].lex).loc); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7242 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 402: -#line 2560 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 419: +/* Line 1792 of yacc.c */ +#line 2697 "glslang.y" { ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7252 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 403: -#line 2565 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 420: +/* Line 1792 of yacc.c */ +#line 2702 "glslang.y" { if (! parseContext.limits.whileLoops) - parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); + parseContext.error((yyvsp[(1) - (8)].lex).loc, "do-while loops not available", "limitation", ""); - parseContext.boolCheck((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode)); + parseContext.boolCheck((yyvsp[(8) - (8)].lex).loc, (yyvsp[(6) - (8)].interm.intermTypedNode)); - (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[-5].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, false, (yyvsp[-4].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[(3) - (8)].interm.intermNode), (yyvsp[(6) - (8)].interm.intermTypedNode), 0, false, (yyvsp[(4) - (8)].lex).loc); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 404: -#line 2576 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 421: +/* Line 1792 of yacc.c */ +#line 2713 "glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 405: -#line 2582 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 422: +/* Line 1792 of yacc.c */ +#line 2719 "glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); - TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), reinterpret_cast((yyvsp[-2].interm.nodePair).node1), reinterpret_cast((yyvsp[-2].interm.nodePair).node2), true, (yyvsp[-6].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[(4) - (7)].interm.intermNode), (yyvsp[(2) - (7)].lex).loc); + TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[(7) - (7)].interm.intermNode), reinterpret_cast((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast((yyvsp[(5) - (7)].interm.nodePair).node2), true, (yyvsp[(1) - (7)].lex).loc); if (! parseContext.limits.nonInductiveForLoops) - parseContext.inductiveLoopCheck((yyvsp[-6].lex).loc, (yyvsp[-3].interm.intermNode), forLoop); - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[-6].lex).loc); + parseContext.inductiveLoopCheck((yyvsp[(1) - (7)].lex).loc, (yyvsp[(4) - (7)].interm.intermNode), forLoop); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[(1) - (7)].lex).loc); (yyval.interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 406: -#line 2597 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 423: +/* Line 1792 of yacc.c */ +#line 2734 "glslang.y" { - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } -#line 7304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 407: -#line 2600 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 424: +/* Line 1792 of yacc.c */ +#line 2737 "glslang.y" { - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } -#line 7312 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 408: -#line 2606 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 425: +/* Line 1792 of yacc.c */ +#line 2743 "glslang.y" { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } -#line 7320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 409: -#line 2609 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 426: +/* Line 1792 of yacc.c */ +#line 2746 "glslang.y" { (yyval.interm.intermTypedNode) = 0; } -#line 7328 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 410: -#line 2615 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 427: +/* Line 1792 of yacc.c */ +#line 2752 "glslang.y" { - (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } -#line 7337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 411: -#line 2619 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 428: +/* Line 1792 of yacc.c */ +#line 2756 "glslang.y" { - (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); - (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); } -#line 7346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 412: -#line 2626 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 429: +/* Line 1792 of yacc.c */ +#line 2763 "glslang.y" { if (parseContext.loopNestingLevel <= 0) - parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", ""); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc); + parseContext.error((yyvsp[(1) - (2)].lex).loc, "continue statement only allowed in loops", "", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[(1) - (2)].lex).loc); } -#line 7356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 413: -#line 2631 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 430: +/* Line 1792 of yacc.c */ +#line 2768 "glslang.y" { if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) - parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", ""); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc); + parseContext.error((yyvsp[(1) - (2)].lex).loc, "break statement only allowed in switch and loops", "", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[(1) - (2)].lex).loc); } -#line 7366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 414: -#line 2636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 431: +/* Line 1792 of yacc.c */ +#line 2773 "glslang.y" { - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) - parseContext.error((yyvsp[-1].lex).loc, "non-void function must return a value", "return", ""); + parseContext.error((yyvsp[(1) - (2)].lex).loc, "non-void function must return a value", "return", ""); if (parseContext.inMain) parseContext.postMainReturn = true; } -#line 7378 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 415: -#line 2643 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 432: +/* Line 1792 of yacc.c */ +#line 2780 "glslang.y" { - (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[(1) - (3)].lex).loc, (yyvsp[(2) - (3)].interm.intermTypedNode)); } -#line 7386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 416: -#line 2646 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 433: +/* Line 1792 of yacc.c */ +#line 2783 "glslang.y" { - parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); + parseContext.requireStage((yyvsp[(1) - (2)].lex).loc, EShLangFragment, "discard"); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).loc); } -#line 7395 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 417: -#line 2655 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 434: +/* Line 1792 of yacc.c */ +#line 2792 "glslang.y" { - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 7404 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 418: -#line 2659 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 435: +/* Line 1792 of yacc.c */ +#line 2796 "glslang.y" { - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode)); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 7413 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 419: -#line 2666 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 436: +/* Line 1792 of yacc.c */ +#line 2803 "glslang.y" { - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } -#line 7421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 420: -#line 2669 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 437: +/* Line 1792 of yacc.c */ +#line 2806 "glslang.y" { - (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } -#line 7429 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 421: -#line 2675 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 438: +/* Line 1792 of yacc.c */ +#line 2812 "glslang.y" { - (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */); - (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function); + (yyvsp[(1) - (1)].interm).function = parseContext.handleFunctionDeclarator((yyvsp[(1) - (1)].interm).loc, *(yyvsp[(1) - (1)].interm).function, false /* not prototype */); + (yyvsp[(1) - (1)].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[(1) - (1)].interm).loc, *(yyvsp[(1) - (1)].interm).function); } -#line 7438 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 422: -#line 2679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 439: +/* Line 1792 of yacc.c */ +#line 2816 "glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) - parseContext.error((yyvsp[-2].interm).loc, "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str()); + parseContext.error((yyvsp[(1) - (3)].interm).loc, "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermNode)); - parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[-2].interm).function->getType(), (yyvsp[-2].interm).loc); - (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str()); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermNode)); + parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[(1) - (3)].interm).function->getType(), (yyvsp[(1) - (3)].interm).loc); + (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str()); // store the pragma information for debug and optimize and other vendor specific // information. This information can be queried from the parse tree @@ -7454,11 +8080,11 @@ yyreduce: (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug); (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); } -#line 7458 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; -#line 7462 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +/* Line 1792 of yacc.c */ +#line 8088 "glslang_tab.cpp" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -7480,7 +8106,7 @@ yyreduce: *++yyvsp = yyval; - /* Now 'shift' the result of the reduction. Determine what state + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -7495,9 +8121,9 @@ yyreduce: goto yynewstate; -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -7548,20 +8174,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, pParseContext); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, pParseContext); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -7580,7 +8206,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule whose action triggered + /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -7593,29 +8219,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, pParseContext); + yystos[yystate], yyvsp, pParseContext); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -7666,14 +8292,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, pParseContext); } - /* Do not reclaim the symbols of the rule whose action triggered + /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, pParseContext); + yystos[*yyssp], yyvsp, pParseContext); YYPOPSTACK (1); } #ifndef yyoverflow @@ -7684,7 +8310,11 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - return yyresult; + /* Make sure YYID is used. */ + return YYID (yyresult); } -#line 2696 "MachineIndependent/glslang.y" /* yacc.c:1906 */ + + +/* Line 2055 of yacc.c */ +#line 2833 "glslang.y" diff --git a/glslang/MachineIndependent/glslang_tab.cpp.h b/glslang/MachineIndependent/glslang_tab.cpp.h index 2d8276a..b6d2799 100644 --- a/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/glslang/MachineIndependent/glslang_tab.cpp.h @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 2.7. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2012 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 . */ @@ -26,13 +26,13 @@ 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. */ -#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED -# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED -/* Debug traces. */ +#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED +# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED +/* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif @@ -40,288 +40,306 @@ extern int yydebug; #endif -/* Token type. */ +/* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - enum yytokentype - { - ATTRIBUTE = 258, - VARYING = 259, - CONST = 260, - BOOL = 261, - FLOAT = 262, - DOUBLE = 263, - INT = 264, - UINT = 265, - INT64_T = 266, - UINT64_T = 267, - BREAK = 268, - CONTINUE = 269, - DO = 270, - ELSE = 271, - FOR = 272, - IF = 273, - DISCARD = 274, - RETURN = 275, - SWITCH = 276, - CASE = 277, - DEFAULT = 278, - SUBROUTINE = 279, - BVEC2 = 280, - BVEC3 = 281, - BVEC4 = 282, - IVEC2 = 283, - IVEC3 = 284, - IVEC4 = 285, - I64VEC2 = 286, - I64VEC3 = 287, - I64VEC4 = 288, - UVEC2 = 289, - UVEC3 = 290, - UVEC4 = 291, - U64VEC2 = 292, - U64VEC3 = 293, - U64VEC4 = 294, - VEC2 = 295, - VEC3 = 296, - VEC4 = 297, - MAT2 = 298, - MAT3 = 299, - MAT4 = 300, - CENTROID = 301, - IN = 302, - OUT = 303, - INOUT = 304, - UNIFORM = 305, - PATCH = 306, - SAMPLE = 307, - BUFFER = 308, - SHARED = 309, - COHERENT = 310, - VOLATILE = 311, - RESTRICT = 312, - READONLY = 313, - WRITEONLY = 314, - DVEC2 = 315, - DVEC3 = 316, - DVEC4 = 317, - DMAT2 = 318, - DMAT3 = 319, - DMAT4 = 320, - NOPERSPECTIVE = 321, - FLAT = 322, - SMOOTH = 323, - LAYOUT = 324, - __EXPLICITINTERPAMD = 325, - MAT2X2 = 326, - MAT2X3 = 327, - MAT2X4 = 328, - MAT3X2 = 329, - MAT3X3 = 330, - MAT3X4 = 331, - MAT4X2 = 332, - MAT4X3 = 333, - MAT4X4 = 334, - DMAT2X2 = 335, - DMAT2X3 = 336, - DMAT2X4 = 337, - DMAT3X2 = 338, - DMAT3X3 = 339, - DMAT3X4 = 340, - DMAT4X2 = 341, - DMAT4X3 = 342, - DMAT4X4 = 343, - ATOMIC_UINT = 344, - SAMPLER1D = 345, - SAMPLER2D = 346, - SAMPLER3D = 347, - SAMPLERCUBE = 348, - SAMPLER1DSHADOW = 349, - SAMPLER2DSHADOW = 350, - SAMPLERCUBESHADOW = 351, - SAMPLER1DARRAY = 352, - SAMPLER2DARRAY = 353, - SAMPLER1DARRAYSHADOW = 354, - SAMPLER2DARRAYSHADOW = 355, - ISAMPLER1D = 356, - ISAMPLER2D = 357, - ISAMPLER3D = 358, - ISAMPLERCUBE = 359, - ISAMPLER1DARRAY = 360, - ISAMPLER2DARRAY = 361, - USAMPLER1D = 362, - USAMPLER2D = 363, - USAMPLER3D = 364, - USAMPLERCUBE = 365, - USAMPLER1DARRAY = 366, - USAMPLER2DARRAY = 367, - SAMPLER2DRECT = 368, - SAMPLER2DRECTSHADOW = 369, - ISAMPLER2DRECT = 370, - USAMPLER2DRECT = 371, - SAMPLERBUFFER = 372, - ISAMPLERBUFFER = 373, - USAMPLERBUFFER = 374, - SAMPLERCUBEARRAY = 375, - SAMPLERCUBEARRAYSHADOW = 376, - ISAMPLERCUBEARRAY = 377, - USAMPLERCUBEARRAY = 378, - SAMPLER2DMS = 379, - ISAMPLER2DMS = 380, - USAMPLER2DMS = 381, - SAMPLER2DMSARRAY = 382, - ISAMPLER2DMSARRAY = 383, - USAMPLER2DMSARRAY = 384, - SAMPLEREXTERNALOES = 385, - SAMPLER = 386, - SAMPLERSHADOW = 387, - TEXTURE1D = 388, - TEXTURE2D = 389, - TEXTURE3D = 390, - TEXTURECUBE = 391, - TEXTURE1DARRAY = 392, - TEXTURE2DARRAY = 393, - ITEXTURE1D = 394, - ITEXTURE2D = 395, - ITEXTURE3D = 396, - ITEXTURECUBE = 397, - ITEXTURE1DARRAY = 398, - ITEXTURE2DARRAY = 399, - UTEXTURE1D = 400, - UTEXTURE2D = 401, - UTEXTURE3D = 402, - UTEXTURECUBE = 403, - UTEXTURE1DARRAY = 404, - UTEXTURE2DARRAY = 405, - TEXTURE2DRECT = 406, - ITEXTURE2DRECT = 407, - UTEXTURE2DRECT = 408, - TEXTUREBUFFER = 409, - ITEXTUREBUFFER = 410, - UTEXTUREBUFFER = 411, - TEXTURECUBEARRAY = 412, - ITEXTURECUBEARRAY = 413, - UTEXTURECUBEARRAY = 414, - TEXTURE2DMS = 415, - ITEXTURE2DMS = 416, - UTEXTURE2DMS = 417, - TEXTURE2DMSARRAY = 418, - ITEXTURE2DMSARRAY = 419, - UTEXTURE2DMSARRAY = 420, - SUBPASSINPUT = 421, - SUBPASSINPUTMS = 422, - ISUBPASSINPUT = 423, - ISUBPASSINPUTMS = 424, - USUBPASSINPUT = 425, - USUBPASSINPUTMS = 426, - IMAGE1D = 427, - IIMAGE1D = 428, - UIMAGE1D = 429, - IMAGE2D = 430, - IIMAGE2D = 431, - UIMAGE2D = 432, - IMAGE3D = 433, - IIMAGE3D = 434, - UIMAGE3D = 435, - IMAGE2DRECT = 436, - IIMAGE2DRECT = 437, - UIMAGE2DRECT = 438, - IMAGECUBE = 439, - IIMAGECUBE = 440, - UIMAGECUBE = 441, - IMAGEBUFFER = 442, - IIMAGEBUFFER = 443, - UIMAGEBUFFER = 444, - IMAGE1DARRAY = 445, - IIMAGE1DARRAY = 446, - UIMAGE1DARRAY = 447, - IMAGE2DARRAY = 448, - IIMAGE2DARRAY = 449, - UIMAGE2DARRAY = 450, - IMAGECUBEARRAY = 451, - IIMAGECUBEARRAY = 452, - UIMAGECUBEARRAY = 453, - IMAGE2DMS = 454, - IIMAGE2DMS = 455, - UIMAGE2DMS = 456, - IMAGE2DMSARRAY = 457, - IIMAGE2DMSARRAY = 458, - UIMAGE2DMSARRAY = 459, - STRUCT = 460, - VOID = 461, - WHILE = 462, - IDENTIFIER = 463, - TYPE_NAME = 464, - FLOATCONSTANT = 465, - DOUBLECONSTANT = 466, - INTCONSTANT = 467, - UINTCONSTANT = 468, - INT64CONSTANT = 469, - UINT64CONSTANT = 470, - BOOLCONSTANT = 471, - LEFT_OP = 472, - RIGHT_OP = 473, - INC_OP = 474, - DEC_OP = 475, - LE_OP = 476, - GE_OP = 477, - EQ_OP = 478, - NE_OP = 479, - AND_OP = 480, - OR_OP = 481, - XOR_OP = 482, - MUL_ASSIGN = 483, - DIV_ASSIGN = 484, - ADD_ASSIGN = 485, - MOD_ASSIGN = 486, - LEFT_ASSIGN = 487, - RIGHT_ASSIGN = 488, - AND_ASSIGN = 489, - XOR_ASSIGN = 490, - OR_ASSIGN = 491, - SUB_ASSIGN = 492, - LEFT_PAREN = 493, - RIGHT_PAREN = 494, - LEFT_BRACKET = 495, - RIGHT_BRACKET = 496, - LEFT_BRACE = 497, - RIGHT_BRACE = 498, - DOT = 499, - COMMA = 500, - COLON = 501, - EQUAL = 502, - SEMICOLON = 503, - BANG = 504, - DASH = 505, - TILDE = 506, - PLUS = 507, - STAR = 508, - SLASH = 509, - PERCENT = 510, - LEFT_ANGLE = 511, - RIGHT_ANGLE = 512, - VERTICAL_BAR = 513, - CARET = 514, - AMPERSAND = 515, - QUESTION = 516, - INVARIANT = 517, - PRECISE = 518, - HIGH_PRECISION = 519, - MEDIUM_PRECISION = 520, - LOW_PRECISION = 521, - PRECISION = 522, - PACKED = 523, - RESOURCE = 524, - SUPERP = 525 - }; + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + ATTRIBUTE = 258, + VARYING = 259, + CONST = 260, + BOOL = 261, + FLOAT = 262, + DOUBLE = 263, + INT = 264, + UINT = 265, + INT64_T = 266, + UINT64_T = 267, + FLOAT16_T = 268, + BREAK = 269, + CONTINUE = 270, + DO = 271, + ELSE = 272, + FOR = 273, + IF = 274, + DISCARD = 275, + RETURN = 276, + SWITCH = 277, + CASE = 278, + DEFAULT = 279, + SUBROUTINE = 280, + BVEC2 = 281, + BVEC3 = 282, + BVEC4 = 283, + IVEC2 = 284, + IVEC3 = 285, + IVEC4 = 286, + I64VEC2 = 287, + I64VEC3 = 288, + I64VEC4 = 289, + UVEC2 = 290, + UVEC3 = 291, + UVEC4 = 292, + U64VEC2 = 293, + U64VEC3 = 294, + U64VEC4 = 295, + VEC2 = 296, + VEC3 = 297, + VEC4 = 298, + MAT2 = 299, + MAT3 = 300, + MAT4 = 301, + CENTROID = 302, + IN = 303, + OUT = 304, + INOUT = 305, + UNIFORM = 306, + PATCH = 307, + SAMPLE = 308, + BUFFER = 309, + SHARED = 310, + COHERENT = 311, + VOLATILE = 312, + RESTRICT = 313, + READONLY = 314, + WRITEONLY = 315, + DVEC2 = 316, + DVEC3 = 317, + DVEC4 = 318, + DMAT2 = 319, + DMAT3 = 320, + DMAT4 = 321, + F16VEC2 = 322, + F16VEC3 = 323, + F16VEC4 = 324, + F16MAT2 = 325, + F16MAT3 = 326, + F16MAT4 = 327, + NOPERSPECTIVE = 328, + FLAT = 329, + SMOOTH = 330, + LAYOUT = 331, + __EXPLICITINTERPAMD = 332, + MAT2X2 = 333, + MAT2X3 = 334, + MAT2X4 = 335, + MAT3X2 = 336, + MAT3X3 = 337, + MAT3X4 = 338, + MAT4X2 = 339, + MAT4X3 = 340, + MAT4X4 = 341, + DMAT2X2 = 342, + DMAT2X3 = 343, + DMAT2X4 = 344, + DMAT3X2 = 345, + DMAT3X3 = 346, + DMAT3X4 = 347, + DMAT4X2 = 348, + DMAT4X3 = 349, + DMAT4X4 = 350, + F16MAT2X2 = 351, + F16MAT2X3 = 352, + F16MAT2X4 = 353, + F16MAT3X2 = 354, + F16MAT3X3 = 355, + F16MAT3X4 = 356, + F16MAT4X2 = 357, + F16MAT4X3 = 358, + F16MAT4X4 = 359, + ATOMIC_UINT = 360, + SAMPLER1D = 361, + SAMPLER2D = 362, + SAMPLER3D = 363, + SAMPLERCUBE = 364, + SAMPLER1DSHADOW = 365, + SAMPLER2DSHADOW = 366, + SAMPLERCUBESHADOW = 367, + SAMPLER1DARRAY = 368, + SAMPLER2DARRAY = 369, + SAMPLER1DARRAYSHADOW = 370, + SAMPLER2DARRAYSHADOW = 371, + ISAMPLER1D = 372, + ISAMPLER2D = 373, + ISAMPLER3D = 374, + ISAMPLERCUBE = 375, + ISAMPLER1DARRAY = 376, + ISAMPLER2DARRAY = 377, + USAMPLER1D = 378, + USAMPLER2D = 379, + USAMPLER3D = 380, + USAMPLERCUBE = 381, + USAMPLER1DARRAY = 382, + USAMPLER2DARRAY = 383, + SAMPLER2DRECT = 384, + SAMPLER2DRECTSHADOW = 385, + ISAMPLER2DRECT = 386, + USAMPLER2DRECT = 387, + SAMPLERBUFFER = 388, + ISAMPLERBUFFER = 389, + USAMPLERBUFFER = 390, + SAMPLERCUBEARRAY = 391, + SAMPLERCUBEARRAYSHADOW = 392, + ISAMPLERCUBEARRAY = 393, + USAMPLERCUBEARRAY = 394, + SAMPLER2DMS = 395, + ISAMPLER2DMS = 396, + USAMPLER2DMS = 397, + SAMPLER2DMSARRAY = 398, + ISAMPLER2DMSARRAY = 399, + USAMPLER2DMSARRAY = 400, + SAMPLEREXTERNALOES = 401, + SAMPLER = 402, + SAMPLERSHADOW = 403, + TEXTURE1D = 404, + TEXTURE2D = 405, + TEXTURE3D = 406, + TEXTURECUBE = 407, + TEXTURE1DARRAY = 408, + TEXTURE2DARRAY = 409, + ITEXTURE1D = 410, + ITEXTURE2D = 411, + ITEXTURE3D = 412, + ITEXTURECUBE = 413, + ITEXTURE1DARRAY = 414, + ITEXTURE2DARRAY = 415, + UTEXTURE1D = 416, + UTEXTURE2D = 417, + UTEXTURE3D = 418, + UTEXTURECUBE = 419, + UTEXTURE1DARRAY = 420, + UTEXTURE2DARRAY = 421, + TEXTURE2DRECT = 422, + ITEXTURE2DRECT = 423, + UTEXTURE2DRECT = 424, + TEXTUREBUFFER = 425, + ITEXTUREBUFFER = 426, + UTEXTUREBUFFER = 427, + TEXTURECUBEARRAY = 428, + ITEXTURECUBEARRAY = 429, + UTEXTURECUBEARRAY = 430, + TEXTURE2DMS = 431, + ITEXTURE2DMS = 432, + UTEXTURE2DMS = 433, + TEXTURE2DMSARRAY = 434, + ITEXTURE2DMSARRAY = 435, + UTEXTURE2DMSARRAY = 436, + SUBPASSINPUT = 437, + SUBPASSINPUTMS = 438, + ISUBPASSINPUT = 439, + ISUBPASSINPUTMS = 440, + USUBPASSINPUT = 441, + USUBPASSINPUTMS = 442, + IMAGE1D = 443, + IIMAGE1D = 444, + UIMAGE1D = 445, + IMAGE2D = 446, + IIMAGE2D = 447, + UIMAGE2D = 448, + IMAGE3D = 449, + IIMAGE3D = 450, + UIMAGE3D = 451, + IMAGE2DRECT = 452, + IIMAGE2DRECT = 453, + UIMAGE2DRECT = 454, + IMAGECUBE = 455, + IIMAGECUBE = 456, + UIMAGECUBE = 457, + IMAGEBUFFER = 458, + IIMAGEBUFFER = 459, + UIMAGEBUFFER = 460, + IMAGE1DARRAY = 461, + IIMAGE1DARRAY = 462, + UIMAGE1DARRAY = 463, + IMAGE2DARRAY = 464, + IIMAGE2DARRAY = 465, + UIMAGE2DARRAY = 466, + IMAGECUBEARRAY = 467, + IIMAGECUBEARRAY = 468, + UIMAGECUBEARRAY = 469, + IMAGE2DMS = 470, + IIMAGE2DMS = 471, + UIMAGE2DMS = 472, + IMAGE2DMSARRAY = 473, + IIMAGE2DMSARRAY = 474, + UIMAGE2DMSARRAY = 475, + STRUCT = 476, + VOID = 477, + WHILE = 478, + IDENTIFIER = 479, + TYPE_NAME = 480, + FLOATCONSTANT = 481, + DOUBLECONSTANT = 482, + INTCONSTANT = 483, + UINTCONSTANT = 484, + INT64CONSTANT = 485, + UINT64CONSTANT = 486, + BOOLCONSTANT = 487, + FLOAT16CONSTANT = 488, + LEFT_OP = 489, + RIGHT_OP = 490, + INC_OP = 491, + DEC_OP = 492, + LE_OP = 493, + GE_OP = 494, + EQ_OP = 495, + NE_OP = 496, + AND_OP = 497, + OR_OP = 498, + XOR_OP = 499, + MUL_ASSIGN = 500, + DIV_ASSIGN = 501, + ADD_ASSIGN = 502, + MOD_ASSIGN = 503, + LEFT_ASSIGN = 504, + RIGHT_ASSIGN = 505, + AND_ASSIGN = 506, + XOR_ASSIGN = 507, + OR_ASSIGN = 508, + SUB_ASSIGN = 509, + LEFT_PAREN = 510, + RIGHT_PAREN = 511, + LEFT_BRACKET = 512, + RIGHT_BRACKET = 513, + LEFT_BRACE = 514, + RIGHT_BRACE = 515, + DOT = 516, + COMMA = 517, + COLON = 518, + EQUAL = 519, + SEMICOLON = 520, + BANG = 521, + DASH = 522, + TILDE = 523, + PLUS = 524, + STAR = 525, + SLASH = 526, + PERCENT = 527, + LEFT_ANGLE = 528, + RIGHT_ANGLE = 529, + VERTICAL_BAR = 530, + CARET = 531, + AMPERSAND = 532, + QUESTION = 533, + INVARIANT = 534, + PRECISE = 535, + HIGH_PRECISION = 536, + MEDIUM_PRECISION = 537, + LOW_PRECISION = 538, + PRECISION = 539, + PACKED = 540, + RESOURCE = 541, + SUPERP = 542 + }; #endif -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -union YYSTYPE +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE { -#line 66 "MachineIndependent/glslang.y" /* yacc.c:1909 */ +/* Line 2058 of yacc.c */ +#line 66 "glslang.y" struct { glslang::TSourceLoc loc; @@ -355,16 +373,28 @@ union YYSTYPE }; } interm; -#line 359 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */ -}; -typedef union YYSTYPE YYSTYPE; +/* Line 2058 of yacc.c */ +#line 379 "glslang_tab.cpp.h" +} YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif - +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus int yyparse (glslang::TParseContext* pParseContext); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ +#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */ diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index 0ef37c4..bd64f19 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -304,6 +304,11 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpPackUint2x32: out.debug << "packUint2x32"; break; case EOpUnpackUint2x32: out.debug << "unpackUint2x32"; break; +#ifdef AMD_EXTENSIONS + case EOpPackFloat2x16: out.debug << "packFloat2x16"; break; + case EOpUnpackFloat2x16: out.debug << "unpackFloat2x16"; break; +#endif + case EOpLength: out.debug << "length"; break; case EOpNormalize: out.debug << "normalize"; break; case EOpDPdx: out.debug << "dPdx"; break; @@ -373,6 +378,21 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break; case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break; + + case EOpConvBoolToFloat16: out.debug << "Convert bool to float16"; break; + case EOpConvIntToFloat16: out.debug << "Convert int to float16"; break; + case EOpConvUintToFloat16: out.debug << "Convert uint to float16"; break; + case EOpConvFloatToFloat16: out.debug << "Convert float to float16"; break; + case EOpConvDoubleToFloat16: out.debug << "Convert double to float16"; break; + case EOpConvInt64ToFloat16: out.debug << "Convert int64 to float16"; break; + case EOpConvUint64ToFloat16: out.debug << "Convert uint64 to float16"; break; + case EOpConvFloat16ToBool: out.debug << "Convert float16 to bool"; break; + case EOpConvFloat16ToInt: out.debug << "Convert float16 to int"; break; + case EOpConvFloat16ToUint: out.debug << "Convert float16 to uint"; break; + case EOpConvFloat16ToFloat: out.debug << "Convert float16 to float"; break; + case EOpConvFloat16ToDouble: out.debug << "Convert float16 to double"; break; + case EOpConvFloat16ToInt64: out.debug << "Convert float16 to int64"; break; + case EOpConvFloat16ToUint64: out.debug << "Convert float16 to uint64"; break; #endif default: out.debug.message(EPrefixError, "Bad unary op"); @@ -447,6 +467,21 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructDMat4x2: out.debug << "Construct dmat4x2"; break; case EOpConstructDMat4x3: out.debug << "Construct dmat4x3"; break; case EOpConstructDMat4x4: out.debug << "Construct dmat4"; break; +#ifdef AMD_EXTENSIONS + case EOpConstructFloat16: out.debug << "Construct float16_t"; break; + case EOpConstructF16Vec2: out.debug << "Construct f16vec2"; break; + case EOpConstructF16Vec3: out.debug << "Construct f16vec3"; break; + case EOpConstructF16Vec4: out.debug << "Construct f16vec4"; break; + case EOpConstructF16Mat2x2: out.debug << "Construct f16mat2"; break; + case EOpConstructF16Mat2x3: out.debug << "Construct f16mat2x3"; break; + case EOpConstructF16Mat2x4: out.debug << "Construct f16mat2x4"; break; + case EOpConstructF16Mat3x2: out.debug << "Construct f16mat3x2"; break; + case EOpConstructF16Mat3x3: out.debug << "Construct f16mat3"; break; + case EOpConstructF16Mat3x4: out.debug << "Construct f16mat3x4"; break; + case EOpConstructF16Mat4x2: out.debug << "Construct f16mat4x2"; break; + case EOpConstructF16Mat4x3: out.debug << "Construct f16mat4x3"; break; + case EOpConstructF16Mat4x4: out.debug << "Construct f16mat4"; break; +#endif case EOpConstructStruct: out.debug << "Construct structure"; break; case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; @@ -636,6 +671,9 @@ static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const break; case EbtFloat: case EbtDouble: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif { const double value = constUnion[i].getDConst(); // Print infinity in a portable way, for test stability. diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index f213dd6..2e10134 100644 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -950,6 +950,9 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) case EbtInt64: case EbtUint64: case EbtDouble: size = 8; return 8; +#ifdef AMD_EXTENSIONS + case EbtFloat16: size = 2; return 2; +#endif default: size = 4; return 4; } } diff --git a/glslang/MachineIndependent/parseVersions.h b/glslang/MachineIndependent/parseVersions.h index dc51682..967d352 100755 --- a/glslang/MachineIndependent/parseVersions.h +++ b/glslang/MachineIndependent/parseVersions.h @@ -76,6 +76,9 @@ public: virtual void updateExtensionBehavior(int line, const char* const extension, const char* behavior); virtual void fullIntegerCheck(const TSourceLoc&, const char* op); virtual void doubleCheck(const TSourceLoc&, const char* op); +#ifdef AMD_EXTENSIONS + virtual void float16Check(const TSourceLoc&, const char* op, bool builtIn = false); +#endif virtual void int64Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void spvRemoved(const TSourceLoc&, const char* op); virtual void vulkanRemoved(const TSourceLoc&, const char* op); diff --git a/glslang/MachineIndependent/preprocessor/Pp.cpp b/glslang/MachineIndependent/preprocessor/Pp.cpp index d28e7be..3c6d012 100644 --- a/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -705,6 +705,9 @@ int TPpContext::CPPerror(TPpToken* ppToken) while (token != '\n' && token != EndOfInput) { if (token == PpAtomConstInt || token == PpAtomConstUint || token == PpAtomConstInt64 || token == PpAtomConstUint64 || +#ifdef AMD_EXTENSIONS + token == PpAtomConstFloat16 || +#endif token == PpAtomConstFloat || token == PpAtomConstDouble) { message.append(ppToken->name); } else if (token == PpAtomIdentifier || token == PpAtomConstString) { @@ -739,6 +742,9 @@ int TPpContext::CPPpragma(TPpToken* ppToken) case PpAtomConstUint64: case PpAtomConstFloat: case PpAtomConstDouble: +#ifdef AMD_EXTENSIONS + case PpAtomConstFloat16: +#endif tokens.push_back(ppToken->name); break; default: diff --git a/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/glslang/MachineIndependent/preprocessor/PpScanner.cpp index 7daebb3..518dbde 100644 --- a/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -117,6 +117,10 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) int declen; int str_len; int isDouble = 0; +#ifdef AMD_EXTENSIONS + int isFloat16 = 0; + bool enableFloat16 = parseContext.version >= 450 && parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float); +#endif declen = 0; @@ -200,6 +204,28 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) len = 1,str_len=1; } } +#ifdef AMD_EXTENSIONS + } else if (enableFloat16 && (ch == 'h' || ch == 'H')) { + parseContext.float16Check(ppToken->loc, "half floating-point suffix"); + if (!HasDecimalOrExponent) + parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); + int ch2 = getChar(); + if (ch2 != 'f' && ch2 != 'F') { + ungetChar(); + ungetChar(); + } + else { + if (len < MaxTokenLength) { + str[len++] = (char)ch; + str[len++] = (char)ch2; + isFloat16 = 1; + } + else { + parseContext.ppError(ppToken->loc, "float literal too long", "", ""); + len = 1, str_len = 1; + } + } +#endif } else if (ch == 'f' || ch == 'F') { parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); if (! parseContext.relaxedErrors()) @@ -222,6 +248,10 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) if (isDouble) return PpAtomConstDouble; +#ifdef AMD_EXTENSIONS + else if (isFloat16) + return PpAtomConstFloat16; +#endif else return PpAtomConstFloat; } @@ -744,6 +774,9 @@ const char* TPpContext::tokenize(TPpToken* ppToken) case PpAtomConstInt64: case PpAtomConstUint64: case PpAtomConstDouble: +#ifdef AMD_EXTENSIONS + case PpAtomConstFloat16: +#endif tokenString = ppToken->name; break; case PpAtomConstString: diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index f5a0513..48e2e7a 100644 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -144,6 +144,9 @@ void TPpContext::RecordToken(TokenStream *pTok, int token, TPpToken* ppToken) case PpAtomConstUint64: case PpAtomConstFloat: case PpAtomConstDouble: +#ifdef AMD_EXTENSIONS + case PpAtomConstFloat16: +#endif str = ppToken->name; while (*str) { lAddByte(pTok, (unsigned char) *str); @@ -195,6 +198,9 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) case PpAtomIdentifier: case PpAtomConstFloat: case PpAtomConstDouble: +#ifdef AMD_EXTENSIONS + case PpAtomConstFloat16: +#endif case PpAtomConstInt: case PpAtomConstUint: case PpAtomConstInt64: @@ -221,6 +227,9 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) break; case PpAtomConstFloat: case PpAtomConstDouble: +#ifdef AMD_EXTENSIONS + case PpAtomConstFloat16: +#endif ppToken->dval = atof(ppToken->name); break; case PpAtomConstInt: diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.h b/glslang/MachineIndependent/preprocessor/PpTokens.h index fd4d407..c84431d 100644 --- a/glslang/MachineIndependent/preprocessor/PpTokens.h +++ b/glslang/MachineIndependent/preprocessor/PpTokens.h @@ -123,6 +123,9 @@ enum EFixedAtoms { PpAtomConstUint64, PpAtomConstFloat, PpAtomConstDouble, +#ifdef AMD_EXTENSIONS + PpAtomConstFloat16, +#endif PpAtomConstString, // Identifiers diff --git a/glslang/MachineIndependent/reflection.cpp b/glslang/MachineIndependent/reflection.cpp index d557765..ca81458 100644 --- a/glslang/MachineIndependent/reflection.cpp +++ b/glslang/MachineIndependent/reflection.cpp @@ -529,6 +529,9 @@ public: switch (type.getBasicType()) { case EbtFloat: return GL_FLOAT_VEC2 + offset; case EbtDouble: return GL_DOUBLE_VEC2 + offset; +#ifdef AMD_EXTENSIONS + case EbtFloat16: return GL_FLOAT16_VEC2_NV + offset; +#endif case EbtInt: return GL_INT_VEC2 + offset; case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset; case EbtInt64: return GL_INT64_ARB + offset; @@ -588,6 +591,32 @@ public: default: return 0; } } +#ifdef AMD_EXTENSIONS + case EbtFloat16: + switch (type.getMatrixCols()) { + case 2: + switch (type.getMatrixRows()) { + case 2: return GL_FLOAT16_MAT2_AMD; + case 3: return GL_FLOAT16_MAT2x3_AMD; + case 4: return GL_FLOAT16_MAT2x4_AMD; + default: return 0; + } + case 3: + switch (type.getMatrixRows()) { + case 2: return GL_FLOAT16_MAT3x2_AMD; + case 3: return GL_FLOAT16_MAT3_AMD; + case 4: return GL_FLOAT16_MAT3x4_AMD; + default: return 0; + } + case 4: + switch (type.getMatrixRows()) { + case 2: return GL_FLOAT16_MAT4x2_AMD; + case 3: return GL_FLOAT16_MAT4x3_AMD; + case 4: return GL_FLOAT16_MAT4_AMD; + default: return 0; + } + } +#endif default: return 0; } @@ -596,6 +625,9 @@ public: switch (type.getBasicType()) { case EbtFloat: return GL_FLOAT; case EbtDouble: return GL_DOUBLE; +#ifdef AMD_EXTENSIONS + case EbtFloat16: return GL_FLOAT16_NV; +#endif case EbtInt: return GL_INT; case EbtUint: return GL_UNSIGNED_INT; case EbtInt64: return GL_INT64_ARB; diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt index 8a91eef..a7cba22 100644 --- a/gtests/CMakeLists.txt +++ b/gtests/CMakeLists.txt @@ -14,6 +14,7 @@ if (TARGET gmock) ${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp ${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Config.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/HexFloat.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Hlsl.FromFile.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp diff --git a/gtests/HexFloat.cpp b/gtests/HexFloat.cpp new file mode 100644 index 0000000..248513c --- /dev/null +++ b/gtests/HexFloat.cpp @@ -0,0 +1,1232 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include +#include +#include +#include + +#include +#include "SPIRV/hex_float.h" + +namespace { +using ::testing::Eq; +using spvutils::BitwiseCast; +using spvutils::Float16; +using spvutils::FloatProxy; +using spvutils::HexFloat; +using spvutils::ParseNormalFloat; + +// In this file "encode" means converting a number into a string, +// and "decode" means converting a string into a number. + +using HexFloatTest = + ::testing::TestWithParam, std::string>>; +using DecodeHexFloatTest = + ::testing::TestWithParam>>; +using HexDoubleTest = + ::testing::TestWithParam, std::string>>; +using DecodeHexDoubleTest = + ::testing::TestWithParam>>; + +// Hex-encodes a float value. +template +std::string EncodeViaHexFloat(const T& value) { + std::stringstream ss; + ss << spvutils::HexFloat(value); + return ss.str(); +} + +// The following two tests can't be DRY because they take different parameter +// types. + +TEST_P(HexFloatTest, EncodeCorrectly) { + EXPECT_THAT(EncodeViaHexFloat(GetParam().first), Eq(GetParam().second)); +} + +TEST_P(HexDoubleTest, EncodeCorrectly) { + EXPECT_THAT(EncodeViaHexFloat(GetParam().first), Eq(GetParam().second)); +} + +// Decodes a hex-float string. +template +FloatProxy Decode(const std::string& str) { + spvutils::HexFloat> decoded(0.f); + EXPECT_TRUE((std::stringstream(str) >> decoded).eof()); + return decoded.value(); +} + +TEST_P(HexFloatTest, DecodeCorrectly) { + EXPECT_THAT(Decode(GetParam().second), Eq(GetParam().first)); +} + +TEST_P(HexDoubleTest, DecodeCorrectly) { + EXPECT_THAT(Decode(GetParam().second), Eq(GetParam().first)); +} + +INSTANTIATE_TEST_CASE_P( + Float32Tests, HexFloatTest, + ::testing::ValuesIn(std::vector, std::string>>({ + {0.f, "0x0p+0"}, + {1.f, "0x1p+0"}, + {2.f, "0x1p+1"}, + {3.f, "0x1.8p+1"}, + {0.5f, "0x1p-1"}, + {0.25f, "0x1p-2"}, + {0.75f, "0x1.8p-1"}, + {-0.f, "-0x0p+0"}, + {-1.f, "-0x1p+0"}, + {-0.5f, "-0x1p-1"}, + {-0.25f, "-0x1p-2"}, + {-0.75f, "-0x1.8p-1"}, + + // Larger numbers + {512.f, "0x1p+9"}, + {-512.f, "-0x1p+9"}, + {1024.f, "0x1p+10"}, + {-1024.f, "-0x1p+10"}, + {1024.f + 8.f, "0x1.02p+10"}, + {-1024.f - 8.f, "-0x1.02p+10"}, + + // Small numbers + {1.0f / 512.f, "0x1p-9"}, + {1.0f / -512.f, "-0x1p-9"}, + {1.0f / 1024.f, "0x1p-10"}, + {1.0f / -1024.f, "-0x1p-10"}, + {1.0f / 1024.f + 1.0f / 8.f, "0x1.02p-3"}, + {1.0f / -1024.f - 1.0f / 8.f, "-0x1.02p-3"}, + + // lowest non-denorm + {float(ldexp(1.0f, -126)), "0x1p-126"}, + {float(ldexp(-1.0f, -126)), "-0x1p-126"}, + + // Denormalized values + {float(ldexp(1.0f, -127)), "0x1p-127"}, + {float(ldexp(1.0f, -127) / 2.0f), "0x1p-128"}, + {float(ldexp(1.0f, -127) / 4.0f), "0x1p-129"}, + {float(ldexp(1.0f, -127) / 8.0f), "0x1p-130"}, + {float(ldexp(-1.0f, -127)), "-0x1p-127"}, + {float(ldexp(-1.0f, -127) / 2.0f), "-0x1p-128"}, + {float(ldexp(-1.0f, -127) / 4.0f), "-0x1p-129"}, + {float(ldexp(-1.0f, -127) / 8.0f), "-0x1p-130"}, + + {float(ldexp(1.0, -127) + (ldexp(1.0, -127) / 2.0f)), "0x1.8p-127"}, + {float(ldexp(1.0, -127) / 2.0 + (ldexp(1.0, -127) / 4.0f)), + "0x1.8p-128"}, + + })),); + +INSTANTIATE_TEST_CASE_P( + Float32NanTests, HexFloatTest, + ::testing::ValuesIn(std::vector, std::string>>({ + // Various NAN and INF cases + {uint32_t(0xFF800000), "-0x1p+128"}, // -inf + {uint32_t(0x7F800000), "0x1p+128"}, // inf + {uint32_t(0xFFC00000), "-0x1.8p+128"}, // -nan + {uint32_t(0xFF800100), "-0x1.0002p+128"}, // -nan + {uint32_t(0xFF800c00), "-0x1.0018p+128"}, // -nan + {uint32_t(0xFF80F000), "-0x1.01ep+128"}, // -nan + {uint32_t(0xFFFFFFFF), "-0x1.fffffep+128"}, // -nan + {uint32_t(0x7FC00000), "0x1.8p+128"}, // +nan + {uint32_t(0x7F800100), "0x1.0002p+128"}, // +nan + {uint32_t(0x7f800c00), "0x1.0018p+128"}, // +nan + {uint32_t(0x7F80F000), "0x1.01ep+128"}, // +nan + {uint32_t(0x7FFFFFFF), "0x1.fffffep+128"}, // +nan + })),); + +INSTANTIATE_TEST_CASE_P( + Float64Tests, HexDoubleTest, + ::testing::ValuesIn( + std::vector, std::string>>({ + {0., "0x0p+0"}, + {1., "0x1p+0"}, + {2., "0x1p+1"}, + {3., "0x1.8p+1"}, + {0.5, "0x1p-1"}, + {0.25, "0x1p-2"}, + {0.75, "0x1.8p-1"}, + {-0., "-0x0p+0"}, + {-1., "-0x1p+0"}, + {-0.5, "-0x1p-1"}, + {-0.25, "-0x1p-2"}, + {-0.75, "-0x1.8p-1"}, + + // Larger numbers + {512., "0x1p+9"}, + {-512., "-0x1p+9"}, + {1024., "0x1p+10"}, + {-1024., "-0x1p+10"}, + {1024. + 8., "0x1.02p+10"}, + {-1024. - 8., "-0x1.02p+10"}, + + // Large outside the range of normal floats + {ldexp(1.0, 128), "0x1p+128"}, + {ldexp(1.0, 129), "0x1p+129"}, + {ldexp(-1.0, 128), "-0x1p+128"}, + {ldexp(-1.0, 129), "-0x1p+129"}, + {ldexp(1.0, 128) + ldexp(1.0, 90), "0x1.0000000004p+128"}, + {ldexp(1.0, 129) + ldexp(1.0, 120), "0x1.008p+129"}, + {ldexp(-1.0, 128) + ldexp(1.0, 90), "-0x1.fffffffff8p+127"}, + {ldexp(-1.0, 129) + ldexp(1.0, 120), "-0x1.ffp+128"}, + + // Small numbers + {1.0 / 512., "0x1p-9"}, + {1.0 / -512., "-0x1p-9"}, + {1.0 / 1024., "0x1p-10"}, + {1.0 / -1024., "-0x1p-10"}, + {1.0 / 1024. + 1.0 / 8., "0x1.02p-3"}, + {1.0 / -1024. - 1.0 / 8., "-0x1.02p-3"}, + + // Small outside the range of normal floats + {ldexp(1.0, -128), "0x1p-128"}, + {ldexp(1.0, -129), "0x1p-129"}, + {ldexp(-1.0, -128), "-0x1p-128"}, + {ldexp(-1.0, -129), "-0x1p-129"}, + {ldexp(1.0, -128) + ldexp(1.0, -90), "0x1.0000000004p-90"}, + {ldexp(1.0, -129) + ldexp(1.0, -120), "0x1.008p-120"}, + {ldexp(-1.0, -128) + ldexp(1.0, -90), "0x1.fffffffff8p-91"}, + {ldexp(-1.0, -129) + ldexp(1.0, -120), "0x1.ffp-121"}, + + // lowest non-denorm + {ldexp(1.0, -1022), "0x1p-1022"}, + {ldexp(-1.0, -1022), "-0x1p-1022"}, + + // Denormalized values + {ldexp(1.0, -1023), "0x1p-1023"}, + {ldexp(1.0, -1023) / 2.0, "0x1p-1024"}, + {ldexp(1.0, -1023) / 4.0, "0x1p-1025"}, + {ldexp(1.0, -1023) / 8.0, "0x1p-1026"}, + {ldexp(-1.0, -1024), "-0x1p-1024"}, + {ldexp(-1.0, -1024) / 2.0, "-0x1p-1025"}, + {ldexp(-1.0, -1024) / 4.0, "-0x1p-1026"}, + {ldexp(-1.0, -1024) / 8.0, "-0x1p-1027"}, + + {ldexp(1.0, -1023) + (ldexp(1.0, -1023) / 2.0), "0x1.8p-1023"}, + {ldexp(1.0, -1023) / 2.0 + (ldexp(1.0, -1023) / 4.0), + "0x1.8p-1024"}, + + })),); + +INSTANTIATE_TEST_CASE_P( + Float64NanTests, HexDoubleTest, + ::testing::ValuesIn(std::vector< + std::pair, std::string>>({ + // Various NAN and INF cases + {uint64_t(0xFFF0000000000000LL), "-0x1p+1024"}, //-inf + {uint64_t(0x7FF0000000000000LL), "0x1p+1024"}, //+inf + {uint64_t(0xFFF8000000000000LL), "-0x1.8p+1024"}, // -nan + {uint64_t(0xFFF0F00000000000LL), "-0x1.0fp+1024"}, // -nan + {uint64_t(0xFFF0000000000001LL), "-0x1.0000000000001p+1024"}, // -nan + {uint64_t(0xFFF0000300000000LL), "-0x1.00003p+1024"}, // -nan + {uint64_t(0xFFFFFFFFFFFFFFFFLL), "-0x1.fffffffffffffp+1024"}, // -nan + {uint64_t(0x7FF8000000000000LL), "0x1.8p+1024"}, // +nan + {uint64_t(0x7FF0F00000000000LL), "0x1.0fp+1024"}, // +nan + {uint64_t(0x7FF0000000000001LL), "0x1.0000000000001p+1024"}, // -nan + {uint64_t(0x7FF0000300000000LL), "0x1.00003p+1024"}, // -nan + {uint64_t(0x7FFFFFFFFFFFFFFFLL), "0x1.fffffffffffffp+1024"}, // -nan + })),); + +TEST(HexFloatStreamTest, OperatorLeftShiftPreservesFloatAndFill) { + std::stringstream s; + s << std::setw(4) << std::oct << std::setfill('x') << 8 << " " + << FloatProxy(uint32_t(0xFF800100)) << " " << std::setw(4) << 9; + EXPECT_THAT(s.str(), Eq(std::string("xx10 -0x1.0002p+128 xx11"))); +} + +TEST(HexDoubleStreamTest, OperatorLeftShiftPreservesFloatAndFill) { + std::stringstream s; + s << std::setw(4) << std::oct << std::setfill('x') << 8 << " " + << FloatProxy(uint64_t(0x7FF0F00000000000LL)) << " " << std::setw(4) + << 9; + EXPECT_THAT(s.str(), Eq(std::string("xx10 0x1.0fp+1024 xx11"))); +} + +TEST_P(DecodeHexFloatTest, DecodeCorrectly) { + EXPECT_THAT(Decode(GetParam().first), Eq(GetParam().second)); +} + +TEST_P(DecodeHexDoubleTest, DecodeCorrectly) { + EXPECT_THAT(Decode(GetParam().first), Eq(GetParam().second)); +} + +INSTANTIATE_TEST_CASE_P( + Float32DecodeTests, DecodeHexFloatTest, + ::testing::ValuesIn(std::vector>>({ + {"0x0p+000", 0.f}, + {"0x0p0", 0.f}, + {"0x0p-0", 0.f}, + + // flush to zero cases + {"0x1p-500", 0.f}, // Exponent underflows. + {"-0x1p-500", -0.f}, + {"0x0.00000000001p-126", 0.f}, // Fraction causes underflow. + {"-0x0.0000000001p-127", -0.f}, + {"-0x0.01p-142", -0.f}, // Fraction causes additional underflow. + {"0x0.01p-142", 0.f}, + + // Some floats that do not encode the same way as they decode. + {"0x2p+0", 2.f}, + {"0xFFp+0", 255.f}, + {"0x0.8p+0", 0.5f}, + {"0x0.4p+0", 0.25f}, + })),); + +INSTANTIATE_TEST_CASE_P( + Float32DecodeInfTests, DecodeHexFloatTest, + ::testing::ValuesIn(std::vector>>({ + // inf cases + {"-0x1p+128", uint32_t(0xFF800000)}, // -inf + {"0x32p+127", uint32_t(0x7F800000)}, // inf + {"0x32p+500", uint32_t(0x7F800000)}, // inf + {"-0x32p+127", uint32_t(0xFF800000)}, // -inf + })),); + +INSTANTIATE_TEST_CASE_P( + Float64DecodeTests, DecodeHexDoubleTest, + ::testing::ValuesIn( + std::vector>>({ + {"0x0p+000", 0.}, + {"0x0p0", 0.}, + {"0x0p-0", 0.}, + + // flush to zero cases + {"0x1p-5000", 0.}, // Exponent underflows. + {"-0x1p-5000", -0.}, + {"0x0.0000000000000001p-1023", 0.}, // Fraction causes underflow. + {"-0x0.000000000000001p-1024", -0.}, + {"-0x0.01p-1090", -0.f}, // Fraction causes additional underflow. + {"0x0.01p-1090", 0.}, + + // Some floats that do not encode the same way as they decode. + {"0x2p+0", 2.}, + {"0xFFp+0", 255.}, + {"0x0.8p+0", 0.5}, + {"0x0.4p+0", 0.25}, + })),); + +INSTANTIATE_TEST_CASE_P( + Float64DecodeInfTests, DecodeHexDoubleTest, + ::testing::ValuesIn( + std::vector>>({ + // inf cases + {"-0x1p+1024", uint64_t(0xFFF0000000000000)}, // -inf + {"0x32p+1023", uint64_t(0x7FF0000000000000)}, // inf + {"0x32p+5000", uint64_t(0x7FF0000000000000)}, // inf + {"-0x32p+1023", uint64_t(0xFFF0000000000000)}, // -inf + })),); + +TEST(FloatProxy, ValidConversion) { + EXPECT_THAT(FloatProxy(1.f).getAsFloat(), Eq(1.0f)); + EXPECT_THAT(FloatProxy(32.f).getAsFloat(), Eq(32.0f)); + EXPECT_THAT(FloatProxy(-1.f).getAsFloat(), Eq(-1.0f)); + EXPECT_THAT(FloatProxy(0.f).getAsFloat(), Eq(0.0f)); + EXPECT_THAT(FloatProxy(-0.f).getAsFloat(), Eq(-0.0f)); + EXPECT_THAT(FloatProxy(1.2e32f).getAsFloat(), Eq(1.2e32f)); + + EXPECT_TRUE(std::isinf(FloatProxy(uint32_t(0xFF800000)).getAsFloat())); + EXPECT_TRUE(std::isinf(FloatProxy(uint32_t(0x7F800000)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0xFFC00000)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0xFF800100)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0xFF800c00)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0xFF80F000)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0xFFFFFFFF)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0x7FC00000)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0x7F800100)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0x7f800c00)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0x7F80F000)).getAsFloat())); + EXPECT_TRUE(std::isnan(FloatProxy(uint32_t(0x7FFFFFFF)).getAsFloat())); + + EXPECT_THAT(FloatProxy(uint32_t(0xFF800000)).data(), Eq(0xFF800000u)); + EXPECT_THAT(FloatProxy(uint32_t(0x7F800000)).data(), Eq(0x7F800000u)); + EXPECT_THAT(FloatProxy(uint32_t(0xFFC00000)).data(), Eq(0xFFC00000u)); + EXPECT_THAT(FloatProxy(uint32_t(0xFF800100)).data(), Eq(0xFF800100u)); + EXPECT_THAT(FloatProxy(uint32_t(0xFF800c00)).data(), Eq(0xFF800c00u)); + EXPECT_THAT(FloatProxy(uint32_t(0xFF80F000)).data(), Eq(0xFF80F000u)); + EXPECT_THAT(FloatProxy(uint32_t(0xFFFFFFFF)).data(), Eq(0xFFFFFFFFu)); + EXPECT_THAT(FloatProxy(uint32_t(0x7FC00000)).data(), Eq(0x7FC00000u)); + EXPECT_THAT(FloatProxy(uint32_t(0x7F800100)).data(), Eq(0x7F800100u)); + EXPECT_THAT(FloatProxy(uint32_t(0x7f800c00)).data(), Eq(0x7f800c00u)); + EXPECT_THAT(FloatProxy(uint32_t(0x7F80F000)).data(), Eq(0x7F80F000u)); + EXPECT_THAT(FloatProxy(uint32_t(0x7FFFFFFF)).data(), Eq(0x7FFFFFFFu)); +} + +TEST(FloatProxy, Nan) { + EXPECT_TRUE(FloatProxy(uint32_t(0xFFC00000)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0xFF800100)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0xFF800c00)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0xFF80F000)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0xFFFFFFFF)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0x7FC00000)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0x7F800100)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0x7f800c00)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0x7F80F000)).isNan()); + EXPECT_TRUE(FloatProxy(uint32_t(0x7FFFFFFF)).isNan()); +} + +TEST(FloatProxy, Negation) { + EXPECT_THAT((-FloatProxy(1.f)).getAsFloat(), Eq(-1.0f)); + EXPECT_THAT((-FloatProxy(0.f)).getAsFloat(), Eq(-0.0f)); + + EXPECT_THAT((-FloatProxy(-1.f)).getAsFloat(), Eq(1.0f)); + EXPECT_THAT((-FloatProxy(-0.f)).getAsFloat(), Eq(0.0f)); + + EXPECT_THAT((-FloatProxy(32.f)).getAsFloat(), Eq(-32.0f)); + EXPECT_THAT((-FloatProxy(-32.f)).getAsFloat(), Eq(32.0f)); + + EXPECT_THAT((-FloatProxy(1.2e32f)).getAsFloat(), Eq(-1.2e32f)); + EXPECT_THAT((-FloatProxy(-1.2e32f)).getAsFloat(), Eq(1.2e32f)); + + EXPECT_THAT( + (-FloatProxy(std::numeric_limits::infinity())).getAsFloat(), + Eq(-std::numeric_limits::infinity())); + EXPECT_THAT((-FloatProxy(-std::numeric_limits::infinity())) + .getAsFloat(), + Eq(std::numeric_limits::infinity())); +} + +// Test conversion of FloatProxy values to strings. +// +// In previous cases, we always wrapped the FloatProxy value in a HexFloat +// before conversion to a string. In the following cases, the FloatProxy +// decides for itself whether to print as a regular number or as a hex float. + +using FloatProxyFloatTest = + ::testing::TestWithParam, std::string>>; +using FloatProxyDoubleTest = + ::testing::TestWithParam, std::string>>; + +// Converts a float value to a string via a FloatProxy. +template +std::string EncodeViaFloatProxy(const T& value) { + std::stringstream ss; + ss << value; + return ss.str(); +} + +// Converts a floating point string so that the exponent prefix +// is 'e', and the exponent value does not have leading zeros. +// The Microsoft runtime library likes to write things like "2.5E+010". +// Convert that to "2.5e+10". +// We don't care what happens to strings that are not floating point +// strings. +std::string NormalizeExponentInFloatString(std::string in) { + std::string result; + // Reserve one spot for the terminating null, even when the sscanf fails. + std::vector prefix(in.size() + 1); + char e; + char plus_or_minus; + int exponent; // in base 10 + if ((4 == std::sscanf(in.c_str(), "%[-+.0123456789]%c%c%d", prefix.data(), &e, + &plus_or_minus, &exponent)) && + (e == 'e' || e == 'E') && + (plus_or_minus == '-' || plus_or_minus == '+')) { + // It looks like a floating point value with exponent. + std::stringstream out; + out << prefix.data() << 'e' << plus_or_minus << exponent; + result = out.str(); + } else { + result = in; + } + return result; +} + +TEST(NormalizeFloat, Sample) { + EXPECT_THAT(NormalizeExponentInFloatString(""), Eq("")); + EXPECT_THAT(NormalizeExponentInFloatString("1e-12"), Eq("1e-12")); + EXPECT_THAT(NormalizeExponentInFloatString("1E+14"), Eq("1e+14")); + EXPECT_THAT(NormalizeExponentInFloatString("1e-0012"), Eq("1e-12")); + EXPECT_THAT(NormalizeExponentInFloatString("1.263E+014"), Eq("1.263e+14")); +} + +// The following two tests can't be DRY because they take different parameter +// types. +TEST_P(FloatProxyFloatTest, EncodeCorrectly) { + EXPECT_THAT( + NormalizeExponentInFloatString(EncodeViaFloatProxy(GetParam().first)), + Eq(GetParam().second)); +} + +TEST_P(FloatProxyDoubleTest, EncodeCorrectly) { + EXPECT_THAT( + NormalizeExponentInFloatString(EncodeViaFloatProxy(GetParam().first)), + Eq(GetParam().second)); +} + +INSTANTIATE_TEST_CASE_P( + Float32Tests, FloatProxyFloatTest, + ::testing::ValuesIn(std::vector, std::string>>({ + // Zero + {0.f, "0"}, + // Normal numbers + {1.f, "1"}, + {-0.25f, "-0.25"}, + {1000.0f, "1000"}, + + // Still normal numbers, but with large magnitude exponents. + {float(ldexp(1.f, 126)), "8.50706e+37"}, + {float(ldexp(-1.f, -126)), "-1.17549e-38"}, + + // denormalized values are printed as hex floats. + {float(ldexp(1.0f, -127)), "0x1p-127"}, + {float(ldexp(1.5f, -128)), "0x1.8p-128"}, + {float(ldexp(1.25, -129)), "0x1.4p-129"}, + {float(ldexp(1.125, -130)), "0x1.2p-130"}, + {float(ldexp(-1.0f, -127)), "-0x1p-127"}, + {float(ldexp(-1.0f, -128)), "-0x1p-128"}, + {float(ldexp(-1.0f, -129)), "-0x1p-129"}, + {float(ldexp(-1.5f, -130)), "-0x1.8p-130"}, + + // NaNs + {FloatProxy(uint32_t(0xFFC00000)), "-0x1.8p+128"}, + {FloatProxy(uint32_t(0xFF800100)), "-0x1.0002p+128"}, + + {std::numeric_limits::infinity(), "0x1p+128"}, + {-std::numeric_limits::infinity(), "-0x1p+128"}, + })),); + +INSTANTIATE_TEST_CASE_P( + Float64Tests, FloatProxyDoubleTest, + ::testing::ValuesIn( + std::vector, std::string>>({ + {0., "0"}, + {1., "1"}, + {-0.25, "-0.25"}, + {1000.0, "1000"}, + + // Large outside the range of normal floats + {ldexp(1.0, 128), "3.40282366920938e+38"}, + {ldexp(1.5, 129), "1.02084710076282e+39"}, + {ldexp(-1.0, 128), "-3.40282366920938e+38"}, + {ldexp(-1.5, 129), "-1.02084710076282e+39"}, + + // Small outside the range of normal floats + {ldexp(1.5, -129), "2.20405190779179e-39"}, + {ldexp(-1.5, -129), "-2.20405190779179e-39"}, + + // lowest non-denorm + {ldexp(1.0, -1022), "2.2250738585072e-308"}, + {ldexp(-1.0, -1022), "-2.2250738585072e-308"}, + + // Denormalized values + {ldexp(1.125, -1023), "0x1.2p-1023"}, + {ldexp(-1.375, -1024), "-0x1.6p-1024"}, + + // NaNs + {uint64_t(0x7FF8000000000000LL), "0x1.8p+1024"}, + {uint64_t(0xFFF0F00000000000LL), "-0x1.0fp+1024"}, + + // Infinity + {std::numeric_limits::infinity(), "0x1p+1024"}, + {-std::numeric_limits::infinity(), "-0x1p+1024"}, + + })),); + +// double is used so that unbiased_exponent can be used with the output +// of ldexp directly. +int32_t unbiased_exponent(double f) { + return spvutils::HexFloat>( + static_cast(f)).getUnbiasedNormalizedExponent(); +} + +int16_t unbiased_half_exponent(uint16_t f) { + return spvutils::HexFloat>(f) + .getUnbiasedNormalizedExponent(); +} + +TEST(HexFloatOperationTest, UnbiasedExponent) { + // Float cases + EXPECT_EQ(0, unbiased_exponent(ldexp(1.0f, 0))); + EXPECT_EQ(-32, unbiased_exponent(ldexp(1.0f, -32))); + EXPECT_EQ(42, unbiased_exponent(ldexp(1.0f, 42))); + EXPECT_EQ(125, unbiased_exponent(ldexp(1.0f, 125))); + // Saturates to 128 + EXPECT_EQ(128, unbiased_exponent(ldexp(1.0f, 256))); + + EXPECT_EQ(-100, unbiased_exponent(ldexp(1.0f, -100))); + EXPECT_EQ(-127, unbiased_exponent(ldexp(1.0f, -127))); // First denorm + EXPECT_EQ(-128, unbiased_exponent(ldexp(1.0f, -128))); + EXPECT_EQ(-129, unbiased_exponent(ldexp(1.0f, -129))); + EXPECT_EQ(-140, unbiased_exponent(ldexp(1.0f, -140))); + // Smallest representable number + EXPECT_EQ(-126 - 23, unbiased_exponent(ldexp(1.0f, -126 - 23))); + // Should get rounded to 0 first. + EXPECT_EQ(0, unbiased_exponent(ldexp(1.0f, -127 - 23))); + + // Float16 cases + // The exponent is represented in the bits 0x7C00 + // The offset is -15 + EXPECT_EQ(0, unbiased_half_exponent(0x3C00)); + EXPECT_EQ(3, unbiased_half_exponent(0x4800)); + EXPECT_EQ(-1, unbiased_half_exponent(0x3800)); + EXPECT_EQ(-14, unbiased_half_exponent(0x0400)); + EXPECT_EQ(16, unbiased_half_exponent(0x7C00)); + EXPECT_EQ(10, unbiased_half_exponent(0x6400)); + + // Smallest representable number + EXPECT_EQ(-24, unbiased_half_exponent(0x0001)); +} + +// Creates a float that is the sum of 1/(2 ^ fractions[i]) for i in factions +float float_fractions(const std::vector& fractions) { + float f = 0; + for(int32_t i: fractions) { + f += std::ldexp(1.0f, -i); + } + return f; +} + +// Returns the normalized significand of a HexFloat> +// that was created by calling float_fractions with the input fractions, +// raised to the power of exp. +uint32_t normalized_significand(const std::vector& fractions, uint32_t exp) { + return spvutils::HexFloat>( + static_cast(ldexp(float_fractions(fractions), exp))) + .getNormalizedSignificand(); +} + +// Sets the bits from MSB to LSB of the significand part of a float. +// For example 0 would set the bit 23 (counting from LSB to MSB), +// and 1 would set the 22nd bit. +uint32_t bits_set(const std::vector& bits) { + const uint32_t top_bit = 1u << 22u; + uint32_t val= 0; + for(uint32_t i: bits) { + val |= top_bit >> i; + } + return val; +} + +// The same as bits_set but for a Float16 value instead of 32-bit floating +// point. +uint16_t half_bits_set(const std::vector& bits) { + const uint32_t top_bit = 1u << 9u; + uint32_t val= 0; + for(uint32_t i: bits) { + val |= top_bit >> i; + } + return static_cast(val); +} + +TEST(HexFloatOperationTest, NormalizedSignificand) { + // For normalized numbers (the following) it should be a simple matter + // of getting rid of the top implicit bit + EXPECT_EQ(bits_set({}), normalized_significand({0}, 0)); + EXPECT_EQ(bits_set({0}), normalized_significand({0, 1}, 0)); + EXPECT_EQ(bits_set({0, 1}), normalized_significand({0, 1, 2}, 0)); + EXPECT_EQ(bits_set({1}), normalized_significand({0, 2}, 0)); + EXPECT_EQ(bits_set({1}), normalized_significand({0, 2}, 32)); + EXPECT_EQ(bits_set({1}), normalized_significand({0, 2}, 126)); + + // For denormalized numbers we expect the normalized significand to + // shift as if it were normalized. This means, in practice that the + // top_most set bit will be cut off. Looks very similar to above (on purpose) + EXPECT_EQ(bits_set({}), normalized_significand({0}, -127)); + EXPECT_EQ(bits_set({3}), normalized_significand({0, 4}, -128)); + EXPECT_EQ(bits_set({3}), normalized_significand({0, 4}, -127)); + EXPECT_EQ(bits_set({}), normalized_significand({22}, -127)); + EXPECT_EQ(bits_set({0}), normalized_significand({21, 22}, -127)); +} + +// Returns the 32-bit floating point value created by +// calling setFromSignUnbiasedExponentAndNormalizedSignificand +// on a HexFloat> +float set_from_sign(bool negative, int32_t unbiased_exponent, + uint32_t significand, bool round_denorm_up) { + spvutils::HexFloat> f(0.f); + f.setFromSignUnbiasedExponentAndNormalizedSignificand( + negative, unbiased_exponent, significand, round_denorm_up); + return f.value().getAsFloat(); +} + +TEST(HexFloatOperationTests, + SetFromSignUnbiasedExponentAndNormalizedSignificand) { + + EXPECT_EQ(1.f, set_from_sign(false, 0, 0, false)); + + // Tests insertion of various denormalized numbers with and without round up. + EXPECT_EQ(static_cast(ldexp(1.f, -149)), set_from_sign(false, -149, 0, false)); + EXPECT_EQ(static_cast(ldexp(1.f, -149)), set_from_sign(false, -149, 0, true)); + EXPECT_EQ(0.f, set_from_sign(false, -150, 1, false)); + EXPECT_EQ(static_cast(ldexp(1.f, -149)), set_from_sign(false, -150, 1, true)); + + EXPECT_EQ(ldexp(1.0f, -127), set_from_sign(false, -127, 0, false)); + EXPECT_EQ(ldexp(1.0f, -128), set_from_sign(false, -128, 0, false)); + EXPECT_EQ(float_fractions({0, 1, 2, 5}), + set_from_sign(false, 0, bits_set({0, 1, 4}), false)); + EXPECT_EQ(ldexp(float_fractions({0, 1, 2, 5}), -32), + set_from_sign(false, -32, bits_set({0, 1, 4}), false)); + EXPECT_EQ(ldexp(float_fractions({0, 1, 2, 5}), -128), + set_from_sign(false, -128, bits_set({0, 1, 4}), false)); + + // The negative cases from above. + EXPECT_EQ(-1.f, set_from_sign(true, 0, 0, false)); + EXPECT_EQ(-ldexp(1.0, -127), set_from_sign(true, -127, 0, false)); + EXPECT_EQ(-ldexp(1.0, -128), set_from_sign(true, -128, 0, false)); + EXPECT_EQ(-float_fractions({0, 1, 2, 5}), + set_from_sign(true, 0, bits_set({0, 1, 4}), false)); + EXPECT_EQ(-ldexp(float_fractions({0, 1, 2, 5}), -32), + set_from_sign(true, -32, bits_set({0, 1, 4}), false)); + EXPECT_EQ(-ldexp(float_fractions({0, 1, 2, 5}), -128), + set_from_sign(true, -128, bits_set({0, 1, 4}), false)); +} + +TEST(HexFloatOperationTests, NonRounding) { + // Rounding from 32-bit hex-float to 32-bit hex-float should be trivial, + // except in the denorm case which is a bit more complex. + using HF = spvutils::HexFloat>; + bool carry_bit = false; + + spvutils::round_direction rounding[] = { + spvutils::round_direction::kToZero, + spvutils::round_direction::kToNearestEven, + spvutils::round_direction::kToPositiveInfinity, + spvutils::round_direction::kToNegativeInfinity}; + + // Everything fits, so this should be straight-forward + for (spvutils::round_direction round : rounding) { + EXPECT_EQ(bits_set({}), HF(0.f).getRoundedNormalizedSignificand( + round, &carry_bit)); + EXPECT_FALSE(carry_bit); + + EXPECT_EQ(bits_set({0}), + HF(float_fractions({0, 1})) + .getRoundedNormalizedSignificand(round, &carry_bit)); + EXPECT_FALSE(carry_bit); + + EXPECT_EQ(bits_set({1, 3}), + HF(float_fractions({0, 2, 4})) + .getRoundedNormalizedSignificand(round, &carry_bit)); + EXPECT_FALSE(carry_bit); + + EXPECT_EQ( + bits_set({0, 1, 4}), + HF(static_cast(-ldexp(float_fractions({0, 1, 2, 5}), -128))) + .getRoundedNormalizedSignificand(round, &carry_bit)); + EXPECT_FALSE(carry_bit); + + EXPECT_EQ( + bits_set({0, 1, 4, 22}), + HF(static_cast(float_fractions({0, 1, 2, 5, 23}))) + .getRoundedNormalizedSignificand(round, &carry_bit)); + EXPECT_FALSE(carry_bit); + } +} + +using RD = spvutils::round_direction; +struct RoundSignificandCase { + float source_float; + std::pair expected_results; + spvutils::round_direction round; +}; + +using HexFloatRoundTest = + ::testing::TestWithParam; + +TEST_P(HexFloatRoundTest, RoundDownToFP16) { + using HF = spvutils::HexFloat>; + using HF16 = spvutils::HexFloat>; + + HF input_value(GetParam().source_float); + bool carry_bit = false; + EXPECT_EQ(GetParam().expected_results.first, + input_value.getRoundedNormalizedSignificand( + GetParam().round, &carry_bit)); + EXPECT_EQ(carry_bit, GetParam().expected_results.second); +} + +// clang-format off +INSTANTIATE_TEST_CASE_P(F32ToF16, HexFloatRoundTest, + ::testing::ValuesIn(std::vector( + { + {float_fractions({0}), std::make_pair(half_bits_set({}), false), RD::kToZero}, + {float_fractions({0}), std::make_pair(half_bits_set({}), false), RD::kToNearestEven}, + {float_fractions({0}), std::make_pair(half_bits_set({}), false), RD::kToPositiveInfinity}, + {float_fractions({0}), std::make_pair(half_bits_set({}), false), RD::kToNegativeInfinity}, + {float_fractions({0, 1}), std::make_pair(half_bits_set({0}), false), RD::kToZero}, + + {float_fractions({0, 1, 11}), std::make_pair(half_bits_set({0}), false), RD::kToZero}, + {float_fractions({0, 1, 11}), std::make_pair(half_bits_set({0, 9}), false), RD::kToPositiveInfinity}, + {float_fractions({0, 1, 11}), std::make_pair(half_bits_set({0}), false), RD::kToNegativeInfinity}, + {float_fractions({0, 1, 11}), std::make_pair(half_bits_set({0}), false), RD::kToNearestEven}, + + {float_fractions({0, 1, 10, 11}), std::make_pair(half_bits_set({0, 9}), false), RD::kToZero}, + {float_fractions({0, 1, 10, 11}), std::make_pair(half_bits_set({0, 8}), false), RD::kToPositiveInfinity}, + {float_fractions({0, 1, 10, 11}), std::make_pair(half_bits_set({0, 9}), false), RD::kToNegativeInfinity}, + {float_fractions({0, 1, 10, 11}), std::make_pair(half_bits_set({0, 8}), false), RD::kToNearestEven}, + + {float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0}), false), RD::kToZero}, + {float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0, 9}), false), RD::kToPositiveInfinity}, + {float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0}), false), RD::kToNegativeInfinity}, + {float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0, 9}), false), RD::kToNearestEven}, + + {-float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0}), false), RD::kToZero}, + {-float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0}), false), RD::kToPositiveInfinity}, + {-float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0, 9}), false), RD::kToNegativeInfinity}, + {-float_fractions({0, 1, 11, 12}), std::make_pair(half_bits_set({0, 9}), false), RD::kToNearestEven}, + + {float_fractions({0, 1, 11, 22}), std::make_pair(half_bits_set({0}), false), RD::kToZero}, + {float_fractions({0, 1, 11, 22}), std::make_pair(half_bits_set({0, 9}), false), RD::kToPositiveInfinity}, + {float_fractions({0, 1, 11, 22}), std::make_pair(half_bits_set({0}), false), RD::kToNegativeInfinity}, + {float_fractions({0, 1, 11, 22}), std::make_pair(half_bits_set({0, 9}), false), RD::kToNearestEven}, + + // Carries + {float_fractions({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), std::make_pair(half_bits_set({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}), false), RD::kToZero}, + {float_fractions({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), std::make_pair(half_bits_set({}), true), RD::kToPositiveInfinity}, + {float_fractions({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), std::make_pair(half_bits_set({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}), false), RD::kToNegativeInfinity}, + {float_fractions({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), std::make_pair(half_bits_set({}), true), RD::kToNearestEven}, + + // Cases where original number was denorm. Note: this should have no effect + // the number is pre-normalized. + {static_cast(ldexp(float_fractions({0, 1, 11, 13}), -128)), std::make_pair(half_bits_set({0}), false), RD::kToZero}, + {static_cast(ldexp(float_fractions({0, 1, 11, 13}), -129)), std::make_pair(half_bits_set({0, 9}), false), RD::kToPositiveInfinity}, + {static_cast(ldexp(float_fractions({0, 1, 11, 13}), -131)), std::make_pair(half_bits_set({0}), false), RD::kToNegativeInfinity}, + {static_cast(ldexp(float_fractions({0, 1, 11, 13}), -130)), std::make_pair(half_bits_set({0, 9}), false), RD::kToNearestEven}, + })),); +// clang-format on + +struct UpCastSignificandCase { + uint16_t source_half; + uint32_t expected_result; +}; + +using HexFloatRoundUpSignificandTest = + ::testing::TestWithParam; +TEST_P(HexFloatRoundUpSignificandTest, Widening) { + using HF = spvutils::HexFloat>; + using HF16 = spvutils::HexFloat>; + bool carry_bit = false; + + spvutils::round_direction rounding[] = { + spvutils::round_direction::kToZero, + spvutils::round_direction::kToNearestEven, + spvutils::round_direction::kToPositiveInfinity, + spvutils::round_direction::kToNegativeInfinity}; + + // Everything fits, so everything should just be bit-shifts. + for (spvutils::round_direction round : rounding) { + carry_bit = false; + HF16 input_value(GetParam().source_half); + EXPECT_EQ( + GetParam().expected_result, + input_value.getRoundedNormalizedSignificand(round, &carry_bit)) + << std::hex << "0x" + << input_value.getRoundedNormalizedSignificand(round, &carry_bit) + << " 0x" << GetParam().expected_result; + EXPECT_FALSE(carry_bit); + } +} + +INSTANTIATE_TEST_CASE_P(F16toF32, HexFloatRoundUpSignificandTest, + // 0xFC00 of the source 16-bit hex value cover the sign and the exponent. + // They are ignored for this test. + ::testing::ValuesIn(std::vector( + { + {0x3F00, 0x600000}, + {0x0F00, 0x600000}, + {0x0F01, 0x602000}, + {0x0FFF, 0x7FE000}, + })),); + +struct DownCastTest { + float source_float; + uint16_t expected_half; + std::vector directions; +}; + +std::string get_round_text(spvutils::round_direction direction) { +#define CASE(round_direction) \ + case round_direction: \ + return #round_direction + + switch (direction) { + CASE(spvutils::round_direction::kToZero); + CASE(spvutils::round_direction::kToPositiveInfinity); + CASE(spvutils::round_direction::kToNegativeInfinity); + CASE(spvutils::round_direction::kToNearestEven); + } +#undef CASE + return ""; +} + +using HexFloatFP32To16Tests = ::testing::TestWithParam; + +TEST_P(HexFloatFP32To16Tests, NarrowingCasts) { + using HF = spvutils::HexFloat>; + using HF16 = spvutils::HexFloat>; + HF f(GetParam().source_float); + for (auto round : GetParam().directions) { + HF16 half(0); + f.castTo(half, round); + EXPECT_EQ(GetParam().expected_half, half.value().getAsFloat().get_value()) + << get_round_text(round) << " " << std::hex + << spvutils::BitwiseCast(GetParam().source_float) + << " cast to: " << half.value().getAsFloat().get_value(); + } +} + +const uint16_t positive_infinity = 0x7C00; +const uint16_t negative_infinity = 0xFC00; + +INSTANTIATE_TEST_CASE_P(F32ToF16, HexFloatFP32To16Tests, + ::testing::ValuesIn(std::vector( + { + // Exactly representable as half. + {0.f, 0x0, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {-0.f, 0x8000, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {1.0f, 0x3C00, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {-1.0f, 0xBC00, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + + {float_fractions({0, 1, 10}) , 0x3E01, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {-float_fractions({0, 1, 10}) , 0xBE01, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(ldexp(float_fractions({0, 1, 10}), 3)), 0x4A01, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(-ldexp(float_fractions({0, 1, 10}), 3)), 0xCA01, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + + + // Underflow + {static_cast(ldexp(1.0f, -25)), 0x0, {RD::kToZero, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(ldexp(1.0f, -25)), 0x1, {RD::kToPositiveInfinity}}, + {static_cast(-ldexp(1.0f, -25)), 0x8000, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNearestEven}}, + {static_cast(-ldexp(1.0f, -25)), 0x8001, {RD::kToNegativeInfinity}}, + {static_cast(ldexp(1.0f, -24)), 0x1, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + + // Overflow + {static_cast(ldexp(1.0f, 16)), positive_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(ldexp(1.0f, 18)), positive_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(ldexp(1.3f, 16)), positive_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(-ldexp(1.0f, 16)), negative_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(-ldexp(1.0f, 18)), negative_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {static_cast(-ldexp(1.3f, 16)), negative_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + + // Transfer of Infinities + {std::numeric_limits::infinity(), positive_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + {-std::numeric_limits::infinity(), negative_infinity, {RD::kToZero, RD::kToPositiveInfinity, RD::kToNegativeInfinity, RD::kToNearestEven}}, + + // Nans are below because we cannot test for equality. + })),); + +struct UpCastCase{ + uint16_t source_half; + float expected_float; +}; + +using HexFloatFP16To32Tests = ::testing::TestWithParam; +TEST_P(HexFloatFP16To32Tests, WideningCasts) { + using HF = spvutils::HexFloat>; + using HF16 = spvutils::HexFloat>; + HF16 f(GetParam().source_half); + + spvutils::round_direction rounding[] = { + spvutils::round_direction::kToZero, + spvutils::round_direction::kToNearestEven, + spvutils::round_direction::kToPositiveInfinity, + spvutils::round_direction::kToNegativeInfinity}; + + // Everything fits, so everything should just be bit-shifts. + for (spvutils::round_direction round : rounding) { + HF flt(0.f); + f.castTo(flt, round); + EXPECT_EQ(GetParam().expected_float, flt.value().getAsFloat()) + << get_round_text(round) << " " << std::hex + << spvutils::BitwiseCast(GetParam().source_half) + << " cast to: " << flt.value().getAsFloat(); + } +} + +INSTANTIATE_TEST_CASE_P(F16ToF32, HexFloatFP16To32Tests, + ::testing::ValuesIn(std::vector( + { + {0x0000, 0.f}, + {0x8000, -0.f}, + {0x3C00, 1.0f}, + {0xBC00, -1.0f}, + {0x3F00, float_fractions({0, 1, 2})}, + {0xBF00, -float_fractions({0, 1, 2})}, + {0x3F01, float_fractions({0, 1, 2, 10})}, + {0xBF01, -float_fractions({0, 1, 2, 10})}, + + // denorm + {0x0001, static_cast(ldexp(1.0, -24))}, + {0x0002, static_cast(ldexp(1.0, -23))}, + {0x8001, static_cast(-ldexp(1.0, -24))}, + {0x8011, static_cast(-ldexp(1.0, -20) + -ldexp(1.0, -24))}, + + // inf + {0x7C00, std::numeric_limits::infinity()}, + {0xFC00, -std::numeric_limits::infinity()}, + })),); + +TEST(HexFloatOperationTests, NanTests) { + using HF = spvutils::HexFloat>; + using HF16 = spvutils::HexFloat>; + spvutils::round_direction rounding[] = { + spvutils::round_direction::kToZero, + spvutils::round_direction::kToNearestEven, + spvutils::round_direction::kToPositiveInfinity, + spvutils::round_direction::kToNegativeInfinity}; + + // Everything fits, so everything should just be bit-shifts. + for (spvutils::round_direction round : rounding) { + HF16 f16(0); + HF f(0.f); + HF(std::numeric_limits::quiet_NaN()).castTo(f16, round); + EXPECT_TRUE(f16.value().isNan()); + HF(std::numeric_limits::signaling_NaN()).castTo(f16, round); + EXPECT_TRUE(f16.value().isNan()); + + HF16(0x7C01).castTo(f, round); + EXPECT_TRUE(f.value().isNan()); + HF16(0x7C11).castTo(f, round); + EXPECT_TRUE(f.value().isNan()); + HF16(0xFC01).castTo(f, round); + EXPECT_TRUE(f.value().isNan()); + HF16(0x7C10).castTo(f, round); + EXPECT_TRUE(f.value().isNan()); + HF16(0xFF00).castTo(f, round); + EXPECT_TRUE(f.value().isNan()); + } +} + +// A test case for parsing good and bad HexFloat> literals. +template +struct FloatParseCase { + std::string literal; + bool negate_value; + bool expect_success; + HexFloat> expected_value; +}; + +using ParseNormalFloatTest = ::testing::TestWithParam>; + +TEST_P(ParseNormalFloatTest, Samples) { + std::stringstream input(GetParam().literal); + HexFloat> parsed_value(0.0f); + ParseNormalFloat(input, GetParam().negate_value, parsed_value); + EXPECT_NE(GetParam().expect_success, input.fail()) + << " literal: " << GetParam().literal + << " negate: " << GetParam().negate_value; + if (GetParam().expect_success) { + EXPECT_THAT(parsed_value.value(), Eq(GetParam().expected_value.value())) + << " literal: " << GetParam().literal + << " negate: " << GetParam().negate_value; + } +} + +// Returns a FloatParseCase with expected failure. +template +FloatParseCase BadFloatParseCase(std::string literal, bool negate_value, + T expected_value) { + HexFloat> proxy_expected_value(expected_value); + return FloatParseCase{literal, negate_value, false, proxy_expected_value}; +} + +// Returns a FloatParseCase that should successfully parse to a given value. +template +FloatParseCase GoodFloatParseCase(std::string literal, bool negate_value, + T expected_value) { + HexFloat> proxy_expected_value(expected_value); + return FloatParseCase{literal, negate_value, true, proxy_expected_value}; +} + +INSTANTIATE_TEST_CASE_P( + FloatParse, ParseNormalFloatTest, + ::testing::ValuesIn(std::vector>{ + // Failing cases due to trivially incorrect syntax. + BadFloatParseCase("abc", false, 0.0f), + BadFloatParseCase("abc", true, 0.0f), + + // Valid cases. + GoodFloatParseCase("0", false, 0.0f), + GoodFloatParseCase("0.0", false, 0.0f), + GoodFloatParseCase("-0.0", false, -0.0f), + GoodFloatParseCase("2.0", false, 2.0f), + GoodFloatParseCase("-2.0", false, -2.0f), + GoodFloatParseCase("+2.0", false, 2.0f), + // Cases with negate_value being true. + GoodFloatParseCase("0.0", true, -0.0f), + GoodFloatParseCase("2.0", true, -2.0f), + + // When negate_value is true, we should not accept a + // leading minus or plus. + BadFloatParseCase("-0.0", true, 0.0f), + BadFloatParseCase("-2.0", true, 0.0f), + BadFloatParseCase("+0.0", true, 0.0f), + BadFloatParseCase("+2.0", true, 0.0f), + + // Overflow is an error for 32-bit float parsing. + BadFloatParseCase("1e40", false, FLT_MAX), + BadFloatParseCase("1e40", true, -FLT_MAX), + BadFloatParseCase("-1e40", false, -FLT_MAX), + // We can't have -1e40 and negate_value == true since + // that represents an original case of "--1e40" which + // is invalid. + }),); + +using ParseNormalFloat16Test = + ::testing::TestWithParam>; + +TEST_P(ParseNormalFloat16Test, Samples) { + std::stringstream input(GetParam().literal); + HexFloat> parsed_value(0); + ParseNormalFloat(input, GetParam().negate_value, parsed_value); + EXPECT_NE(GetParam().expect_success, input.fail()) + << " literal: " << GetParam().literal + << " negate: " << GetParam().negate_value; + if (GetParam().expect_success) { + EXPECT_THAT(parsed_value.value(), Eq(GetParam().expected_value.value())) + << " literal: " << GetParam().literal + << " negate: " << GetParam().negate_value; + } +} + +INSTANTIATE_TEST_CASE_P( + Float16Parse, ParseNormalFloat16Test, + ::testing::ValuesIn(std::vector>{ + // Failing cases due to trivially incorrect syntax. + BadFloatParseCase("abc", false, uint16_t{0}), + BadFloatParseCase("abc", true, uint16_t{0}), + + // Valid cases. + GoodFloatParseCase("0", false, uint16_t{0}), + GoodFloatParseCase("0.0", false, uint16_t{0}), + GoodFloatParseCase("-0.0", false, uint16_t{0x8000}), + GoodFloatParseCase("2.0", false, uint16_t{0x4000}), + GoodFloatParseCase("-2.0", false, uint16_t{0xc000}), + GoodFloatParseCase("+2.0", false, uint16_t{0x4000}), + // Cases with negate_value being true. + GoodFloatParseCase("0.0", true, uint16_t{0x8000}), + GoodFloatParseCase("2.0", true, uint16_t{0xc000}), + + // When negate_value is true, we should not accept a leading minus or + // plus. + BadFloatParseCase("-0.0", true, uint16_t{0}), + BadFloatParseCase("-2.0", true, uint16_t{0}), + BadFloatParseCase("+0.0", true, uint16_t{0}), + BadFloatParseCase("+2.0", true, uint16_t{0}), + }),); + +// A test case for detecting infinities. +template +struct OverflowParseCase { + std::string input; + bool expect_success; + T expected_value; +}; + +using FloatProxyParseOverflowFloatTest = + ::testing::TestWithParam>; + +TEST_P(FloatProxyParseOverflowFloatTest, Sample) { + std::istringstream input(GetParam().input); + HexFloat> value(0.0f); + input >> value; + EXPECT_NE(GetParam().expect_success, input.fail()); + if (GetParam().expect_success) { + EXPECT_THAT(value.value().getAsFloat(), GetParam().expected_value); + } +} + +INSTANTIATE_TEST_CASE_P( + FloatOverflow, FloatProxyParseOverflowFloatTest, + ::testing::ValuesIn(std::vector>({ + {"0", true, 0.0f}, + {"0.0", true, 0.0f}, + {"1.0", true, 1.0f}, + {"1e38", true, 1e38f}, + {"-1e38", true, -1e38f}, + {"1e40", false, FLT_MAX}, + {"-1e40", false, -FLT_MAX}, + {"1e400", false, FLT_MAX}, + {"-1e400", false, -FLT_MAX}, + })),); + +using FloatProxyParseOverflowDoubleTest = + ::testing::TestWithParam>; + +TEST_P(FloatProxyParseOverflowDoubleTest, Sample) { + std::istringstream input(GetParam().input); + HexFloat> value(0.0); + input >> value; + EXPECT_NE(GetParam().expect_success, input.fail()); + if (GetParam().expect_success) { + EXPECT_THAT(value.value().getAsFloat(), Eq(GetParam().expected_value)); + } +} + +INSTANTIATE_TEST_CASE_P( + DoubleOverflow, FloatProxyParseOverflowDoubleTest, + ::testing::ValuesIn(std::vector>({ + {"0", true, 0.0}, + {"0.0", true, 0.0}, + {"1.0", true, 1.0}, + {"1e38", true, 1e38}, + {"-1e38", true, -1e38}, + {"1e40", true, 1e40}, + {"-1e40", true, -1e40}, + {"1e400", false, DBL_MAX}, + {"-1e400", false, -DBL_MAX}, + })),); + +using FloatProxyParseOverflowFloat16Test = + ::testing::TestWithParam>; + +TEST_P(FloatProxyParseOverflowFloat16Test, Sample) { + std::istringstream input(GetParam().input); + HexFloat> value(0); + input >> value; + EXPECT_NE(GetParam().expect_success, input.fail()) << " literal: " + << GetParam().input; + if (GetParam().expect_success) { + EXPECT_THAT(value.value().data(), Eq(GetParam().expected_value)) + << " literal: " << GetParam().input; + } +} + +INSTANTIATE_TEST_CASE_P( + Float16Overflow, FloatProxyParseOverflowFloat16Test, + ::testing::ValuesIn(std::vector>({ + {"0", true, uint16_t{0}}, + {"0.0", true, uint16_t{0}}, + {"1.0", true, uint16_t{0x3c00}}, + // Overflow for 16-bit float is an error, and returns max or + // lowest value. + {"1e38", false, uint16_t{0x7bff}}, + {"1e40", false, uint16_t{0x7bff}}, + {"1e400", false, uint16_t{0x7bff}}, + {"-1e38", false, uint16_t{0xfbff}}, + {"-1e40", false, uint16_t{0xfbff}}, + {"-1e400", false, uint16_t{0xfbff}}, + })),); + +TEST(FloatProxy, Max) { + EXPECT_THAT(FloatProxy::max().getAsFloat().get_value(), + Eq(uint16_t{0x7bff})); + EXPECT_THAT(FloatProxy::max().getAsFloat(), + Eq(std::numeric_limits::max())); + EXPECT_THAT(FloatProxy::max().getAsFloat(), + Eq(std::numeric_limits::max())); +} + +TEST(FloatProxy, Lowest) { + EXPECT_THAT(FloatProxy::lowest().getAsFloat().get_value(), + Eq(uint16_t{0xfbff})); + EXPECT_THAT(FloatProxy::lowest().getAsFloat(), + Eq(std::numeric_limits::lowest())); + EXPECT_THAT(FloatProxy::lowest().getAsFloat(), + Eq(std::numeric_limits::lowest())); +} + +// TODO(awoloszyn): Add fp16 tests and HexFloatTraits. +} // anonymous namespace diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp index 749daa0..25caa7e 100644 --- a/gtests/Spv.FromFile.cpp +++ b/gtests/Spv.FromFile.cpp @@ -67,6 +67,9 @@ using OpenGLSemantics = GlslangTest<::testing::TestWithParam>; using VulkanAstSemantics = GlslangTest<::testing::TestWithParam>; using HlslIoMap = GlslangTest<::testing::TestWithParam>; using GlslIoMap = GlslangTest<::testing::TestWithParam>; +#ifdef AMD_EXTENSIONS +using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam>; +#endif // Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully // generate SPIR-V. @@ -138,6 +141,17 @@ TEST_P(GlslIoMap, FromFile) GetParam().flattenUniforms); } +#ifdef AMD_EXTENSIONS +// Compiling GLSL to SPIR-V under Vulkan semantics (AMD extensions enabled). +// Expected to successfully generate SPIR-V. +TEST_P(CompileVulkanToSpirvTestAMD, FromFile) +{ + loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(), + Source::GLSL, Semantics::Vulkan, + Target::Spv); +} +#endif + // clang-format off INSTANTIATE_TEST_CASE_P( Glsl, CompileVulkanToSpirvTest, @@ -324,6 +338,16 @@ INSTANTIATE_TEST_CASE_P( })), FileNameAsCustomTestSuffix ); + +#ifdef AMD_EXTENSIONS +INSTANTIATE_TEST_CASE_P( + Glsl, CompileVulkanToSpirvTestAMD, + ::testing::ValuesIn(std::vector({ + "spv.float16.frag", + })), + FileNameAsCustomTestSuffix +); +#endif // clang-format on } // anonymous namespace -- 2.7.4