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