Merge remote branch 'origin/master' into nv50-compiler
[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 LAYOUT_TOK = 375,
160 ASM = 376,
161 CLASS = 377,
162 UNION = 378,
163 ENUM = 379,
164 TYPEDEF = 380,
165 TEMPLATE = 381,
166 THIS = 382,
167 PACKED_TOK = 383,
168 GOTO = 384,
169 INLINE_TOK = 385,
170 NOINLINE = 386,
171 VOLATILE = 387,
172 PUBLIC_TOK = 388,
173 STATIC = 389,
174 EXTERN = 390,
175 EXTERNAL = 391,
176 LONG_TOK = 392,
177 SHORT_TOK = 393,
178 DOUBLE_TOK = 394,
179 HALF = 395,
180 FIXED_TOK = 396,
181 UNSIGNED = 397,
182 INPUT_TOK = 398,
183 OUPTUT = 399,
184 HVEC2 = 400,
185 HVEC3 = 401,
186 HVEC4 = 402,
187 DVEC2 = 403,
188 DVEC3 = 404,
189 DVEC4 = 405,
190 FVEC2 = 406,
191 FVEC3 = 407,
192 FVEC4 = 408,
193 SAMPLER2DRECT = 409,
194 SAMPLER3DRECT = 410,
195 SAMPLER2DRECTSHADOW = 411,
196 SIZEOF = 412,
197 CAST = 413,
198 NAMESPACE = 414,
199 USING = 415,
200 ERROR_TOK = 416,
201 COMMON = 417,
202 PARTITION = 418,
203 ACTIVE = 419,
204 SAMPLERBUFFER = 420,
205 FILTER = 421,
206 IMAGE1D = 422,
207 IMAGE2D = 423,
208 IMAGE3D = 424,
209 IMAGECUBE = 425,
210 IMAGE1DARRAY = 426,
211 IMAGE2DARRAY = 427,
212 IIMAGE1D = 428,
213 IIMAGE2D = 429,
214 IIMAGE3D = 430,
215 IIMAGECUBE = 431,
216 IIMAGE1DARRAY = 432,
217 IIMAGE2DARRAY = 433,
218 UIMAGE1D = 434,
219 UIMAGE2D = 435,
220 UIMAGE3D = 436,
221 UIMAGECUBE = 437,
222 UIMAGE1DARRAY = 438,
223 UIMAGE2DARRAY = 439,
224 IMAGE1DSHADOW = 440,
225 IMAGE2DSHADOW = 441,
226 IMAGEBUFFER = 442,
227 IIMAGEBUFFER = 443,
228 UIMAGEBUFFER = 444,
229 ROW_MAJOR = 445
230 };
231 #endif
232
233
234
235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
236 typedef union YYSTYPE
237 {
238
239 /* Line 1676 of yacc.c */
240 #line 52 "glsl_parser.ypp"
241
242 int n;
243 float real;
244 char *identifier;
245
246 union {
247 struct ast_type_qualifier q;
248 unsigned i;
249 } 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
269
270 /* Line 1676 of yacc.c */
271 #line 272 "glsl_parser.h"
272 } YYSTYPE;
273 # define YYSTYPE_IS_TRIVIAL 1
274 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
275 # define YYSTYPE_IS_DECLARED 1
276 #endif
277
278
279
280 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
281 typedef struct YYLTYPE
282 {
283 int first_line;
284 int first_column;
285 int last_line;
286 int last_column;
287 } YYLTYPE;
288 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
289 # define YYLTYPE_IS_DECLARED 1
290 # define YYLTYPE_IS_TRIVIAL 1
291 #endif
292
293
294