Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: third_party/mesa/MesaLib/src/glsl/glsl_parser.cpp

Issue 11344041: Revert 165006 - Revert 165005 until skia_webkit.gyp is present everywhere. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/mesa/MesaLib/src/glsl/glsl_parser.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* A Bison parser, made by GNU Bison 2.5. */ 1 /* A Bison parser, made by GNU Bison 2.4.3. */
2 2
3 /* Bison implementation for Yacc-like parsers in C 3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4 4
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2009, 2010 Free Software Foundation, Inc.
6 7
7 This program is free software: you can redistribute it and/or modify 8 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 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 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version. 11 (at your option) any later version.
11 12
12 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 16 GNU General Public License for more details.
(...skipping 21 matching lines...) Expand all
37 infringing on user name space. This should be done even for local 38 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros. 39 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to 40 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON 41 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */ 42 USER NAME SPACE" below. */
42 43
43 /* Identify Bison output. */ 44 /* Identify Bison output. */
44 #define YYBISON 1 45 #define YYBISON 1
45 46
46 /* Bison version. */ 47 /* Bison version. */
47 #define YYBISON_VERSION "2.5" 48 #define YYBISON_VERSION "2.4.3"
48 49
49 /* Skeleton name. */ 50 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c" 51 #define YYSKELETON_NAME "yacc.c"
51 52
52 /* Pure parsers. */ 53 /* Pure parsers. */
53 #define YYPURE 1 54 #define YYPURE 1
54 55
55 /* Push parsers. */ 56 /* Push parsers. */
56 #define YYPUSH 0 57 #define YYPUSH 0
57 58
58 /* Pull parsers. */ 59 /* Pull parsers. */
59 #define YYPULL 1 60 #define YYPULL 1
60 61
61 /* Using locations. */ 62 /* Using locations. */
62 #define YYLSP_NEEDED 1 63 #define YYLSP_NEEDED 1
63 64
64 /* Substitute the variable and function names. */ 65 /* Substitute the variable and function names. */
65 #define yyparse _mesa_glsl_parse 66 #define yyparse _mesa_glsl_parse
66 #define yylex _mesa_glsl_lex 67 #define yylex _mesa_glsl_lex
67 #define yyerror _mesa_glsl_error 68 #define yyerror _mesa_glsl_error
68 #define yylval _mesa_glsl_lval 69 #define yylval _mesa_glsl_lval
69 #define yychar _mesa_glsl_char 70 #define yychar _mesa_glsl_char
70 #define yydebug _mesa_glsl_debug 71 #define yydebug _mesa_glsl_debug
71 #define yynerrs _mesa_glsl_nerrs 72 #define yynerrs _mesa_glsl_nerrs
72 #define yylloc _mesa_glsl_lloc 73 #define yylloc _mesa_glsl_lloc
73 74
74 /* Copy the first part of user declarations. */ 75 /* Copy the first part of user declarations. */
75 76
76 /* Line 268 of yacc.c */ 77 /* Line 189 of yacc.c */
77 #line 1 "glsl_parser.ypp" 78 #line 1 "glsl_parser.ypp"
78 79
79 /* 80 /*
80 * Copyright © 2008, 2009 Intel Corporation 81 * Copyright © 2008, 2009 Intel Corporation
81 * 82 *
82 * Permission is hereby granted, free of charge, to any person obtaining a 83 * Permission is hereby granted, free of charge, to any person obtaining a
83 * copy of this software and associated documentation files (the "Software"), 84 * copy of this software and associated documentation files (the "Software"),
84 * to deal in the Software without restriction, including without limitation 85 * to deal in the Software without restriction, including without limitation
85 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 86 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
86 * and/or sell copies of the Software, and to permit persons to whom the 87 * and/or sell copies of the Software, and to permit persons to whom the
(...skipping 12 matching lines...) Expand all
99 * DEALINGS IN THE SOFTWARE. 100 * DEALINGS IN THE SOFTWARE.
100 */ 101 */
101 #include <stdio.h> 102 #include <stdio.h>
102 #include <stdlib.h> 103 #include <stdlib.h>
103 #include <string.h> 104 #include <string.h>
104 #include <assert.h> 105 #include <assert.h>
105 106
106 #include "ast.h" 107 #include "ast.h"
107 #include "glsl_parser_extras.h" 108 #include "glsl_parser_extras.h"
108 #include "glsl_types.h" 109 #include "glsl_types.h"
110 #include "safe_strcmp.h"
109 111
110 #define YYLEX_PARAM state->scanner 112 #define YYLEX_PARAM state->scanner
111 113
112 114
113 115
114 /* Line 268 of yacc.c */ 116 /* Line 189 of yacc.c */
115 #line 116 "glsl_parser.cpp" 117 #line 117 "glsl_parser.cpp"
116 118
117 /* Enabling traces. */ 119 /* Enabling traces. */
118 #ifndef YYDEBUG 120 #ifndef YYDEBUG
119 # define YYDEBUG 0 121 # define YYDEBUG 0
120 #endif 122 #endif
121 123
122 /* Enabling verbose error messages. */ 124 /* Enabling verbose error messages. */
123 #ifdef YYERROR_VERBOSE 125 #ifdef YYERROR_VERBOSE
124 # undef YYERROR_VERBOSE 126 # undef YYERROR_VERBOSE
125 # define YYERROR_VERBOSE 1 127 # define YYERROR_VERBOSE 1
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 ROW_MAJOR = 445 331 ROW_MAJOR = 445
330 }; 332 };
331 #endif 333 #endif
332 334
333 335
334 336
335 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 337 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
336 typedef union YYSTYPE 338 typedef union YYSTYPE
337 { 339 {
338 340
339 /* Line 293 of yacc.c */ 341 /* Line 214 of yacc.c */
340 #line 52 "glsl_parser.ypp" 342 #line 52 "glsl_parser.ypp"
341 343
342 int n; 344 int n;
343 float real; 345 float real;
344 char *identifier; 346 char *identifier;
345 347
346 union { 348 union {
347 struct ast_type_qualifier q; 349 struct ast_type_qualifier q;
348 unsigned i; 350 unsigned i;
349 } type_qualifier; 351 } type_qualifier;
(...skipping 15 matching lines...) Expand all
365 ast_expression *rest; 367 ast_expression *rest;
366 } for_rest_statement; 368 } for_rest_statement;
367 369
368 struct { 370 struct {
369 ast_node *then_statement; 371 ast_node *then_statement;
370 ast_node *else_statement; 372 ast_node *else_statement;
371 } selection_rest_statement; 373 } selection_rest_statement;
372 374
373 375
374 376
375 /* Line 293 of yacc.c */ 377 /* Line 214 of yacc.c */
376 #line 377 "glsl_parser.cpp" 378 #line 378 "glsl_parser.cpp"
377 } YYSTYPE; 379 } YYSTYPE;
378 # define YYSTYPE_IS_TRIVIAL 1 380 # define YYSTYPE_IS_TRIVIAL 1
379 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 381 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
380 # define YYSTYPE_IS_DECLARED 1 382 # define YYSTYPE_IS_DECLARED 1
381 #endif 383 #endif
382 384
383 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 385 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
384 typedef struct YYLTYPE 386 typedef struct YYLTYPE
385 { 387 {
386 int first_line; 388 int first_line;
387 int first_column; 389 int first_column;
388 int last_line; 390 int last_line;
389 int last_column; 391 int last_column;
390 } YYLTYPE; 392 } YYLTYPE;
391 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 393 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
392 # define YYLTYPE_IS_DECLARED 1 394 # define YYLTYPE_IS_DECLARED 1
393 # define YYLTYPE_IS_TRIVIAL 1 395 # define YYLTYPE_IS_TRIVIAL 1
394 #endif 396 #endif
395 397
396 398
397 /* Copy the second part of user declarations. */ 399 /* Copy the second part of user declarations. */
398 400
399 401
400 /* Line 343 of yacc.c */ 402 /* Line 264 of yacc.c */
401 #line 402 "glsl_parser.cpp" 403 #line 403 "glsl_parser.cpp"
402 404
403 #ifdef short 405 #ifdef short
404 # undef short 406 # undef short
405 #endif 407 #endif
406 408
407 #ifdef YYTYPE_UINT8 409 #ifdef YYTYPE_UINT8
408 typedef YYTYPE_UINT8 yytype_uint8; 410 typedef YYTYPE_UINT8 yytype_uint8;
409 #else 411 #else
410 typedef unsigned char yytype_uint8; 412 typedef unsigned char yytype_uint8;
411 #endif 413 #endif
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 # define YYSTACK_ALLOC __builtin_alloca 496 # define YYSTACK_ALLOC __builtin_alloca
495 # elif defined __BUILTIN_VA_ARG_INCR 497 # elif defined __BUILTIN_VA_ARG_INCR
496 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 498 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
497 # elif defined _AIX 499 # elif defined _AIX
498 # define YYSTACK_ALLOC __alloca 500 # define YYSTACK_ALLOC __alloca
499 # elif defined _MSC_VER 501 # elif defined _MSC_VER
500 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 502 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
501 # define alloca _alloca 503 # define alloca _alloca
502 # else 504 # else
503 # define YYSTACK_ALLOC alloca 505 # define YYSTACK_ALLOC alloca
504 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || de fined __C99__FUNC__ \ 506 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defin ed __C99__FUNC__ \
505 || defined __cplusplus || defined _MSC_VER) 507 || defined __cplusplus || defined _MSC_VER)
506 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 508 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
507 # ifndef EXIT_SUCCESS 509 # ifndef _STDLIB_H
508 # define EXIT_SUCCESS 0 510 # define _STDLIB_H 1
509 # endif 511 # endif
510 # endif 512 # endif
511 # endif 513 # endif
512 # endif 514 # endif
513 # endif 515 # endif
514 516
515 # ifdef YYSTACK_ALLOC 517 # ifdef YYSTACK_ALLOC
516 /* Pacify GCC's `empty if-body' warning. */ 518 /* Pacify GCC's `empty if-body' warning. */
517 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 519 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
518 # ifndef YYSTACK_ALLOC_MAXIMUM 520 # ifndef YYSTACK_ALLOC_MAXIMUM
519 /* The OS might guarantee only one guard page at the bottom of the stack, 521 /* The OS might guarantee only one guard page at the bottom of the stack,
520 and a page size can be as small as 4096 bytes. So we cannot safely 522 and a page size can be as small as 4096 bytes. So we cannot safely
521 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 523 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
522 to allow for a few compiler-allocated temporary stack slots. */ 524 to allow for a few compiler-allocated temporary stack slots. */
523 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 525 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
524 # endif 526 # endif
525 # else 527 # else
526 # define YYSTACK_ALLOC YYMALLOC 528 # define YYSTACK_ALLOC YYMALLOC
527 # define YYSTACK_FREE YYFREE 529 # define YYSTACK_FREE YYFREE
528 # ifndef YYSTACK_ALLOC_MAXIMUM 530 # ifndef YYSTACK_ALLOC_MAXIMUM
529 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 531 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
530 # endif 532 # endif
531 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 533 # if (defined __cplusplus && ! defined _STDLIB_H \
532 && ! ((defined YYMALLOC || defined malloc) \ 534 && ! ((defined YYMALLOC || defined malloc) \
533 && (defined YYFREE || defined free))) 535 && (defined YYFREE || defined free)))
534 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 536 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
535 # ifndef EXIT_SUCCESS 537 # ifndef _STDLIB_H
536 # define EXIT_SUCCESS 0 538 # define _STDLIB_H 1
537 # endif 539 # endif
538 # endif 540 # endif
539 # ifndef YYMALLOC 541 # ifndef YYMALLOC
540 # define YYMALLOC malloc 542 # define YYMALLOC malloc
541 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || define d __C99__FUNC__ \ 543 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined _ _C99__FUNC__ \
542 || defined __cplusplus || defined _MSC_VER) 544 || defined __cplusplus || defined _MSC_VER)
543 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 545 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
544 # endif 546 # endif
545 # endif 547 # endif
546 # ifndef YYFREE 548 # ifndef YYFREE
547 # define YYFREE free 549 # define YYFREE free
548 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 550 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C 99__FUNC__ \
549 || defined __cplusplus || defined _MSC_VER) 551 || defined __cplusplus || defined _MSC_VER)
550 void free (void *); /* INFRINGES ON USER NAME SPACE */ 552 void free (void *); /* INFRINGES ON USER NAME SPACE */
551 # endif 553 # endif
552 # endif 554 # endif
553 # endif 555 # endif
554 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 556 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
555 557
556 558
557 #if (! defined yyoverflow \ 559 #if (! defined yyoverflow \
558 && (! defined __cplusplus \ 560 && (! defined __cplusplus \
(...skipping 10 matching lines...) Expand all
569 571
570 /* The size of the maximum gap between one aligned stack and the next. */ 572 /* The size of the maximum gap between one aligned stack and the next. */
571 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 573 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
572 574
573 /* The size of an array large to enough to hold all stacks, each with 575 /* The size of an array large to enough to hold all stacks, each with
574 N elements. */ 576 N elements. */
575 # define YYSTACK_BYTES(N) \ 577 # define YYSTACK_BYTES(N) \
576 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 578 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
577 + 2 * YYSTACK_GAP_MAXIMUM) 579 + 2 * YYSTACK_GAP_MAXIMUM)
578 580
579 # define YYCOPY_NEEDED 1 581 /* Copy COUNT objects from FROM to TO. The source and destination do
582 not overlap. */
583 # ifndef YYCOPY
584 # if defined __GNUC__ && 1 < __GNUC__
585 # define YYCOPY(To, From, Count) \
586 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
587 # else
588 # define YYCOPY(To, From, Count)» » \
589 do» » » » » \
590 » {» » » » » \
591 » YYSIZE_T yyi;»» » » \
592 » for (yyi = 0; yyi < (Count); yyi++)» \
593 » (To)[yyi] = (From)[yyi];» » \
594 » }» » » » » \
595 while (YYID (0))
596 # endif
597 # endif
580 598
581 /* Relocate STACK from its old location to the new one. The 599 /* Relocate STACK from its old location to the new one. The
582 local variables YYSIZE and YYSTACKSIZE give the old and new number of 600 local variables YYSIZE and YYSTACKSIZE give the old and new number of
583 elements in the stack, and YYPTR gives the new location of the 601 elements in the stack, and YYPTR gives the new location of the
584 stack. Advance YYPTR to a properly aligned location for the next 602 stack. Advance YYPTR to a properly aligned location for the next
585 stack. */ 603 stack. */
586 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 604 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
587 do \ 605 do \
588 { \ 606 { \
589 YYSIZE_T yynewbytes; \ 607 YYSIZE_T yynewbytes; \
590 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 608 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
591 Stack = &yyptr->Stack_alloc; \ 609 Stack = &yyptr->Stack_alloc; \
592 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 610 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
593 yyptr += yynewbytes / sizeof (*yyptr); \ 611 yyptr += yynewbytes / sizeof (*yyptr); \
594 } \ 612 } \
595 while (YYID (0)) 613 while (YYID (0))
596 614
597 #endif 615 #endif
598 616
599 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
600 /* Copy COUNT objects from FROM to TO. The source and destination do
601 not overlap. */
602 # ifndef YYCOPY
603 # if defined __GNUC__ && 1 < __GNUC__
604 # define YYCOPY(To, From, Count) \
605 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
606 # else
607 # define YYCOPY(To, From, Count) \
608 do \
609 { \
610 YYSIZE_T yyi; \
611 for (yyi = 0; yyi < (Count); yyi++) \
612 (To)[yyi] = (From)[yyi]; \
613 } \
614 while (YYID (0))
615 # endif
616 # endif
617 #endif /* !YYCOPY_NEEDED */
618
619 /* YYFINAL -- State number of the termination state. */ 617 /* YYFINAL -- State number of the termination state. */
620 #define YYFINAL 5 618 #define YYFINAL 5
621 /* YYLAST -- Last index in YYTABLE. */ 619 /* YYLAST -- Last index in YYTABLE. */
622 #define YYLAST 4005 620 #define YYLAST 4005
623 621
624 /* YYNTOKENS -- Number of terminals. */ 622 /* YYNTOKENS -- Number of terminals. */
625 #define YYNTOKENS 215 623 #define YYNTOKENS 215
626 /* YYNNTS -- Number of nonterminals. */ 624 /* YYNNTS -- Number of nonterminals. */
627 #define YYNNTS 88 625 #define YYNNTS 88
628 /* YYNRULES -- Number of rules. */ 626 /* YYNRULES -- Number of rules. */
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1007 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1010 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1008 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
1011 4, 1, 2, 3, 1, 3, 1, 4, 1, 1, 1009 4, 1, 2, 3, 1, 3, 1, 4, 1, 1,
1012 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1010 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1013 3, 1, 1, 2, 3, 1, 2, 1, 2, 5, 1011 3, 1, 1, 2, 3, 1, 2, 1, 2, 5,
1014 3, 1, 1, 4, 5, 3, 2, 5, 7, 6, 1012 3, 1, 1, 4, 5, 3, 2, 5, 7, 6,
1015 1, 1, 1, 0, 2, 3, 2, 2, 2, 3, 1013 1, 1, 1, 0, 2, 3, 2, 2, 2, 3,
1016 2, 1, 1, 1, 2 1014 2, 1, 1, 1, 2
1017 }; 1015 };
1018 1016
1019 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 1017 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1020 Performed when YYTABLE doesn't specify something else to do. Zero 1018 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1021 means the default is an error. */ 1019 means the default is an error. */
1022 static const yytype_uint16 yydefact[] = 1020 static const yytype_uint16 yydefact[] =
1023 { 1021 {
1024 4, 0, 0, 10, 0, 1, 2, 5, 0, 135, 1022 4, 0, 0, 10, 0, 1, 2, 5, 0, 135,
1025 11, 0, 149, 148, 169, 166, 167, 168, 173, 174, 1023 11, 0, 149, 148, 169, 166, 167, 168, 173, 174,
1026 175, 176, 177, 178, 179, 180, 181, 170, 171, 172, 1024 175, 176, 177, 178, 179, 180, 181, 170, 171, 172,
1027 0, 153, 156, 143, 142, 141, 182, 183, 184, 185, 1025 0, 153, 156, 143, 142, 141, 182, 183, 184, 185,
1028 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 1026 186, 187, 188, 189, 190, 191, 192, 194, 195, 196,
1029 197, 199, 200, 201, 202, 203, 204, 205, 206, 207, 1027 197, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1030 208, 209, 210, 211, 212, 213, 214, 215, 0, 165, 1028 208, 209, 210, 211, 212, 213, 214, 215, 0, 165,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 -17, -329, -133, -99, -329, -155, -189, 2, 5, -329, 1133 -17, -329, -133, -99, -329, -155, -189, 2, 5, -329,
1136 -329, -329, 68, 161, 155, 73, -329, -329, -215, -329, 1134 -329, -329, 68, 161, 155, 73, -329, -329, -215, -329,
1137 -329, -329, 48, -329, -329, -43, -329, -9, -31, -329, 1135 -329, -329, 48, -329, -329, -43, -329, -9, -31, -329,
1138 -329, 217, -329, 150, -131, -329, -24, -140, 56, -153, 1136 -329, 217, -329, 150, -131, -329, -24, -140, 56, -153,
1139 -328, -78, -90, 213, 124, 58, -329, -329, -19, -329, 1137 -328, -78, -90, 213, 124, 58, -329, -329, -19, -329,
1140 -329, -329, -329, -329, -329, -329, 219, -329 1138 -329, -329, -329, -329, -329, -329, 219, -329
1141 }; 1139 };
1142 1140
1143 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 1141 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1144 positive, shift that token. If negative, reduce the rule which 1142 positive, shift that token. If negative, reduce the rule which
1145 number is the opposite. If YYTABLE_NINF, syntax error. */ 1143 number is the opposite. If zero, do what YYDEFACT says.
1144 If YYTABLE_NINF, syntax error. */
1146 #define YYTABLE_NINF -264 1145 #define YYTABLE_NINF -264
1147 static const yytype_int16 yytable[] = 1146 static const yytype_int16 yytable[] =
1148 { 1147 {
1149 98, 245, 127, 250, 110, 252, 229, 301, 230, 12, 1148 98, 245, 127, 250, 110, 252, 229, 301, 230, 12,
1150 13, 85, 290, 291, 86, 239, 257, -164, 270, 271, 1149 13, 85, 290, 291, 86, 239, 257, -164, 270, 271,
1151 272, 273, 274, 275, 276, 277, 278, 279, 114, 260, 1150 272, 273, 274, 275, 276, 277, 278, 279, 114, 260,
1152 261, 128, 129, 130, 255, 256, 127, 313, 30, 331, 1151 261, 128, 129, 130, 255, 256, 127, 313, 30, 331,
1153 31, 225, 32, 226, 33, 34, 35, 134, 303, 393, 1152 31, 225, 32, 226, 33, 34, 35, 134, 303, 393,
1154 310, 1, 139, 122, 123, 282, 4, 319, 303, 306, 1153 310, 1, 139, 122, 123, 282, 4, 319, 303, 306,
1155 393, 227, 303, 135, 304, 128, 129, 130, 311, 303, 1154 393, 227, 303, 135, 304, 128, 129, 130, 311, 303,
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 0, 81, 0, 82, 0, 0, 0, 0, 0, 0, 1541 0, 81, 0, 82, 0, 0, 0, 0, 0, 0,
1543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1542 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1545 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1545 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1547 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1547 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1549 0, 0, 0, 81, 0, 82 1548 0, 0, 0, 81, 0, 82
1550 }; 1549 };
1551 1550
1552 #define yypact_value_is_default(yystate) \
1553 ((yystate) == (-329))
1554
1555 #define yytable_value_is_error(yytable_value) \
1556 YYID (0)
1557
1558 static const yytype_int16 yycheck[] = 1551 static const yytype_int16 yycheck[] =
1559 { 1552 {
1560 9, 154, 4, 158, 76, 160, 141, 91, 141, 3, 1553 9, 154, 4, 158, 76, 160, 141, 91, 141, 3,
1561 4, 9, 86, 87, 9, 146, 171, 76, 93, 94, 1554 4, 9, 86, 87, 9, 146, 171, 76, 93, 94,
1562 95, 96, 97, 98, 99, 100, 101, 102, 71, 84, 1555 95, 96, 97, 98, 99, 100, 101, 102, 71, 84,
1563 85, 33, 34, 35, 169, 170, 4, 226, 32, 254, 1556 85, 33, 34, 35, 169, 170, 4, 226, 32, 254,
1564 34, 191, 36, 193, 38, 39, 40, 196, 196, 377, 1557 34, 191, 36, 193, 38, 39, 40, 196, 196, 377,
1565 193, 109, 95, 212, 213, 190, 78, 196, 196, 212, 1558 193, 109, 95, 212, 213, 190, 78, 196, 196, 212,
1566 388, 211, 196, 212, 212, 33, 34, 35, 211, 196, 1559 388, 211, 196, 212, 212, 33, 34, 35, 211, 196,
1567 113, 102, 0, 212, 212, 84, 210, 33, 34, 197, 1560 113, 102, 0, 212, 212, 84, 210, 33, 34, 197,
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 #endif 2026 #endif
2034 2027
2035 #define YYRECOVERING() (!!yyerrstatus) 2028 #define YYRECOVERING() (!!yyerrstatus)
2036 2029
2037 #define YYBACKUP(Token, Value) \ 2030 #define YYBACKUP(Token, Value) \
2038 do \ 2031 do \
2039 if (yychar == YYEMPTY && yylen == 1) \ 2032 if (yychar == YYEMPTY && yylen == 1) \
2040 { \ 2033 { \
2041 yychar = (Token); \ 2034 yychar = (Token); \
2042 yylval = (Value); \ 2035 yylval = (Value); \
2036 yytoken = YYTRANSLATE (yychar); \
2043 YYPOPSTACK (1); \ 2037 YYPOPSTACK (1); \
2044 goto yybackup; \ 2038 goto yybackup; \
2045 } \ 2039 } \
2046 else \ 2040 else \
2047 { \ 2041 { \
2048 yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \ 2042 yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \
2049 YYERROR; \ 2043 YYERROR; \
2050 } \ 2044 } \
2051 while (YYID (0)) 2045 while (YYID (0))
2052 2046
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2288 if the built-in stack extension method is used). 2282 if the built-in stack extension method is used).
2289 2283
2290 Do not make this value too large; the results are undefined if 2284 Do not make this value too large; the results are undefined if
2291 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 2285 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2292 evaluated with infinite-precision integer arithmetic. */ 2286 evaluated with infinite-precision integer arithmetic. */
2293 2287
2294 #ifndef YYMAXDEPTH 2288 #ifndef YYMAXDEPTH
2295 # define YYMAXDEPTH 10000 2289 # define YYMAXDEPTH 10000
2296 #endif 2290 #endif
2297 2291
2292
2298 2293
2299 #if YYERROR_VERBOSE 2294 #if YYERROR_VERBOSE
2300 2295
2301 # ifndef yystrlen 2296 # ifndef yystrlen
2302 # if defined __GLIBC__ && defined _STRING_H 2297 # if defined __GLIBC__ && defined _STRING_H
2303 # define yystrlen strlen 2298 # define yystrlen strlen
2304 # else 2299 # else
2305 /* Return the length of YYSTR. */ 2300 /* Return the length of YYSTR. */
2306 #if (defined __STDC__ || defined __C99__FUNC__ \ 2301 #if (defined __STDC__ || defined __C99__FUNC__ \
2307 || defined __cplusplus || defined _MSC_VER) 2302 || defined __cplusplus || defined _MSC_VER)
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 do_not_strip_quotes: ; 2385 do_not_strip_quotes: ;
2391 } 2386 }
2392 2387
2393 if (! yyres) 2388 if (! yyres)
2394 return yystrlen (yystr); 2389 return yystrlen (yystr);
2395 2390
2396 return yystpcpy (yyres, yystr) - yyres; 2391 return yystpcpy (yyres, yystr) - yyres;
2397 } 2392 }
2398 # endif 2393 # endif
2399 2394
2400 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 2395 /* Copy into YYRESULT an error message about the unexpected token
2401 about the unexpected token YYTOKEN for the state stack whose top is 2396 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2402 YYSSP. 2397 including the terminating null byte. If YYRESULT is null, do not
2398 copy anything; just return the number of bytes that would be
2399 copied. As a special case, return 0 if an ordinary "syntax error"
2400 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2401 size calculation. */
2402 static YYSIZE_T
2403 yysyntax_error (char *yyresult, int yystate, int yychar)
2404 {
2405 int yyn = yypact[yystate];
2403 2406
2404 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 2407 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2405 not large enough to hold the message. In that case, also set 2408 return 0;
2406 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 2409 else
2407 required number of bytes is too large to store. */ 2410 {
2408 static int 2411 int yytype = YYTRANSLATE (yychar);
2409 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 2412 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2410 yytype_int16 *yyssp, int yytoken) 2413 YYSIZE_T yysize = yysize0;
2411 { 2414 YYSIZE_T yysize1;
2412 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 2415 int yysize_overflow = 0;
2413 YYSIZE_T yysize = yysize0; 2416 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2414 YYSIZE_T yysize1; 2417 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2415 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 2418 int yyx;
2416 /* Internationalized format string. */
2417 const char *yyformat = 0;
2418 /* Arguments of yyformat. */
2419 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2420 /* Number of reported tokens (one for the "unexpected", one per
2421 "expected"). */
2422 int yycount = 0;
2423 2419
2424 /* There are many possibilities here to consider: 2420 # if 0
2425 - Assume YYFAIL is not used. It's too flawed to consider. See 2421 /* This is so xgettext sees the translatable formats that are
2426 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 2422 » constructed on the fly. */
2427 for details. YYERROR is fine as it does not invoke this 2423 YY_("syntax error, unexpected %s");
2428 function. 2424 YY_("syntax error, unexpected %s, expecting %s");
2429 - If this state is a consistent state with a default action, then 2425 YY_("syntax error, unexpected %s, expecting %s or %s");
2430 the only way this function was invoked is if the default action 2426 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2431 is an error action. In that case, don't check for expected 2427 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2432 tokens because there are none. 2428 # endif
2433 - The only way there can be no lookahead present (in yychar) is if 2429 char *yyfmt;
2434 this state is a consistent state with a default action. Thus, 2430 char const *yyf;
2435 detecting the absence of a lookahead is sufficient to determine 2431 static char const yyunexpected[] = "syntax error, unexpected %s";
2436 that there is no unexpected or expected token to report. In that 2432 static char const yyexpecting[] = ", expecting %s";
2437 case, just report a simple "syntax error". 2433 static char const yyor[] = " or %s";
2438 - Don't assume there isn't a lookahead just because this state is a 2434 char yyformat[sizeof yyunexpected
2439 consistent state with a default action. There might have been a 2435 » » + sizeof yyexpecting - 1
2440 previous inconsistent state, consistent state with a non-default 2436 » » + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2441 action, or user semantic action that manipulated yychar. 2437 » » * (sizeof yyor - 1))];
2442 - Of course, the expected token list depends on states to have 2438 char const *yyprefix = yyexpecting;
2443 correct lookahead information, and it depends on the parser not
2444 to perform extra reductions after fetching a lookahead from the
2445 scanner and before detecting a syntax error. Thus, state merging
2446 (from LALR or IELR) and default reductions corrupt the expected
2447 token list. However, the list is correct for canonical LR with
2448 one exception: it will still contain any token that will not be
2449 accepted due to an error action in a later state.
2450 */
2451 if (yytoken != YYEMPTY)
2452 {
2453 int yyn = yypact[*yyssp];
2454 yyarg[yycount++] = yytname[yytoken];
2455 if (!yypact_value_is_default (yyn))
2456 {
2457 /* Start YYX at -YYN if negative to avoid negative indexes in
2458 YYCHECK. In other words, skip the first -YYN actions for
2459 this state because they are default actions. */
2460 int yyxbegin = yyn < 0 ? -yyn : 0;
2461 /* Stay within bounds of both yycheck and yytname. */
2462 int yychecklim = YYLAST - yyn + 1;
2463 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2464 int yyx;
2465 2439
2466 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2440 /* Start YYX at -YYN if negative to avoid negative indexes in
2467 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 2441 » YYCHECK. */
2468 && !yytable_value_is_error (yytable[yyx + yyn])) 2442 int yyxbegin = yyn < 0 ? -yyn : 0;
2469 { 2443
2470 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 2444 /* Stay within bounds of both yycheck and yytname. */
2471 { 2445 int yychecklim = YYLAST - yyn + 1;
2472 yycount = 1; 2446 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2473 yysize = yysize0; 2447 int yycount = 1;
2474 break; 2448
2475 } 2449 yyarg[0] = yytname[yytype];
2476 yyarg[yycount++] = yytname[yyx]; 2450 yyfmt = yystpcpy (yyformat, yyunexpected);
2477 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 2451
2478 if (! (yysize <= yysize1 2452 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2479 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 2453 » if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2480 return 2; 2454 » {
2481 yysize = yysize1; 2455 » if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2482 } 2456 » {
2483 } 2457 » » yycount = 1;
2458 » » yysize = yysize0;
2459 » » yyformat[sizeof yyunexpected - 1] = '\0';
2460 » » break;
2461 » }
2462 » yyarg[yycount++] = yytname[yyx];
2463 » yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2464 » yysize_overflow |= (yysize1 < yysize);
2465 » yysize = yysize1;
2466 » yyfmt = yystpcpy (yyfmt, yyprefix);
2467 » yyprefix = yyor;
2468 » }
2469
2470 yyf = YY_(yyformat);
2471 yysize1 = yysize + yystrlen (yyf);
2472 yysize_overflow |= (yysize1 < yysize);
2473 yysize = yysize1;
2474
2475 if (yysize_overflow)
2476 » return YYSIZE_MAXIMUM;
2477
2478 if (yyresult)
2479 » {
2480 » /* Avoid sprintf, as that infringes on the user's name space.
2481 » Don't have undefined behavior even if the translation
2482 » produced a string with the wrong number of "%s"s. */
2483 » char *yyp = yyresult;
2484 » int yyi = 0;
2485 » while ((*yyp = *yyf) != '\0')
2486 » {
2487 » if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2488 » » {
2489 » » yyp += yytnamerr (yyp, yyarg[yyi++]);
2490 » » yyf += 2;
2491 » » }
2492 » else
2493 » » {
2494 » » yyp++;
2495 » » yyf++;
2496 » » }
2497 » }
2498 » }
2499 return yysize;
2484 } 2500 }
2485
2486 switch (yycount)
2487 {
2488 # define YYCASE_(N, S) \
2489 case N: \
2490 yyformat = S; \
2491 break
2492 YYCASE_(0, YY_("syntax error"));
2493 YYCASE_(1, YY_("syntax error, unexpected %s"));
2494 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2495 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2496 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2497 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or % s"));
2498 # undef YYCASE_
2499 }
2500
2501 yysize1 = yysize + yystrlen (yyformat);
2502 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2503 return 2;
2504 yysize = yysize1;
2505
2506 if (*yymsg_alloc < yysize)
2507 {
2508 *yymsg_alloc = 2 * yysize;
2509 if (! (yysize <= *yymsg_alloc
2510 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2511 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2512 return 1;
2513 }
2514
2515 /* Avoid sprintf, as that infringes on the user's name space.
2516 Don't have undefined behavior even if the translation
2517 produced a string with the wrong number of "%s"s. */
2518 {
2519 char *yyp = *yymsg;
2520 int yyi = 0;
2521 while ((*yyp = *yyformat) != '\0')
2522 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2523 {
2524 yyp += yytnamerr (yyp, yyarg[yyi++]);
2525 yyformat += 2;
2526 }
2527 else
2528 {
2529 yyp++;
2530 yyformat++;
2531 }
2532 }
2533 return 0;
2534 } 2501 }
2535 #endif /* YYERROR_VERBOSE */ 2502 #endif /* YYERROR_VERBOSE */
2503
2536 2504
2537 /*-----------------------------------------------. 2505 /*-----------------------------------------------.
2538 | Release the memory associated to this symbol. | 2506 | Release the memory associated to this symbol. |
2539 `-----------------------------------------------*/ 2507 `-----------------------------------------------*/
2540 2508
2541 /*ARGSUSED*/ 2509 /*ARGSUSED*/
2542 #if (defined __STDC__ || defined __C99__FUNC__ \ 2510 #if (defined __STDC__ || defined __C99__FUNC__ \
2543 || defined __cplusplus || defined _MSC_VER) 2511 || defined __cplusplus || defined _MSC_VER)
2544 static void 2512 static void
2545 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio np, struct _mesa_glsl_parse_state *state) 2513 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio np, struct _mesa_glsl_parse_state *state)
(...skipping 16 matching lines...) Expand all
2562 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 2530 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2563 2531
2564 switch (yytype) 2532 switch (yytype)
2565 { 2533 {
2566 2534
2567 default: 2535 default:
2568 break; 2536 break;
2569 } 2537 }
2570 } 2538 }
2571 2539
2572
2573 /* Prevent warnings from -Wmissing-prototypes. */ 2540 /* Prevent warnings from -Wmissing-prototypes. */
2574 #ifdef YYPARSE_PARAM 2541 #ifdef YYPARSE_PARAM
2575 #if defined __STDC__ || defined __cplusplus 2542 #if defined __STDC__ || defined __cplusplus
2576 int yyparse (void *YYPARSE_PARAM); 2543 int yyparse (void *YYPARSE_PARAM);
2577 #else 2544 #else
2578 int yyparse (); 2545 int yyparse ();
2579 #endif 2546 #endif
2580 #else /* ! YYPARSE_PARAM */ 2547 #else /* ! YYPARSE_PARAM */
2581 #if defined __STDC__ || defined __cplusplus 2548 #if defined __STDC__ || defined __cplusplus
2582 int yyparse (struct _mesa_glsl_parse_state *state); 2549 int yyparse (struct _mesa_glsl_parse_state *state);
2583 #else 2550 #else
2584 int yyparse (); 2551 int yyparse ();
2585 #endif 2552 #endif
2586 #endif /* ! YYPARSE_PARAM */ 2553 #endif /* ! YYPARSE_PARAM */
2587 2554
2588 2555
2589 /*----------. 2556
2590 | yyparse. | 2557
2591 `----------*/ 2558
2559 /*-------------------------.
2560 | yyparse or yypush_parse. |
2561 `-------------------------*/
2592 2562
2593 #ifdef YYPARSE_PARAM 2563 #ifdef YYPARSE_PARAM
2594 #if (defined __STDC__ || defined __C99__FUNC__ \ 2564 #if (defined __STDC__ || defined __C99__FUNC__ \
2595 || defined __cplusplus || defined _MSC_VER) 2565 || defined __cplusplus || defined _MSC_VER)
2596 int 2566 int
2597 yyparse (void *YYPARSE_PARAM) 2567 yyparse (void *YYPARSE_PARAM)
2598 #else 2568 #else
2599 int 2569 int
2600 yyparse (YYPARSE_PARAM) 2570 yyparse (YYPARSE_PARAM)
2601 void *YYPARSE_PARAM; 2571 void *YYPARSE_PARAM;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 yylsp = yyls; 2670 yylsp = yyls;
2701 2671
2702 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 2672 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2703 /* Initialize the default location before parsing starts. */ 2673 /* Initialize the default location before parsing starts. */
2704 yylloc.first_line = yylloc.last_line = 1; 2674 yylloc.first_line = yylloc.last_line = 1;
2705 yylloc.first_column = yylloc.last_column = 1; 2675 yylloc.first_column = yylloc.last_column = 1;
2706 #endif 2676 #endif
2707 2677
2708 /* User initialization code. */ 2678 /* User initialization code. */
2709 2679
2710 /* Line 1590 of yacc.c */ 2680 /* Line 1251 of yacc.c */
2711 #line 41 "glsl_parser.ypp" 2681 #line 41 "glsl_parser.ypp"
2712 { 2682 {
2713 yylloc.first_line = 1; 2683 yylloc.first_line = 1;
2714 yylloc.first_column = 1; 2684 yylloc.first_column = 1;
2715 yylloc.last_line = 1; 2685 yylloc.last_line = 1;
2716 yylloc.last_column = 1; 2686 yylloc.last_column = 1;
2717 yylloc.source = 0; 2687 yylloc.source = 0;
2718 } 2688 }
2719 2689
2720 /* Line 1590 of yacc.c */ 2690 /* Line 1251 of yacc.c */
2721 #line 2722 "glsl_parser.cpp" 2691 #line 2691 "glsl_parser.cpp"
2722 yylsp[0] = yylloc; 2692 yylsp[0] = yylloc;
2723 2693
2724 goto yysetstate; 2694 goto yysetstate;
2725 2695
2726 /*------------------------------------------------------------. 2696 /*------------------------------------------------------------.
2727 | yynewstate -- Push a new state, which is found in yystate. | 2697 | yynewstate -- Push a new state, which is found in yystate. |
2728 `------------------------------------------------------------*/ 2698 `------------------------------------------------------------*/
2729 yynewstate: 2699 yynewstate:
2730 /* In all cases, when you get here, the value and location stacks 2700 /* In all cases, when you get here, the value and location stacks
2731 have just been pushed. So pushing a state here evens the stacks. */ 2701 have just been pushed. So pushing a state here evens the stacks. */
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 /*-----------. 2780 /*-----------.
2811 | yybackup. | 2781 | yybackup. |
2812 `-----------*/ 2782 `-----------*/
2813 yybackup: 2783 yybackup:
2814 2784
2815 /* Do appropriate processing given the current state. Read a 2785 /* Do appropriate processing given the current state. Read a
2816 lookahead token if we need one and don't already have one. */ 2786 lookahead token if we need one and don't already have one. */
2817 2787
2818 /* First try to decide what to do without reference to lookahead token. */ 2788 /* First try to decide what to do without reference to lookahead token. */
2819 yyn = yypact[yystate]; 2789 yyn = yypact[yystate];
2820 if (yypact_value_is_default (yyn)) 2790 if (yyn == YYPACT_NINF)
2821 goto yydefault; 2791 goto yydefault;
2822 2792
2823 /* Not known => get a lookahead token if don't already have one. */ 2793 /* Not known => get a lookahead token if don't already have one. */
2824 2794
2825 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 2795 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2826 if (yychar == YYEMPTY) 2796 if (yychar == YYEMPTY)
2827 { 2797 {
2828 YYDPRINTF ((stderr, "Reading a token: ")); 2798 YYDPRINTF ((stderr, "Reading a token: "));
2829 yychar = YYLEX; 2799 yychar = YYLEX;
2830 } 2800 }
(...skipping 10 matching lines...) Expand all
2841 } 2811 }
2842 2812
2843 /* If the proper action on seeing token YYTOKEN is to reduce or to 2813 /* If the proper action on seeing token YYTOKEN is to reduce or to
2844 detect an error, take that action. */ 2814 detect an error, take that action. */
2845 yyn += yytoken; 2815 yyn += yytoken;
2846 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2816 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2847 goto yydefault; 2817 goto yydefault;
2848 yyn = yytable[yyn]; 2818 yyn = yytable[yyn];
2849 if (yyn <= 0) 2819 if (yyn <= 0)
2850 { 2820 {
2851 if (yytable_value_is_error (yyn)) 2821 if (yyn == 0 || yyn == YYTABLE_NINF)
2852 goto yyerrlab; 2822 » goto yyerrlab;
2853 yyn = -yyn; 2823 yyn = -yyn;
2854 goto yyreduce; 2824 goto yyreduce;
2855 } 2825 }
2856 2826
2857 /* Count tokens shifted since error; after three, turn off error 2827 /* Count tokens shifted since error; after three, turn off error
2858 status. */ 2828 status. */
2859 if (yyerrstatus) 2829 if (yyerrstatus)
2860 yyerrstatus--; 2830 yyerrstatus--;
2861 2831
2862 /* Shift the lookahead token. */ 2832 /* Shift the lookahead token. */
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2898 GCC warning that YYVAL may be used uninitialized. */ 2868 GCC warning that YYVAL may be used uninitialized. */
2899 yyval = yyvsp[1-yylen]; 2869 yyval = yyvsp[1-yylen];
2900 2870
2901 /* Default location. */ 2871 /* Default location. */
2902 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); 2872 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2903 YY_REDUCE_PRINT (yyn); 2873 YY_REDUCE_PRINT (yyn);
2904 switch (yyn) 2874 switch (yyn)
2905 { 2875 {
2906 case 2: 2876 case 2:
2907 2877
2908 /* Line 1806 of yacc.c */ 2878 /* Line 1464 of yacc.c */
2909 #line 214 "glsl_parser.ypp" 2879 #line 214 "glsl_parser.ypp"
2910 { 2880 {
2911 _mesa_glsl_initialize_types(state); 2881 _mesa_glsl_initialize_types(state);
2912 » } 2882 » ;}
2913 break; 2883 break;
2914 2884
2915 case 5: 2885 case 5:
2916 2886
2917 /* Line 1806 of yacc.c */ 2887 /* Line 1464 of yacc.c */
2918 #line 223 "glsl_parser.ypp" 2888 #line 223 "glsl_parser.ypp"
2919 { 2889 {
2920 switch ((yyvsp[(2) - (3)].n)) { 2890 switch ((yyvsp[(2) - (3)].n)) {
2921 case 100: 2891 case 100:
2922 state->es_shader = true; 2892 state->es_shader = true;
2923 case 110: 2893 case 110:
2924 case 120: 2894 case 120:
2925 case 130: 2895 case 130:
2926 /* FINISHME: Check against implementation support versions. */ 2896 /* FINISHME: Check against implementation support versions. */
2927 state->language_version = (yyvsp[(2) - (3)].n); 2897 state->language_version = (yyvsp[(2) - (3)].n);
2928 break; 2898 break;
2929 default: 2899 default:
2930 _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "Shading language ve rsion" 2900 _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "Shading language ve rsion"
2931 "%u is not supported\n", (yyvsp[(2) - (3)].n)); 2901 "%u is not supported\n", (yyvsp[(2) - (3)].n));
2932 break; 2902 break;
2933 } 2903 }
2934 » } 2904 » ;}
2935 break; 2905 break;
2936 2906
2937 case 12: 2907 case 12:
2938 2908
2939 /* Line 1806 of yacc.c */ 2909 /* Line 1464 of yacc.c */
2940 #line 255 "glsl_parser.ypp" 2910 #line 255 "glsl_parser.ypp"
2941 { 2911 {
2942 if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (y ylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) { 2912 if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (y ylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) {
2943 YYERROR; 2913 YYERROR;
2944 } 2914 }
2945 » } 2915 » ;}
2946 break; 2916 break;
2947 2917
2948 case 13: 2918 case 13:
2949 2919
2950 /* Line 1806 of yacc.c */ 2920 /* Line 1464 of yacc.c */
2951 #line 264 "glsl_parser.ypp" 2921 #line 264 "glsl_parser.ypp"
2952 { 2922 {
2953 /* FINISHME: The NULL test is only required because 'precision' 2923 /* FINISHME: The NULL test is only required because 'precision'
2954 * FINISHME: statements are not yet supported. 2924 * FINISHME: statements are not yet supported.
2955 */ 2925 */
2956 if ((yyvsp[(1) - (1)].node) != NULL) 2926 if ((yyvsp[(1) - (1)].node) != NULL)
2957 state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link) ; 2927 state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link) ;
2958 » } 2928 » ;}
2959 break; 2929 break;
2960 2930
2961 case 14: 2931 case 14:
2962 2932
2963 /* Line 1806 of yacc.c */ 2933 /* Line 1464 of yacc.c */
2964 #line 272 "glsl_parser.ypp" 2934 #line 272 "glsl_parser.ypp"
2965 { 2935 {
2966 /* FINISHME: The NULL test is only required because 'precision' 2936 /* FINISHME: The NULL test is only required because 'precision'
2967 * FINISHME: statements are not yet supported. 2937 * FINISHME: statements are not yet supported.
2968 */ 2938 */
2969 if ((yyvsp[(2) - (2)].node) != NULL) 2939 if ((yyvsp[(2) - (2)].node) != NULL)
2970 state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link) ; 2940 state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link) ;
2971 » } 2941 » ;}
2972 break; 2942 break;
2973 2943
2974 case 16: 2944 case 16:
2975 2945
2976 /* Line 1806 of yacc.c */ 2946 /* Line 1464 of yacc.c */
2977 #line 287 "glsl_parser.ypp" 2947 #line 287 "glsl_parser.ypp"
2978 { 2948 {
2979 void *ctx = state; 2949 void *ctx = state;
2980 (yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NU LL, NULL); 2950 (yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NU LL, NULL);
2981 (yyval.expression)->set_location(yylloc); 2951 (yyval.expression)->set_location(yylloc);
2982 (yyval.expression)->primary_expression.identifier = (yyvsp[(1) - (1)] .identifier); 2952 (yyval.expression)->primary_expression.identifier = (yyvsp[(1) - (1)] .identifier);
2983 » } 2953 » ;}
2984 break; 2954 break;
2985 2955
2986 case 17: 2956 case 17:
2987 2957
2988 /* Line 1806 of yacc.c */ 2958 /* Line 1464 of yacc.c */
2989 #line 294 "glsl_parser.ypp" 2959 #line 294 "glsl_parser.ypp"
2990 { 2960 {
2991 void *ctx = state; 2961 void *ctx = state;
2992 (yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL); 2962 (yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL);
2993 (yyval.expression)->set_location(yylloc); 2963 (yyval.expression)->set_location(yylloc);
2994 (yyval.expression)->primary_expression.int_constant = (yyvsp[(1) - (1 )].n); 2964 (yyval.expression)->primary_expression.int_constant = (yyvsp[(1) - (1 )].n);
2995 » } 2965 » ;}
2996 break; 2966 break;
2997 2967
2998 case 18: 2968 case 18:
2999 2969
3000 /* Line 1806 of yacc.c */ 2970 /* Line 1464 of yacc.c */
3001 #line 301 "glsl_parser.ypp" 2971 #line 301 "glsl_parser.ypp"
3002 { 2972 {
3003 void *ctx = state; 2973 void *ctx = state;
3004 (yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL); 2974 (yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL);
3005 (yyval.expression)->set_location(yylloc); 2975 (yyval.expression)->set_location(yylloc);
3006 (yyval.expression)->primary_expression.uint_constant = (yyvsp[(1) - ( 1)].n); 2976 (yyval.expression)->primary_expression.uint_constant = (yyvsp[(1) - ( 1)].n);
3007 » } 2977 » ;}
3008 break; 2978 break;
3009 2979
3010 case 19: 2980 case 19:
3011 2981
3012 /* Line 1806 of yacc.c */ 2982 /* Line 1464 of yacc.c */
3013 #line 308 "glsl_parser.ypp" 2983 #line 308 "glsl_parser.ypp"
3014 { 2984 {
3015 void *ctx = state; 2985 void *ctx = state;
3016 (yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL , NULL, NULL); 2986 (yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL , NULL, NULL);
3017 (yyval.expression)->set_location(yylloc); 2987 (yyval.expression)->set_location(yylloc);
3018 (yyval.expression)->primary_expression.float_constant = (yyvsp[(1) - (1)].real); 2988 (yyval.expression)->primary_expression.float_constant = (yyvsp[(1) - (1)].real);
3019 » } 2989 » ;}
3020 break; 2990 break;
3021 2991
3022 case 20: 2992 case 20:
3023 2993
3024 /* Line 1806 of yacc.c */ 2994 /* Line 1464 of yacc.c */
3025 #line 315 "glsl_parser.ypp" 2995 #line 315 "glsl_parser.ypp"
3026 { 2996 {
3027 void *ctx = state; 2997 void *ctx = state;
3028 (yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL); 2998 (yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL);
3029 (yyval.expression)->set_location(yylloc); 2999 (yyval.expression)->set_location(yylloc);
3030 (yyval.expression)->primary_expression.bool_constant = (yyvsp[(1) - ( 1)].n); 3000 (yyval.expression)->primary_expression.bool_constant = (yyvsp[(1) - ( 1)].n);
3031 » } 3001 » ;}
3032 break; 3002 break;
3033 3003
3034 case 21: 3004 case 21:
3035 3005
3036 /* Line 1806 of yacc.c */ 3006 /* Line 1464 of yacc.c */
3037 #line 322 "glsl_parser.ypp" 3007 #line 322 "glsl_parser.ypp"
3038 { 3008 {
3039 (yyval.expression) = (yyvsp[(2) - (3)].expression); 3009 (yyval.expression) = (yyvsp[(2) - (3)].expression);
3040 » } 3010 » ;}
3041 break; 3011 break;
3042 3012
3043 case 23: 3013 case 23:
3044 3014
3045 /* Line 1806 of yacc.c */ 3015 /* Line 1464 of yacc.c */
3046 #line 330 "glsl_parser.ypp" 3016 #line 330 "glsl_parser.ypp"
3047 { 3017 {
3048 void *ctx = state; 3018 void *ctx = state;
3049 (yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[ (1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL); 3019 (yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[ (1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL);
3050 (yyval.expression)->set_location(yylloc); 3020 (yyval.expression)->set_location(yylloc);
3051 » } 3021 » ;}
3052 break; 3022 break;
3053 3023
3054 case 24: 3024 case 24:
3055 3025
3056 /* Line 1806 of yacc.c */ 3026 /* Line 1464 of yacc.c */
3057 #line 336 "glsl_parser.ypp" 3027 #line 336 "glsl_parser.ypp"
3058 { 3028 {
3059 (yyval.expression) = (yyvsp[(1) - (1)].expression); 3029 (yyval.expression) = (yyvsp[(1) - (1)].expression);
3060 » } 3030 » ;}
3061 break; 3031 break;
3062 3032
3063 case 25: 3033 case 25:
3064 3034
3065 /* Line 1806 of yacc.c */ 3035 /* Line 1464 of yacc.c */
3066 #line 340 "glsl_parser.ypp" 3036 #line 340 "glsl_parser.ypp"
3067 { 3037 {
3068 void *ctx = state; 3038 void *ctx = state;
3069 (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yy vsp[(1) - (3)].expression), NULL, NULL); 3039 (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yy vsp[(1) - (3)].expression), NULL, NULL);
3070 (yyval.expression)->set_location(yylloc); 3040 (yyval.expression)->set_location(yylloc);
3071 (yyval.expression)->primary_expression.identifier = (yyvsp[(3) - (3)] .identifier); 3041 (yyval.expression)->primary_expression.identifier = (yyvsp[(3) - (3)] .identifier);
3072 » } 3042 » ;}
3073 break; 3043 break;
3074 3044
3075 case 26: 3045 case 26:
3076 3046
3077 /* Line 1806 of yacc.c */ 3047 /* Line 1464 of yacc.c */
3078 #line 347 "glsl_parser.ypp" 3048 #line 347 "glsl_parser.ypp"
3079 { 3049 {
3080 void *ctx = state; 3050 void *ctx = state;
3081 (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL); 3051 (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL);
3082 (yyval.expression)->set_location(yylloc); 3052 (yyval.expression)->set_location(yylloc);
3083 » } 3053 » ;}
3084 break; 3054 break;
3085 3055
3086 case 27: 3056 case 27:
3087 3057
3088 /* Line 1806 of yacc.c */ 3058 /* Line 1464 of yacc.c */
3089 #line 353 "glsl_parser.ypp" 3059 #line 353 "glsl_parser.ypp"
3090 { 3060 {
3091 void *ctx = state; 3061 void *ctx = state;
3092 (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL); 3062 (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL);
3093 (yyval.expression)->set_location(yylloc); 3063 (yyval.expression)->set_location(yylloc);
3094 » } 3064 » ;}
3095 break; 3065 break;
3096 3066
3097 case 31: 3067 case 31:
3098 3068
3099 /* Line 1806 of yacc.c */ 3069 /* Line 1464 of yacc.c */
3100 #line 371 "glsl_parser.ypp" 3070 #line 371 "glsl_parser.ypp"
3101 { 3071 {
3102 void *ctx = state; 3072 void *ctx = state;
3103 (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yy vsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); 3073 (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yy vsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
3104 (yyval.expression)->set_location(yylloc); 3074 (yyval.expression)->set_location(yylloc);
3105 » } 3075 » ;}
3106 break; 3076 break;
3107 3077
3108 case 36: 3078 case 36:
3109 3079
3110 /* Line 1806 of yacc.c */ 3080 /* Line 1464 of yacc.c */
3111 #line 390 "glsl_parser.ypp" 3081 #line 390 "glsl_parser.ypp"
3112 { 3082 {
3113 (yyval.expression) = (yyvsp[(1) - (2)].expression); 3083 (yyval.expression) = (yyvsp[(1) - (2)].expression);
3114 (yyval.expression)->set_location(yylloc); 3084 (yyval.expression)->set_location(yylloc);
3115 (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].express ion)->link); 3085 (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].express ion)->link);
3116 » } 3086 » ;}
3117 break; 3087 break;
3118 3088
3119 case 37: 3089 case 37:
3120 3090
3121 /* Line 1806 of yacc.c */ 3091 /* Line 1464 of yacc.c */
3122 #line 396 "glsl_parser.ypp" 3092 #line 396 "glsl_parser.ypp"
3123 { 3093 {
3124 (yyval.expression) = (yyvsp[(1) - (3)].expression); 3094 (yyval.expression) = (yyvsp[(1) - (3)].expression);
3125 (yyval.expression)->set_location(yylloc); 3095 (yyval.expression)->set_location(yylloc);
3126 (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].express ion)->link); 3096 (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].express ion)->link);
3127 » } 3097 » ;}
3128 break; 3098 break;
3129 3099
3130 case 39: 3100 case 39:
3131 3101
3132 /* Line 1806 of yacc.c */ 3102 /* Line 1464 of yacc.c */
3133 #line 412 "glsl_parser.ypp" 3103 #line 412 "glsl_parser.ypp"
3134 { 3104 {
3135 void *ctx = state; 3105 void *ctx = state;
3136 (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1 )].type_specifier)); 3106 (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1 )].type_specifier));
3137 (yyval.expression)->set_location(yylloc); 3107 (yyval.expression)->set_location(yylloc);
3138 » } 3108 » ;}
3139 break; 3109 break;
3140 3110
3141 case 40: 3111 case 40:
3142 3112
3143 /* Line 1806 of yacc.c */ 3113 /* Line 1464 of yacc.c */
3144 #line 418 "glsl_parser.ypp" 3114 #line 418 "glsl_parser.ypp"
3145 { 3115 {
3146 void *ctx = state; 3116 void *ctx = state;
3147 ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].id entifier)); 3117 ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].id entifier));
3148 (yyval.expression) = new(ctx) ast_function_expression(callee); 3118 (yyval.expression) = new(ctx) ast_function_expression(callee);
3149 (yyval.expression)->set_location(yylloc); 3119 (yyval.expression)->set_location(yylloc);
3150 » } 3120 » ;}
3151 break; 3121 break;
3152 3122
3153 case 41: 3123 case 41:
3154 3124
3155 /* Line 1806 of yacc.c */ 3125 /* Line 1464 of yacc.c */
3156 #line 425 "glsl_parser.ypp" 3126 #line 425 "glsl_parser.ypp"
3157 { 3127 {
3158 void *ctx = state; 3128 void *ctx = state;
3159 ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].id entifier)); 3129 ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].id entifier));
3160 (yyval.expression) = new(ctx) ast_function_expression(callee); 3130 (yyval.expression) = new(ctx) ast_function_expression(callee);
3161 (yyval.expression)->set_location(yylloc); 3131 (yyval.expression)->set_location(yylloc);
3162 » } 3132 » ;}
3163 break; 3133 break;
3164 3134
3165 case 43: 3135 case 43:
3166 3136
3167 /* Line 1806 of yacc.c */ 3137 /* Line 1464 of yacc.c */
3168 #line 437 "glsl_parser.ypp" 3138 #line 437 "glsl_parser.ypp"
3169 { 3139 {
3170 void *ctx = state; 3140 void *ctx = state;
3171 (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL); 3141 (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL);
3172 (yyval.expression)->set_location(yylloc); 3142 (yyval.expression)->set_location(yylloc);
3173 » } 3143 » ;}
3174 break; 3144 break;
3175 3145
3176 case 44: 3146 case 44:
3177 3147
3178 /* Line 1806 of yacc.c */ 3148 /* Line 1464 of yacc.c */
3179 #line 443 "glsl_parser.ypp" 3149 #line 443 "glsl_parser.ypp"
3180 { 3150 {
3181 void *ctx = state; 3151 void *ctx = state;
3182 (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL); 3152 (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL);
3183 (yyval.expression)->set_location(yylloc); 3153 (yyval.expression)->set_location(yylloc);
3184 » } 3154 » ;}
3185 break; 3155 break;
3186 3156
3187 case 45: 3157 case 45:
3188 3158
3189 /* Line 1806 of yacc.c */ 3159 /* Line 1464 of yacc.c */
3190 #line 449 "glsl_parser.ypp" 3160 #line 449 "glsl_parser.ypp"
3191 { 3161 {
3192 void *ctx = state; 3162 void *ctx = state;
3193 (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (y yvsp[(2) - (2)].expression), NULL, NULL); 3163 (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (y yvsp[(2) - (2)].expression), NULL, NULL);
3194 (yyval.expression)->set_location(yylloc); 3164 (yyval.expression)->set_location(yylloc);
3195 » } 3165 » ;}
3196 break; 3166 break;
3197 3167
3198 case 46: 3168 case 46:
3199 3169
3200 /* Line 1806 of yacc.c */ 3170 /* Line 1464 of yacc.c */
3201 #line 458 "glsl_parser.ypp" 3171 #line 458 "glsl_parser.ypp"
3202 { (yyval.n) = ast_plus; } 3172 { (yyval.n) = ast_plus; ;}
3203 break; 3173 break;
3204 3174
3205 case 47: 3175 case 47:
3206 3176
3207 /* Line 1806 of yacc.c */ 3177 /* Line 1464 of yacc.c */
3208 #line 459 "glsl_parser.ypp" 3178 #line 459 "glsl_parser.ypp"
3209 { (yyval.n) = ast_neg; } 3179 { (yyval.n) = ast_neg; ;}
3210 break; 3180 break;
3211 3181
3212 case 48: 3182 case 48:
3213 3183
3214 /* Line 1806 of yacc.c */ 3184 /* Line 1464 of yacc.c */
3215 #line 460 "glsl_parser.ypp" 3185 #line 460 "glsl_parser.ypp"
3216 { (yyval.n) = ast_logic_not; } 3186 { (yyval.n) = ast_logic_not; ;}
3217 break; 3187 break;
3218 3188
3219 case 49: 3189 case 49:
3220 3190
3221 /* Line 1806 of yacc.c */ 3191 /* Line 1464 of yacc.c */
3222 #line 461 "glsl_parser.ypp" 3192 #line 461 "glsl_parser.ypp"
3223 { (yyval.n) = ast_bit_not; } 3193 { (yyval.n) = ast_bit_not; ;}
3224 break; 3194 break;
3225 3195
3226 case 51: 3196 case 51:
3227 3197
3228 /* Line 1806 of yacc.c */ 3198 /* Line 1464 of yacc.c */
3229 #line 467 "glsl_parser.ypp" 3199 #line 467 "glsl_parser.ypp"
3230 { 3200 {
3231 void *ctx = state; 3201 void *ctx = state;
3232 (yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3202 (yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3233 (yyval.expression)->set_location(yylloc); 3203 (yyval.expression)->set_location(yylloc);
3234 » } 3204 » ;}
3235 break; 3205 break;
3236 3206
3237 case 52: 3207 case 52:
3238 3208
3239 /* Line 1806 of yacc.c */ 3209 /* Line 1464 of yacc.c */
3240 #line 473 "glsl_parser.ypp" 3210 #line 473 "glsl_parser.ypp"
3241 { 3211 {
3242 void *ctx = state; 3212 void *ctx = state;
3243 (yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3213 (yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3244 (yyval.expression)->set_location(yylloc); 3214 (yyval.expression)->set_location(yylloc);
3245 » } 3215 » ;}
3246 break; 3216 break;
3247 3217
3248 case 53: 3218 case 53:
3249 3219
3250 /* Line 1806 of yacc.c */ 3220 /* Line 1464 of yacc.c */
3251 #line 479 "glsl_parser.ypp" 3221 #line 479 "glsl_parser.ypp"
3252 { 3222 {
3253 void *ctx = state; 3223 void *ctx = state;
3254 (yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3224 (yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3255 (yyval.expression)->set_location(yylloc); 3225 (yyval.expression)->set_location(yylloc);
3256 » } 3226 » ;}
3257 break; 3227 break;
3258 3228
3259 case 55: 3229 case 55:
3260 3230
3261 /* Line 1806 of yacc.c */ 3231 /* Line 1464 of yacc.c */
3262 #line 489 "glsl_parser.ypp" 3232 #line 489 "glsl_parser.ypp"
3263 { 3233 {
3264 void *ctx = state; 3234 void *ctx = state;
3265 (yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3235 (yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3266 (yyval.expression)->set_location(yylloc); 3236 (yyval.expression)->set_location(yylloc);
3267 » } 3237 » ;}
3268 break; 3238 break;
3269 3239
3270 case 56: 3240 case 56:
3271 3241
3272 /* Line 1806 of yacc.c */ 3242 /* Line 1464 of yacc.c */
3273 #line 495 "glsl_parser.ypp" 3243 #line 495 "glsl_parser.ypp"
3274 { 3244 {
3275 void *ctx = state; 3245 void *ctx = state;
3276 (yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3246 (yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3277 (yyval.expression)->set_location(yylloc); 3247 (yyval.expression)->set_location(yylloc);
3278 » } 3248 » ;}
3279 break; 3249 break;
3280 3250
3281 case 58: 3251 case 58:
3282 3252
3283 /* Line 1806 of yacc.c */ 3253 /* Line 1464 of yacc.c */
3284 #line 505 "glsl_parser.ypp" 3254 #line 505 "glsl_parser.ypp"
3285 { 3255 {
3286 void *ctx = state; 3256 void *ctx = state;
3287 (yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3257 (yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3288 (yyval.expression)->set_location(yylloc); 3258 (yyval.expression)->set_location(yylloc);
3289 » } 3259 » ;}
3290 break; 3260 break;
3291 3261
3292 case 59: 3262 case 59:
3293 3263
3294 /* Line 1806 of yacc.c */ 3264 /* Line 1464 of yacc.c */
3295 #line 511 "glsl_parser.ypp" 3265 #line 511 "glsl_parser.ypp"
3296 { 3266 {
3297 void *ctx = state; 3267 void *ctx = state;
3298 (yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3268 (yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3299 (yyval.expression)->set_location(yylloc); 3269 (yyval.expression)->set_location(yylloc);
3300 » } 3270 » ;}
3301 break; 3271 break;
3302 3272
3303 case 61: 3273 case 61:
3304 3274
3305 /* Line 1806 of yacc.c */ 3275 /* Line 1464 of yacc.c */
3306 #line 521 "glsl_parser.ypp" 3276 #line 521 "glsl_parser.ypp"
3307 { 3277 {
3308 void *ctx = state; 3278 void *ctx = state;
3309 (yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3279 (yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3310 (yyval.expression)->set_location(yylloc); 3280 (yyval.expression)->set_location(yylloc);
3311 » } 3281 » ;}
3312 break; 3282 break;
3313 3283
3314 case 62: 3284 case 62:
3315 3285
3316 /* Line 1806 of yacc.c */ 3286 /* Line 1464 of yacc.c */
3317 #line 527 "glsl_parser.ypp" 3287 #line 527 "glsl_parser.ypp"
3318 { 3288 {
3319 void *ctx = state; 3289 void *ctx = state;
3320 (yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[ (1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3290 (yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[ (1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3321 (yyval.expression)->set_location(yylloc); 3291 (yyval.expression)->set_location(yylloc);
3322 » } 3292 » ;}
3323 break; 3293 break;
3324 3294
3325 case 63: 3295 case 63:
3326 3296
3327 /* Line 1806 of yacc.c */ 3297 /* Line 1464 of yacc.c */
3328 #line 533 "glsl_parser.ypp" 3298 #line 533 "glsl_parser.ypp"
3329 { 3299 {
3330 void *ctx = state; 3300 void *ctx = state;
3331 (yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3301 (yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3332 (yyval.expression)->set_location(yylloc); 3302 (yyval.expression)->set_location(yylloc);
3333 » } 3303 » ;}
3334 break; 3304 break;
3335 3305
3336 case 64: 3306 case 64:
3337 3307
3338 /* Line 1806 of yacc.c */ 3308 /* Line 1464 of yacc.c */
3339 #line 539 "glsl_parser.ypp" 3309 #line 539 "glsl_parser.ypp"
3340 { 3310 {
3341 void *ctx = state; 3311 void *ctx = state;
3342 (yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3312 (yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3343 (yyval.expression)->set_location(yylloc); 3313 (yyval.expression)->set_location(yylloc);
3344 » } 3314 » ;}
3345 break; 3315 break;
3346 3316
3347 case 66: 3317 case 66:
3348 3318
3349 /* Line 1806 of yacc.c */ 3319 /* Line 1464 of yacc.c */
3350 #line 549 "glsl_parser.ypp" 3320 #line 549 "glsl_parser.ypp"
3351 { 3321 {
3352 void *ctx = state; 3322 void *ctx = state;
3353 (yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1 ) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3323 (yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1 ) - (3)].expression), (yyvsp[(3) - (3)].expression));
3354 (yyval.expression)->set_location(yylloc); 3324 (yyval.expression)->set_location(yylloc);
3355 » } 3325 » ;}
3356 break; 3326 break;
3357 3327
3358 case 67: 3328 case 67:
3359 3329
3360 /* Line 1806 of yacc.c */ 3330 /* Line 1464 of yacc.c */
3361 #line 555 "glsl_parser.ypp" 3331 #line 555 "glsl_parser.ypp"
3362 { 3332 {
3363 void *ctx = state; 3333 void *ctx = state;
3364 (yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3334 (yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3365 (yyval.expression)->set_location(yylloc); 3335 (yyval.expression)->set_location(yylloc);
3366 » } 3336 » ;}
3367 break; 3337 break;
3368 3338
3369 case 69: 3339 case 69:
3370 3340
3371 /* Line 1806 of yacc.c */ 3341 /* Line 1464 of yacc.c */
3372 #line 565 "glsl_parser.ypp" 3342 #line 565 "glsl_parser.ypp"
3373 { 3343 {
3374 void *ctx = state; 3344 void *ctx = state;
3375 (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3345 (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3376 (yyval.expression)->set_location(yylloc); 3346 (yyval.expression)->set_location(yylloc);
3377 » } 3347 » ;}
3378 break; 3348 break;
3379 3349
3380 case 71: 3350 case 71:
3381 3351
3382 /* Line 1806 of yacc.c */ 3352 /* Line 1464 of yacc.c */
3383 #line 575 "glsl_parser.ypp" 3353 #line 575 "glsl_parser.ypp"
3384 { 3354 {
3385 void *ctx = state; 3355 void *ctx = state;
3386 (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[ (1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3356 (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[ (1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3387 (yyval.expression)->set_location(yylloc); 3357 (yyval.expression)->set_location(yylloc);
3388 » } 3358 » ;}
3389 break; 3359 break;
3390 3360
3391 case 73: 3361 case 73:
3392 3362
3393 /* Line 1806 of yacc.c */ 3363 /* Line 1464 of yacc.c */
3394 #line 585 "glsl_parser.ypp" 3364 #line 585 "glsl_parser.ypp"
3395 { 3365 {
3396 void *ctx = state; 3366 void *ctx = state;
3397 (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3367 (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[( 1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3398 (yyval.expression)->set_location(yylloc); 3368 (yyval.expression)->set_location(yylloc);
3399 » } 3369 » ;}
3400 break; 3370 break;
3401 3371
3402 case 75: 3372 case 75:
3403 3373
3404 /* Line 1806 of yacc.c */ 3374 /* Line 1464 of yacc.c */
3405 #line 595 "glsl_parser.ypp" 3375 #line 595 "glsl_parser.ypp"
3406 { 3376 {
3407 void *ctx = state; 3377 void *ctx = state;
3408 (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvs p[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3378 (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvs p[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3409 (yyval.expression)->set_location(yylloc); 3379 (yyval.expression)->set_location(yylloc);
3410 » } 3380 » ;}
3411 break; 3381 break;
3412 3382
3413 case 77: 3383 case 77:
3414 3384
3415 /* Line 1806 of yacc.c */ 3385 /* Line 1464 of yacc.c */
3416 #line 605 "glsl_parser.ypp" 3386 #line 605 "glsl_parser.ypp"
3417 { 3387 {
3418 void *ctx = state; 3388 void *ctx = state;
3419 (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvs p[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3389 (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvs p[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3420 (yyval.expression)->set_location(yylloc); 3390 (yyval.expression)->set_location(yylloc);
3421 » } 3391 » ;}
3422 break; 3392 break;
3423 3393
3424 case 79: 3394 case 79:
3425 3395
3426 /* Line 1806 of yacc.c */ 3396 /* Line 1464 of yacc.c */
3427 #line 615 "glsl_parser.ypp" 3397 #line 615 "glsl_parser.ypp"
3428 { 3398 {
3429 void *ctx = state; 3399 void *ctx = state;
3430 (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp [(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); 3400 (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp [(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
3431 (yyval.expression)->set_location(yylloc); 3401 (yyval.expression)->set_location(yylloc);
3432 » } 3402 » ;}
3433 break; 3403 break;
3434 3404
3435 case 81: 3405 case 81:
3436 3406
3437 /* Line 1806 of yacc.c */ 3407 /* Line 1464 of yacc.c */
3438 #line 625 "glsl_parser.ypp" 3408 #line 625 "glsl_parser.ypp"
3439 { 3409 {
3440 void *ctx = state; 3410 void *ctx = state;
3441 (yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[ (1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].express ion)); 3411 (yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[ (1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].express ion));
3442 (yyval.expression)->set_location(yylloc); 3412 (yyval.expression)->set_location(yylloc);
3443 » } 3413 » ;}
3444 break; 3414 break;
3445 3415
3446 case 83: 3416 case 83:
3447 3417
3448 /* Line 1806 of yacc.c */ 3418 /* Line 1464 of yacc.c */
3449 #line 635 "glsl_parser.ypp" 3419 #line 635 "glsl_parser.ypp"
3450 { 3420 {
3451 void *ctx = state; 3421 void *ctx = state;
3452 (yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (y yvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); 3422 (yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (y yvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
3453 (yyval.expression)->set_location(yylloc); 3423 (yyval.expression)->set_location(yylloc);
3454 » } 3424 » ;}
3455 break; 3425 break;
3456 3426
3457 case 84: 3427 case 84:
3458 3428
3459 /* Line 1806 of yacc.c */ 3429 /* Line 1464 of yacc.c */
3460 #line 643 "glsl_parser.ypp" 3430 #line 643 "glsl_parser.ypp"
3461 { (yyval.n) = ast_assign; } 3431 { (yyval.n) = ast_assign; ;}
3462 break; 3432 break;
3463 3433
3464 case 85: 3434 case 85:
3465 3435
3466 /* Line 1806 of yacc.c */ 3436 /* Line 1464 of yacc.c */
3467 #line 644 "glsl_parser.ypp" 3437 #line 644 "glsl_parser.ypp"
3468 { (yyval.n) = ast_mul_assign; } 3438 { (yyval.n) = ast_mul_assign; ;}
3469 break; 3439 break;
3470 3440
3471 case 86: 3441 case 86:
3472 3442
3473 /* Line 1806 of yacc.c */ 3443 /* Line 1464 of yacc.c */
3474 #line 645 "glsl_parser.ypp" 3444 #line 645 "glsl_parser.ypp"
3475 { (yyval.n) = ast_div_assign; } 3445 { (yyval.n) = ast_div_assign; ;}
3476 break; 3446 break;
3477 3447
3478 case 87: 3448 case 87:
3479 3449
3480 /* Line 1806 of yacc.c */ 3450 /* Line 1464 of yacc.c */
3481 #line 646 "glsl_parser.ypp" 3451 #line 646 "glsl_parser.ypp"
3482 { (yyval.n) = ast_mod_assign; } 3452 { (yyval.n) = ast_mod_assign; ;}
3483 break; 3453 break;
3484 3454
3485 case 88: 3455 case 88:
3486 3456
3487 /* Line 1806 of yacc.c */ 3457 /* Line 1464 of yacc.c */
3488 #line 647 "glsl_parser.ypp" 3458 #line 647 "glsl_parser.ypp"
3489 { (yyval.n) = ast_add_assign; } 3459 { (yyval.n) = ast_add_assign; ;}
3490 break; 3460 break;
3491 3461
3492 case 89: 3462 case 89:
3493 3463
3494 /* Line 1806 of yacc.c */ 3464 /* Line 1464 of yacc.c */
3495 #line 648 "glsl_parser.ypp" 3465 #line 648 "glsl_parser.ypp"
3496 { (yyval.n) = ast_sub_assign; } 3466 { (yyval.n) = ast_sub_assign; ;}
3497 break; 3467 break;
3498 3468
3499 case 90: 3469 case 90:
3500 3470
3501 /* Line 1806 of yacc.c */ 3471 /* Line 1464 of yacc.c */
3502 #line 649 "glsl_parser.ypp" 3472 #line 649 "glsl_parser.ypp"
3503 { (yyval.n) = ast_ls_assign; } 3473 { (yyval.n) = ast_ls_assign; ;}
3504 break; 3474 break;
3505 3475
3506 case 91: 3476 case 91:
3507 3477
3508 /* Line 1806 of yacc.c */ 3478 /* Line 1464 of yacc.c */
3509 #line 650 "glsl_parser.ypp" 3479 #line 650 "glsl_parser.ypp"
3510 { (yyval.n) = ast_rs_assign; } 3480 { (yyval.n) = ast_rs_assign; ;}
3511 break; 3481 break;
3512 3482
3513 case 92: 3483 case 92:
3514 3484
3515 /* Line 1806 of yacc.c */ 3485 /* Line 1464 of yacc.c */
3516 #line 651 "glsl_parser.ypp" 3486 #line 651 "glsl_parser.ypp"
3517 { (yyval.n) = ast_and_assign; } 3487 { (yyval.n) = ast_and_assign; ;}
3518 break; 3488 break;
3519 3489
3520 case 93: 3490 case 93:
3521 3491
3522 /* Line 1806 of yacc.c */ 3492 /* Line 1464 of yacc.c */
3523 #line 652 "glsl_parser.ypp" 3493 #line 652 "glsl_parser.ypp"
3524 { (yyval.n) = ast_xor_assign; } 3494 { (yyval.n) = ast_xor_assign; ;}
3525 break; 3495 break;
3526 3496
3527 case 94: 3497 case 94:
3528 3498
3529 /* Line 1806 of yacc.c */ 3499 /* Line 1464 of yacc.c */
3530 #line 653 "glsl_parser.ypp" 3500 #line 653 "glsl_parser.ypp"
3531 { (yyval.n) = ast_or_assign; } 3501 { (yyval.n) = ast_or_assign; ;}
3532 break; 3502 break;
3533 3503
3534 case 95: 3504 case 95:
3535 3505
3536 /* Line 1806 of yacc.c */ 3506 /* Line 1464 of yacc.c */
3537 #line 658 "glsl_parser.ypp" 3507 #line 658 "glsl_parser.ypp"
3538 { 3508 {
3539 (yyval.expression) = (yyvsp[(1) - (1)].expression); 3509 (yyval.expression) = (yyvsp[(1) - (1)].expression);
3540 » } 3510 » ;}
3541 break; 3511 break;
3542 3512
3543 case 96: 3513 case 96:
3544 3514
3545 /* Line 1806 of yacc.c */ 3515 /* Line 1464 of yacc.c */
3546 #line 662 "glsl_parser.ypp" 3516 #line 662 "glsl_parser.ypp"
3547 { 3517 {
3548 void *ctx = state; 3518 void *ctx = state;
3549 if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) { 3519 if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) {
3550 (yyval.expression) = new(ctx) ast_expression(ast_sequence, NULL, N ULL, NULL); 3520 (yyval.expression) = new(ctx) ast_expression(ast_sequence, NULL, N ULL, NULL);
3551 (yyval.expression)->set_location(yylloc); 3521 (yyval.expression)->set_location(yylloc);
3552 (yyval.expression)->expressions.push_tail(& (yyvsp[(1) - (3)].expr ession)->link); 3522 (yyval.expression)->expressions.push_tail(& (yyvsp[(1) - (3)].expr ession)->link);
3553 } else { 3523 } else {
3554 (yyval.expression) = (yyvsp[(1) - (3)].expression); 3524 (yyval.expression) = (yyvsp[(1) - (3)].expression);
3555 } 3525 }
3556 3526
3557 (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].express ion)->link); 3527 (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].express ion)->link);
3558 » } 3528 » ;}
3559 break; 3529 break;
3560 3530
3561 case 98: 3531 case 98:
3562 3532
3563 /* Line 1806 of yacc.c */ 3533 /* Line 1464 of yacc.c */
3564 #line 682 "glsl_parser.ypp" 3534 #line 682 "glsl_parser.ypp"
3565 { 3535 {
3566 (yyval.node) = (yyvsp[(1) - (2)].function); 3536 (yyval.node) = (yyvsp[(1) - (2)].function);
3567 » } 3537 » ;}
3568 break; 3538 break;
3569 3539
3570 case 99: 3540 case 99:
3571 3541
3572 /* Line 1806 of yacc.c */ 3542 /* Line 1464 of yacc.c */
3573 #line 686 "glsl_parser.ypp" 3543 #line 686 "glsl_parser.ypp"
3574 { 3544 {
3575 (yyval.node) = (yyvsp[(1) - (2)].declarator_list); 3545 (yyval.node) = (yyvsp[(1) - (2)].declarator_list);
3576 » } 3546 » ;}
3577 break; 3547 break;
3578 3548
3579 case 100: 3549 case 100:
3580 3550
3581 /* Line 1806 of yacc.c */ 3551 /* Line 1464 of yacc.c */
3582 #line 690 "glsl_parser.ypp" 3552 #line 690 "glsl_parser.ypp"
3583 { 3553 {
3584 if (((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_float) 3554 if (((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_float)
3585 && ((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_int) ) { 3555 && ((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_int) ) {
3586 _mesa_glsl_error(& (yylsp[(3) - (4)]), state, "global precision qu alifier can " 3556 _mesa_glsl_error(& (yylsp[(3) - (4)]), state, "global precision qu alifier can "
3587 "only be applied to `int' or `float'\n"); 3557 "only be applied to `int' or `float'\n");
3588 YYERROR; 3558 YYERROR;
3589 } 3559 }
3590 3560
3591 (yyval.node) = NULL; /* FINISHME */ 3561 (yyval.node) = NULL; /* FINISHME */
3592 » } 3562 » ;}
3593 break; 3563 break;
3594 3564
3595 case 104: 3565 case 104:
3596 3566
3597 /* Line 1806 of yacc.c */ 3567 /* Line 1464 of yacc.c */
3598 #line 713 "glsl_parser.ypp" 3568 #line 713 "glsl_parser.ypp"
3599 { 3569 {
3600 (yyval.function) = (yyvsp[(1) - (2)].function); 3570 (yyval.function) = (yyvsp[(1) - (2)].function);
3601 (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_ declarator)->link); 3571 (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_ declarator)->link);
3602 » } 3572 » ;}
3603 break; 3573 break;
3604 3574
3605 case 105: 3575 case 105:
3606 3576
3607 /* Line 1806 of yacc.c */ 3577 /* Line 1464 of yacc.c */
3608 #line 718 "glsl_parser.ypp" 3578 #line 718 "glsl_parser.ypp"
3609 { 3579 {
3610 (yyval.function) = (yyvsp[(1) - (3)].function); 3580 (yyval.function) = (yyvsp[(1) - (3)].function);
3611 (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_ declarator)->link); 3581 (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_ declarator)->link);
3612 » } 3582 » ;}
3613 break; 3583 break;
3614 3584
3615 case 106: 3585 case 106:
3616 3586
3617 /* Line 1806 of yacc.c */ 3587 /* Line 1464 of yacc.c */
3618 #line 726 "glsl_parser.ypp" 3588 #line 726 "glsl_parser.ypp"
3619 { 3589 {
3620 void *ctx = state; 3590 void *ctx = state;
3621 (yyval.function) = new(ctx) ast_function(); 3591 (yyval.function) = new(ctx) ast_function();
3622 (yyval.function)->set_location(yylloc); 3592 (yyval.function)->set_location(yylloc);
3623 (yyval.function)->return_type = (yyvsp[(1) - (3)].fully_specified_typ e); 3593 (yyval.function)->return_type = (yyvsp[(1) - (3)].fully_specified_typ e);
3624 (yyval.function)->identifier = (yyvsp[(2) - (3)].identifier); 3594 (yyval.function)->identifier = (yyvsp[(2) - (3)].identifier);
3625 » } 3595 » ;}
3626 break; 3596 break;
3627 3597
3628 case 107: 3598 case 107:
3629 3599
3630 /* Line 1806 of yacc.c */ 3600 /* Line 1464 of yacc.c */
3631 #line 737 "glsl_parser.ypp" 3601 #line 737 "glsl_parser.ypp"
3632 { 3602 {
3633 void *ctx = state; 3603 void *ctx = state;
3634 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); 3604 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
3635 (yyval.parameter_declarator)->set_location(yylloc); 3605 (yyval.parameter_declarator)->set_location(yylloc);
3636 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e(); 3606 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e();
3637 (yyval.parameter_declarator)->type->set_location(yylloc); 3607 (yyval.parameter_declarator)->type->set_location(yylloc);
3638 (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (2)].typ e_specifier); 3608 (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (2)].typ e_specifier);
3639 (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (2)].identifi er); 3609 (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (2)].identifi er);
3640 » } 3610 » ;}
3641 break; 3611 break;
3642 3612
3643 case 108: 3613 case 108:
3644 3614
3645 /* Line 1806 of yacc.c */ 3615 /* Line 1464 of yacc.c */
3646 #line 747 "glsl_parser.ypp" 3616 #line 747 "glsl_parser.ypp"
3647 { 3617 {
3648 void *ctx = state; 3618 void *ctx = state;
3649 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); 3619 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
3650 (yyval.parameter_declarator)->set_location(yylloc); 3620 (yyval.parameter_declarator)->set_location(yylloc);
3651 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e(); 3621 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e();
3652 (yyval.parameter_declarator)->type->set_location(yylloc); 3622 (yyval.parameter_declarator)->type->set_location(yylloc);
3653 (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (5)].typ e_specifier); 3623 (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (5)].typ e_specifier);
3654 (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (5)].identifi er); 3624 (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (5)].identifi er);
3655 (yyval.parameter_declarator)->is_array = true; 3625 (yyval.parameter_declarator)->is_array = true;
3656 (yyval.parameter_declarator)->array_size = (yyvsp[(4) - (5)].expressi on); 3626 (yyval.parameter_declarator)->array_size = (yyvsp[(4) - (5)].expressi on);
3657 » } 3627 » ;}
3658 break; 3628 break;
3659 3629
3660 case 109: 3630 case 109:
3661 3631
3662 /* Line 1806 of yacc.c */ 3632 /* Line 1464 of yacc.c */
3663 #line 762 "glsl_parser.ypp" 3633 #line 762 "glsl_parser.ypp"
3664 { 3634 {
3665 (yyvsp[(1) - (3)].type_qualifier).i |= (yyvsp[(2) - (3)].type_qualifi er).i; 3635 (yyvsp[(1) - (3)].type_qualifier).i |= (yyvsp[(2) - (3)].type_qualifi er).i;
3666 3636
3667 (yyval.parameter_declarator) = (yyvsp[(3) - (3)].parameter_declarator ); 3637 (yyval.parameter_declarator) = (yyvsp[(3) - (3)].parameter_declarator );
3668 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].typ e_qualifier).q; 3638 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].typ e_qualifier).q;
3669 » } 3639 » ;}
3670 break; 3640 break;
3671 3641
3672 case 110: 3642 case 110:
3673 3643
3674 /* Line 1806 of yacc.c */ 3644 /* Line 1464 of yacc.c */
3675 #line 769 "glsl_parser.ypp" 3645 #line 769 "glsl_parser.ypp"
3676 { 3646 {
3677 (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator ); 3647 (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator );
3678 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].typ e_qualifier).q; 3648 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].typ e_qualifier).q;
3679 » } 3649 » ;}
3680 break; 3650 break;
3681 3651
3682 case 111: 3652 case 111:
3683 3653
3684 /* Line 1806 of yacc.c */ 3654 /* Line 1464 of yacc.c */
3685 #line 774 "glsl_parser.ypp" 3655 #line 774 "glsl_parser.ypp"
3686 { 3656 {
3687 void *ctx = state; 3657 void *ctx = state;
3688 (yyvsp[(1) - (3)].type_qualifier).i |= (yyvsp[(2) - (3)].type_qualifi er).i; 3658 (yyvsp[(1) - (3)].type_qualifier).i |= (yyvsp[(2) - (3)].type_qualifi er).i;
3689 3659
3690 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); 3660 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
3691 (yyval.parameter_declarator)->set_location(yylloc); 3661 (yyval.parameter_declarator)->set_location(yylloc);
3692 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e(); 3662 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e();
3693 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].typ e_qualifier).q; 3663 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].typ e_qualifier).q;
3694 (yyval.parameter_declarator)->type->specifier = (yyvsp[(3) - (3)].typ e_specifier); 3664 (yyval.parameter_declarator)->type->specifier = (yyvsp[(3) - (3)].typ e_specifier);
3695 » } 3665 » ;}
3696 break; 3666 break;
3697 3667
3698 case 112: 3668 case 112:
3699 3669
3700 /* Line 1806 of yacc.c */ 3670 /* Line 1464 of yacc.c */
3701 #line 785 "glsl_parser.ypp" 3671 #line 785 "glsl_parser.ypp"
3702 { 3672 {
3703 void *ctx = state; 3673 void *ctx = state;
3704 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); 3674 (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
3705 (yyval.parameter_declarator)->set_location(yylloc); 3675 (yyval.parameter_declarator)->set_location(yylloc);
3706 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e(); 3676 (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_typ e();
3707 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].typ e_qualifier).q; 3677 (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].typ e_qualifier).q;
3708 (yyval.parameter_declarator)->type->specifier = (yyvsp[(2) - (2)].typ e_specifier); 3678 (yyval.parameter_declarator)->type->specifier = (yyvsp[(2) - (2)].typ e_specifier);
3709 » } 3679 » ;}
3710 break; 3680 break;
3711 3681
3712 case 113: 3682 case 113:
3713 3683
3714 /* Line 1806 of yacc.c */ 3684 /* Line 1464 of yacc.c */
3715 #line 796 "glsl_parser.ypp" 3685 #line 796 "glsl_parser.ypp"
3716 { (yyval.type_qualifier).i = 0; } 3686 { (yyval.type_qualifier).i = 0; ;}
3717 break; 3687 break;
3718 3688
3719 case 114: 3689 case 114:
3720 3690
3721 /* Line 1806 of yacc.c */ 3691 /* Line 1464 of yacc.c */
3722 #line 797 "glsl_parser.ypp" 3692 #line 797 "glsl_parser.ypp"
3723 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.in = 1; } 3693 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.in = 1; ;}
3724 break; 3694 break;
3725 3695
3726 case 115: 3696 case 115:
3727 3697
3728 /* Line 1806 of yacc.c */ 3698 /* Line 1464 of yacc.c */
3729 #line 798 "glsl_parser.ypp" 3699 #line 798 "glsl_parser.ypp"
3730 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.out = 1; } 3700 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.out = 1; ;}
3731 break; 3701 break;
3732 3702
3733 case 116: 3703 case 116:
3734 3704
3735 /* Line 1806 of yacc.c */ 3705 /* Line 1464 of yacc.c */
3736 #line 799 "glsl_parser.ypp" 3706 #line 799 "glsl_parser.ypp"
3737 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.in = 1; (yyval.type _qualifier).q.out = 1; } 3707 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.in = 1; (yyval.type _qualifier).q.out = 1; ;}
3738 break; 3708 break;
3739 3709
3740 case 119: 3710 case 119:
3741 3711
3742 /* Line 1806 of yacc.c */ 3712 /* Line 1464 of yacc.c */
3743 #line 809 "glsl_parser.ypp" 3713 #line 809 "glsl_parser.ypp"
3744 { 3714 {
3745 void *ctx = state; 3715 void *ctx = state;
3746 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].id entifier), false, NULL, NULL); 3716 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].id entifier), false, NULL, NULL);
3747 decl->set_location(yylloc); 3717 decl->set_location(yylloc);
3748 3718
3749 (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list); 3719 (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list);
3750 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3720 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3751 » } 3721 » ;}
3752 break; 3722 break;
3753 3723
3754 case 120: 3724 case 120:
3755 3725
3756 /* Line 1806 of yacc.c */ 3726 /* Line 1464 of yacc.c */
3757 #line 818 "glsl_parser.ypp" 3727 #line 818 "glsl_parser.ypp"
3758 { 3728 {
3759 void *ctx = state; 3729 void *ctx = state;
3760 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].id entifier), true, NULL, NULL); 3730 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].id entifier), true, NULL, NULL);
3761 decl->set_location(yylloc); 3731 decl->set_location(yylloc);
3762 3732
3763 (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list); 3733 (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
3764 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3734 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3765 » } 3735 » ;}
3766 break; 3736 break;
3767 3737
3768 case 121: 3738 case 121:
3769 3739
3770 /* Line 1806 of yacc.c */ 3740 /* Line 1464 of yacc.c */
3771 #line 827 "glsl_parser.ypp" 3741 #line 827 "glsl_parser.ypp"
3772 { 3742 {
3773 void *ctx = state; 3743 void *ctx = state;
3774 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].id entifier), true, (yyvsp[(5) - (6)].expression), NULL); 3744 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].id entifier), true, (yyvsp[(5) - (6)].expression), NULL);
3775 decl->set_location(yylloc); 3745 decl->set_location(yylloc);
3776 3746
3777 (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list); 3747 (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list);
3778 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3748 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3779 » } 3749 » ;}
3780 break; 3750 break;
3781 3751
3782 case 122: 3752 case 122:
3783 3753
3784 /* Line 1806 of yacc.c */ 3754 /* Line 1464 of yacc.c */
3785 #line 836 "glsl_parser.ypp" 3755 #line 836 "glsl_parser.ypp"
3786 { 3756 {
3787 void *ctx = state; 3757 void *ctx = state;
3788 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].id entifier), true, NULL, (yyvsp[(7) - (7)].expression)); 3758 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].id entifier), true, NULL, (yyvsp[(7) - (7)].expression));
3789 decl->set_location(yylloc); 3759 decl->set_location(yylloc);
3790 3760
3791 (yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list); 3761 (yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list);
3792 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3762 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3793 » } 3763 » ;}
3794 break; 3764 break;
3795 3765
3796 case 123: 3766 case 123:
3797 3767
3798 /* Line 1806 of yacc.c */ 3768 /* Line 1464 of yacc.c */
3799 #line 845 "glsl_parser.ypp" 3769 #line 845 "glsl_parser.ypp"
3800 { 3770 {
3801 void *ctx = state; 3771 void *ctx = state;
3802 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].id entifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression)); 3772 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].id entifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression));
3803 decl->set_location(yylloc); 3773 decl->set_location(yylloc);
3804 3774
3805 (yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list); 3775 (yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list);
3806 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3776 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3807 » } 3777 » ;}
3808 break; 3778 break;
3809 3779
3810 case 124: 3780 case 124:
3811 3781
3812 /* Line 1806 of yacc.c */ 3782 /* Line 1464 of yacc.c */
3813 #line 854 "glsl_parser.ypp" 3783 #line 854 "glsl_parser.ypp"
3814 { 3784 {
3815 void *ctx = state; 3785 void *ctx = state;
3816 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].id entifier), false, NULL, (yyvsp[(5) - (5)].expression)); 3786 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].id entifier), false, NULL, (yyvsp[(5) - (5)].expression));
3817 decl->set_location(yylloc); 3787 decl->set_location(yylloc);
3818 3788
3819 (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list); 3789 (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
3820 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3790 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3821 » } 3791 » ;}
3822 break; 3792 break;
3823 3793
3824 case 125: 3794 case 125:
3825 3795
3826 /* Line 1806 of yacc.c */ 3796 /* Line 1464 of yacc.c */
3827 #line 867 "glsl_parser.ypp" 3797 #line 867 "glsl_parser.ypp"
3828 { 3798 {
3829 void *ctx = state; 3799 void *ctx = state;
3830 if ((yyvsp[(1) - (1)].fully_specified_type)->specifier->type_specifie r != ast_struct) { 3800 if ((yyvsp[(1) - (1)].fully_specified_type)->specifier->type_specifie r != ast_struct) {
3831 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "empty declaration l ist\n"); 3801 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "empty declaration l ist\n");
3832 YYERROR; 3802 YYERROR;
3833 } else { 3803 } else {
3834 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type)); 3804 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type));
3835 (yyval.declarator_list)->set_location(yylloc); 3805 (yyval.declarator_list)->set_location(yylloc);
3836 } 3806 }
3837 » } 3807 » ;}
3838 break; 3808 break;
3839 3809
3840 case 126: 3810 case 126:
3841 3811
3842 /* Line 1806 of yacc.c */ 3812 /* Line 1464 of yacc.c */
3843 #line 878 "glsl_parser.ypp" 3813 #line 878 "glsl_parser.ypp"
3844 { 3814 {
3845 void *ctx = state; 3815 void *ctx = state;
3846 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].id entifier), false, NULL, NULL); 3816 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].id entifier), false, NULL, NULL);
3847 3817
3848 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 2)].fully_specified_type)); 3818 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 2)].fully_specified_type));
3849 (yyval.declarator_list)->set_location(yylloc); 3819 (yyval.declarator_list)->set_location(yylloc);
3850 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3820 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3851 » } 3821 » ;}
3852 break; 3822 break;
3853 3823
3854 case 127: 3824 case 127:
3855 3825
3856 /* Line 1806 of yacc.c */ 3826 /* Line 1464 of yacc.c */
3857 #line 887 "glsl_parser.ypp" 3827 #line 887 "glsl_parser.ypp"
3858 { 3828 {
3859 void *ctx = state; 3829 void *ctx = state;
3860 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].id entifier), true, NULL, NULL); 3830 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].id entifier), true, NULL, NULL);
3861 3831
3862 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 4)].fully_specified_type)); 3832 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 4)].fully_specified_type));
3863 (yyval.declarator_list)->set_location(yylloc); 3833 (yyval.declarator_list)->set_location(yylloc);
3864 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3834 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3865 » } 3835 » ;}
3866 break; 3836 break;
3867 3837
3868 case 128: 3838 case 128:
3869 3839
3870 /* Line 1806 of yacc.c */ 3840 /* Line 1464 of yacc.c */
3871 #line 896 "glsl_parser.ypp" 3841 #line 896 "glsl_parser.ypp"
3872 { 3842 {
3873 void *ctx = state; 3843 void *ctx = state;
3874 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].id entifier), true, (yyvsp[(4) - (5)].expression), NULL); 3844 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].id entifier), true, (yyvsp[(4) - (5)].expression), NULL);
3875 3845
3876 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 5)].fully_specified_type)); 3846 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 5)].fully_specified_type));
3877 (yyval.declarator_list)->set_location(yylloc); 3847 (yyval.declarator_list)->set_location(yylloc);
3878 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3848 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3879 » } 3849 » ;}
3880 break; 3850 break;
3881 3851
3882 case 129: 3852 case 129:
3883 3853
3884 /* Line 1806 of yacc.c */ 3854 /* Line 1464 of yacc.c */
3885 #line 905 "glsl_parser.ypp" 3855 #line 905 "glsl_parser.ypp"
3886 { 3856 {
3887 void *ctx = state; 3857 void *ctx = state;
3888 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].id entifier), true, NULL, (yyvsp[(6) - (6)].expression)); 3858 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].id entifier), true, NULL, (yyvsp[(6) - (6)].expression));
3889 3859
3890 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 6)].fully_specified_type)); 3860 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 6)].fully_specified_type));
3891 (yyval.declarator_list)->set_location(yylloc); 3861 (yyval.declarator_list)->set_location(yylloc);
3892 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3862 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3893 » } 3863 » ;}
3894 break; 3864 break;
3895 3865
3896 case 130: 3866 case 130:
3897 3867
3898 /* Line 1806 of yacc.c */ 3868 /* Line 1464 of yacc.c */
3899 #line 914 "glsl_parser.ypp" 3869 #line 914 "glsl_parser.ypp"
3900 { 3870 {
3901 void *ctx = state; 3871 void *ctx = state;
3902 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].id entifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression)); 3872 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].id entifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression));
3903 3873
3904 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 7)].fully_specified_type)); 3874 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 7)].fully_specified_type));
3905 (yyval.declarator_list)->set_location(yylloc); 3875 (yyval.declarator_list)->set_location(yylloc);
3906 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3876 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3907 » } 3877 » ;}
3908 break; 3878 break;
3909 3879
3910 case 131: 3880 case 131:
3911 3881
3912 /* Line 1806 of yacc.c */ 3882 /* Line 1464 of yacc.c */
3913 #line 923 "glsl_parser.ypp" 3883 #line 923 "glsl_parser.ypp"
3914 { 3884 {
3915 void *ctx = state; 3885 void *ctx = state;
3916 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].id entifier), false, NULL, (yyvsp[(4) - (4)].expression)); 3886 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].id entifier), false, NULL, (yyvsp[(4) - (4)].expression));
3917 3887
3918 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 4)].fully_specified_type)); 3888 (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - ( 4)].fully_specified_type));
3919 (yyval.declarator_list)->set_location(yylloc); 3889 (yyval.declarator_list)->set_location(yylloc);
3920 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3890 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3921 » } 3891 » ;}
3922 break; 3892 break;
3923 3893
3924 case 132: 3894 case 132:
3925 3895
3926 /* Line 1806 of yacc.c */ 3896 /* Line 1464 of yacc.c */
3927 #line 932 "glsl_parser.ypp" 3897 #line 932 "glsl_parser.ypp"
3928 { 3898 {
3929 void *ctx = state; 3899 void *ctx = state;
3930 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].id entifier), false, NULL, NULL); 3900 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].id entifier), false, NULL, NULL);
3931 3901
3932 (yyval.declarator_list) = new(ctx) ast_declarator_list(NULL); 3902 (yyval.declarator_list) = new(ctx) ast_declarator_list(NULL);
3933 (yyval.declarator_list)->set_location(yylloc); 3903 (yyval.declarator_list)->set_location(yylloc);
3934 (yyval.declarator_list)->invariant = true; 3904 (yyval.declarator_list)->invariant = true;
3935 3905
3936 (yyval.declarator_list)->declarations.push_tail(&decl->link); 3906 (yyval.declarator_list)->declarations.push_tail(&decl->link);
3937 » } 3907 » ;}
3938 break; 3908 break;
3939 3909
3940 case 133: 3910 case 133:
3941 3911
3942 /* Line 1806 of yacc.c */ 3912 /* Line 1464 of yacc.c */
3943 #line 946 "glsl_parser.ypp" 3913 #line 946 "glsl_parser.ypp"
3944 { 3914 {
3945 void *ctx = state; 3915 void *ctx = state;
3946 (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); 3916 (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
3947 (yyval.fully_specified_type)->set_location(yylloc); 3917 (yyval.fully_specified_type)->set_location(yylloc);
3948 (yyval.fully_specified_type)->specifier = (yyvsp[(1) - (1)].type_spec ifier); 3918 (yyval.fully_specified_type)->specifier = (yyvsp[(1) - (1)].type_spec ifier);
3949 » } 3919 » ;}
3950 break; 3920 break;
3951 3921
3952 case 134: 3922 case 134:
3953 3923
3954 /* Line 1806 of yacc.c */ 3924 /* Line 1464 of yacc.c */
3955 #line 953 "glsl_parser.ypp" 3925 #line 953 "glsl_parser.ypp"
3956 { 3926 {
3957 void *ctx = state; 3927 void *ctx = state;
3958 (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); 3928 (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
3959 (yyval.fully_specified_type)->set_location(yylloc); 3929 (yyval.fully_specified_type)->set_location(yylloc);
3960 (yyval.fully_specified_type)->qualifier = (yyvsp[(1) - (2)].type_qual ifier).q; 3930 (yyval.fully_specified_type)->qualifier = (yyvsp[(1) - (2)].type_qual ifier).q;
3961 (yyval.fully_specified_type)->specifier = (yyvsp[(2) - (2)].type_spec ifier); 3931 (yyval.fully_specified_type)->specifier = (yyvsp[(2) - (2)].type_spec ifier);
3962 » } 3932 » ;}
3963 break; 3933 break;
3964 3934
3965 case 135: 3935 case 135:
3966 3936
3967 /* Line 1806 of yacc.c */ 3937 /* Line 1464 of yacc.c */
3968 #line 963 "glsl_parser.ypp" 3938 #line 963 "glsl_parser.ypp"
3969 { (yyval.type_qualifier).i = 0; } 3939 { (yyval.type_qualifier).i = 0; ;}
3970 break; 3940 break;
3971 3941
3972 case 137: 3942 case 137:
3973 3943
3974 /* Line 1806 of yacc.c */ 3944 /* Line 1464 of yacc.c */
3975 #line 969 "glsl_parser.ypp" 3945 #line 969 "glsl_parser.ypp"
3976 { 3946 {
3977 (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier); 3947 (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier);
3978 » } 3948 » ;}
3979 break; 3949 break;
3980 3950
3981 case 139: 3951 case 139:
3982 3952
3983 /* Line 1806 of yacc.c */ 3953 /* Line 1464 of yacc.c */
3984 #line 977 "glsl_parser.ypp" 3954 #line 977 "glsl_parser.ypp"
3985 { 3955 {
3986 (yyval.type_qualifier).i = (yyvsp[(1) - (3)].type_qualifier).i | (yyv sp[(3) - (3)].type_qualifier).i; 3956 (yyval.type_qualifier).i = (yyvsp[(1) - (3)].type_qualifier).i | (yyv sp[(3) - (3)].type_qualifier).i;
3987 » } 3957 » ;}
3988 break; 3958 break;
3989 3959
3990 case 140: 3960 case 140:
3991 3961
3992 /* Line 1806 of yacc.c */ 3962 /* Line 1464 of yacc.c */
3993 #line 984 "glsl_parser.ypp" 3963 #line 984 "glsl_parser.ypp"
3994 { 3964 {
3995 (yyval.type_qualifier).i = 0; 3965 (yyval.type_qualifier).i = 0;
3996 3966
3997 if (state->ARB_fragment_coord_conventions_enable) { 3967 if (state->ARB_fragment_coord_conventions_enable) {
3998 bool got_one = false; 3968 bool got_one = false;
3999 3969
4000 » if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { 3970 » if (safe_strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left" ) == 0) {
4001 got_one = true; 3971 got_one = true;
4002 (yyval.type_qualifier).q.origin_upper_left = 1; 3972 (yyval.type_qualifier).q.origin_upper_left = 1;
4003 » } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_int eger") == 0) { 3973 » } else if (safe_strcmp((yyvsp[(1) - (1)].identifier), "pixel_cente r_integer") == 0) {
4004 got_one = true; 3974 got_one = true;
4005 (yyval.type_qualifier).q.pixel_center_integer = 1; 3975 (yyval.type_qualifier).q.pixel_center_integer = 1;
4006 } 3976 }
4007 3977
4008 if (state->ARB_fragment_coord_conventions_warn && got_one) { 3978 if (state->ARB_fragment_coord_conventions_warn && got_one) {
4009 _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, 3979 _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
4010 "GL_ARB_fragment_coord_conventions layout " 3980 "GL_ARB_fragment_coord_conventions layout "
4011 "identifier `%s' used\n", (yyvsp[(1) - (1)]. identifier)); 3981 "identifier `%s' used\n", (yyvsp[(1) - (1)]. identifier));
4012 } 3982 }
4013 } 3983 }
4014 3984
4015 /* If the identifier didn't match any known layout identifiers, 3985 /* If the identifier didn't match any known layout identifiers,
4016 * emit an error. 3986 * emit an error.
4017 */ 3987 */
4018 if ((yyval.type_qualifier).i == 0) { 3988 if ((yyval.type_qualifier).i == 0) {
4019 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier " 3989 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier "
4020 "`%s'\n", (yyvsp[(1) - (1)].identifier)); 3990 "`%s'\n", (yyvsp[(1) - (1)].identifier));
4021 YYERROR; 3991 YYERROR;
4022 } 3992 }
4023 » } 3993 » ;}
4024 break; 3994 break;
4025 3995
4026 case 141: 3996 case 141:
4027 3997
4028 /* Line 1806 of yacc.c */ 3998 /* Line 1464 of yacc.c */
4029 #line 1017 "glsl_parser.ypp" 3999 #line 1017 "glsl_parser.ypp"
4030 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.smooth = 1; } 4000 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.smooth = 1; ;}
4031 break; 4001 break;
4032 4002
4033 case 142: 4003 case 142:
4034 4004
4035 /* Line 1806 of yacc.c */ 4005 /* Line 1464 of yacc.c */
4036 #line 1018 "glsl_parser.ypp" 4006 #line 1018 "glsl_parser.ypp"
4037 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.flat = 1; } 4007 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.flat = 1; ;}
4038 break; 4008 break;
4039 4009
4040 case 143: 4010 case 143:
4041 4011
4042 /* Line 1806 of yacc.c */ 4012 /* Line 1464 of yacc.c */
4043 #line 1019 "glsl_parser.ypp" 4013 #line 1019 "glsl_parser.ypp"
4044 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.noperspective = 1; } 4014 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.noperspective = 1; ;}
4045 break; 4015 break;
4046 4016
4047 case 144: 4017 case 144:
4048 4018
4049 /* Line 1806 of yacc.c */ 4019 /* Line 1464 of yacc.c */
4050 #line 1023 "glsl_parser.ypp" 4020 #line 1023 "glsl_parser.ypp"
4051 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.constant = 1; } 4021 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.constant = 1; ;}
4052 break; 4022 break;
4053 4023
4054 case 146: 4024 case 146:
4055 4025
4056 /* Line 1806 of yacc.c */ 4026 /* Line 1464 of yacc.c */
4057 #line 1029 "glsl_parser.ypp" 4027 #line 1029 "glsl_parser.ypp"
4058 { 4028 {
4059 (yyval.type_qualifier).i = (yyvsp[(1) - (2)].type_qualifier).i | (yyv sp[(2) - (2)].type_qualifier).i; 4029 (yyval.type_qualifier).i = (yyvsp[(1) - (2)].type_qualifier).i | (yyv sp[(2) - (2)].type_qualifier).i;
4060 » } 4030 » ;}
4061 break; 4031 break;
4062 4032
4063 case 147: 4033 case 147:
4064 4034
4065 /* Line 1806 of yacc.c */ 4035 /* Line 1464 of yacc.c */
4066 #line 1033 "glsl_parser.ypp" 4036 #line 1033 "glsl_parser.ypp"
4067 { 4037 {
4068 (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier); 4038 (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
4069 (yyval.type_qualifier).q.invariant = 1; 4039 (yyval.type_qualifier).q.invariant = 1;
4070 » } 4040 » ;}
4071 break; 4041 break;
4072 4042
4073 case 148: 4043 case 148:
4074 4044
4075 /* Line 1806 of yacc.c */ 4045 /* Line 1464 of yacc.c */
4076 #line 1040 "glsl_parser.ypp" 4046 #line 1040 "glsl_parser.ypp"
4077 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.constant = 1; } 4047 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.constant = 1; ;}
4078 break; 4048 break;
4079 4049
4080 case 149: 4050 case 149:
4081 4051
4082 /* Line 1806 of yacc.c */ 4052 /* Line 1464 of yacc.c */
4083 #line 1041 "glsl_parser.ypp" 4053 #line 1041 "glsl_parser.ypp"
4084 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.attribute = 1; } 4054 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.attribute = 1; ;}
4085 break; 4055 break;
4086 4056
4087 case 150: 4057 case 150:
4088 4058
4089 /* Line 1806 of yacc.c */ 4059 /* Line 1464 of yacc.c */
4090 #line 1042 "glsl_parser.ypp" 4060 #line 1042 "glsl_parser.ypp"
4091 { (yyval.type_qualifier).i = (yyvsp[(1) - (2)].type_qualifier).i; (yyval.typ e_qualifier).q.varying = 1; } 4061 { (yyval.type_qualifier).i = (yyvsp[(1) - (2)].type_qualifier).i; (yyval.typ e_qualifier).q.varying = 1; ;}
4092 break; 4062 break;
4093 4063
4094 case 151: 4064 case 151:
4095 4065
4096 /* Line 1806 of yacc.c */ 4066 /* Line 1464 of yacc.c */
4097 #line 1043 "glsl_parser.ypp" 4067 #line 1043 "glsl_parser.ypp"
4098 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.centroid = 1; (yyva l.type_qualifier).q.varying = 1; } 4068 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.centroid = 1; (yyva l.type_qualifier).q.varying = 1; ;}
4099 break; 4069 break;
4100 4070
4101 case 152: 4071 case 152:
4102 4072
4103 /* Line 1806 of yacc.c */ 4073 /* Line 1464 of yacc.c */
4104 #line 1044 "glsl_parser.ypp" 4074 #line 1044 "glsl_parser.ypp"
4105 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.in = 1; } 4075 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.in = 1; ;}
4106 break; 4076 break;
4107 4077
4108 case 153: 4078 case 153:
4109 4079
4110 /* Line 1806 of yacc.c */ 4080 /* Line 1464 of yacc.c */
4111 #line 1045 "glsl_parser.ypp" 4081 #line 1045 "glsl_parser.ypp"
4112 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.out = 1; } 4082 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.out = 1; ;}
4113 break; 4083 break;
4114 4084
4115 case 154: 4085 case 154:
4116 4086
4117 /* Line 1806 of yacc.c */ 4087 /* Line 1464 of yacc.c */
4118 #line 1046 "glsl_parser.ypp" 4088 #line 1046 "glsl_parser.ypp"
4119 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.centroid = 1; (yyva l.type_qualifier).q.in = 1; } 4089 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.centroid = 1; (yyva l.type_qualifier).q.in = 1; ;}
4120 break; 4090 break;
4121 4091
4122 case 155: 4092 case 155:
4123 4093
4124 /* Line 1806 of yacc.c */ 4094 /* Line 1464 of yacc.c */
4125 #line 1047 "glsl_parser.ypp" 4095 #line 1047 "glsl_parser.ypp"
4126 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.centroid = 1; (yyva l.type_qualifier).q.out = 1; } 4096 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.centroid = 1; (yyva l.type_qualifier).q.out = 1; ;}
4127 break; 4097 break;
4128 4098
4129 case 156: 4099 case 156:
4130 4100
4131 /* Line 1806 of yacc.c */ 4101 /* Line 1464 of yacc.c */
4132 #line 1048 "glsl_parser.ypp" 4102 #line 1048 "glsl_parser.ypp"
4133 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.uniform = 1; } 4103 { (yyval.type_qualifier).i = 0; (yyval.type_qualifier).q.uniform = 1; ;}
4134 break; 4104 break;
4135 4105
4136 case 158: 4106 case 158:
4137 4107
4138 /* Line 1806 of yacc.c */ 4108 /* Line 1464 of yacc.c */
4139 #line 1054 "glsl_parser.ypp" 4109 #line 1054 "glsl_parser.ypp"
4140 { 4110 {
4141 (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier); 4111 (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier);
4142 (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n); 4112 (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n);
4143 » } 4113 » ;}
4144 break; 4114 break;
4145 4115
4146 case 160: 4116 case 160:
4147 4117
4148 /* Line 1806 of yacc.c */ 4118 /* Line 1464 of yacc.c */
4149 #line 1063 "glsl_parser.ypp" 4119 #line 1063 "glsl_parser.ypp"
4150 { 4120 {
4151 (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier); 4121 (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier);
4152 (yyval.type_specifier)->is_array = true; 4122 (yyval.type_specifier)->is_array = true;
4153 (yyval.type_specifier)->array_size = NULL; 4123 (yyval.type_specifier)->array_size = NULL;
4154 » } 4124 » ;}
4155 break; 4125 break;
4156 4126
4157 case 161: 4127 case 161:
4158 4128
4159 /* Line 1806 of yacc.c */ 4129 /* Line 1464 of yacc.c */
4160 #line 1069 "glsl_parser.ypp" 4130 #line 1069 "glsl_parser.ypp"
4161 { 4131 {
4162 (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier); 4132 (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier);
4163 (yyval.type_specifier)->is_array = true; 4133 (yyval.type_specifier)->is_array = true;
4164 (yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression); 4134 (yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression);
4165 » } 4135 » ;}
4166 break; 4136 break;
4167 4137
4168 case 162: 4138 case 162:
4169 4139
4170 /* Line 1806 of yacc.c */ 4140 /* Line 1464 of yacc.c */
4171 #line 1078 "glsl_parser.ypp" 4141 #line 1078 "glsl_parser.ypp"
4172 { 4142 {
4173 void *ctx = state; 4143 void *ctx = state;
4174 (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1) ].n)); 4144 (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1) ].n));
4175 (yyval.type_specifier)->set_location(yylloc); 4145 (yyval.type_specifier)->set_location(yylloc);
4176 » } 4146 » ;}
4177 break; 4147 break;
4178 4148
4179 case 163: 4149 case 163:
4180 4150
4181 /* Line 1806 of yacc.c */ 4151 /* Line 1464 of yacc.c */
4182 #line 1084 "glsl_parser.ypp" 4152 #line 1084 "glsl_parser.ypp"
4183 { 4153 {
4184 void *ctx = state; 4154 void *ctx = state;
4185 (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1) ].struct_specifier)); 4155 (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1) ].struct_specifier));
4186 (yyval.type_specifier)->set_location(yylloc); 4156 (yyval.type_specifier)->set_location(yylloc);
4187 » } 4157 » ;}
4188 break; 4158 break;
4189 4159
4190 case 164: 4160 case 164:
4191 4161
4192 /* Line 1806 of yacc.c */ 4162 /* Line 1464 of yacc.c */
4193 #line 1090 "glsl_parser.ypp" 4163 #line 1090 "glsl_parser.ypp"
4194 { 4164 {
4195 void *ctx = state; 4165 void *ctx = state;
4196 (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1) ].identifier)); 4166 (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1) ].identifier));
4197 (yyval.type_specifier)->set_location(yylloc); 4167 (yyval.type_specifier)->set_location(yylloc);
4198 » } 4168 » ;}
4199 break; 4169 break;
4200 4170
4201 case 165: 4171 case 165:
4202 4172
4203 /* Line 1806 of yacc.c */ 4173 /* Line 1464 of yacc.c */
4204 #line 1098 "glsl_parser.ypp" 4174 #line 1098 "glsl_parser.ypp"
4205 { (yyval.n) = ast_void; } 4175 { (yyval.n) = ast_void; ;}
4206 break; 4176 break;
4207 4177
4208 case 166: 4178 case 166:
4209 4179
4210 /* Line 1806 of yacc.c */ 4180 /* Line 1464 of yacc.c */
4211 #line 1099 "glsl_parser.ypp" 4181 #line 1099 "glsl_parser.ypp"
4212 { (yyval.n) = ast_float; } 4182 { (yyval.n) = ast_float; ;}
4213 break; 4183 break;
4214 4184
4215 case 167: 4185 case 167:
4216 4186
4217 /* Line 1806 of yacc.c */ 4187 /* Line 1464 of yacc.c */
4218 #line 1100 "glsl_parser.ypp" 4188 #line 1100 "glsl_parser.ypp"
4219 { (yyval.n) = ast_int; } 4189 { (yyval.n) = ast_int; ;}
4220 break; 4190 break;
4221 4191
4222 case 168: 4192 case 168:
4223 4193
4224 /* Line 1806 of yacc.c */ 4194 /* Line 1464 of yacc.c */
4225 #line 1101 "glsl_parser.ypp" 4195 #line 1101 "glsl_parser.ypp"
4226 { (yyval.n) = ast_uint; } 4196 { (yyval.n) = ast_uint; ;}
4227 break; 4197 break;
4228 4198
4229 case 169: 4199 case 169:
4230 4200
4231 /* Line 1806 of yacc.c */ 4201 /* Line 1464 of yacc.c */
4232 #line 1102 "glsl_parser.ypp" 4202 #line 1102 "glsl_parser.ypp"
4233 { (yyval.n) = ast_bool; } 4203 { (yyval.n) = ast_bool; ;}
4234 break; 4204 break;
4235 4205
4236 case 170: 4206 case 170:
4237 4207
4238 /* Line 1806 of yacc.c */ 4208 /* Line 1464 of yacc.c */
4239 #line 1103 "glsl_parser.ypp" 4209 #line 1103 "glsl_parser.ypp"
4240 { (yyval.n) = ast_vec2; } 4210 { (yyval.n) = ast_vec2; ;}
4241 break; 4211 break;
4242 4212
4243 case 171: 4213 case 171:
4244 4214
4245 /* Line 1806 of yacc.c */ 4215 /* Line 1464 of yacc.c */
4246 #line 1104 "glsl_parser.ypp" 4216 #line 1104 "glsl_parser.ypp"
4247 { (yyval.n) = ast_vec3; } 4217 { (yyval.n) = ast_vec3; ;}
4248 break; 4218 break;
4249 4219
4250 case 172: 4220 case 172:
4251 4221
4252 /* Line 1806 of yacc.c */ 4222 /* Line 1464 of yacc.c */
4253 #line 1105 "glsl_parser.ypp" 4223 #line 1105 "glsl_parser.ypp"
4254 { (yyval.n) = ast_vec4; } 4224 { (yyval.n) = ast_vec4; ;}
4255 break; 4225 break;
4256 4226
4257 case 173: 4227 case 173:
4258 4228
4259 /* Line 1806 of yacc.c */ 4229 /* Line 1464 of yacc.c */
4260 #line 1106 "glsl_parser.ypp" 4230 #line 1106 "glsl_parser.ypp"
4261 { (yyval.n) = ast_bvec2; } 4231 { (yyval.n) = ast_bvec2; ;}
4262 break; 4232 break;
4263 4233
4264 case 174: 4234 case 174:
4265 4235
4266 /* Line 1806 of yacc.c */ 4236 /* Line 1464 of yacc.c */
4267 #line 1107 "glsl_parser.ypp" 4237 #line 1107 "glsl_parser.ypp"
4268 { (yyval.n) = ast_bvec3; } 4238 { (yyval.n) = ast_bvec3; ;}
4269 break; 4239 break;
4270 4240
4271 case 175: 4241 case 175:
4272 4242
4273 /* Line 1806 of yacc.c */ 4243 /* Line 1464 of yacc.c */
4274 #line 1108 "glsl_parser.ypp" 4244 #line 1108 "glsl_parser.ypp"
4275 { (yyval.n) = ast_bvec4; } 4245 { (yyval.n) = ast_bvec4; ;}
4276 break; 4246 break;
4277 4247
4278 case 176: 4248 case 176:
4279 4249
4280 /* Line 1806 of yacc.c */ 4250 /* Line 1464 of yacc.c */
4281 #line 1109 "glsl_parser.ypp" 4251 #line 1109 "glsl_parser.ypp"
4282 { (yyval.n) = ast_ivec2; } 4252 { (yyval.n) = ast_ivec2; ;}
4283 break; 4253 break;
4284 4254
4285 case 177: 4255 case 177:
4286 4256
4287 /* Line 1806 of yacc.c */ 4257 /* Line 1464 of yacc.c */
4288 #line 1110 "glsl_parser.ypp" 4258 #line 1110 "glsl_parser.ypp"
4289 { (yyval.n) = ast_ivec3; } 4259 { (yyval.n) = ast_ivec3; ;}
4290 break; 4260 break;
4291 4261
4292 case 178: 4262 case 178:
4293 4263
4294 /* Line 1806 of yacc.c */ 4264 /* Line 1464 of yacc.c */
4295 #line 1111 "glsl_parser.ypp" 4265 #line 1111 "glsl_parser.ypp"
4296 { (yyval.n) = ast_ivec4; } 4266 { (yyval.n) = ast_ivec4; ;}
4297 break; 4267 break;
4298 4268
4299 case 179: 4269 case 179:
4300 4270
4301 /* Line 1806 of yacc.c */ 4271 /* Line 1464 of yacc.c */
4302 #line 1112 "glsl_parser.ypp" 4272 #line 1112 "glsl_parser.ypp"
4303 { (yyval.n) = ast_uvec2; } 4273 { (yyval.n) = ast_uvec2; ;}
4304 break; 4274 break;
4305 4275
4306 case 180: 4276 case 180:
4307 4277
4308 /* Line 1806 of yacc.c */ 4278 /* Line 1464 of yacc.c */
4309 #line 1113 "glsl_parser.ypp" 4279 #line 1113 "glsl_parser.ypp"
4310 { (yyval.n) = ast_uvec3; } 4280 { (yyval.n) = ast_uvec3; ;}
4311 break; 4281 break;
4312 4282
4313 case 181: 4283 case 181:
4314 4284
4315 /* Line 1806 of yacc.c */ 4285 /* Line 1464 of yacc.c */
4316 #line 1114 "glsl_parser.ypp" 4286 #line 1114 "glsl_parser.ypp"
4317 { (yyval.n) = ast_uvec4; } 4287 { (yyval.n) = ast_uvec4; ;}
4318 break; 4288 break;
4319 4289
4320 case 182: 4290 case 182:
4321 4291
4322 /* Line 1806 of yacc.c */ 4292 /* Line 1464 of yacc.c */
4323 #line 1115 "glsl_parser.ypp" 4293 #line 1115 "glsl_parser.ypp"
4324 { (yyval.n) = ast_mat2; } 4294 { (yyval.n) = ast_mat2; ;}
4325 break; 4295 break;
4326 4296
4327 case 183: 4297 case 183:
4328 4298
4329 /* Line 1806 of yacc.c */ 4299 /* Line 1464 of yacc.c */
4330 #line 1116 "glsl_parser.ypp" 4300 #line 1116 "glsl_parser.ypp"
4331 { (yyval.n) = ast_mat2x3; } 4301 { (yyval.n) = ast_mat2x3; ;}
4332 break; 4302 break;
4333 4303
4334 case 184: 4304 case 184:
4335 4305
4336 /* Line 1806 of yacc.c */ 4306 /* Line 1464 of yacc.c */
4337 #line 1117 "glsl_parser.ypp" 4307 #line 1117 "glsl_parser.ypp"
4338 { (yyval.n) = ast_mat2x4; } 4308 { (yyval.n) = ast_mat2x4; ;}
4339 break; 4309 break;
4340 4310
4341 case 185: 4311 case 185:
4342 4312
4343 /* Line 1806 of yacc.c */ 4313 /* Line 1464 of yacc.c */
4344 #line 1118 "glsl_parser.ypp" 4314 #line 1118 "glsl_parser.ypp"
4345 { (yyval.n) = ast_mat3x2; } 4315 { (yyval.n) = ast_mat3x2; ;}
4346 break; 4316 break;
4347 4317
4348 case 186: 4318 case 186:
4349 4319
4350 /* Line 1806 of yacc.c */ 4320 /* Line 1464 of yacc.c */
4351 #line 1119 "glsl_parser.ypp" 4321 #line 1119 "glsl_parser.ypp"
4352 { (yyval.n) = ast_mat3; } 4322 { (yyval.n) = ast_mat3; ;}
4353 break; 4323 break;
4354 4324
4355 case 187: 4325 case 187:
4356 4326
4357 /* Line 1806 of yacc.c */ 4327 /* Line 1464 of yacc.c */
4358 #line 1120 "glsl_parser.ypp" 4328 #line 1120 "glsl_parser.ypp"
4359 { (yyval.n) = ast_mat3x4; } 4329 { (yyval.n) = ast_mat3x4; ;}
4360 break; 4330 break;
4361 4331
4362 case 188: 4332 case 188:
4363 4333
4364 /* Line 1806 of yacc.c */ 4334 /* Line 1464 of yacc.c */
4365 #line 1121 "glsl_parser.ypp" 4335 #line 1121 "glsl_parser.ypp"
4366 { (yyval.n) = ast_mat4x2; } 4336 { (yyval.n) = ast_mat4x2; ;}
4367 break; 4337 break;
4368 4338
4369 case 189: 4339 case 189:
4370 4340
4371 /* Line 1806 of yacc.c */ 4341 /* Line 1464 of yacc.c */
4372 #line 1122 "glsl_parser.ypp" 4342 #line 1122 "glsl_parser.ypp"
4373 { (yyval.n) = ast_mat4x3; } 4343 { (yyval.n) = ast_mat4x3; ;}
4374 break; 4344 break;
4375 4345
4376 case 190: 4346 case 190:
4377 4347
4378 /* Line 1806 of yacc.c */ 4348 /* Line 1464 of yacc.c */
4379 #line 1123 "glsl_parser.ypp" 4349 #line 1123 "glsl_parser.ypp"
4380 { (yyval.n) = ast_mat4; } 4350 { (yyval.n) = ast_mat4; ;}
4381 break; 4351 break;
4382 4352
4383 case 191: 4353 case 191:
4384 4354
4385 /* Line 1806 of yacc.c */ 4355 /* Line 1464 of yacc.c */
4386 #line 1124 "glsl_parser.ypp" 4356 #line 1124 "glsl_parser.ypp"
4387 { (yyval.n) = ast_sampler1d; } 4357 { (yyval.n) = ast_sampler1d; ;}
4388 break; 4358 break;
4389 4359
4390 case 192: 4360 case 192:
4391 4361
4392 /* Line 1806 of yacc.c */ 4362 /* Line 1464 of yacc.c */
4393 #line 1125 "glsl_parser.ypp" 4363 #line 1125 "glsl_parser.ypp"
4394 { (yyval.n) = ast_sampler2d; } 4364 { (yyval.n) = ast_sampler2d; ;}
4395 break; 4365 break;
4396 4366
4397 case 193: 4367 case 193:
4398 4368
4399 /* Line 1806 of yacc.c */ 4369 /* Line 1464 of yacc.c */
4400 #line 1126 "glsl_parser.ypp" 4370 #line 1126 "glsl_parser.ypp"
4401 { (yyval.n) = ast_sampler2drect; } 4371 { (yyval.n) = ast_sampler2drect; ;}
4402 break; 4372 break;
4403 4373
4404 case 194: 4374 case 194:
4405 4375
4406 /* Line 1806 of yacc.c */ 4376 /* Line 1464 of yacc.c */
4407 #line 1127 "glsl_parser.ypp" 4377 #line 1127 "glsl_parser.ypp"
4408 { (yyval.n) = ast_sampler3d; } 4378 { (yyval.n) = ast_sampler3d; ;}
4409 break; 4379 break;
4410 4380
4411 case 195: 4381 case 195:
4412 4382
4413 /* Line 1806 of yacc.c */ 4383 /* Line 1464 of yacc.c */
4414 #line 1128 "glsl_parser.ypp" 4384 #line 1128 "glsl_parser.ypp"
4415 { (yyval.n) = ast_samplercube; } 4385 { (yyval.n) = ast_samplercube; ;}
4416 break; 4386 break;
4417 4387
4418 case 196: 4388 case 196:
4419 4389
4420 /* Line 1806 of yacc.c */ 4390 /* Line 1464 of yacc.c */
4421 #line 1129 "glsl_parser.ypp" 4391 #line 1129 "glsl_parser.ypp"
4422 { (yyval.n) = ast_sampler1dshadow; } 4392 { (yyval.n) = ast_sampler1dshadow; ;}
4423 break; 4393 break;
4424 4394
4425 case 197: 4395 case 197:
4426 4396
4427 /* Line 1806 of yacc.c */ 4397 /* Line 1464 of yacc.c */
4428 #line 1130 "glsl_parser.ypp" 4398 #line 1130 "glsl_parser.ypp"
4429 { (yyval.n) = ast_sampler2dshadow; } 4399 { (yyval.n) = ast_sampler2dshadow; ;}
4430 break; 4400 break;
4431 4401
4432 case 198: 4402 case 198:
4433 4403
4434 /* Line 1806 of yacc.c */ 4404 /* Line 1464 of yacc.c */
4435 #line 1131 "glsl_parser.ypp" 4405 #line 1131 "glsl_parser.ypp"
4436 { (yyval.n) = ast_sampler2drectshadow; } 4406 { (yyval.n) = ast_sampler2drectshadow; ;}
4437 break; 4407 break;
4438 4408
4439 case 199: 4409 case 199:
4440 4410
4441 /* Line 1806 of yacc.c */ 4411 /* Line 1464 of yacc.c */
4442 #line 1132 "glsl_parser.ypp" 4412 #line 1132 "glsl_parser.ypp"
4443 { (yyval.n) = ast_samplercubeshadow; } 4413 { (yyval.n) = ast_samplercubeshadow; ;}
4444 break; 4414 break;
4445 4415
4446 case 200: 4416 case 200:
4447 4417
4448 /* Line 1806 of yacc.c */ 4418 /* Line 1464 of yacc.c */
4449 #line 1133 "glsl_parser.ypp" 4419 #line 1133 "glsl_parser.ypp"
4450 { (yyval.n) = ast_sampler1darray; } 4420 { (yyval.n) = ast_sampler1darray; ;}
4451 break; 4421 break;
4452 4422
4453 case 201: 4423 case 201:
4454 4424
4455 /* Line 1806 of yacc.c */ 4425 /* Line 1464 of yacc.c */
4456 #line 1134 "glsl_parser.ypp" 4426 #line 1134 "glsl_parser.ypp"
4457 { (yyval.n) = ast_sampler2darray; } 4427 { (yyval.n) = ast_sampler2darray; ;}
4458 break; 4428 break;
4459 4429
4460 case 202: 4430 case 202:
4461 4431
4462 /* Line 1806 of yacc.c */ 4432 /* Line 1464 of yacc.c */
4463 #line 1135 "glsl_parser.ypp" 4433 #line 1135 "glsl_parser.ypp"
4464 { (yyval.n) = ast_sampler1darrayshadow; } 4434 { (yyval.n) = ast_sampler1darrayshadow; ;}
4465 break; 4435 break;
4466 4436
4467 case 203: 4437 case 203:
4468 4438
4469 /* Line 1806 of yacc.c */ 4439 /* Line 1464 of yacc.c */
4470 #line 1136 "glsl_parser.ypp" 4440 #line 1136 "glsl_parser.ypp"
4471 { (yyval.n) = ast_sampler2darrayshadow; } 4441 { (yyval.n) = ast_sampler2darrayshadow; ;}
4472 break; 4442 break;
4473 4443
4474 case 204: 4444 case 204:
4475 4445
4476 /* Line 1806 of yacc.c */ 4446 /* Line 1464 of yacc.c */
4477 #line 1137 "glsl_parser.ypp" 4447 #line 1137 "glsl_parser.ypp"
4478 { (yyval.n) = ast_isampler1d; } 4448 { (yyval.n) = ast_isampler1d; ;}
4479 break; 4449 break;
4480 4450
4481 case 205: 4451 case 205:
4482 4452
4483 /* Line 1806 of yacc.c */ 4453 /* Line 1464 of yacc.c */
4484 #line 1138 "glsl_parser.ypp" 4454 #line 1138 "glsl_parser.ypp"
4485 { (yyval.n) = ast_isampler2d; } 4455 { (yyval.n) = ast_isampler2d; ;}
4486 break; 4456 break;
4487 4457
4488 case 206: 4458 case 206:
4489 4459
4490 /* Line 1806 of yacc.c */ 4460 /* Line 1464 of yacc.c */
4491 #line 1139 "glsl_parser.ypp" 4461 #line 1139 "glsl_parser.ypp"
4492 { (yyval.n) = ast_isampler3d; } 4462 { (yyval.n) = ast_isampler3d; ;}
4493 break; 4463 break;
4494 4464
4495 case 207: 4465 case 207:
4496 4466
4497 /* Line 1806 of yacc.c */ 4467 /* Line 1464 of yacc.c */
4498 #line 1140 "glsl_parser.ypp" 4468 #line 1140 "glsl_parser.ypp"
4499 { (yyval.n) = ast_isamplercube; } 4469 { (yyval.n) = ast_isamplercube; ;}
4500 break; 4470 break;
4501 4471
4502 case 208: 4472 case 208:
4503 4473
4504 /* Line 1806 of yacc.c */ 4474 /* Line 1464 of yacc.c */
4505 #line 1141 "glsl_parser.ypp" 4475 #line 1141 "glsl_parser.ypp"
4506 { (yyval.n) = ast_isampler1darray; } 4476 { (yyval.n) = ast_isampler1darray; ;}
4507 break; 4477 break;
4508 4478
4509 case 209: 4479 case 209:
4510 4480
4511 /* Line 1806 of yacc.c */ 4481 /* Line 1464 of yacc.c */
4512 #line 1142 "glsl_parser.ypp" 4482 #line 1142 "glsl_parser.ypp"
4513 { (yyval.n) = ast_isampler2darray; } 4483 { (yyval.n) = ast_isampler2darray; ;}
4514 break; 4484 break;
4515 4485
4516 case 210: 4486 case 210:
4517 4487
4518 /* Line 1806 of yacc.c */ 4488 /* Line 1464 of yacc.c */
4519 #line 1143 "glsl_parser.ypp" 4489 #line 1143 "glsl_parser.ypp"
4520 { (yyval.n) = ast_usampler1d; } 4490 { (yyval.n) = ast_usampler1d; ;}
4521 break; 4491 break;
4522 4492
4523 case 211: 4493 case 211:
4524 4494
4525 /* Line 1806 of yacc.c */ 4495 /* Line 1464 of yacc.c */
4526 #line 1144 "glsl_parser.ypp" 4496 #line 1144 "glsl_parser.ypp"
4527 { (yyval.n) = ast_usampler2d; } 4497 { (yyval.n) = ast_usampler2d; ;}
4528 break; 4498 break;
4529 4499
4530 case 212: 4500 case 212:
4531 4501
4532 /* Line 1806 of yacc.c */ 4502 /* Line 1464 of yacc.c */
4533 #line 1145 "glsl_parser.ypp" 4503 #line 1145 "glsl_parser.ypp"
4534 { (yyval.n) = ast_usampler3d; } 4504 { (yyval.n) = ast_usampler3d; ;}
4535 break; 4505 break;
4536 4506
4537 case 213: 4507 case 213:
4538 4508
4539 /* Line 1806 of yacc.c */ 4509 /* Line 1464 of yacc.c */
4540 #line 1146 "glsl_parser.ypp" 4510 #line 1146 "glsl_parser.ypp"
4541 { (yyval.n) = ast_usamplercube; } 4511 { (yyval.n) = ast_usamplercube; ;}
4542 break; 4512 break;
4543 4513
4544 case 214: 4514 case 214:
4545 4515
4546 /* Line 1806 of yacc.c */ 4516 /* Line 1464 of yacc.c */
4547 #line 1147 "glsl_parser.ypp" 4517 #line 1147 "glsl_parser.ypp"
4548 { (yyval.n) = ast_usampler1darray; } 4518 { (yyval.n) = ast_usampler1darray; ;}
4549 break; 4519 break;
4550 4520
4551 case 215: 4521 case 215:
4552 4522
4553 /* Line 1806 of yacc.c */ 4523 /* Line 1464 of yacc.c */
4554 #line 1148 "glsl_parser.ypp" 4524 #line 1148 "glsl_parser.ypp"
4555 { (yyval.n) = ast_usampler2darray; } 4525 { (yyval.n) = ast_usampler2darray; ;}
4556 break; 4526 break;
4557 4527
4558 case 216: 4528 case 216:
4559 4529
4560 /* Line 1806 of yacc.c */ 4530 /* Line 1464 of yacc.c */
4561 #line 1152 "glsl_parser.ypp" 4531 #line 1152 "glsl_parser.ypp"
4562 { 4532 {
4563 if (!state->es_shader && state->language_version < 130) 4533 if (!state->es_shader && state->language_version < 130)
4564 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, 4534 _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
4565 "precision qualifier forbidden " 4535 "precision qualifier forbidden "
4566 "in GLSL %d.%d (1.30 or later " 4536 "in GLSL %d.%d (1.30 or later "
4567 "required)\n", 4537 "required)\n",
4568 state->language_version / 100, 4538 state->language_version / 100,
4569 state->language_version % 100); 4539 state->language_version % 100);
4570 4540
4571 (yyval.n) = ast_precision_high; 4541 (yyval.n) = ast_precision_high;
4572 » » } 4542 » » ;}
4573 break; 4543 break;
4574 4544
4575 case 217: 4545 case 217:
4576 4546
4577 /* Line 1806 of yacc.c */ 4547 /* Line 1464 of yacc.c */
4578 #line 1163 "glsl_parser.ypp" 4548 #line 1163 "glsl_parser.ypp"
4579 { 4549 {
4580 if (!state->es_shader && state->language_version < 130) 4550 if (!state->es_shader && state->language_version < 130)
4581 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, 4551 _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
4582 "precision qualifier forbidden " 4552 "precision qualifier forbidden "
4583 "in GLSL %d.%d (1.30 or later " 4553 "in GLSL %d.%d (1.30 or later "
4584 "required)\n", 4554 "required)\n",
4585 state->language_version / 100, 4555 state->language_version / 100,
4586 state->language_version % 100); 4556 state->language_version % 100);
4587 4557
4588 (yyval.n) = ast_precision_medium; 4558 (yyval.n) = ast_precision_medium;
4589 » » } 4559 » » ;}
4590 break; 4560 break;
4591 4561
4592 case 218: 4562 case 218:
4593 4563
4594 /* Line 1806 of yacc.c */ 4564 /* Line 1464 of yacc.c */
4595 #line 1174 "glsl_parser.ypp" 4565 #line 1174 "glsl_parser.ypp"
4596 { 4566 {
4597 if (!state->es_shader && state->language_version < 130) 4567 if (!state->es_shader && state->language_version < 130)
4598 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, 4568 _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
4599 "precision qualifier forbidden " 4569 "precision qualifier forbidden "
4600 "in GLSL %d.%d (1.30 or later " 4570 "in GLSL %d.%d (1.30 or later "
4601 "required)\n", 4571 "required)\n",
4602 state->language_version / 100, 4572 state->language_version / 100,
4603 state->language_version % 100); 4573 state->language_version % 100);
4604 4574
4605 (yyval.n) = ast_precision_low; 4575 (yyval.n) = ast_precision_low;
4606 » » } 4576 » » ;}
4607 break; 4577 break;
4608 4578
4609 case 219: 4579 case 219:
4610 4580
4611 /* Line 1806 of yacc.c */ 4581 /* Line 1464 of yacc.c */
4612 #line 1189 "glsl_parser.ypp" 4582 #line 1189 "glsl_parser.ypp"
4613 { 4583 {
4614 void *ctx = state; 4584 void *ctx = state;
4615 (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].node)); 4585 (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].node));
4616 (yyval.struct_specifier)->set_location(yylloc); 4586 (yyval.struct_specifier)->set_location(yylloc);
4617 » } 4587 » ;}
4618 break; 4588 break;
4619 4589
4620 case 220: 4590 case 220:
4621 4591
4622 /* Line 1806 of yacc.c */ 4592 /* Line 1464 of yacc.c */
4623 #line 1195 "glsl_parser.ypp" 4593 #line 1195 "glsl_parser.ypp"
4624 { 4594 {
4625 void *ctx = state; 4595 void *ctx = state;
4626 (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp [(3) - (4)].node)); 4596 (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp [(3) - (4)].node));
4627 (yyval.struct_specifier)->set_location(yylloc); 4597 (yyval.struct_specifier)->set_location(yylloc);
4628 » } 4598 » ;}
4629 break; 4599 break;
4630 4600
4631 case 221: 4601 case 221:
4632 4602
4633 /* Line 1806 of yacc.c */ 4603 /* Line 1464 of yacc.c */
4634 #line 1204 "glsl_parser.ypp" 4604 #line 1204 "glsl_parser.ypp"
4635 { 4605 {
4636 (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list); 4606 (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list);
4637 (yyvsp[(1) - (1)].declarator_list)->link.self_link(); 4607 (yyvsp[(1) - (1)].declarator_list)->link.self_link();
4638 » } 4608 » ;}
4639 break; 4609 break;
4640 4610
4641 case 222: 4611 case 222:
4642 4612
4643 /* Line 1806 of yacc.c */ 4613 /* Line 1464 of yacc.c */
4644 #line 1209 "glsl_parser.ypp" 4614 #line 1209 "glsl_parser.ypp"
4645 { 4615 {
4646 (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node); 4616 (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node);
4647 (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list) ->link); 4617 (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list) ->link);
4648 » } 4618 » ;}
4649 break; 4619 break;
4650 4620
4651 case 223: 4621 case 223:
4652 4622
4653 /* Line 1806 of yacc.c */ 4623 /* Line 1464 of yacc.c */
4654 #line 1217 "glsl_parser.ypp" 4624 #line 1217 "glsl_parser.ypp"
4655 { 4625 {
4656 void *ctx = state; 4626 void *ctx = state;
4657 ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); 4627 ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
4658 type->set_location(yylloc); 4628 type->set_location(yylloc);
4659 4629
4660 type->specifier = (yyvsp[(1) - (3)].type_specifier); 4630 type->specifier = (yyvsp[(1) - (3)].type_specifier);
4661 (yyval.declarator_list) = new(ctx) ast_declarator_list(type); 4631 (yyval.declarator_list) = new(ctx) ast_declarator_list(type);
4662 (yyval.declarator_list)->set_location(yylloc); 4632 (yyval.declarator_list)->set_location(yylloc);
4663 4633
4664 (yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(2) - (3)].declaration)->link); 4634 (yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(2) - (3)].declaration)->link);
4665 » } 4635 » ;}
4666 break; 4636 break;
4667 4637
4668 case 224: 4638 case 224:
4669 4639
4670 /* Line 1806 of yacc.c */ 4640 /* Line 1464 of yacc.c */
4671 #line 1232 "glsl_parser.ypp" 4641 #line 1232 "glsl_parser.ypp"
4672 { 4642 {
4673 (yyval.declaration) = (yyvsp[(1) - (1)].declaration); 4643 (yyval.declaration) = (yyvsp[(1) - (1)].declaration);
4674 (yyvsp[(1) - (1)].declaration)->link.self_link(); 4644 (yyvsp[(1) - (1)].declaration)->link.self_link();
4675 » } 4645 » ;}
4676 break; 4646 break;
4677 4647
4678 case 225: 4648 case 225:
4679 4649
4680 /* Line 1806 of yacc.c */ 4650 /* Line 1464 of yacc.c */
4681 #line 1237 "glsl_parser.ypp" 4651 #line 1237 "glsl_parser.ypp"
4682 { 4652 {
4683 (yyval.declaration) = (yyvsp[(1) - (3)].declaration); 4653 (yyval.declaration) = (yyvsp[(1) - (3)].declaration);
4684 (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declarati on)->link); 4654 (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declarati on)->link);
4685 » } 4655 » ;}
4686 break; 4656 break;
4687 4657
4688 case 226: 4658 case 226:
4689 4659
4690 /* Line 1806 of yacc.c */ 4660 /* Line 1464 of yacc.c */
4691 #line 1245 "glsl_parser.ypp" 4661 #line 1245 "glsl_parser.ypp"
4692 { 4662 {
4693 void *ctx = state; 4663 void *ctx = state;
4694 (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].iden tifier), false, NULL, NULL); 4664 (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].iden tifier), false, NULL, NULL);
4695 (yyval.declaration)->set_location(yylloc); 4665 (yyval.declaration)->set_location(yylloc);
4696 » } 4666 » ;}
4697 break; 4667 break;
4698 4668
4699 case 227: 4669 case 227:
4700 4670
4701 /* Line 1806 of yacc.c */ 4671 /* Line 1464 of yacc.c */
4702 #line 1251 "glsl_parser.ypp" 4672 #line 1251 "glsl_parser.ypp"
4703 { 4673 {
4704 void *ctx = state; 4674 void *ctx = state;
4705 (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].iden tifier), true, (yyvsp[(3) - (4)].expression), NULL); 4675 (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].iden tifier), true, (yyvsp[(3) - (4)].expression), NULL);
4706 (yyval.declaration)->set_location(yylloc); 4676 (yyval.declaration)->set_location(yylloc);
4707 » } 4677 » ;}
4708 break; 4678 break;
4709 4679
4710 case 230: 4680 case 230:
4711 4681
4712 /* Line 1806 of yacc.c */ 4682 /* Line 1464 of yacc.c */
4713 #line 1269 "glsl_parser.ypp" 4683 #line 1269 "glsl_parser.ypp"
4714 { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); } 4684 { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
4715 break; 4685 break;
4716 4686
4717 case 235: 4687 case 235:
4718 4688
4719 /* Line 1806 of yacc.c */ 4689 /* Line 1464 of yacc.c */
4720 #line 1277 "glsl_parser.ypp" 4690 #line 1277 "glsl_parser.ypp"
4721 { (yyval.node) = NULL; } 4691 { (yyval.node) = NULL; ;}
4722 break; 4692 break;
4723 4693
4724 case 236: 4694 case 236:
4725 4695
4726 /* Line 1806 of yacc.c */ 4696 /* Line 1464 of yacc.c */
4727 #line 1278 "glsl_parser.ypp" 4697 #line 1278 "glsl_parser.ypp"
4728 { (yyval.node) = NULL; } 4698 { (yyval.node) = NULL; ;}
4729 break; 4699 break;
4730 4700
4731 case 239: 4701 case 239:
4732 4702
4733 /* Line 1806 of yacc.c */ 4703 /* Line 1464 of yacc.c */
4734 #line 1285 "glsl_parser.ypp" 4704 #line 1285 "glsl_parser.ypp"
4735 { 4705 {
4736 void *ctx = state; 4706 void *ctx = state;
4737 (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NU LL); 4707 (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NU LL);
4738 (yyval.compound_statement)->set_location(yylloc); 4708 (yyval.compound_statement)->set_location(yylloc);
4739 » } 4709 » ;}
4740 break; 4710 break;
4741 4711
4742 case 240: 4712 case 240:
4743 4713
4744 /* Line 1806 of yacc.c */ 4714 /* Line 1464 of yacc.c */
4745 #line 1291 "glsl_parser.ypp" 4715 #line 1291 "glsl_parser.ypp"
4746 { 4716 {
4747 void *ctx = state; 4717 void *ctx = state;
4748 (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (y yvsp[(2) - (3)].node)); 4718 (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (y yvsp[(2) - (3)].node));
4749 (yyval.compound_statement)->set_location(yylloc); 4719 (yyval.compound_statement)->set_location(yylloc);
4750 » } 4720 » ;}
4751 break; 4721 break;
4752 4722
4753 case 241: 4723 case 241:
4754 4724
4755 /* Line 1806 of yacc.c */ 4725 /* Line 1464 of yacc.c */
4756 #line 1299 "glsl_parser.ypp" 4726 #line 1299 "glsl_parser.ypp"
4757 { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); } 4727 { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
4758 break; 4728 break;
4759 4729
4760 case 243: 4730 case 243:
4761 4731
4762 /* Line 1806 of yacc.c */ 4732 /* Line 1464 of yacc.c */
4763 #line 1305 "glsl_parser.ypp" 4733 #line 1305 "glsl_parser.ypp"
4764 { 4734 {
4765 void *ctx = state; 4735 void *ctx = state;
4766 (yyval.compound_statement) = new(ctx) ast_compound_statement(false, N ULL); 4736 (yyval.compound_statement) = new(ctx) ast_compound_statement(false, N ULL);
4767 (yyval.compound_statement)->set_location(yylloc); 4737 (yyval.compound_statement)->set_location(yylloc);
4768 » } 4738 » ;}
4769 break; 4739 break;
4770 4740
4771 case 244: 4741 case 244:
4772 4742
4773 /* Line 1806 of yacc.c */ 4743 /* Line 1464 of yacc.c */
4774 #line 1311 "glsl_parser.ypp" 4744 #line 1311 "glsl_parser.ypp"
4775 { 4745 {
4776 void *ctx = state; 4746 void *ctx = state;
4777 (yyval.compound_statement) = new(ctx) ast_compound_statement(false, ( yyvsp[(2) - (3)].node)); 4747 (yyval.compound_statement) = new(ctx) ast_compound_statement(false, ( yyvsp[(2) - (3)].node));
4778 (yyval.compound_statement)->set_location(yylloc); 4748 (yyval.compound_statement)->set_location(yylloc);
4779 » } 4749 » ;}
4780 break; 4750 break;
4781 4751
4782 case 245: 4752 case 245:
4783 4753
4784 /* Line 1806 of yacc.c */ 4754 /* Line 1464 of yacc.c */
4785 #line 1320 "glsl_parser.ypp" 4755 #line 1320 "glsl_parser.ypp"
4786 { 4756 {
4787 if ((yyvsp[(1) - (1)].node) == NULL) { 4757 if ((yyvsp[(1) - (1)].node) == NULL) {
4788 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "<nil> statement\n") ; 4758 _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "<nil> statement\n") ;
4789 assert((yyvsp[(1) - (1)].node) != NULL); 4759 assert((yyvsp[(1) - (1)].node) != NULL);
4790 } 4760 }
4791 4761
4792 (yyval.node) = (yyvsp[(1) - (1)].node); 4762 (yyval.node) = (yyvsp[(1) - (1)].node);
4793 (yyval.node)->link.self_link(); 4763 (yyval.node)->link.self_link();
4794 » } 4764 » ;}
4795 break; 4765 break;
4796 4766
4797 case 246: 4767 case 246:
4798 4768
4799 /* Line 1806 of yacc.c */ 4769 /* Line 1464 of yacc.c */
4800 #line 1330 "glsl_parser.ypp" 4770 #line 1330 "glsl_parser.ypp"
4801 { 4771 {
4802 if ((yyvsp[(2) - (2)].node) == NULL) { 4772 if ((yyvsp[(2) - (2)].node) == NULL) {
4803 _mesa_glsl_error(& (yylsp[(2) - (2)]), state, "<nil> statement\n") ; 4773 _mesa_glsl_error(& (yylsp[(2) - (2)]), state, "<nil> statement\n") ;
4804 assert((yyvsp[(2) - (2)].node) != NULL); 4774 assert((yyvsp[(2) - (2)].node) != NULL);
4805 } 4775 }
4806 (yyval.node) = (yyvsp[(1) - (2)].node); 4776 (yyval.node) = (yyvsp[(1) - (2)].node);
4807 (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].node)->link); 4777 (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].node)->link);
4808 » } 4778 » ;}
4809 break; 4779 break;
4810 4780
4811 case 247: 4781 case 247:
4812 4782
4813 /* Line 1806 of yacc.c */ 4783 /* Line 1464 of yacc.c */
4814 #line 1342 "glsl_parser.ypp" 4784 #line 1342 "glsl_parser.ypp"
4815 { 4785 {
4816 void *ctx = state; 4786 void *ctx = state;
4817 (yyval.node) = new(ctx) ast_expression_statement(NULL); 4787 (yyval.node) = new(ctx) ast_expression_statement(NULL);
4818 (yyval.node)->set_location(yylloc); 4788 (yyval.node)->set_location(yylloc);
4819 » } 4789 » ;}
4820 break; 4790 break;
4821 4791
4822 case 248: 4792 case 248:
4823 4793
4824 /* Line 1806 of yacc.c */ 4794 /* Line 1464 of yacc.c */
4825 #line 1348 "glsl_parser.ypp" 4795 #line 1348 "glsl_parser.ypp"
4826 { 4796 {
4827 void *ctx = state; 4797 void *ctx = state;
4828 (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].ex pression)); 4798 (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].ex pression));
4829 (yyval.node)->set_location(yylloc); 4799 (yyval.node)->set_location(yylloc);
4830 » } 4800 » ;}
4831 break; 4801 break;
4832 4802
4833 case 249: 4803 case 249:
4834 4804
4835 /* Line 1806 of yacc.c */ 4805 /* Line 1464 of yacc.c */
4836 #line 1357 "glsl_parser.ypp" 4806 #line 1357 "glsl_parser.ypp"
4837 { 4807 {
4838 (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].e xpression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement, 4808 (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].e xpression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement,
4839 (yyvsp[(5) - (5)].selection_r est_statement).else_statement); 4809 (yyvsp[(5) - (5)].selection_r est_statement).else_statement);
4840 (yyval.node)->set_location(yylloc); 4810 (yyval.node)->set_location(yylloc);
4841 » } 4811 » ;}
4842 break; 4812 break;
4843 4813
4844 case 250: 4814 case 250:
4845 4815
4846 /* Line 1806 of yacc.c */ 4816 /* Line 1464 of yacc.c */
4847 #line 1366 "glsl_parser.ypp" 4817 #line 1366 "glsl_parser.ypp"
4848 { 4818 {
4849 (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].n ode); 4819 (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].n ode);
4850 (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].n ode); 4820 (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].n ode);
4851 » } 4821 » ;}
4852 break; 4822 break;
4853 4823
4854 case 251: 4824 case 251:
4855 4825
4856 /* Line 1806 of yacc.c */ 4826 /* Line 1464 of yacc.c */
4857 #line 1371 "glsl_parser.ypp" 4827 #line 1371 "glsl_parser.ypp"
4858 { 4828 {
4859 (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].n ode); 4829 (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].n ode);
4860 (yyval.selection_rest_statement).else_statement = NULL; 4830 (yyval.selection_rest_statement).else_statement = NULL;
4861 » } 4831 » ;}
4862 break; 4832 break;
4863 4833
4864 case 252: 4834 case 252:
4865 4835
4866 /* Line 1806 of yacc.c */ 4836 /* Line 1464 of yacc.c */
4867 #line 1379 "glsl_parser.ypp" 4837 #line 1379 "glsl_parser.ypp"
4868 { 4838 {
4869 (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression); 4839 (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
4870 » } 4840 » ;}
4871 break; 4841 break;
4872 4842
4873 case 253: 4843 case 253:
4874 4844
4875 /* Line 1806 of yacc.c */ 4845 /* Line 1464 of yacc.c */
4876 #line 1383 "glsl_parser.ypp" 4846 #line 1383 "glsl_parser.ypp"
4877 { 4847 {
4878 void *ctx = state; 4848 void *ctx = state;
4879 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].id entifier), false, NULL, (yyvsp[(4) - (4)].expression)); 4849 ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].id entifier), false, NULL, (yyvsp[(4) - (4)].expression));
4880 ast_declarator_list *declarator = new(ctx) ast_declarator_list((yyvsp [(1) - (4)].fully_specified_type)); 4850 ast_declarator_list *declarator = new(ctx) ast_declarator_list((yyvsp [(1) - (4)].fully_specified_type));
4881 decl->set_location(yylloc); 4851 decl->set_location(yylloc);
4882 declarator->set_location(yylloc); 4852 declarator->set_location(yylloc);
4883 4853
4884 declarator->declarations.push_tail(&decl->link); 4854 declarator->declarations.push_tail(&decl->link);
4885 (yyval.node) = declarator; 4855 (yyval.node) = declarator;
4886 » } 4856 » ;}
4887 break; 4857 break;
4888 4858
4889 case 257: 4859 case 257:
4890 4860
4891 /* Line 1806 of yacc.c */ 4861 /* Line 1464 of yacc.c */
4892 #line 1406 "glsl_parser.ypp" 4862 #line 1406 "glsl_parser.ypp"
4893 { 4863 {
4894 void *ctx = state; 4864 void *ctx = state;
4895 (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_stateme nt::ast_while, 4865 (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_stateme nt::ast_while,
4896 NULL, (yyvsp[(3) - (5)].node ), NULL, (yyvsp[(5) - (5)].node)); 4866 NULL, (yyvsp[(3) - (5)].node ), NULL, (yyvsp[(5) - (5)].node));
4897 (yyval.node)->set_location(yylloc); 4867 (yyval.node)->set_location(yylloc);
4898 » } 4868 » ;}
4899 break; 4869 break;
4900 4870
4901 case 258: 4871 case 258:
4902 4872
4903 /* Line 1806 of yacc.c */ 4873 /* Line 1464 of yacc.c */
4904 #line 1413 "glsl_parser.ypp" 4874 #line 1413 "glsl_parser.ypp"
4905 { 4875 {
4906 void *ctx = state; 4876 void *ctx = state;
4907 (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_stateme nt::ast_do_while, 4877 (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_stateme nt::ast_do_while,
4908 NULL, (yyvsp[(5) - (7)].expr ession), NULL, (yyvsp[(2) - (7)].node)); 4878 NULL, (yyvsp[(5) - (7)].expr ession), NULL, (yyvsp[(2) - (7)].node));
4909 (yyval.node)->set_location(yylloc); 4879 (yyval.node)->set_location(yylloc);
4910 » } 4880 » ;}
4911 break; 4881 break;
4912 4882
4913 case 259: 4883 case 259:
4914 4884
4915 /* Line 1806 of yacc.c */ 4885 /* Line 1464 of yacc.c */
4916 #line 1420 "glsl_parser.ypp" 4886 #line 1420 "glsl_parser.ypp"
4917 { 4887 {
4918 void *ctx = state; 4888 void *ctx = state;
4919 (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_stateme nt::ast_for, 4889 (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_stateme nt::ast_for,
4920 (yyvsp[(3) - (6)].node), (yy vsp[(4) - (6)].for_rest_statement).cond, (yyvsp[(4) - (6)].for_rest_statement).r est, (yyvsp[(6) - (6)].node)); 4890 (yyvsp[(3) - (6)].node), (yy vsp[(4) - (6)].for_rest_statement).cond, (yyvsp[(4) - (6)].for_rest_statement).r est, (yyvsp[(6) - (6)].node));
4921 (yyval.node)->set_location(yylloc); 4891 (yyval.node)->set_location(yylloc);
4922 » } 4892 » ;}
4923 break; 4893 break;
4924 4894
4925 case 263: 4895 case 263:
4926 4896
4927 /* Line 1806 of yacc.c */ 4897 /* Line 1464 of yacc.c */
4928 #line 1436 "glsl_parser.ypp" 4898 #line 1436 "glsl_parser.ypp"
4929 { 4899 {
4930 (yyval.node) = NULL; 4900 (yyval.node) = NULL;
4931 » } 4901 » ;}
4932 break; 4902 break;
4933 4903
4934 case 264: 4904 case 264:
4935 4905
4936 /* Line 1806 of yacc.c */ 4906 /* Line 1464 of yacc.c */
4937 #line 1443 "glsl_parser.ypp" 4907 #line 1443 "glsl_parser.ypp"
4938 { 4908 {
4939 (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node); 4909 (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node);
4940 (yyval.for_rest_statement).rest = NULL; 4910 (yyval.for_rest_statement).rest = NULL;
4941 » } 4911 » ;}
4942 break; 4912 break;
4943 4913
4944 case 265: 4914 case 265:
4945 4915
4946 /* Line 1806 of yacc.c */ 4916 /* Line 1464 of yacc.c */
4947 #line 1448 "glsl_parser.ypp" 4917 #line 1448 "glsl_parser.ypp"
4948 { 4918 {
4949 (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node); 4919 (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node);
4950 (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression); 4920 (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression);
4951 » } 4921 » ;}
4952 break; 4922 break;
4953 4923
4954 case 266: 4924 case 266:
4955 4925
4956 /* Line 1806 of yacc.c */ 4926 /* Line 1464 of yacc.c */
4957 #line 1457 "glsl_parser.ypp" 4927 #line 1457 "glsl_parser.ypp"
4958 { 4928 {
4959 void *ctx = state; 4929 void *ctx = state;
4960 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_co ntinue, NULL); 4930 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_co ntinue, NULL);
4961 (yyval.node)->set_location(yylloc); 4931 (yyval.node)->set_location(yylloc);
4962 » } 4932 » ;}
4963 break; 4933 break;
4964 4934
4965 case 267: 4935 case 267:
4966 4936
4967 /* Line 1806 of yacc.c */ 4937 /* Line 1464 of yacc.c */
4968 #line 1463 "glsl_parser.ypp" 4938 #line 1463 "glsl_parser.ypp"
4969 { 4939 {
4970 void *ctx = state; 4940 void *ctx = state;
4971 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_br eak, NULL); 4941 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_br eak, NULL);
4972 (yyval.node)->set_location(yylloc); 4942 (yyval.node)->set_location(yylloc);
4973 » } 4943 » ;}
4974 break; 4944 break;
4975 4945
4976 case 268: 4946 case 268:
4977 4947
4978 /* Line 1806 of yacc.c */ 4948 /* Line 1464 of yacc.c */
4979 #line 1469 "glsl_parser.ypp" 4949 #line 1469 "glsl_parser.ypp"
4980 { 4950 {
4981 void *ctx = state; 4951 void *ctx = state;
4982 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_re turn, NULL); 4952 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_re turn, NULL);
4983 (yyval.node)->set_location(yylloc); 4953 (yyval.node)->set_location(yylloc);
4984 » } 4954 » ;}
4985 break; 4955 break;
4986 4956
4987 case 269: 4957 case 269:
4988 4958
4989 /* Line 1806 of yacc.c */ 4959 /* Line 1464 of yacc.c */
4990 #line 1475 "glsl_parser.ypp" 4960 #line 1475 "glsl_parser.ypp"
4991 { 4961 {
4992 void *ctx = state; 4962 void *ctx = state;
4993 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_re turn, (yyvsp[(2) - (3)].expression)); 4963 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_re turn, (yyvsp[(2) - (3)].expression));
4994 (yyval.node)->set_location(yylloc); 4964 (yyval.node)->set_location(yylloc);
4995 » } 4965 » ;}
4996 break; 4966 break;
4997 4967
4998 case 270: 4968 case 270:
4999 4969
5000 /* Line 1806 of yacc.c */ 4970 /* Line 1464 of yacc.c */
5001 #line 1481 "glsl_parser.ypp" 4971 #line 1481 "glsl_parser.ypp"
5002 { 4972 {
5003 void *ctx = state; 4973 void *ctx = state;
5004 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_di scard, NULL); 4974 (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_di scard, NULL);
5005 (yyval.node)->set_location(yylloc); 4975 (yyval.node)->set_location(yylloc);
5006 » } 4976 » ;}
5007 break; 4977 break;
5008 4978
5009 case 271: 4979 case 271:
5010 4980
5011 /* Line 1806 of yacc.c */ 4981 /* Line 1464 of yacc.c */
5012 #line 1489 "glsl_parser.ypp" 4982 #line 1489 "glsl_parser.ypp"
5013 { (yyval.node) = (yyvsp[(1) - (1)].function_definition); } 4983 { (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;}
5014 break; 4984 break;
5015 4985
5016 case 272: 4986 case 272:
5017 4987
5018 /* Line 1806 of yacc.c */ 4988 /* Line 1464 of yacc.c */
5019 #line 1490 "glsl_parser.ypp" 4989 #line 1490 "glsl_parser.ypp"
5020 { (yyval.node) = (yyvsp[(1) - (1)].node); } 4990 { (yyval.node) = (yyvsp[(1) - (1)].node); ;}
5021 break; 4991 break;
5022 4992
5023 case 273: 4993 case 273:
5024 4994
5025 /* Line 1806 of yacc.c */ 4995 /* Line 1464 of yacc.c */
5026 #line 1491 "glsl_parser.ypp" 4996 #line 1491 "glsl_parser.ypp"
5027 { (yyval.node) = NULL; } 4997 { (yyval.node) = NULL; ;}
5028 break; 4998 break;
5029 4999
5030 case 274: 5000 case 274:
5031 5001
5032 /* Line 1806 of yacc.c */ 5002 /* Line 1464 of yacc.c */
5033 #line 1496 "glsl_parser.ypp" 5003 #line 1496 "glsl_parser.ypp"
5034 { 5004 {
5035 void *ctx = state; 5005 void *ctx = state;
5036 (yyval.function_definition) = new(ctx) ast_function_definition(); 5006 (yyval.function_definition) = new(ctx) ast_function_definition();
5037 (yyval.function_definition)->set_location(yylloc); 5007 (yyval.function_definition)->set_location(yylloc);
5038 (yyval.function_definition)->prototype = (yyvsp[(1) - (2)].function); 5008 (yyval.function_definition)->prototype = (yyvsp[(1) - (2)].function);
5039 (yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statem ent); 5009 (yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statem ent);
5040 » } 5010 » ;}
5041 break; 5011 break;
5042 5012
5043 5013
5044 5014
5045 /* Line 1806 of yacc.c */ 5015 /* Line 1464 of yacc.c */
5046 #line 5047 "glsl_parser.cpp" 5016 #line 5016 "glsl_parser.cpp"
5047 default: break; 5017 default: break;
5048 } 5018 }
5049 /* User semantic actions sometimes alter yychar, and that requires
5050 that yytoken be updated with the new translation. We take the
5051 approach of translating immediately before every use of yytoken.
5052 One alternative is translating here after every semantic action,
5053 but that translation would be missed if the semantic action invokes
5054 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5055 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5056 incorrect destructor might then be invoked immediately. In the
5057 case of YYERROR or YYBACKUP, subsequent parser actions might lead
5058 to an incorrect destructor call or verbose syntax error message
5059 before the lookahead is translated. */
5060 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 5019 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5061 5020
5062 YYPOPSTACK (yylen); 5021 YYPOPSTACK (yylen);
5063 yylen = 0; 5022 yylen = 0;
5064 YY_STACK_PRINT (yyss, yyssp); 5023 YY_STACK_PRINT (yyss, yyssp);
5065 5024
5066 *++yyvsp = yyval; 5025 *++yyvsp = yyval;
5067 *++yylsp = yyloc; 5026 *++yylsp = yyloc;
5068 5027
5069 /* Now `shift' the result of the reduction. Determine what state 5028 /* Now `shift' the result of the reduction. Determine what state
5070 that goes to, based on the state we popped back to and the rule 5029 that goes to, based on the state we popped back to and the rule
5071 number reduced by. */ 5030 number reduced by. */
5072 5031
5073 yyn = yyr1[yyn]; 5032 yyn = yyr1[yyn];
5074 5033
5075 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 5034 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5076 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 5035 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5077 yystate = yytable[yystate]; 5036 yystate = yytable[yystate];
5078 else 5037 else
5079 yystate = yydefgoto[yyn - YYNTOKENS]; 5038 yystate = yydefgoto[yyn - YYNTOKENS];
5080 5039
5081 goto yynewstate; 5040 goto yynewstate;
5082 5041
5083 5042
5084 /*------------------------------------. 5043 /*------------------------------------.
5085 | yyerrlab -- here on detecting error | 5044 | yyerrlab -- here on detecting error |
5086 `------------------------------------*/ 5045 `------------------------------------*/
5087 yyerrlab: 5046 yyerrlab:
5088 /* Make sure we have latest lookahead translation. See comments at
5089 user semantic actions for why this is necessary. */
5090 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5091
5092 /* If not already recovering from an error, report this error. */ 5047 /* If not already recovering from an error, report this error. */
5093 if (!yyerrstatus) 5048 if (!yyerrstatus)
5094 { 5049 {
5095 ++yynerrs; 5050 ++yynerrs;
5096 #if ! YYERROR_VERBOSE 5051 #if ! YYERROR_VERBOSE
5097 yyerror (&yylloc, state, YY_("syntax error")); 5052 yyerror (&yylloc, state, YY_("syntax error"));
5098 #else 5053 #else
5099 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5100 yyssp, yytoken)
5101 { 5054 {
5102 char const *yymsgp = YY_("syntax error"); 5055 » YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5103 int yysyntax_error_status; 5056 » if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5104 yysyntax_error_status = YYSYNTAX_ERROR; 5057 » {
5105 if (yysyntax_error_status == 0) 5058 » YYSIZE_T yyalloc = 2 * yysize;
5106 yymsgp = yymsg; 5059 » if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5107 else if (yysyntax_error_status == 1) 5060 » yyalloc = YYSTACK_ALLOC_MAXIMUM;
5108 { 5061 » if (yymsg != yymsgbuf)
5109 if (yymsg != yymsgbuf) 5062 » YYSTACK_FREE (yymsg);
5110 YYSTACK_FREE (yymsg); 5063 » yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5111 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 5064 » if (yymsg)
5112 if (!yymsg) 5065 » yymsg_alloc = yyalloc;
5113 { 5066 » else
5114 yymsg = yymsgbuf; 5067 » {
5115 yymsg_alloc = sizeof yymsgbuf; 5068 » » yymsg = yymsgbuf;
5116 yysyntax_error_status = 2; 5069 » » yymsg_alloc = sizeof yymsgbuf;
5117 } 5070 » }
5118 else 5071 » }
5119 { 5072
5120 yysyntax_error_status = YYSYNTAX_ERROR; 5073 » if (0 < yysize && yysize <= yymsg_alloc)
5121 yymsgp = yymsg; 5074 » {
5122 } 5075 » (void) yysyntax_error (yymsg, yystate, yychar);
5123 } 5076 » yyerror (&yylloc, state, yymsg);
5124 yyerror (&yylloc, state, yymsgp); 5077 » }
5125 if (yysyntax_error_status == 2) 5078 » else
5126 goto yyexhaustedlab; 5079 » {
5080 » yyerror (&yylloc, state, YY_("syntax error"));
5081 » if (yysize != 0)
5082 » goto yyexhaustedlab;
5083 » }
5127 } 5084 }
5128 # undef YYSYNTAX_ERROR
5129 #endif 5085 #endif
5130 } 5086 }
5131 5087
5132 yyerror_range[1] = yylloc; 5088 yyerror_range[1] = yylloc;
5133 5089
5134 if (yyerrstatus == 3) 5090 if (yyerrstatus == 3)
5135 { 5091 {
5136 /* If just tried and failed to reuse lookahead token after an 5092 /* If just tried and failed to reuse lookahead token after an
5137 error, discard it. */ 5093 error, discard it. */
5138 5094
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
5178 5134
5179 /*-------------------------------------------------------------. 5135 /*-------------------------------------------------------------.
5180 | yyerrlab1 -- common code for both syntax error and YYERROR. | 5136 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5181 `-------------------------------------------------------------*/ 5137 `-------------------------------------------------------------*/
5182 yyerrlab1: 5138 yyerrlab1:
5183 yyerrstatus = 3; /* Each real token shifted decrements this. */ 5139 yyerrstatus = 3; /* Each real token shifted decrements this. */
5184 5140
5185 for (;;) 5141 for (;;)
5186 { 5142 {
5187 yyn = yypact[yystate]; 5143 yyn = yypact[yystate];
5188 if (!yypact_value_is_default (yyn)) 5144 if (yyn != YYPACT_NINF)
5189 { 5145 {
5190 yyn += YYTERROR; 5146 yyn += YYTERROR;
5191 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 5147 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5192 { 5148 {
5193 yyn = yytable[yyn]; 5149 yyn = yytable[yyn];
5194 if (0 < yyn) 5150 if (0 < yyn)
5195 break; 5151 break;
5196 } 5152 }
5197 } 5153 }
5198 5154
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
5242 | yyexhaustedlab -- memory exhaustion comes here. | 5198 | yyexhaustedlab -- memory exhaustion comes here. |
5243 `-------------------------------------------------*/ 5199 `-------------------------------------------------*/
5244 yyexhaustedlab: 5200 yyexhaustedlab:
5245 yyerror (&yylloc, state, YY_("memory exhausted")); 5201 yyerror (&yylloc, state, YY_("memory exhausted"));
5246 yyresult = 2; 5202 yyresult = 2;
5247 /* Fall through. */ 5203 /* Fall through. */
5248 #endif 5204 #endif
5249 5205
5250 yyreturn: 5206 yyreturn:
5251 if (yychar != YYEMPTY) 5207 if (yychar != YYEMPTY)
5252 { 5208 yydestruct ("Cleanup: discarding lookahead",
5253 /* Make sure we have latest lookahead translation. See comments at 5209 » » yytoken, &yylval, &yylloc, state);
5254 user semantic actions for why this is necessary. */
5255 yytoken = YYTRANSLATE (yychar);
5256 yydestruct ("Cleanup: discarding lookahead",
5257 yytoken, &yylval, &yylloc, state);
5258 }
5259 /* Do not reclaim the symbols of the rule which action triggered 5210 /* Do not reclaim the symbols of the rule which action triggered
5260 this YYABORT or YYACCEPT. */ 5211 this YYABORT or YYACCEPT. */
5261 YYPOPSTACK (yylen); 5212 YYPOPSTACK (yylen);
5262 YY_STACK_PRINT (yyss, yyssp); 5213 YY_STACK_PRINT (yyss, yyssp);
5263 while (yyssp != yyss) 5214 while (yyssp != yyss)
5264 { 5215 {
5265 yydestruct ("Cleanup: popping", 5216 yydestruct ("Cleanup: popping",
5266 yystos[*yyssp], yyvsp, yylsp, state); 5217 yystos[*yyssp], yyvsp, yylsp, state);
5267 YYPOPSTACK (1); 5218 YYPOPSTACK (1);
5268 } 5219 }
5269 #ifndef yyoverflow 5220 #ifndef yyoverflow
5270 if (yyss != yyssa) 5221 if (yyss != yyssa)
5271 YYSTACK_FREE (yyss); 5222 YYSTACK_FREE (yyss);
5272 #endif 5223 #endif
5273 #if YYERROR_VERBOSE 5224 #if YYERROR_VERBOSE
5274 if (yymsg != yymsgbuf) 5225 if (yymsg != yymsgbuf)
5275 YYSTACK_FREE (yymsg); 5226 YYSTACK_FREE (yymsg);
5276 #endif 5227 #endif
5277 /* Make sure YYID is used. */ 5228 /* Make sure YYID is used. */
5278 return YYID (yyresult); 5229 return YYID (yyresult);
5279 } 5230 }
5280 5231
5281 5232
5282 5233
OLDNEW
« no previous file with comments | « third_party/mesa/MesaLib/src/glsl/glsl_parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698