glsl_parser.h revision 96c5ddc4
196c5ddc4Srjs/* A Bison parser, made by GNU Bison 3.7.4. */ 210e230b6Smaya 310e230b6Smaya/* Bison interface for Yacc-like parsers in C 410e230b6Smaya 596c5ddc4Srjs Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, 696c5ddc4Srjs Inc. 710e230b6Smaya 810e230b6Smaya This program is free software: you can redistribute it and/or modify 910e230b6Smaya it under the terms of the GNU General Public License as published by 1010e230b6Smaya the Free Software Foundation, either version 3 of the License, or 1110e230b6Smaya (at your option) any later version. 1210e230b6Smaya 1310e230b6Smaya This program is distributed in the hope that it will be useful, 1410e230b6Smaya but WITHOUT ANY WARRANTY; without even the implied warranty of 1510e230b6Smaya MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1610e230b6Smaya GNU General Public License for more details. 1710e230b6Smaya 1810e230b6Smaya You should have received a copy of the GNU General Public License 1910e230b6Smaya along with this program. If not, see <http://www.gnu.org/licenses/>. */ 2010e230b6Smaya 2110e230b6Smaya/* As a special exception, you may create a larger work that contains 2210e230b6Smaya part or all of the Bison parser skeleton and distribute that work 2310e230b6Smaya under terms of your choice, so long as that work isn't itself a 2410e230b6Smaya parser generator using the skeleton or a modified version thereof 2510e230b6Smaya as a parser skeleton. Alternatively, if you modify or redistribute 2610e230b6Smaya the parser skeleton itself, you may (at your option) remove this 2710e230b6Smaya special exception, which will cause the skeleton and the resulting 2810e230b6Smaya Bison output files to be licensed under the GNU General Public 2910e230b6Smaya License without this special exception. 3010e230b6Smaya 3110e230b6Smaya This special exception was added by the Free Software Foundation in 3210e230b6Smaya version 2.2 of Bison. */ 3310e230b6Smaya 3496c5ddc4Srjs/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, 3596c5ddc4Srjs especially those whose name start with YY_ or yy_. They are 3696c5ddc4Srjs private implementation details that can be changed or removed. */ 3710e230b6Smaya 3810e230b6Smaya#ifndef YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED 3910e230b6Smaya# define YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED 4010e230b6Smaya/* Debug traces. */ 4110e230b6Smaya#ifndef YYDEBUG 4210e230b6Smaya# define YYDEBUG 0 4310e230b6Smaya#endif 4410e230b6Smaya#if YYDEBUG 4510e230b6Smayaextern int _mesa_glsl_debug; 4610e230b6Smaya#endif 4710e230b6Smaya 4896c5ddc4Srjs/* Token kinds. */ 4910e230b6Smaya#ifndef YYTOKENTYPE 5010e230b6Smaya# define YYTOKENTYPE 5110e230b6Smaya enum yytokentype 5210e230b6Smaya { 5396c5ddc4Srjs YYEMPTY = -2, 5496c5ddc4Srjs YYEOF = 0, /* "end of file" */ 5596c5ddc4Srjs YYerror = 256, /* error */ 5696c5ddc4Srjs YYUNDEF = 257, /* "invalid token" */ 5796c5ddc4Srjs ATTRIBUTE = 258, /* ATTRIBUTE */ 5896c5ddc4Srjs CONST_TOK = 259, /* CONST_TOK */ 5996c5ddc4Srjs BASIC_TYPE_TOK = 260, /* BASIC_TYPE_TOK */ 6096c5ddc4Srjs BREAK = 261, /* BREAK */ 6196c5ddc4Srjs BUFFER = 262, /* BUFFER */ 6296c5ddc4Srjs CONTINUE = 263, /* CONTINUE */ 6396c5ddc4Srjs DO = 264, /* DO */ 6496c5ddc4Srjs ELSE = 265, /* ELSE */ 6596c5ddc4Srjs FOR = 266, /* FOR */ 6696c5ddc4Srjs IF = 267, /* IF */ 6796c5ddc4Srjs DEMOTE = 268, /* DEMOTE */ 6896c5ddc4Srjs DISCARD = 269, /* DISCARD */ 6996c5ddc4Srjs RETURN = 270, /* RETURN */ 7096c5ddc4Srjs SWITCH = 271, /* SWITCH */ 7196c5ddc4Srjs CASE = 272, /* CASE */ 7296c5ddc4Srjs DEFAULT = 273, /* DEFAULT */ 7396c5ddc4Srjs CENTROID = 274, /* CENTROID */ 7496c5ddc4Srjs IN_TOK = 275, /* IN_TOK */ 7596c5ddc4Srjs OUT_TOK = 276, /* OUT_TOK */ 7696c5ddc4Srjs INOUT_TOK = 277, /* INOUT_TOK */ 7796c5ddc4Srjs UNIFORM = 278, /* UNIFORM */ 7896c5ddc4Srjs VARYING = 279, /* VARYING */ 7996c5ddc4Srjs SAMPLE = 280, /* SAMPLE */ 8096c5ddc4Srjs NOPERSPECTIVE = 281, /* NOPERSPECTIVE */ 8196c5ddc4Srjs FLAT = 282, /* FLAT */ 8296c5ddc4Srjs SMOOTH = 283, /* SMOOTH */ 8396c5ddc4Srjs IMAGE1DSHADOW = 284, /* IMAGE1DSHADOW */ 8496c5ddc4Srjs IMAGE2DSHADOW = 285, /* IMAGE2DSHADOW */ 8596c5ddc4Srjs IMAGE1DARRAYSHADOW = 286, /* IMAGE1DARRAYSHADOW */ 8696c5ddc4Srjs IMAGE2DARRAYSHADOW = 287, /* IMAGE2DARRAYSHADOW */ 8796c5ddc4Srjs COHERENT = 288, /* COHERENT */ 8896c5ddc4Srjs VOLATILE = 289, /* VOLATILE */ 8996c5ddc4Srjs RESTRICT = 290, /* RESTRICT */ 9096c5ddc4Srjs READONLY = 291, /* READONLY */ 9196c5ddc4Srjs WRITEONLY = 292, /* WRITEONLY */ 9296c5ddc4Srjs SHARED = 293, /* SHARED */ 9396c5ddc4Srjs STRUCT = 294, /* STRUCT */ 9496c5ddc4Srjs VOID_TOK = 295, /* VOID_TOK */ 9596c5ddc4Srjs WHILE = 296, /* WHILE */ 9696c5ddc4Srjs IDENTIFIER = 297, /* IDENTIFIER */ 9796c5ddc4Srjs TYPE_IDENTIFIER = 298, /* TYPE_IDENTIFIER */ 9896c5ddc4Srjs NEW_IDENTIFIER = 299, /* NEW_IDENTIFIER */ 9996c5ddc4Srjs FLOATCONSTANT = 300, /* FLOATCONSTANT */ 10096c5ddc4Srjs DOUBLECONSTANT = 301, /* DOUBLECONSTANT */ 10196c5ddc4Srjs INTCONSTANT = 302, /* INTCONSTANT */ 10296c5ddc4Srjs UINTCONSTANT = 303, /* UINTCONSTANT */ 10396c5ddc4Srjs BOOLCONSTANT = 304, /* BOOLCONSTANT */ 10496c5ddc4Srjs INT64CONSTANT = 305, /* INT64CONSTANT */ 10596c5ddc4Srjs UINT64CONSTANT = 306, /* UINT64CONSTANT */ 10696c5ddc4Srjs FIELD_SELECTION = 307, /* FIELD_SELECTION */ 10796c5ddc4Srjs LEFT_OP = 308, /* LEFT_OP */ 10896c5ddc4Srjs RIGHT_OP = 309, /* RIGHT_OP */ 10996c5ddc4Srjs INC_OP = 310, /* INC_OP */ 11096c5ddc4Srjs DEC_OP = 311, /* DEC_OP */ 11196c5ddc4Srjs LE_OP = 312, /* LE_OP */ 11296c5ddc4Srjs GE_OP = 313, /* GE_OP */ 11396c5ddc4Srjs EQ_OP = 314, /* EQ_OP */ 11496c5ddc4Srjs NE_OP = 315, /* NE_OP */ 11596c5ddc4Srjs AND_OP = 316, /* AND_OP */ 11696c5ddc4Srjs OR_OP = 317, /* OR_OP */ 11796c5ddc4Srjs XOR_OP = 318, /* XOR_OP */ 11896c5ddc4Srjs MUL_ASSIGN = 319, /* MUL_ASSIGN */ 11996c5ddc4Srjs DIV_ASSIGN = 320, /* DIV_ASSIGN */ 12096c5ddc4Srjs ADD_ASSIGN = 321, /* ADD_ASSIGN */ 12196c5ddc4Srjs MOD_ASSIGN = 322, /* MOD_ASSIGN */ 12296c5ddc4Srjs LEFT_ASSIGN = 323, /* LEFT_ASSIGN */ 12396c5ddc4Srjs RIGHT_ASSIGN = 324, /* RIGHT_ASSIGN */ 12496c5ddc4Srjs AND_ASSIGN = 325, /* AND_ASSIGN */ 12596c5ddc4Srjs XOR_ASSIGN = 326, /* XOR_ASSIGN */ 12696c5ddc4Srjs OR_ASSIGN = 327, /* OR_ASSIGN */ 12796c5ddc4Srjs SUB_ASSIGN = 328, /* SUB_ASSIGN */ 12896c5ddc4Srjs INVARIANT = 329, /* INVARIANT */ 12996c5ddc4Srjs PRECISE = 330, /* PRECISE */ 13096c5ddc4Srjs LOWP = 331, /* LOWP */ 13196c5ddc4Srjs MEDIUMP = 332, /* MEDIUMP */ 13296c5ddc4Srjs HIGHP = 333, /* HIGHP */ 13396c5ddc4Srjs SUPERP = 334, /* SUPERP */ 13496c5ddc4Srjs PRECISION = 335, /* PRECISION */ 13596c5ddc4Srjs VERSION_TOK = 336, /* VERSION_TOK */ 13696c5ddc4Srjs EXTENSION = 337, /* EXTENSION */ 13796c5ddc4Srjs LINE = 338, /* LINE */ 13896c5ddc4Srjs COLON = 339, /* COLON */ 13996c5ddc4Srjs EOL = 340, /* EOL */ 14096c5ddc4Srjs INTERFACE_TOK = 341, /* INTERFACE_TOK */ 14196c5ddc4Srjs OUTPUT = 342, /* OUTPUT */ 14296c5ddc4Srjs PRAGMA_DEBUG_ON = 343, /* PRAGMA_DEBUG_ON */ 14396c5ddc4Srjs PRAGMA_DEBUG_OFF = 344, /* PRAGMA_DEBUG_OFF */ 14496c5ddc4Srjs PRAGMA_OPTIMIZE_ON = 345, /* PRAGMA_OPTIMIZE_ON */ 14596c5ddc4Srjs PRAGMA_OPTIMIZE_OFF = 346, /* PRAGMA_OPTIMIZE_OFF */ 14696c5ddc4Srjs PRAGMA_WARNING_ON = 347, /* PRAGMA_WARNING_ON */ 14796c5ddc4Srjs PRAGMA_WARNING_OFF = 348, /* PRAGMA_WARNING_OFF */ 14896c5ddc4Srjs PRAGMA_INVARIANT_ALL = 349, /* PRAGMA_INVARIANT_ALL */ 14996c5ddc4Srjs LAYOUT_TOK = 350, /* LAYOUT_TOK */ 15096c5ddc4Srjs DOT_TOK = 351, /* DOT_TOK */ 15196c5ddc4Srjs ASM = 352, /* ASM */ 15296c5ddc4Srjs CLASS = 353, /* CLASS */ 15396c5ddc4Srjs UNION = 354, /* UNION */ 15496c5ddc4Srjs ENUM = 355, /* ENUM */ 15596c5ddc4Srjs TYPEDEF = 356, /* TYPEDEF */ 15696c5ddc4Srjs TEMPLATE = 357, /* TEMPLATE */ 15796c5ddc4Srjs THIS = 358, /* THIS */ 15896c5ddc4Srjs PACKED_TOK = 359, /* PACKED_TOK */ 15996c5ddc4Srjs GOTO = 360, /* GOTO */ 16096c5ddc4Srjs INLINE_TOK = 361, /* INLINE_TOK */ 16196c5ddc4Srjs NOINLINE = 362, /* NOINLINE */ 16296c5ddc4Srjs PUBLIC_TOK = 363, /* PUBLIC_TOK */ 16396c5ddc4Srjs STATIC = 364, /* STATIC */ 16496c5ddc4Srjs EXTERN = 365, /* EXTERN */ 16596c5ddc4Srjs EXTERNAL = 366, /* EXTERNAL */ 16696c5ddc4Srjs LONG_TOK = 367, /* LONG_TOK */ 16796c5ddc4Srjs SHORT_TOK = 368, /* SHORT_TOK */ 16896c5ddc4Srjs HALF = 369, /* HALF */ 16996c5ddc4Srjs FIXED_TOK = 370, /* FIXED_TOK */ 17096c5ddc4Srjs UNSIGNED = 371, /* UNSIGNED */ 17196c5ddc4Srjs INPUT_TOK = 372, /* INPUT_TOK */ 17296c5ddc4Srjs HVEC2 = 373, /* HVEC2 */ 17396c5ddc4Srjs HVEC3 = 374, /* HVEC3 */ 17496c5ddc4Srjs HVEC4 = 375, /* HVEC4 */ 17596c5ddc4Srjs FVEC2 = 376, /* FVEC2 */ 17696c5ddc4Srjs FVEC3 = 377, /* FVEC3 */ 17796c5ddc4Srjs FVEC4 = 378, /* FVEC4 */ 17896c5ddc4Srjs SAMPLER3DRECT = 379, /* SAMPLER3DRECT */ 17996c5ddc4Srjs SIZEOF = 380, /* SIZEOF */ 18096c5ddc4Srjs CAST = 381, /* CAST */ 18196c5ddc4Srjs NAMESPACE = 382, /* NAMESPACE */ 18296c5ddc4Srjs USING = 383, /* USING */ 18396c5ddc4Srjs RESOURCE = 384, /* RESOURCE */ 18496c5ddc4Srjs PATCH = 385, /* PATCH */ 18596c5ddc4Srjs SUBROUTINE = 386, /* SUBROUTINE */ 18696c5ddc4Srjs ERROR_TOK = 387, /* ERROR_TOK */ 18796c5ddc4Srjs COMMON = 388, /* COMMON */ 18896c5ddc4Srjs PARTITION = 389, /* PARTITION */ 18996c5ddc4Srjs ACTIVE = 390, /* ACTIVE */ 19096c5ddc4Srjs FILTER = 391, /* FILTER */ 19196c5ddc4Srjs ROW_MAJOR = 392, /* ROW_MAJOR */ 19296c5ddc4Srjs THEN = 393 /* THEN */ 19310e230b6Smaya }; 19496c5ddc4Srjs typedef enum yytokentype yytoken_kind_t; 19510e230b6Smaya#endif 19610e230b6Smaya 19710e230b6Smaya/* Value type. */ 19810e230b6Smaya#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 19910e230b6Smayaunion YYSTYPE 20010e230b6Smaya{ 20196c5ddc4Srjs#line 101 "../src/compiler/glsl/glsl_parser.yy" 20210e230b6Smaya 20310e230b6Smaya int n; 20410e230b6Smaya int64_t n64; 20510e230b6Smaya float real; 20610e230b6Smaya double dreal; 20710e230b6Smaya const char *identifier; 20810e230b6Smaya 20910e230b6Smaya struct ast_type_qualifier type_qualifier; 21010e230b6Smaya 21110e230b6Smaya ast_node *node; 21210e230b6Smaya ast_type_specifier *type_specifier; 21310e230b6Smaya ast_array_specifier *array_specifier; 21410e230b6Smaya ast_fully_specified_type *fully_specified_type; 21510e230b6Smaya ast_function *function; 21610e230b6Smaya ast_parameter_declarator *parameter_declarator; 21710e230b6Smaya ast_function_definition *function_definition; 21810e230b6Smaya ast_compound_statement *compound_statement; 21910e230b6Smaya ast_expression *expression; 22010e230b6Smaya ast_declarator_list *declarator_list; 22110e230b6Smaya ast_struct_specifier *struct_specifier; 22210e230b6Smaya ast_declaration *declaration; 22310e230b6Smaya ast_switch_body *switch_body; 22410e230b6Smaya ast_case_label *case_label; 22510e230b6Smaya ast_case_label_list *case_label_list; 22610e230b6Smaya ast_case_statement *case_statement; 22710e230b6Smaya ast_case_statement_list *case_statement_list; 22810e230b6Smaya ast_interface_block *interface_block; 22910e230b6Smaya ast_subroutine_list *subroutine_list; 23010e230b6Smaya struct { 23110e230b6Smaya ast_node *cond; 23210e230b6Smaya ast_expression *rest; 23310e230b6Smaya } for_rest_statement; 23410e230b6Smaya 23510e230b6Smaya struct { 23610e230b6Smaya ast_node *then_statement; 23710e230b6Smaya ast_node *else_statement; 23810e230b6Smaya } selection_rest_statement; 23910e230b6Smaya 24010e230b6Smaya const glsl_type *type; 24110e230b6Smaya 24296c5ddc4Srjs#line 243 "src/compiler/glsl/glsl_parser.h" 24310e230b6Smaya 24496c5ddc4Srjs}; 24510e230b6Smayatypedef union YYSTYPE YYSTYPE; 24610e230b6Smaya# define YYSTYPE_IS_TRIVIAL 1 24710e230b6Smaya# define YYSTYPE_IS_DECLARED 1 24810e230b6Smaya#endif 24910e230b6Smaya 25010e230b6Smaya/* Location type. */ 25110e230b6Smaya#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 25210e230b6Smayatypedef struct YYLTYPE YYLTYPE; 25310e230b6Smayastruct YYLTYPE 25410e230b6Smaya{ 25510e230b6Smaya int first_line; 25610e230b6Smaya int first_column; 25710e230b6Smaya int last_line; 25810e230b6Smaya int last_column; 25910e230b6Smaya}; 26010e230b6Smaya# define YYLTYPE_IS_DECLARED 1 26110e230b6Smaya# define YYLTYPE_IS_TRIVIAL 1 26210e230b6Smaya#endif 26310e230b6Smaya 26410e230b6Smaya 26510e230b6Smaya 26610e230b6Smayaint _mesa_glsl_parse (struct _mesa_glsl_parse_state *state); 26710e230b6Smaya 26810e230b6Smaya#endif /* !YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED */ 269