glsl: Fix dependencies / linkage for glsl_compiler
[mesa.git] / src / glsl / glsl_parser.h
1 /* A Bison parser, made by GNU Bison 2.4.3. */
2
3 /* Skeleton interface for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2009, 2010 Free Software Foundation, Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34
35 /* Tokens. */
36 #ifndef YYTOKENTYPE
37 # define YYTOKENTYPE
38 /* Put the tokens into the symbol table, so that GDB and other debuggers
39 know about them. */
40 enum yytokentype {
41 ATTRIBUTE = 258,
42 CONST_TOK = 259,
43 BOOL_TOK = 260,
44 FLOAT_TOK = 261,
45 INT_TOK = 262,
46 UINT_TOK = 263,
47 BREAK = 264,
48 CONTINUE = 265,
49 DO = 266,
50 ELSE = 267,
51 FOR = 268,
52 IF = 269,
53 DISCARD = 270,
54 RETURN = 271,
55 SWITCH = 272,
56 CASE = 273,
57 DEFAULT = 274,
58 BVEC2 = 275,
59 BVEC3 = 276,
60 BVEC4 = 277,
61 IVEC2 = 278,
62 IVEC3 = 279,
63 IVEC4 = 280,
64 UVEC2 = 281,
65 UVEC3 = 282,
66 UVEC4 = 283,
67 VEC2 = 284,
68 VEC3 = 285,
69 VEC4 = 286,
70 CENTROID = 287,
71 IN_TOK = 288,
72 OUT_TOK = 289,
73 INOUT_TOK = 290,
74 UNIFORM = 291,
75 VARYING = 292,
76 NOPERSPECTIVE = 293,
77 FLAT = 294,
78 SMOOTH = 295,
79 MAT2X2 = 296,
80 MAT2X3 = 297,
81 MAT2X4 = 298,
82 MAT3X2 = 299,
83 MAT3X3 = 300,
84 MAT3X4 = 301,
85 MAT4X2 = 302,
86 MAT4X3 = 303,
87 MAT4X4 = 304,
88 SAMPLER1D = 305,
89 SAMPLER2D = 306,
90 SAMPLER3D = 307,
91 SAMPLERCUBE = 308,
92 SAMPLER1DSHADOW = 309,
93 SAMPLER2DSHADOW = 310,
94 SAMPLERCUBESHADOW = 311,
95 SAMPLER1DARRAY = 312,
96 SAMPLER2DARRAY = 313,
97 SAMPLER1DARRAYSHADOW = 314,
98 SAMPLER2DARRAYSHADOW = 315,
99 ISAMPLER1D = 316,
100 ISAMPLER2D = 317,
101 ISAMPLER3D = 318,
102 ISAMPLERCUBE = 319,
103 ISAMPLER1DARRAY = 320,
104 ISAMPLER2DARRAY = 321,
105 USAMPLER1D = 322,
106 USAMPLER2D = 323,
107 USAMPLER3D = 324,
108 USAMPLERCUBE = 325,
109 USAMPLER1DARRAY = 326,
110 USAMPLER2DARRAY = 327,
111 STRUCT = 328,
112 VOID_TOK = 329,
113 WHILE = 330,
114 IDENTIFIER = 331,
115 FLOATCONSTANT = 332,
116 INTCONSTANT = 333,
117 UINTCONSTANT = 334,
118 BOOLCONSTANT = 335,
119 FIELD_SELECTION = 336,
120 LEFT_OP = 337,
121 RIGHT_OP = 338,
122 INC_OP = 339,
123 DEC_OP = 340,
124 LE_OP = 341,
125 GE_OP = 342,
126 EQ_OP = 343,
127 NE_OP = 344,
128 AND_OP = 345,
129 OR_OP = 346,
130 XOR_OP = 347,
131 MUL_ASSIGN = 348,
132 DIV_ASSIGN = 349,
133 ADD_ASSIGN = 350,
134 MOD_ASSIGN = 351,
135 LEFT_ASSIGN = 352,
136 RIGHT_ASSIGN = 353,
137 AND_ASSIGN = 354,
138 XOR_ASSIGN = 355,
139 OR_ASSIGN = 356,
140 SUB_ASSIGN = 357,
141 INVARIANT = 358,
142 LOWP = 359,
143 MEDIUMP = 360,
144 HIGHP = 361,
145 SUPERP = 362,
146 PRECISION = 363,
147 VERSION = 364,
148 EXTENSION = 365,
149 LINE = 366,
150 COLON = 367,
151 EOL = 368,
152 INTERFACE = 369,
153 OUTPUT = 370,
154 PRAGMA_DEBUG_ON = 371,
155 PRAGMA_DEBUG_OFF = 372,
156 PRAGMA_OPTIMIZE_ON = 373,
157 PRAGMA_OPTIMIZE_OFF = 374,
158 PRAGMA_INVARIANT_ALL = 375,
159 LAYOUT_TOK = 376,
160 ASM = 377,
161 CLASS = 378,
162 UNION = 379,
163 ENUM = 380,
164 TYPEDEF = 381,
165 TEMPLATE = 382,
166 THIS = 383,
167 PACKED_TOK = 384,
168 GOTO = 385,
169 INLINE_TOK = 386,
170 NOINLINE = 387,
171 VOLATILE = 388,
172 PUBLIC_TOK = 389,
173 STATIC = 390,
174 EXTERN = 391,
175 EXTERNAL = 392,
176 LONG_TOK = 393,
177 SHORT_TOK = 394,
178 DOUBLE_TOK = 395,
179 HALF = 396,
180 FIXED_TOK = 397,
181 UNSIGNED = 398,
182 INPUT_TOK = 399,
183 OUPTUT = 400,
184 HVEC2 = 401,
185 HVEC3 = 402,
186 HVEC4 = 403,
187 DVEC2 = 404,
188 DVEC3 = 405,
189 DVEC4 = 406,
190 FVEC2 = 407,
191 FVEC3 = 408,
192 FVEC4 = 409,
193 SAMPLER2DRECT = 410,
194 SAMPLER3DRECT = 411,
195 SAMPLER2DRECTSHADOW = 412,
196 SIZEOF = 413,
197 CAST = 414,
198 NAMESPACE = 415,
199 USING = 416,
200 ERROR_TOK = 417,
201 COMMON = 418,
202 PARTITION = 419,
203 ACTIVE = 420,
204 SAMPLERBUFFER = 421,
205 FILTER = 422,
206 IMAGE1D = 423,
207 IMAGE2D = 424,
208 IMAGE3D = 425,
209 IMAGECUBE = 426,
210 IMAGE1DARRAY = 427,
211 IMAGE2DARRAY = 428,
212 IIMAGE1D = 429,
213 IIMAGE2D = 430,
214 IIMAGE3D = 431,
215 IIMAGECUBE = 432,
216 IIMAGE1DARRAY = 433,
217 IIMAGE2DARRAY = 434,
218 UIMAGE1D = 435,
219 UIMAGE2D = 436,
220 UIMAGE3D = 437,
221 UIMAGECUBE = 438,
222 UIMAGE1DARRAY = 439,
223 UIMAGE2DARRAY = 440,
224 IMAGE1DSHADOW = 441,
225 IMAGE2DSHADOW = 442,
226 IMAGEBUFFER = 443,
227 IIMAGEBUFFER = 444,
228 UIMAGEBUFFER = 445,
229 IMAGE1DARRAYSHADOW = 446,
230 IMAGE2DARRAYSHADOW = 447,
231 ROW_MAJOR = 448
232 };
233 #endif
234
235
236
237 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
238 typedef union YYSTYPE
239 {
240
241 /* Line 1685 of yacc.c */
242 #line 52 "glsl_parser.ypp"
243
244 int n;
245 float real;
246 char *identifier;
247
248 struct ast_type_qualifier type_qualifier;
249
250 ast_node *node;
251 ast_type_specifier *type_specifier;
252 ast_fully_specified_type *fully_specified_type;
253 ast_function *function;
254 ast_parameter_declarator *parameter_declarator;
255 ast_function_definition *function_definition;
256 ast_compound_statement *compound_statement;
257 ast_expression *expression;
258 ast_declarator_list *declarator_list;
259 ast_struct_specifier *struct_specifier;
260 ast_declaration *declaration;
261
262 struct {
263 ast_node *cond;
264 ast_expression *rest;
265 } for_rest_statement;
266
267 struct {
268 ast_node *then_statement;
269 ast_node *else_statement;
270 } selection_rest_statement;
271
272
273
274 /* Line 1685 of yacc.c */
275 #line 276 "glsl_parser.h"
276 } YYSTYPE;
277 # define YYSTYPE_IS_TRIVIAL 1
278 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
279 # define YYSTYPE_IS_DECLARED 1
280 #endif
281
282
283
284 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
285 typedef struct YYLTYPE
286 {
287 int first_line;
288 int first_column;
289 int last_line;
290 int last_column;
291 } YYLTYPE;
292 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
293 # define YYLTYPE_IS_DECLARED 1
294 # define YYLTYPE_IS_TRIVIAL 1
295 #endif
296
297
298