glsl_parser.h revision 10e230b6
110e230b6Smaya/* A Bison parser, made by GNU Bison 3.2.4. */ 210e230b6Smaya 310e230b6Smaya/* Bison interface for Yacc-like parsers in C 410e230b6Smaya 510e230b6Smaya Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. 610e230b6Smaya 710e230b6Smaya This program is free software: you can redistribute it and/or modify 810e230b6Smaya it under the terms of the GNU General Public License as published by 910e230b6Smaya the Free Software Foundation, either version 3 of the License, or 1010e230b6Smaya (at your option) any later version. 1110e230b6Smaya 1210e230b6Smaya This program is distributed in the hope that it will be useful, 1310e230b6Smaya but WITHOUT ANY WARRANTY; without even the implied warranty of 1410e230b6Smaya MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1510e230b6Smaya GNU General Public License for more details. 1610e230b6Smaya 1710e230b6Smaya You should have received a copy of the GNU General Public License 1810e230b6Smaya along with this program. If not, see <http://www.gnu.org/licenses/>. */ 1910e230b6Smaya 2010e230b6Smaya/* As a special exception, you may create a larger work that contains 2110e230b6Smaya part or all of the Bison parser skeleton and distribute that work 2210e230b6Smaya under terms of your choice, so long as that work isn't itself a 2310e230b6Smaya parser generator using the skeleton or a modified version thereof 2410e230b6Smaya as a parser skeleton. Alternatively, if you modify or redistribute 2510e230b6Smaya the parser skeleton itself, you may (at your option) remove this 2610e230b6Smaya special exception, which will cause the skeleton and the resulting 2710e230b6Smaya Bison output files to be licensed under the GNU General Public 2810e230b6Smaya License without this special exception. 2910e230b6Smaya 3010e230b6Smaya This special exception was added by the Free Software Foundation in 3110e230b6Smaya version 2.2 of Bison. */ 3210e230b6Smaya 3310e230b6Smaya/* Undocumented macros, especially those whose name start with YY_, 3410e230b6Smaya are private implementation details. Do not rely on them. */ 3510e230b6Smaya 3610e230b6Smaya#ifndef YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED 3710e230b6Smaya# define YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED 3810e230b6Smaya/* Debug traces. */ 3910e230b6Smaya#ifndef YYDEBUG 4010e230b6Smaya# define YYDEBUG 0 4110e230b6Smaya#endif 4210e230b6Smaya#if YYDEBUG 4310e230b6Smayaextern int _mesa_glsl_debug; 4410e230b6Smaya#endif 4510e230b6Smaya 4610e230b6Smaya/* Token type. */ 4710e230b6Smaya#ifndef YYTOKENTYPE 4810e230b6Smaya# define YYTOKENTYPE 4910e230b6Smaya enum yytokentype 5010e230b6Smaya { 5110e230b6Smaya ATTRIBUTE = 258, 5210e230b6Smaya CONST_TOK = 259, 5310e230b6Smaya BASIC_TYPE_TOK = 260, 5410e230b6Smaya BREAK = 261, 5510e230b6Smaya BUFFER = 262, 5610e230b6Smaya CONTINUE = 263, 5710e230b6Smaya DO = 264, 5810e230b6Smaya ELSE = 265, 5910e230b6Smaya FOR = 266, 6010e230b6Smaya IF = 267, 6110e230b6Smaya DISCARD = 268, 6210e230b6Smaya RETURN = 269, 6310e230b6Smaya SWITCH = 270, 6410e230b6Smaya CASE = 271, 6510e230b6Smaya DEFAULT = 272, 6610e230b6Smaya CENTROID = 273, 6710e230b6Smaya IN_TOK = 274, 6810e230b6Smaya OUT_TOK = 275, 6910e230b6Smaya INOUT_TOK = 276, 7010e230b6Smaya UNIFORM = 277, 7110e230b6Smaya VARYING = 278, 7210e230b6Smaya SAMPLE = 279, 7310e230b6Smaya NOPERSPECTIVE = 280, 7410e230b6Smaya FLAT = 281, 7510e230b6Smaya SMOOTH = 282, 7610e230b6Smaya IMAGE1DSHADOW = 283, 7710e230b6Smaya IMAGE2DSHADOW = 284, 7810e230b6Smaya IMAGE1DARRAYSHADOW = 285, 7910e230b6Smaya IMAGE2DARRAYSHADOW = 286, 8010e230b6Smaya COHERENT = 287, 8110e230b6Smaya VOLATILE = 288, 8210e230b6Smaya RESTRICT = 289, 8310e230b6Smaya READONLY = 290, 8410e230b6Smaya WRITEONLY = 291, 8510e230b6Smaya SHARED = 292, 8610e230b6Smaya STRUCT = 293, 8710e230b6Smaya VOID_TOK = 294, 8810e230b6Smaya WHILE = 295, 8910e230b6Smaya IDENTIFIER = 296, 9010e230b6Smaya TYPE_IDENTIFIER = 297, 9110e230b6Smaya NEW_IDENTIFIER = 298, 9210e230b6Smaya FLOATCONSTANT = 299, 9310e230b6Smaya DOUBLECONSTANT = 300, 9410e230b6Smaya INTCONSTANT = 301, 9510e230b6Smaya UINTCONSTANT = 302, 9610e230b6Smaya BOOLCONSTANT = 303, 9710e230b6Smaya INT64CONSTANT = 304, 9810e230b6Smaya UINT64CONSTANT = 305, 9910e230b6Smaya FIELD_SELECTION = 306, 10010e230b6Smaya LEFT_OP = 307, 10110e230b6Smaya RIGHT_OP = 308, 10210e230b6Smaya INC_OP = 309, 10310e230b6Smaya DEC_OP = 310, 10410e230b6Smaya LE_OP = 311, 10510e230b6Smaya GE_OP = 312, 10610e230b6Smaya EQ_OP = 313, 10710e230b6Smaya NE_OP = 314, 10810e230b6Smaya AND_OP = 315, 10910e230b6Smaya OR_OP = 316, 11010e230b6Smaya XOR_OP = 317, 11110e230b6Smaya MUL_ASSIGN = 318, 11210e230b6Smaya DIV_ASSIGN = 319, 11310e230b6Smaya ADD_ASSIGN = 320, 11410e230b6Smaya MOD_ASSIGN = 321, 11510e230b6Smaya LEFT_ASSIGN = 322, 11610e230b6Smaya RIGHT_ASSIGN = 323, 11710e230b6Smaya AND_ASSIGN = 324, 11810e230b6Smaya XOR_ASSIGN = 325, 11910e230b6Smaya OR_ASSIGN = 326, 12010e230b6Smaya SUB_ASSIGN = 327, 12110e230b6Smaya INVARIANT = 328, 12210e230b6Smaya PRECISE = 329, 12310e230b6Smaya LOWP = 330, 12410e230b6Smaya MEDIUMP = 331, 12510e230b6Smaya HIGHP = 332, 12610e230b6Smaya SUPERP = 333, 12710e230b6Smaya PRECISION = 334, 12810e230b6Smaya VERSION_TOK = 335, 12910e230b6Smaya EXTENSION = 336, 13010e230b6Smaya LINE = 337, 13110e230b6Smaya COLON = 338, 13210e230b6Smaya EOL = 339, 13310e230b6Smaya INTERFACE = 340, 13410e230b6Smaya OUTPUT = 341, 13510e230b6Smaya PRAGMA_DEBUG_ON = 342, 13610e230b6Smaya PRAGMA_DEBUG_OFF = 343, 13710e230b6Smaya PRAGMA_OPTIMIZE_ON = 344, 13810e230b6Smaya PRAGMA_OPTIMIZE_OFF = 345, 13910e230b6Smaya PRAGMA_WARNING_ON = 346, 14010e230b6Smaya PRAGMA_WARNING_OFF = 347, 14110e230b6Smaya PRAGMA_INVARIANT_ALL = 348, 14210e230b6Smaya LAYOUT_TOK = 349, 14310e230b6Smaya DOT_TOK = 350, 14410e230b6Smaya ASM = 351, 14510e230b6Smaya CLASS = 352, 14610e230b6Smaya UNION = 353, 14710e230b6Smaya ENUM = 354, 14810e230b6Smaya TYPEDEF = 355, 14910e230b6Smaya TEMPLATE = 356, 15010e230b6Smaya THIS = 357, 15110e230b6Smaya PACKED_TOK = 358, 15210e230b6Smaya GOTO = 359, 15310e230b6Smaya INLINE_TOK = 360, 15410e230b6Smaya NOINLINE = 361, 15510e230b6Smaya PUBLIC_TOK = 362, 15610e230b6Smaya STATIC = 363, 15710e230b6Smaya EXTERN = 364, 15810e230b6Smaya EXTERNAL = 365, 15910e230b6Smaya LONG_TOK = 366, 16010e230b6Smaya SHORT_TOK = 367, 16110e230b6Smaya HALF = 368, 16210e230b6Smaya FIXED_TOK = 369, 16310e230b6Smaya UNSIGNED = 370, 16410e230b6Smaya INPUT_TOK = 371, 16510e230b6Smaya HVEC2 = 372, 16610e230b6Smaya HVEC3 = 373, 16710e230b6Smaya HVEC4 = 374, 16810e230b6Smaya FVEC2 = 375, 16910e230b6Smaya FVEC3 = 376, 17010e230b6Smaya FVEC4 = 377, 17110e230b6Smaya SAMPLER3DRECT = 378, 17210e230b6Smaya SIZEOF = 379, 17310e230b6Smaya CAST = 380, 17410e230b6Smaya NAMESPACE = 381, 17510e230b6Smaya USING = 382, 17610e230b6Smaya RESOURCE = 383, 17710e230b6Smaya PATCH = 384, 17810e230b6Smaya SUBROUTINE = 385, 17910e230b6Smaya ERROR_TOK = 386, 18010e230b6Smaya COMMON = 387, 18110e230b6Smaya PARTITION = 388, 18210e230b6Smaya ACTIVE = 389, 18310e230b6Smaya FILTER = 390, 18410e230b6Smaya ROW_MAJOR = 391, 18510e230b6Smaya THEN = 392 18610e230b6Smaya }; 18710e230b6Smaya#endif 18810e230b6Smaya 18910e230b6Smaya/* Value type. */ 19010e230b6Smaya#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 19110e230b6Smaya 19210e230b6Smayaunion YYSTYPE 19310e230b6Smaya{ 19410e230b6Smaya#line 98 "../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1906 */ 19510e230b6Smaya 19610e230b6Smaya int n; 19710e230b6Smaya int64_t n64; 19810e230b6Smaya float real; 19910e230b6Smaya double dreal; 20010e230b6Smaya const char *identifier; 20110e230b6Smaya 20210e230b6Smaya struct ast_type_qualifier type_qualifier; 20310e230b6Smaya 20410e230b6Smaya ast_node *node; 20510e230b6Smaya ast_type_specifier *type_specifier; 20610e230b6Smaya ast_array_specifier *array_specifier; 20710e230b6Smaya ast_fully_specified_type *fully_specified_type; 20810e230b6Smaya ast_function *function; 20910e230b6Smaya ast_parameter_declarator *parameter_declarator; 21010e230b6Smaya ast_function_definition *function_definition; 21110e230b6Smaya ast_compound_statement *compound_statement; 21210e230b6Smaya ast_expression *expression; 21310e230b6Smaya ast_declarator_list *declarator_list; 21410e230b6Smaya ast_struct_specifier *struct_specifier; 21510e230b6Smaya ast_declaration *declaration; 21610e230b6Smaya ast_switch_body *switch_body; 21710e230b6Smaya ast_case_label *case_label; 21810e230b6Smaya ast_case_label_list *case_label_list; 21910e230b6Smaya ast_case_statement *case_statement; 22010e230b6Smaya ast_case_statement_list *case_statement_list; 22110e230b6Smaya ast_interface_block *interface_block; 22210e230b6Smaya ast_subroutine_list *subroutine_list; 22310e230b6Smaya struct { 22410e230b6Smaya ast_node *cond; 22510e230b6Smaya ast_expression *rest; 22610e230b6Smaya } for_rest_statement; 22710e230b6Smaya 22810e230b6Smaya struct { 22910e230b6Smaya ast_node *then_statement; 23010e230b6Smaya ast_node *else_statement; 23110e230b6Smaya } selection_rest_statement; 23210e230b6Smaya 23310e230b6Smaya const glsl_type *type; 23410e230b6Smaya 23510e230b6Smaya#line 236 "src/compiler/glsl/glsl_parser.h" /* yacc.c:1906 */ 23610e230b6Smaya}; 23710e230b6Smaya 23810e230b6Smayatypedef union YYSTYPE YYSTYPE; 23910e230b6Smaya# define YYSTYPE_IS_TRIVIAL 1 24010e230b6Smaya# define YYSTYPE_IS_DECLARED 1 24110e230b6Smaya#endif 24210e230b6Smaya 24310e230b6Smaya/* Location type. */ 24410e230b6Smaya#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 24510e230b6Smayatypedef struct YYLTYPE YYLTYPE; 24610e230b6Smayastruct YYLTYPE 24710e230b6Smaya{ 24810e230b6Smaya int first_line; 24910e230b6Smaya int first_column; 25010e230b6Smaya int last_line; 25110e230b6Smaya int last_column; 25210e230b6Smaya}; 25310e230b6Smaya# define YYLTYPE_IS_DECLARED 1 25410e230b6Smaya# define YYLTYPE_IS_TRIVIAL 1 25510e230b6Smaya#endif 25610e230b6Smaya 25710e230b6Smaya 25810e230b6Smaya 25910e230b6Smayaint _mesa_glsl_parse (struct _mesa_glsl_parse_state *state); 26010e230b6Smaya 26110e230b6Smaya#endif /* !YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED */ 262