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