1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
64 /* Substitute the variable and function names. */
65 #define yyparse asmshader_parse
66 #define yylex asmshader_lex
67 #define yyerror asmshader_error
68 #define yylval asmshader_lval
69 #define yychar asmshader_char
70 #define yydebug asmshader_debug
71 #define yynerrs asmshader_nerrs
74 /* Copy the first part of user declarations. */
76 /* Line 268 of yacc.c */
77 #line 22 "asmshader.y"
79 #include "d3dcompiler_private.h"
81 WINE_DEFAULT_DEBUG_CHANNEL(asmshader
);
83 struct asm_parser asm_ctx
;
85 void asmparser_message(struct asm_parser
*ctx
, const char *fmt
, ...)
90 compilation_message(&ctx
->messages
, fmt
, args
);
94 static void asmshader_error(char const *s
) {
95 asmparser_message(&asm_ctx
, "Line %u: Error \"%s\" from bison\n", asm_ctx
.line_no
, s
);
96 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
99 static void set_rel_reg(struct shader_reg
*reg
, struct rel_reg
*rel
) {
100 /* We can have an additional offset without true relative addressing
102 reg
->regnum
+= rel
->additional_offset
;
103 if(!rel
->has_rel_reg
) {
106 reg
->rel_reg
= d3dcompiler_alloc(sizeof(*reg
->rel_reg
));
110 reg
->rel_reg
->type
= rel
->type
;
111 reg
->rel_reg
->u
.swizzle
= rel
->swizzle
;
112 reg
->rel_reg
->regnum
= rel
->rel_regnum
;
116 /* Needed lexer functions declarations */
117 int asmshader_lex(void);
122 /* Line 268 of yacc.c */
123 #line 128 "asmshader.tab.c"
125 /* Enabling traces. */
130 /* Enabling verbose error messages. */
131 #ifdef YYERROR_VERBOSE
132 # undef YYERROR_VERBOSE
133 # define YYERROR_VERBOSE 1
135 # define YYERROR_VERBOSE 0
138 /* Enabling the token table. */
139 #ifndef YYTOKEN_TABLE
140 # define YYTOKEN_TABLE 0
147 /* Put the tokens into the symbol table, so that GDB and other debuggers
206 INSTR_TEXCOORD
= 314,
213 INSTR_TEXREG2AR
= 321,
214 INSTR_TEXREG2GB
= 322,
215 INSTR_TEXREG2RGB
= 323,
216 INSTR_TEXM3x2PAD
= 324,
217 INSTR_TEXM3x2TEX
= 325,
218 INSTR_TEXM3x3PAD
= 326,
219 INSTR_TEXM3x3SPEC
= 327,
220 INSTR_TEXM3x3VSPEC
= 328,
221 INSTR_TEXM3x3TEX
= 329,
222 INSTR_TEXDP3TEX
= 330,
223 INSTR_TEXM3x2DEPTH
= 331,
226 INSTR_TEXDEPTH
= 334,
237 REG_CONSTFLOAT
= 345,
246 REG_VERTEXCOLOR
= 354,
284 SMOD_SCALEBIAS
= 392,
292 SAMPTYPE_VOLUME
= 400,
293 USAGE_POSITION
= 401,
294 USAGE_BLENDWEIGHT
= 402,
295 USAGE_BLENDINDICES
= 403,
298 USAGE_TEXCOORD
= 406,
300 USAGE_BINORMAL
= 408,
301 USAGE_TESSFACTOR
= 409,
302 USAGE_POSITIONT
= 410,
315 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
316 typedef union YYSTYPE
319 /* Line 293 of yacc.c */
320 #line 70 "asmshader.y"
328 struct shader_reg reg
;
346 enum bwriter_comparison_type comptype
;
351 enum bwritersampler_texture_type samplertype
;
352 struct rel_reg rel_reg
;
353 struct src_regs sregs
;
357 /* Line 293 of yacc.c */
358 #line 363 "asmshader.tab.c"
360 # define YYSTYPE_IS_TRIVIAL 1
361 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
362 # define YYSTYPE_IS_DECLARED 1
366 /* Copy the second part of user declarations. */
369 /* Line 343 of yacc.c */
370 #line 375 "asmshader.tab.c"
377 typedef YYTYPE_UINT8 yytype_uint8
;
379 typedef unsigned char yytype_uint8
;
383 typedef YYTYPE_INT8 yytype_int8
;
384 #elif (defined __STDC__ || defined __C99__FUNC__ \
385 || defined __cplusplus || defined _MSC_VER)
386 typedef signed char yytype_int8
;
388 typedef short int yytype_int8
;
392 typedef YYTYPE_UINT16 yytype_uint16
;
394 typedef unsigned short int yytype_uint16
;
398 typedef YYTYPE_INT16 yytype_int16
;
400 typedef short int yytype_int16
;
404 # ifdef __SIZE_TYPE__
405 # define YYSIZE_T __SIZE_TYPE__
406 # elif defined size_t
407 # define YYSIZE_T size_t
408 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
409 || defined __cplusplus || defined _MSC_VER)
410 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
411 # define YYSIZE_T size_t
413 # define YYSIZE_T unsigned int
417 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
420 # if defined YYENABLE_NLS && YYENABLE_NLS
422 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
423 # define YY_(msgid) dgettext ("bison-runtime", msgid)
427 # define YY_(msgid) msgid
431 /* Suppress unused-variable warnings by "using" E. */
432 #if ! defined lint || defined __GNUC__
433 # define YYUSE(e) ((void) (e))
435 # define YYUSE(e) /* empty */
438 /* Identity function, used to suppress warnings about constant conditions. */
442 #if (defined __STDC__ || defined __C99__FUNC__ \
443 || defined __cplusplus || defined _MSC_VER)
456 #if ! defined yyoverflow || YYERROR_VERBOSE
458 /* The parser invokes alloca or malloc; define the necessary symbols. */
460 # ifdef YYSTACK_USE_ALLOCA
461 # if YYSTACK_USE_ALLOCA
463 # define YYSTACK_ALLOC __builtin_alloca
464 # elif defined __BUILTIN_VA_ARG_INCR
465 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
467 # define YYSTACK_ALLOC __alloca
468 # elif defined _MSC_VER
469 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
470 # define alloca _alloca
472 # define YYSTACK_ALLOC alloca
473 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
474 || defined __cplusplus || defined _MSC_VER)
475 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
476 # ifndef EXIT_SUCCESS
477 # define EXIT_SUCCESS 0
484 # ifdef YYSTACK_ALLOC
485 /* Pacify GCC's `empty if-body' warning. */
486 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
487 # ifndef YYSTACK_ALLOC_MAXIMUM
488 /* The OS might guarantee only one guard page at the bottom of the stack,
489 and a page size can be as small as 4096 bytes. So we cannot safely
490 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
491 to allow for a few compiler-allocated temporary stack slots. */
492 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
495 # define YYSTACK_ALLOC YYMALLOC
496 # define YYSTACK_FREE YYFREE
497 # ifndef YYSTACK_ALLOC_MAXIMUM
498 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
500 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
501 && ! ((defined YYMALLOC || defined malloc) \
502 && (defined YYFREE || defined free)))
503 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
504 # ifndef EXIT_SUCCESS
505 # define EXIT_SUCCESS 0
509 # define YYMALLOC malloc
510 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
511 || defined __cplusplus || defined _MSC_VER)
512 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
517 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
518 || defined __cplusplus || defined _MSC_VER)
519 void free (void *); /* INFRINGES ON USER NAME SPACE */
523 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
526 #if (! defined yyoverflow \
527 && (! defined __cplusplus \
528 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
530 /* A type that is properly aligned for any stack member. */
533 yytype_int16 yyss_alloc
;
537 /* The size of the maximum gap between one aligned stack and the next. */
538 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
540 /* The size of an array large to enough to hold all stacks, each with
542 # define YYSTACK_BYTES(N) \
543 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
544 + YYSTACK_GAP_MAXIMUM)
546 # define YYCOPY_NEEDED 1
548 /* Relocate STACK from its old location to the new one. The
549 local variables YYSIZE and YYSTACKSIZE give the old and new number of
550 elements in the stack, and YYPTR gives the new location of the
551 stack. Advance YYPTR to a properly aligned location for the next
553 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
556 YYSIZE_T yynewbytes; \
557 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
558 Stack = &yyptr->Stack_alloc; \
559 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
560 yyptr += yynewbytes / sizeof (*yyptr); \
566 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
567 /* Copy COUNT objects from FROM to TO. The source and destination do
570 # if defined __GNUC__ && 1 < __GNUC__
571 # define YYCOPY(To, From, Count) \
572 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
574 # define YYCOPY(To, From, Count) \
578 for (yyi = 0; yyi < (Count); yyi++) \
579 (To)[yyi] = (From)[yyi]; \
584 #endif /* !YYCOPY_NEEDED */
586 /* YYFINAL -- State number of the termination state. */
588 /* YYLAST -- Last index in YYTABLE. */
591 /* YYNTOKENS -- Number of terminals. */
592 #define YYNTOKENS 171
593 /* YYNNTS -- Number of nonterminals. */
595 /* YYNRULES -- Number of rules. */
597 /* YYNRULES -- Number of states. */
598 #define YYNSTATES 552
600 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
602 #define YYMAXUTOK 417
604 #define YYTRANSLATE(YYX) \
605 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
607 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
608 static const yytype_uint8 yytranslate
[] =
610 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 169, 170, 2, 163, 164, 166, 165, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 167, 2, 168, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
636 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
637 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
638 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
639 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
640 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
641 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
642 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
643 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
644 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
645 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
646 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
647 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
648 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
649 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
650 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
651 155, 156, 157, 158, 159, 160, 161, 162
655 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
657 static const yytype_uint16 yyprhs
[] =
659 0, 0, 3, 6, 8, 10, 12, 14, 16, 18,
660 20, 22, 24, 26, 28, 30, 32, 33, 36, 38,
661 41, 44, 50, 52, 58, 64, 70, 76, 82, 88,
662 94, 100, 106, 112, 118, 124, 130, 136, 142, 148,
663 154, 160, 166, 172, 178, 184, 190, 196, 202, 208,
664 214, 220, 226, 232, 236, 241, 246, 252, 256, 261,
665 266, 270, 275, 280, 291, 302, 307, 310, 312, 315,
666 319, 321, 323, 325, 329, 332, 335, 338, 341, 343,
667 345, 348, 354, 360, 366, 372, 378, 384, 390, 394,
668 400, 403, 407, 411, 417, 423, 429, 435, 441, 447,
669 453, 459, 465, 471, 477, 483, 489, 495, 501, 507,
670 513, 519, 525, 531, 537, 543, 545, 548, 551, 553,
671 555, 557, 559, 561, 563, 565, 567, 569, 571, 573,
672 575, 577, 579, 581, 583, 585, 587, 589, 591, 594,
673 596, 599, 600, 603, 605, 608, 609, 612, 614, 616,
674 618, 620, 622, 624, 626, 628, 630, 632, 636, 640,
675 645, 650, 656, 662, 669, 673, 674, 678, 683, 690,
676 697, 706, 708, 712, 714, 716, 718, 720, 722, 724,
677 726, 728, 730, 732, 734, 736, 738, 740, 742, 744,
678 746, 748, 750, 752, 754, 756, 758, 760, 762, 764,
679 766, 768, 770, 772, 774, 776, 778, 780, 782, 784,
680 786, 788, 790, 792, 794, 796, 798, 800, 802, 804,
681 806, 808, 810, 812, 814, 816, 818, 820, 825
684 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
685 static const yytype_int16 yyrhs
[] =
687 172, 0, -1, 173, 174, -1, 108, -1, 109, -1,
688 110, -1, 111, -1, 112, -1, 113, -1, 114, -1,
689 115, -1, 116, -1, 117, -1, 118, -1, 119, -1,
690 120, -1, -1, 174, 175, -1, 176, -1, 196, 176,
691 -1, 163, 176, -1, 3, 183, 177, 164, 185, -1,
692 4, -1, 5, 183, 177, 164, 185, -1, 6, 183,
693 177, 164, 185, -1, 7, 183, 177, 164, 185, -1,
694 8, 183, 177, 164, 185, -1, 9, 183, 177, 164,
695 185, -1, 10, 183, 177, 164, 185, -1, 11, 183,
696 177, 164, 185, -1, 12, 183, 177, 164, 185, -1,
697 13, 183, 177, 164, 185, -1, 14, 183, 177, 164,
698 185, -1, 15, 183, 177, 164, 185, -1, 16, 183,
699 177, 164, 185, -1, 17, 183, 177, 164, 185, -1,
700 18, 183, 177, 164, 185, -1, 19, 183, 177, 164,
701 185, -1, 21, 183, 177, 164, 185, -1, 20, 183,
702 177, 164, 185, -1, 22, 183, 177, 164, 185, -1,
703 23, 183, 177, 164, 185, -1, 24, 183, 177, 164,
704 185, -1, 25, 183, 177, 164, 185, -1, 26, 183,
705 177, 164, 185, -1, 27, 183, 177, 164, 185, -1,
706 28, 183, 177, 164, 185, -1, 29, 183, 177, 164,
707 185, -1, 30, 183, 177, 164, 185, -1, 31, 183,
708 177, 164, 185, -1, 32, 183, 177, 164, 185, -1,
709 33, 183, 177, 164, 185, -1, 34, 183, 177, 164,
710 185, -1, 35, 193, 88, -1, 35, 193, 88, 179,
711 -1, 35, 193, 183, 194, -1, 35, 193, 183, 194,
712 179, -1, 35, 183, 194, -1, 35, 183, 194, 179,
713 -1, 35, 195, 183, 94, -1, 35, 183, 94, -1,
714 35, 195, 183, 194, -1, 35, 195, 183, 88, -1,
715 36, 90, 164, 161, 164, 161, 164, 161, 164, 161,
716 -1, 38, 91, 164, 161, 164, 161, 164, 161, 164,
717 161, -1, 37, 92, 164, 162, -1, 39, 185, -1,
718 40, -1, 41, 185, -1, 41, 192, 185, -1, 42,
719 -1, 43, -1, 44, -1, 44, 192, 185, -1, 45,
720 185, -1, 46, 185, -1, 47, 185, -1, 48, 185,
721 -1, 49, -1, 50, -1, 51, 185, -1, 52, 192,
722 177, 164, 185, -1, 53, 183, 177, 164, 185, -1,
723 54, 183, 177, 164, 185, -1, 55, 183, 177, 164,
724 185, -1, 56, 183, 177, 164, 185, -1, 57, 183,
725 177, 164, 185, -1, 58, 183, 177, 164, 185, -1,
726 59, 183, 177, -1, 60, 183, 177, 164, 185, -1,
727 61, 177, -1, 62, 183, 177, -1, 79, 183, 177,
728 -1, 63, 183, 177, 164, 185, -1, 83, 183, 177,
729 164, 185, -1, 84, 183, 177, 164, 185, -1, 64,
730 183, 177, 164, 185, -1, 65, 183, 177, 164, 185,
731 -1, 66, 183, 177, 164, 185, -1, 67, 183, 177,
732 164, 185, -1, 68, 183, 177, 164, 185, -1, 69,
733 183, 177, 164, 185, -1, 71, 183, 177, 164, 185,
734 -1, 72, 183, 177, 164, 185, -1, 73, 183, 177,
735 164, 185, -1, 74, 183, 177, 164, 185, -1, 75,
736 183, 177, 164, 185, -1, 76, 183, 177, 164, 185,
737 -1, 70, 183, 177, 164, 185, -1, 77, 183, 177,
738 164, 185, -1, 78, 183, 177, 164, 185, -1, 80,
739 183, 177, 164, 185, -1, 81, 183, 177, 164, 185,
740 -1, 82, 183, 177, 164, 185, -1, 85, 183, 177,
741 164, 185, -1, 86, -1, 178, 187, -1, 178, 179,
742 -1, 87, -1, 88, -1, 89, -1, 90, -1, 91,
743 -1, 92, -1, 93, -1, 95, -1, 94, -1, 96,
744 -1, 98, -1, 97, -1, 99, -1, 100, -1, 101,
745 -1, 106, -1, 102, -1, 103, -1, 104, -1, 105,
746 -1, 165, 180, -1, 160, -1, 180, 160, -1, -1,
747 165, 182, -1, 160, -1, 182, 160, -1, -1, 183,
748 184, -1, 121, -1, 122, -1, 123, -1, 124, -1,
749 125, -1, 126, -1, 127, -1, 128, -1, 129, -1,
750 186, -1, 185, 164, 186, -1, 191, 187, 181, -1,
751 191, 187, 189, 181, -1, 166, 191, 187, 181, -1,
752 166, 191, 187, 189, 181, -1, 161, 166, 191, 187,
753 181, -1, 161, 166, 191, 187, 189, 181, -1, 141,
754 191, 181, -1, -1, 167, 188, 168, -1, 167, 190,
755 181, 168, -1, 167, 188, 163, 190, 181, 168, -1,
756 167, 190, 181, 163, 188, 168, -1, 167, 188, 163,
757 190, 181, 163, 188, 168, -1, 161, -1, 188, 163,
758 161, -1, 136, -1, 121, -1, 137, -1, 138, -1,
759 139, -1, 140, -1, 104, -1, 105, -1, 87, -1,
760 88, -1, 89, -1, 90, -1, 91, -1, 92, -1,
761 93, -1, 95, -1, 94, -1, 96, -1, 97, -1,
762 99, -1, 100, -1, 101, -1, 106, -1, 102, -1,
763 103, -1, 104, -1, 105, -1, 107, -1, 130, -1,
764 131, -1, 132, -1, 133, -1, 134, -1, 135, -1,
765 146, -1, 147, -1, 148, -1, 149, -1, 150, -1,
766 151, -1, 152, -1, 153, -1, 154, -1, 155, -1,
767 156, -1, 157, -1, 158, -1, 159, -1, 89, -1,
768 93, -1, 142, -1, 143, -1, 144, -1, 145, -1,
769 169, 106, 181, 170, -1, 169, 141, 106, 181, 170,
773 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
774 static const yytype_uint16 yyrline
[] =
776 0, 311, 311, 316, 321, 326, 331, 336, 341, 346,
777 351, 356, 361, 366, 371, 376, 382, 383, 388, 392,
778 397, 403, 408, 413, 418, 423, 428, 433, 438, 443,
779 448, 453, 458, 463, 468, 473, 478, 483, 488, 493,
780 498, 503, 508, 513, 518, 523, 528, 533, 538, 543,
781 548, 553, 558, 563, 575, 587, 610, 633, 655, 677,
782 687, 702, 709, 716, 720, 724, 728, 733, 738, 743,
783 748, 753, 758, 763, 768, 773, 778, 783, 788, 793,
784 798, 803, 808, 813, 818, 823, 828, 833, 838, 843,
785 849, 854, 859, 864, 875, 880, 885, 890, 895, 900,
786 905, 910, 915, 920, 925, 930, 935, 940, 945, 950,
787 955, 960, 965, 970, 975, 980, 987, 995, 1004, 1008,
788 1012, 1016, 1022, 1028, 1034, 1038, 1042, 1048, 1052, 1056,
789 1060, 1064, 1068, 1072, 1076, 1082, 1088, 1093, 1100, 1115,
790 1121, 1137, 1141, 1163, 1168, 1182, 1186, 1199, 1204, 1209,
791 1214, 1219, 1224, 1229, 1234, 1239, 1245, 1250, 1261, 1269,
792 1277, 1285, 1310, 1324, 1338, 1348, 1352, 1357, 1365, 1373,
793 1381, 1390, 1399, 1409, 1413, 1417, 1421, 1425, 1429, 1434,
794 1438, 1443, 1447, 1453, 1457, 1461, 1465, 1469, 1473, 1479,
795 1483, 1489, 1495, 1501, 1507, 1513, 1517, 1521, 1525, 1529,
796 1533, 1538, 1539, 1540, 1541, 1542, 1543, 1545, 1551, 1557,
797 1563, 1569, 1575, 1581, 1587, 1593, 1599, 1605, 1611, 1617,
798 1623, 1630, 1634, 1639, 1643, 1647, 1651, 1656, 1664
802 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
803 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
804 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
805 static const char *const yytname
[] =
807 "$end", "error", "$undefined", "INSTR_ADD", "INSTR_NOP", "INSTR_MOV",
808 "INSTR_SUB", "INSTR_MAD", "INSTR_MUL", "INSTR_RCP", "INSTR_RSQ",
809 "INSTR_DP3", "INSTR_DP4", "INSTR_MIN", "INSTR_MAX", "INSTR_SLT",
810 "INSTR_SGE", "INSTR_ABS", "INSTR_EXP", "INSTR_LOG", "INSTR_EXPP",
811 "INSTR_LOGP", "INSTR_DST", "INSTR_LRP", "INSTR_FRC", "INSTR_POW",
812 "INSTR_CRS", "INSTR_SGN", "INSTR_NRM", "INSTR_SINCOS", "INSTR_M4x4",
813 "INSTR_M4x3", "INSTR_M3x4", "INSTR_M3x3", "INSTR_M3x2", "INSTR_DCL",
814 "INSTR_DEF", "INSTR_DEFB", "INSTR_DEFI", "INSTR_REP", "INSTR_ENDREP",
815 "INSTR_IF", "INSTR_ELSE", "INSTR_ENDIF", "INSTR_BREAK", "INSTR_BREAKP",
816 "INSTR_CALL", "INSTR_CALLNZ", "INSTR_LOOP", "INSTR_RET", "INSTR_ENDLOOP",
817 "INSTR_LABEL", "INSTR_SETP", "INSTR_TEXLDL", "INSTR_LIT", "INSTR_MOVA",
818 "INSTR_CND", "INSTR_CMP", "INSTR_DP2ADD", "INSTR_TEXCOORD",
819 "INSTR_TEXCRD", "INSTR_TEXKILL", "INSTR_TEX", "INSTR_TEXLD",
820 "INSTR_TEXBEM", "INSTR_TEXBEML", "INSTR_TEXREG2AR", "INSTR_TEXREG2GB",
821 "INSTR_TEXREG2RGB", "INSTR_TEXM3x2PAD", "INSTR_TEXM3x2TEX",
822 "INSTR_TEXM3x3PAD", "INSTR_TEXM3x3SPEC", "INSTR_TEXM3x3VSPEC",
823 "INSTR_TEXM3x3TEX", "INSTR_TEXDP3TEX", "INSTR_TEXM3x2DEPTH",
824 "INSTR_TEXDP3", "INSTR_TEXM3x3", "INSTR_TEXDEPTH", "INSTR_BEM",
825 "INSTR_DSX", "INSTR_DSY", "INSTR_TEXLDP", "INSTR_TEXLDB", "INSTR_TEXLDD",
826 "INSTR_PHASE", "REG_TEMP", "REG_OUTPUT", "REG_INPUT", "REG_CONSTFLOAT",
827 "REG_CONSTINT", "REG_CONSTBOOL", "REG_TEXTURE", "REG_SAMPLER",
828 "REG_TEXCRDOUT", "REG_OPOS", "REG_OFOG", "REG_OPTS", "REG_VERTEXCOLOR",
829 "REG_FRAGCOLOR", "REG_FRAGDEPTH", "REG_VPOS", "REG_VFACE", "REG_ADDRESS",
830 "REG_LOOP", "REG_PREDICATE", "REG_LABEL", "VER_VS10", "VER_VS11",
831 "VER_VS20", "VER_VS2X", "VER_VS30", "VER_PS10", "VER_PS11", "VER_PS12",
832 "VER_PS13", "VER_PS14", "VER_PS20", "VER_PS2X", "VER_PS30", "SHIFT_X2",
833 "SHIFT_X4", "SHIFT_X8", "SHIFT_D2", "SHIFT_D4", "SHIFT_D8", "MOD_SAT",
834 "MOD_PP", "MOD_CENTROID", "COMP_GT", "COMP_LT", "COMP_GE", "COMP_LE",
835 "COMP_EQ", "COMP_NE", "SMOD_BIAS", "SMOD_SCALEBIAS", "SMOD_DZ",
836 "SMOD_DW", "SMOD_ABS", "SMOD_NOT", "SAMPTYPE_1D", "SAMPTYPE_2D",
837 "SAMPTYPE_CUBE", "SAMPTYPE_VOLUME", "USAGE_POSITION",
838 "USAGE_BLENDWEIGHT", "USAGE_BLENDINDICES", "USAGE_NORMAL", "USAGE_PSIZE",
839 "USAGE_TEXCOORD", "USAGE_TANGENT", "USAGE_BINORMAL", "USAGE_TESSFACTOR",
840 "USAGE_POSITIONT", "USAGE_COLOR", "USAGE_FOG", "USAGE_DEPTH",
841 "USAGE_SAMPLE", "COMPONENT", "IMMVAL", "IMMBOOL", "'+'", "','", "'.'",
842 "'-'", "'['", "']'", "'('", "')'", "$accept", "shader", "version_marker",
843 "instructions", "complexinstr", "instruction", "dreg", "dreg_name",
844 "writemask", "wm_components", "swizzle", "sw_components", "omods",
845 "omodifier", "sregs", "sreg", "rel_reg", "immsum", "smod", "relreg_name",
846 "sreg_name", "comp", "dclusage", "dcl_inputreg", "sampdcl", "predicate", 0
851 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
853 static const yytype_uint16 yytoknum
[] =
855 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
856 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
857 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
858 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
859 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
860 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
861 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
862 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
863 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
864 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
865 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
866 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
867 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
868 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
869 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
870 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
871 415, 416, 417, 43, 44, 46, 45, 91, 93, 40,
876 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
877 static const yytype_uint8 yyr1
[] =
879 0, 171, 172, 173, 173, 173, 173, 173, 173, 173,
880 173, 173, 173, 173, 173, 173, 174, 174, 175, 175,
881 175, 176, 176, 176, 176, 176, 176, 176, 176, 176,
882 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
883 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
884 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
885 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
886 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
887 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
888 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
889 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
890 176, 176, 176, 176, 176, 176, 177, 177, 178, 178,
891 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
892 178, 178, 178, 178, 178, 178, 178, 178, 179, 180,
893 180, 181, 181, 182, 182, 183, 183, 184, 184, 184,
894 184, 184, 184, 184, 184, 184, 185, 185, 186, 186,
895 186, 186, 186, 186, 186, 187, 187, 187, 187, 187,
896 187, 188, 188, 189, 189, 189, 189, 189, 189, 190,
897 190, 191, 191, 191, 191, 191, 191, 191, 191, 191,
898 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
899 191, 192, 192, 192, 192, 192, 192, 193, 193, 193,
900 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
901 193, 194, 194, 195, 195, 195, 195, 196, 196
904 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
905 static const yytype_uint8 yyr2
[] =
907 0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
908 1, 1, 1, 1, 1, 1, 0, 2, 1, 2,
909 2, 5, 1, 5, 5, 5, 5, 5, 5, 5,
910 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
911 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
912 5, 5, 5, 3, 4, 4, 5, 3, 4, 4,
913 3, 4, 4, 10, 10, 4, 2, 1, 2, 3,
914 1, 1, 1, 3, 2, 2, 2, 2, 1, 1,
915 2, 5, 5, 5, 5, 5, 5, 5, 3, 5,
916 2, 3, 3, 5, 5, 5, 5, 5, 5, 5,
917 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
918 5, 5, 5, 5, 5, 1, 2, 2, 1, 1,
919 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
920 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
921 2, 0, 2, 1, 2, 0, 2, 1, 1, 1,
922 1, 1, 1, 1, 1, 1, 1, 3, 3, 4,
923 4, 5, 5, 6, 3, 0, 3, 4, 6, 6,
924 8, 1, 3, 1, 1, 1, 1, 1, 1, 1,
925 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
926 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
927 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
928 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
929 1, 1, 1, 1, 1, 1, 1, 4, 5
932 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
933 Performed when YYTABLE doesn't specify something else to do. Zero
934 means the default is an error. */
935 static const yytype_uint8 yydefact
[] =
937 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
938 12, 13, 14, 15, 0, 16, 1, 2, 145, 22,
939 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
940 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
941 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
942 145, 0, 0, 0, 0, 67, 0, 70, 71, 72,
943 0, 0, 0, 0, 78, 79, 0, 0, 145, 145,
944 145, 145, 145, 145, 145, 145, 0, 145, 145, 145,
945 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
946 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
947 145, 115, 0, 0, 17, 18, 0, 0, 0, 0,
948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
950 0, 0, 0, 0, 0, 0, 0, 0, 223, 224,
951 225, 226, 207, 208, 209, 210, 211, 212, 213, 214,
952 215, 216, 217, 218, 219, 220, 0, 145, 145, 0,
953 0, 0, 181, 182, 183, 184, 185, 186, 187, 189,
954 188, 190, 191, 192, 193, 194, 196, 197, 198, 199,
955 195, 200, 0, 0, 0, 66, 156, 165, 201, 202,
956 203, 204, 205, 206, 68, 0, 0, 74, 75, 76,
957 77, 80, 0, 0, 0, 0, 0, 0, 0, 0,
958 0, 118, 119, 120, 121, 122, 123, 124, 126, 125,
959 127, 129, 128, 130, 131, 132, 134, 135, 136, 137,
960 133, 90, 165, 0, 0, 0, 0, 0, 0, 0,
961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
962 0, 0, 0, 0, 0, 0, 0, 20, 141, 0,
963 19, 147, 148, 149, 150, 151, 152, 153, 154, 155,
964 0, 146, 0, 0, 0, 0, 0, 0, 0, 0,
965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
966 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
967 0, 0, 221, 222, 60, 57, 53, 0, 0, 0,
968 0, 0, 141, 0, 165, 0, 0, 141, 69, 73,
969 0, 0, 0, 0, 0, 0, 0, 88, 0, 0,
970 117, 116, 91, 0, 0, 0, 0, 0, 0, 0,
971 0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
972 0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
975 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
976 58, 54, 55, 62, 59, 61, 0, 65, 0, 164,
977 165, 141, 157, 179, 180, 171, 0, 141, 174, 173,
978 175, 176, 177, 178, 158, 141, 0, 0, 0, 0,
979 0, 0, 0, 0, 139, 138, 0, 0, 0, 0,
980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
981 0, 0, 0, 0, 0, 0, 0, 0, 143, 142,
982 227, 0, 21, 23, 24, 25, 26, 27, 28, 29,
983 30, 31, 32, 33, 34, 35, 36, 37, 39, 38,
984 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
985 50, 51, 52, 56, 0, 0, 141, 160, 141, 0,
986 166, 0, 159, 81, 82, 83, 84, 85, 86, 87,
987 89, 140, 93, 96, 97, 98, 99, 100, 101, 108,
988 102, 103, 104, 105, 106, 107, 109, 110, 111, 112,
989 113, 94, 95, 114, 144, 228, 0, 0, 162, 141,
990 161, 172, 141, 0, 167, 0, 0, 163, 0, 0,
991 0, 0, 0, 168, 0, 169, 0, 0, 0, 63,
995 /* YYDEFGOTO[NTERM-NUM]. */
996 static const yytype_int16 yydefgoto
[] =
998 -1, 14, 15, 17, 104, 105, 231, 232, 330, 425,
999 357, 449, 107, 271, 185, 186, 317, 406, 415, 407,
1000 187, 195, 157, 305, 158, 106
1003 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1005 #define YYPACT_NINF -458
1006 static const yytype_int16 yypact
[] =
1008 386, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1009 -458, -458, -458, -458, 11, -458, -458, 389, -458, -458,
1010 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1011 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1012 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1013 334, -42, -28, -10, -34, -458, 95, -458, -458, 3,
1014 -34, -34, -34, -34, -458, -458, -34, 3, -458, -458,
1015 -458, -458, -458, -458, -458, -458, 247, -458, -458, -458,
1016 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1017 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1018 -458, -458, 647, -55, -458, -458, 647, 505, 505, 505,
1019 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1020 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1021 505, 505, 505, 505, 505, 505, 505, 505, -458, -458,
1022 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1023 -458, -458, -458, -458, -458, -458, 123, 2, -458, -44,
1024 -40, -39, -458, -458, -458, -458, -458, -458, -458, -458,
1025 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1026 -458, -458, 185, -45, 185, -38, -458, -37, -458, -458,
1027 -458, -458, -458, -458, -38, -34, -34, -38, -38, -38,
1028 -38, -38, 247, 505, 505, 505, 505, 505, 505, 505,
1029 505, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1030 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1031 -458, -458, -76, 505, 505, 505, 505, 505, 505, 505,
1032 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1033 505, 505, 505, 505, 505, 505, 505, -458, -57, 22,
1034 -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
1035 -35, -458, 1, 4, 8, 9, 10, 14, 16, 29,
1036 49, 50, 51, 54, 55, 57, 58, 60, 68, 69,
1037 70, 73, 74, 75, 76, 77, 78, 79, 89, 90,
1038 91, 93, -458, -458, -458, 94, 94, 142, 82, 5,
1039 96, 6, -57, 185, -37, -34, -58, -43, -38, -38,
1040 98, 119, 129, 130, 131, 132, 133, -458, 134, 100,
1041 -458, -458, -458, 135, 136, 137, 138, 190, 191, 192,
1042 193, 194, 195, 204, 205, 343, 344, 345, 346, -458,
1043 378, 379, 380, 381, 382, 383, 388, 384, -57, -34,
1044 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
1045 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
1046 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
1047 -458, -458, 94, -458, -458, -458, 385, -458, 387, -458,
1048 -37, -43, -458, -458, -458, -458, -154, -57, -458, -458,
1049 -458, -458, -458, -458, -458, -57, -34, -34, -34, -34,
1050 -34, -34, -34, -34, -458, 390, -34, -34, -34, -34,
1051 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
1052 -34, -34, -34, -34, -34, -34, -34, -34, -458, 393,
1053 -458, 397, -38, -38, -38, -38, -38, -38, -38, -38,
1054 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1055 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1056 -38, -38, -38, -458, 394, 395, -43, -458, -57, -30,
1057 -458, -86, -458, -38, -38, -38, -38, -38, -38, -38,
1058 -38, -458, -38, -38, -38, -38, -38, -38, -38, -38,
1059 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1060 -38, -38, -38, -38, -458, -458, 448, 449, -458, -57,
1061 -458, -458, -57, 396, -458, 453, 454, -458, -84, -63,
1062 452, 455, 396, -458, 456, -458, 457, 459, -59, -458,
1066 /* YYPGOTO[NTERM-NUM]. */
1067 static const yytype_int16 yypgoto
[] =
1069 -458, -458, -458, -458, -458, 17, -92, -458, -293, -458,
1070 -309, -458, 491, -458, -56, 306, -231, -457, -399, 146,
1071 -132, 21, -458, -206, -458, -458
1074 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1075 positive, shift that token. If negative, reduce the rule which
1076 number is the opposite. If YYTABLE_NINF, syntax error. */
1077 #define YYTABLE_NINF -1
1078 static const yytype_uint16 yytable
[] =
1080 194, 331, 488, 399, 197, 198, 199, 200, 414, 489,
1081 201, 16, 390, 391, 490, 270, 272, 273, 274, 275,
1082 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
1083 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
1084 296, 297, 298, 299, 300, 301, 403, 404, 159, 451,
1085 312, 258, 314, 162, 163, 164, 165, 166, 167, 168,
1086 169, 170, 171, 172, 160, 173, 174, 175, 176, 177,
1087 178, 179, 180, 181, 403, 404, 539, 533, 408, 542,
1088 196, 161, 534, 401, 543, 548, 259, 529, 202, 329,
1089 306, 316, 487, 409, 410, 411, 412, 413, 491, 483,
1090 544, 392, 395, 405, 544, 545, 492, 182, 356, 551,
1091 320, 321, 322, 323, 324, 325, 326, 327, 328, 257,
1092 309, 313, 356, 260, 310, 311, 315, 183, 358, 359,
1093 316, 531, 184, 188, 189, 190, 191, 192, 193, 318,
1094 319, 332, 333, 334, 335, 336, 337, 338, 339, 340,
1095 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
1096 351, 352, 353, 354, 355, 360, 396, 398, 361, 486,
1097 393, 302, 362, 363, 364, 303, 394, 528, 365, 530,
1098 366, 400, 162, 163, 164, 165, 166, 167, 168, 169,
1099 170, 171, 172, 367, 173, 174, 175, 176, 177, 178,
1100 179, 180, 181, 261, 262, 263, 264, 265, 266, 267,
1101 268, 269, 302, 368, 369, 370, 303, 304, 371, 372,
1102 537, 373, 374, 538, 375, 188, 189, 190, 191, 192,
1103 193, 302, 376, 377, 378, 303, 182, 379, 380, 381,
1104 382, 383, 384, 385, 261, 262, 263, 264, 265, 266,
1105 267, 268, 269, 386, 387, 388, 183, 389, 397, 329,
1106 424, 184, 416, 261, 262, 263, 264, 265, 266, 267,
1107 268, 269, 162, 163, 164, 165, 166, 167, 168, 169,
1108 170, 171, 172, 417, 173, 174, 175, 176, 177, 178,
1109 179, 180, 181, 418, 419, 420, 421, 422, 423, 426,
1110 427, 428, 429, 452, 453, 454, 455, 456, 457, 458,
1111 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
1112 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
1113 479, 480, 481, 482, 211, 212, 213, 214, 215, 216,
1114 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
1115 227, 228, 229, 230, 430, 431, 432, 433, 434, 435,
1116 493, 494, 495, 496, 497, 498, 499, 500, 436, 437,
1117 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
1118 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
1119 522, 523, 18, 19, 20, 21, 22, 23, 24, 25,
1120 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1121 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1122 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1123 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1124 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1125 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1126 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1127 96, 97, 98, 99, 100, 101, 138, 139, 140, 141,
1128 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
1129 152, 153, 154, 155, 1, 2, 3, 4, 5, 6,
1130 7, 8, 9, 10, 11, 12, 13, 438, 439, 440,
1131 441, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1132 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
1133 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
1134 137, 156, 442, 443, 444, 445, 446, 447, 448, 484,
1135 501, 485, 102, 524, 450, 526, 527, 405, 103, 203,
1136 204, 205, 206, 207, 208, 209, 210, 525, 233, 234,
1137 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
1138 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
1139 255, 256, 211, 212, 213, 214, 215, 216, 217, 218,
1140 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
1141 229, 230, 535, 536, 540, 541, 546, 531, 549, 547,
1142 550, 402, 0, 0, 0, 0, 261, 262, 263, 264,
1143 265, 266, 267, 268, 269, 532, 0, 0, 0, 0,
1144 0, 0, 0, 0, 0, 0, 0, 0, 307, 308,
1145 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1146 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1147 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1148 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1149 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1150 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1151 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1152 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1156 #define yypact_value_is_default(yystate) \
1157 ((yystate) == (-458))
1159 #define yytable_value_is_error(yytable_value) \
1162 static const yytype_int16 yycheck
[] =
1164 56, 232, 401, 312, 60, 61, 62, 63, 317, 163,
1165 66, 0, 305, 306, 168, 107, 108, 109, 110, 111,
1166 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1167 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
1168 132, 133, 134, 135, 136, 137, 104, 105, 90, 358,
1169 182, 106, 184, 87, 88, 89, 90, 91, 92, 93,
1170 94, 95, 96, 97, 92, 99, 100, 101, 102, 103,
1171 104, 105, 106, 107, 104, 105, 533, 163, 121, 163,
1172 59, 91, 168, 314, 168, 542, 141, 486, 67, 165,
1173 88, 167, 401, 136, 137, 138, 139, 140, 407, 392,
1174 163, 307, 308, 161, 163, 168, 415, 141, 165, 168,
1175 202, 203, 204, 205, 206, 207, 208, 209, 210, 102,
1176 164, 166, 165, 106, 164, 164, 164, 161, 106, 164,
1177 167, 161, 166, 130, 131, 132, 133, 134, 135, 195,
1178 196, 233, 234, 235, 236, 237, 238, 239, 240, 241,
1179 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
1180 252, 253, 254, 255, 256, 164, 161, 161, 164, 400,
1181 88, 89, 164, 164, 164, 93, 94, 486, 164, 488,
1182 164, 313, 87, 88, 89, 90, 91, 92, 93, 94,
1183 95, 96, 97, 164, 99, 100, 101, 102, 103, 104,
1184 105, 106, 107, 121, 122, 123, 124, 125, 126, 127,
1185 128, 129, 89, 164, 164, 164, 93, 94, 164, 164,
1186 529, 164, 164, 532, 164, 130, 131, 132, 133, 134,
1187 135, 89, 164, 164, 164, 93, 141, 164, 164, 164,
1188 164, 164, 164, 164, 121, 122, 123, 124, 125, 126,
1189 127, 128, 129, 164, 164, 164, 161, 164, 162, 165,
1190 160, 166, 164, 121, 122, 123, 124, 125, 126, 127,
1191 128, 129, 87, 88, 89, 90, 91, 92, 93, 94,
1192 95, 96, 97, 164, 99, 100, 101, 102, 103, 104,
1193 105, 106, 107, 164, 164, 164, 164, 164, 164, 164,
1194 164, 164, 164, 359, 360, 361, 362, 363, 364, 365,
1195 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
1196 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
1197 386, 387, 388, 389, 87, 88, 89, 90, 91, 92,
1198 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1199 103, 104, 105, 106, 164, 164, 164, 164, 164, 164,
1200 416, 417, 418, 419, 420, 421, 422, 423, 164, 164,
1201 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
1202 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
1203 446, 447, 3, 4, 5, 6, 7, 8, 9, 10,
1204 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1205 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1206 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1207 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
1208 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1209 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1210 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1211 81, 82, 83, 84, 85, 86, 142, 143, 144, 145,
1212 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1213 156, 157, 158, 159, 108, 109, 110, 111, 112, 113,
1214 114, 115, 116, 117, 118, 119, 120, 164, 164, 164,
1215 164, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1216 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1217 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
1218 49, 50, 164, 164, 164, 164, 164, 164, 160, 164,
1219 160, 164, 163, 160, 170, 161, 161, 161, 169, 68,
1220 69, 70, 71, 72, 73, 74, 75, 170, 77, 78,
1221 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1222 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1223 99, 100, 87, 88, 89, 90, 91, 92, 93, 94,
1224 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1225 105, 106, 164, 164, 161, 161, 164, 161, 161, 164,
1226 161, 315, -1, -1, -1, -1, 121, 122, 123, 124,
1227 125, 126, 127, 128, 129, 489, -1, -1, -1, -1,
1228 -1, -1, -1, -1, -1, -1, -1, -1, 157, 158,
1229 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1230 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1231 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1232 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1233 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1234 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1235 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1236 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1240 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1241 symbol of state STATE-NUM. */
1242 static const yytype_uint8 yystos
[] =
1244 0, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1245 117, 118, 119, 120, 172, 173, 0, 174, 3, 4,
1246 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1247 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1248 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1249 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1250 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1251 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1252 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1253 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1254 85, 86, 163, 169, 175, 176, 196, 183, 183, 183,
1255 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1256 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1257 183, 183, 183, 183, 183, 183, 183, 183, 142, 143,
1258 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1259 154, 155, 156, 157, 158, 159, 183, 193, 195, 90,
1260 92, 91, 87, 88, 89, 90, 91, 92, 93, 94,
1261 95, 96, 97, 99, 100, 101, 102, 103, 104, 105,
1262 106, 107, 141, 161, 166, 185, 186, 191, 130, 131,
1263 132, 133, 134, 135, 185, 192, 192, 185, 185, 185,
1264 185, 185, 192, 183, 183, 183, 183, 183, 183, 183,
1265 183, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1266 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1267 106, 177, 178, 183, 183, 183, 183, 183, 183, 183,
1268 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1269 183, 183, 183, 183, 183, 183, 183, 176, 106, 141,
1270 176, 121, 122, 123, 124, 125, 126, 127, 128, 129,
1271 177, 184, 177, 177, 177, 177, 177, 177, 177, 177,
1272 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
1273 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
1274 177, 177, 89, 93, 94, 194, 88, 183, 183, 164,
1275 164, 164, 191, 166, 191, 164, 167, 187, 185, 185,
1276 177, 177, 177, 177, 177, 177, 177, 177, 177, 165,
1277 179, 187, 177, 177, 177, 177, 177, 177, 177, 177,
1278 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
1279 177, 177, 177, 177, 177, 177, 165, 181, 106, 164,
1280 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1281 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1282 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1283 179, 179, 194, 88, 94, 194, 161, 162, 161, 181,
1284 191, 187, 186, 104, 105, 161, 188, 190, 121, 136,
1285 137, 138, 139, 140, 181, 189, 164, 164, 164, 164,
1286 164, 164, 164, 164, 160, 180, 164, 164, 164, 164,
1287 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1288 164, 164, 164, 164, 164, 164, 164, 164, 160, 182,
1289 170, 181, 185, 185, 185, 185, 185, 185, 185, 185,
1290 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1291 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1292 185, 185, 185, 179, 164, 164, 187, 181, 189, 163,
1293 168, 181, 181, 185, 185, 185, 185, 185, 185, 185,
1294 185, 160, 185, 185, 185, 185, 185, 185, 185, 185,
1295 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1296 185, 185, 185, 185, 160, 170, 161, 161, 181, 189,
1297 181, 161, 190, 163, 168, 164, 164, 181, 181, 188,
1298 161, 161, 163, 168, 163, 168, 164, 164, 188, 161,
1302 #define yyerrok (yyerrstatus = 0)
1303 #define yyclearin (yychar = YYEMPTY)
1304 #define YYEMPTY (-2)
1307 #define YYACCEPT goto yyacceptlab
1308 #define YYABORT goto yyabortlab
1309 #define YYERROR goto yyerrorlab
1312 /* Like YYERROR except do call yyerror. This remains here temporarily
1313 to ease the transition to the new meaning of YYERROR, for GCC.
1314 Once GCC version 2 has supplanted version 1, this can go. However,
1315 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1316 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1319 #define YYFAIL goto yyerrlab
1321 /* This is here to suppress warnings from the GCC cpp's
1322 -Wunused-macros. Normally we don't worry about that warning, but
1323 some users do, and we want to make it easy for users to remove
1324 YYFAIL uses, which will produce warnings from Bison 2.5. */
1327 #define YYRECOVERING() (!!yyerrstatus)
1329 #define YYBACKUP(Token, Value) \
1331 if (yychar == YYEMPTY && yylen == 1) \
1340 yyerror (YY_("syntax error: cannot back up")); \
1347 #define YYERRCODE 256
1350 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1351 If N is 0, then set CURRENT to the empty location which ends
1352 the previous symbol: RHS[0] (always defined). */
1354 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1355 #ifndef YYLLOC_DEFAULT
1356 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1360 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1361 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1362 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1363 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1367 (Current).first_line = (Current).last_line = \
1368 YYRHSLOC (Rhs, 0).last_line; \
1369 (Current).first_column = (Current).last_column = \
1370 YYRHSLOC (Rhs, 0).last_column; \
1376 /* This macro is provided for backward compatibility. */
1378 #ifndef YY_LOCATION_PRINT
1379 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1383 /* YYLEX -- calling `yylex' with the right arguments. */
1386 # define YYLEX yylex (YYLEX_PARAM)
1388 # define YYLEX yylex ()
1391 /* Enable debugging if requested. */
1395 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1396 # define YYFPRINTF fprintf
1399 # define YYDPRINTF(Args) \
1405 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1409 YYFPRINTF (stderr, "%s ", Title); \
1410 yy_symbol_print (stderr, \
1412 YYFPRINTF (stderr, "\n"); \
1417 /*--------------------------------.
1418 | Print this symbol on YYOUTPUT. |
1419 `--------------------------------*/
1422 #if (defined __STDC__ || defined __C99__FUNC__ \
1423 || defined __cplusplus || defined _MSC_VER)
1425 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
1428 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
1431 YYSTYPE
const * const yyvaluep
;
1437 if (yytype
< YYNTOKENS
)
1438 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1450 /*--------------------------------.
1451 | Print this symbol on YYOUTPUT. |
1452 `--------------------------------*/
1454 #if (defined __STDC__ || defined __C99__FUNC__ \
1455 || defined __cplusplus || defined _MSC_VER)
1457 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
1460 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
1463 YYSTYPE
const * const yyvaluep
;
1466 if (yytype
< YYNTOKENS
)
1467 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1469 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1471 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
1472 YYFPRINTF (yyoutput
, ")");
1475 /*------------------------------------------------------------------.
1476 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1478 `------------------------------------------------------------------*/
1480 #if (defined __STDC__ || defined __C99__FUNC__ \
1481 || defined __cplusplus || defined _MSC_VER)
1483 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1486 yy_stack_print (yybottom
, yytop
)
1487 yytype_int16
*yybottom
;
1488 yytype_int16
*yytop
;
1491 YYFPRINTF (stderr
, "Stack now");
1492 for (; yybottom
<= yytop
; yybottom
++)
1494 int yybot
= *yybottom
;
1495 YYFPRINTF (stderr
, " %d", yybot
);
1497 YYFPRINTF (stderr
, "\n");
1500 # define YY_STACK_PRINT(Bottom, Top) \
1503 yy_stack_print ((Bottom), (Top)); \
1507 /*------------------------------------------------.
1508 | Report that the YYRULE is going to be reduced. |
1509 `------------------------------------------------*/
1511 #if (defined __STDC__ || defined __C99__FUNC__ \
1512 || defined __cplusplus || defined _MSC_VER)
1514 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
1517 yy_reduce_print (yyvsp
, yyrule
)
1522 int yynrhs
= yyr2
[yyrule
];
1524 unsigned long int yylno
= yyrline
[yyrule
];
1525 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1527 /* The symbols being reduced. */
1528 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1530 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1531 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1532 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1534 YYFPRINTF (stderr
, "\n");
1538 # define YY_REDUCE_PRINT(Rule) \
1541 yy_reduce_print (yyvsp, Rule); \
1544 /* Nonzero means print parse trace. It is left uninitialized so that
1545 multiple parsers can coexist. */
1547 #else /* !YYDEBUG */
1548 # define YYDPRINTF(Args)
1549 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1550 # define YY_STACK_PRINT(Bottom, Top)
1551 # define YY_REDUCE_PRINT(Rule)
1552 #endif /* !YYDEBUG */
1555 /* YYINITDEPTH -- initial size of the parser's stacks. */
1557 # define YYINITDEPTH 200
1560 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1561 if the built-in stack extension method is used).
1563 Do not make this value too large; the results are undefined if
1564 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1565 evaluated with infinite-precision integer arithmetic. */
1568 # define YYMAXDEPTH 10000
1575 # if defined __GLIBC__ && defined _STRING_H
1576 # define yystrlen strlen
1578 /* Return the length of YYSTR. */
1579 #if (defined __STDC__ || defined __C99__FUNC__ \
1580 || defined __cplusplus || defined _MSC_VER)
1582 yystrlen (const char *yystr
)
1590 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1598 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1599 # define yystpcpy stpcpy
1601 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1603 #if (defined __STDC__ || defined __C99__FUNC__ \
1604 || defined __cplusplus || defined _MSC_VER)
1606 yystpcpy (char *yydest
, const char *yysrc
)
1609 yystpcpy (yydest
, yysrc
)
1615 const char *yys
= yysrc
;
1617 while ((*yyd
++ = *yys
++) != '\0')
1626 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1627 quotes and backslashes, so that it's suitable for yyerror. The
1628 heuristic is that double-quoting is unnecessary unless the string
1629 contains an apostrophe, a comma, or backslash (other than
1630 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1631 null, do not copy; instead, return the length of what the result
1634 yytnamerr (char *yyres
, const char *yystr
)
1639 char const *yyp
= yystr
;
1646 goto do_not_strip_quotes
;
1650 goto do_not_strip_quotes
;
1663 do_not_strip_quotes
: ;
1667 return yystrlen (yystr
);
1669 return yystpcpy (yyres
, yystr
) - yyres
;
1673 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1674 about the unexpected token YYTOKEN for the state stack whose top is
1677 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1678 not large enough to hold the message. In that case, also set
1679 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1680 required number of bytes is too large to store. */
1682 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1683 yytype_int16
*yyssp
, int yytoken
)
1685 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytoken
]);
1686 YYSIZE_T yysize
= yysize0
;
1688 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1689 /* Internationalized format string. */
1690 const char *yyformat
= 0;
1691 /* Arguments of yyformat. */
1692 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1693 /* Number of reported tokens (one for the "unexpected", one per
1697 /* There are many possibilities here to consider:
1698 - Assume YYFAIL is not used. It's too flawed to consider. See
1699 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1700 for details. YYERROR is fine as it does not invoke this
1702 - If this state is a consistent state with a default action, then
1703 the only way this function was invoked is if the default action
1704 is an error action. In that case, don't check for expected
1705 tokens because there are none.
1706 - The only way there can be no lookahead present (in yychar) is if
1707 this state is a consistent state with a default action. Thus,
1708 detecting the absence of a lookahead is sufficient to determine
1709 that there is no unexpected or expected token to report. In that
1710 case, just report a simple "syntax error".
1711 - Don't assume there isn't a lookahead just because this state is a
1712 consistent state with a default action. There might have been a
1713 previous inconsistent state, consistent state with a non-default
1714 action, or user semantic action that manipulated yychar.
1715 - Of course, the expected token list depends on states to have
1716 correct lookahead information, and it depends on the parser not
1717 to perform extra reductions after fetching a lookahead from the
1718 scanner and before detecting a syntax error. Thus, state merging
1719 (from LALR or IELR) and default reductions corrupt the expected
1720 token list. However, the list is correct for canonical LR with
1721 one exception: it will still contain any token that will not be
1722 accepted due to an error action in a later state.
1724 if (yytoken
!= YYEMPTY
)
1726 int yyn
= yypact
[*yyssp
];
1727 yyarg
[yycount
++] = yytname
[yytoken
];
1728 if (!yypact_value_is_default (yyn
))
1730 /* Start YYX at -YYN if negative to avoid negative indexes in
1731 YYCHECK. In other words, skip the first -YYN actions for
1732 this state because they are default actions. */
1733 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1734 /* Stay within bounds of both yycheck and yytname. */
1735 int yychecklim
= YYLAST
- yyn
+ 1;
1736 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1739 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1740 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1741 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1743 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1749 yyarg
[yycount
++] = yytname
[yyx
];
1750 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1751 if (! (yysize
<= yysize1
1752 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1761 # define YYCASE_(N, S) \
1765 YYCASE_(0, YY_("syntax error"));
1766 YYCASE_(1, YY_("syntax error, unexpected %s"));
1767 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1768 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1769 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1770 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1774 yysize1
= yysize
+ yystrlen (yyformat
);
1775 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1779 if (*yymsg_alloc
< yysize
)
1781 *yymsg_alloc
= 2 * yysize
;
1782 if (! (yysize
<= *yymsg_alloc
1783 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1784 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
1788 /* Avoid sprintf, as that infringes on the user's name space.
1789 Don't have undefined behavior even if the translation
1790 produced a string with the wrong number of "%s"s. */
1794 while ((*yyp
= *yyformat
) != '\0')
1795 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1797 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1808 #endif /* YYERROR_VERBOSE */
1810 /*-----------------------------------------------.
1811 | Release the memory associated to this symbol. |
1812 `-----------------------------------------------*/
1815 #if (defined __STDC__ || defined __C99__FUNC__ \
1816 || defined __cplusplus || defined _MSC_VER)
1818 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1821 yydestruct (yymsg
, yytype
, yyvaluep
)
1831 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1842 /* Prevent warnings from -Wmissing-prototypes. */
1843 #ifdef YYPARSE_PARAM
1844 #if defined __STDC__ || defined __cplusplus
1845 int yyparse (void *YYPARSE_PARAM
);
1849 #else /* ! YYPARSE_PARAM */
1850 #if defined __STDC__ || defined __cplusplus
1855 #endif /* ! YYPARSE_PARAM */
1858 /* The lookahead symbol. */
1861 /* The semantic value of the lookahead symbol. */
1864 /* Number of syntax errors so far. */
1872 #ifdef YYPARSE_PARAM
1873 #if (defined __STDC__ || defined __C99__FUNC__ \
1874 || defined __cplusplus || defined _MSC_VER)
1876 yyparse (void *YYPARSE_PARAM
)
1879 yyparse (YYPARSE_PARAM
)
1880 void *YYPARSE_PARAM
;
1882 #else /* ! YYPARSE_PARAM */
1883 #if (defined __STDC__ || defined __C99__FUNC__ \
1884 || defined __cplusplus || defined _MSC_VER)
1895 /* Number of tokens to shift before error messages enabled. */
1898 /* The stacks and their tools:
1899 `yyss': related to states.
1900 `yyvs': related to semantic values.
1902 Refer to the stacks thru separate pointers, to allow yyoverflow
1903 to reallocate them elsewhere. */
1905 /* The state stack. */
1906 yytype_int16 yyssa
[YYINITDEPTH
];
1908 yytype_int16
*yyssp
;
1910 /* The semantic value stack. */
1911 YYSTYPE yyvsa
[YYINITDEPTH
];
1915 YYSIZE_T yystacksize
;
1919 /* Lookahead token as an internal (translated) token number. */
1921 /* The variables used to return semantic value and location from the
1926 /* Buffer for error messages, and its allocated size. */
1928 char *yymsg
= yymsgbuf
;
1929 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1932 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1934 /* The number of symbols on the RHS of the reduced rule.
1935 Keep to zero when no symbol should be popped. */
1941 yystacksize
= YYINITDEPTH
;
1943 YYDPRINTF ((stderr
, "Starting parse\n"));
1948 yychar
= YYEMPTY
; /* Cause a token to be read. */
1950 /* Initialize stack pointers.
1951 Waste one element of value and location stack
1952 so that they stay on the same level as the state stack.
1953 The wasted elements are never initialized. */
1959 /*------------------------------------------------------------.
1960 | yynewstate -- Push a new state, which is found in yystate. |
1961 `------------------------------------------------------------*/
1963 /* In all cases, when you get here, the value and location stacks
1964 have just been pushed. So pushing a state here evens the stacks. */
1970 if (yyss
+ yystacksize
- 1 <= yyssp
)
1972 /* Get the current used size of the three stacks, in elements. */
1973 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1977 /* Give user a chance to reallocate the stack. Use copies of
1978 these so that the &'s don't force the real ones into
1980 YYSTYPE
*yyvs1
= yyvs
;
1981 yytype_int16
*yyss1
= yyss
;
1983 /* Each stack pointer address is followed by the size of the
1984 data in use in that stack, in bytes. This used to be a
1985 conditional around just the two extra args, but that might
1986 be undefined if yyoverflow is a macro. */
1987 yyoverflow (YY_("memory exhausted"),
1988 &yyss1
, yysize
* sizeof (*yyssp
),
1989 &yyvs1
, yysize
* sizeof (*yyvsp
),
1995 #else /* no yyoverflow */
1996 # ifndef YYSTACK_RELOCATE
1997 goto yyexhaustedlab
;
1999 /* Extend the stack our own way. */
2000 if (YYMAXDEPTH
<= yystacksize
)
2001 goto yyexhaustedlab
;
2003 if (YYMAXDEPTH
< yystacksize
)
2004 yystacksize
= YYMAXDEPTH
;
2007 yytype_int16
*yyss1
= yyss
;
2008 union yyalloc
*yyptr
=
2009 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
2011 goto yyexhaustedlab
;
2012 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
2013 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
2014 # undef YYSTACK_RELOCATE
2016 YYSTACK_FREE (yyss1
);
2019 #endif /* no yyoverflow */
2021 yyssp
= yyss
+ yysize
- 1;
2022 yyvsp
= yyvs
+ yysize
- 1;
2024 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
2025 (unsigned long int) yystacksize
));
2027 if (yyss
+ yystacksize
- 1 <= yyssp
)
2031 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
2033 if (yystate
== YYFINAL
)
2043 /* Do appropriate processing given the current state. Read a
2044 lookahead token if we need one and don't already have one. */
2046 /* First try to decide what to do without reference to lookahead token. */
2047 yyn
= yypact
[yystate
];
2048 if (yypact_value_is_default (yyn
))
2051 /* Not known => get a lookahead token if don't already have one. */
2053 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2054 if (yychar
== YYEMPTY
)
2056 YYDPRINTF ((stderr
, "Reading a token: "));
2060 if (yychar
<= YYEOF
)
2062 yychar
= yytoken
= YYEOF
;
2063 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2067 yytoken
= YYTRANSLATE (yychar
);
2068 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2071 /* If the proper action on seeing token YYTOKEN is to reduce or to
2072 detect an error, take that action. */
2074 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2079 if (yytable_value_is_error (yyn
))
2085 /* Count tokens shifted since error; after three, turn off error
2090 /* Shift the lookahead token. */
2091 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2093 /* Discard the shifted token. */
2102 /*-----------------------------------------------------------.
2103 | yydefault -- do the default action for the current state. |
2104 `-----------------------------------------------------------*/
2106 yyn
= yydefact
[yystate
];
2112 /*-----------------------------.
2113 | yyreduce -- Do a reduction. |
2114 `-----------------------------*/
2116 /* yyn is the number of a rule to reduce with. */
2119 /* If YYLEN is nonzero, implement the default value of the action:
2122 Otherwise, the following line sets YYVAL to garbage.
2123 This behavior is undocumented and Bison
2124 users should not rely upon it. Assigning to YYVAL
2125 unconditionally makes the parser a bit smaller, and it avoids a
2126 GCC warning that YYVAL may be used uninitialized. */
2127 yyval
= yyvsp
[1-yylen
];
2130 YY_REDUCE_PRINT (yyn
);
2135 /* Line 1806 of yacc.c */
2136 #line 312 "asmshader.y"
2138 asm_ctx
.funcs
->end(&asm_ctx
);
2144 /* Line 1806 of yacc.c */
2145 #line 317 "asmshader.y"
2147 TRACE("Vertex shader 1.0\n");
2148 create_vs10_parser(&asm_ctx
);
2154 /* Line 1806 of yacc.c */
2155 #line 322 "asmshader.y"
2157 TRACE("Vertex shader 1.1\n");
2158 create_vs11_parser(&asm_ctx
);
2164 /* Line 1806 of yacc.c */
2165 #line 327 "asmshader.y"
2167 TRACE("Vertex shader 2.0\n");
2168 create_vs20_parser(&asm_ctx
);
2174 /* Line 1806 of yacc.c */
2175 #line 332 "asmshader.y"
2177 TRACE("Vertex shader 2.x\n");
2178 create_vs2x_parser(&asm_ctx
);
2184 /* Line 1806 of yacc.c */
2185 #line 337 "asmshader.y"
2187 TRACE("Vertex shader 3.0\n");
2188 create_vs30_parser(&asm_ctx
);
2194 /* Line 1806 of yacc.c */
2195 #line 342 "asmshader.y"
2197 TRACE("Pixel shader 1.0\n");
2198 create_ps10_parser(&asm_ctx
);
2204 /* Line 1806 of yacc.c */
2205 #line 347 "asmshader.y"
2207 TRACE("Pixel shader 1.1\n");
2208 create_ps11_parser(&asm_ctx
);
2214 /* Line 1806 of yacc.c */
2215 #line 352 "asmshader.y"
2217 TRACE("Pixel shader 1.2\n");
2218 create_ps12_parser(&asm_ctx
);
2224 /* Line 1806 of yacc.c */
2225 #line 357 "asmshader.y"
2227 TRACE("Pixel shader 1.3\n");
2228 create_ps13_parser(&asm_ctx
);
2234 /* Line 1806 of yacc.c */
2235 #line 362 "asmshader.y"
2237 TRACE("Pixel shader 1.4\n");
2238 create_ps14_parser(&asm_ctx
);
2244 /* Line 1806 of yacc.c */
2245 #line 367 "asmshader.y"
2247 TRACE("Pixel shader 2.0\n");
2248 create_ps20_parser(&asm_ctx
);
2254 /* Line 1806 of yacc.c */
2255 #line 372 "asmshader.y"
2257 TRACE("Pixel shader 2.x\n");
2258 create_ps2x_parser(&asm_ctx
);
2264 /* Line 1806 of yacc.c */
2265 #line 377 "asmshader.y"
2267 TRACE("Pixel shader 3.0\n");
2268 create_ps30_parser(&asm_ctx
);
2274 /* Line 1806 of yacc.c */
2275 #line 384 "asmshader.y"
2283 /* Line 1806 of yacc.c */
2284 #line 389 "asmshader.y"
2292 /* Line 1806 of yacc.c */
2293 #line 393 "asmshader.y"
2295 TRACE("predicate\n");
2296 asm_ctx
.funcs
->predicate(&asm_ctx
, &(yyvsp
[(1) - (2)].reg
));
2302 /* Line 1806 of yacc.c */
2303 #line 398 "asmshader.y"
2306 asm_ctx
.funcs
->coissue(&asm_ctx
);
2312 /* Line 1806 of yacc.c */
2313 #line 404 "asmshader.y"
2316 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_ADD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2322 /* Line 1806 of yacc.c */
2323 #line 409 "asmshader.y"
2326 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_NOP
, 0, 0, 0, 0, 0, 0);
2332 /* Line 1806 of yacc.c */
2333 #line 414 "asmshader.y"
2336 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_MOV
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2342 /* Line 1806 of yacc.c */
2343 #line 419 "asmshader.y"
2346 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_SUB
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2352 /* Line 1806 of yacc.c */
2353 #line 424 "asmshader.y"
2356 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_MAD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 3);
2362 /* Line 1806 of yacc.c */
2363 #line 429 "asmshader.y"
2366 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_MUL
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2372 /* Line 1806 of yacc.c */
2373 #line 434 "asmshader.y"
2376 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_RCP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2382 /* Line 1806 of yacc.c */
2383 #line 439 "asmshader.y"
2386 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_RSQ
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2392 /* Line 1806 of yacc.c */
2393 #line 444 "asmshader.y"
2396 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_DP3
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2402 /* Line 1806 of yacc.c */
2403 #line 449 "asmshader.y"
2406 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_DP4
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2412 /* Line 1806 of yacc.c */
2413 #line 454 "asmshader.y"
2416 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_MIN
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2422 /* Line 1806 of yacc.c */
2423 #line 459 "asmshader.y"
2426 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_MAX
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2432 /* Line 1806 of yacc.c */
2433 #line 464 "asmshader.y"
2436 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_SLT
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2442 /* Line 1806 of yacc.c */
2443 #line 469 "asmshader.y"
2446 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_SGE
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2452 /* Line 1806 of yacc.c */
2453 #line 474 "asmshader.y"
2456 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_ABS
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2462 /* Line 1806 of yacc.c */
2463 #line 479 "asmshader.y"
2466 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_EXP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2472 /* Line 1806 of yacc.c */
2473 #line 484 "asmshader.y"
2476 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_LOG
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2482 /* Line 1806 of yacc.c */
2483 #line 489 "asmshader.y"
2486 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_LOGP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2492 /* Line 1806 of yacc.c */
2493 #line 494 "asmshader.y"
2496 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_EXPP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2502 /* Line 1806 of yacc.c */
2503 #line 499 "asmshader.y"
2506 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_DST
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2512 /* Line 1806 of yacc.c */
2513 #line 504 "asmshader.y"
2516 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_LRP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 3);
2522 /* Line 1806 of yacc.c */
2523 #line 509 "asmshader.y"
2526 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_FRC
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2532 /* Line 1806 of yacc.c */
2533 #line 514 "asmshader.y"
2536 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_POW
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2542 /* Line 1806 of yacc.c */
2543 #line 519 "asmshader.y"
2546 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_CRS
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2552 /* Line 1806 of yacc.c */
2553 #line 524 "asmshader.y"
2556 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_SGN
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 3);
2562 /* Line 1806 of yacc.c */
2563 #line 529 "asmshader.y"
2566 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_NRM
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2572 /* Line 1806 of yacc.c */
2573 #line 534 "asmshader.y"
2576 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_SINCOS
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
2582 /* Line 1806 of yacc.c */
2583 #line 539 "asmshader.y"
2586 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_M4x4
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2592 /* Line 1806 of yacc.c */
2593 #line 544 "asmshader.y"
2596 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_M4x3
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2602 /* Line 1806 of yacc.c */
2603 #line 549 "asmshader.y"
2606 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_M3x4
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2612 /* Line 1806 of yacc.c */
2613 #line 554 "asmshader.y"
2616 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_M3x3
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2622 /* Line 1806 of yacc.c */
2623 #line 559 "asmshader.y"
2626 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_M3x2
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
2632 /* Line 1806 of yacc.c */
2633 #line 564 "asmshader.y"
2635 struct shader_reg reg
;
2636 TRACE("Output reg declaration\n");
2637 ZeroMemory(®
, sizeof(reg
));
2638 reg
.type
= BWRITERSPR_OUTPUT
;
2639 reg
.regnum
= (yyvsp
[(3) - (3)].regnum
);
2642 reg
.u
.writemask
= BWRITERSP_WRITEMASK_ALL
;
2643 asm_ctx
.funcs
->dcl_output(&asm_ctx
, (yyvsp
[(2) - (3)].declaration
).dclusage
, (yyvsp
[(2) - (3)].declaration
).regnum
, ®
);
2649 /* Line 1806 of yacc.c */
2650 #line 576 "asmshader.y"
2652 struct shader_reg reg
;
2653 TRACE("Output reg declaration\n");
2654 ZeroMemory(®
, sizeof(reg
));
2655 reg
.type
= BWRITERSPR_OUTPUT
;
2656 reg
.regnum
= (yyvsp
[(3) - (4)].regnum
);
2659 reg
.u
.writemask
= (yyvsp
[(4) - (4)].writemask
);
2660 asm_ctx
.funcs
->dcl_output(&asm_ctx
, (yyvsp
[(2) - (4)].declaration
).dclusage
, (yyvsp
[(2) - (4)].declaration
).regnum
, ®
);
2666 /* Line 1806 of yacc.c */
2667 #line 588 "asmshader.y"
2669 struct shader_reg reg
;
2670 TRACE("Input reg declaration\n");
2671 if((yyvsp
[(3) - (4)].modshift
).shift
!= 0) {
2672 asmparser_message(&asm_ctx
, "Line %u: Shift modifier not allowed here\n",
2674 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2676 if(asm_ctx
.shader
->version
== BWRITERPS_VERSION(2, 0) ||
2677 asm_ctx
.shader
->version
== BWRITERPS_VERSION(2, 1)) {
2678 asmparser_message(&asm_ctx
, "Line %u: Declaration not supported in PS 2\n",
2680 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2682 ZeroMemory(®
, sizeof(reg
));
2683 reg
.type
= (yyvsp
[(4) - (4)].reg
).type
;
2684 reg
.regnum
= (yyvsp
[(4) - (4)].reg
).regnum
;
2687 reg
.u
.writemask
= BWRITERSP_WRITEMASK_ALL
;
2688 asm_ctx
.funcs
->dcl_input(&asm_ctx
, (yyvsp
[(2) - (4)].declaration
).dclusage
, (yyvsp
[(2) - (4)].declaration
).regnum
, (yyvsp
[(3) - (4)].modshift
).mod
, ®
);
2694 /* Line 1806 of yacc.c */
2695 #line 611 "asmshader.y"
2697 struct shader_reg reg
;
2698 TRACE("Input reg declaration\n");
2699 if((yyvsp
[(3) - (5)].modshift
).shift
!= 0) {
2700 asmparser_message(&asm_ctx
, "Line %u: Shift modifier not allowed here\n",
2702 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2704 if(asm_ctx
.shader
->version
== BWRITERPS_VERSION(2, 0) ||
2705 asm_ctx
.shader
->version
== BWRITERPS_VERSION(2, 1)) {
2706 asmparser_message(&asm_ctx
, "Line %u: Declaration not supported in PS 2\n",
2708 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2710 ZeroMemory(®
, sizeof(reg
));
2711 reg
.type
= (yyvsp
[(4) - (5)].reg
).type
;
2712 reg
.regnum
= (yyvsp
[(4) - (5)].reg
).regnum
;
2715 reg
.u
.writemask
= (yyvsp
[(5) - (5)].writemask
);
2716 asm_ctx
.funcs
->dcl_input(&asm_ctx
, (yyvsp
[(2) - (5)].declaration
).dclusage
, (yyvsp
[(2) - (5)].declaration
).regnum
, (yyvsp
[(3) - (5)].modshift
).mod
, ®
);
2722 /* Line 1806 of yacc.c */
2723 #line 634 "asmshader.y"
2725 struct shader_reg reg
;
2726 TRACE("Input reg declaration\n");
2727 if((yyvsp
[(2) - (3)].modshift
).shift
!= 0) {
2728 asmparser_message(&asm_ctx
, "Line %u: Shift modifier not allowed here\n",
2730 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2732 if(asm_ctx
.shader
->type
!= ST_PIXEL
) {
2733 asmparser_message(&asm_ctx
, "Line %u: Declaration needs a semantic\n",
2735 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2737 ZeroMemory(®
, sizeof(reg
));
2738 reg
.type
= (yyvsp
[(3) - (3)].reg
).type
;
2739 reg
.regnum
= (yyvsp
[(3) - (3)].reg
).regnum
;
2742 reg
.u
.writemask
= BWRITERSP_WRITEMASK_ALL
;
2743 asm_ctx
.funcs
->dcl_input(&asm_ctx
, 0, 0, (yyvsp
[(2) - (3)].modshift
).mod
, ®
);
2749 /* Line 1806 of yacc.c */
2750 #line 656 "asmshader.y"
2752 struct shader_reg reg
;
2753 TRACE("Input reg declaration\n");
2754 if((yyvsp
[(2) - (4)].modshift
).shift
!= 0) {
2755 asmparser_message(&asm_ctx
, "Line %u: Shift modifier not allowed here\n",
2757 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2759 if(asm_ctx
.shader
->type
!= ST_PIXEL
) {
2760 asmparser_message(&asm_ctx
, "Line %u: Declaration needs a semantic\n",
2762 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2764 ZeroMemory(®
, sizeof(reg
));
2765 reg
.type
= (yyvsp
[(3) - (4)].reg
).type
;
2766 reg
.regnum
= (yyvsp
[(3) - (4)].reg
).regnum
;
2769 reg
.u
.writemask
= (yyvsp
[(4) - (4)].writemask
);
2770 asm_ctx
.funcs
->dcl_input(&asm_ctx
, 0, 0, (yyvsp
[(2) - (4)].modshift
).mod
, ®
);
2776 /* Line 1806 of yacc.c */
2777 #line 678 "asmshader.y"
2779 TRACE("Sampler declared\n");
2780 if((yyvsp
[(3) - (4)].modshift
).shift
!= 0) {
2781 asmparser_message(&asm_ctx
, "Line %u: Shift modifier not allowed here\n",
2783 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2785 asm_ctx
.funcs
->dcl_sampler(&asm_ctx
, (yyvsp
[(2) - (4)].samplertype
), (yyvsp
[(3) - (4)].modshift
).mod
, (yyvsp
[(4) - (4)].regnum
), asm_ctx
.line_no
);
2791 /* Line 1806 of yacc.c */
2792 #line 688 "asmshader.y"
2794 TRACE("Sampler declared\n");
2795 if((yyvsp
[(2) - (3)].modshift
).shift
!= 0) {
2796 asmparser_message(&asm_ctx
, "Line %u: Shift modifier not allowed here\n",
2798 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2800 if(asm_ctx
.shader
->type
!= ST_PIXEL
) {
2801 asmparser_message(&asm_ctx
, "Line %u: Declaration needs a sampler type\n",
2803 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2805 asm_ctx
.funcs
->dcl_sampler(&asm_ctx
, BWRITERSTT_UNKNOWN
, (yyvsp
[(2) - (3)].modshift
).mod
, (yyvsp
[(3) - (3)].regnum
), asm_ctx
.line_no
);
2811 /* Line 1806 of yacc.c */
2812 #line 703 "asmshader.y"
2814 TRACE("Error rule: sampler decl of input reg\n");
2815 asmparser_message(&asm_ctx
, "Line %u: Sampler declarations of input regs is not valid\n",
2817 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
2823 /* Line 1806 of yacc.c */
2824 #line 710 "asmshader.y"
2826 TRACE("Error rule: sampler decl of output reg\n");
2827 asmparser_message(&asm_ctx
, "Line %u: Sampler declarations of output regs is not valid\n",
2829 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
2835 /* Line 1806 of yacc.c */
2836 #line 717 "asmshader.y"
2838 asm_ctx
.funcs
->constF(&asm_ctx
, (yyvsp
[(2) - (10)].regnum
), (yyvsp
[(4) - (10)].immval
).val
, (yyvsp
[(6) - (10)].immval
).val
, (yyvsp
[(8) - (10)].immval
).val
, (yyvsp
[(10) - (10)].immval
).val
);
2844 /* Line 1806 of yacc.c */
2845 #line 721 "asmshader.y"
2847 asm_ctx
.funcs
->constI(&asm_ctx
, (yyvsp
[(2) - (10)].regnum
), (yyvsp
[(4) - (10)].immval
).val
, (yyvsp
[(6) - (10)].immval
).val
, (yyvsp
[(8) - (10)].immval
).val
, (yyvsp
[(10) - (10)].immval
).val
);
2853 /* Line 1806 of yacc.c */
2854 #line 725 "asmshader.y"
2856 asm_ctx
.funcs
->constB(&asm_ctx
, (yyvsp
[(2) - (4)].regnum
), (yyvsp
[(4) - (4)].immbool
));
2862 /* Line 1806 of yacc.c */
2863 #line 729 "asmshader.y"
2866 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_REP
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 1);
2872 /* Line 1806 of yacc.c */
2873 #line 734 "asmshader.y"
2876 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_ENDREP
, 0, 0, 0, 0, 0, 0);
2882 /* Line 1806 of yacc.c */
2883 #line 739 "asmshader.y"
2886 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_IF
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 1);
2892 /* Line 1806 of yacc.c */
2893 #line 744 "asmshader.y"
2896 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_IFC
, 0, 0, (yyvsp
[(2) - (3)].comptype
), 0, &(yyvsp
[(3) - (3)].sregs
), 2);
2902 /* Line 1806 of yacc.c */
2903 #line 749 "asmshader.y"
2906 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_ELSE
, 0, 0, 0, 0, 0, 0);
2912 /* Line 1806 of yacc.c */
2913 #line 754 "asmshader.y"
2916 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_ENDIF
, 0, 0, 0, 0, 0, 0);
2922 /* Line 1806 of yacc.c */
2923 #line 759 "asmshader.y"
2926 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_BREAK
, 0, 0, 0, 0, 0, 0);
2932 /* Line 1806 of yacc.c */
2933 #line 764 "asmshader.y"
2936 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_BREAKC
, 0, 0, (yyvsp
[(2) - (3)].comptype
), 0, &(yyvsp
[(3) - (3)].sregs
), 2);
2942 /* Line 1806 of yacc.c */
2943 #line 769 "asmshader.y"
2946 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_BREAKP
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 1);
2952 /* Line 1806 of yacc.c */
2953 #line 774 "asmshader.y"
2956 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_CALL
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 1);
2962 /* Line 1806 of yacc.c */
2963 #line 779 "asmshader.y"
2966 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_CALLNZ
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 2);
2972 /* Line 1806 of yacc.c */
2973 #line 784 "asmshader.y"
2976 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_LOOP
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 2);
2982 /* Line 1806 of yacc.c */
2983 #line 789 "asmshader.y"
2986 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_RET
, 0, 0, 0, 0, 0, 0);
2992 /* Line 1806 of yacc.c */
2993 #line 794 "asmshader.y"
2996 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_ENDLOOP
, 0, 0, 0, 0, 0, 0);
3002 /* Line 1806 of yacc.c */
3003 #line 799 "asmshader.y"
3006 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_LABEL
, 0, 0, 0, 0, &(yyvsp
[(2) - (2)].sregs
), 1);
3012 /* Line 1806 of yacc.c */
3013 #line 804 "asmshader.y"
3016 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_SETP
, 0, 0, (yyvsp
[(2) - (5)].comptype
), &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3022 /* Line 1806 of yacc.c */
3023 #line 809 "asmshader.y"
3026 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXLDL
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3032 /* Line 1806 of yacc.c */
3033 #line 814 "asmshader.y"
3036 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_LIT
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3042 /* Line 1806 of yacc.c */
3043 #line 819 "asmshader.y"
3046 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_MOVA
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3052 /* Line 1806 of yacc.c */
3053 #line 824 "asmshader.y"
3056 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_CND
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 3);
3062 /* Line 1806 of yacc.c */
3063 #line 829 "asmshader.y"
3066 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_CMP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 3);
3072 /* Line 1806 of yacc.c */
3073 #line 834 "asmshader.y"
3076 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_DP2ADD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 3);
3082 /* Line 1806 of yacc.c */
3083 #line 839 "asmshader.y"
3085 TRACE("TEXCOORD\n");
3086 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXCOORD
, (yyvsp
[(2) - (3)].modshift
).mod
, (yyvsp
[(2) - (3)].modshift
).shift
, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0);
3092 /* Line 1806 of yacc.c */
3093 #line 844 "asmshader.y"
3096 /* texcoord and texcrd share the same opcode */
3097 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXCOORD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3103 /* Line 1806 of yacc.c */
3104 #line 850 "asmshader.y"
3107 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXKILL
, 0, 0, 0, &(yyvsp
[(2) - (2)].reg
), 0, 0);
3113 /* Line 1806 of yacc.c */
3114 #line 855 "asmshader.y"
3117 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEX
, (yyvsp
[(2) - (3)].modshift
).mod
, (yyvsp
[(2) - (3)].modshift
).shift
, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0);
3123 /* Line 1806 of yacc.c */
3124 #line 860 "asmshader.y"
3126 TRACE("TEXDEPTH\n");
3127 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXDEPTH
, (yyvsp
[(2) - (3)].modshift
).mod
, (yyvsp
[(2) - (3)].modshift
).shift
, 0, &(yyvsp
[(3) - (3)].reg
), 0, 0);
3133 /* Line 1806 of yacc.c */
3134 #line 865 "asmshader.y"
3137 /* There is more than one acceptable syntax for texld:
3138 with 1 sreg (PS 1.4) or
3139 with 2 sregs (PS 2.0+)
3140 Moreover, texld shares the same opcode as the tex instruction,
3141 so there are a total of 3 valid syntaxes
3142 These variations are handled in asmparser.c */
3143 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEX
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3149 /* Line 1806 of yacc.c */
3150 #line 876 "asmshader.y"
3153 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXLDP
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3159 /* Line 1806 of yacc.c */
3160 #line 881 "asmshader.y"
3163 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXLDB
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3169 /* Line 1806 of yacc.c */
3170 #line 886 "asmshader.y"
3173 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXBEM
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3179 /* Line 1806 of yacc.c */
3180 #line 891 "asmshader.y"
3183 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXBEML
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3189 /* Line 1806 of yacc.c */
3190 #line 896 "asmshader.y"
3192 TRACE("TEXREG2AR\n");
3193 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXREG2AR
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3199 /* Line 1806 of yacc.c */
3200 #line 901 "asmshader.y"
3202 TRACE("TEXREG2GB\n");
3203 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXREG2GB
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3209 /* Line 1806 of yacc.c */
3210 #line 906 "asmshader.y"
3212 TRACE("TEXREG2RGB\n");
3213 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXREG2RGB
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3219 /* Line 1806 of yacc.c */
3220 #line 911 "asmshader.y"
3222 TRACE("TEXM3x2PAD\n");
3223 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x2PAD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3229 /* Line 1806 of yacc.c */
3230 #line 916 "asmshader.y"
3232 TRACE("INSTR_TEXM3x3PAD\n");
3233 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x3PAD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3239 /* Line 1806 of yacc.c */
3240 #line 921 "asmshader.y"
3242 TRACE("TEXM3x3SPEC\n");
3243 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x3SPEC
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3249 /* Line 1806 of yacc.c */
3250 #line 926 "asmshader.y"
3252 TRACE("TEXM3x3VSPEC\n");
3253 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x3VSPEC
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3259 /* Line 1806 of yacc.c */
3260 #line 931 "asmshader.y"
3262 TRACE("TEXM3x3TEX\n");
3263 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x3TEX
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3269 /* Line 1806 of yacc.c */
3270 #line 936 "asmshader.y"
3272 TRACE("TEXDP3TEX\n");
3273 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXDP3TEX
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3279 /* Line 1806 of yacc.c */
3280 #line 941 "asmshader.y"
3282 TRACE("TEXM3x2DEPTH\n");
3283 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x2DEPTH
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3289 /* Line 1806 of yacc.c */
3290 #line 946 "asmshader.y"
3292 TRACE("TEXM3x2TEX\n");
3293 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x2TEX
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3299 /* Line 1806 of yacc.c */
3300 #line 951 "asmshader.y"
3303 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXDP3
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3309 /* Line 1806 of yacc.c */
3310 #line 956 "asmshader.y"
3313 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXM3x3
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3319 /* Line 1806 of yacc.c */
3320 #line 961 "asmshader.y"
3323 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_BEM
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 2);
3329 /* Line 1806 of yacc.c */
3330 #line 966 "asmshader.y"
3333 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_DSX
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3339 /* Line 1806 of yacc.c */
3340 #line 971 "asmshader.y"
3343 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_DSY
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 1);
3349 /* Line 1806 of yacc.c */
3350 #line 976 "asmshader.y"
3353 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_TEXLDD
, (yyvsp
[(2) - (5)].modshift
).mod
, (yyvsp
[(2) - (5)].modshift
).shift
, 0, &(yyvsp
[(3) - (5)].reg
), &(yyvsp
[(5) - (5)].sregs
), 4);
3359 /* Line 1806 of yacc.c */
3360 #line 981 "asmshader.y"
3363 asm_ctx
.funcs
->instr(&asm_ctx
, BWRITERSIO_PHASE
, 0, 0, 0, 0, 0, 0);
3369 /* Line 1806 of yacc.c */
3370 #line 988 "asmshader.y"
3372 (yyval
.reg
).regnum
= (yyvsp
[(1) - (2)].reg
).regnum
;
3373 (yyval
.reg
).type
= (yyvsp
[(1) - (2)].reg
).type
;
3374 (yyval
.reg
).u
.writemask
= BWRITERSP_WRITEMASK_ALL
;
3375 (yyval
.reg
).srcmod
= BWRITERSPSM_NONE
;
3376 set_rel_reg(&(yyval
.reg
), &(yyvsp
[(2) - (2)].rel_reg
));
3382 /* Line 1806 of yacc.c */
3383 #line 996 "asmshader.y"
3385 (yyval
.reg
).regnum
= (yyvsp
[(1) - (2)].reg
).regnum
;
3386 (yyval
.reg
).type
= (yyvsp
[(1) - (2)].reg
).type
;
3387 (yyval
.reg
).u
.writemask
= (yyvsp
[(2) - (2)].writemask
);
3388 (yyval
.reg
).srcmod
= BWRITERSPSM_NONE
;
3389 (yyval
.reg
).rel_reg
= NULL
;
3395 /* Line 1806 of yacc.c */
3396 #line 1005 "asmshader.y"
3398 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_TEMP
;
3404 /* Line 1806 of yacc.c */
3405 #line 1009 "asmshader.y"
3407 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_OUTPUT
;
3413 /* Line 1806 of yacc.c */
3414 #line 1013 "asmshader.y"
3416 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_INPUT
;
3422 /* Line 1806 of yacc.c */
3423 #line 1017 "asmshader.y"
3425 asmparser_message(&asm_ctx
, "Line %u: Register c%u is not a valid destination register\n",
3426 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
3427 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3433 /* Line 1806 of yacc.c */
3434 #line 1023 "asmshader.y"
3436 asmparser_message(&asm_ctx
, "Line %u: Register i%u is not a valid destination register\n",
3437 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
3438 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3444 /* Line 1806 of yacc.c */
3445 #line 1029 "asmshader.y"
3447 asmparser_message(&asm_ctx
, "Line %u: Register b%u is not a valid destination register\n",
3448 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
3449 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3455 /* Line 1806 of yacc.c */
3456 #line 1035 "asmshader.y"
3458 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_TEXTURE
;
3464 /* Line 1806 of yacc.c */
3465 #line 1039 "asmshader.y"
3467 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_TEXCRDOUT
;
3473 /* Line 1806 of yacc.c */
3474 #line 1043 "asmshader.y"
3476 asmparser_message(&asm_ctx
, "Line %u: Register s%u is not a valid destination register\n",
3477 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
3478 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3484 /* Line 1806 of yacc.c */
3485 #line 1049 "asmshader.y"
3487 (yyval
.reg
).regnum
= BWRITERSRO_POSITION
; (yyval
.reg
).type
= BWRITERSPR_RASTOUT
;
3493 /* Line 1806 of yacc.c */
3494 #line 1053 "asmshader.y"
3496 (yyval
.reg
).regnum
= BWRITERSRO_POINT_SIZE
; (yyval
.reg
).type
= BWRITERSPR_RASTOUT
;
3502 /* Line 1806 of yacc.c */
3503 #line 1057 "asmshader.y"
3505 (yyval
.reg
).regnum
= BWRITERSRO_FOG
; (yyval
.reg
).type
= BWRITERSPR_RASTOUT
;
3511 /* Line 1806 of yacc.c */
3512 #line 1061 "asmshader.y"
3514 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_ATTROUT
;
3520 /* Line 1806 of yacc.c */
3521 #line 1065 "asmshader.y"
3523 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_COLOROUT
;
3529 /* Line 1806 of yacc.c */
3530 #line 1069 "asmshader.y"
3532 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_DEPTHOUT
;
3538 /* Line 1806 of yacc.c */
3539 #line 1073 "asmshader.y"
3541 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_PREDICATE
;
3547 /* Line 1806 of yacc.c */
3548 #line 1077 "asmshader.y"
3550 asmparser_message(&asm_ctx
, "Line %u: Register vPos is not a valid destination register\n",
3552 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3558 /* Line 1806 of yacc.c */
3559 #line 1083 "asmshader.y"
3561 asmparser_message(&asm_ctx
, "Line %u: Register vFace is not a valid destination register\n",
3563 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3569 /* Line 1806 of yacc.c */
3570 #line 1089 "asmshader.y"
3572 /* index 0 is hardcoded for the addr register */
3573 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_ADDR
;
3579 /* Line 1806 of yacc.c */
3580 #line 1094 "asmshader.y"
3582 asmparser_message(&asm_ctx
, "Line %u: Register aL is not a valid destination register\n",
3584 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
3590 /* Line 1806 of yacc.c */
3591 #line 1101 "asmshader.y"
3593 if((yyvsp
[(2) - (2)].wm_components
).writemask
== SWIZZLE_ERR
) {
3594 asmparser_message(&asm_ctx
, "Line %u: Invalid writemask specified\n",
3596 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3597 /* Provide a correct writemask to prevent following complaints */
3598 (yyval
.writemask
) = BWRITERSP_WRITEMASK_ALL
;
3601 (yyval
.writemask
) = (yyvsp
[(2) - (2)].wm_components
).writemask
;
3602 TRACE("Writemask: %x\n", (yyval
.writemask
));
3609 /* Line 1806 of yacc.c */
3610 #line 1116 "asmshader.y"
3612 (yyval
.wm_components
).writemask
= 1 << (yyvsp
[(1) - (1)].component
);
3613 (yyval
.wm_components
).last
= (yyvsp
[(1) - (1)].component
);
3614 (yyval
.wm_components
).idx
= 1;
3620 /* Line 1806 of yacc.c */
3621 #line 1122 "asmshader.y"
3623 if((yyvsp
[(1) - (2)].wm_components
).writemask
== SWIZZLE_ERR
|| (yyvsp
[(1) - (2)].wm_components
).idx
== 4)
3624 /* Wrong writemask */
3625 (yyval
.wm_components
).writemask
= SWIZZLE_ERR
;
3627 if((yyvsp
[(2) - (2)].component
) <= (yyvsp
[(1) - (2)].wm_components
).last
)
3628 (yyval
.wm_components
).writemask
= SWIZZLE_ERR
;
3630 (yyval
.wm_components
).writemask
= (yyvsp
[(1) - (2)].wm_components
).writemask
| (1 << (yyvsp
[(2) - (2)].component
));
3631 (yyval
.wm_components
).idx
= (yyvsp
[(1) - (2)].wm_components
).idx
+ 1;
3639 /* Line 1806 of yacc.c */
3640 #line 1137 "asmshader.y"
3642 (yyval
.swizzle
) = BWRITERVS_NOSWIZZLE
;
3643 TRACE("Default swizzle: %08x\n", (yyval
.swizzle
));
3649 /* Line 1806 of yacc.c */
3650 #line 1142 "asmshader.y"
3652 if((yyvsp
[(2) - (2)].sw_components
).swizzle
== SWIZZLE_ERR
) {
3653 asmparser_message(&asm_ctx
, "Line %u: Invalid swizzle\n",
3655 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3656 /* Provide a correct swizzle to prevent following complaints */
3657 (yyval
.swizzle
) = BWRITERVS_NOSWIZZLE
;
3662 (yyval
.swizzle
) = (yyvsp
[(2) - (2)].sw_components
).swizzle
<< BWRITERVS_SWIZZLE_SHIFT
;
3663 /* Fill the swizzle by extending the last component */
3664 last
= ((yyvsp
[(2) - (2)].sw_components
).swizzle
>> 2 * ((yyvsp
[(2) - (2)].sw_components
).idx
- 1)) & 0x03;
3665 for(i
= (yyvsp
[(2) - (2)].sw_components
).idx
; i
< 4; i
++){
3666 (yyval
.swizzle
) |= last
<< (BWRITERVS_SWIZZLE_SHIFT
+ 2 * i
);
3668 TRACE("Got a swizzle: %08x\n", (yyval
.swizzle
));
3675 /* Line 1806 of yacc.c */
3676 #line 1164 "asmshader.y"
3678 (yyval
.sw_components
).swizzle
= (yyvsp
[(1) - (1)].component
);
3679 (yyval
.sw_components
).idx
= 1;
3685 /* Line 1806 of yacc.c */
3686 #line 1169 "asmshader.y"
3688 if((yyvsp
[(1) - (2)].sw_components
).idx
== 4) {
3689 /* Too many sw_components */
3690 (yyval
.sw_components
).swizzle
= SWIZZLE_ERR
;
3691 (yyval
.sw_components
).idx
= 4;
3694 (yyval
.sw_components
).swizzle
= (yyvsp
[(1) - (2)].sw_components
).swizzle
| ((yyvsp
[(2) - (2)].component
) << 2 * (yyvsp
[(1) - (2)].sw_components
).idx
);
3695 (yyval
.sw_components
).idx
= (yyvsp
[(1) - (2)].sw_components
).idx
+ 1;
3702 /* Line 1806 of yacc.c */
3703 #line 1182 "asmshader.y"
3705 (yyval
.modshift
).mod
= 0;
3706 (yyval
.modshift
).shift
= 0;
3712 /* Line 1806 of yacc.c */
3713 #line 1187 "asmshader.y"
3715 (yyval
.modshift
).mod
= (yyvsp
[(1) - (2)].modshift
).mod
| (yyvsp
[(2) - (2)].modshift
).mod
;
3716 if((yyvsp
[(1) - (2)].modshift
).shift
&& (yyvsp
[(2) - (2)].modshift
).shift
) {
3717 asmparser_message(&asm_ctx
, "Line %u: More than one shift flag\n",
3719 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3720 (yyval
.modshift
).shift
= (yyvsp
[(1) - (2)].modshift
).shift
;
3722 (yyval
.modshift
).shift
= (yyvsp
[(1) - (2)].modshift
).shift
| (yyvsp
[(2) - (2)].modshift
).shift
;
3729 /* Line 1806 of yacc.c */
3730 #line 1200 "asmshader.y"
3732 (yyval
.modshift
).mod
= 0;
3733 (yyval
.modshift
).shift
= 1;
3739 /* Line 1806 of yacc.c */
3740 #line 1205 "asmshader.y"
3742 (yyval
.modshift
).mod
= 0;
3743 (yyval
.modshift
).shift
= 2;
3749 /* Line 1806 of yacc.c */
3750 #line 1210 "asmshader.y"
3752 (yyval
.modshift
).mod
= 0;
3753 (yyval
.modshift
).shift
= 3;
3759 /* Line 1806 of yacc.c */
3760 #line 1215 "asmshader.y"
3762 (yyval
.modshift
).mod
= 0;
3763 (yyval
.modshift
).shift
= 15;
3769 /* Line 1806 of yacc.c */
3770 #line 1220 "asmshader.y"
3772 (yyval
.modshift
).mod
= 0;
3773 (yyval
.modshift
).shift
= 14;
3779 /* Line 1806 of yacc.c */
3780 #line 1225 "asmshader.y"
3782 (yyval
.modshift
).mod
= 0;
3783 (yyval
.modshift
).shift
= 13;
3789 /* Line 1806 of yacc.c */
3790 #line 1230 "asmshader.y"
3792 (yyval
.modshift
).mod
= BWRITERSPDM_SATURATE
;
3793 (yyval
.modshift
).shift
= 0;
3799 /* Line 1806 of yacc.c */
3800 #line 1235 "asmshader.y"
3802 (yyval
.modshift
).mod
= BWRITERSPDM_PARTIALPRECISION
;
3803 (yyval
.modshift
).shift
= 0;
3809 /* Line 1806 of yacc.c */
3810 #line 1240 "asmshader.y"
3812 (yyval
.modshift
).mod
= BWRITERSPDM_MSAMPCENTROID
;
3813 (yyval
.modshift
).shift
= 0;
3819 /* Line 1806 of yacc.c */
3820 #line 1246 "asmshader.y"
3822 (yyval
.sregs
).reg
[0] = (yyvsp
[(1) - (1)].reg
);
3823 (yyval
.sregs
).count
= 1;
3829 /* Line 1806 of yacc.c */
3830 #line 1251 "asmshader.y"
3832 if((yyval
.sregs
).count
== MAX_SRC_REGS
){
3833 asmparser_message(&asm_ctx
, "Line %u: Too many source registers in this instruction\n",
3835 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3838 (yyval
.sregs
).reg
[(yyval
.sregs
).count
++] = (yyvsp
[(3) - (3)].reg
);
3844 /* Line 1806 of yacc.c */
3845 #line 1262 "asmshader.y"
3847 (yyval
.reg
).type
= (yyvsp
[(1) - (3)].reg
).type
;
3848 (yyval
.reg
).regnum
= (yyvsp
[(1) - (3)].reg
).regnum
;
3849 (yyval
.reg
).u
.swizzle
= (yyvsp
[(3) - (3)].swizzle
);
3850 (yyval
.reg
).srcmod
= BWRITERSPSM_NONE
;
3851 set_rel_reg(&(yyval
.reg
), &(yyvsp
[(2) - (3)].rel_reg
));
3857 /* Line 1806 of yacc.c */
3858 #line 1270 "asmshader.y"
3860 (yyval
.reg
).type
= (yyvsp
[(1) - (4)].reg
).type
;
3861 (yyval
.reg
).regnum
= (yyvsp
[(1) - (4)].reg
).regnum
;
3862 set_rel_reg(&(yyval
.reg
), &(yyvsp
[(2) - (4)].rel_reg
));
3863 (yyval
.reg
).srcmod
= (yyvsp
[(3) - (4)].srcmod
);
3864 (yyval
.reg
).u
.swizzle
= (yyvsp
[(4) - (4)].swizzle
);
3870 /* Line 1806 of yacc.c */
3871 #line 1278 "asmshader.y"
3873 (yyval
.reg
).type
= (yyvsp
[(2) - (4)].reg
).type
;
3874 (yyval
.reg
).regnum
= (yyvsp
[(2) - (4)].reg
).regnum
;
3875 (yyval
.reg
).srcmod
= BWRITERSPSM_NEG
;
3876 set_rel_reg(&(yyval
.reg
), &(yyvsp
[(3) - (4)].rel_reg
));
3877 (yyval
.reg
).u
.swizzle
= (yyvsp
[(4) - (4)].swizzle
);
3883 /* Line 1806 of yacc.c */
3884 #line 1286 "asmshader.y"
3886 (yyval
.reg
).type
= (yyvsp
[(2) - (5)].reg
).type
;
3887 (yyval
.reg
).regnum
= (yyvsp
[(2) - (5)].reg
).regnum
;
3888 set_rel_reg(&(yyval
.reg
), &(yyvsp
[(3) - (5)].rel_reg
));
3889 switch((yyvsp
[(4) - (5)].srcmod
)) {
3890 case BWRITERSPSM_BIAS
: (yyval
.reg
).srcmod
= BWRITERSPSM_BIASNEG
; break;
3891 case BWRITERSPSM_X2
: (yyval
.reg
).srcmod
= BWRITERSPSM_X2NEG
; break;
3892 case BWRITERSPSM_SIGN
: (yyval
.reg
).srcmod
= BWRITERSPSM_SIGNNEG
; break;
3893 case BWRITERSPSM_ABS
: (yyval
.reg
).srcmod
= BWRITERSPSM_ABSNEG
; break;
3894 case BWRITERSPSM_DZ
:
3895 asmparser_message(&asm_ctx
, "Line %u: Incompatible source modifiers: NEG and DZ\n",
3897 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3899 case BWRITERSPSM_DW
:
3900 asmparser_message(&asm_ctx
, "Line %u: Incompatible source modifiers: NEG and DW\n",
3902 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3905 FIXME("Unhandled combination of NEGATE and %u\n", (yyvsp
[(4) - (5)].srcmod
));
3907 (yyval
.reg
).u
.swizzle
= (yyvsp
[(5) - (5)].swizzle
);
3913 /* Line 1806 of yacc.c */
3914 #line 1311 "asmshader.y"
3916 if((yyvsp
[(1) - (5)].immval
).val
!= 1.0 || (!(yyvsp
[(1) - (5)].immval
).integer
)) {
3917 asmparser_message(&asm_ctx
, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP, "
3918 "%g - reg found\n", asm_ctx
.line_no
, (yyvsp
[(1) - (5)].immval
).val
);
3919 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3921 /* Complement - not compatible with other source modifiers */
3922 (yyval
.reg
).type
= (yyvsp
[(3) - (5)].reg
).type
;
3923 (yyval
.reg
).regnum
= (yyvsp
[(3) - (5)].reg
).regnum
;
3924 (yyval
.reg
).srcmod
= BWRITERSPSM_COMP
;
3925 set_rel_reg(&(yyval
.reg
), &(yyvsp
[(4) - (5)].rel_reg
));
3926 (yyval
.reg
).u
.swizzle
= (yyvsp
[(5) - (5)].swizzle
);
3932 /* Line 1806 of yacc.c */
3933 #line 1325 "asmshader.y"
3935 /* For nicer error reporting */
3936 if((yyvsp
[(1) - (6)].immval
).val
!= 1.0 || (!(yyvsp
[(1) - (6)].immval
).integer
)) {
3937 asmparser_message(&asm_ctx
, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP\n",
3939 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3941 asmparser_message(&asm_ctx
, "Line %u: Incompatible source modifiers: D3DSPSM_COMP and %s\n",
3943 debug_print_srcmod((yyvsp
[(5) - (6)].srcmod
)));
3944 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
3951 /* Line 1806 of yacc.c */
3952 #line 1339 "asmshader.y"
3954 (yyval
.reg
).type
= (yyvsp
[(2) - (3)].reg
).type
;
3955 (yyval
.reg
).regnum
= (yyvsp
[(2) - (3)].reg
).regnum
;
3956 (yyval
.reg
).rel_reg
= NULL
;
3957 (yyval
.reg
).srcmod
= BWRITERSPSM_NOT
;
3958 (yyval
.reg
).u
.swizzle
= (yyvsp
[(3) - (3)].swizzle
);
3964 /* Line 1806 of yacc.c */
3965 #line 1348 "asmshader.y"
3967 (yyval
.rel_reg
).has_rel_reg
= FALSE
;
3968 (yyval
.rel_reg
).additional_offset
= 0;
3974 /* Line 1806 of yacc.c */
3975 #line 1353 "asmshader.y"
3977 (yyval
.rel_reg
).has_rel_reg
= FALSE
;
3978 (yyval
.rel_reg
).additional_offset
= (yyvsp
[(2) - (3)].immval
).val
;
3984 /* Line 1806 of yacc.c */
3985 #line 1358 "asmshader.y"
3987 (yyval
.rel_reg
).has_rel_reg
= TRUE
;
3988 (yyval
.rel_reg
).type
= (yyvsp
[(2) - (4)].reg
).type
;
3989 (yyval
.rel_reg
).additional_offset
= 0;
3990 (yyval
.rel_reg
).rel_regnum
= (yyvsp
[(2) - (4)].reg
).regnum
;
3991 (yyval
.rel_reg
).swizzle
= (yyvsp
[(3) - (4)].swizzle
);
3997 /* Line 1806 of yacc.c */
3998 #line 1366 "asmshader.y"
4000 (yyval
.rel_reg
).has_rel_reg
= TRUE
;
4001 (yyval
.rel_reg
).type
= (yyvsp
[(4) - (6)].reg
).type
;
4002 (yyval
.rel_reg
).additional_offset
= (yyvsp
[(2) - (6)].immval
).val
;
4003 (yyval
.rel_reg
).rel_regnum
= (yyvsp
[(4) - (6)].reg
).regnum
;
4004 (yyval
.rel_reg
).swizzle
= (yyvsp
[(5) - (6)].swizzle
);
4010 /* Line 1806 of yacc.c */
4011 #line 1374 "asmshader.y"
4013 (yyval
.rel_reg
).has_rel_reg
= TRUE
;
4014 (yyval
.rel_reg
).type
= (yyvsp
[(2) - (6)].reg
).type
;
4015 (yyval
.rel_reg
).additional_offset
= (yyvsp
[(5) - (6)].immval
).val
;
4016 (yyval
.rel_reg
).rel_regnum
= (yyvsp
[(2) - (6)].reg
).regnum
;
4017 (yyval
.rel_reg
).swizzle
= (yyvsp
[(3) - (6)].swizzle
);
4023 /* Line 1806 of yacc.c */
4024 #line 1382 "asmshader.y"
4026 (yyval
.rel_reg
).has_rel_reg
= TRUE
;
4027 (yyval
.rel_reg
).type
= (yyvsp
[(4) - (8)].reg
).type
;
4028 (yyval
.rel_reg
).additional_offset
= (yyvsp
[(2) - (8)].immval
).val
+ (yyvsp
[(7) - (8)].immval
).val
;
4029 (yyval
.rel_reg
).rel_regnum
= (yyvsp
[(4) - (8)].reg
).regnum
;
4030 (yyval
.rel_reg
).swizzle
= (yyvsp
[(5) - (8)].swizzle
);
4036 /* Line 1806 of yacc.c */
4037 #line 1391 "asmshader.y"
4039 if(!(yyvsp
[(1) - (1)].immval
).integer
) {
4040 asmparser_message(&asm_ctx
, "Line %u: Unexpected float %f\n",
4041 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].immval
).val
);
4042 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
4044 (yyval
.immval
).val
= (yyvsp
[(1) - (1)].immval
).val
;
4050 /* Line 1806 of yacc.c */
4051 #line 1400 "asmshader.y"
4053 if(!(yyvsp
[(3) - (3)].immval
).integer
) {
4054 asmparser_message(&asm_ctx
, "Line %u: Unexpected float %f\n",
4055 asm_ctx
.line_no
, (yyvsp
[(3) - (3)].immval
).val
);
4056 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
4058 (yyval
.immval
).val
= (yyvsp
[(1) - (3)].immval
).val
+ (yyvsp
[(3) - (3)].immval
).val
;
4064 /* Line 1806 of yacc.c */
4065 #line 1410 "asmshader.y"
4067 (yyval
.srcmod
) = BWRITERSPSM_BIAS
;
4073 /* Line 1806 of yacc.c */
4074 #line 1414 "asmshader.y"
4076 (yyval
.srcmod
) = BWRITERSPSM_X2
;
4082 /* Line 1806 of yacc.c */
4083 #line 1418 "asmshader.y"
4085 (yyval
.srcmod
) = BWRITERSPSM_SIGN
;
4091 /* Line 1806 of yacc.c */
4092 #line 1422 "asmshader.y"
4094 (yyval
.srcmod
) = BWRITERSPSM_DZ
;
4100 /* Line 1806 of yacc.c */
4101 #line 1426 "asmshader.y"
4103 (yyval
.srcmod
) = BWRITERSPSM_DW
;
4109 /* Line 1806 of yacc.c */
4110 #line 1430 "asmshader.y"
4112 (yyval
.srcmod
) = BWRITERSPSM_ABS
;
4118 /* Line 1806 of yacc.c */
4119 #line 1435 "asmshader.y"
4121 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_ADDR
;
4127 /* Line 1806 of yacc.c */
4128 #line 1439 "asmshader.y"
4130 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_LOOP
;
4136 /* Line 1806 of yacc.c */
4137 #line 1444 "asmshader.y"
4139 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_TEMP
;
4145 /* Line 1806 of yacc.c */
4146 #line 1448 "asmshader.y"
4148 asmparser_message(&asm_ctx
, "Line %u: Register o%u is not a valid source register\n",
4149 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
4150 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4156 /* Line 1806 of yacc.c */
4157 #line 1454 "asmshader.y"
4159 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_INPUT
;
4165 /* Line 1806 of yacc.c */
4166 #line 1458 "asmshader.y"
4168 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_CONST
;
4174 /* Line 1806 of yacc.c */
4175 #line 1462 "asmshader.y"
4177 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_CONSTINT
;
4183 /* Line 1806 of yacc.c */
4184 #line 1466 "asmshader.y"
4186 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_CONSTBOOL
;
4192 /* Line 1806 of yacc.c */
4193 #line 1470 "asmshader.y"
4195 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_TEXTURE
;
4201 /* Line 1806 of yacc.c */
4202 #line 1474 "asmshader.y"
4204 asmparser_message(&asm_ctx
, "Line %u: Register oT%u is not a valid source register\n",
4205 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
4206 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4212 /* Line 1806 of yacc.c */
4213 #line 1480 "asmshader.y"
4215 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_SAMPLER
;
4221 /* Line 1806 of yacc.c */
4222 #line 1484 "asmshader.y"
4224 asmparser_message(&asm_ctx
, "Line %u: Register oPos is not a valid source register\n",
4226 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4232 /* Line 1806 of yacc.c */
4233 #line 1490 "asmshader.y"
4235 asmparser_message(&asm_ctx
, "Line %u: Register oFog is not a valid source register\n",
4237 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4243 /* Line 1806 of yacc.c */
4244 #line 1496 "asmshader.y"
4246 asmparser_message(&asm_ctx
, "Line %u: Register oD%u is not a valid source register\n",
4247 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
4248 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4254 /* Line 1806 of yacc.c */
4255 #line 1502 "asmshader.y"
4257 asmparser_message(&asm_ctx
, "Line %u: Register oC%u is not a valid source register\n",
4258 asm_ctx
.line_no
, (yyvsp
[(1) - (1)].regnum
));
4259 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4265 /* Line 1806 of yacc.c */
4266 #line 1508 "asmshader.y"
4268 asmparser_message(&asm_ctx
, "Line %u: Register oDepth is not a valid source register\n",
4270 set_parse_status(&asm_ctx
.status
, PARSE_WARN
);
4276 /* Line 1806 of yacc.c */
4277 #line 1514 "asmshader.y"
4279 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_PREDICATE
;
4285 /* Line 1806 of yacc.c */
4286 #line 1518 "asmshader.y"
4288 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_MISCTYPE
;
4294 /* Line 1806 of yacc.c */
4295 #line 1522 "asmshader.y"
4297 (yyval
.reg
).regnum
= 1; (yyval
.reg
).type
= BWRITERSPR_MISCTYPE
;
4303 /* Line 1806 of yacc.c */
4304 #line 1526 "asmshader.y"
4306 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_ADDR
;
4312 /* Line 1806 of yacc.c */
4313 #line 1530 "asmshader.y"
4315 (yyval
.reg
).regnum
= 0; (yyval
.reg
).type
= BWRITERSPR_LOOP
;
4321 /* Line 1806 of yacc.c */
4322 #line 1534 "asmshader.y"
4324 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_LABEL
;
4330 /* Line 1806 of yacc.c */
4331 #line 1538 "asmshader.y"
4332 { (yyval
.comptype
) = BWRITER_COMPARISON_GT
; }
4337 /* Line 1806 of yacc.c */
4338 #line 1539 "asmshader.y"
4339 { (yyval
.comptype
) = BWRITER_COMPARISON_LT
; }
4344 /* Line 1806 of yacc.c */
4345 #line 1540 "asmshader.y"
4346 { (yyval
.comptype
) = BWRITER_COMPARISON_GE
; }
4351 /* Line 1806 of yacc.c */
4352 #line 1541 "asmshader.y"
4353 { (yyval
.comptype
) = BWRITER_COMPARISON_LE
; }
4358 /* Line 1806 of yacc.c */
4359 #line 1542 "asmshader.y"
4360 { (yyval
.comptype
) = BWRITER_COMPARISON_EQ
; }
4365 /* Line 1806 of yacc.c */
4366 #line 1543 "asmshader.y"
4367 { (yyval
.comptype
) = BWRITER_COMPARISON_NE
; }
4372 /* Line 1806 of yacc.c */
4373 #line 1546 "asmshader.y"
4375 TRACE("dcl_position%u\n", (yyvsp
[(1) - (1)].regnum
));
4376 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4377 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_POSITION
;
4383 /* Line 1806 of yacc.c */
4384 #line 1552 "asmshader.y"
4386 TRACE("dcl_blendweight%u\n", (yyvsp
[(1) - (1)].regnum
));
4387 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4388 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_BLENDWEIGHT
;
4394 /* Line 1806 of yacc.c */
4395 #line 1558 "asmshader.y"
4397 TRACE("dcl_blendindices%u\n", (yyvsp
[(1) - (1)].regnum
));
4398 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4399 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_BLENDINDICES
;
4405 /* Line 1806 of yacc.c */
4406 #line 1564 "asmshader.y"
4408 TRACE("dcl_normal%u\n", (yyvsp
[(1) - (1)].regnum
));
4409 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4410 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_NORMAL
;
4416 /* Line 1806 of yacc.c */
4417 #line 1570 "asmshader.y"
4419 TRACE("dcl_psize%u\n", (yyvsp
[(1) - (1)].regnum
));
4420 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4421 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_PSIZE
;
4427 /* Line 1806 of yacc.c */
4428 #line 1576 "asmshader.y"
4430 TRACE("dcl_texcoord%u\n", (yyvsp
[(1) - (1)].regnum
));
4431 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4432 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_TEXCOORD
;
4438 /* Line 1806 of yacc.c */
4439 #line 1582 "asmshader.y"
4441 TRACE("dcl_tangent%u\n", (yyvsp
[(1) - (1)].regnum
));
4442 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4443 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_TANGENT
;
4449 /* Line 1806 of yacc.c */
4450 #line 1588 "asmshader.y"
4452 TRACE("dcl_binormal%u\n", (yyvsp
[(1) - (1)].regnum
));
4453 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4454 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_BINORMAL
;
4460 /* Line 1806 of yacc.c */
4461 #line 1594 "asmshader.y"
4463 TRACE("dcl_tessfactor%u\n", (yyvsp
[(1) - (1)].regnum
));
4464 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4465 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_TESSFACTOR
;
4471 /* Line 1806 of yacc.c */
4472 #line 1600 "asmshader.y"
4474 TRACE("dcl_positiont%u\n", (yyvsp
[(1) - (1)].regnum
));
4475 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4476 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_POSITIONT
;
4482 /* Line 1806 of yacc.c */
4483 #line 1606 "asmshader.y"
4485 TRACE("dcl_color%u\n", (yyvsp
[(1) - (1)].regnum
));
4486 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4487 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_COLOR
;
4493 /* Line 1806 of yacc.c */
4494 #line 1612 "asmshader.y"
4496 TRACE("dcl_fog%u\n", (yyvsp
[(1) - (1)].regnum
));
4497 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4498 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_FOG
;
4504 /* Line 1806 of yacc.c */
4505 #line 1618 "asmshader.y"
4507 TRACE("dcl_depth%u\n", (yyvsp
[(1) - (1)].regnum
));
4508 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4509 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_DEPTH
;
4515 /* Line 1806 of yacc.c */
4516 #line 1624 "asmshader.y"
4518 TRACE("dcl_sample%u\n", (yyvsp
[(1) - (1)].regnum
));
4519 (yyval
.declaration
).regnum
= (yyvsp
[(1) - (1)].regnum
);
4520 (yyval
.declaration
).dclusage
= BWRITERDECLUSAGE_SAMPLE
;
4526 /* Line 1806 of yacc.c */
4527 #line 1631 "asmshader.y"
4529 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_INPUT
;
4535 /* Line 1806 of yacc.c */
4536 #line 1635 "asmshader.y"
4538 (yyval
.reg
).regnum
= (yyvsp
[(1) - (1)].regnum
); (yyval
.reg
).type
= BWRITERSPR_TEXTURE
;
4544 /* Line 1806 of yacc.c */
4545 #line 1640 "asmshader.y"
4547 (yyval
.samplertype
) = BWRITERSTT_1D
;
4553 /* Line 1806 of yacc.c */
4554 #line 1644 "asmshader.y"
4556 (yyval
.samplertype
) = BWRITERSTT_2D
;
4562 /* Line 1806 of yacc.c */
4563 #line 1648 "asmshader.y"
4565 (yyval
.samplertype
) = BWRITERSTT_CUBE
;
4571 /* Line 1806 of yacc.c */
4572 #line 1652 "asmshader.y"
4574 (yyval
.samplertype
) = BWRITERSTT_VOLUME
;
4580 /* Line 1806 of yacc.c */
4581 #line 1657 "asmshader.y"
4583 (yyval
.reg
).type
= BWRITERSPR_PREDICATE
;
4584 (yyval
.reg
).regnum
= 0;
4585 (yyval
.reg
).rel_reg
= NULL
;
4586 (yyval
.reg
).srcmod
= BWRITERSPSM_NONE
;
4587 (yyval
.reg
).u
.swizzle
= (yyvsp
[(3) - (4)].swizzle
);
4593 /* Line 1806 of yacc.c */
4594 #line 1665 "asmshader.y"
4596 (yyval
.reg
).type
= BWRITERSPR_PREDICATE
;
4597 (yyval
.reg
).regnum
= 0;
4598 (yyval
.reg
).rel_reg
= NULL
;
4599 (yyval
.reg
).srcmod
= BWRITERSPSM_NOT
;
4600 (yyval
.reg
).u
.swizzle
= (yyvsp
[(4) - (5)].swizzle
);
4606 /* Line 1806 of yacc.c */
4607 #line 4612 "asmshader.tab.c"
4610 /* User semantic actions sometimes alter yychar, and that requires
4611 that yytoken be updated with the new translation. We take the
4612 approach of translating immediately before every use of yytoken.
4613 One alternative is translating here after every semantic action,
4614 but that translation would be missed if the semantic action invokes
4615 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4616 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4617 incorrect destructor might then be invoked immediately. In the
4618 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4619 to an incorrect destructor call or verbose syntax error message
4620 before the lookahead is translated. */
4621 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
4625 YY_STACK_PRINT (yyss
, yyssp
);
4629 /* Now `shift' the result of the reduction. Determine what state
4630 that goes to, based on the state we popped back to and the rule
4631 number reduced by. */
4635 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
4636 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
4637 yystate
= yytable
[yystate
];
4639 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
4644 /*------------------------------------.
4645 | yyerrlab -- here on detecting error |
4646 `------------------------------------*/
4648 /* Make sure we have latest lookahead translation. See comments at
4649 user semantic actions for why this is necessary. */
4650 yytoken
= yychar
== YYEMPTY
? YYEMPTY
: YYTRANSLATE (yychar
);
4652 /* If not already recovering from an error, report this error. */
4656 #if ! YYERROR_VERBOSE
4657 yyerror (YY_("syntax error"));
4659 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4662 char const *yymsgp
= YY_("syntax error");
4663 int yysyntax_error_status
;
4664 yysyntax_error_status
= YYSYNTAX_ERROR
;
4665 if (yysyntax_error_status
== 0)
4667 else if (yysyntax_error_status
== 1)
4669 if (yymsg
!= yymsgbuf
)
4670 YYSTACK_FREE (yymsg
);
4671 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
4675 yymsg_alloc
= sizeof yymsgbuf
;
4676 yysyntax_error_status
= 2;
4680 yysyntax_error_status
= YYSYNTAX_ERROR
;
4685 if (yysyntax_error_status
== 2)
4686 goto yyexhaustedlab
;
4688 # undef YYSYNTAX_ERROR
4694 if (yyerrstatus
== 3)
4696 /* If just tried and failed to reuse lookahead token after an
4697 error, discard it. */
4699 if (yychar
<= YYEOF
)
4701 /* Return failure if at end of input. */
4702 if (yychar
== YYEOF
)
4707 yydestruct ("Error: discarding",
4713 /* Else will try to reuse lookahead token after shifting the error
4718 /*---------------------------------------------------.
4719 | yyerrorlab -- error raised explicitly by YYERROR. |
4720 `---------------------------------------------------*/
4723 /* Pacify compilers like GCC when the user code never invokes
4724 YYERROR and the label yyerrorlab therefore never appears in user
4726 if (/*CONSTCOND*/ 0)
4729 /* Do not reclaim the symbols of the rule which action triggered
4733 YY_STACK_PRINT (yyss
, yyssp
);
4738 /*-------------------------------------------------------------.
4739 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4740 `-------------------------------------------------------------*/
4742 yyerrstatus
= 3; /* Each real token shifted decrements this. */
4746 yyn
= yypact
[yystate
];
4747 if (!yypact_value_is_default (yyn
))
4750 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
4758 /* Pop the current state because it cannot handle the error token. */
4763 yydestruct ("Error: popping",
4764 yystos
[yystate
], yyvsp
);
4767 YY_STACK_PRINT (yyss
, yyssp
);
4773 /* Shift the error token. */
4774 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
4780 /*-------------------------------------.
4781 | yyacceptlab -- YYACCEPT comes here. |
4782 `-------------------------------------*/
4787 /*-----------------------------------.
4788 | yyabortlab -- YYABORT comes here. |
4789 `-----------------------------------*/
4794 #if !defined(yyoverflow) || YYERROR_VERBOSE
4795 /*-------------------------------------------------.
4796 | yyexhaustedlab -- memory exhaustion comes here. |
4797 `-------------------------------------------------*/
4799 yyerror (YY_("memory exhausted"));
4805 if (yychar
!= YYEMPTY
)
4807 /* Make sure we have latest lookahead translation. See comments at
4808 user semantic actions for why this is necessary. */
4809 yytoken
= YYTRANSLATE (yychar
);
4810 yydestruct ("Cleanup: discarding lookahead",
4813 /* Do not reclaim the symbols of the rule which action triggered
4814 this YYABORT or YYACCEPT. */
4816 YY_STACK_PRINT (yyss
, yyssp
);
4817 while (yyssp
!= yyss
)
4819 yydestruct ("Cleanup: popping",
4820 yystos
[*yyssp
], yyvsp
);
4825 YYSTACK_FREE (yyss
);
4828 if (yymsg
!= yymsgbuf
)
4829 YYSTACK_FREE (yymsg
);
4831 /* Make sure YYID is used. */
4832 return YYID (yyresult
);
4837 /* Line 2067 of yacc.c */
4838 #line 1673 "asmshader.y"
4841 struct bwriter_shader
*parse_asm_shader(char **messages
)
4843 struct bwriter_shader
*ret
= NULL
;
4845 asm_ctx
.shader
= NULL
;
4846 asm_ctx
.status
= PARSE_SUCCESS
;
4847 asm_ctx
.messages
.size
= asm_ctx
.messages
.capacity
= 0;
4848 asm_ctx
.line_no
= 1;
4852 if (asm_ctx
.status
!= PARSE_ERR
)
4853 ret
= asm_ctx
.shader
;
4854 else if (asm_ctx
.shader
)
4855 SlDeleteShader(asm_ctx
.shader
);
4859 if (asm_ctx
.messages
.size
)
4861 /* Shrink the buffer to the used size */
4862 *messages
= d3dcompiler_realloc(asm_ctx
.messages
.string
, asm_ctx
.messages
.size
+ 1);
4865 ERR("Out of memory, no messages reported\n");
4866 d3dcompiler_free(asm_ctx
.messages
.string
);
4876 if (asm_ctx
.messages
.capacity
)
4877 d3dcompiler_free(asm_ctx
.messages
.string
);