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