glsl: Add generated files from flex/bison.
[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 = 260,
45 FLOAT = 261,
46 INT = 262,
47 UINT = 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 MAT2 = 287,
72 MAT3 = 288,
73 MAT4 = 289,
74 CENTROID = 290,
75 IN = 291,
76 OUT = 292,
77 INOUT = 293,
78 UNIFORM = 294,
79 VARYING = 295,
80 NOPERSPECTIVE = 296,
81 FLAT = 297,
82 SMOOTH = 298,
83 MAT2X2 = 299,
84 MAT2X3 = 300,
85 MAT2X4 = 301,
86 MAT3X2 = 302,
87 MAT3X3 = 303,
88 MAT3X4 = 304,
89 MAT4X2 = 305,
90 MAT4X3 = 306,
91 MAT4X4 = 307,
92 SAMPLER1D = 308,
93 SAMPLER2D = 309,
94 SAMPLER3D = 310,
95 SAMPLERCUBE = 311,
96 SAMPLER1DSHADOW = 312,
97 SAMPLER2DSHADOW = 313,
98 SAMPLERCUBESHADOW = 314,
99 SAMPLER1DARRAY = 315,
100 SAMPLER2DARRAY = 316,
101 SAMPLER1DARRAYSHADOW = 317,
102 SAMPLER2DARRAYSHADOW = 318,
103 ISAMPLER1D = 319,
104 ISAMPLER2D = 320,
105 ISAMPLER3D = 321,
106 ISAMPLERCUBE = 322,
107 ISAMPLER1DARRAY = 323,
108 ISAMPLER2DARRAY = 324,
109 USAMPLER1D = 325,
110 USAMPLER2D = 326,
111 USAMPLER3D = 327,
112 USAMPLERCUBE = 328,
113 USAMPLER1DARRAY = 329,
114 USAMPLER2DARRAY = 330,
115 STRUCT = 331,
116 VOID = 332,
117 WHILE = 333,
118 IDENTIFIER = 334,
119 FLOATCONSTANT = 335,
120 INTCONSTANT = 336,
121 UINTCONSTANT = 337,
122 BOOLCONSTANT = 338,
123 FIELD_SELECTION = 339,
124 LEFT_OP = 340,
125 RIGHT_OP = 341,
126 INC_OP = 342,
127 DEC_OP = 343,
128 LE_OP = 344,
129 GE_OP = 345,
130 EQ_OP = 346,
131 NE_OP = 347,
132 AND_OP = 348,
133 OR_OP = 349,
134 XOR_OP = 350,
135 MUL_ASSIGN = 351,
136 DIV_ASSIGN = 352,
137 ADD_ASSIGN = 353,
138 MOD_ASSIGN = 354,
139 LEFT_ASSIGN = 355,
140 RIGHT_ASSIGN = 356,
141 AND_ASSIGN = 357,
142 XOR_ASSIGN = 358,
143 OR_ASSIGN = 359,
144 SUB_ASSIGN = 360,
145 INVARIANT = 361,
146 LOWP = 362,
147 MEDIUMP = 363,
148 HIGHP = 364,
149 PRECISION = 365,
150 VERSION = 366,
151 EXTENSION = 367,
152 LINE = 368,
153 PRAGMA = 369,
154 COLON = 370,
155 EOL = 371,
156 INTERFACE = 372,
157 OUTPUT = 373,
158 ASM = 374,
159 CLASS = 375,
160 UNION = 376,
161 ENUM = 377,
162 TYPEDEF = 378,
163 TEMPLATE = 379,
164 THIS = 380,
165 PACKED = 381,
166 GOTO = 382,
167 INLINE_TOK = 383,
168 NOINLINE = 384,
169 VOLATILE = 385,
170 PUBLIC_TOK = 386,
171 STATIC = 387,
172 EXTERN = 388,
173 EXTERNAL = 389,
174 LONG = 390,
175 SHORT = 391,
176 DOUBLE = 392,
177 HALF = 393,
178 FIXED = 394,
179 UNSIGNED = 395,
180 INPUT = 396,
181 OUPTUT = 397,
182 HVEC2 = 398,
183 HVEC3 = 399,
184 HVEC4 = 400,
185 DVEC2 = 401,
186 DVEC3 = 402,
187 DVEC4 = 403,
188 FVEC2 = 404,
189 FVEC3 = 405,
190 FVEC4 = 406,
191 SAMPLER2DRECT = 407,
192 SAMPLER3DRECT = 408,
193 SAMPLER2DRECTSHADOW = 409,
194 SIZEOF = 410,
195 CAST = 411,
196 NAMESPACE = 412,
197 USING = 413
198 };
199 #endif
200
201
202
203 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
204 typedef union YYSTYPE
205 {
206
207 /* Line 1676 of yacc.c */
208 #line 45 "glsl_parser.ypp"
209
210 int n;
211 float real;
212 char *identifier;
213
214 union {
215 struct ast_type_qualifier q;
216 unsigned i;
217 } type_qualifier;
218
219 struct ast_node *node;
220 struct ast_type_specifier *type_specifier;
221 struct ast_fully_specified_type *fully_specified_type;
222 struct ast_function *function;
223 struct ast_parameter_declarator *parameter_declarator;
224 struct ast_function_definition *function_definition;
225 struct ast_compound_statement *compound_statement;
226 struct ast_expression *expression;
227 struct ast_declarator_list *declarator_list;
228 struct ast_struct_specifier *struct_specifier;
229 struct ast_declaration *declaration;
230
231 struct {
232 struct ast_node *cond;
233 struct ast_expression *rest;
234 } for_rest_statement;
235
236
237
238 /* Line 1676 of yacc.c */
239 #line 240 "glsl_parser.h"
240 } YYSTYPE;
241 # define YYSTYPE_IS_TRIVIAL 1
242 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
243 # define YYSTYPE_IS_DECLARED 1
244 #endif
245
246
247
248 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
249 typedef struct YYLTYPE
250 {
251 int first_line;
252 int first_column;
253 int last_line;
254 int last_column;
255 } YYLTYPE;
256 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
257 # define YYLTYPE_IS_DECLARED 1
258 # define YYLTYPE_IS_TRIVIAL 1
259 #endif
260
261
262