1/* A Bison parser, made by GNU Bison 3.2.4.  */
2
3/* Bison interface for Yacc-like parsers in C
4
5   Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
6
7   This program is free software: you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20/* As a special exception, you may create a larger work that contains
21   part or all of the Bison parser skeleton and distribute that work
22   under terms of your choice, so long as that work isn't itself a
23   parser generator using the skeleton or a modified version thereof
24   as a parser skeleton.  Alternatively, if you modify or redistribute
25   the parser skeleton itself, you may (at your option) remove this
26   special exception, which will cause the skeleton and the resulting
27   Bison output files to be licensed under the GNU General Public
28   License without this special exception.
29
30   This special exception was added by the Free Software Foundation in
31   version 2.2 of Bison.  */
32
33/* Undocumented macros, especially those whose name start with YY_,
34   are private implementation details.  Do not rely on them.  */
35
36#ifndef YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED
37# define YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED
38/* Debug traces.  */
39#ifndef YYDEBUG
40# define YYDEBUG 0
41#endif
42#if YYDEBUG
43extern int _mesa_glsl_debug;
44#endif
45
46/* Token type.  */
47#ifndef YYTOKENTYPE
48# define YYTOKENTYPE
49  enum yytokentype
50  {
51    ATTRIBUTE = 258,
52    CONST_TOK = 259,
53    BASIC_TYPE_TOK = 260,
54    BREAK = 261,
55    BUFFER = 262,
56    CONTINUE = 263,
57    DO = 264,
58    ELSE = 265,
59    FOR = 266,
60    IF = 267,
61    DISCARD = 268,
62    RETURN = 269,
63    SWITCH = 270,
64    CASE = 271,
65    DEFAULT = 272,
66    CENTROID = 273,
67    IN_TOK = 274,
68    OUT_TOK = 275,
69    INOUT_TOK = 276,
70    UNIFORM = 277,
71    VARYING = 278,
72    SAMPLE = 279,
73    NOPERSPECTIVE = 280,
74    FLAT = 281,
75    SMOOTH = 282,
76    IMAGE1DSHADOW = 283,
77    IMAGE2DSHADOW = 284,
78    IMAGE1DARRAYSHADOW = 285,
79    IMAGE2DARRAYSHADOW = 286,
80    COHERENT = 287,
81    VOLATILE = 288,
82    RESTRICT = 289,
83    READONLY = 290,
84    WRITEONLY = 291,
85    SHARED = 292,
86    STRUCT = 293,
87    VOID_TOK = 294,
88    WHILE = 295,
89    IDENTIFIER = 296,
90    TYPE_IDENTIFIER = 297,
91    NEW_IDENTIFIER = 298,
92    FLOATCONSTANT = 299,
93    DOUBLECONSTANT = 300,
94    INTCONSTANT = 301,
95    UINTCONSTANT = 302,
96    BOOLCONSTANT = 303,
97    INT64CONSTANT = 304,
98    UINT64CONSTANT = 305,
99    FIELD_SELECTION = 306,
100    LEFT_OP = 307,
101    RIGHT_OP = 308,
102    INC_OP = 309,
103    DEC_OP = 310,
104    LE_OP = 311,
105    GE_OP = 312,
106    EQ_OP = 313,
107    NE_OP = 314,
108    AND_OP = 315,
109    OR_OP = 316,
110    XOR_OP = 317,
111    MUL_ASSIGN = 318,
112    DIV_ASSIGN = 319,
113    ADD_ASSIGN = 320,
114    MOD_ASSIGN = 321,
115    LEFT_ASSIGN = 322,
116    RIGHT_ASSIGN = 323,
117    AND_ASSIGN = 324,
118    XOR_ASSIGN = 325,
119    OR_ASSIGN = 326,
120    SUB_ASSIGN = 327,
121    INVARIANT = 328,
122    PRECISE = 329,
123    LOWP = 330,
124    MEDIUMP = 331,
125    HIGHP = 332,
126    SUPERP = 333,
127    PRECISION = 334,
128    VERSION_TOK = 335,
129    EXTENSION = 336,
130    LINE = 337,
131    COLON = 338,
132    EOL = 339,
133    INTERFACE = 340,
134    OUTPUT = 341,
135    PRAGMA_DEBUG_ON = 342,
136    PRAGMA_DEBUG_OFF = 343,
137    PRAGMA_OPTIMIZE_ON = 344,
138    PRAGMA_OPTIMIZE_OFF = 345,
139    PRAGMA_WARNING_ON = 346,
140    PRAGMA_WARNING_OFF = 347,
141    PRAGMA_INVARIANT_ALL = 348,
142    LAYOUT_TOK = 349,
143    DOT_TOK = 350,
144    ASM = 351,
145    CLASS = 352,
146    UNION = 353,
147    ENUM = 354,
148    TYPEDEF = 355,
149    TEMPLATE = 356,
150    THIS = 357,
151    PACKED_TOK = 358,
152    GOTO = 359,
153    INLINE_TOK = 360,
154    NOINLINE = 361,
155    PUBLIC_TOK = 362,
156    STATIC = 363,
157    EXTERN = 364,
158    EXTERNAL = 365,
159    LONG_TOK = 366,
160    SHORT_TOK = 367,
161    HALF = 368,
162    FIXED_TOK = 369,
163    UNSIGNED = 370,
164    INPUT_TOK = 371,
165    HVEC2 = 372,
166    HVEC3 = 373,
167    HVEC4 = 374,
168    FVEC2 = 375,
169    FVEC3 = 376,
170    FVEC4 = 377,
171    SAMPLER3DRECT = 378,
172    SIZEOF = 379,
173    CAST = 380,
174    NAMESPACE = 381,
175    USING = 382,
176    RESOURCE = 383,
177    PATCH = 384,
178    SUBROUTINE = 385,
179    ERROR_TOK = 386,
180    COMMON = 387,
181    PARTITION = 388,
182    ACTIVE = 389,
183    FILTER = 390,
184    ROW_MAJOR = 391,
185    THEN = 392
186  };
187#endif
188
189/* Value type.  */
190#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191
192union YYSTYPE
193{
194#line 98 "../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1906  */
195
196   int n;
197   int64_t n64;
198   float real;
199   double dreal;
200   const char *identifier;
201
202   struct ast_type_qualifier type_qualifier;
203
204   ast_node *node;
205   ast_type_specifier *type_specifier;
206   ast_array_specifier *array_specifier;
207   ast_fully_specified_type *fully_specified_type;
208   ast_function *function;
209   ast_parameter_declarator *parameter_declarator;
210   ast_function_definition *function_definition;
211   ast_compound_statement *compound_statement;
212   ast_expression *expression;
213   ast_declarator_list *declarator_list;
214   ast_struct_specifier *struct_specifier;
215   ast_declaration *declaration;
216   ast_switch_body *switch_body;
217   ast_case_label *case_label;
218   ast_case_label_list *case_label_list;
219   ast_case_statement *case_statement;
220   ast_case_statement_list *case_statement_list;
221   ast_interface_block *interface_block;
222   ast_subroutine_list *subroutine_list;
223   struct {
224      ast_node *cond;
225      ast_expression *rest;
226   } for_rest_statement;
227
228   struct {
229      ast_node *then_statement;
230      ast_node *else_statement;
231   } selection_rest_statement;
232
233   const glsl_type *type;
234
235#line 236 "src/compiler/glsl/glsl_parser.h" /* yacc.c:1906  */
236};
237
238typedef union YYSTYPE YYSTYPE;
239# define YYSTYPE_IS_TRIVIAL 1
240# define YYSTYPE_IS_DECLARED 1
241#endif
242
243/* Location type.  */
244#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
245typedef struct YYLTYPE YYLTYPE;
246struct YYLTYPE
247{
248  int first_line;
249  int first_column;
250  int last_line;
251  int last_column;
252};
253# define YYLTYPE_IS_DECLARED 1
254# define YYLTYPE_IS_TRIVIAL 1
255#endif
256
257
258
259int _mesa_glsl_parse (struct _mesa_glsl_parse_state *state);
260
261#endif /* !YY__MESA_GLSL_SRC_COMPILER_GLSL_GLSL_PARSER_H_INCLUDED  */
262