ReactOS  0.4.14-dev-323-g6fe6a88
asmshader.tab.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.4.1. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6  Inc.
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* All symbols defined below should begin with yy or YY, to avoid
38  infringing on user name space. This should be done even for local
39  variables, as they might otherwise be expanded by user macros.
40  There are some unavoidable exceptions within include files to
41  define necessary library symbols; they are noted "INFRINGES ON
42  USER NAME SPACE" below. */
43 
44 /* Undocumented macros, especially those whose name start with YY_,
45  are private implementation details. Do not rely on them. */
46 
47 /* Identify Bison output. */
48 #define YYBISON 1
49 
50 /* Bison version. */
51 #define YYBISON_VERSION "3.4.1"
52 
53 /* Skeleton name. */
54 #define YYSKELETON_NAME "yacc.c"
55 
56 /* Pure parsers. */
57 #define YYPURE 0
58 
59 /* Push parsers. */
60 #define YYPUSH 0
61 
62 /* Pull parsers. */
63 #define YYPULL 1
64 
65 
66 /* Substitute the variable and function names. */
67 #define yyparse asmshader_parse
68 #define yylex asmshader_lex
69 #define yyerror asmshader_error
70 #define yydebug asmshader_debug
71 #define yynerrs asmshader_nerrs
72 
73 #define yylval asmshader_lval
74 #define yychar asmshader_char
75 
76 /* First part of user prologue. */
77 #line 22 "asmshader.y"
78 
79 #include "wine/debug.h"
80 
81 #include "d3dcompiler_private.h"
82 
84 
86 
87 void WINAPIV asmparser_message(struct asm_parser *ctx, const char *fmt, ...)
88 {
90 
94 }
95 
96 static void asmshader_error(char const *s) {
97  asmparser_message(&asm_ctx, "Line %u: Error \"%s\" from bison\n", asm_ctx.line_no, s);
99 }
100 
101 static void set_rel_reg(struct shader_reg *reg, struct rel_reg *rel) {
102  /* We can have an additional offset without true relative addressing
103  * ex. c2[ 4 ] */
104  reg->regnum += rel->additional_offset;
105  if(!rel->has_rel_reg) {
106  reg->rel_reg = NULL;
107  } else {
108  reg->rel_reg = d3dcompiler_alloc(sizeof(*reg->rel_reg));
109  if(!reg->rel_reg) {
110  return;
111  }
112  reg->rel_reg->type = rel->type;
113  reg->rel_reg->u.swizzle = rel->swizzle;
114  reg->rel_reg->regnum = rel->rel_regnum;
115  }
116 }
117 
118 /* Needed lexer functions declarations */
119 int asmshader_lex(void);
120 
121 
122 
123 #line 124 "asmshader.tab.c"
124 
125 # ifndef YY_NULLPTR
126 # if defined __cplusplus
127 # if 201103L <= __cplusplus
128 # define YY_NULLPTR nullptr
129 # else
130 # define YY_NULLPTR 0
131 # endif
132 # else
133 # define YY_NULLPTR ((void*)0)
134 # endif
135 # endif
136 
137 /* Enabling verbose error messages. */
138 #ifdef YYERROR_VERBOSE
139 # undef YYERROR_VERBOSE
140 # define YYERROR_VERBOSE 1
141 #else
142 # define YYERROR_VERBOSE 0
143 #endif
144 
145 /* Use api.header.include to #include this header
146  instead of duplicating it here. */
147 #ifndef YY_ASMSHADER_E_REACTOSSYNC_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_ASMSHADER_TAB_H_INCLUDED
148 # define YY_ASMSHADER_E_REACTOSSYNC_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_ASMSHADER_TAB_H_INCLUDED
149 /* Debug traces. */
150 #ifndef YYDEBUG
151 # define YYDEBUG 0
152 #endif
153 #if YYDEBUG
154 extern int asmshader_debug;
155 #endif
156 
157 /* Token type. */
158 #ifndef YYTOKENTYPE
159 # define YYTOKENTYPE
161  {
162  INSTR_ADD = 258,
163  INSTR_NOP = 259,
164  INSTR_MOV = 260,
165  INSTR_SUB = 261,
166  INSTR_MAD = 262,
167  INSTR_MUL = 263,
168  INSTR_RCP = 264,
169  INSTR_RSQ = 265,
170  INSTR_DP3 = 266,
171  INSTR_DP4 = 267,
172  INSTR_MIN = 268,
173  INSTR_MAX = 269,
174  INSTR_SLT = 270,
175  INSTR_SGE = 271,
176  INSTR_ABS = 272,
177  INSTR_EXP = 273,
178  INSTR_LOG = 274,
179  INSTR_EXPP = 275,
180  INSTR_LOGP = 276,
181  INSTR_DST = 277,
182  INSTR_LRP = 278,
183  INSTR_FRC = 279,
184  INSTR_POW = 280,
185  INSTR_CRS = 281,
186  INSTR_SGN = 282,
187  INSTR_NRM = 283,
189  INSTR_M4x4 = 285,
190  INSTR_M4x3 = 286,
191  INSTR_M3x4 = 287,
192  INSTR_M3x3 = 288,
193  INSTR_M3x2 = 289,
194  INSTR_DCL = 290,
195  INSTR_DEF = 291,
196  INSTR_DEFB = 292,
197  INSTR_DEFI = 293,
198  INSTR_REP = 294,
200  INSTR_IF = 296,
201  INSTR_ELSE = 297,
202  INSTR_ENDIF = 298,
203  INSTR_BREAK = 299,
205  INSTR_CALL = 301,
207  INSTR_LOOP = 303,
208  INSTR_RET = 304,
210  INSTR_LABEL = 306,
211  INSTR_SETP = 307,
213  INSTR_LIT = 309,
214  INSTR_MOVA = 310,
215  INSTR_CND = 311,
216  INSTR_CMP = 312,
221  INSTR_TEX = 317,
222  INSTR_TEXLD = 318,
239  INSTR_BEM = 335,
240  INSTR_DSX = 336,
241  INSTR_DSY = 337,
245  INSTR_PHASE = 341,
246  REG_TEMP = 342,
247  REG_OUTPUT = 343,
248  REG_INPUT = 344,
252  REG_TEXTURE = 348,
253  REG_SAMPLER = 349,
255  REG_OPOS = 351,
256  REG_OFOG = 352,
257  REG_OPTS = 353,
261  REG_VPOS = 357,
262  REG_VFACE = 358,
263  REG_ADDRESS = 359,
264  REG_LOOP = 360,
266  REG_LABEL = 362,
267  VER_VS10 = 363,
268  VER_VS11 = 364,
269  VER_VS20 = 365,
270  VER_VS2X = 366,
271  VER_VS30 = 367,
272  VER_PS10 = 368,
273  VER_PS11 = 369,
274  VER_PS12 = 370,
275  VER_PS13 = 371,
276  VER_PS14 = 372,
277  VER_PS20 = 373,
278  VER_PS2X = 374,
279  VER_PS30 = 375,
280  SHIFT_X2 = 376,
281  SHIFT_X4 = 377,
282  SHIFT_X8 = 378,
283  SHIFT_D2 = 379,
284  SHIFT_D4 = 380,
285  SHIFT_D8 = 381,
286  MOD_SAT = 382,
287  MOD_PP = 383,
289  COMP_GT = 385,
290  COMP_LT = 386,
291  COMP_GE = 387,
292  COMP_LE = 388,
293  COMP_EQ = 389,
294  COMP_NE = 390,
295  SMOD_BIAS = 391,
297  SMOD_DZ = 393,
298  SMOD_DW = 394,
299  SMOD_ABS = 395,
300  SMOD_NOT = 396,
301  SAMPTYPE_1D = 397,
302  SAMPTYPE_2D = 398,
309  USAGE_PSIZE = 405,
315  USAGE_COLOR = 411,
316  USAGE_FOG = 412,
317  USAGE_DEPTH = 413,
319  COMPONENT = 415,
320  IMMVAL = 416,
321  IMMBOOL = 417
322  };
323 #endif
324 
325 /* Value type. */
326 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
327 union YYSTYPE
328 {
329 #line 68 "asmshader.y"
330 
331  struct {
332  float val;
334  } immval;
336  unsigned int regnum;
337  struct shader_reg reg;
340  struct {
344  } wm_components;
346  struct {
347  DWORD swizzle;
348  DWORD idx;
349  } sw_components;
351  struct {
354  } modshift;
356  struct {
358  unsigned int regnum;
359  } declaration;
361  struct rel_reg rel_reg;
362  struct src_regs sregs;
363 
364 #line 365 "asmshader.tab.c"
365 
366 };
367 typedef union YYSTYPE YYSTYPE;
368 # define YYSTYPE_IS_TRIVIAL 1
369 # define YYSTYPE_IS_DECLARED 1
370 #endif
371 
372 
373 extern YYSTYPE asmshader_lval;
374 
375 int asmshader_parse (void);
376 
377 #endif /* !YY_ASMSHADER_E_REACTOSSYNC_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_ASMSHADER_TAB_H_INCLUDED */
378 
379 
380 
381 #ifdef short
382 # undef short
383 #endif
384 
385 #ifdef YYTYPE_UINT8
386 typedef YYTYPE_UINT8 yytype_uint8;
387 #else
388 typedef unsigned char yytype_uint8;
389 #endif
390 
391 #ifdef YYTYPE_INT8
392 typedef YYTYPE_INT8 yytype_int8;
393 #else
394 typedef signed char yytype_int8;
395 #endif
396 
397 #ifdef YYTYPE_UINT16
398 typedef YYTYPE_UINT16 yytype_uint16;
399 #else
400 typedef unsigned short yytype_uint16;
401 #endif
402 
403 #ifdef YYTYPE_INT16
404 typedef YYTYPE_INT16 yytype_int16;
405 #else
406 typedef short yytype_int16;
407 #endif
408 
409 #ifndef YYSIZE_T
410 # ifdef __SIZE_TYPE__
411 # define YYSIZE_T __SIZE_TYPE__
412 # elif defined size_t
413 # define YYSIZE_T size_t
414 # elif ! defined YYSIZE_T
415 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
416 # define YYSIZE_T size_t
417 # else
418 # define YYSIZE_T unsigned
419 # endif
420 #endif
421 
422 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
423 
424 #ifndef YY_
425 # if defined YYENABLE_NLS && YYENABLE_NLS
426 # if ENABLE_NLS
427 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
428 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
429 # endif
430 # endif
431 # ifndef YY_
432 # define YY_(Msgid) Msgid
433 # endif
434 #endif
435 
436 #ifndef YY_ATTRIBUTE
437 # if (defined __GNUC__ \
438  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
439  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
440 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
441 # else
442 # define YY_ATTRIBUTE(Spec) /* empty */
443 # endif
444 #endif
445 
446 #ifndef YY_ATTRIBUTE_PURE
447 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
448 #endif
449 
450 #ifndef YY_ATTRIBUTE_UNUSED
451 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
452 #endif
453 
454 /* Suppress unused-variable warnings by "using" E. */
455 #if ! defined lint || defined __GNUC__
456 # define YYUSE(E) ((void) (E))
457 #else
458 # define YYUSE(E) /* empty */
459 #endif
460 
461 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
462 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
463 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
464  _Pragma ("GCC diagnostic push") \
465  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
466  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
467 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
468  _Pragma ("GCC diagnostic pop")
469 #else
470 # define YY_INITIAL_VALUE(Value) Value
471 #endif
472 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
473 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
474 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
475 #endif
476 #ifndef YY_INITIAL_VALUE
477 # define YY_INITIAL_VALUE(Value) /* Nothing. */
478 #endif
479 
480 
481 #define YY_ASSERT(E) ((void) (0 && (E)))
482 
483 #if ! defined yyoverflow || YYERROR_VERBOSE
484 
485 /* The parser invokes alloca or malloc; define the necessary symbols. */
486 
487 # ifdef YYSTACK_USE_ALLOCA
488 # if YYSTACK_USE_ALLOCA
489 # ifdef __GNUC__
490 # define YYSTACK_ALLOC __builtin_alloca
491 # elif defined __BUILTIN_VA_ARG_INCR
492 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
493 # elif defined _AIX
494 # define YYSTACK_ALLOC __alloca
495 # elif defined _MSC_VER
496 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
497 # define alloca _alloca
498 # else
499 # define YYSTACK_ALLOC alloca
500 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
501 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
502  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
503 # ifndef EXIT_SUCCESS
504 # define EXIT_SUCCESS 0
505 # endif
506 # endif
507 # endif
508 # endif
509 # endif
510 
511 # ifdef YYSTACK_ALLOC
512  /* Pacify GCC's 'empty if-body' warning. */
513 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
514 # ifndef YYSTACK_ALLOC_MAXIMUM
515  /* The OS might guarantee only one guard page at the bottom of the stack,
516  and a page size can be as small as 4096 bytes. So we cannot safely
517  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
518  to allow for a few compiler-allocated temporary stack slots. */
519 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
520 # endif
521 # else
522 # define YYSTACK_ALLOC YYMALLOC
523 # define YYSTACK_FREE YYFREE
524 # ifndef YYSTACK_ALLOC_MAXIMUM
525 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
526 # endif
527 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
528  && ! ((defined YYMALLOC || defined malloc) \
529  && (defined YYFREE || defined free)))
530 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
531 # ifndef EXIT_SUCCESS
532 # define EXIT_SUCCESS 0
533 # endif
534 # endif
535 # ifndef YYMALLOC
536 # define YYMALLOC malloc
537 # if ! defined malloc && ! defined EXIT_SUCCESS
538 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
539 # endif
540 # endif
541 # ifndef YYFREE
542 # define YYFREE free
543 # if ! defined free && ! defined EXIT_SUCCESS
544 void free (void *); /* INFRINGES ON USER NAME SPACE */
545 # endif
546 # endif
547 # endif
548 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
549 
550 
551 #if (! defined yyoverflow \
552  && (! defined __cplusplus \
553  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
554 
555 /* A type that is properly aligned for any stack member. */
556 union yyalloc
557 {
560 };
561 
562 /* The size of the maximum gap between one aligned stack and the next. */
563 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
564 
565 /* The size of an array large to enough to hold all stacks, each with
566  N elements. */
567 # define YYSTACK_BYTES(N) \
568  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
569  + YYSTACK_GAP_MAXIMUM)
570 
571 # define YYCOPY_NEEDED 1
572 
573 /* Relocate STACK from its old location to the new one. The
574  local variables YYSIZE and YYSTACKSIZE give the old and new number of
575  elements in the stack, and YYPTR gives the new location of the
576  stack. Advance YYPTR to a properly aligned location for the next
577  stack. */
578 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
579  do \
580  { \
581  YYSIZE_T yynewbytes; \
582  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
583  Stack = &yyptr->Stack_alloc; \
584  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
585  yyptr += yynewbytes / sizeof (*yyptr); \
586  } \
587  while (0)
588 
589 #endif
590 
591 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
592 /* Copy COUNT objects from SRC to DST. The source and destination do
593  not overlap. */
594 # ifndef YYCOPY
595 # if defined __GNUC__ && 1 < __GNUC__
596 # define YYCOPY(Dst, Src, Count) \
597  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
598 # else
599 # define YYCOPY(Dst, Src, Count) \
600  do \
601  { \
602  YYSIZE_T yyi; \
603  for (yyi = 0; yyi < (Count); yyi++) \
604  (Dst)[yyi] = (Src)[yyi]; \
605  } \
606  while (0)
607 # endif
608 # endif
609 #endif /* !YYCOPY_NEEDED */
610 
611 /* YYFINAL -- State number of the termination state. */
612 #define YYFINAL 16
613 /* YYLAST -- Last index in YYTABLE. */
614 #define YYLAST 733
615 
616 /* YYNTOKENS -- Number of terminals. */
617 #define YYNTOKENS 171
618 /* YYNNTS -- Number of nonterminals. */
619 #define YYNNTS 26
620 /* YYNRULES -- Number of rules. */
621 #define YYNRULES 228
622 /* YYNSTATES -- Number of states. */
623 #define YYNSTATES 552
624 
625 #define YYUNDEFTOK 2
626 #define YYMAXUTOK 417
627 
628 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
629  as returned by yylex, with out-of-bounds checking. */
630 #define YYTRANSLATE(YYX) \
631  ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
632 
633 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
634  as returned by yylex. */
635 static const yytype_uint8 yytranslate[] =
636 {
637  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641  169, 170, 2, 163, 164, 166, 165, 2, 2, 2,
642  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
645  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646  2, 167, 2, 168, 2, 2, 2, 2, 2, 2,
647  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
651  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
652  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
653  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
654  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
655  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
656  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
657  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
658  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
659  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
660  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
661  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
662  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
663  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
664  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
665  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
666  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
667  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
668  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
669  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
670  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
671  85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
672  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
673  105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
674  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
675  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
676  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
677  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
678  155, 156, 157, 158, 159, 160, 161, 162
679 };
680 
681 #if YYDEBUG
682  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
683 static const yytype_uint16 yyrline[] =
684 {
685  0, 309, 309, 314, 319, 324, 329, 334, 339, 344,
686  349, 354, 359, 364, 369, 374, 380, 381, 386, 390,
687  395, 401, 406, 411, 416, 421, 426, 431, 436, 441,
688  446, 451, 456, 461, 466, 471, 476, 481, 486, 491,
689  496, 501, 506, 511, 516, 521, 526, 531, 536, 541,
690  546, 551, 556, 561, 573, 585, 608, 631, 653, 675,
691  685, 700, 707, 714, 718, 722, 726, 731, 736, 741,
692  746, 751, 756, 761, 766, 771, 776, 781, 786, 791,
693  796, 801, 806, 811, 816, 821, 826, 831, 836, 841,
694  847, 852, 857, 862, 873, 878, 883, 888, 893, 898,
695  903, 908, 913, 918, 923, 928, 933, 938, 943, 948,
696  953, 958, 963, 968, 973, 978, 985, 993, 1002, 1006,
697  1010, 1014, 1020, 1026, 1032, 1036, 1040, 1046, 1050, 1054,
698  1058, 1062, 1066, 1070, 1074, 1080, 1086, 1091, 1098, 1113,
699  1119, 1135, 1139, 1161, 1166, 1180, 1184, 1197, 1202, 1207,
700  1212, 1217, 1222, 1227, 1232, 1237, 1243, 1248, 1259, 1267,
701  1275, 1283, 1308, 1322, 1336, 1346, 1350, 1355, 1363, 1371,
702  1379, 1388, 1397, 1407, 1411, 1415, 1419, 1423, 1427, 1432,
703  1436, 1441, 1445, 1451, 1455, 1459, 1463, 1467, 1471, 1477,
704  1481, 1487, 1493, 1499, 1505, 1511, 1515, 1519, 1523, 1527,
705  1531, 1536, 1537, 1538, 1539, 1540, 1541, 1543, 1549, 1555,
706  1561, 1567, 1573, 1579, 1585, 1591, 1597, 1603, 1609, 1615,
707  1621, 1628, 1632, 1637, 1641, 1645, 1649, 1654, 1662
708 };
709 #endif
710 
711 #if YYDEBUG || YYERROR_VERBOSE || 0
712 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
713  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
714 static const char *const yytname[] =
715 {
716  "$end", "error", "$undefined", "INSTR_ADD", "INSTR_NOP", "INSTR_MOV",
717  "INSTR_SUB", "INSTR_MAD", "INSTR_MUL", "INSTR_RCP", "INSTR_RSQ",
718  "INSTR_DP3", "INSTR_DP4", "INSTR_MIN", "INSTR_MAX", "INSTR_SLT",
719  "INSTR_SGE", "INSTR_ABS", "INSTR_EXP", "INSTR_LOG", "INSTR_EXPP",
720  "INSTR_LOGP", "INSTR_DST", "INSTR_LRP", "INSTR_FRC", "INSTR_POW",
721  "INSTR_CRS", "INSTR_SGN", "INSTR_NRM", "INSTR_SINCOS", "INSTR_M4x4",
722  "INSTR_M4x3", "INSTR_M3x4", "INSTR_M3x3", "INSTR_M3x2", "INSTR_DCL",
723  "INSTR_DEF", "INSTR_DEFB", "INSTR_DEFI", "INSTR_REP", "INSTR_ENDREP",
724  "INSTR_IF", "INSTR_ELSE", "INSTR_ENDIF", "INSTR_BREAK", "INSTR_BREAKP",
725  "INSTR_CALL", "INSTR_CALLNZ", "INSTR_LOOP", "INSTR_RET", "INSTR_ENDLOOP",
726  "INSTR_LABEL", "INSTR_SETP", "INSTR_TEXLDL", "INSTR_LIT", "INSTR_MOVA",
727  "INSTR_CND", "INSTR_CMP", "INSTR_DP2ADD", "INSTR_TEXCOORD",
728  "INSTR_TEXCRD", "INSTR_TEXKILL", "INSTR_TEX", "INSTR_TEXLD",
729  "INSTR_TEXBEM", "INSTR_TEXBEML", "INSTR_TEXREG2AR", "INSTR_TEXREG2GB",
730  "INSTR_TEXREG2RGB", "INSTR_TEXM3x2PAD", "INSTR_TEXM3x2TEX",
731  "INSTR_TEXM3x3PAD", "INSTR_TEXM3x3SPEC", "INSTR_TEXM3x3VSPEC",
732  "INSTR_TEXM3x3TEX", "INSTR_TEXDP3TEX", "INSTR_TEXM3x2DEPTH",
733  "INSTR_TEXDP3", "INSTR_TEXM3x3", "INSTR_TEXDEPTH", "INSTR_BEM",
734  "INSTR_DSX", "INSTR_DSY", "INSTR_TEXLDP", "INSTR_TEXLDB", "INSTR_TEXLDD",
735  "INSTR_PHASE", "REG_TEMP", "REG_OUTPUT", "REG_INPUT", "REG_CONSTFLOAT",
736  "REG_CONSTINT", "REG_CONSTBOOL", "REG_TEXTURE", "REG_SAMPLER",
737  "REG_TEXCRDOUT", "REG_OPOS", "REG_OFOG", "REG_OPTS", "REG_VERTEXCOLOR",
738  "REG_FRAGCOLOR", "REG_FRAGDEPTH", "REG_VPOS", "REG_VFACE", "REG_ADDRESS",
739  "REG_LOOP", "REG_PREDICATE", "REG_LABEL", "VER_VS10", "VER_VS11",
740  "VER_VS20", "VER_VS2X", "VER_VS30", "VER_PS10", "VER_PS11", "VER_PS12",
741  "VER_PS13", "VER_PS14", "VER_PS20", "VER_PS2X", "VER_PS30", "SHIFT_X2",
742  "SHIFT_X4", "SHIFT_X8", "SHIFT_D2", "SHIFT_D4", "SHIFT_D8", "MOD_SAT",
743  "MOD_PP", "MOD_CENTROID", "COMP_GT", "COMP_LT", "COMP_GE", "COMP_LE",
744  "COMP_EQ", "COMP_NE", "SMOD_BIAS", "SMOD_SCALEBIAS", "SMOD_DZ",
745  "SMOD_DW", "SMOD_ABS", "SMOD_NOT", "SAMPTYPE_1D", "SAMPTYPE_2D",
746  "SAMPTYPE_CUBE", "SAMPTYPE_VOLUME", "USAGE_POSITION",
747  "USAGE_BLENDWEIGHT", "USAGE_BLENDINDICES", "USAGE_NORMAL", "USAGE_PSIZE",
748  "USAGE_TEXCOORD", "USAGE_TANGENT", "USAGE_BINORMAL", "USAGE_TESSFACTOR",
749  "USAGE_POSITIONT", "USAGE_COLOR", "USAGE_FOG", "USAGE_DEPTH",
750  "USAGE_SAMPLE", "COMPONENT", "IMMVAL", "IMMBOOL", "'+'", "','", "'.'",
751  "'-'", "'['", "']'", "'('", "')'", "$accept", "shader", "version_marker",
752  "instructions", "complexinstr", "instruction", "dreg", "dreg_name",
753  "writemask", "wm_components", "swizzle", "sw_components", "omods",
754  "omodifier", "sregs", "sreg", "rel_reg", "immsum", "smod", "relreg_name",
755  "sreg_name", "comp", "dclusage", "dcl_inputreg", "sampdcl", "predicate", YY_NULLPTR
756 };
757 #endif
758 
759 # ifdef YYPRINT
760 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
761  (internal) symbol number NUM (which must be that of a token). */
762 static const yytype_uint16 yytoknum[] =
763 {
764  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
765  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
766  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
767  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
768  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
769  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
770  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
771  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
772  335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
773  345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
774  355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
775  365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
776  375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
777  385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
778  395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
779  405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
780  415, 416, 417, 43, 44, 46, 45, 91, 93, 40,
781  41
782 };
783 # endif
784 
785 #define YYPACT_NINF -458
786 
787 #define yypact_value_is_default(Yystate) \
788  (!!((Yystate) == (-458)))
789 
790 #define YYTABLE_NINF -1
791 
792 #define yytable_value_is_error(Yytable_value) \
793  0
794 
795  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
796  STATE-NUM. */
797 static const yytype_int16 yypact[] =
798 {
799  386, -458, -458, -458, -458, -458, -458, -458, -458, -458,
800  -458, -458, -458, -458, 11, -458, -458, 389, -458, -458,
801  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
802  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
803  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
804  334, -42, -28, -10, -34, -458, 95, -458, -458, 3,
805  -34, -34, -34, -34, -458, -458, -34, 3, -458, -458,
806  -458, -458, -458, -458, -458, -458, 247, -458, -458, -458,
807  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
808  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
809  -458, -458, 647, -55, -458, -458, 647, 505, 505, 505,
810  505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
811  505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
812  505, 505, 505, 505, 505, 505, 505, 505, -458, -458,
813  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
814  -458, -458, -458, -458, -458, -458, 123, 2, -458, -44,
815  -40, -39, -458, -458, -458, -458, -458, -458, -458, -458,
816  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
817  -458, -458, 185, -45, 185, -38, -458, -37, -458, -458,
818  -458, -458, -458, -458, -38, -34, -34, -38, -38, -38,
819  -38, -38, 247, 505, 505, 505, 505, 505, 505, 505,
820  505, -458, -458, -458, -458, -458, -458, -458, -458, -458,
821  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
822  -458, -458, -76, 505, 505, 505, 505, 505, 505, 505,
823  505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
824  505, 505, 505, 505, 505, 505, 505, -458, -57, 22,
825  -458, -458, -458, -458, -458, -458, -458, -458, -458, -458,
826  -35, -458, 1, 4, 8, 9, 10, 14, 16, 29,
827  49, 50, 51, 54, 55, 57, 58, 60, 68, 69,
828  70, 73, 74, 75, 76, 77, 78, 79, 89, 90,
829  91, 93, -458, -458, -458, 94, 94, 142, 82, 5,
830  96, 6, -57, 185, -37, -34, -58, -43, -38, -38,
831  98, 119, 129, 130, 131, 132, 133, -458, 134, 100,
832  -458, -458, -458, 135, 136, 137, 138, 190, 191, 192,
833  193, 194, 195, 204, 205, 343, 344, 345, 346, -458,
834  378, 379, 380, 381, 382, 383, 388, 384, -57, -34,
835  -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
836  -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
837  -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
838  -458, -458, 94, -458, -458, -458, 385, -458, 387, -458,
839  -37, -43, -458, -458, -458, -458, -154, -57, -458, -458,
840  -458, -458, -458, -458, -458, -57, -34, -34, -34, -34,
841  -34, -34, -34, -34, -458, 390, -34, -34, -34, -34,
842  -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
843  -34, -34, -34, -34, -34, -34, -34, -34, -458, 393,
844  -458, 397, -38, -38, -38, -38, -38, -38, -38, -38,
845  -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
846  -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
847  -38, -38, -38, -458, 394, 395, -43, -458, -57, -30,
848  -458, -86, -458, -38, -38, -38, -38, -38, -38, -38,
849  -38, -458, -38, -38, -38, -38, -38, -38, -38, -38,
850  -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
851  -38, -38, -38, -38, -458, -458, 448, 449, -458, -57,
852  -458, -458, -57, 396, -458, 453, 454, -458, -84, -63,
853  452, 455, 396, -458, 456, -458, 457, 459, -59, -458,
854  -458, -458
855 };
856 
857  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
858  Performed when YYTABLE does not specify something else to do. Zero
859  means the default is an error. */
860 static const yytype_uint8 yydefact[] =
861 {
862  0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
863  12, 13, 14, 15, 0, 16, 1, 2, 145, 22,
864  145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
865  145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
866  145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
867  145, 0, 0, 0, 0, 67, 0, 70, 71, 72,
868  0, 0, 0, 0, 78, 79, 0, 0, 145, 145,
869  145, 145, 145, 145, 145, 145, 0, 145, 145, 145,
870  145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
871  145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
872  145, 115, 0, 0, 17, 18, 0, 0, 0, 0,
873  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
874  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
875  0, 0, 0, 0, 0, 0, 0, 0, 223, 224,
876  225, 226, 207, 208, 209, 210, 211, 212, 213, 214,
877  215, 216, 217, 218, 219, 220, 0, 145, 145, 0,
878  0, 0, 181, 182, 183, 184, 185, 186, 187, 189,
879  188, 190, 191, 192, 193, 194, 196, 197, 198, 199,
880  195, 200, 0, 0, 0, 66, 156, 165, 201, 202,
881  203, 204, 205, 206, 68, 0, 0, 74, 75, 76,
882  77, 80, 0, 0, 0, 0, 0, 0, 0, 0,
883  0, 118, 119, 120, 121, 122, 123, 124, 126, 125,
884  127, 129, 128, 130, 131, 132, 134, 135, 136, 137,
885  133, 90, 165, 0, 0, 0, 0, 0, 0, 0,
886  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
887  0, 0, 0, 0, 0, 0, 0, 20, 141, 0,
888  19, 147, 148, 149, 150, 151, 152, 153, 154, 155,
889  0, 146, 0, 0, 0, 0, 0, 0, 0, 0,
890  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
891  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
892  0, 0, 221, 222, 60, 57, 53, 0, 0, 0,
893  0, 0, 141, 0, 165, 0, 0, 141, 69, 73,
894  0, 0, 0, 0, 0, 0, 0, 88, 0, 0,
895  117, 116, 91, 0, 0, 0, 0, 0, 0, 0,
896  0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
897  0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
898  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
899  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
900  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
901  58, 54, 55, 62, 59, 61, 0, 65, 0, 164,
902  165, 141, 157, 179, 180, 171, 0, 141, 174, 173,
903  175, 176, 177, 178, 158, 141, 0, 0, 0, 0,
904  0, 0, 0, 0, 139, 138, 0, 0, 0, 0,
905  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
906  0, 0, 0, 0, 0, 0, 0, 0, 143, 142,
907  227, 0, 21, 23, 24, 25, 26, 27, 28, 29,
908  30, 31, 32, 33, 34, 35, 36, 37, 39, 38,
909  40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
910  50, 51, 52, 56, 0, 0, 141, 160, 141, 0,
911  166, 0, 159, 81, 82, 83, 84, 85, 86, 87,
912  89, 140, 93, 96, 97, 98, 99, 100, 101, 108,
913  102, 103, 104, 105, 106, 107, 109, 110, 111, 112,
914  113, 94, 95, 114, 144, 228, 0, 0, 162, 141,
915  161, 172, 141, 0, 167, 0, 0, 163, 0, 0,
916  0, 0, 0, 168, 0, 169, 0, 0, 0, 63,
917  64, 170
918 };
919 
920  /* YYPGOTO[NTERM-NUM]. */
921 static const yytype_int16 yypgoto[] =
922 {
923  -458, -458, -458, -458, -458, 17, -92, -458, -293, -458,
924  -309, -458, 491, -458, -56, 306, -231, -457, -399, 146,
925  -132, 21, -458, -206, -458, -458
926 };
927 
928  /* YYDEFGOTO[NTERM-NUM]. */
929 static const yytype_int16 yydefgoto[] =
930 {
931  -1, 14, 15, 17, 104, 105, 231, 232, 330, 425,
932  357, 449, 107, 271, 185, 186, 317, 406, 415, 407,
933  187, 195, 157, 305, 158, 106
934 };
935 
936  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
937  positive, shift that token. If negative, reduce the rule whose
938  number is the opposite. If YYTABLE_NINF, syntax error. */
939 static const yytype_uint16 yytable[] =
940 {
941  194, 331, 488, 399, 197, 198, 199, 200, 414, 489,
942  201, 16, 390, 391, 490, 270, 272, 273, 274, 275,
943  276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
944  286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
945  296, 297, 298, 299, 300, 301, 403, 404, 159, 451,
946  312, 258, 314, 162, 163, 164, 165, 166, 167, 168,
947  169, 170, 171, 172, 160, 173, 174, 175, 176, 177,
948  178, 179, 180, 181, 403, 404, 539, 533, 408, 542,
949  196, 161, 534, 401, 543, 548, 259, 529, 202, 329,
950  306, 316, 487, 409, 410, 411, 412, 413, 491, 483,
951  544, 392, 395, 405, 544, 545, 492, 182, 356, 551,
952  320, 321, 322, 323, 324, 325, 326, 327, 328, 257,
953  309, 313, 356, 260, 310, 311, 315, 183, 358, 359,
954  316, 531, 184, 188, 189, 190, 191, 192, 193, 318,
955  319, 332, 333, 334, 335, 336, 337, 338, 339, 340,
956  341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
957  351, 352, 353, 354, 355, 360, 396, 398, 361, 486,
958  393, 302, 362, 363, 364, 303, 394, 528, 365, 530,
959  366, 400, 162, 163, 164, 165, 166, 167, 168, 169,
960  170, 171, 172, 367, 173, 174, 175, 176, 177, 178,
961  179, 180, 181, 261, 262, 263, 264, 265, 266, 267,
962  268, 269, 302, 368, 369, 370, 303, 304, 371, 372,
963  537, 373, 374, 538, 375, 188, 189, 190, 191, 192,
964  193, 302, 376, 377, 378, 303, 182, 379, 380, 381,
965  382, 383, 384, 385, 261, 262, 263, 264, 265, 266,
966  267, 268, 269, 386, 387, 388, 183, 389, 397, 329,
967  424, 184, 416, 261, 262, 263, 264, 265, 266, 267,
968  268, 269, 162, 163, 164, 165, 166, 167, 168, 169,
969  170, 171, 172, 417, 173, 174, 175, 176, 177, 178,
970  179, 180, 181, 418, 419, 420, 421, 422, 423, 426,
971  427, 428, 429, 452, 453, 454, 455, 456, 457, 458,
972  459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
973  469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
974  479, 480, 481, 482, 211, 212, 213, 214, 215, 216,
975  217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
976  227, 228, 229, 230, 430, 431, 432, 433, 434, 435,
977  493, 494, 495, 496, 497, 498, 499, 500, 436, 437,
978  502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
979  512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
980  522, 523, 18, 19, 20, 21, 22, 23, 24, 25,
981  26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
982  36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
983  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
984  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
985  66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
986  76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
987  86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
988  96, 97, 98, 99, 100, 101, 138, 139, 140, 141,
989  142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
990  152, 153, 154, 155, 1, 2, 3, 4, 5, 6,
991  7, 8, 9, 10, 11, 12, 13, 438, 439, 440,
992  441, 108, 109, 110, 111, 112, 113, 114, 115, 116,
993  117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
994  127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
995  137, 156, 442, 443, 444, 445, 446, 447, 448, 484,
996  501, 485, 102, 524, 450, 526, 527, 405, 103, 203,
997  204, 205, 206, 207, 208, 209, 210, 525, 233, 234,
998  235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
999  245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
1000  255, 256, 211, 212, 213, 214, 215, 216, 217, 218,
1001  219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
1002  229, 230, 535, 536, 540, 541, 546, 531, 549, 547,
1003  550, 402, 0, 0, 0, 0, 261, 262, 263, 264,
1004  265, 266, 267, 268, 269, 532, 0, 0, 0, 0,
1005  0, 0, 0, 0, 0, 0, 0, 0, 307, 308,
1006  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1007  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1008  38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1009  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1010  58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1011  68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1012  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1013  88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1014  98, 99, 100, 101
1015 };
1016 
1017 static const yytype_int16 yycheck[] =
1018 {
1019  56, 232, 401, 312, 60, 61, 62, 63, 317, 163,
1020  66, 0, 305, 306, 168, 107, 108, 109, 110, 111,
1021  112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1022  122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
1023  132, 133, 134, 135, 136, 137, 104, 105, 90, 358,
1024  182, 106, 184, 87, 88, 89, 90, 91, 92, 93,
1025  94, 95, 96, 97, 92, 99, 100, 101, 102, 103,
1026  104, 105, 106, 107, 104, 105, 533, 163, 121, 163,
1027  59, 91, 168, 314, 168, 542, 141, 486, 67, 165,
1028  88, 167, 401, 136, 137, 138, 139, 140, 407, 392,
1029  163, 307, 308, 161, 163, 168, 415, 141, 165, 168,
1030  202, 203, 204, 205, 206, 207, 208, 209, 210, 102,
1031  164, 166, 165, 106, 164, 164, 164, 161, 106, 164,
1032  167, 161, 166, 130, 131, 132, 133, 134, 135, 195,
1033  196, 233, 234, 235, 236, 237, 238, 239, 240, 241,
1034  242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
1035  252, 253, 254, 255, 256, 164, 161, 161, 164, 400,
1036  88, 89, 164, 164, 164, 93, 94, 486, 164, 488,
1037  164, 313, 87, 88, 89, 90, 91, 92, 93, 94,
1038  95, 96, 97, 164, 99, 100, 101, 102, 103, 104,
1039  105, 106, 107, 121, 122, 123, 124, 125, 126, 127,
1040  128, 129, 89, 164, 164, 164, 93, 94, 164, 164,
1041  529, 164, 164, 532, 164, 130, 131, 132, 133, 134,
1042  135, 89, 164, 164, 164, 93, 141, 164, 164, 164,
1043  164, 164, 164, 164, 121, 122, 123, 124, 125, 126,
1044  127, 128, 129, 164, 164, 164, 161, 164, 162, 165,
1045  160, 166, 164, 121, 122, 123, 124, 125, 126, 127,
1046  128, 129, 87, 88, 89, 90, 91, 92, 93, 94,
1047  95, 96, 97, 164, 99, 100, 101, 102, 103, 104,
1048  105, 106, 107, 164, 164, 164, 164, 164, 164, 164,
1049  164, 164, 164, 359, 360, 361, 362, 363, 364, 365,
1050  366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
1051  376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
1052  386, 387, 388, 389, 87, 88, 89, 90, 91, 92,
1053  93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1054  103, 104, 105, 106, 164, 164, 164, 164, 164, 164,
1055  416, 417, 418, 419, 420, 421, 422, 423, 164, 164,
1056  426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
1057  436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
1058  446, 447, 3, 4, 5, 6, 7, 8, 9, 10,
1059  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1060  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1061  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1062  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
1063  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1064  61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1065  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1066  81, 82, 83, 84, 85, 86, 142, 143, 144, 145,
1067  146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1068  156, 157, 158, 159, 108, 109, 110, 111, 112, 113,
1069  114, 115, 116, 117, 118, 119, 120, 164, 164, 164,
1070  164, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1071  29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1072  39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
1073  49, 50, 164, 164, 164, 164, 164, 164, 160, 164,
1074  160, 164, 163, 160, 170, 161, 161, 161, 169, 68,
1075  69, 70, 71, 72, 73, 74, 75, 170, 77, 78,
1076  79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1077  89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1078  99, 100, 87, 88, 89, 90, 91, 92, 93, 94,
1079  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1080  105, 106, 164, 164, 161, 161, 164, 161, 161, 164,
1081  161, 315, -1, -1, -1, -1, 121, 122, 123, 124,
1082  125, 126, 127, 128, 129, 489, -1, -1, -1, -1,
1083  -1, -1, -1, -1, -1, -1, -1, -1, 157, 158,
1084  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1085  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1086  23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1087  33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1088  43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1089  53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1090  63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1091  73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1092  83, 84, 85, 86
1093 };
1094 
1095  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1096  symbol of state STATE-NUM. */
1097 static const yytype_uint8 yystos[] =
1098 {
1099  0, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1100  117, 118, 119, 120, 172, 173, 0, 174, 3, 4,
1101  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1102  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1103  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1104  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1105  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1106  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1107  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1108  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1109  85, 86, 163, 169, 175, 176, 196, 183, 183, 183,
1110  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1111  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1112  183, 183, 183, 183, 183, 183, 183, 183, 142, 143,
1113  144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1114  154, 155, 156, 157, 158, 159, 183, 193, 195, 90,
1115  92, 91, 87, 88, 89, 90, 91, 92, 93, 94,
1116  95, 96, 97, 99, 100, 101, 102, 103, 104, 105,
1117  106, 107, 141, 161, 166, 185, 186, 191, 130, 131,
1118  132, 133, 134, 135, 185, 192, 192, 185, 185, 185,
1119  185, 185, 192, 183, 183, 183, 183, 183, 183, 183,
1120  183, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1121  96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1122  106, 177, 178, 183, 183, 183, 183, 183, 183, 183,
1123  183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
1124  183, 183, 183, 183, 183, 183, 183, 176, 106, 141,
1125  176, 121, 122, 123, 124, 125, 126, 127, 128, 129,
1126  177, 184, 177, 177, 177, 177, 177, 177, 177, 177,
1127  177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
1128  177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
1129  177, 177, 89, 93, 94, 194, 88, 183, 183, 164,
1130  164, 164, 191, 166, 191, 164, 167, 187, 185, 185,
1131  177, 177, 177, 177, 177, 177, 177, 177, 177, 165,
1132  179, 187, 177, 177, 177, 177, 177, 177, 177, 177,
1133  177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
1134  177, 177, 177, 177, 177, 177, 165, 181, 106, 164,
1135  164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1136  164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1137  164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1138  179, 179, 194, 88, 94, 194, 161, 162, 161, 181,
1139  191, 187, 186, 104, 105, 161, 188, 190, 121, 136,
1140  137, 138, 139, 140, 181, 189, 164, 164, 164, 164,
1141  164, 164, 164, 164, 160, 180, 164, 164, 164, 164,
1142  164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1143  164, 164, 164, 164, 164, 164, 164, 164, 160, 182,
1144  170, 181, 185, 185, 185, 185, 185, 185, 185, 185,
1145  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1146  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1147  185, 185, 185, 179, 164, 164, 187, 181, 189, 163,
1148  168, 181, 181, 185, 185, 185, 185, 185, 185, 185,
1149  185, 160, 185, 185, 185, 185, 185, 185, 185, 185,
1150  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1151  185, 185, 185, 185, 160, 170, 161, 161, 181, 189,
1152  181, 161, 190, 163, 168, 164, 164, 181, 181, 188,
1153  161, 161, 163, 168, 163, 168, 164, 164, 188, 161,
1154  161, 168
1155 };
1156 
1157  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1158 static const yytype_uint8 yyr1[] =
1159 {
1160  0, 171, 172, 173, 173, 173, 173, 173, 173, 173,
1161  173, 173, 173, 173, 173, 173, 174, 174, 175, 175,
1162  175, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1163  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1164  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1165  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1166  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1167  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1168  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1169  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1170  176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
1171  176, 176, 176, 176, 176, 176, 177, 177, 178, 178,
1172  178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1173  178, 178, 178, 178, 178, 178, 178, 178, 179, 180,
1174  180, 181, 181, 182, 182, 183, 183, 184, 184, 184,
1175  184, 184, 184, 184, 184, 184, 185, 185, 186, 186,
1176  186, 186, 186, 186, 186, 187, 187, 187, 187, 187,
1177  187, 188, 188, 189, 189, 189, 189, 189, 189, 190,
1178  190, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1179  191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1180  191, 192, 192, 192, 192, 192, 192, 193, 193, 193,
1181  193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
1182  193, 194, 194, 195, 195, 195, 195, 196, 196
1183 };
1184 
1185  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1186 static const yytype_uint8 yyr2[] =
1187 {
1188  0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1189  1, 1, 1, 1, 1, 1, 0, 2, 1, 2,
1190  2, 5, 1, 5, 5, 5, 5, 5, 5, 5,
1191  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
1192  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
1193  5, 5, 5, 3, 4, 4, 5, 3, 4, 4,
1194  3, 4, 4, 10, 10, 4, 2, 1, 2, 3,
1195  1, 1, 1, 3, 2, 2, 2, 2, 1, 1,
1196  2, 5, 5, 5, 5, 5, 5, 5, 3, 5,
1197  2, 3, 3, 5, 5, 5, 5, 5, 5, 5,
1198  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
1199  5, 5, 5, 5, 5, 1, 2, 2, 1, 1,
1200  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1201  1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
1202  2, 0, 2, 1, 2, 0, 2, 1, 1, 1,
1203  1, 1, 1, 1, 1, 1, 1, 3, 3, 4,
1204  4, 5, 5, 6, 3, 0, 3, 4, 6, 6,
1205  8, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1206  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1207  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1208  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1209  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1210  1, 1, 1, 1, 1, 1, 1, 4, 5
1211 };
1212 
1213 
1214 #define yyerrok (yyerrstatus = 0)
1215 #define yyclearin (yychar = YYEMPTY)
1216 #define YYEMPTY (-2)
1217 #define YYEOF 0
1218 
1219 #define YYACCEPT goto yyacceptlab
1220 #define YYABORT goto yyabortlab
1221 #define YYERROR goto yyerrorlab
1222 
1223 
1224 #define YYRECOVERING() (!!yyerrstatus)
1225 
1226 #define YYBACKUP(Token, Value) \
1227  do \
1228  if (yychar == YYEMPTY) \
1229  { \
1230  yychar = (Token); \
1231  yylval = (Value); \
1232  YYPOPSTACK (yylen); \
1233  yystate = *yyssp; \
1234  goto yybackup; \
1235  } \
1236  else \
1237  { \
1238  yyerror (YY_("syntax error: cannot back up")); \
1239  YYERROR; \
1240  } \
1241  while (0)
1242 
1243 /* Error token number */
1244 #define YYTERROR 1
1245 #define YYERRCODE 256
1246 
1247 
1248 
1249 /* Enable debugging if requested. */
1250 #if YYDEBUG
1251 
1252 # ifndef YYFPRINTF
1253 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1254 # define YYFPRINTF fprintf
1255 # endif
1256 
1257 # define YYDPRINTF(Args) \
1258 do { \
1259  if (yydebug) \
1260  YYFPRINTF Args; \
1261 } while (0)
1262 
1263 /* This macro is provided for backward compatibility. */
1264 #ifndef YY_LOCATION_PRINT
1265 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1266 #endif
1267 
1268 
1269 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1270 do { \
1271  if (yydebug) \
1272  { \
1273  YYFPRINTF (stderr, "%s ", Title); \
1274  yy_symbol_print (stderr, \
1275  Type, Value); \
1276  YYFPRINTF (stderr, "\n"); \
1277  } \
1278 } while (0)
1279 
1280 
1281 /*-----------------------------------.
1282 | Print this symbol's value on YYO. |
1283 `-----------------------------------*/
1284 
1285 static void
1286 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1287 {
1288  FILE *yyoutput = yyo;
1289  YYUSE (yyoutput);
1290  if (!yyvaluep)
1291  return;
1292 # ifdef YYPRINT
1293  if (yytype < YYNTOKENS)
1294  YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1295 # endif
1296  YYUSE (yytype);
1297 }
1298 
1299 
1300 /*---------------------------.
1301 | Print this symbol on YYO. |
1302 `---------------------------*/
1303 
1304 static void
1305 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1306 {
1307  YYFPRINTF (yyo, "%s %s (",
1308  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1309 
1310  yy_symbol_value_print (yyo, yytype, yyvaluep);
1311  YYFPRINTF (yyo, ")");
1312 }
1313 
1314 /*------------------------------------------------------------------.
1315 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1316 | TOP (included). |
1317 `------------------------------------------------------------------*/
1318 
1319 static void
1320 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1321 {
1322  YYFPRINTF (stderr, "Stack now");
1323  for (; yybottom <= yytop; yybottom++)
1324  {
1325  int yybot = *yybottom;
1326  YYFPRINTF (stderr, " %d", yybot);
1327  }
1328  YYFPRINTF (stderr, "\n");
1329 }
1330 
1331 # define YY_STACK_PRINT(Bottom, Top) \
1332 do { \
1333  if (yydebug) \
1334  yy_stack_print ((Bottom), (Top)); \
1335 } while (0)
1336 
1337 
1338 /*------------------------------------------------.
1339 | Report that the YYRULE is going to be reduced. |
1340 `------------------------------------------------*/
1341 
1342 static void
1343 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1344 {
1345  unsigned long yylno = yyrline[yyrule];
1346  int yynrhs = yyr2[yyrule];
1347  int yyi;
1348  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1349  yyrule - 1, yylno);
1350  /* The symbols being reduced. */
1351  for (yyi = 0; yyi < yynrhs; yyi++)
1352  {
1353  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1354  yy_symbol_print (stderr,
1355  yystos[yyssp[yyi + 1 - yynrhs]],
1356  &yyvsp[(yyi + 1) - (yynrhs)]
1357  );
1358  YYFPRINTF (stderr, "\n");
1359  }
1360 }
1361 
1362 # define YY_REDUCE_PRINT(Rule) \
1363 do { \
1364  if (yydebug) \
1365  yy_reduce_print (yyssp, yyvsp, Rule); \
1366 } while (0)
1367 
1368 /* Nonzero means print parse trace. It is left uninitialized so that
1369  multiple parsers can coexist. */
1370 int yydebug;
1371 #else /* !YYDEBUG */
1372 # define YYDPRINTF(Args)
1373 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1374 # define YY_STACK_PRINT(Bottom, Top)
1375 # define YY_REDUCE_PRINT(Rule)
1376 #endif /* !YYDEBUG */
1377 
1378 
1379 /* YYINITDEPTH -- initial size of the parser's stacks. */
1380 #ifndef YYINITDEPTH
1381 # define YYINITDEPTH 200
1382 #endif
1383 
1384 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1385  if the built-in stack extension method is used).
1386 
1387  Do not make this value too large; the results are undefined if
1388  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1389  evaluated with infinite-precision integer arithmetic. */
1390 
1391 #ifndef YYMAXDEPTH
1392 # define YYMAXDEPTH 10000
1393 #endif
1394 
1395 
1396 #if YYERROR_VERBOSE
1397 
1398 # ifndef yystrlen
1399 # if defined __GLIBC__ && defined _STRING_H
1400 # define yystrlen strlen
1401 # else
1402 /* Return the length of YYSTR. */
1403 static YYSIZE_T
1404 yystrlen (const char *yystr)
1405 {
1406  YYSIZE_T yylen;
1407  for (yylen = 0; yystr[yylen]; yylen++)
1408  continue;
1409  return yylen;
1410 }
1411 # endif
1412 # endif
1413 
1414 # ifndef yystpcpy
1415 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1416 # define yystpcpy stpcpy
1417 # else
1418 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1419  YYDEST. */
1420 static char *
1421 yystpcpy (char *yydest, const char *yysrc)
1422 {
1423  char *yyd = yydest;
1424  const char *yys = yysrc;
1425 
1426  while ((*yyd++ = *yys++) != '\0')
1427  continue;
1428 
1429  return yyd - 1;
1430 }
1431 # endif
1432 # endif
1433 
1434 # ifndef yytnamerr
1435 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1436  quotes and backslashes, so that it's suitable for yyerror. The
1437  heuristic is that double-quoting is unnecessary unless the string
1438  contains an apostrophe, a comma, or backslash (other than
1439  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1440  null, do not copy; instead, return the length of what the result
1441  would have been. */
1442 static YYSIZE_T
1443 yytnamerr (char *yyres, const char *yystr)
1444 {
1445  if (*yystr == '"')
1446  {
1447  YYSIZE_T yyn = 0;
1448  char const *yyp = yystr;
1449 
1450  for (;;)
1451  switch (*++yyp)
1452  {
1453  case '\'':
1454  case ',':
1455  goto do_not_strip_quotes;
1456 
1457  case '\\':
1458  if (*++yyp != '\\')
1459  goto do_not_strip_quotes;
1460  else
1461  goto append;
1462 
1463  append:
1464  default:
1465  if (yyres)
1466  yyres[yyn] = *yyp;
1467  yyn++;
1468  break;
1469 
1470  case '"':
1471  if (yyres)
1472  yyres[yyn] = '\0';
1473  return yyn;
1474  }
1475  do_not_strip_quotes: ;
1476  }
1477 
1478  if (! yyres)
1479  return yystrlen (yystr);
1480 
1481  return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1482 }
1483 # endif
1484 
1485 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1486  about the unexpected token YYTOKEN for the state stack whose top is
1487  YYSSP.
1488 
1489  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1490  not large enough to hold the message. In that case, also set
1491  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1492  required number of bytes is too large to store. */
1493 static int
1494 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1495  yytype_int16 *yyssp, int yytoken)
1496 {
1497  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1498  YYSIZE_T yysize = yysize0;
1499  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1500  /* Internationalized format string. */
1501  const char *yyformat = YY_NULLPTR;
1502  /* Arguments of yyformat. */
1503  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1504  /* Number of reported tokens (one for the "unexpected", one per
1505  "expected"). */
1506  int yycount = 0;
1507 
1508  /* There are many possibilities here to consider:
1509  - If this state is a consistent state with a default action, then
1510  the only way this function was invoked is if the default action
1511  is an error action. In that case, don't check for expected
1512  tokens because there are none.
1513  - The only way there can be no lookahead present (in yychar) is if
1514  this state is a consistent state with a default action. Thus,
1515  detecting the absence of a lookahead is sufficient to determine
1516  that there is no unexpected or expected token to report. In that
1517  case, just report a simple "syntax error".
1518  - Don't assume there isn't a lookahead just because this state is a
1519  consistent state with a default action. There might have been a
1520  previous inconsistent state, consistent state with a non-default
1521  action, or user semantic action that manipulated yychar.
1522  - Of course, the expected token list depends on states to have
1523  correct lookahead information, and it depends on the parser not
1524  to perform extra reductions after fetching a lookahead from the
1525  scanner and before detecting a syntax error. Thus, state merging
1526  (from LALR or IELR) and default reductions corrupt the expected
1527  token list. However, the list is correct for canonical LR with
1528  one exception: it will still contain any token that will not be
1529  accepted due to an error action in a later state.
1530  */
1531  if (yytoken != YYEMPTY)
1532  {
1533  int yyn = yypact[*yyssp];
1534  yyarg[yycount++] = yytname[yytoken];
1535  if (!yypact_value_is_default (yyn))
1536  {
1537  /* Start YYX at -YYN if negative to avoid negative indexes in
1538  YYCHECK. In other words, skip the first -YYN actions for
1539  this state because they are default actions. */
1540  int yyxbegin = yyn < 0 ? -yyn : 0;
1541  /* Stay within bounds of both yycheck and yytname. */
1542  int yychecklim = YYLAST - yyn + 1;
1543  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1544  int yyx;
1545 
1546  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1547  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1548  && !yytable_value_is_error (yytable[yyx + yyn]))
1549  {
1550  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1551  {
1552  yycount = 1;
1553  yysize = yysize0;
1554  break;
1555  }
1556  yyarg[yycount++] = yytname[yyx];
1557  {
1558  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1559  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1560  yysize = yysize1;
1561  else
1562  return 2;
1563  }
1564  }
1565  }
1566  }
1567 
1568  switch (yycount)
1569  {
1570 # define YYCASE_(N, S) \
1571  case N: \
1572  yyformat = S; \
1573  break
1574  default: /* Avoid compiler warnings. */
1575  YYCASE_(0, YY_("syntax error"));
1576  YYCASE_(1, YY_("syntax error, unexpected %s"));
1577  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1578  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1579  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1580  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1581 # undef YYCASE_
1582  }
1583 
1584  {
1585  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1586  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1587  yysize = yysize1;
1588  else
1589  return 2;
1590  }
1591 
1592  if (*yymsg_alloc < yysize)
1593  {
1594  *yymsg_alloc = 2 * yysize;
1595  if (! (yysize <= *yymsg_alloc
1596  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1597  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1598  return 1;
1599  }
1600 
1601  /* Avoid sprintf, as that infringes on the user's name space.
1602  Don't have undefined behavior even if the translation
1603  produced a string with the wrong number of "%s"s. */
1604  {
1605  char *yyp = *yymsg;
1606  int yyi = 0;
1607  while ((*yyp = *yyformat) != '\0')
1608  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1609  {
1610  yyp += yytnamerr (yyp, yyarg[yyi++]);
1611  yyformat += 2;
1612  }
1613  else
1614  {
1615  yyp++;
1616  yyformat++;
1617  }
1618  }
1619  return 0;
1620 }
1621 #endif /* YYERROR_VERBOSE */
1622 
1623 /*-----------------------------------------------.
1624 | Release the memory associated to this symbol. |
1625 `-----------------------------------------------*/
1626 
1627 static void
1628 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1629 {
1630  YYUSE (yyvaluep);
1631  if (!yymsg)
1632  yymsg = "Deleting";
1633  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1634 
1636  YYUSE (yytype);
1638 }
1639 
1640 
1641 
1642 
1643 /* The lookahead symbol. */
1645 
1646 /* The semantic value of the lookahead symbol. */
1648 /* Number of syntax errors so far. */
1650 
1651 
1652 /*----------.
1653 | yyparse. |
1654 `----------*/
1655 
1656 int
1657 yyparse (void)
1658 {
1659  int yystate;
1660  /* Number of tokens to shift before error messages enabled. */
1661  int yyerrstatus;
1662 
1663  /* The stacks and their tools:
1664  'yyss': related to states.
1665  'yyvs': related to semantic values.
1666 
1667  Refer to the stacks through separate pointers, to allow yyoverflow
1668  to reallocate them elsewhere. */
1669 
1670  /* The state stack. */
1671  yytype_int16 yyssa[YYINITDEPTH];
1672  yytype_int16 *yyss;
1673  yytype_int16 *yyssp;
1674 
1675  /* The semantic value stack. */
1676  YYSTYPE yyvsa[YYINITDEPTH];
1677  YYSTYPE *yyvs;
1678  YYSTYPE *yyvsp;
1679 
1680  YYSIZE_T yystacksize;
1681 
1682  int yyn;
1683  int yyresult;
1684  /* Lookahead token as an internal (translated) token number. */
1685  int yytoken = 0;
1686  /* The variables used to return semantic value and location from the
1687  action routines. */
1688  YYSTYPE yyval;
1689 
1690 #if YYERROR_VERBOSE
1691  /* Buffer for error messages, and its allocated size. */
1692  char yymsgbuf[128];
1693  char *yymsg = yymsgbuf;
1694  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1695 #endif
1696 
1697 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1698 
1699  /* The number of symbols on the RHS of the reduced rule.
1700  Keep to zero when no symbol should be popped. */
1701  int yylen = 0;
1702 
1703  yyssp = yyss = yyssa;
1704  yyvsp = yyvs = yyvsa;
1705  yystacksize = YYINITDEPTH;
1706 
1707  YYDPRINTF ((stderr, "Starting parse\n"));
1708 
1709  yystate = 0;
1710  yyerrstatus = 0;
1711  yynerrs = 0;
1712  yychar = YYEMPTY; /* Cause a token to be read. */
1713  goto yysetstate;
1714 
1715 
1716 /*------------------------------------------------------------.
1717 | yynewstate -- push a new state, which is found in yystate. |
1718 `------------------------------------------------------------*/
1719 yynewstate:
1720  /* In all cases, when you get here, the value and location stacks
1721  have just been pushed. So pushing a state here evens the stacks. */
1722  yyssp++;
1723 
1724 
1725 /*--------------------------------------------------------------------.
1726 | yynewstate -- set current state (the top of the stack) to yystate. |
1727 `--------------------------------------------------------------------*/
1728 yysetstate:
1729  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1730  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1731  *yyssp = (yytype_int16) yystate;
1732 
1733  if (yyss + yystacksize - 1 <= yyssp)
1734 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1735  goto yyexhaustedlab;
1736 #else
1737  {
1738  /* Get the current used size of the three stacks, in elements. */
1739  YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1740 
1741 # if defined yyoverflow
1742  {
1743  /* Give user a chance to reallocate the stack. Use copies of
1744  these so that the &'s don't force the real ones into
1745  memory. */
1746  YYSTYPE *yyvs1 = yyvs;
1747  yytype_int16 *yyss1 = yyss;
1748 
1749  /* Each stack pointer address is followed by the size of the
1750  data in use in that stack, in bytes. This used to be a
1751  conditional around just the two extra args, but that might
1752  be undefined if yyoverflow is a macro. */
1753  yyoverflow (YY_("memory exhausted"),
1754  &yyss1, yysize * sizeof (*yyssp),
1755  &yyvs1, yysize * sizeof (*yyvsp),
1756  &yystacksize);
1757  yyss = yyss1;
1758  yyvs = yyvs1;
1759  }
1760 # else /* defined YYSTACK_RELOCATE */
1761  /* Extend the stack our own way. */
1762  if (YYMAXDEPTH <= yystacksize)
1763  goto yyexhaustedlab;
1764  yystacksize *= 2;
1765  if (YYMAXDEPTH < yystacksize)
1766  yystacksize = YYMAXDEPTH;
1767 
1768  {
1769  yytype_int16 *yyss1 = yyss;
1770  union yyalloc *yyptr =
1771  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1772  if (! yyptr)
1773  goto yyexhaustedlab;
1774  YYSTACK_RELOCATE (yyss_alloc, yyss);
1775  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1776 # undef YYSTACK_RELOCATE
1777  if (yyss1 != yyssa)
1778  YYSTACK_FREE (yyss1);
1779  }
1780 # endif
1781 
1782  yyssp = yyss + yysize - 1;
1783  yyvsp = yyvs + yysize - 1;
1784 
1785  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1786  (unsigned long) yystacksize));
1787 
1788  if (yyss + yystacksize - 1 <= yyssp)
1789  YYABORT;
1790  }
1791 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1792 
1793  if (yystate == YYFINAL)
1794  YYACCEPT;
1795 
1796  goto yybackup;
1797 
1798 
1799 /*-----------.
1800 | yybackup. |
1801 `-----------*/
1802 yybackup:
1803  /* Do appropriate processing given the current state. Read a
1804  lookahead token if we need one and don't already have one. */
1805 
1806  /* First try to decide what to do without reference to lookahead token. */
1807  yyn = yypact[yystate];
1808  if (yypact_value_is_default (yyn))
1809  goto yydefault;
1810 
1811  /* Not known => get a lookahead token if don't already have one. */
1812 
1813  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1814  if (yychar == YYEMPTY)
1815  {
1816  YYDPRINTF ((stderr, "Reading a token: "));
1817  yychar = yylex ();
1818  }
1819 
1820  if (yychar <= YYEOF)
1821  {
1822  yychar = yytoken = YYEOF;
1823  YYDPRINTF ((stderr, "Now at end of input.\n"));
1824  }
1825  else
1826  {
1827  yytoken = YYTRANSLATE (yychar);
1828  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1829  }
1830 
1831  /* If the proper action on seeing token YYTOKEN is to reduce or to
1832  detect an error, take that action. */
1833  yyn += yytoken;
1834  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1835  goto yydefault;
1836  yyn = yytable[yyn];
1837  if (yyn <= 0)
1838  {
1839  if (yytable_value_is_error (yyn))
1840  goto yyerrlab;
1841  yyn = -yyn;
1842  goto yyreduce;
1843  }
1844 
1845  /* Count tokens shifted since error; after three, turn off error
1846  status. */
1847  if (yyerrstatus)
1848  yyerrstatus--;
1849 
1850  /* Shift the lookahead token. */
1851  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1852 
1853  /* Discard the shifted token. */
1854  yychar = YYEMPTY;
1855 
1856  yystate = yyn;
1858  *++yyvsp = yylval;
1860  goto yynewstate;
1861 
1862 
1863 /*-----------------------------------------------------------.
1864 | yydefault -- do the default action for the current state. |
1865 `-----------------------------------------------------------*/
1866 yydefault:
1867  yyn = yydefact[yystate];
1868  if (yyn == 0)
1869  goto yyerrlab;
1870  goto yyreduce;
1871 
1872 
1873 /*-----------------------------.
1874 | yyreduce -- do a reduction. |
1875 `-----------------------------*/
1876 yyreduce:
1877  /* yyn is the number of a rule to reduce with. */
1878  yylen = yyr2[yyn];
1879 
1880  /* If YYLEN is nonzero, implement the default value of the action:
1881  '$$ = $1'.
1882 
1883  Otherwise, the following line sets YYVAL to garbage.
1884  This behavior is undocumented and Bison
1885  users should not rely upon it. Assigning to YYVAL
1886  unconditionally makes the parser a bit smaller, and it avoids a
1887  GCC warning that YYVAL may be used uninitialized. */
1888  yyval = yyvsp[1-yylen];
1889 
1890 
1891  YY_REDUCE_PRINT (yyn);
1892  switch (yyn)
1893  {
1894  case 2:
1895 #line 310 "asmshader.y"
1896  {
1897  asm_ctx.funcs->end(&asm_ctx);
1898  }
1899 #line 1900 "asmshader.tab.c"
1900  break;
1901 
1902  case 3:
1903 #line 315 "asmshader.y"
1904  {
1905  TRACE("Vertex shader 1.0\n");
1907  }
1908 #line 1909 "asmshader.tab.c"
1909  break;
1910 
1911  case 4:
1912 #line 320 "asmshader.y"
1913  {
1914  TRACE("Vertex shader 1.1\n");
1916  }
1917 #line 1918 "asmshader.tab.c"
1918  break;
1919 
1920  case 5:
1921 #line 325 "asmshader.y"
1922  {
1923  TRACE("Vertex shader 2.0\n");
1925  }
1926 #line 1927 "asmshader.tab.c"
1927  break;
1928 
1929  case 6:
1930 #line 330 "asmshader.y"
1931  {
1932  TRACE("Vertex shader 2.x\n");
1934  }
1935 #line 1936 "asmshader.tab.c"
1936  break;
1937 
1938  case 7:
1939 #line 335 "asmshader.y"
1940  {
1941  TRACE("Vertex shader 3.0\n");
1943  }
1944 #line 1945 "asmshader.tab.c"
1945  break;
1946 
1947  case 8:
1948 #line 340 "asmshader.y"
1949  {
1950  TRACE("Pixel shader 1.0\n");
1952  }
1953 #line 1954 "asmshader.tab.c"
1954  break;
1955 
1956  case 9:
1957 #line 345 "asmshader.y"
1958  {
1959  TRACE("Pixel shader 1.1\n");
1961  }
1962 #line 1963 "asmshader.tab.c"
1963  break;
1964 
1965  case 10:
1966 #line 350 "asmshader.y"
1967  {
1968  TRACE("Pixel shader 1.2\n");
1970  }
1971 #line 1972 "asmshader.tab.c"
1972  break;
1973 
1974  case 11:
1975 #line 355 "asmshader.y"
1976  {
1977  TRACE("Pixel shader 1.3\n");
1979  }
1980 #line 1981 "asmshader.tab.c"
1981  break;
1982 
1983  case 12:
1984 #line 360 "asmshader.y"
1985  {
1986  TRACE("Pixel shader 1.4\n");
1988  }
1989 #line 1990 "asmshader.tab.c"
1990  break;
1991 
1992  case 13:
1993 #line 365 "asmshader.y"
1994  {
1995  TRACE("Pixel shader 2.0\n");
1997  }
1998 #line 1999 "asmshader.tab.c"
1999  break;
2000 
2001  case 14:
2002 #line 370 "asmshader.y"
2003  {
2004  TRACE("Pixel shader 2.x\n");
2006  }
2007 #line 2008 "asmshader.tab.c"
2008  break;
2009 
2010  case 15:
2011 #line 375 "asmshader.y"
2012  {
2013  TRACE("Pixel shader 3.0\n");
2015  }
2016 #line 2017 "asmshader.tab.c"
2017  break;
2018 
2019  case 17:
2020 #line 382 "asmshader.y"
2021  {
2022  /* Nothing to do */
2023  }
2024 #line 2025 "asmshader.tab.c"
2025  break;
2026 
2027  case 18:
2028 #line 387 "asmshader.y"
2029  {
2030 
2031  }
2032 #line 2033 "asmshader.tab.c"
2033  break;
2034 
2035  case 19:
2036 #line 391 "asmshader.y"
2037  {
2038  TRACE("predicate\n");
2039  asm_ctx.funcs->predicate(&asm_ctx, &(yyvsp[-1].reg));
2040  }
2041 #line 2042 "asmshader.tab.c"
2042  break;
2043 
2044  case 20:
2045 #line 396 "asmshader.y"
2046  {
2047  TRACE("coissue\n");
2048  asm_ctx.funcs->coissue(&asm_ctx);
2049  }
2050 #line 2051 "asmshader.tab.c"
2051  break;
2052 
2053  case 21:
2054 #line 402 "asmshader.y"
2055  {
2056  TRACE("ADD\n");
2057  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ADD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2058  }
2059 #line 2060 "asmshader.tab.c"
2060  break;
2061 
2062  case 22:
2063 #line 407 "asmshader.y"
2064  {
2065  TRACE("NOP\n");
2066  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_NOP, 0, 0, 0, 0, 0, 0);
2067  }
2068 #line 2069 "asmshader.tab.c"
2069  break;
2070 
2071  case 23:
2072 #line 412 "asmshader.y"
2073  {
2074  TRACE("MOV\n");
2075  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MOV, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2076  }
2077 #line 2078 "asmshader.tab.c"
2078  break;
2079 
2080  case 24:
2081 #line 417 "asmshader.y"
2082  {
2083  TRACE("SUB\n");
2084  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SUB, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2085  }
2086 #line 2087 "asmshader.tab.c"
2087  break;
2088 
2089  case 25:
2090 #line 422 "asmshader.y"
2091  {
2092  TRACE("MAD\n");
2093  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MAD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 3);
2094  }
2095 #line 2096 "asmshader.tab.c"
2096  break;
2097 
2098  case 26:
2099 #line 427 "asmshader.y"
2100  {
2101  TRACE("MUL\n");
2102  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MUL, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2103  }
2104 #line 2105 "asmshader.tab.c"
2105  break;
2106 
2107  case 27:
2108 #line 432 "asmshader.y"
2109  {
2110  TRACE("RCP\n");
2111  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RCP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2112  }
2113 #line 2114 "asmshader.tab.c"
2114  break;
2115 
2116  case 28:
2117 #line 437 "asmshader.y"
2118  {
2119  TRACE("RSQ\n");
2120  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RSQ, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2121  }
2122 #line 2123 "asmshader.tab.c"
2123  break;
2124 
2125  case 29:
2126 #line 442 "asmshader.y"
2127  {
2128  TRACE("DP3\n");
2129  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP3, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2130  }
2131 #line 2132 "asmshader.tab.c"
2132  break;
2133 
2134  case 30:
2135 #line 447 "asmshader.y"
2136  {
2137  TRACE("DP4\n");
2138  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP4, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2139  }
2140 #line 2141 "asmshader.tab.c"
2141  break;
2142 
2143  case 31:
2144 #line 452 "asmshader.y"
2145  {
2146  TRACE("MIN\n");
2147  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MIN, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2148  }
2149 #line 2150 "asmshader.tab.c"
2150  break;
2151 
2152  case 32:
2153 #line 457 "asmshader.y"
2154  {
2155  TRACE("MAX\n");
2156  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MAX, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2157  }
2158 #line 2159 "asmshader.tab.c"
2159  break;
2160 
2161  case 33:
2162 #line 462 "asmshader.y"
2163  {
2164  TRACE("SLT\n");
2165  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SLT, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2166  }
2167 #line 2168 "asmshader.tab.c"
2168  break;
2169 
2170  case 34:
2171 #line 467 "asmshader.y"
2172  {
2173  TRACE("SGE\n");
2174  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SGE, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2175  }
2176 #line 2177 "asmshader.tab.c"
2177  break;
2178 
2179  case 35:
2180 #line 472 "asmshader.y"
2181  {
2182  TRACE("ABS\n");
2183  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ABS, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2184  }
2185 #line 2186 "asmshader.tab.c"
2186  break;
2187 
2188  case 36:
2189 #line 477 "asmshader.y"
2190  {
2191  TRACE("EXP\n");
2192  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_EXP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2193  }
2194 #line 2195 "asmshader.tab.c"
2195  break;
2196 
2197  case 37:
2198 #line 482 "asmshader.y"
2199  {
2200  TRACE("LOG\n");
2201  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOG, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2202  }
2203 #line 2204 "asmshader.tab.c"
2204  break;
2205 
2206  case 38:
2207 #line 487 "asmshader.y"
2208  {
2209  TRACE("LOGP\n");
2210  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOGP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2211  }
2212 #line 2213 "asmshader.tab.c"
2213  break;
2214 
2215  case 39:
2216 #line 492 "asmshader.y"
2217  {
2218  TRACE("EXPP\n");
2219  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_EXPP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2220  }
2221 #line 2222 "asmshader.tab.c"
2222  break;
2223 
2224  case 40:
2225 #line 497 "asmshader.y"
2226  {
2227  TRACE("DST\n");
2228  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DST, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2229  }
2230 #line 2231 "asmshader.tab.c"
2231  break;
2232 
2233  case 41:
2234 #line 502 "asmshader.y"
2235  {
2236  TRACE("LRP\n");
2237  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LRP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 3);
2238  }
2239 #line 2240 "asmshader.tab.c"
2240  break;
2241 
2242  case 42:
2243 #line 507 "asmshader.y"
2244  {
2245  TRACE("FRC\n");
2246  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_FRC, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2247  }
2248 #line 2249 "asmshader.tab.c"
2249  break;
2250 
2251  case 43:
2252 #line 512 "asmshader.y"
2253  {
2254  TRACE("POW\n");
2255  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_POW, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2256  }
2257 #line 2258 "asmshader.tab.c"
2258  break;
2259 
2260  case 44:
2261 #line 517 "asmshader.y"
2262  {
2263  TRACE("CRS\n");
2264  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CRS, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2265  }
2266 #line 2267 "asmshader.tab.c"
2267  break;
2268 
2269  case 45:
2270 #line 522 "asmshader.y"
2271  {
2272  TRACE("SGN\n");
2273  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SGN, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 3);
2274  }
2275 #line 2276 "asmshader.tab.c"
2276  break;
2277 
2278  case 46:
2279 #line 527 "asmshader.y"
2280  {
2281  TRACE("NRM\n");
2282  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_NRM, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2283  }
2284 #line 2285 "asmshader.tab.c"
2285  break;
2286 
2287  case 47:
2288 #line 532 "asmshader.y"
2289  {
2290  TRACE("SINCOS\n");
2291  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SINCOS, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2292  }
2293 #line 2294 "asmshader.tab.c"
2294  break;
2295 
2296  case 48:
2297 #line 537 "asmshader.y"
2298  {
2299  TRACE("M4x4\n");
2300  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M4x4, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2301  }
2302 #line 2303 "asmshader.tab.c"
2303  break;
2304 
2305  case 49:
2306 #line 542 "asmshader.y"
2307  {
2308  TRACE("M4x3\n");
2309  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M4x3, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2310  }
2311 #line 2312 "asmshader.tab.c"
2312  break;
2313 
2314  case 50:
2315 #line 547 "asmshader.y"
2316  {
2317  TRACE("M3x4\n");
2318  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x4, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2319  }
2320 #line 2321 "asmshader.tab.c"
2321  break;
2322 
2323  case 51:
2324 #line 552 "asmshader.y"
2325  {
2326  TRACE("M3x3\n");
2327  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x3, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2328  }
2329 #line 2330 "asmshader.tab.c"
2330  break;
2331 
2332  case 52:
2333 #line 557 "asmshader.y"
2334  {
2335  TRACE("M3x2\n");
2336  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x2, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2337  }
2338 #line 2339 "asmshader.tab.c"
2339  break;
2340 
2341  case 53:
2342 #line 562 "asmshader.y"
2343  {
2344  struct shader_reg reg;
2345  TRACE("Output reg declaration\n");
2346  ZeroMemory(&reg, sizeof(reg));
2347  reg.type = BWRITERSPR_OUTPUT;
2348  reg.regnum = (yyvsp[0].regnum);
2349  reg.rel_reg = NULL;
2350  reg.srcmod = 0;
2351  reg.u.writemask = BWRITERSP_WRITEMASK_ALL;
2352  asm_ctx.funcs->dcl_output(&asm_ctx, (yyvsp[-1].declaration).dclusage, (yyvsp[-1].declaration).regnum, &reg);
2353  }
2354 #line 2355 "asmshader.tab.c"
2355  break;
2356 
2357  case 54:
2358 #line 574 "asmshader.y"
2359  {
2360  struct shader_reg reg;
2361  TRACE("Output reg declaration\n");
2362  ZeroMemory(&reg, sizeof(reg));
2363  reg.type = BWRITERSPR_OUTPUT;
2364  reg.regnum = (yyvsp[-1].regnum);
2365  reg.rel_reg = NULL;
2366  reg.srcmod = 0;
2367  reg.u.writemask = (yyvsp[0].writemask);
2368  asm_ctx.funcs->dcl_output(&asm_ctx, (yyvsp[-2].declaration).dclusage, (yyvsp[-2].declaration).regnum, &reg);
2369  }
2370 #line 2371 "asmshader.tab.c"
2371  break;
2372 
2373  case 55:
2374 #line 586 "asmshader.y"
2375  {
2376  struct shader_reg reg;
2377  TRACE("Input reg declaration\n");
2378  if((yyvsp[-1].modshift).shift != 0) {
2379  asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
2380  asm_ctx.line_no);
2382  }
2383  if(asm_ctx.shader->version == BWRITERPS_VERSION(2, 0) ||
2384  asm_ctx.shader->version == BWRITERPS_VERSION(2, 1)) {
2385  asmparser_message(&asm_ctx, "Line %u: Declaration not supported in PS 2\n",
2386  asm_ctx.line_no);
2388  }
2389  ZeroMemory(&reg, sizeof(reg));
2390  reg.type = (yyvsp[0].reg).type;
2391  reg.regnum = (yyvsp[0].reg).regnum;
2392  reg.rel_reg = NULL;
2393  reg.srcmod = 0;
2394  reg.u.writemask = BWRITERSP_WRITEMASK_ALL;
2395  asm_ctx.funcs->dcl_input(&asm_ctx, (yyvsp[-2].declaration).dclusage, (yyvsp[-2].declaration).regnum, (yyvsp[-1].modshift).mod, &reg);
2396  }
2397 #line 2398 "asmshader.tab.c"
2398  break;
2399 
2400  case 56:
2401 #line 609 "asmshader.y"
2402  {
2403  struct shader_reg reg;
2404  TRACE("Input reg declaration\n");
2405  if((yyvsp[-2].modshift).shift != 0) {
2406  asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
2407  asm_ctx.line_no);
2409  }
2410  if(asm_ctx.shader->version == BWRITERPS_VERSION(2, 0) ||
2411  asm_ctx.shader->version == BWRITERPS_VERSION(2, 1)) {
2412  asmparser_message(&asm_ctx, "Line %u: Declaration not supported in PS 2\n",
2413  asm_ctx.line_no);
2415  }
2416  ZeroMemory(&reg, sizeof(reg));
2417  reg.type = (yyvsp[-1].reg).type;
2418  reg.regnum = (yyvsp[-1].reg).regnum;
2419  reg.rel_reg = NULL;
2420  reg.srcmod = 0;
2421  reg.u.writemask = (yyvsp[0].writemask);
2422  asm_ctx.funcs->dcl_input(&asm_ctx, (yyvsp[-3].declaration).dclusage, (yyvsp[-3].declaration).regnum, (yyvsp[-2].modshift).mod, &reg);
2423  }
2424 #line 2425 "asmshader.tab.c"
2425  break;
2426 
2427  case 57:
2428 #line 632 "asmshader.y"
2429  {
2430  struct shader_reg reg;
2431  TRACE("Input reg declaration\n");
2432  if((yyvsp[-1].modshift).shift != 0) {
2433  asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
2434  asm_ctx.line_no);
2436  }
2437  if(asm_ctx.shader->type != ST_PIXEL) {
2438  asmparser_message(&asm_ctx, "Line %u: Declaration needs a semantic\n",
2439  asm_ctx.line_no);
2441  }
2442  ZeroMemory(&reg, sizeof(reg));
2443  reg.type = (yyvsp[0].reg).type;
2444  reg.regnum = (yyvsp[0].reg).regnum;
2445  reg.rel_reg = NULL;
2446  reg.srcmod = 0;
2447  reg.u.writemask = BWRITERSP_WRITEMASK_ALL;
2448  asm_ctx.funcs->dcl_input(&asm_ctx, 0, 0, (yyvsp[-1].modshift).mod, &reg);
2449  }
2450 #line 2451 "asmshader.tab.c"
2451  break;
2452 
2453  case 58:
2454 #line 654 "asmshader.y"
2455  {
2456  struct shader_reg reg;
2457  TRACE("Input reg declaration\n");
2458  if((yyvsp[-2].modshift).shift != 0) {
2459  asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
2460  asm_ctx.line_no);
2462  }
2463  if(asm_ctx.shader->type != ST_PIXEL) {
2464  asmparser_message(&asm_ctx, "Line %u: Declaration needs a semantic\n",
2465  asm_ctx.line_no);
2467  }
2468  ZeroMemory(&reg, sizeof(reg));
2469  reg.type = (yyvsp[-1].reg).type;
2470  reg.regnum = (yyvsp[-1].reg).regnum;
2471  reg.rel_reg = NULL;
2472  reg.srcmod = 0;
2473  reg.u.writemask = (yyvsp[0].writemask);
2474  asm_ctx.funcs->dcl_input(&asm_ctx, 0, 0, (yyvsp[-2].modshift).mod, &reg);
2475  }
2476 #line 2477 "asmshader.tab.c"
2477  break;
2478 
2479  case 59:
2480 #line 676 "asmshader.y"
2481  {
2482  TRACE("Sampler declared\n");
2483  if((yyvsp[-1].modshift).shift != 0) {
2484  asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
2485  asm_ctx.line_no);
2487  }
2488  asm_ctx.funcs->dcl_sampler(&asm_ctx, (yyvsp[-2].samplertype), (yyvsp[-1].modshift).mod, (yyvsp[0].regnum), asm_ctx.line_no);
2489  }
2490 #line 2491 "asmshader.tab.c"
2491  break;
2492 
2493  case 60:
2494 #line 686 "asmshader.y"
2495  {
2496  TRACE("Sampler declared\n");
2497  if((yyvsp[-1].modshift).shift != 0) {
2498  asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
2499  asm_ctx.line_no);
2501  }
2502  if(asm_ctx.shader->type != ST_PIXEL) {
2503  asmparser_message(&asm_ctx, "Line %u: Declaration needs a sampler type\n",
2504  asm_ctx.line_no);
2506  }
2507  asm_ctx.funcs->dcl_sampler(&asm_ctx, BWRITERSTT_UNKNOWN, (yyvsp[-1].modshift).mod, (yyvsp[0].regnum), asm_ctx.line_no);
2508  }
2509 #line 2510 "asmshader.tab.c"
2510  break;
2511 
2512  case 61:
2513 #line 701 "asmshader.y"
2514  {
2515  TRACE("Error rule: sampler decl of input reg\n");
2516  asmparser_message(&asm_ctx, "Line %u: Sampler declarations of input regs is not valid\n",
2517  asm_ctx.line_no);
2519  }
2520 #line 2521 "asmshader.tab.c"
2521  break;
2522 
2523  case 62:
2524 #line 708 "asmshader.y"
2525  {
2526  TRACE("Error rule: sampler decl of output reg\n");
2527  asmparser_message(&asm_ctx, "Line %u: Sampler declarations of output regs is not valid\n",
2528  asm_ctx.line_no);
2530  }
2531 #line 2532 "asmshader.tab.c"
2532  break;
2533 
2534  case 63:
2535 #line 715 "asmshader.y"
2536  {
2537  asm_ctx.funcs->constF(&asm_ctx, (yyvsp[-8].regnum), (yyvsp[-6].immval).val, (yyvsp[-4].immval).val, (yyvsp[-2].immval).val, (yyvsp[0].immval).val);
2538  }
2539 #line 2540 "asmshader.tab.c"
2540  break;
2541 
2542  case 64:
2543 #line 719 "asmshader.y"
2544  {
2545  asm_ctx.funcs->constI(&asm_ctx, (yyvsp[-8].regnum), (yyvsp[-6].immval).val, (yyvsp[-4].immval).val, (yyvsp[-2].immval).val, (yyvsp[0].immval).val);
2546  }
2547 #line 2548 "asmshader.tab.c"
2548  break;
2549 
2550  case 65:
2551 #line 723 "asmshader.y"
2552  {
2553  asm_ctx.funcs->constB(&asm_ctx, (yyvsp[-2].regnum), (yyvsp[0].immbool));
2554  }
2555 #line 2556 "asmshader.tab.c"
2556  break;
2557 
2558  case 66:
2559 #line 727 "asmshader.y"
2560  {
2561  TRACE("REP\n");
2562  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_REP, 0, 0, 0, 0, &(yyvsp[0].sregs), 1);
2563  }
2564 #line 2565 "asmshader.tab.c"
2565  break;
2566 
2567  case 67:
2568 #line 732 "asmshader.y"
2569  {
2570  TRACE("ENDREP\n");
2571  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDREP, 0, 0, 0, 0, 0, 0);
2572  }
2573 #line 2574 "asmshader.tab.c"
2574  break;
2575 
2576  case 68:
2577 #line 737 "asmshader.y"
2578  {
2579  TRACE("IF\n");
2580  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_IF, 0, 0, 0, 0, &(yyvsp[0].sregs), 1);
2581  }
2582 #line 2583 "asmshader.tab.c"
2583  break;
2584 
2585  case 69:
2586 #line 742 "asmshader.y"
2587  {
2588  TRACE("IFC\n");
2589  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_IFC, 0, 0, (yyvsp[-1].comptype), 0, &(yyvsp[0].sregs), 2);
2590  }
2591 #line 2592 "asmshader.tab.c"
2592  break;
2593 
2594  case 70:
2595 #line 747 "asmshader.y"
2596  {
2597  TRACE("ELSE\n");
2598  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ELSE, 0, 0, 0, 0, 0, 0);
2599  }
2600 #line 2601 "asmshader.tab.c"
2601  break;
2602 
2603  case 71:
2604 #line 752 "asmshader.y"
2605  {
2606  TRACE("ENDIF\n");
2607  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDIF, 0, 0, 0, 0, 0, 0);
2608  }
2609 #line 2610 "asmshader.tab.c"
2610  break;
2611 
2612  case 72:
2613 #line 757 "asmshader.y"
2614  {
2615  TRACE("BREAK\n");
2616  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAK, 0, 0, 0, 0, 0, 0);
2617  }
2618 #line 2619 "asmshader.tab.c"
2619  break;
2620 
2621  case 73:
2622 #line 762 "asmshader.y"
2623  {
2624  TRACE("BREAKC\n");
2625  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAKC, 0, 0, (yyvsp[-1].comptype), 0, &(yyvsp[0].sregs), 2);
2626  }
2627 #line 2628 "asmshader.tab.c"
2628  break;
2629 
2630  case 74:
2631 #line 767 "asmshader.y"
2632  {
2633  TRACE("BREAKP\n");
2634  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAKP, 0, 0, 0, 0, &(yyvsp[0].sregs), 1);
2635  }
2636 #line 2637 "asmshader.tab.c"
2637  break;
2638 
2639  case 75:
2640 #line 772 "asmshader.y"
2641  {
2642  TRACE("CALL\n");
2643  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CALL, 0, 0, 0, 0, &(yyvsp[0].sregs), 1);
2644  }
2645 #line 2646 "asmshader.tab.c"
2646  break;
2647 
2648  case 76:
2649 #line 777 "asmshader.y"
2650  {
2651  TRACE("CALLNZ\n");
2652  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CALLNZ, 0, 0, 0, 0, &(yyvsp[0].sregs), 2);
2653  }
2654 #line 2655 "asmshader.tab.c"
2655  break;
2656 
2657  case 77:
2658 #line 782 "asmshader.y"
2659  {
2660  TRACE("LOOP\n");
2661  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOOP, 0, 0, 0, 0, &(yyvsp[0].sregs), 2);
2662  }
2663 #line 2664 "asmshader.tab.c"
2664  break;
2665 
2666  case 78:
2667 #line 787 "asmshader.y"
2668  {
2669  TRACE("RET\n");
2670  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RET, 0, 0, 0, 0, 0, 0);
2671  }
2672 #line 2673 "asmshader.tab.c"
2673  break;
2674 
2675  case 79:
2676 #line 792 "asmshader.y"
2677  {
2678  TRACE("ENDLOOP\n");
2679  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDLOOP, 0, 0, 0, 0, 0, 0);
2680  }
2681 #line 2682 "asmshader.tab.c"
2682  break;
2683 
2684  case 80:
2685 #line 797 "asmshader.y"
2686  {
2687  TRACE("LABEL\n");
2688  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LABEL, 0, 0, 0, 0, &(yyvsp[0].sregs), 1);
2689  }
2690 #line 2691 "asmshader.tab.c"
2691  break;
2692 
2693  case 81:
2694 #line 802 "asmshader.y"
2695  {
2696  TRACE("SETP\n");
2697  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SETP, 0, 0, (yyvsp[-3].comptype), &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2698  }
2699 #line 2700 "asmshader.tab.c"
2700  break;
2701 
2702  case 82:
2703 #line 807 "asmshader.y"
2704  {
2705  TRACE("TEXLDL\n");
2706  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDL, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2707  }
2708 #line 2709 "asmshader.tab.c"
2709  break;
2710 
2711  case 83:
2712 #line 812 "asmshader.y"
2713  {
2714  TRACE("LIT\n");
2715  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LIT, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2716  }
2717 #line 2718 "asmshader.tab.c"
2718  break;
2719 
2720  case 84:
2721 #line 817 "asmshader.y"
2722  {
2723  TRACE("MOVA\n");
2724  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MOVA, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2725  }
2726 #line 2727 "asmshader.tab.c"
2727  break;
2728 
2729  case 85:
2730 #line 822 "asmshader.y"
2731  {
2732  TRACE("CND\n");
2733  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CND, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 3);
2734  }
2735 #line 2736 "asmshader.tab.c"
2736  break;
2737 
2738  case 86:
2739 #line 827 "asmshader.y"
2740  {
2741  TRACE("CMP\n");
2742  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CMP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 3);
2743  }
2744 #line 2745 "asmshader.tab.c"
2745  break;
2746 
2747  case 87:
2748 #line 832 "asmshader.y"
2749  {
2750  TRACE("DP2ADD\n");
2751  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP2ADD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 3);
2752  }
2753 #line 2754 "asmshader.tab.c"
2754  break;
2755 
2756  case 88:
2757 #line 837 "asmshader.y"
2758  {
2759  TRACE("TEXCOORD\n");
2760  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXCOORD, (yyvsp[-1].modshift).mod, (yyvsp[-1].modshift).shift, 0, &(yyvsp[0].reg), 0, 0);
2761  }
2762 #line 2763 "asmshader.tab.c"
2763  break;
2764 
2765  case 89:
2766 #line 842 "asmshader.y"
2767  {
2768  TRACE("TEXCRD\n");
2769  /* texcoord and texcrd share the same opcode */
2770  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXCOORD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2771  }
2772 #line 2773 "asmshader.tab.c"
2773  break;
2774 
2775  case 90:
2776 #line 848 "asmshader.y"
2777  {
2778  TRACE("TEXKILL\n");
2779  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXKILL, 0, 0, 0, &(yyvsp[0].reg), 0, 0);
2780  }
2781 #line 2782 "asmshader.tab.c"
2782  break;
2783 
2784  case 91:
2785 #line 853 "asmshader.y"
2786  {
2787  TRACE("TEX\n");
2788  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX, (yyvsp[-1].modshift).mod, (yyvsp[-1].modshift).shift, 0, &(yyvsp[0].reg), 0, 0);
2789  }
2790 #line 2791 "asmshader.tab.c"
2791  break;
2792 
2793  case 92:
2794 #line 858 "asmshader.y"
2795  {
2796  TRACE("TEXDEPTH\n");
2797  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDEPTH, (yyvsp[-1].modshift).mod, (yyvsp[-1].modshift).shift, 0, &(yyvsp[0].reg), 0, 0);
2798  }
2799 #line 2800 "asmshader.tab.c"
2800  break;
2801 
2802  case 93:
2803 #line 863 "asmshader.y"
2804  {
2805  TRACE("TEXLD\n");
2806  /* There is more than one acceptable syntax for texld:
2807  with 1 sreg (PS 1.4) or
2808  with 2 sregs (PS 2.0+)
2809  Moreover, texld shares the same opcode as the tex instruction,
2810  so there are a total of 3 valid syntaxes
2811  These variations are handled in asmparser.c */
2812  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2813  }
2814 #line 2815 "asmshader.tab.c"
2815  break;
2816 
2817  case 94:
2818 #line 874 "asmshader.y"
2819  {
2820  TRACE("TEXLDP\n");
2821  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDP, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2822  }
2823 #line 2824 "asmshader.tab.c"
2824  break;
2825 
2826  case 95:
2827 #line 879 "asmshader.y"
2828  {
2829  TRACE("TEXLDB\n");
2830  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDB, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2831  }
2832 #line 2833 "asmshader.tab.c"
2833  break;
2834 
2835  case 96:
2836 #line 884 "asmshader.y"
2837  {
2838  TRACE("TEXBEM\n");
2839  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXBEM, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2840  }
2841 #line 2842 "asmshader.tab.c"
2842  break;
2843 
2844  case 97:
2845 #line 889 "asmshader.y"
2846  {
2847  TRACE("TEXBEML\n");
2848  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXBEML, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2849  }
2850 #line 2851 "asmshader.tab.c"
2851  break;
2852 
2853  case 98:
2854 #line 894 "asmshader.y"
2855  {
2856  TRACE("TEXREG2AR\n");
2857  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2AR, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2858  }
2859 #line 2860 "asmshader.tab.c"
2860  break;
2861 
2862  case 99:
2863 #line 899 "asmshader.y"
2864  {
2865  TRACE("TEXREG2GB\n");
2866  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2GB, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2867  }
2868 #line 2869 "asmshader.tab.c"
2869  break;
2870 
2871  case 100:
2872 #line 904 "asmshader.y"
2873  {
2874  TRACE("TEXREG2RGB\n");
2875  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2RGB, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2876  }
2877 #line 2878 "asmshader.tab.c"
2878  break;
2879 
2880  case 101:
2881 #line 909 "asmshader.y"
2882  {
2883  TRACE("TEXM3x2PAD\n");
2884  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2PAD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2885  }
2886 #line 2887 "asmshader.tab.c"
2887  break;
2888 
2889  case 102:
2890 #line 914 "asmshader.y"
2891  {
2892  TRACE("INSTR_TEXM3x3PAD\n");
2893  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3PAD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2894  }
2895 #line 2896 "asmshader.tab.c"
2896  break;
2897 
2898  case 103:
2899 #line 919 "asmshader.y"
2900  {
2901  TRACE("TEXM3x3SPEC\n");
2902  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3SPEC, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2903  }
2904 #line 2905 "asmshader.tab.c"
2905  break;
2906 
2907  case 104:
2908 #line 924 "asmshader.y"
2909  {
2910  TRACE("TEXM3x3VSPEC\n");
2911  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3VSPEC, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2912  }
2913 #line 2914 "asmshader.tab.c"
2914  break;
2915 
2916  case 105:
2917 #line 929 "asmshader.y"
2918  {
2919  TRACE("TEXM3x3TEX\n");
2920  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3TEX, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2921  }
2922 #line 2923 "asmshader.tab.c"
2923  break;
2924 
2925  case 106:
2926 #line 934 "asmshader.y"
2927  {
2928  TRACE("TEXDP3TEX\n");
2929  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDP3TEX, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2930  }
2931 #line 2932 "asmshader.tab.c"
2932  break;
2933 
2934  case 107:
2935 #line 939 "asmshader.y"
2936  {
2937  TRACE("TEXM3x2DEPTH\n");
2938  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2DEPTH, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2939  }
2940 #line 2941 "asmshader.tab.c"
2941  break;
2942 
2943  case 108:
2944 #line 944 "asmshader.y"
2945  {
2946  TRACE("TEXM3x2TEX\n");
2947  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2TEX, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2948  }
2949 #line 2950 "asmshader.tab.c"
2950  break;
2951 
2952  case 109:
2953 #line 949 "asmshader.y"
2954  {
2955  TRACE("TEXDP3\n");
2956  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDP3, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2957  }
2958 #line 2959 "asmshader.tab.c"
2959  break;
2960 
2961  case 110:
2962 #line 954 "asmshader.y"
2963  {
2964  TRACE("TEXM3x3\n");
2965  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2966  }
2967 #line 2968 "asmshader.tab.c"
2968  break;
2969 
2970  case 111:
2971 #line 959 "asmshader.y"
2972  {
2973  TRACE("BEM\n");
2974  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BEM, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 2);
2975  }
2976 #line 2977 "asmshader.tab.c"
2977  break;
2978 
2979  case 112:
2980 #line 964 "asmshader.y"
2981  {
2982  TRACE("DSX\n");
2983  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DSX, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2984  }
2985 #line 2986 "asmshader.tab.c"
2986  break;
2987 
2988  case 113:
2989 #line 969 "asmshader.y"
2990  {
2991  TRACE("DSY\n");
2992  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DSY, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 1);
2993  }
2994 #line 2995 "asmshader.tab.c"
2995  break;
2996 
2997  case 114:
2998 #line 974 "asmshader.y"
2999  {
3000  TRACE("TEXLDD\n");
3001  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDD, (yyvsp[-3].modshift).mod, (yyvsp[-3].modshift).shift, 0, &(yyvsp[-2].reg), &(yyvsp[0].sregs), 4);
3002  }
3003 #line 3004 "asmshader.tab.c"
3004  break;
3005 
3006  case 115:
3007 #line 979 "asmshader.y"
3008  {
3009  TRACE("PHASE\n");
3010  asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_PHASE, 0, 0, 0, 0, 0, 0);
3011  }
3012 #line 3013 "asmshader.tab.c"
3013  break;
3014 
3015  case 116:
3016 #line 986 "asmshader.y"
3017  {
3018  (yyval.reg).regnum = (yyvsp[-1].reg).regnum;
3019  (yyval.reg).type = (yyvsp[-1].reg).type;
3020  (yyval.reg).u.writemask = BWRITERSP_WRITEMASK_ALL;
3021  (yyval.reg).srcmod = BWRITERSPSM_NONE;
3022  set_rel_reg(&(yyval.reg), &(yyvsp[0].rel_reg));
3023  }
3024 #line 3025 "asmshader.tab.c"
3025  break;
3026 
3027  case 117:
3028 #line 994 "asmshader.y"
3029  {
3030  (yyval.reg).regnum = (yyvsp[-1].reg).regnum;
3031  (yyval.reg).type = (yyvsp[-1].reg).type;
3032  (yyval.reg).u.writemask = (yyvsp[0].writemask);
3033  (yyval.reg).srcmod = BWRITERSPSM_NONE;
3034  (yyval.reg).rel_reg = NULL;
3035  }
3036 #line 3037 "asmshader.tab.c"
3037  break;
3038 
3039  case 118:
3040 #line 1003 "asmshader.y"
3041  {
3042  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_TEMP;
3043  }
3044 #line 3045 "asmshader.tab.c"
3045  break;
3046 
3047  case 119:
3048 #line 1007 "asmshader.y"
3049  {
3050  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_OUTPUT;
3051  }
3052 #line 3053 "asmshader.tab.c"
3053  break;
3054 
3055  case 120:
3056 #line 1011 "asmshader.y"
3057  {
3058  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_INPUT;
3059  }
3060 #line 3061 "asmshader.tab.c"
3061  break;
3062 
3063  case 121:
3064 #line 1015 "asmshader.y"
3065  {
3066  asmparser_message(&asm_ctx, "Line %u: Register c%u is not a valid destination register\n",
3067  asm_ctx.line_no, (yyvsp[0].regnum));
3069  }
3070 #line 3071 "asmshader.tab.c"
3071  break;
3072 
3073  case 122:
3074 #line 1021 "asmshader.y"
3075  {
3076  asmparser_message(&asm_ctx, "Line %u: Register i%u is not a valid destination register\n",
3077  asm_ctx.line_no, (yyvsp[0].regnum));
3079  }
3080 #line 3081 "asmshader.tab.c"
3081  break;
3082 
3083  case 123:
3084 #line 1027 "asmshader.y"
3085  {
3086  asmparser_message(&asm_ctx, "Line %u: Register b%u is not a valid destination register\n",
3087  asm_ctx.line_no, (yyvsp[0].regnum));
3089  }
3090 #line 3091 "asmshader.tab.c"
3091  break;
3092 
3093  case 124:
3094 #line 1033 "asmshader.y"
3095  {
3096  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_TEXTURE;
3097  }
3098 #line 3099 "asmshader.tab.c"
3099  break;
3100 
3101  case 125:
3102 #line 1037 "asmshader.y"
3103  {
3104  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_TEXCRDOUT;
3105  }
3106 #line 3107 "asmshader.tab.c"
3107  break;
3108 
3109  case 126:
3110 #line 1041 "asmshader.y"
3111  {
3112  asmparser_message(&asm_ctx, "Line %u: Register s%u is not a valid destination register\n",
3113  asm_ctx.line_no, (yyvsp[0].regnum));
3115  }
3116 #line 3117 "asmshader.tab.c"
3117  break;
3118 
3119  case 127:
3120 #line 1047 "asmshader.y"
3121  {
3123  }
3124 #line 3125 "asmshader.tab.c"
3125  break;
3126 
3127  case 128:
3128 #line 1051 "asmshader.y"
3129  {
3131  }
3132 #line 3133 "asmshader.tab.c"
3133  break;
3134 
3135  case 129:
3136 #line 1055 "asmshader.y"
3137  {
3138  (yyval.reg).regnum = BWRITERSRO_FOG; (yyval.reg).type = BWRITERSPR_RASTOUT;
3139  }
3140 #line 3141 "asmshader.tab.c"
3141  break;
3142 
3143  case 130:
3144 #line 1059 "asmshader.y"
3145  {
3146  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_ATTROUT;
3147  }
3148 #line 3149 "asmshader.tab.c"
3149  break;
3150 
3151  case 131:
3152 #line 1063 "asmshader.y"
3153  {
3154  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_COLOROUT;
3155  }
3156 #line 3157 "asmshader.tab.c"
3157  break;
3158 
3159  case 132:
3160 #line 1067 "asmshader.y"
3161  {
3162  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_DEPTHOUT;
3163  }
3164 #line 3165 "asmshader.tab.c"
3165  break;
3166 
3167  case 133:
3168 #line 1071 "asmshader.y"
3169  {
3170  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_PREDICATE;
3171  }
3172 #line 3173 "asmshader.tab.c"
3173  break;
3174 
3175  case 134:
3176 #line 1075 "asmshader.y"
3177  {
3178  asmparser_message(&asm_ctx, "Line %u: Register vPos is not a valid destination register\n",
3179  asm_ctx.line_no);
3181  }
3182 #line 3183 "asmshader.tab.c"
3183  break;
3184 
3185  case 135:
3186 #line 1081 "asmshader.y"
3187  {
3188  asmparser_message(&asm_ctx, "Line %u: Register vFace is not a valid destination register\n",
3189  asm_ctx.line_no);
3191  }
3192 #line 3193 "asmshader.tab.c"
3193  break;
3194 
3195  case 136:
3196 #line 1087 "asmshader.y"
3197  {
3198  /* index 0 is hardcoded for the addr register */
3199  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_ADDR;
3200  }
3201 #line 3202 "asmshader.tab.c"
3202  break;
3203 
3204  case 137:
3205 #line 1092 "asmshader.y"
3206  {
3207  asmparser_message(&asm_ctx, "Line %u: Register aL is not a valid destination register\n",
3208  asm_ctx.line_no);
3210  }
3211 #line 3212 "asmshader.tab.c"
3212  break;
3213 
3214  case 138:
3215 #line 1099 "asmshader.y"
3216  {
3217  if((yyvsp[0].wm_components).writemask == SWIZZLE_ERR) {
3218  asmparser_message(&asm_ctx, "Line %u: Invalid writemask specified\n",
3219  asm_ctx.line_no);
3221  /* Provide a correct writemask to prevent following complaints */
3223  }
3224  else {
3225  (yyval.writemask) = (yyvsp[0].wm_components).writemask;
3226  TRACE("Writemask: %x\n", (yyval.writemask));
3227  }
3228  }
3229 #line 3230 "asmshader.tab.c"
3230  break;
3231 
3232  case 139:
3233 #line 1114 "asmshader.y"
3234  {
3235  (yyval.wm_components).writemask = 1 << (yyvsp[0].component);
3236  (yyval.wm_components).last = (yyvsp[0].component);
3237  (yyval.wm_components).idx = 1;
3238  }
3239 #line 3240 "asmshader.tab.c"
3240  break;
3241 
3242  case 140:
3243 #line 1120 "asmshader.y"
3244  {
3245  if((yyvsp[-1].wm_components).writemask == SWIZZLE_ERR || (yyvsp[-1].wm_components).idx == 4)
3246  /* Wrong writemask */
3248  else {
3249  if((yyvsp[0].component) <= (yyvsp[-1].wm_components).last)
3251  else {
3252  (yyval.wm_components).writemask = (yyvsp[-1].wm_components).writemask | (1 << (yyvsp[0].component));
3253  (yyval.wm_components).idx = (yyvsp[-1].wm_components).idx + 1;
3254  }
3255  }
3256  }
3257 #line 3258 "asmshader.tab.c"
3258  break;
3259 
3260  case 141:
3261 #line 1135 "asmshader.y"
3262  {
3263  (yyval.swizzle) = BWRITERVS_NOSWIZZLE;
3264  TRACE("Default swizzle: %08x\n", (yyval.swizzle));
3265  }
3266 #line 3267 "asmshader.tab.c"
3267  break;
3268 
3269  case 142:
3270 #line 1140 "asmshader.y"
3271  {
3272  if((yyvsp[0].sw_components).swizzle == SWIZZLE_ERR) {
3273  asmparser_message(&asm_ctx, "Line %u: Invalid swizzle\n",
3274  asm_ctx.line_no);
3276  /* Provide a correct swizzle to prevent following complaints */
3277  (yyval.swizzle) = BWRITERVS_NOSWIZZLE;
3278  }
3279  else {
3280  DWORD last, i;
3281 
3282  (yyval.swizzle) = (yyvsp[0].sw_components).swizzle << BWRITERVS_SWIZZLE_SHIFT;
3283  /* Fill the swizzle by extending the last component */
3284  last = ((yyvsp[0].sw_components).swizzle >> 2 * ((yyvsp[0].sw_components).idx - 1)) & 0x03;
3285  for(i = (yyvsp[0].sw_components).idx; i < 4; i++){
3286  (yyval.swizzle) |= last << (BWRITERVS_SWIZZLE_SHIFT + 2 * i);
3287  }
3288  TRACE("Got a swizzle: %08x\n", (yyval.swizzle));
3289  }
3290  }
3291 #line 3292 "asmshader.tab.c"
3292  break;
3293 
3294  case 143:
3295 #line 1162 "asmshader.y"
3296  {
3297  (yyval.sw_components).swizzle = (yyvsp[0].component);
3298  (yyval.sw_components).idx = 1;
3299  }
3300 #line 3301 "asmshader.tab.c"
3301  break;
3302 
3303  case 144:
3304 #line 1167 "asmshader.y"
3305  {
3306  if((yyvsp[-1].sw_components).idx == 4) {
3307  /* Too many sw_components */
3308  (yyval.sw_components).swizzle = SWIZZLE_ERR;
3309  (yyval.sw_components).idx = 4;
3310  }
3311  else {
3312  (yyval.sw_components).swizzle = (yyvsp[-1].sw_components).swizzle | ((yyvsp[0].component) << 2 * (yyvsp[-1].sw_components).idx);
3313  (yyval.sw_components).idx = (yyvsp[-1].sw_components).idx + 1;
3314  }
3315  }
3316 #line 3317 "asmshader.tab.c"
3317  break;
3318 
3319  case 145:
3320 #line 1180 "asmshader.y"
3321  {
3322  (yyval.modshift).mod = 0;
3323  (yyval.modshift).shift = 0;
3324  }
3325 #line 3326 "asmshader.tab.c"
3326  break;
3327 
3328  case 146:
3329 #line 1185 "asmshader.y"
3330  {
3331  (yyval.modshift).mod = (yyvsp[-1].modshift).mod | (yyvsp[0].modshift).mod;
3332  if((yyvsp[-1].modshift).shift && (yyvsp[0].modshift).shift) {
3333  asmparser_message(&asm_ctx, "Line %u: More than one shift flag\n",
3334  asm_ctx.line_no);
3336  (yyval.modshift).shift = (yyvsp[-1].modshift).shift;
3337  } else {
3338  (yyval.modshift).shift = (yyvsp[-1].modshift).shift | (yyvsp[0].modshift).shift;
3339  }
3340  }
3341 #line 3342 "asmshader.tab.c"
3342  break;
3343 
3344  case 147:
3345 #line 1198 "asmshader.y"
3346  {
3347  (yyval.modshift).mod = 0;
3348  (yyval.modshift).shift = 1;
3349  }
3350 #line 3351 "asmshader.tab.c"
3351  break;
3352 
3353  case 148:
3354 #line 1203 "asmshader.y"
3355  {
3356  (yyval.modshift).mod = 0;
3357  (yyval.modshift).shift = 2;
3358  }
3359 #line 3360 "asmshader.tab.c"
3360  break;
3361 
3362  case 149:
3363 #line 1208 "asmshader.y"
3364  {
3365  (yyval.modshift).mod = 0;
3366  (yyval.modshift).shift = 3;
3367  }
3368 #line 3369 "asmshader.tab.c"
3369  break;
3370 
3371  case 150:
3372 #line 1213 "asmshader.y"
3373  {
3374  (yyval.modshift).mod = 0;
3375  (yyval.modshift).shift = 15;
3376  }
3377 #line 3378 "asmshader.tab.c"
3378  break;
3379 
3380  case 151:
3381 #line 1218 "asmshader.y"
3382  {
3383  (yyval.modshift).mod = 0;
3384  (yyval.modshift).shift = 14;
3385  }
3386 #line 3387 "asmshader.tab.c"
3387  break;
3388 
3389  case 152:
3390 #line 1223 "asmshader.y"
3391  {
3392  (yyval.modshift).mod = 0;
3393  (yyval.modshift).shift = 13;
3394  }
3395 #line 3396 "asmshader.tab.c"
3396  break;
3397 
3398  case 153:
3399 #line 1228 "asmshader.y"
3400  {
3401  (yyval.modshift).mod = BWRITERSPDM_SATURATE;
3402  (yyval.modshift).shift = 0;
3403  }
3404 #line 3405 "asmshader.tab.c"
3405  break;
3406 
3407  case 154:
3408 #line 1233 "asmshader.y"
3409  {
3411  (yyval.modshift).shift = 0;
3412  }
3413 #line 3414 "asmshader.tab.c"
3414  break;
3415 
3416  case 155:
3417 #line 1238 "asmshader.y"
3418  {
3420  (yyval.modshift).shift = 0;
3421  }
3422 #line 3423 "asmshader.tab.c"
3423  break;
3424 
3425  case 156:
3426 #line 1244 "asmshader.y"
3427  {
3428  (yyval.sregs).reg[0] = (yyvsp[0].reg);
3429  (yyval.sregs).count = 1;
3430  }
3431 #line 3432 "asmshader.tab.c"
3432  break;
3433 
3434  case 157:
3435 #line 1249 "asmshader.y"
3436  {
3437  if((yyval.sregs).count == MAX_SRC_REGS){
3438  asmparser_message(&asm_ctx, "Line %u: Too many source registers in this instruction\n",
3439  asm_ctx.line_no);
3441  }
3442  else
3443  (yyval.sregs).reg[(yyval.sregs).count++] = (yyvsp[0].reg);
3444  }
3445 #line 3446 "asmshader.tab.c"
3446  break;
3447 
3448  case 158:
3449 #line 1260 "asmshader.y"
3450  {
3451  (yyval.reg).type = (yyvsp[-2].reg).type;
3452  (yyval.reg).regnum = (yyvsp[-2].reg).regnum;
3453  (yyval.reg).u.swizzle = (yyvsp[0].swizzle);
3454  (yyval.reg).srcmod = BWRITERSPSM_NONE;
3455  set_rel_reg(&(yyval.reg), &(yyvsp[-1].rel_reg));
3456  }
3457 #line 3458 "asmshader.tab.c"
3458  break;
3459 
3460  case 159:
3461 #line 1268 "asmshader.y"
3462  {
3463  (yyval.reg).type = (yyvsp[-3].reg).type;
3464  (yyval.reg).regnum = (yyvsp[-3].reg).regnum;
3465  set_rel_reg(&(yyval.reg), &(yyvsp[-2].rel_reg));
3466  (yyval.reg).srcmod = (yyvsp[-1].srcmod);
3467  (yyval.reg).u.swizzle = (yyvsp[0].swizzle);
3468  }
3469 #line 3470 "asmshader.tab.c"
3470  break;
3471 
3472  case 160:
3473 #line 1276 "asmshader.y"
3474  {
3475  (yyval.reg).type = (yyvsp[-2].reg).type;
3476  (yyval.reg).regnum = (yyvsp[-2].reg).regnum;
3477  (yyval.reg).srcmod = BWRITERSPSM_NEG;
3478  set_rel_reg(&(yyval.reg), &(yyvsp[-1].rel_reg));
3479  (yyval.reg).u.swizzle = (yyvsp[0].swizzle);
3480  }
3481 #line 3482 "asmshader.tab.c"
3482  break;
3483 
3484  case 161:
3485 #line 1284 "asmshader.y"
3486  {
3487  (yyval.reg).type = (yyvsp[-3].reg).type;
3488  (yyval.reg).regnum = (yyvsp[-3].reg).regnum;
3489  set_rel_reg(&(yyval.reg), &(yyvsp[-2].rel_reg));
3490  switch((yyvsp[-1].srcmod)) {
3491  case BWRITERSPSM_BIAS: (yyval.reg).srcmod = BWRITERSPSM_BIASNEG; break;
3492  case BWRITERSPSM_X2: (yyval.reg).srcmod = BWRITERSPSM_X2NEG; break;
3493  case BWRITERSPSM_SIGN: (yyval.reg).srcmod = BWRITERSPSM_SIGNNEG; break;
3494  case BWRITERSPSM_ABS: (yyval.reg).srcmod = BWRITERSPSM_ABSNEG; break;
3495  case BWRITERSPSM_DZ:
3496  asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: NEG and DZ\n",
3497  asm_ctx.line_no);
3499  break;
3500  case BWRITERSPSM_DW:
3501  asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: NEG and DW\n",
3502  asm_ctx.line_no);
3504  break;
3505  default:
3506  FIXME("Unhandled combination of NEGATE and %u\n", (yyvsp[-1].srcmod));
3507  }
3508  (yyval.reg).u.swizzle = (yyvsp[0].swizzle);
3509  }
3510 #line 3511 "asmshader.tab.c"
3511  break;
3512 
3513  case 162:
3514 #line 1309 "asmshader.y"
3515  {
3516  if((yyvsp[-4].immval).val != 1.0 || (!(yyvsp[-4].immval).integer)) {
3517  asmparser_message(&asm_ctx, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP, "
3518  "%g - reg found\n", asm_ctx.line_no, (yyvsp[-4].immval).val);
3520  }
3521  /* Complement - not compatible with other source modifiers */
3522  (yyval.reg).type = (yyvsp[-2].reg).type;
3523  (yyval.reg).regnum = (yyvsp[-2].reg).regnum;
3524  (yyval.reg).srcmod = BWRITERSPSM_COMP;
3525  set_rel_reg(&(yyval.reg), &(yyvsp[-1].rel_reg));
3526  (yyval.reg).u.swizzle = (yyvsp[0].swizzle);
3527  }
3528 #line 3529 "asmshader.tab.c"
3529  break;
3530 
3531  case 163:
3532 #line 1323 "asmshader.y"
3533  {
3534  /* For nicer error reporting */
3535  if((yyvsp[-5].immval).val != 1.0 || (!(yyvsp[-5].immval).integer)) {
3536  asmparser_message(&asm_ctx, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP\n",
3537  asm_ctx.line_no);
3539  } else {
3540  asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: D3DSPSM_COMP and %s\n",
3541  asm_ctx.line_no,
3542  debug_print_srcmod((yyvsp[-1].srcmod)));
3544  }
3545  }
3546 #line 3547 "asmshader.tab.c"
3547  break;
3548 
3549  case 164:
3550 #line 1337 "asmshader.y"
3551  {
3552  (yyval.reg).type = (yyvsp[-1].reg).type;
3553  (yyval.reg).regnum = (yyvsp[-1].reg).regnum;
3554  (yyval.reg).rel_reg = NULL;
3555  (yyval.reg).srcmod = BWRITERSPSM_NOT;
3556  (yyval.reg).u.swizzle = (yyvsp[0].swizzle);
3557  }
3558 #line 3559 "asmshader.tab.c"
3559  break;
3560 
3561  case 165:
3562 #line 1346 "asmshader.y"
3563  {
3564  (yyval.rel_reg).has_rel_reg = FALSE;
3565  (yyval.rel_reg).additional_offset = 0;
3566  }
3567 #line 3568 "asmshader.tab.c"
3568  break;
3569 
3570  case 166:
3571 #line 1351 "asmshader.y"
3572  {
3573  (yyval.rel_reg).has_rel_reg = FALSE;
3574  (yyval.rel_reg).additional_offset = (yyvsp[-1].immval).val;
3575  }
3576 #line 3577 "asmshader.tab.c"
3577  break;
3578 
3579  case 167:
3580 #line 1356 "asmshader.y"
3581  {
3582  (yyval.rel_reg).has_rel_reg = TRUE;
3583  (yyval.rel_reg).type = (yyvsp[-2].reg).type;
3584  (yyval.rel_reg).additional_offset = 0;
3585  (yyval.rel_reg).rel_regnum = (yyvsp[-2].reg).regnum;
3586  (yyval.rel_reg).swizzle = (yyvsp[-1].swizzle);
3587  }
3588 #line 3589 "asmshader.tab.c"
3589  break;
3590 
3591  case 168:
3592 #line 1364 "asmshader.y"
3593  {
3594  (yyval.rel_reg).has_rel_reg = TRUE;
3595  (yyval.rel_reg).type = (yyvsp[-2].reg).type;
3596  (yyval.rel_reg).additional_offset = (yyvsp[-4].immval).val;
3597  (yyval.rel_reg).rel_regnum = (yyvsp[-2].reg).regnum;
3598  (yyval.rel_reg).swizzle = (yyvsp[-1].swizzle);
3599  }
3600 #line 3601 "asmshader.tab.c"
3601  break;
3602 
3603  case 169:
3604 #line 1372 "asmshader.y"
3605  {
3606  (yyval.rel_reg).has_rel_reg = TRUE;
3607  (yyval.rel_reg).type = (yyvsp[-4].reg).type;
3608  (yyval.rel_reg).additional_offset = (yyvsp[-1].immval).val;
3609  (yyval.rel_reg).rel_regnum = (yyvsp[-4].reg).regnum;
3610  (yyval.rel_reg).swizzle = (yyvsp[-3].swizzle);
3611  }
3612 #line 3613 "asmshader.tab.c"
3613  break;
3614 
3615  case 170:
3616 #line 1380 "asmshader.y"
3617  {
3618  (yyval.rel_reg).has_rel_reg = TRUE;
3619  (yyval.rel_reg).type = (yyvsp[-4].reg).type;
3620  (yyval.rel_reg).additional_offset = (yyvsp[-6].immval).val + (yyvsp[-1].immval).val;
3621  (yyval.rel_reg).rel_regnum = (yyvsp[-4].reg).regnum;
3622  (yyval.rel_reg).swizzle = (yyvsp[-3].swizzle);
3623  }
3624 #line 3625 "asmshader.tab.c"
3625  break;
3626 
3627  case 171:
3628 #line 1389 "asmshader.y"
3629  {
3630  if(!(yyvsp[0].immval).integer) {
3631  asmparser_message(&asm_ctx, "Line %u: Unexpected float %f\n",
3632  asm_ctx.line_no, (yyvsp[0].immval).val);
3634  }
3635  (yyval.immval).val = (yyvsp[0].immval).val;
3636  }
3637 #line 3638 "asmshader.tab.c"
3638  break;
3639 
3640  case 172:
3641 #line 1398 "asmshader.y"
3642  {
3643  if(!(yyvsp[0].immval).integer) {
3644  asmparser_message(&asm_ctx, "Line %u: Unexpected float %f\n",
3645  asm_ctx.line_no, (yyvsp[0].immval).val);
3647  }
3648  (yyval.immval).val = (yyvsp[-2].immval).val + (yyvsp[0].immval).val;
3649  }
3650 #line 3651 "asmshader.tab.c"
3651  break;
3652 
3653  case 173:
3654 #line 1408 "asmshader.y"
3655  {
3656  (yyval.srcmod) = BWRITERSPSM_BIAS;
3657  }
3658 #line 3659 "asmshader.tab.c"
3659  break;
3660 
3661  case 174:
3662 #line 1412 "asmshader.y"
3663  {
3664  (yyval.srcmod) = BWRITERSPSM_X2;
3665  }
3666 #line 3667 "asmshader.tab.c"
3667  break;
3668 
3669  case 175:
3670 #line 1416 "asmshader.y"
3671  {
3672  (yyval.srcmod) = BWRITERSPSM_SIGN;
3673  }
3674 #line 3675 "asmshader.tab.c"
3675  break;
3676 
3677  case 176:
3678 #line 1420 "asmshader.y"
3679  {
3680  (yyval.srcmod) = BWRITERSPSM_DZ;
3681  }
3682 #line 3683 "asmshader.tab.c"
3683  break;
3684 
3685  case 177:
3686 #line 1424 "asmshader.y"
3687  {
3688  (yyval.srcmod) = BWRITERSPSM_DW;
3689  }
3690 #line 3691 "asmshader.tab.c"
3691  break;
3692 
3693  case 178:
3694 #line 1428 "asmshader.y"
3695  {
3696  (yyval.srcmod) = BWRITERSPSM_ABS;
3697  }
3698 #line 3699 "asmshader.tab.c"
3699  break;
3700 
3701  case 179:
3702 #line 1433 "asmshader.y"
3703  {
3704  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_ADDR;
3705  }
3706 #line 3707 "asmshader.tab.c"
3707  break;
3708 
3709  case 180:
3710 #line 1437 "asmshader.y"
3711  {
3712  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_LOOP;
3713  }
3714 #line 3715 "asmshader.tab.c"
3715  break;
3716 
3717  case 181:
3718 #line 1442 "asmshader.y"
3719  {
3720  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_TEMP;
3721  }
3722 #line 3723 "asmshader.tab.c"
3723  break;
3724 
3725  case 182:
3726 #line 1446 "asmshader.y"
3727  {
3728  asmparser_message(&asm_ctx, "Line %u: Register o%u is not a valid source register\n",
3729  asm_ctx.line_no, (yyvsp[0].regnum));
3731  }
3732 #line 3733 "asmshader.tab.c"
3733  break;
3734 
3735  case 183:
3736 #line 1452 "asmshader.y"
3737  {
3738  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_INPUT;
3739  }
3740 #line 3741 "asmshader.tab.c"
3741  break;
3742 
3743  case 184:
3744 #line 1456 "asmshader.y"
3745  {
3746  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_CONST;
3747  }
3748 #line 3749 "asmshader.tab.c"
3749  break;
3750 
3751  case 185:
3752 #line 1460 "asmshader.y"
3753  {
3754  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_CONSTINT;
3755  }
3756 #line 3757 "asmshader.tab.c"
3757  break;
3758 
3759  case 186:
3760 #line 1464 "asmshader.y"
3761  {
3762  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_CONSTBOOL;
3763  }
3764 #line 3765 "asmshader.tab.c"
3765  break;
3766 
3767  case 187:
3768 #line 1468 "asmshader.y"
3769  {
3770  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_TEXTURE;
3771  }
3772 #line 3773 "asmshader.tab.c"
3773  break;
3774 
3775  case 188:
3776 #line 1472 "asmshader.y"
3777  {
3778  asmparser_message(&asm_ctx, "Line %u: Register oT%u is not a valid source register\n",
3779  asm_ctx.line_no, (yyvsp[0].regnum));
3781  }
3782 #line 3783 "asmshader.tab.c"
3783  break;
3784 
3785  case 189:
3786 #line 1478 "asmshader.y"
3787  {
3788  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_SAMPLER;
3789  }
3790 #line 3791 "asmshader.tab.c"
3791  break;
3792 
3793  case 190:
3794 #line 1482 "asmshader.y"
3795  {
3796  asmparser_message(&asm_ctx, "Line %u: Register oPos is not a valid source register\n",
3797  asm_ctx.line_no);
3799  }
3800 #line 3801 "asmshader.tab.c"
3801  break;
3802 
3803  case 191:
3804 #line 1488 "asmshader.y"
3805  {
3806  asmparser_message(&asm_ctx, "Line %u: Register oFog is not a valid source register\n",
3807  asm_ctx.line_no);
3809  }
3810 #line 3811 "asmshader.tab.c"
3811  break;
3812 
3813  case 192:
3814 #line 1494 "asmshader.y"
3815  {
3816  asmparser_message(&asm_ctx, "Line %u: Register oD%u is not a valid source register\n",
3817  asm_ctx.line_no, (yyvsp[0].regnum));
3819  }
3820 #line 3821 "asmshader.tab.c"
3821  break;
3822 
3823  case 193:
3824 #line 1500 "asmshader.y"
3825  {
3826  asmparser_message(&asm_ctx, "Line %u: Register oC%u is not a valid source register\n",
3827  asm_ctx.line_no, (yyvsp[0].regnum));
3829  }
3830 #line 3831 "asmshader.tab.c"
3831  break;
3832 
3833  case 194:
3834 #line 1506 "asmshader.y"
3835  {
3836  asmparser_message(&asm_ctx, "Line %u: Register oDepth is not a valid source register\n",
3837  asm_ctx.line_no);
3839  }
3840 #line 3841 "asmshader.tab.c"
3841  break;
3842 
3843  case 195:
3844 #line 1512 "asmshader.y"
3845  {
3846  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_PREDICATE;
3847  }
3848 #line 3849 "asmshader.tab.c"
3849  break;
3850 
3851  case 196:
3852 #line 1516 "asmshader.y"
3853  {
3854  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_MISCTYPE;
3855  }
3856 #line 3857 "asmshader.tab.c"
3857  break;
3858 
3859  case 197:
3860 #line 1520 "asmshader.y"
3861  {
3862  (yyval.reg).regnum = 1; (yyval.reg).type = BWRITERSPR_MISCTYPE;
3863  }
3864 #line 3865 "asmshader.tab.c"
3865  break;
3866 
3867  case 198:
3868 #line 1524 "asmshader.y"
3869  {
3870  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_ADDR;
3871  }
3872 #line 3873 "asmshader.tab.c"
3873  break;
3874 
3875  case 199:
3876 #line 1528 "asmshader.y"
3877  {
3878  (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_LOOP;
3879  }
3880 #line 3881 "asmshader.tab.c"
3881  break;
3882 
3883  case 200:
3884 #line 1532 "asmshader.y"
3885  {
3886  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_LABEL;
3887  }
3888 #line 3889 "asmshader.tab.c"
3889  break;
3890 
3891  case 201:
3892 #line 1536 "asmshader.y"
3893  { (yyval.comptype) = BWRITER_COMPARISON_GT; }
3894 #line 3895 "asmshader.tab.c"
3895  break;
3896 
3897  case 202:
3898 #line 1537 "asmshader.y"
3899  { (yyval.comptype) = BWRITER_COMPARISON_LT; }
3900 #line 3901 "asmshader.tab.c"
3901  break;
3902 
3903  case 203:
3904 #line 1538 "asmshader.y"
3905  { (yyval.comptype) = BWRITER_COMPARISON_GE; }
3906 #line 3907 "asmshader.tab.c"
3907  break;
3908 
3909  case 204:
3910 #line 1539 "asmshader.y"
3911  { (yyval.comptype) = BWRITER_COMPARISON_LE; }
3912 #line 3913 "asmshader.tab.c"
3913  break;
3914 
3915  case 205:
3916 #line 1540 "asmshader.y"
3917  { (yyval.comptype) = BWRITER_COMPARISON_EQ; }
3918 #line 3919 "asmshader.tab.c"
3919  break;
3920 
3921  case 206:
3922 #line 1541 "asmshader.y"
3923  { (yyval.comptype) = BWRITER_COMPARISON_NE; }
3924 #line 3925 "asmshader.tab.c"
3925  break;
3926 
3927  case 207:
3928 #line 1544 "asmshader.y"
3929  {
3930  TRACE("dcl_position%u\n", (yyvsp[0].regnum));
3931  (yyval.declaration).regnum = (yyvsp[0].regnum);
3932  (yyval.declaration).dclusage = BWRITERDECLUSAGE_POSITION;
3933  }
3934 #line 3935 "asmshader.tab.c"
3935  break;
3936 
3937  case 208:
3938 #line 1550 "asmshader.y"
3939  {
3940  TRACE("dcl_blendweight%u\n", (yyvsp[0].regnum));
3941  (yyval.declaration).regnum = (yyvsp[0].regnum);
3942  (yyval.declaration).dclusage = BWRITERDECLUSAGE_BLENDWEIGHT;
3943  }
3944 #line 3945 "asmshader.tab.c"
3945  break;
3946 
3947  case 209:
3948 #line 1556 "asmshader.y"
3949  {
3950  TRACE("dcl_blendindices%u\n", (yyvsp[0].regnum));
3951  (yyval.declaration).regnum = (yyvsp[0].regnum);
3952  (yyval.declaration).dclusage = BWRITERDECLUSAGE_BLENDINDICES;
3953  }
3954 #line 3955 "asmshader.tab.c"
3955  break;
3956 
3957  case 210:
3958 #line 1562 "asmshader.y"
3959  {
3960  TRACE("dcl_normal%u\n", (yyvsp[0].regnum));
3961  (yyval.declaration).regnum = (yyvsp[0].regnum);
3962  (yyval.declaration).dclusage = BWRITERDECLUSAGE_NORMAL;
3963  }
3964 #line 3965 "asmshader.tab.c"
3965  break;
3966 
3967  case 211:
3968 #line 1568 "asmshader.y"
3969  {
3970  TRACE("dcl_psize%u\n", (yyvsp[0].regnum));
3971  (yyval.declaration).regnum = (yyvsp[0].regnum);
3972  (yyval.declaration).dclusage = BWRITERDECLUSAGE_PSIZE;
3973  }
3974 #line 3975 "asmshader.tab.c"
3975  break;
3976 
3977  case 212:
3978 #line 1574 "asmshader.y"
3979  {
3980  TRACE("dcl_texcoord%u\n", (yyvsp[0].regnum));
3981  (yyval.declaration).regnum = (yyvsp[0].regnum);
3982  (yyval.declaration).dclusage = BWRITERDECLUSAGE_TEXCOORD;
3983  }
3984 #line 3985 "asmshader.tab.c"
3985  break;
3986 
3987  case 213:
3988 #line 1580 "asmshader.y"
3989  {
3990  TRACE("dcl_tangent%u\n", (yyvsp[0].regnum));
3991  (yyval.declaration).regnum = (yyvsp[0].regnum);
3992  (yyval.declaration).dclusage = BWRITERDECLUSAGE_TANGENT;
3993  }
3994 #line 3995 "asmshader.tab.c"
3995  break;
3996 
3997  case 214:
3998 #line 1586 "asmshader.y"
3999  {
4000  TRACE("dcl_binormal%u\n", (yyvsp[0].regnum));
4001  (yyval.declaration).regnum = (yyvsp[0].regnum);
4002  (yyval.declaration).dclusage = BWRITERDECLUSAGE_BINORMAL;
4003  }
4004 #line 4005 "asmshader.tab.c"
4005  break;
4006 
4007  case 215:
4008 #line 1592 "asmshader.y"
4009  {
4010  TRACE("dcl_tessfactor%u\n", (yyvsp[0].regnum));
4011  (yyval.declaration).regnum = (yyvsp[0].regnum);
4012  (yyval.declaration).dclusage = BWRITERDECLUSAGE_TESSFACTOR;
4013  }
4014 #line 4015 "asmshader.tab.c"
4015  break;
4016 
4017  case 216:
4018 #line 1598 "asmshader.y"
4019  {
4020  TRACE("dcl_positiont%u\n", (yyvsp[0].regnum));
4021  (yyval.declaration).regnum = (yyvsp[0].regnum);
4022  (yyval.declaration).dclusage = BWRITERDECLUSAGE_POSITIONT;
4023  }
4024 #line 4025 "asmshader.tab.c"
4025  break;
4026 
4027  case 217:
4028 #line 1604 "asmshader.y"
4029  {
4030  TRACE("dcl_color%u\n", (yyvsp[0].regnum));
4031  (yyval.declaration).regnum = (yyvsp[0].regnum);
4032  (yyval.declaration).dclusage = BWRITERDECLUSAGE_COLOR;
4033  }
4034 #line 4035 "asmshader.tab.c"
4035  break;
4036 
4037  case 218:
4038 #line 1610 "asmshader.y"
4039  {
4040  TRACE("dcl_fog%u\n", (yyvsp[0].regnum));
4041  (yyval.declaration).regnum = (yyvsp[0].regnum);
4042  (yyval.declaration).dclusage = BWRITERDECLUSAGE_FOG;
4043  }
4044 #line 4045 "asmshader.tab.c"
4045  break;
4046 
4047  case 219:
4048 #line 1616 "asmshader.y"
4049  {
4050  TRACE("dcl_depth%u\n", (yyvsp[0].regnum));
4051  (yyval.declaration).regnum = (yyvsp[0].regnum);
4052  (yyval.declaration).dclusage = BWRITERDECLUSAGE_DEPTH;
4053  }
4054 #line 4055 "asmshader.tab.c"
4055  break;
4056 
4057  case 220:
4058 #line 1622 "asmshader.y"
4059  {
4060  TRACE("dcl_sample%u\n", (yyvsp[0].regnum));
4061  (yyval.declaration).regnum = (yyvsp[0].regnum);
4062  (yyval.declaration).dclusage = BWRITERDECLUSAGE_SAMPLE;
4063  }
4064 #line 4065 "asmshader.tab.c"
4065  break;
4066 
4067  case 221:
4068 #line 1629 "asmshader.y"
4069  {
4070  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_INPUT;
4071  }
4072 #line 4073 "asmshader.tab.c"
4073  break;
4074 
4075  case 222:
4076 #line 1633 "asmshader.y"
4077  {
4078  (yyval.reg).regnum = (yyvsp[0].regnum); (yyval.reg).type = BWRITERSPR_TEXTURE;
4079  }
4080 #line 4081 "asmshader.tab.c"
4081  break;
4082 
4083  case 223:
4084 #line 1638 "asmshader.y"
4085  {
4086  (yyval.samplertype) = BWRITERSTT_1D;
4087  }
4088 #line 4089 "asmshader.tab.c"
4089  break;
4090 
4091  case 224:
4092 #line 1642 "asmshader.y"
4093  {
4094  (yyval.samplertype) = BWRITERSTT_2D;
4095  }
4096 #line 4097 "asmshader.tab.c"
4097  break;
4098 
4099  case 225:
4100 #line 1646 "asmshader.y"
4101  {
4102  (yyval.samplertype) = BWRITERSTT_CUBE;
4103  }
4104 #line 4105 "asmshader.tab.c"
4105  break;
4106 
4107  case 226:
4108 #line 1650 "asmshader.y"
4109  {
4110  (yyval.samplertype) = BWRITERSTT_VOLUME;
4111  }
4112 #line 4113 "asmshader.tab.c"
4113  break;
4114 
4115  case 227:
4116 #line 1655 "asmshader.y"
4117  {
4118  (yyval.reg).type = BWRITERSPR_PREDICATE;
4119  (yyval.reg).regnum = 0;
4120  (yyval.reg).rel_reg = NULL;
4121  (yyval.reg).srcmod = BWRITERSPSM_NONE;
4122  (yyval.reg).u.swizzle = (yyvsp[-1].swizzle);
4123  }
4124 #line 4125 "asmshader.tab.c"
4125  break;
4126 
4127  case 228:
4128 #line 1663 "asmshader.y"
4129  {
4130  (yyval.reg).type = BWRITERSPR_PREDICATE;
4131  (yyval.reg).regnum = 0;
4132  (yyval.reg).rel_reg = NULL;
4133  (yyval.reg).srcmod = BWRITERSPSM_NOT;
4134  (yyval.reg).u.swizzle = (yyvsp[-1].swizzle);
4135  }
4136 #line 4137 "asmshader.tab.c"
4137  break;
4138 
4139 
4140 #line 4141 "asmshader.tab.c"
4141 
4142  default: break;
4143  }
4144  /* User semantic actions sometimes alter yychar, and that requires
4145  that yytoken be updated with the new translation. We take the
4146  approach of translating immediately before every use of yytoken.
4147  One alternative is translating here after every semantic action,
4148  but that translation would be missed if the semantic action invokes
4149  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4150  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4151  incorrect destructor might then be invoked immediately. In the
4152  case of YYERROR or YYBACKUP, subsequent parser actions might lead
4153  to an incorrect destructor call or verbose syntax error message
4154  before the lookahead is translated. */
4155  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4156 
4157  YYPOPSTACK (yylen);
4158  yylen = 0;
4159  YY_STACK_PRINT (yyss, yyssp);
4160 
4161  *++yyvsp = yyval;
4162 
4163  /* Now 'shift' the result of the reduction. Determine what state
4164  that goes to, based on the state we popped back to and the rule
4165  number reduced by. */
4166  {
4167  const int yylhs = yyr1[yyn] - YYNTOKENS;
4168  const int yyi = yypgoto[yylhs] + *yyssp;
4169  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
4170  ? yytable[yyi]
4171  : yydefgoto[yylhs]);
4172  }
4173 
4174  goto yynewstate;
4175 
4176 
4177 /*--------------------------------------.
4178 | yyerrlab -- here on detecting error. |
4179 `--------------------------------------*/
4180 yyerrlab:
4181  /* Make sure we have latest lookahead translation. See comments at
4182  user semantic actions for why this is necessary. */
4183  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4184 
4185  /* If not already recovering from an error, report this error. */
4186  if (!yyerrstatus)
4187  {
4188  ++yynerrs;
4189 #if ! YYERROR_VERBOSE
4190  yyerror (YY_("syntax error"));
4191 #else
4192 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4193  yyssp, yytoken)
4194  {
4195  char const *yymsgp = YY_("syntax error");
4196  int yysyntax_error_status;
4197  yysyntax_error_status = YYSYNTAX_ERROR;
4198  if (yysyntax_error_status == 0)
4199  yymsgp = yymsg;
4200  else if (yysyntax_error_status == 1)
4201  {
4202  if (yymsg != yymsgbuf)
4203  YYSTACK_FREE (yymsg);
4204  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4205  if (!yymsg)
4206  {
4207  yymsg = yymsgbuf;
4208  yymsg_alloc = sizeof yymsgbuf;
4209  yysyntax_error_status = 2;
4210  }
4211  else
4212  {
4213  yysyntax_error_status = YYSYNTAX_ERROR;
4214  yymsgp = yymsg;
4215  }
4216  }
4217  yyerror (yymsgp);
4218  if (yysyntax_error_status == 2)
4219  goto yyexhaustedlab;
4220  }
4221 # undef YYSYNTAX_ERROR
4222 #endif
4223  }
4224 
4225 
4226 
4227  if (yyerrstatus == 3)
4228  {
4229  /* If just tried and failed to reuse lookahead token after an
4230  error, discard it. */
4231 
4232  if (yychar <= YYEOF)
4233  {
4234  /* Return failure if at end of input. */
4235  if (yychar == YYEOF)
4236  YYABORT;
4237  }
4238  else
4239  {
4240  yydestruct ("Error: discarding",
4241  yytoken, &yylval);
4242  yychar = YYEMPTY;
4243  }
4244  }
4245 
4246  /* Else will try to reuse lookahead token after shifting the error
4247  token. */
4248  goto yyerrlab1;
4249 
4250 
4251 /*---------------------------------------------------.
4252 | yyerrorlab -- error raised explicitly by YYERROR. |
4253 `---------------------------------------------------*/
4254 yyerrorlab:
4255  /* Pacify compilers when the user code never invokes YYERROR and the
4256  label yyerrorlab therefore never appears in user code. */
4257  if (0)
4258  YYERROR;
4259 
4260  /* Do not reclaim the symbols of the rule whose action triggered
4261  this YYERROR. */
4262  YYPOPSTACK (yylen);
4263  yylen = 0;
4264  YY_STACK_PRINT (yyss, yyssp);
4265  yystate = *yyssp;
4266  goto yyerrlab1;
4267 
4268 
4269 /*-------------------------------------------------------------.
4270 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4271 `-------------------------------------------------------------*/
4272 yyerrlab1:
4273  yyerrstatus = 3; /* Each real token shifted decrements this. */
4274 
4275  for (;;)
4276  {
4277  yyn = yypact[yystate];
4278  if (!yypact_value_is_default (yyn))
4279  {
4280  yyn += YYTERROR;
4281  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4282  {
4283  yyn = yytable[yyn];
4284  if (0 < yyn)
4285  break;
4286  }
4287  }
4288 
4289  /* Pop the current state because it cannot handle the error token. */
4290  if (yyssp == yyss)
4291  YYABORT;
4292 
4293 
4294  yydestruct ("Error: popping",
4295  yystos[yystate], yyvsp);
4296  YYPOPSTACK (1);
4297  yystate = *yyssp;
4298  YY_STACK_PRINT (yyss, yyssp);
4299  }
4300 
4302  *++yyvsp = yylval;
4304 
4305 
4306  /* Shift the error token. */
4307  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4308 
4309  yystate = yyn;
4310  goto yynewstate;
4311 
4312 
4313 /*-------------------------------------.
4314 | yyacceptlab -- YYACCEPT comes here. |
4315 `-------------------------------------*/
4316 yyacceptlab:
4317  yyresult = 0;
4318  goto yyreturn;
4319 
4320 
4321 /*-----------------------------------.
4322 | yyabortlab -- YYABORT comes here. |
4323 `-----------------------------------*/
4324 yyabortlab:
4325  yyresult = 1;
4326  goto yyreturn;
4327 
4328 
4329 #if !defined yyoverflow || YYERROR_VERBOSE
4330 /*-------------------------------------------------.
4331 | yyexhaustedlab -- memory exhaustion comes here. |
4332 `-------------------------------------------------*/
4333 yyexhaustedlab:
4334  yyerror (YY_("memory exhausted"));
4335  yyresult = 2;
4336  /* Fall through. */
4337 #endif
4338 
4339 
4340 /*-----------------------------------------------------.
4341 | yyreturn -- parsing is finished, return the result. |
4342 `-----------------------------------------------------*/
4343 yyreturn:
4344  if (yychar != YYEMPTY)
4345  {
4346  /* Make sure we have latest lookahead translation. See comments at
4347  user semantic actions for why this is necessary. */
4348  yytoken = YYTRANSLATE (yychar);
4349  yydestruct ("Cleanup: discarding lookahead",
4350  yytoken, &yylval);
4351  }
4352  /* Do not reclaim the symbols of the rule whose action triggered
4353  this YYABORT or YYACCEPT. */
4354  YYPOPSTACK (yylen);
4355  YY_STACK_PRINT (yyss, yyssp);
4356  while (yyssp != yyss)
4357  {
4358  yydestruct ("Cleanup: popping",
4359  yystos[*yyssp], yyvsp);
4360  YYPOPSTACK (1);
4361  }
4362 #ifndef yyoverflow
4363  if (yyss != yyssa)
4364  YYSTACK_FREE (yyss);
4365 #endif
4366 #if YYERROR_VERBOSE
4367  if (yymsg != yymsgbuf)
4368  YYSTACK_FREE (yymsg);
4369 #endif
4370  return yyresult;
4371 }
4372 #line 1671 "asmshader.y"
4373 
4374 
4376 {
4377  struct bwriter_shader *ret = NULL;
4378 
4379  asm_ctx.shader = NULL;
4380  asm_ctx.status = PARSE_SUCCESS;
4381  asm_ctx.messages.size = asm_ctx.messages.capacity = 0;
4382  asm_ctx.line_no = 1;
4383 
4384  asmshader_parse();
4385 
4386  if (asm_ctx.status != PARSE_ERR)
4387  ret = asm_ctx.shader;
4388  else if (asm_ctx.shader)
4389  SlDeleteShader(asm_ctx.shader);
4390 
4391  if (messages)
4392  {
4393  if (asm_ctx.messages.size)
4394  {
4395  /* Shrink the buffer to the used size */
4396  *messages = d3dcompiler_realloc(asm_ctx.messages.string, asm_ctx.messages.size + 1);
4397  if (!*messages)
4398  {
4399  ERR("Out of memory, no messages reported\n");
4400  d3dcompiler_free(asm_ctx.messages.string);
4401  }
4402  }
4403  else
4404  {
4405  *messages = NULL;
4406  }
4407  }
4408  else
4409  {
4410  if (asm_ctx.messages.capacity)
4411  d3dcompiler_free(asm_ctx.messages.string);
4412  }
4413 
4414  return ret;
4415 }
DWORD component
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define yypact_value_is_default(Yystate)
#define BWRITERVS_SWIZZLE_SHIFT
enum bwriter_comparison_type comptype
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: hlsl.tab.c:2255
static const yytype_uint8 yytranslate[]
#define YY_ASSERT(E)
static void set_rel_reg(struct shader_reg *reg, struct rel_reg *rel)
#define TRUE
Definition: types.h:120
static void * d3dcompiler_realloc(void *ptr, SIZE_T size)
#define shift
Definition: input.c:1668
#define yydebug
Definition: asmshader.tab.c:70
#define YYPOPSTACK(N)
static static const char __ms_va_list
Definition: printf.c:76
#define BWRITERSP_WRITEMASK_ALL
static const yytype_int16 yypgoto[]
struct asm_parser asm_ctx
Definition: asmshader.tab.c:85
#define YYABORT
static YYSIZE_T yystrlen(const char *yystr)
Definition: hlsl.tab.c:2165
#define yyparse
Definition: asmshader.tab.c:67
POINT last
Definition: font.c:46
YYLTYPE yylloc
Definition: hlsl.tab.c:2413
#define YYFINAL
static const yytype_int16 yypact[]
DWORD shift
#define YYDPRINTF(Args)
#define yychar
Definition: asmshader.tab.c:74
bwriter_comparison_type
GLuint GLuint GLsizei count
Definition: gl.h:1545
void compilation_message(struct compilation_messages *msg, const char *fmt, __ms_va_list args) DECLSPEC_HIDDEN
Definition: utils.c:719
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
void * malloc(YYSIZE_T)
static const yytype_uint8 yyr2[]
DWORD last
#define YYCASE_(N, S)
static BOOL d3dcompiler_free(void *ptr)
void create_vs2x_parser(struct asm_parser *ret)
Definition: asmparser.c:1395
static const char *const yytname[]
Definition: hlsl.tab.c:1465
#define YYNTOKENS
void WINAPIV asmparser_message(struct asm_parser *ctx, const char *fmt,...)
Definition: asmshader.tab.c:87
#define MAX_SRC_REGS
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define YYERROR
struct YYSTYPE::@223 declaration
#define ZeroMemory
Definition: winbase.h:1642
struct compilation_messages messages
static const yytype_int16 yycheck[]
#define yylex
Definition: asmshader.tab.c:68
void create_ps12_parser(struct asm_parser *ret)
Definition: asmparser.c:1458
short yytype_int16
#define YYMAXDEPTH
int asmshader_parse(void)
static void append(struct dump_context *dc, const void *data, unsigned size)
Definition: minidump.c:380
DWORD writemask
void create_vs10_parser(struct asm_parser *ret)
Definition: asmparser.c:1347
Definition: match.c:390
BOOL integer
static void * d3dcompiler_alloc(SIZE_T size)
void create_ps10_parser(struct asm_parser *ret)
Definition: asmparser.c:1426
#define YYUSE(E)
#define yylval
Definition: asmshader.tab.c:73
struct YYSTYPE::@220 wm_components
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
Definition: hlsl.tab.c:2204
#define YYTRANSLATE(YYX)
const char * debug_print_srcmod(DWORD mod) DECLSPEC_HIDDEN
Definition: utils.c:128
DWORD swizzle
#define YYSTACK_FREE
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define YY_STACK_PRINT(Bottom, Top)
#define YYSIZE_T
unsigned int BOOL
Definition: ntddk_ex.h:94
#define YYNSTATES
static const yytype_uint8 yystos[]
static const yytype_int16 yydefgoto[]
#define FIXME(fmt,...)
Definition: debug.h:110
unsigned int idx
Definition: utils.c:41
BOOL immbool
DWORD additional_offset
smooth NULL
Definition: ftsmooth.c:416
static void asmshader_error(char const *s)
Definition: asmshader.tab.c:96
YYSTYPE asmshader_lval
GLuint GLfloat * val
Definition: glext.h:7180
#define YYEOF
void create_ps30_parser(struct asm_parser *ret)
Definition: asmparser.c:1538
yytype_int16 yyss_alloc
void create_vs20_parser(struct asm_parser *ret)
Definition: asmparser.c:1379
#define YYACCEPT
DWORD mod
yytokentype
#define TRACE(s)
Definition: solgame.cpp:4
static const yytype_uint8 yyr1[]
unsigned short yytype_uint16
void create_ps14_parser(struct asm_parser *ret)
Definition: asmparser.c:1490
YYSTYPE yyvs_alloc
void create_ps13_parser(struct asm_parser *ret)
Definition: asmparser.c:1474
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#define YYTERROR
#define YYSYNTAX_ERROR
#define YYSTACK_BYTES(N)
unsigned long DWORD
Definition: ntddk_ex.h:95
struct src_regs sregs
#define YYSTACK_ALLOC
void create_vs11_parser(struct asm_parser *ret)
Definition: asmparser.c:1363
void create_ps20_parser(struct asm_parser *ret)
Definition: asmparser.c:1506
void free(void *)
Definition: cabinet.c:147
int ret
unsigned int regnum
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
void create_vs30_parser(struct asm_parser *ret)
Definition: asmparser.c:1411
bwritersampler_texture_type
struct bwriter_shader * parse_asm_shader(char **messages)
GLdouble s
Definition: gl.h:2039
static void set_parse_status(enum parse_status *current, enum parse_status update)
enum bwritersampler_texture_type samplertype
void SlDeleteShader(struct bwriter_shader *shader)
DWORD dclusage
#define YYLAST
#define yyerror
Definition: asmshader.tab.c:69
void create_ps2x_parser(struct asm_parser *ret)
Definition: asmparser.c:1522
#define WINAPIV
Definition: sdbpapi.h:64
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: hlsl.tab.c:2182
#define ERR(fmt,...)
Definition: debug.h:109
static const yytype_uint8 yydefact[]
#define BWRITERVS_NOSWIZZLE
struct rel_reg rel_reg
#define YYINITDEPTH
WINE_DEFAULT_DEBUG_CHANNEL(asmshader)
void create_ps11_parser(struct asm_parser *ret)
Definition: asmparser.c:1442
signed char yytype_int8
#define YYEMPTY
struct shader_reg reg
#define YY_REDUCE_PRINT(Rule)
#define __ms_va_end(list)
Definition: windef.h:443
static int reg
Definition: i386-dis.c:1275
#define yynerrs
Definition: asmshader.tab.c:71
Definition: