Add generated files.
[platform/upstream/binutils.git] / gas / rx-parse.c
1 /* A Bison parser, made by GNU Bison 2.3.  */
2
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4
5    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6    Free Software Foundation, 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 2, or (at your option)
11    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, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor,
21    Boston, MA 02110-1301, USA.  */
22
23 /* As a special exception, you may create a larger work that contains
24    part or all of the Bison parser skeleton and distribute that work
25    under terms of your choice, so long as that work isn't itself a
26    parser generator using the skeleton or a modified version thereof
27    as a parser skeleton.  Alternatively, if you modify or redistribute
28    the parser skeleton itself, you may (at your option) remove this
29    special exception, which will cause the skeleton and the resulting
30    Bison output files to be licensed under the GNU General Public
31    License without this special exception.
32
33    This special exception was added by the Free Software Foundation in
34    version 2.2 of Bison.  */
35
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37    simplifying the original so-called "semantic" parser.  */
38
39 /* All symbols defined below should begin with yy or YY, to avoid
40    infringing on user name space.  This should be done even for local
41    variables, as they might otherwise be expanded by user macros.
42    There are some unavoidable exceptions within include files to
43    define necessary library symbols; they are noted "INFRINGES ON
44    USER NAME SPACE" below.  */
45
46 /* Identify Bison output.  */
47 #define YYBISON 1
48
49 /* Bison version.  */
50 #define YYBISON_VERSION "2.3"
51
52 /* Skeleton name.  */
53 #define YYSKELETON_NAME "yacc.c"
54
55 /* Pure parsers.  */
56 #define YYPURE 0
57
58 /* Using locations.  */
59 #define YYLSP_NEEDED 0
60
61 /* Substitute the variable and function names.  */
62 #define yyparse rx_parse
63 #define yylex   rx_lex
64 #define yyerror rx_error
65 #define yylval  rx_lval
66 #define yychar  rx_char
67 #define yydebug rx_debug
68 #define yynerrs rx_nerrs
69
70
71 /* Tokens.  */
72 #ifndef YYTOKENTYPE
73 # define YYTOKENTYPE
74    /* Put the tokens into the symbol table, so that GDB and other debuggers
75       know about them.  */
76    enum yytokentype {
77      REG = 258,
78      FLAG = 259,
79      CREG = 260,
80      EXPR = 261,
81      UNKNOWN_OPCODE = 262,
82      IS_OPCODE = 263,
83      DOT_S = 264,
84      DOT_B = 265,
85      DOT_W = 266,
86      DOT_L = 267,
87      DOT_A = 268,
88      DOT_UB = 269,
89      DOT_UW = 270,
90      ABS = 271,
91      ADC = 272,
92      ADD = 273,
93      AND_ = 274,
94      BCLR = 275,
95      BCND = 276,
96      BMCND = 277,
97      BNOT = 278,
98      BRA = 279,
99      BRK = 280,
100      BSET = 281,
101      BSR = 282,
102      BTST = 283,
103      CLRPSW = 284,
104      CMP = 285,
105      DBT = 286,
106      DIV = 287,
107      DIVU = 288,
108      EDIV = 289,
109      EDIVU = 290,
110      EMUL = 291,
111      EMULU = 292,
112      FADD = 293,
113      FCMP = 294,
114      FDIV = 295,
115      FMUL = 296,
116      FREIT = 297,
117      FSUB = 298,
118      FTOI = 299,
119      INT = 300,
120      ITOF = 301,
121      JMP = 302,
122      JSR = 303,
123      MACHI = 304,
124      MACLO = 305,
125      MAX = 306,
126      MIN = 307,
127      MOV = 308,
128      MOVU = 309,
129      MUL = 310,
130      MULHI = 311,
131      MULLO = 312,
132      MULU = 313,
133      MVFACHI = 314,
134      MVFACMI = 315,
135      MVFACLO = 316,
136      MVFC = 317,
137      MVTACHI = 318,
138      MVTACLO = 319,
139      MVTC = 320,
140      MVTIPL = 321,
141      NEG = 322,
142      NOP = 323,
143      NOT = 324,
144      OR = 325,
145      POP = 326,
146      POPC = 327,
147      POPM = 328,
148      PUSH = 329,
149      PUSHA = 330,
150      PUSHC = 331,
151      PUSHM = 332,
152      RACW = 333,
153      REIT = 334,
154      REVL = 335,
155      REVW = 336,
156      RMPA = 337,
157      ROLC = 338,
158      RORC = 339,
159      ROTL = 340,
160      ROTR = 341,
161      ROUND = 342,
162      RTE = 343,
163      RTFI = 344,
164      RTS = 345,
165      RTSD = 346,
166      SAT = 347,
167      SATR = 348,
168      SBB = 349,
169      SCCND = 350,
170      SCMPU = 351,
171      SETPSW = 352,
172      SHAR = 353,
173      SHLL = 354,
174      SHLR = 355,
175      SMOVB = 356,
176      SMOVF = 357,
177      SMOVU = 358,
178      SSTR = 359,
179      STNZ = 360,
180      STOP = 361,
181      STZ = 362,
182      SUB = 363,
183      SUNTIL = 364,
184      SWHILE = 365,
185      TST = 366,
186      WAIT = 367,
187      XCHG = 368,
188      XOR = 369
189    };
190 #endif
191 /* Tokens.  */
192 #define REG 258
193 #define FLAG 259
194 #define CREG 260
195 #define EXPR 261
196 #define UNKNOWN_OPCODE 262
197 #define IS_OPCODE 263
198 #define DOT_S 264
199 #define DOT_B 265
200 #define DOT_W 266
201 #define DOT_L 267
202 #define DOT_A 268
203 #define DOT_UB 269
204 #define DOT_UW 270
205 #define ABS 271
206 #define ADC 272
207 #define ADD 273
208 #define AND_ 274
209 #define BCLR 275
210 #define BCND 276
211 #define BMCND 277
212 #define BNOT 278
213 #define BRA 279
214 #define BRK 280
215 #define BSET 281
216 #define BSR 282
217 #define BTST 283
218 #define CLRPSW 284
219 #define CMP 285
220 #define DBT 286
221 #define DIV 287
222 #define DIVU 288
223 #define EDIV 289
224 #define EDIVU 290
225 #define EMUL 291
226 #define EMULU 292
227 #define FADD 293
228 #define FCMP 294
229 #define FDIV 295
230 #define FMUL 296
231 #define FREIT 297
232 #define FSUB 298
233 #define FTOI 299
234 #define INT 300
235 #define ITOF 301
236 #define JMP 302
237 #define JSR 303
238 #define MACHI 304
239 #define MACLO 305
240 #define MAX 306
241 #define MIN 307
242 #define MOV 308
243 #define MOVU 309
244 #define MUL 310
245 #define MULHI 311
246 #define MULLO 312
247 #define MULU 313
248 #define MVFACHI 314
249 #define MVFACMI 315
250 #define MVFACLO 316
251 #define MVFC 317
252 #define MVTACHI 318
253 #define MVTACLO 319
254 #define MVTC 320
255 #define MVTIPL 321
256 #define NEG 322
257 #define NOP 323
258 #define NOT 324
259 #define OR 325
260 #define POP 326
261 #define POPC 327
262 #define POPM 328
263 #define PUSH 329
264 #define PUSHA 330
265 #define PUSHC 331
266 #define PUSHM 332
267 #define RACW 333
268 #define REIT 334
269 #define REVL 335
270 #define REVW 336
271 #define RMPA 337
272 #define ROLC 338
273 #define RORC 339
274 #define ROTL 340
275 #define ROTR 341
276 #define ROUND 342
277 #define RTE 343
278 #define RTFI 344
279 #define RTS 345
280 #define RTSD 346
281 #define SAT 347
282 #define SATR 348
283 #define SBB 349
284 #define SCCND 350
285 #define SCMPU 351
286 #define SETPSW 352
287 #define SHAR 353
288 #define SHLL 354
289 #define SHLR 355
290 #define SMOVB 356
291 #define SMOVF 357
292 #define SMOVU 358
293 #define SSTR 359
294 #define STNZ 360
295 #define STOP 361
296 #define STZ 362
297 #define SUB 363
298 #define SUNTIL 364
299 #define SWHILE 365
300 #define TST 366
301 #define WAIT 367
302 #define XCHG 368
303 #define XOR 369
304
305
306
307
308 /* Copy the first part of user declarations.  */
309 #line 20 "rx-parse.y"
310
311
312 #include "as.h"
313 #include "safe-ctype.h"
314 #include "rx-defs.h"
315
316 static int rx_lex (void);
317
318 #define COND_EQ 0
319 #define COND_NE 1
320
321 #define MEMEX 0x06
322
323 #define BSIZE 0
324 #define WSIZE 1
325 #define LSIZE 2
326
327 /*                       .sb    .sw    .l     .uw   */
328 static int sizemap[] = { BSIZE, WSIZE, LSIZE, WSIZE };
329
330 /* Ok, here are the rules for using these macros...
331
332    B*() is used to specify the base opcode bytes.  Fields to be filled
333         in later, leave zero.  Call this first.
334
335    F() and FE() are used to fill in fields within the base opcode bytes.  You MUST
336         call B*() before any F() or FE().
337
338    [UN]*O*(), PC*() appends operands to the end of the opcode.  You
339         must call P() and B*() before any of these, so that the fixups
340         have the right byte location.
341         O = signed, UO = unsigned, NO = negated, PC = pcrel
342
343    IMM() adds an immediate and fills in the field for it.
344    NIMM() same, but negates the immediate.
345    NBIMM() same, but negates the immediate, for sbb.
346    DSP() adds a displacement, and fills in the field for it.
347
348    Note that order is significant for the O, IMM, and DSP macros, as
349    they append their data to the operand buffer in the order that you
350    call them.
351
352    Use "disp" for displacements whenever possible; this handles the
353    "0" case properly.  */
354
355 #define B1(b1)             rx_base1 (b1)
356 #define B2(b1, b2)         rx_base2 (b1, b2)
357 #define B3(b1, b2, b3)     rx_base3 (b1, b2, b3)
358 #define B4(b1, b2, b3, b4) rx_base4 (b1, b2, b3, b4)
359
360 /* POS is bits from the MSB of the first byte to the LSB of the last byte.  */
361 #define F(val,pos,sz)      rx_field (val, pos, sz)
362 #define FE(exp,pos,sz)     rx_field (exp_val (exp), pos, sz);
363
364 #define O1(v)              rx_op (v, 1, RXREL_SIGNED); rx_range (v, -128, 255)
365 #define O2(v)              rx_op (v, 2, RXREL_SIGNED); rx_range (v, -32768, 65536)
366 #define O3(v)              rx_op (v, 3, RXREL_SIGNED); rx_range (v, -8388608, 16777216)
367 #define O4(v)              rx_op (v, 4, RXREL_SIGNED)
368
369 #define UO1(v)             rx_op (v, 1, RXREL_UNSIGNED); rx_range (v, 0, 255)
370 #define UO2(v)             rx_op (v, 2, RXREL_UNSIGNED); rx_range (v, 0, 65536)
371 #define UO3(v)             rx_op (v, 3, RXREL_UNSIGNED); rx_range (v, 0, 16777216)
372 #define UO4(v)             rx_op (v, 4, RXREL_UNSIGNED)
373
374 #define NO1(v)             rx_op (v, 1, RXREL_NEGATIVE)
375 #define NO2(v)             rx_op (v, 2, RXREL_NEGATIVE)
376 #define NO3(v)             rx_op (v, 3, RXREL_NEGATIVE)
377 #define NO4(v)             rx_op (v, 4, RXREL_NEGATIVE)
378
379 #define PC1(v)             rx_op (v, 1, RXREL_PCREL)
380 #define PC2(v)             rx_op (v, 2, RXREL_PCREL)
381 #define PC3(v)             rx_op (v, 3, RXREL_PCREL)
382
383 #define IMM_(v,pos,size)   F (immediate (v, RXREL_SIGNED, pos, size), pos, 2); \
384                            if (v.X_op != O_constant && v.X_op != O_big) rx_linkrelax_imm (pos)
385 #define IMM(v,pos)         IMM_ (v, pos, 32)
386 #define IMMW(v,pos)        IMM_ (v, pos, 16); rx_range (v, -32768, 65536)
387 #define IMMB(v,pos)        IMM_ (v, pos, 8); rx_range (v, -128, 255)
388 #define NIMM(v,pos)        F (immediate (v, RXREL_NEGATIVE, pos, 32), pos, 2)
389 #define NBIMM(v,pos)       F (immediate (v, RXREL_NEGATIVE_BORROW, pos, 32), pos, 2)
390 #define DSP(v,pos,msz)     if (!v.X_md) rx_relax (RX_RELAX_DISP, pos); \
391                            else rx_linkrelax_dsp (pos); \
392                            F (displacement (v, msz), pos, 2)
393
394 #define id24(a,b2,b3)      B3 (0xfb+a, b2, b3)
395
396 static void        rx_check_float_support (void);
397 static int         rx_intop (expressionS, int, int);
398 static int         rx_uintop (expressionS, int);
399 static int         rx_disp3op (expressionS);
400 static int         rx_disp5op (expressionS *, int);
401 static int         rx_disp5op0 (expressionS *, int);
402 static int         exp_val (expressionS exp);
403 static expressionS zero_expr (void);
404 static int         immediate (expressionS, int, int, int);
405 static int         displacement (expressionS, int);
406 static void        rtsd_immediate (expressionS);
407 static void        rx_range (expressionS, int, int);
408
409 static int    need_flag = 0;
410 static int    rx_in_brackets = 0;
411 static int    rx_last_token = 0;
412 static char * rx_init_start;
413 static char * rx_last_exp_start = 0;
414 static int    sub_op;
415 static int    sub_op2;
416
417 #define YYDEBUG 1
418 #define YYERROR_VERBOSE 1
419
420
421
422 /* Enabling traces.  */
423 #ifndef YYDEBUG
424 # define YYDEBUG 0
425 #endif
426
427 /* Enabling verbose error messages.  */
428 #ifdef YYERROR_VERBOSE
429 # undef YYERROR_VERBOSE
430 # define YYERROR_VERBOSE 1
431 #else
432 # define YYERROR_VERBOSE 0
433 #endif
434
435 /* Enabling the token table.  */
436 #ifndef YYTOKEN_TABLE
437 # define YYTOKEN_TABLE 0
438 #endif
439
440 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
441 typedef union YYSTYPE
442 #line 134 "rx-parse.y"
443 {
444   int regno;
445   expressionS exp;
446 }
447 /* Line 193 of yacc.c.  */
448 #line 449 "rx-parse.c"
449         YYSTYPE;
450 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
451 # define YYSTYPE_IS_DECLARED 1
452 # define YYSTYPE_IS_TRIVIAL 1
453 #endif
454
455
456
457 /* Copy the second part of user declarations.  */
458
459
460 /* Line 216 of yacc.c.  */
461 #line 462 "rx-parse.c"
462
463 #ifdef short
464 # undef short
465 #endif
466
467 #ifdef YYTYPE_UINT8
468 typedef YYTYPE_UINT8 yytype_uint8;
469 #else
470 typedef unsigned char yytype_uint8;
471 #endif
472
473 #ifdef YYTYPE_INT8
474 typedef YYTYPE_INT8 yytype_int8;
475 #elif (defined __STDC__ || defined __C99__FUNC__ \
476      || defined __cplusplus || defined _MSC_VER)
477 typedef signed char yytype_int8;
478 #else
479 typedef short int yytype_int8;
480 #endif
481
482 #ifdef YYTYPE_UINT16
483 typedef YYTYPE_UINT16 yytype_uint16;
484 #else
485 typedef unsigned short int yytype_uint16;
486 #endif
487
488 #ifdef YYTYPE_INT16
489 typedef YYTYPE_INT16 yytype_int16;
490 #else
491 typedef short int yytype_int16;
492 #endif
493
494 #ifndef YYSIZE_T
495 # ifdef __SIZE_TYPE__
496 #  define YYSIZE_T __SIZE_TYPE__
497 # elif defined size_t
498 #  define YYSIZE_T size_t
499 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
500      || defined __cplusplus || defined _MSC_VER)
501 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
502 #  define YYSIZE_T size_t
503 # else
504 #  define YYSIZE_T unsigned int
505 # endif
506 #endif
507
508 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
509
510 #ifndef YY_
511 # if defined YYENABLE_NLS && YYENABLE_NLS
512 #  if ENABLE_NLS
513 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
514 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
515 #  endif
516 # endif
517 # ifndef YY_
518 #  define YY_(msgid) msgid
519 # endif
520 #endif
521
522 /* Suppress unused-variable warnings by "using" E.  */
523 #if ! defined lint || defined __GNUC__
524 # define YYUSE(e) ((void) (e))
525 #else
526 # define YYUSE(e) /* empty */
527 #endif
528
529 /* Identity function, used to suppress warnings about constant conditions.  */
530 #ifndef lint
531 # define YYID(n) (n)
532 #else
533 #if (defined __STDC__ || defined __C99__FUNC__ \
534      || defined __cplusplus || defined _MSC_VER)
535 static int
536 YYID (int i)
537 #else
538 static int
539 YYID (i)
540     int i;
541 #endif
542 {
543   return i;
544 }
545 #endif
546
547 #if ! defined yyoverflow || YYERROR_VERBOSE
548
549 /* The parser invokes alloca or malloc; define the necessary symbols.  */
550
551 # ifdef YYSTACK_USE_ALLOCA
552 #  if YYSTACK_USE_ALLOCA
553 #   ifdef __GNUC__
554 #    define YYSTACK_ALLOC __builtin_alloca
555 #   elif defined __BUILTIN_VA_ARG_INCR
556 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
557 #   elif defined _AIX
558 #    define YYSTACK_ALLOC __alloca
559 #   elif defined _MSC_VER
560 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
561 #    define alloca _alloca
562 #   else
563 #    define YYSTACK_ALLOC alloca
564 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
565      || defined __cplusplus || defined _MSC_VER)
566 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
567 #     ifndef _STDLIB_H
568 #      define _STDLIB_H 1
569 #     endif
570 #    endif
571 #   endif
572 #  endif
573 # endif
574
575 # ifdef YYSTACK_ALLOC
576    /* Pacify GCC's `empty if-body' warning.  */
577 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
578 #  ifndef YYSTACK_ALLOC_MAXIMUM
579     /* The OS might guarantee only one guard page at the bottom of the stack,
580        and a page size can be as small as 4096 bytes.  So we cannot safely
581        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
582        to allow for a few compiler-allocated temporary stack slots.  */
583 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
584 #  endif
585 # else
586 #  define YYSTACK_ALLOC YYMALLOC
587 #  define YYSTACK_FREE YYFREE
588 #  ifndef YYSTACK_ALLOC_MAXIMUM
589 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
590 #  endif
591 #  if (defined __cplusplus && ! defined _STDLIB_H \
592        && ! ((defined YYMALLOC || defined malloc) \
593              && (defined YYFREE || defined free)))
594 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
595 #   ifndef _STDLIB_H
596 #    define _STDLIB_H 1
597 #   endif
598 #  endif
599 #  ifndef YYMALLOC
600 #   define YYMALLOC malloc
601 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
602      || defined __cplusplus || defined _MSC_VER)
603 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
604 #   endif
605 #  endif
606 #  ifndef YYFREE
607 #   define YYFREE free
608 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
609      || defined __cplusplus || defined _MSC_VER)
610 void free (void *); /* INFRINGES ON USER NAME SPACE */
611 #   endif
612 #  endif
613 # endif
614 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
615
616
617 #if (! defined yyoverflow \
618      && (! defined __cplusplus \
619          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
620
621 /* A type that is properly aligned for any stack member.  */
622 union yyalloc
623 {
624   yytype_int16 yyss;
625   YYSTYPE yyvs;
626   };
627
628 /* The size of the maximum gap between one aligned stack and the next.  */
629 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
630
631 /* The size of an array large to enough to hold all stacks, each with
632    N elements.  */
633 # define YYSTACK_BYTES(N) \
634      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
635       + YYSTACK_GAP_MAXIMUM)
636
637 /* Copy COUNT objects from FROM to TO.  The source and destination do
638    not overlap.  */
639 # ifndef YYCOPY
640 #  if defined __GNUC__ && 1 < __GNUC__
641 #   define YYCOPY(To, From, Count) \
642       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
643 #  else
644 #   define YYCOPY(To, From, Count)              \
645       do                                        \
646         {                                       \
647           YYSIZE_T yyi;                         \
648           for (yyi = 0; yyi < (Count); yyi++)   \
649             (To)[yyi] = (From)[yyi];            \
650         }                                       \
651       while (YYID (0))
652 #  endif
653 # endif
654
655 /* Relocate STACK from its old location to the new one.  The
656    local variables YYSIZE and YYSTACKSIZE give the old and new number of
657    elements in the stack, and YYPTR gives the new location of the
658    stack.  Advance YYPTR to a properly aligned location for the next
659    stack.  */
660 # define YYSTACK_RELOCATE(Stack)                                        \
661     do                                                                  \
662       {                                                                 \
663         YYSIZE_T yynewbytes;                                            \
664         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
665         Stack = &yyptr->Stack;                                          \
666         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
667         yyptr += yynewbytes / sizeof (*yyptr);                          \
668       }                                                                 \
669     while (YYID (0))
670
671 #endif
672
673 /* YYFINAL -- State number of the termination state.  */
674 #define YYFINAL  216
675 /* YYLAST -- Last index in YYTABLE.  */
676 #define YYLAST   627
677
678 /* YYNTOKENS -- Number of terminals.  */
679 #define YYNTOKENS  121
680 /* YYNNTS -- Number of nonterminals.  */
681 #define YYNNTS  63
682 /* YYNRULES -- Number of rules.  */
683 #define YYNRULES  246
684 /* YYNRULES -- Number of states.  */
685 #define YYNSTATES  611
686
687 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
688 #define YYUNDEFTOK  2
689 #define YYMAXUTOK   369
690
691 #define YYTRANSLATE(YYX)                                                \
692   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
693
694 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
695 static const yytype_uint8 yytranslate[] =
696 {
697        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
698        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
699        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
700        2,     2,     2,     2,     2,   115,     2,     2,     2,     2,
701        2,     2,     2,   120,   116,   119,     2,     2,     2,     2,
702        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
703        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
704        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
705        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
706        2,   117,     2,   118,     2,     2,     2,     2,     2,     2,
707        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
708        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
709        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
710        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
711        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
712        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
713        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
714        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
715        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
716        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
717        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
718        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
719        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
720        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
721        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
722        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
723        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
724       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
725       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
726       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
727       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
728       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
729       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
730       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
731       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
732       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
733      105,   106,   107,   108,   109,   110,   111,   112,   113,   114
734 };
735
736 #if YYDEBUG
737 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
738    YYRHS.  */
739 static const yytype_uint16 yyprhs[] =
740 {
741        0,     0,     3,     5,     7,     9,    11,    13,    16,    20,
742       24,    27,    31,    35,    39,    43,    47,    51,    55,    58,
743       68,    78,    88,    96,   101,   110,   119,   125,   133,   142,
744      148,   154,   160,   166,   172,   178,   185,   191,   195,   196,
745      200,   201,   205,   206,   210,   215,   220,   228,   232,   238,
746      244,   250,   253,   256,   259,   263,   266,   269,   272,   275,
747      278,   281,   284,   288,   292,   294,   296,   298,   300,   303,
748      306,   309,   312,   314,   316,   318,   320,   324,   333,   342,
749      350,   361,   373,   379,   387,   397,   407,   417,   424,   425,
750      429,   430,   434,   435,   439,   440,   444,   445,   449,   450,
751      454,   455,   459,   460,   464,   465,   469,   470,   474,   475,
752      479,   480,   484,   485,   489,   490,   494,   495,   499,   500,
753      504,   505,   509,   510,   514,   515,   519,   524,   529,   534,
754      539,   548,   557,   566,   575,   576,   580,   581,   585,   586,
755      590,   591,   595,   596,   600,   601,   605,   606,   610,   614,
756      621,   631,   641,   646,   651,   656,   661,   664,   667,   670,
757      673,   676,   680,   689,   698,   707,   716,   725,   734,   735,
758      739,   740,   744,   745,   749,   750,   754,   759,   764,   770,
759      776,   782,   788,   794,   804,   814,   824,   825,   829,   830,
760      834,   835,   839,   840,   844,   845,   849,   855,   859,   867,
761      875,   881,   885,   893,   897,   905,   913,   918,   920,   922,
762      924,   926,   930,   932,   936,   944,   952,   956,   961,   968,
763      970,   971,   977,   979,   980,   985,   986,   995,   996,   998,
764      999,  1002,  1004,  1006,  1007,  1009,  1011,  1012,  1014,  1016,
765     1018,  1019,  1021,  1023,  1024,  1026,  1027
766 };
767
768 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
769 static const yytype_int16 yyrhs[] =
770 {
771      122,     0,    -1,     7,    -1,    25,    -1,    31,    -1,    90,
772       -1,    68,    -1,    24,     6,    -1,    24,    13,     6,    -1,
773       24,     9,     6,    -1,    27,     6,    -1,    27,    13,     6,
774       -1,    21,     9,     6,    -1,    21,    10,     6,    -1,    24,
775       10,     6,    -1,    24,    11,     6,    -1,    27,    11,     6,
776       -1,    21,    11,     6,    -1,    21,     6,    -1,    53,    10,
777      115,     6,   116,   176,   117,     3,   118,    -1,    53,    11,
778      115,     6,   116,   176,   117,     3,   118,    -1,    53,    12,
779      115,     6,   116,   176,   117,     3,   118,    -1,    91,   115,
780        6,   116,     3,   119,     3,    -1,    30,     3,   116,     3,
781       -1,    30,   176,   117,     3,   118,    14,   116,     3,    -1,
782       30,   176,   117,     3,   118,   179,   116,     3,    -1,    54,
783      181,     3,   116,     3,    -1,    54,   181,   117,     3,   118,
784      116,     3,    -1,    54,   181,     6,   117,     3,   118,   116,
785        3,    -1,   108,   115,     6,   116,     3,    -1,    30,   115,
786        6,   116,     3,    -1,    18,   115,     6,   116,     3,    -1,
787       55,   115,     6,   116,     3,    -1,    19,   115,     6,   116,
788        3,    -1,    70,   115,     6,   116,     3,    -1,    53,    12,
789      115,     6,   116,     3,    -1,    53,   115,     6,   116,     3,
790       -1,    91,   115,     6,    -1,    -1,   100,   123,   170,    -1,
791       -1,    98,   124,   170,    -1,    -1,    99,   125,   170,    -1,
792       77,     3,   119,     3,    -1,    73,     3,   119,     3,    -1,
793       18,   115,     6,   116,     3,   116,     3,    -1,    45,   115,
794        6,    -1,    26,   115,     6,   116,     3,    -1,    20,   115,
795        6,   116,     3,    -1,    28,   115,     6,   116,     3,    -1,
796       92,     3,    -1,    84,     3,    -1,    83,     3,    -1,    74,
797      180,     3,    -1,    71,     3,    -1,    76,     5,    -1,    72,
798        5,    -1,    97,   177,    -1,    29,   177,    -1,    47,     3,
799       -1,    48,     3,    -1,    24,   182,     3,    -1,    27,   182,
800        3,    -1,    96,    -1,   103,    -1,   101,    -1,   102,    -1,
801      109,   180,    -1,   110,   180,    -1,   104,   180,    -1,    82,
802      180,    -1,    89,    -1,    88,    -1,   112,    -1,    93,    -1,
803       66,   115,     6,    -1,    53,   180,     3,   116,     6,   117,
804        3,   118,    -1,    53,   180,     6,   117,     3,   118,   116,
805        3,    -1,    53,   180,     3,   116,   117,     3,   118,    -1,
806       53,   180,   117,     3,   118,   116,   176,   117,     3,   118,
807       -1,    53,   180,     6,   117,     3,   118,   116,   176,   117,
808        3,   118,    -1,    53,   180,     3,   116,     3,    -1,    53,
809      180,   117,     3,   118,   116,     3,    -1,    26,   115,     6,
810      116,   176,   117,     3,   118,    10,    -1,    20,   115,     6,
811      116,   176,   117,     3,   118,    10,    -1,    28,   115,     6,
812      116,   176,   117,     3,   118,    10,    -1,    74,   180,   176,
813      117,     3,   118,    -1,    -1,    94,   126,   162,    -1,    -1,
814       67,   127,   167,    -1,    -1,    17,   128,   166,    -1,    -1,
815       16,   129,   167,    -1,    -1,    51,   130,   165,    -1,    -1,
816       52,   131,   165,    -1,    -1,    36,   132,   164,    -1,    -1,
817       37,   133,   164,    -1,    -1,    32,   134,   165,    -1,    -1,
818       33,   135,   165,    -1,    -1,   111,   136,   165,    -1,    -1,
819      114,   137,   165,    -1,    -1,    69,   138,   167,    -1,    -1,
820      107,   139,   164,    -1,    -1,   105,   140,   164,    -1,    -1,
821       36,   141,   168,    -1,    -1,    37,   142,   168,    -1,    -1,
822      113,   143,   168,    -1,    -1,    46,   144,   168,    -1,    26,
823        3,   116,     3,    -1,    20,     3,   116,     3,    -1,    28,
824        3,   116,     3,    -1,    23,     3,   116,     3,    -1,    26,
825        3,   116,   176,   117,     3,   118,   183,    -1,    20,     3,
826      116,   176,   117,     3,   118,   183,    -1,    28,     3,   116,
827      176,   117,     3,   118,   183,    -1,    23,     3,   116,   176,
828      117,     3,   118,   183,    -1,    -1,    43,   145,   171,    -1,
829       -1,    39,   146,   171,    -1,    -1,    38,   147,   171,    -1,
830       -1,    41,   148,   171,    -1,    -1,    40,   149,   171,    -1,
831       -1,    44,   150,   173,    -1,    -1,    87,   151,   173,    -1,
832       95,    12,     3,    -1,    95,   180,   176,   117,     3,   118,
833       -1,    22,   115,     6,   116,   176,   117,     3,   118,   183,
834       -1,    23,   115,     6,   116,   176,   117,     3,   118,   183,
835       -1,    56,     3,   116,     3,    -1,    57,     3,   116,     3,
836       -1,    49,     3,   116,     3,    -1,    50,     3,   116,     3,
837       -1,    63,     3,    -1,    64,     3,    -1,    59,     3,    -1,
838       60,     3,    -1,    61,     3,    -1,    78,   115,     6,    -1,
839       53,   180,     3,   116,   117,     3,   120,   118,    -1,    53,
840      180,     3,   116,   117,   119,     3,   118,    -1,    53,   180,
841      117,     3,   120,   118,   116,     3,    -1,    53,   180,   117,
842      119,     3,   118,   116,     3,    -1,    54,   181,   117,     3,
843      120,   118,   116,     3,    -1,    54,   181,   117,   119,     3,
844      118,   116,     3,    -1,    -1,    85,   152,   169,    -1,    -1,
845       86,   153,   169,    -1,    -1,    81,   154,   169,    -1,    -1,
846       80,   155,   169,    -1,    65,     3,   116,     5,    -1,    62,
847        5,   116,     3,    -1,    85,   115,     6,   116,     3,    -1,
848       86,   115,     6,   116,     3,    -1,    65,   115,     6,   116,
849        5,    -1,    22,   115,     6,   116,     3,    -1,    23,   115,
850        6,   116,     3,    -1,    53,   180,     3,   116,   117,     3,
851      116,     3,   118,    -1,    53,   180,   117,     3,   116,     3,
852      118,   116,     3,    -1,    54,   181,   117,     3,   116,     3,
853      118,   116,     3,    -1,    -1,   108,   156,   161,    -1,    -1,
854       18,   157,   161,    -1,    -1,    55,   158,   161,    -1,    -1,
855       19,   159,   161,    -1,    -1,    70,   160,   161,    -1,    94,
856      115,     6,   116,     3,    -1,     3,   116,     3,    -1,   176,
857      117,     3,   118,    14,   116,     3,    -1,   176,   117,     3,
858      118,   179,   116,     3,    -1,     3,   116,     3,   116,     3,
859       -1,     3,   116,     3,    -1,   176,   117,     3,   118,   182,
860      116,     3,    -1,     3,   116,     3,    -1,   176,   117,     3,
861      118,    14,   116,     3,    -1,   176,   117,     3,   118,   179,
862      116,     3,    -1,   115,     6,   116,     3,    -1,   163,    -1,
863      164,    -1,   162,    -1,   164,    -1,     3,   116,     3,    -1,
864        3,    -1,     3,   116,     3,    -1,   176,   117,     3,   118,
865       14,   116,     3,    -1,   176,   117,     3,   118,   179,   116,
866        3,    -1,     3,   116,     3,    -1,   115,     6,   116,     3,
867       -1,   115,     6,   116,     3,   116,     3,    -1,   169,    -1,
868       -1,   172,   115,     6,   116,     3,    -1,   173,    -1,    -1,
869      174,     3,   116,     3,    -1,    -1,   175,   176,   117,     3,
870      118,   182,   116,     3,    -1,    -1,     6,    -1,    -1,   178,
871        4,    -1,    10,    -1,    11,    -1,    -1,    12,    -1,    15,
872       -1,    -1,    10,    -1,    11,    -1,    12,    -1,    -1,    10,
873       -1,    11,    -1,    -1,    12,    -1,    -1,    10,    -1
874 };
875
876 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
877 static const yytype_uint16 yyrline[] =
878 {
879        0,   174,   174,   179,   182,   185,   188,   193,   208,   211,
880      216,   225,   230,   238,   241,   246,   248,   250,   255,   273,
881      281,   287,   295,   304,   309,   312,   317,   322,   325,   333,
882      340,   348,   354,   360,   366,   372,   380,   390,   395,   395,
883      396,   396,   397,   397,   401,   414,   427,   432,   437,   439,
884      444,   449,   451,   453,   458,   463,   468,   476,   484,   486,
885      491,   493,   495,   497,   502,   504,   506,   508,   513,   515,
886      517,   522,   527,   529,   531,   533,   538,   544,   552,   566,
887      571,   576,   581,   586,   591,   593,   595,   600,   605,   605,
888      606,   606,   607,   607,   608,   608,   609,   609,   610,   610,
889      611,   611,   612,   612,   613,   613,   614,   614,   615,   615,
890      616,   616,   617,   617,   618,   618,   619,   619,   623,   623,
891      624,   624,   625,   625,   626,   626,   630,   632,   634,   636,
892      639,   641,   643,   645,   650,   650,   651,   651,   652,   652,
893      653,   653,   654,   654,   655,   655,   656,   656,   660,   662,
894      667,   673,   679,   681,   683,   685,   691,   693,   695,   697,
895      699,   702,   713,   715,   720,   722,   727,   729,   734,   734,
896      735,   735,   736,   736,   737,   737,   741,   747,   752,   754,
897      759,   764,   770,   775,   778,   781,   786,   786,   787,   787,
898      788,   788,   789,   789,   790,   790,   795,   805,   807,   809,
899      811,   818,   820,   828,   830,   832,   838,   843,   844,   848,
900      849,   853,   855,   861,   863,   865,   872,   876,   878,   880,
901      885,   885,   888,   892,   892,   895,   895,   902,   903,   906,
902      906,   911,   912,   913,   914,   915,   918,   919,   920,   921,
903      924,   925,   926,   929,   930,   933,   934
904 };
905 #endif
906
907 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
908 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
909    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
910 static const char *const yytname[] =
911 {
912   "$end", "error", "$undefined", "REG", "FLAG", "CREG", "EXPR",
913   "UNKNOWN_OPCODE", "IS_OPCODE", "DOT_S", "DOT_B", "DOT_W", "DOT_L",
914   "DOT_A", "DOT_UB", "DOT_UW", "ABS", "ADC", "ADD", "AND_", "BCLR", "BCND",
915   "BMCND", "BNOT", "BRA", "BRK", "BSET", "BSR", "BTST", "CLRPSW", "CMP",
916   "DBT", "DIV", "DIVU", "EDIV", "EDIVU", "EMUL", "EMULU", "FADD", "FCMP",
917   "FDIV", "FMUL", "FREIT", "FSUB", "FTOI", "INT", "ITOF", "JMP", "JSR",
918   "MACHI", "MACLO", "MAX", "MIN", "MOV", "MOVU", "MUL", "MULHI", "MULLO",
919   "MULU", "MVFACHI", "MVFACMI", "MVFACLO", "MVFC", "MVTACHI", "MVTACLO",
920   "MVTC", "MVTIPL", "NEG", "NOP", "NOT", "OR", "POP", "POPC", "POPM",
921   "PUSH", "PUSHA", "PUSHC", "PUSHM", "RACW", "REIT", "REVL", "REVW",
922   "RMPA", "ROLC", "RORC", "ROTL", "ROTR", "ROUND", "RTE", "RTFI", "RTS",
923   "RTSD", "SAT", "SATR", "SBB", "SCCND", "SCMPU", "SETPSW", "SHAR", "SHLL",
924   "SHLR", "SMOVB", "SMOVF", "SMOVU", "SSTR", "STNZ", "STOP", "STZ", "SUB",
925   "SUNTIL", "SWHILE", "TST", "WAIT", "XCHG", "XOR", "'#'", "','", "'['",
926   "']'", "'-'", "'+'", "$accept", "statement", "@1", "@2", "@3", "@4",
927   "@5", "@6", "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15",
928   "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25",
929   "@26", "@27", "@28", "@29", "@30", "@31", "@32", "@33", "@34", "@35",
930   "@36", "@37", "@38", "op_subadd", "op_dp20_rm_l", "op_dp20_rm",
931   "op_dp20_i", "op_dp20_rim", "op_dp20_rim_l", "op_dp20_rr", "op_xchg",
932   "op_shift_rot", "op_shift", "float2_op", "@39", "float2_op_ni", "@40",
933   "@41", "disp", "flag", "@42", "memex", "bwl", "bw", "opt_l", "opt_b", 0
934 };
935 #endif
936
937 # ifdef YYPRINT
938 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
939    token YYLEX-NUM.  */
940 static const yytype_uint16 yytoknum[] =
941 {
942        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
943      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
944      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
945      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
946      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
947      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
948      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
949      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
950      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
951      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
952      355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
953      365,   366,   367,   368,   369,    35,    44,    91,    93,    45,
954       43
955 };
956 # endif
957
958 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
959 static const yytype_uint8 yyr1[] =
960 {
961        0,   121,   122,   122,   122,   122,   122,   122,   122,   122,
962      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
963      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
964      122,   122,   122,   122,   122,   122,   122,   122,   123,   122,
965      124,   122,   125,   122,   122,   122,   122,   122,   122,   122,
966      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
967      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
968      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
969      122,   122,   122,   122,   122,   122,   122,   122,   126,   122,
970      127,   122,   128,   122,   129,   122,   130,   122,   131,   122,
971      132,   122,   133,   122,   134,   122,   135,   122,   136,   122,
972      137,   122,   138,   122,   139,   122,   140,   122,   141,   122,
973      142,   122,   143,   122,   144,   122,   122,   122,   122,   122,
974      122,   122,   122,   122,   145,   122,   146,   122,   147,   122,
975      148,   122,   149,   122,   150,   122,   151,   122,   122,   122,
976      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
977      122,   122,   122,   122,   122,   122,   122,   122,   152,   122,
978      153,   122,   154,   122,   155,   122,   122,   122,   122,   122,
979      122,   122,   122,   122,   122,   122,   156,   122,   157,   122,
980      158,   122,   159,   122,   160,   122,   122,   161,   161,   161,
981      161,   162,   162,   163,   163,   163,   164,   165,   165,   166,
982      166,   167,   167,   168,   168,   168,   169,   170,   170,   170,
983      172,   171,   171,   174,   173,   175,   173,   176,   176,   178,
984      177,   179,   179,   179,   179,   179,   180,   180,   180,   180,
985      181,   181,   181,   182,   182,   183,   183
986 };
987
988 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
989 static const yytype_uint8 yyr2[] =
990 {
991        0,     2,     1,     1,     1,     1,     1,     2,     3,     3,
992        2,     3,     3,     3,     3,     3,     3,     3,     2,     9,
993        9,     9,     7,     4,     8,     8,     5,     7,     8,     5,
994        5,     5,     5,     5,     5,     6,     5,     3,     0,     3,
995        0,     3,     0,     3,     4,     4,     7,     3,     5,     5,
996        5,     2,     2,     2,     3,     2,     2,     2,     2,     2,
997        2,     2,     3,     3,     1,     1,     1,     1,     2,     2,
998        2,     2,     1,     1,     1,     1,     3,     8,     8,     7,
999       10,    11,     5,     7,     9,     9,     9,     6,     0,     3,
1000        0,     3,     0,     3,     0,     3,     0,     3,     0,     3,
1001        0,     3,     0,     3,     0,     3,     0,     3,     0,     3,
1002        0,     3,     0,     3,     0,     3,     0,     3,     0,     3,
1003        0,     3,     0,     3,     0,     3,     4,     4,     4,     4,
1004        8,     8,     8,     8,     0,     3,     0,     3,     0,     3,
1005        0,     3,     0,     3,     0,     3,     0,     3,     3,     6,
1006        9,     9,     4,     4,     4,     4,     2,     2,     2,     2,
1007        2,     3,     8,     8,     8,     8,     8,     8,     0,     3,
1008        0,     3,     0,     3,     0,     3,     4,     4,     5,     5,
1009        5,     5,     5,     9,     9,     9,     0,     3,     0,     3,
1010        0,     3,     0,     3,     0,     3,     5,     3,     7,     7,
1011        5,     3,     7,     3,     7,     7,     4,     1,     1,     1,
1012        1,     3,     1,     3,     7,     7,     3,     4,     6,     1,
1013        0,     5,     1,     0,     4,     0,     8,     0,     1,     0,
1014        2,     1,     1,     0,     1,     1,     0,     1,     1,     1,
1015        0,     1,     1,     0,     1,     0,     1
1016 };
1017
1018 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1019    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
1020    means the default is an error.  */
1021 static const yytype_uint8 yydefact[] =
1022 {
1023        0,     2,    94,    92,   188,   192,     0,     0,     0,     0,
1024      243,     3,     0,   243,     0,   229,   227,     4,   104,   106,
1025      118,   120,   138,   136,   142,   140,   134,   144,     0,   124,
1026        0,     0,     0,     0,    96,    98,   236,   240,   190,     0,
1027        0,     0,     0,     0,     0,     0,     0,     0,     0,    90,
1028        6,   112,   194,     0,     0,     0,   236,     0,     0,     0,
1029      174,   172,   236,     0,     0,   168,   170,   146,    73,    72,
1030        5,     0,     0,    75,    88,   236,    64,   229,    40,    42,
1031       38,    66,    67,    65,   236,   116,   114,   186,   236,   236,
1032      108,    74,   122,   110,     0,     0,   227,     0,   227,     0,
1033      227,     0,     0,    18,     0,     0,     0,     0,     0,     0,
1034        7,     0,     0,     0,   244,     0,     0,     0,     0,    10,
1035        0,     0,     0,     0,     0,    59,     0,     0,   228,     0,
1036        0,   227,   227,     0,   227,     0,   227,   225,   225,   225,
1037      225,   225,   225,     0,   227,    60,    61,     0,     0,   227,
1038      227,   237,   238,   239,     0,     0,   241,   242,     0,     0,
1039      227,     0,     0,   158,   159,   160,     0,   156,   157,     0,
1040        0,     0,     0,     0,     0,   227,    55,    57,     0,   237,
1041      238,   239,   227,    56,     0,     0,     0,     0,    71,    53,
1042       52,     0,     0,     0,     0,   225,     0,    51,     0,   227,
1043      239,   227,    58,     0,     0,     0,    70,     0,     0,     0,
1044      227,    68,    69,   227,   227,   227,     1,   212,    95,     0,
1045        0,   209,   210,    93,     0,     0,     0,   189,     0,     0,
1046      193,   227,     0,    12,    13,    17,     0,   227,     0,     9,
1047       14,    15,     8,    62,   227,     0,    16,    11,    63,   227,
1048        0,   230,     0,     0,     0,     0,   207,   208,   105,     0,
1049      107,   101,     0,   119,     0,   103,   121,   139,     0,   222,
1050        0,   227,   137,   143,   141,   135,   145,    47,   125,     0,
1051        0,    97,    99,     0,     0,     0,     0,     0,     0,     0,
1052        0,     0,     0,     0,   191,     0,     0,     0,     0,     0,
1053       76,    91,   113,     0,   195,     0,    54,     0,     0,   161,
1054        0,   175,   173,     0,   169,     0,   171,   147,    37,     0,
1055       89,   148,     0,     0,   219,    41,    43,    39,   117,   115,
1056        0,   187,   109,   123,   111,     0,     0,     0,     0,     0,
1057        0,     0,     0,   127,     0,   227,   227,   129,     0,   227,
1058      126,     0,   227,   128,     0,   227,    23,     0,     0,     0,
1059        0,     0,     0,     0,     0,     0,   154,   155,     0,     0,
1060        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1061        0,   152,   153,   177,   176,     0,     0,    45,     0,    44,
1062        0,     0,     0,     0,     0,     0,     0,     0,   211,   201,
1063        0,     0,    31,   197,     0,    33,     0,    49,     0,   181,
1064        0,     0,   182,     0,     0,    48,     0,     0,    50,     0,
1065       30,   233,   203,     0,   213,     0,     0,     0,     0,   227,
1066      227,   227,    36,    82,     0,     0,     0,     0,     0,     0,
1067        0,    26,     0,     0,     0,     0,     0,    32,   180,    34,
1068        0,   216,   178,   179,     0,   196,     0,     0,    29,   206,
1069      243,     0,     0,   233,     0,     0,     0,     0,     0,     0,
1070        0,     0,     0,   231,   232,   234,     0,   235,     0,   233,
1071      233,     0,   224,     0,     0,     0,    35,     0,     0,     0,
1072        0,     0,     0,   227,     0,     0,     0,     0,     0,     0,
1073        0,    87,     0,   149,   217,     0,    46,   200,     0,     0,
1074      245,     0,     0,   245,     0,   245,     0,   245,     0,     0,
1075        0,     0,     0,     0,     0,   221,   243,     0,     0,     0,
1076        0,     0,    79,     0,     0,   227,     0,    83,     0,     0,
1077        0,     0,     0,    27,     0,     0,    22,     0,     0,     0,
1078        0,   246,   131,     0,   245,   133,   245,   130,     0,   132,
1079        0,    24,    25,     0,     0,     0,     0,     0,     0,     0,
1080        0,    77,     0,   162,   163,    78,     0,     0,     0,   164,
1081      165,    28,     0,   166,   167,   218,   202,   198,   199,    85,
1082      150,   151,    84,    86,   204,   205,   214,   215,     0,    19,
1083       20,    21,   183,     0,   184,     0,   185,   226,     0,    80,
1084       81
1085 };
1086
1087 /* YYDEFGOTO[NTERM-NUM].  */
1088 static const yytype_int16 yydefgoto[] =
1089 {
1090       -1,    94,   205,   203,   204,   199,   172,    96,    95,   149,
1091      150,   133,   135,   131,   132,   213,   215,   173,   208,   207,
1092      134,   136,   214,   144,   141,   138,   137,   140,   139,   142,
1093      195,   192,   194,   187,   186,   210,    98,   160,   100,   175,
1094      227,   221,   256,   257,   258,   223,   218,   263,   324,   325,
1095      267,   268,   269,   270,   271,   259,   125,   126,   478,   155,
1096      158,   116,   552
1097 };
1098
1099 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1100    STATE-NUM.  */
1101 #define YYPACT_NINF -483
1102 static const yytype_int16 yypact[] =
1103 {
1104      504,  -483,  -483,  -483,   -78,   -55,    16,   141,   -53,    18,
1105       34,  -483,    19,    75,    20,  -483,     1,  -483,  -483,  -483,
1106      -49,   -32,  -483,  -483,  -483,  -483,  -483,  -483,   -30,  -483,
1107       51,    92,   127,   145,  -483,  -483,    17,    79,    45,   146,
1108      158,   177,   193,   194,   188,   196,   200,    21,    89,  -483,
1109     -483,  -483,    90,   203,   202,   205,    67,   204,   207,    96,
1110     -483,  -483,    67,   209,   210,    99,   101,  -483,  -483,  -483,
1111     -483,   102,   215,  -483,   104,   190,  -483,  -483,  -483,  -483,
1112     -483,  -483,  -483,  -483,    67,  -483,  -483,   105,    67,    67,
1113     -483,  -483,  -483,  -483,   222,   220,    12,   218,    47,   219,
1114       47,   110,   221,  -483,   223,   224,   225,   226,   118,   229,
1115     -483,   230,   231,   232,  -483,   233,   237,   125,   236,  -483,
1116      238,   239,   240,   130,   241,  -483,   244,   133,  -483,   245,
1117      135,    14,    14,   138,    53,   138,    53,    22,    22,    22,
1118       22,    22,   247,   248,    53,  -483,  -483,   140,   142,    14,
1119       14,   144,   147,   148,   251,     6,  -483,  -483,     7,   254,
1120       47,   149,   150,  -483,  -483,  -483,   151,  -483,  -483,   152,
1121      255,   258,   220,   220,   263,    47,  -483,  -483,   153,  -483,
1122     -483,  -483,    64,  -483,   154,   264,   268,   268,  -483,  -483,
1123     -483,   269,   268,   270,   268,   247,   271,  -483,   272,    98,
1124      276,   274,  -483,    23,    23,    23,  -483,   138,   138,   275,
1125       47,  -483,  -483,    14,    53,    14,  -483,   167,  -483,   168,
1126      279,  -483,  -483,  -483,   157,   173,   174,  -483,   169,   175,
1127     -483,   164,   179,  -483,  -483,  -483,   180,   165,   181,  -483,
1128     -483,  -483,  -483,  -483,   166,   182,  -483,  -483,  -483,   170,
1129      186,  -483,   284,   187,   285,   191,  -483,  -483,  -483,   192,
1130     -483,  -483,   195,  -483,   197,  -483,  -483,  -483,   198,  -483,
1131      289,   274,  -483,  -483,  -483,  -483,  -483,  -483,  -483,   290,
1132      291,  -483,  -483,   293,   294,   295,   199,   201,   206,     0,
1133      208,   211,     2,   216,  -483,   301,   302,   303,   277,   227,
1134     -483,  -483,  -483,   228,  -483,   305,  -483,   214,   307,  -483,
1135      234,  -483,  -483,   235,  -483,   242,  -483,  -483,   243,   246,
1136     -483,  -483,   217,   306,  -483,  -483,  -483,  -483,  -483,  -483,
1137      249,  -483,  -483,  -483,  -483,   313,   315,   250,   316,   317,
1138      318,   319,   322,  -483,   252,   171,   172,  -483,   253,   176,
1139     -483,   256,   178,  -483,   257,   183,  -483,   323,   259,   324,
1140      332,   334,   335,   336,   260,   261,  -483,  -483,   265,   266,
1141      267,   337,     8,   338,   -45,   342,   343,   344,    37,   345,
1142      346,  -483,  -483,  -483,  -483,   347,   350,  -483,   351,  -483,
1143      352,   353,   354,   357,   358,   360,   273,   361,  -483,  -483,
1144      364,   262,   278,   280,   281,  -483,   365,  -483,   283,  -483,
1145      286,   368,  -483,   287,   369,  -483,   288,   372,  -483,   292,
1146     -483,    82,  -483,   298,  -483,   299,   282,   376,   381,   274,
1147      274,   184,  -483,  -483,   304,     3,   300,   382,   296,   308,
1148      309,  -483,   310,   383,   314,   311,   320,  -483,  -483,  -483,
1149      321,  -483,  -483,  -483,   312,  -483,   325,   384,  -483,  -483,
1150      378,   385,   388,    88,   326,   389,   390,   327,   392,   328,
1151      394,   329,   398,  -483,  -483,  -483,   333,  -483,   339,    95,
1152      131,   399,  -483,   340,   348,   349,  -483,   355,   403,    38,
1153      404,   341,   356,   185,   359,   362,   363,   366,   405,   367,
1154      370,  -483,   407,  -483,   371,   373,  -483,  -483,   374,   375,
1155      401,   377,   379,   401,   380,   401,   386,   401,   387,   416,
1156      417,   391,   393,   396,   397,  -483,   378,   419,   420,   421,
1157      400,   422,  -483,   428,   444,   189,   423,  -483,   462,   429,
1158      430,   431,   467,  -483,   432,   433,  -483,   434,   437,   438,
1159      439,  -483,  -483,   440,   401,  -483,   401,  -483,   441,  -483,
1160      442,  -483,  -483,   450,   451,   453,   456,   494,   501,   502,
1161      503,  -483,   505,  -483,  -483,  -483,   507,   457,   458,  -483,
1162     -483,  -483,   459,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
1163     -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,   460,  -483,
1164     -483,  -483,  -483,   461,  -483,   508,  -483,  -483,   509,  -483,
1165     -483
1166 };
1167
1168 /* YYPGOTO[NTERM-NUM].  */
1169 static const yytype_int16 yypgoto[] =
1170 {
1171     -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
1172     -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
1173     -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
1174     -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
1175      -84,   297,  -483,   -94,   -98,  -483,   -61,  -106,  -129,   -65,
1176       24,  -483,  -134,  -483,  -483,   -16,   408,  -483,  -431,   -20,
1177     -483,   -12,  -482
1178 };
1179
1180 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1181    positive, shift that token.  If negative, reduce the rule which
1182    number is the opposite.  If zero, do what YYDEFACT says.
1183    If YYTABLE_NINF, syntax error.  */
1184 #define YYTABLE_NINF -224
1185 static const yytype_int16 yytable[] =
1186 {
1187      130,   122,   222,   374,   127,   378,   489,   128,   276,   287,
1188      290,   433,   288,   291,   434,   219,   230,   255,   128,   101,
1189      128,   108,   117,   123,   169,  -223,   310,   151,   152,   153,
1190      266,   555,   509,   557,   260,   559,   182,    97,   278,   261,
1191      110,   265,   188,   111,   112,   113,   114,   115,   522,   524,
1192      226,   281,   282,   128,   145,   201,   262,   311,   312,   128,
1193       99,   317,   107,   314,   206,   316,  -100,   306,   211,   212,
1194      128,   437,   590,   438,   591,   439,   294,   179,   180,   181,
1195      224,   119,   228,  -102,   228,   143,   120,   114,   121,   156,
1196      157,   304,   473,   474,   475,   146,   476,   477,   473,   474,
1197      475,   219,   508,   477,   128,   473,   474,   475,   333,   521,
1198      477,   301,   302,   328,   329,   332,   129,   334,   264,   375,
1199      264,   379,   490,   289,   292,   435,   331,   220,   264,   220,
1200      147,   102,   154,   109,   118,   124,   170,  -220,   323,   326,
1201      327,   473,   474,   475,   228,   523,   477,   103,   148,   161,
1202      104,   105,   106,   443,   531,   444,   532,   445,   533,   228,
1203      159,   162,   272,   273,   274,   275,   307,   343,   347,   350,
1204      128,   128,   128,   353,   407,   409,   128,   128,   128,   412,
1205      163,   415,   128,   224,   128,   322,   418,   486,   537,   128,
1206      128,   128,   575,   166,   228,   128,   164,   165,   264,   167,
1207      179,   180,   200,   168,   171,   174,   176,   177,   178,   183,
1208      184,   185,   189,   190,   191,   344,   193,   196,   197,   198,
1209      209,   348,   216,   217,   225,   229,   231,   232,   351,   233,
1210      234,   235,   236,   354,   237,   238,   239,   240,   241,   242,
1211      243,   244,   245,   248,   246,   247,   249,   250,   251,   252,
1212     -223,   253,   254,   220,   277,   365,   279,   286,   280,   283,
1213      293,   299,   284,   285,   300,   295,   296,   297,   298,   303,
1214      309,   310,   305,   308,   338,   313,   315,   318,   319,   321,
1215      128,   330,   384,   335,   336,   337,   341,   356,   358,   339,
1216      340,   342,   364,   366,   367,   345,   346,   349,   352,   368,
1217      369,   370,   355,   357,   381,   382,   383,   359,   387,   360,
1218      389,   361,   396,   363,   362,   371,   398,   372,   399,   401,
1219      402,   403,   404,   373,   376,   405,   420,   422,   377,   408,
1220      410,   388,   380,   413,   395,   423,   416,   424,   425,   419,
1221      432,   436,   426,   385,   386,   440,   441,   442,   446,   447,
1222      390,   391,   448,   449,   450,   451,   452,   453,   392,   393,
1223      454,   455,   394,   456,   458,   397,   400,   459,   464,   406,
1224      411,   467,   469,   414,   417,   471,   427,   421,   428,   482,
1225      460,   429,   430,   431,   483,   492,   497,   504,   506,   457,
1226      114,   507,   511,   512,   461,   514,   462,   516,   481,   463,
1227      465,   518,   525,   466,   468,   470,   530,   534,   543,   472,
1228      546,   551,   493,   484,   485,   487,   479,   480,   491,   561,
1229      562,   488,   568,   569,   570,   572,   494,   495,   496,   499,
1230      498,   502,   579,   580,   581,   583,   584,   585,   500,   501,
1231      586,   587,   588,   503,   510,   513,   515,   517,   505,   519,
1232      589,   592,   593,   594,   595,   520,   596,   535,   526,   597,
1233      604,   605,   606,   607,   608,   527,   528,     0,     0,     0,
1234        0,     0,   529,     0,   536,   539,     0,   538,   540,   541,
1235        0,     0,     0,   544,   542,   202,   545,   547,     0,   548,
1236      549,   550,     0,     0,     0,   553,   320,   554,   556,     0,
1237        0,     0,     0,     0,   558,   560,     0,   563,     0,   564,
1238        0,     1,   565,   566,   567,     0,     0,     0,   571,   576,
1239        2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1240       12,    13,    14,    15,    16,    17,    18,    19,     0,   577,
1241       20,    21,    22,    23,    24,    25,   573,    26,    27,    28,
1242       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
1243       39,    40,   574,    41,    42,    43,    44,    45,    46,    47,
1244       48,    49,    50,    51,    52,    53,    54,    55,    56,   578,
1245       57,    58,    59,   582,    60,    61,    62,    63,    64,    65,
1246       66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
1247       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
1248      598,    86,    87,    88,    89,    90,    91,    92,    93,   599,
1249      600,   601,     0,   602,   603,     0,   609,   610
1250 };
1251
1252 static const yytype_int16 yycheck[] =
1253 {
1254       16,    13,    96,     3,     3,     3,     3,     6,   142,     3,
1255        3,     3,     6,     6,     6,     3,   100,     3,     6,     3,
1256        6,     3,     3,     3,     3,     3,     3,    10,    11,    12,
1257      136,   513,   463,   515,   132,   517,    56,   115,   144,   133,
1258        6,   135,    62,     9,    10,    11,    12,    13,   479,   480,
1259        3,   149,   150,     6,     3,    75,     3,   186,   187,     6,
1260      115,   195,   115,   192,    84,   194,   115,     3,    88,    89,
1261        6,   116,   554,   118,   556,   120,   160,    10,    11,    12,
1262       96,     6,    98,   115,   100,   115,    11,    12,    13,    10,
1263       11,   175,    10,    11,    12,     3,    14,    15,    10,    11,
1264       12,     3,    14,    15,     6,    10,    11,    12,   214,    14,
1265       15,   172,   173,   207,   208,   213,   115,   215,   134,   119,
1266      136,   119,   119,   117,   117,   117,   210,   115,   144,   115,
1267        3,   115,   115,   115,   115,   115,   115,   115,   115,   204,
1268      205,    10,    11,    12,   160,    14,    15,     6,     3,     3,
1269        9,    10,    11,   116,   116,   118,   118,   120,   120,   175,
1270      115,     3,   138,   139,   140,   141,   182,     3,     3,     3,
1271        6,     6,     6,     3,     3,     3,     6,     6,     6,     3,
1272        3,     3,     6,   199,     6,   201,     3,     3,     3,     6,
1273        6,     6,     3,     5,   210,     6,     3,     3,   214,     3,
1274       10,    11,    12,     3,   115,   115,     3,     5,     3,     5,
1275        3,   115,     3,     3,   115,   231,   115,   115,     3,   115,
1276      115,   237,     0,     3,     6,     6,   116,     6,   244,     6,
1277        6,     6,     6,   249,   116,     6,     6,     6,     6,     6,
1278        3,   116,     6,     3,     6,     6,   116,     6,     4,   116,
1279        3,     6,   117,   115,     6,   271,   116,     6,   116,   115,
1280        6,     6,   115,   115,     6,   116,   116,   116,   116,     6,
1281        6,     3,   119,   119,   117,     6,     6,     6,     6,     3,
1282        6,     6,     5,   116,   116,     6,   117,     3,     3,   116,
1283      116,   116,     3,     3,     3,   116,   116,   116,   116,     6,
1284        6,     6,   116,   116,     3,     3,     3,   116,     3,   117,
1285        3,   116,     6,   115,   117,   116,     3,   116,     3,     3,
1286        3,     3,     3,   117,   116,     3,     3,     3,   117,   345,
1287      346,   117,   116,   349,   117,     3,   352,     3,     3,   355,
1288        3,     3,     6,   116,   116,     3,     3,     3,     3,     3,
1289      116,   116,     5,     3,     3,     3,     3,     3,   116,   116,
1290        3,     3,   116,     3,     3,   116,   116,     3,     3,   117,
1291      117,     3,     3,   117,   117,     3,   116,   118,   117,     3,
1292      118,   116,   116,   116,     3,     3,     3,     3,     3,   116,
1293       12,     3,     3,     3,   116,     3,   116,     3,   116,   118,
1294      117,     3,     3,   117,   117,   117,     3,     3,     3,   117,
1295        3,    10,   116,   429,   430,   431,   118,   118,   118,     3,
1296        3,   117,     3,     3,     3,     3,   118,   118,   118,   118,
1297      116,   119,     3,     3,     3,     3,     3,     3,   118,   118,
1298        3,     3,     3,   118,   118,   118,   118,   118,   460,   116,
1299       10,    10,    10,     3,     3,   116,     3,   116,   118,     3,
1300        3,     3,     3,     3,     3,   117,   117,    -1,    -1,    -1,
1301       -1,    -1,   117,    -1,   118,   116,    -1,   493,   116,   116,
1302       -1,    -1,    -1,   116,   118,    77,   116,   116,    -1,   116,
1303      116,   116,    -1,    -1,    -1,   118,   199,   118,   118,    -1,
1304       -1,    -1,    -1,    -1,   118,   118,    -1,   116,    -1,   116,
1305       -1,     7,   116,   116,   526,    -1,    -1,    -1,   118,   535,
1306       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
1307       26,    27,    28,    29,    30,    31,    32,    33,    -1,   116,
1308       36,    37,    38,    39,    40,    41,   118,    43,    44,    45,
1309       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
1310       56,    57,   118,    59,    60,    61,    62,    63,    64,    65,
1311       66,    67,    68,    69,    70,    71,    72,    73,    74,   117,
1312       76,    77,    78,   116,    80,    81,    82,    83,    84,    85,
1313       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
1314       96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
1315      116,   107,   108,   109,   110,   111,   112,   113,   114,   118,
1316      118,   118,    -1,   118,   117,    -1,   118,   118
1317 };
1318
1319 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1320    symbol of state STATE-NUM.  */
1321 static const yytype_uint8 yystos[] =
1322 {
1323        0,     7,    16,    17,    18,    19,    20,    21,    22,    23,
1324       24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
1325       36,    37,    38,    39,    40,    41,    43,    44,    45,    46,
1326       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
1327       57,    59,    60,    61,    62,    63,    64,    65,    66,    67,
1328       68,    69,    70,    71,    72,    73,    74,    76,    77,    78,
1329       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
1330       90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
1331      100,   101,   102,   103,   104,   105,   107,   108,   109,   110,
1332      111,   112,   113,   114,   122,   129,   128,   115,   157,   115,
1333      159,     3,   115,     6,     9,    10,    11,   115,     3,   115,
1334        6,     9,    10,    11,    12,    13,   182,     3,   115,     6,
1335       11,    13,   182,     3,   115,   177,   178,     3,     6,   115,
1336      176,   134,   135,   132,   141,   133,   142,   147,   146,   149,
1337      148,   145,   150,   115,   144,     3,     3,     3,     3,   130,
1338      131,    10,    11,    12,   115,   180,    10,    11,   181,   115,
1339      158,     3,     3,     3,     3,     3,     5,     3,     3,     3,
1340      115,   115,   127,   138,   115,   160,     3,     5,     3,    10,
1341       11,    12,   180,     5,     3,   115,   155,   154,   180,     3,
1342        3,   115,   152,   115,   153,   151,   115,     3,   115,   126,
1343       12,   180,   177,   124,   125,   123,   180,   140,   139,   115,
1344      156,   180,   180,   136,   143,   137,     0,     3,   167,     3,
1345      115,   162,   164,   166,   176,     6,     3,   161,   176,     6,
1346      161,   116,     6,     6,     6,     6,     6,   116,     6,     6,
1347        6,     6,     6,     3,   116,     6,     6,     6,     3,   116,
1348        6,     4,   116,     6,   117,     3,   163,   164,   165,   176,
1349      165,   164,     3,   168,   176,   164,   168,   171,   172,   173,
1350      174,   175,   171,   171,   171,   171,   173,     6,   168,   116,
1351      116,   165,   165,   115,   115,   115,     6,     3,     6,   117,
1352        3,     6,   117,     6,   161,   116,   116,   116,   116,     6,
1353        6,   167,   167,     6,   161,   119,     3,   176,   119,     6,
1354        3,   169,   169,     6,   169,     6,   169,   173,     6,     6,
1355      162,     3,   176,   115,   169,   170,   170,   170,   164,   164,
1356        6,   161,   165,   168,   165,   116,   116,     6,   117,   116,
1357      116,   117,   116,     3,   176,   116,   116,     3,   176,   116,
1358        3,   176,   116,     3,   176,   116,     3,   116,     3,   116,
1359      117,   116,   117,   115,     3,   176,     3,     3,     6,     6,
1360        6,   116,   116,   117,     3,   119,   116,   117,     3,   119,
1361      116,     3,     3,     3,     5,   116,   116,     3,   117,     3,
1362      116,   116,   116,   116,   116,   117,     6,   116,     3,     3,
1363      116,     3,     3,     3,     3,     3,   117,     3,   176,     3,
1364      176,   117,     3,   176,   117,     3,   176,   117,     3,   176,
1365        3,   118,     3,     3,     3,     3,     6,   116,   117,   116,
1366      116,   116,     3,     3,     6,   117,     3,   116,   118,   120,
1367        3,     3,     3,   116,   118,   120,     3,     3,     5,     3,
1368        3,     3,     3,     3,     3,     3,     3,   116,     3,     3,
1369      118,   116,   116,   118,     3,   117,   117,     3,   117,     3,
1370      117,     3,   117,    10,    11,    12,    14,    15,   179,   118,
1371      118,   116,     3,     3,   176,   176,     3,   176,   117,     3,
1372      119,   118,     3,   116,   118,   118,   118,     3,   116,   118,
1373      118,   118,   119,   118,     3,   182,     3,     3,    14,   179,
1374      118,     3,     3,   118,     3,   118,     3,   118,     3,   116,
1375      116,    14,   179,    14,   179,     3,   118,   117,   117,   117,
1376        3,   116,   118,   120,     3,   116,   118,     3,   176,   116,
1377      116,   116,   118,     3,   116,   116,     3,   116,   116,   116,
1378      116,    10,   183,   118,   118,   183,   118,   183,   118,   183,
1379      118,     3,     3,   116,   116,   116,   116,   182,     3,     3,
1380        3,   118,     3,   118,   118,     3,   176,   116,   117,     3,
1381        3,     3,   116,     3,     3,     3,     3,     3,     3,    10,
1382      183,   183,    10,    10,     3,     3,     3,     3,   116,   118,
1383      118,   118,   118,   117,     3,     3,     3,     3,     3,   118,
1384      118
1385 };
1386
1387 #define yyerrok         (yyerrstatus = 0)
1388 #define yyclearin       (yychar = YYEMPTY)
1389 #define YYEMPTY         (-2)
1390 #define YYEOF           0
1391
1392 #define YYACCEPT        goto yyacceptlab
1393 #define YYABORT         goto yyabortlab
1394 #define YYERROR         goto yyerrorlab
1395
1396
1397 /* Like YYERROR except do call yyerror.  This remains here temporarily
1398    to ease the transition to the new meaning of YYERROR, for GCC.
1399    Once GCC version 2 has supplanted version 1, this can go.  */
1400
1401 #define YYFAIL          goto yyerrlab
1402
1403 #define YYRECOVERING()  (!!yyerrstatus)
1404
1405 #define YYBACKUP(Token, Value)                                  \
1406 do                                                              \
1407   if (yychar == YYEMPTY && yylen == 1)                          \
1408     {                                                           \
1409       yychar = (Token);                                         \
1410       yylval = (Value);                                         \
1411       yytoken = YYTRANSLATE (yychar);                           \
1412       YYPOPSTACK (1);                                           \
1413       goto yybackup;                                            \
1414     }                                                           \
1415   else                                                          \
1416     {                                                           \
1417       yyerror (YY_("syntax error: cannot back up")); \
1418       YYERROR;                                                  \
1419     }                                                           \
1420 while (YYID (0))
1421
1422
1423 #define YYTERROR        1
1424 #define YYERRCODE       256
1425
1426
1427 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1428    If N is 0, then set CURRENT to the empty location which ends
1429    the previous symbol: RHS[0] (always defined).  */
1430
1431 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1432 #ifndef YYLLOC_DEFAULT
1433 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1434     do                                                                  \
1435       if (YYID (N))                                                    \
1436         {                                                               \
1437           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1438           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1439           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1440           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1441         }                                                               \
1442       else                                                              \
1443         {                                                               \
1444           (Current).first_line   = (Current).last_line   =              \
1445             YYRHSLOC (Rhs, 0).last_line;                                \
1446           (Current).first_column = (Current).last_column =              \
1447             YYRHSLOC (Rhs, 0).last_column;                              \
1448         }                                                               \
1449     while (YYID (0))
1450 #endif
1451
1452
1453 /* YY_LOCATION_PRINT -- Print the location on the stream.
1454    This macro was not mandated originally: define only if we know
1455    we won't break user code: when these are the locations we know.  */
1456
1457 #ifndef YY_LOCATION_PRINT
1458 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1459 #  define YY_LOCATION_PRINT(File, Loc)                  \
1460      fprintf (File, "%d.%d-%d.%d",                      \
1461               (Loc).first_line, (Loc).first_column,     \
1462               (Loc).last_line,  (Loc).last_column)
1463 # else
1464 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1465 # endif
1466 #endif
1467
1468
1469 /* YYLEX -- calling `yylex' with the right arguments.  */
1470
1471 #ifdef YYLEX_PARAM
1472 # define YYLEX yylex (YYLEX_PARAM)
1473 #else
1474 # define YYLEX yylex ()
1475 #endif
1476
1477 /* Enable debugging if requested.  */
1478 #if YYDEBUG
1479
1480 # ifndef YYFPRINTF
1481 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1482 #  define YYFPRINTF fprintf
1483 # endif
1484
1485 # define YYDPRINTF(Args)                        \
1486 do {                                            \
1487   if (yydebug)                                  \
1488     YYFPRINTF Args;                             \
1489 } while (YYID (0))
1490
1491 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1492 do {                                                                      \
1493   if (yydebug)                                                            \
1494     {                                                                     \
1495       YYFPRINTF (stderr, "%s ", Title);                                   \
1496       yy_symbol_print (stderr,                                            \
1497                   Type, Value); \
1498       YYFPRINTF (stderr, "\n");                                           \
1499     }                                                                     \
1500 } while (YYID (0))
1501
1502
1503 /*--------------------------------.
1504 | Print this symbol on YYOUTPUT.  |
1505 `--------------------------------*/
1506
1507 /*ARGSUSED*/
1508 #if (defined __STDC__ || defined __C99__FUNC__ \
1509      || defined __cplusplus || defined _MSC_VER)
1510 static void
1511 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1512 #else
1513 static void
1514 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1515     FILE *yyoutput;
1516     int yytype;
1517     YYSTYPE const * const yyvaluep;
1518 #endif
1519 {
1520   if (!yyvaluep)
1521     return;
1522 # ifdef YYPRINT
1523   if (yytype < YYNTOKENS)
1524     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1525 # else
1526   YYUSE (yyoutput);
1527 # endif
1528   switch (yytype)
1529     {
1530       default:
1531         break;
1532     }
1533 }
1534
1535
1536 /*--------------------------------.
1537 | Print this symbol on YYOUTPUT.  |
1538 `--------------------------------*/
1539
1540 #if (defined __STDC__ || defined __C99__FUNC__ \
1541      || defined __cplusplus || defined _MSC_VER)
1542 static void
1543 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1544 #else
1545 static void
1546 yy_symbol_print (yyoutput, yytype, yyvaluep)
1547     FILE *yyoutput;
1548     int yytype;
1549     YYSTYPE const * const yyvaluep;
1550 #endif
1551 {
1552   if (yytype < YYNTOKENS)
1553     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1554   else
1555     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1556
1557   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1558   YYFPRINTF (yyoutput, ")");
1559 }
1560
1561 /*------------------------------------------------------------------.
1562 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1563 | TOP (included).                                                   |
1564 `------------------------------------------------------------------*/
1565
1566 #if (defined __STDC__ || defined __C99__FUNC__ \
1567      || defined __cplusplus || defined _MSC_VER)
1568 static void
1569 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1570 #else
1571 static void
1572 yy_stack_print (bottom, top)
1573     yytype_int16 *bottom;
1574     yytype_int16 *top;
1575 #endif
1576 {
1577   YYFPRINTF (stderr, "Stack now");
1578   for (; bottom <= top; ++bottom)
1579     YYFPRINTF (stderr, " %d", *bottom);
1580   YYFPRINTF (stderr, "\n");
1581 }
1582
1583 # define YY_STACK_PRINT(Bottom, Top)                            \
1584 do {                                                            \
1585   if (yydebug)                                                  \
1586     yy_stack_print ((Bottom), (Top));                           \
1587 } while (YYID (0))
1588
1589
1590 /*------------------------------------------------.
1591 | Report that the YYRULE is going to be reduced.  |
1592 `------------------------------------------------*/
1593
1594 #if (defined __STDC__ || defined __C99__FUNC__ \
1595      || defined __cplusplus || defined _MSC_VER)
1596 static void
1597 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1598 #else
1599 static void
1600 yy_reduce_print (yyvsp, yyrule)
1601     YYSTYPE *yyvsp;
1602     int yyrule;
1603 #endif
1604 {
1605   int yynrhs = yyr2[yyrule];
1606   int yyi;
1607   unsigned long int yylno = yyrline[yyrule];
1608   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1609              yyrule - 1, yylno);
1610   /* The symbols being reduced.  */
1611   for (yyi = 0; yyi < yynrhs; yyi++)
1612     {
1613       fprintf (stderr, "   $%d = ", yyi + 1);
1614       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1615                        &(yyvsp[(yyi + 1) - (yynrhs)])
1616                                        );
1617       fprintf (stderr, "\n");
1618     }
1619 }
1620
1621 # define YY_REDUCE_PRINT(Rule)          \
1622 do {                                    \
1623   if (yydebug)                          \
1624     yy_reduce_print (yyvsp, Rule); \
1625 } while (YYID (0))
1626
1627 /* Nonzero means print parse trace.  It is left uninitialized so that
1628    multiple parsers can coexist.  */
1629 int yydebug;
1630 #else /* !YYDEBUG */
1631 # define YYDPRINTF(Args)
1632 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1633 # define YY_STACK_PRINT(Bottom, Top)
1634 # define YY_REDUCE_PRINT(Rule)
1635 #endif /* !YYDEBUG */
1636
1637
1638 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1639 #ifndef YYINITDEPTH
1640 # define YYINITDEPTH 200
1641 #endif
1642
1643 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1644    if the built-in stack extension method is used).
1645
1646    Do not make this value too large; the results are undefined if
1647    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1648    evaluated with infinite-precision integer arithmetic.  */
1649
1650 #ifndef YYMAXDEPTH
1651 # define YYMAXDEPTH 10000
1652 #endif
1653
1654 \f
1655
1656 #if YYERROR_VERBOSE
1657
1658 # ifndef yystrlen
1659 #  if defined __GLIBC__ && defined _STRING_H
1660 #   define yystrlen strlen
1661 #  else
1662 /* Return the length of YYSTR.  */
1663 #if (defined __STDC__ || defined __C99__FUNC__ \
1664      || defined __cplusplus || defined _MSC_VER)
1665 static YYSIZE_T
1666 yystrlen (const char *yystr)
1667 #else
1668 static YYSIZE_T
1669 yystrlen (yystr)
1670     const char *yystr;
1671 #endif
1672 {
1673   YYSIZE_T yylen;
1674   for (yylen = 0; yystr[yylen]; yylen++)
1675     continue;
1676   return yylen;
1677 }
1678 #  endif
1679 # endif
1680
1681 # ifndef yystpcpy
1682 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1683 #   define yystpcpy stpcpy
1684 #  else
1685 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1686    YYDEST.  */
1687 #if (defined __STDC__ || defined __C99__FUNC__ \
1688      || defined __cplusplus || defined _MSC_VER)
1689 static char *
1690 yystpcpy (char *yydest, const char *yysrc)
1691 #else
1692 static char *
1693 yystpcpy (yydest, yysrc)
1694     char *yydest;
1695     const char *yysrc;
1696 #endif
1697 {
1698   char *yyd = yydest;
1699   const char *yys = yysrc;
1700
1701   while ((*yyd++ = *yys++) != '\0')
1702     continue;
1703
1704   return yyd - 1;
1705 }
1706 #  endif
1707 # endif
1708
1709 # ifndef yytnamerr
1710 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1711    quotes and backslashes, so that it's suitable for yyerror.  The
1712    heuristic is that double-quoting is unnecessary unless the string
1713    contains an apostrophe, a comma, or backslash (other than
1714    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1715    null, do not copy; instead, return the length of what the result
1716    would have been.  */
1717 static YYSIZE_T
1718 yytnamerr (char *yyres, const char *yystr)
1719 {
1720   if (*yystr == '"')
1721     {
1722       YYSIZE_T yyn = 0;
1723       char const *yyp = yystr;
1724
1725       for (;;)
1726         switch (*++yyp)
1727           {
1728           case '\'':
1729           case ',':
1730             goto do_not_strip_quotes;
1731
1732           case '\\':
1733             if (*++yyp != '\\')
1734               goto do_not_strip_quotes;
1735             /* Fall through.  */
1736           default:
1737             if (yyres)
1738               yyres[yyn] = *yyp;
1739             yyn++;
1740             break;
1741
1742           case '"':
1743             if (yyres)
1744               yyres[yyn] = '\0';
1745             return yyn;
1746           }
1747     do_not_strip_quotes: ;
1748     }
1749
1750   if (! yyres)
1751     return yystrlen (yystr);
1752
1753   return yystpcpy (yyres, yystr) - yyres;
1754 }
1755 # endif
1756
1757 /* Copy into YYRESULT an error message about the unexpected token
1758    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1759    including the terminating null byte.  If YYRESULT is null, do not
1760    copy anything; just return the number of bytes that would be
1761    copied.  As a special case, return 0 if an ordinary "syntax error"
1762    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1763    size calculation.  */
1764 static YYSIZE_T
1765 yysyntax_error (char *yyresult, int yystate, int yychar)
1766 {
1767   int yyn = yypact[yystate];
1768
1769   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1770     return 0;
1771   else
1772     {
1773       int yytype = YYTRANSLATE (yychar);
1774       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1775       YYSIZE_T yysize = yysize0;
1776       YYSIZE_T yysize1;
1777       int yysize_overflow = 0;
1778       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1779       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1780       int yyx;
1781
1782 # if 0
1783       /* This is so xgettext sees the translatable formats that are
1784          constructed on the fly.  */
1785       YY_("syntax error, unexpected %s");
1786       YY_("syntax error, unexpected %s, expecting %s");
1787       YY_("syntax error, unexpected %s, expecting %s or %s");
1788       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1789       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1790 # endif
1791       char *yyfmt;
1792       char const *yyf;
1793       static char const yyunexpected[] = "syntax error, unexpected %s";
1794       static char const yyexpecting[] = ", expecting %s";
1795       static char const yyor[] = " or %s";
1796       char yyformat[sizeof yyunexpected
1797                     + sizeof yyexpecting - 1
1798                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1799                        * (sizeof yyor - 1))];
1800       char const *yyprefix = yyexpecting;
1801
1802       /* Start YYX at -YYN if negative to avoid negative indexes in
1803          YYCHECK.  */
1804       int yyxbegin = yyn < 0 ? -yyn : 0;
1805
1806       /* Stay within bounds of both yycheck and yytname.  */
1807       int yychecklim = YYLAST - yyn + 1;
1808       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1809       int yycount = 1;
1810
1811       yyarg[0] = yytname[yytype];
1812       yyfmt = yystpcpy (yyformat, yyunexpected);
1813
1814       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1815         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1816           {
1817             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1818               {
1819                 yycount = 1;
1820                 yysize = yysize0;
1821                 yyformat[sizeof yyunexpected - 1] = '\0';
1822                 break;
1823               }
1824             yyarg[yycount++] = yytname[yyx];
1825             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1826             yysize_overflow |= (yysize1 < yysize);
1827             yysize = yysize1;
1828             yyfmt = yystpcpy (yyfmt, yyprefix);
1829             yyprefix = yyor;
1830           }
1831
1832       yyf = YY_(yyformat);
1833       yysize1 = yysize + yystrlen (yyf);
1834       yysize_overflow |= (yysize1 < yysize);
1835       yysize = yysize1;
1836
1837       if (yysize_overflow)
1838         return YYSIZE_MAXIMUM;
1839
1840       if (yyresult)
1841         {
1842           /* Avoid sprintf, as that infringes on the user's name space.
1843              Don't have undefined behavior even if the translation
1844              produced a string with the wrong number of "%s"s.  */
1845           char *yyp = yyresult;
1846           int yyi = 0;
1847           while ((*yyp = *yyf) != '\0')
1848             {
1849               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1850                 {
1851                   yyp += yytnamerr (yyp, yyarg[yyi++]);
1852                   yyf += 2;
1853                 }
1854               else
1855                 {
1856                   yyp++;
1857                   yyf++;
1858                 }
1859             }
1860         }
1861       return yysize;
1862     }
1863 }
1864 #endif /* YYERROR_VERBOSE */
1865 \f
1866
1867 /*-----------------------------------------------.
1868 | Release the memory associated to this symbol.  |
1869 `-----------------------------------------------*/
1870
1871 /*ARGSUSED*/
1872 #if (defined __STDC__ || defined __C99__FUNC__ \
1873      || defined __cplusplus || defined _MSC_VER)
1874 static void
1875 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1876 #else
1877 static void
1878 yydestruct (yymsg, yytype, yyvaluep)
1879     const char *yymsg;
1880     int yytype;
1881     YYSTYPE *yyvaluep;
1882 #endif
1883 {
1884   YYUSE (yyvaluep);
1885
1886   if (!yymsg)
1887     yymsg = "Deleting";
1888   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1889
1890   switch (yytype)
1891     {
1892
1893       default:
1894         break;
1895     }
1896 }
1897 \f
1898
1899 /* Prevent warnings from -Wmissing-prototypes.  */
1900
1901 #ifdef YYPARSE_PARAM
1902 #if defined __STDC__ || defined __cplusplus
1903 int yyparse (void *YYPARSE_PARAM);
1904 #else
1905 int yyparse ();
1906 #endif
1907 #else /* ! YYPARSE_PARAM */
1908 #if defined __STDC__ || defined __cplusplus
1909 int yyparse (void);
1910 #else
1911 int yyparse ();
1912 #endif
1913 #endif /* ! YYPARSE_PARAM */
1914
1915
1916
1917 /* The look-ahead symbol.  */
1918 int yychar;
1919
1920 /* The semantic value of the look-ahead symbol.  */
1921 YYSTYPE yylval;
1922
1923 /* Number of syntax errors so far.  */
1924 int yynerrs;
1925
1926
1927
1928 /*----------.
1929 | yyparse.  |
1930 `----------*/
1931
1932 #ifdef YYPARSE_PARAM
1933 #if (defined __STDC__ || defined __C99__FUNC__ \
1934      || defined __cplusplus || defined _MSC_VER)
1935 int
1936 yyparse (void *YYPARSE_PARAM)
1937 #else
1938 int
1939 yyparse (YYPARSE_PARAM)
1940     void *YYPARSE_PARAM;
1941 #endif
1942 #else /* ! YYPARSE_PARAM */
1943 #if (defined __STDC__ || defined __C99__FUNC__ \
1944      || defined __cplusplus || defined _MSC_VER)
1945 int
1946 yyparse (void)
1947 #else
1948 int
1949 yyparse ()
1950
1951 #endif
1952 #endif
1953 {
1954   
1955   int yystate;
1956   int yyn;
1957   int yyresult;
1958   /* Number of tokens to shift before error messages enabled.  */
1959   int yyerrstatus;
1960   /* Look-ahead token as an internal (translated) token number.  */
1961   int yytoken = 0;
1962 #if YYERROR_VERBOSE
1963   /* Buffer for error messages, and its allocated size.  */
1964   char yymsgbuf[128];
1965   char *yymsg = yymsgbuf;
1966   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1967 #endif
1968
1969   /* Three stacks and their tools:
1970      `yyss': related to states,
1971      `yyvs': related to semantic values,
1972      `yyls': related to locations.
1973
1974      Refer to the stacks thru separate pointers, to allow yyoverflow
1975      to reallocate them elsewhere.  */
1976
1977   /* The state stack.  */
1978   yytype_int16 yyssa[YYINITDEPTH];
1979   yytype_int16 *yyss = yyssa;
1980   yytype_int16 *yyssp;
1981
1982   /* The semantic value stack.  */
1983   YYSTYPE yyvsa[YYINITDEPTH];
1984   YYSTYPE *yyvs = yyvsa;
1985   YYSTYPE *yyvsp;
1986
1987
1988
1989 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1990
1991   YYSIZE_T yystacksize = YYINITDEPTH;
1992
1993   /* The variables used to return semantic value and location from the
1994      action routines.  */
1995   YYSTYPE yyval;
1996
1997
1998   /* The number of symbols on the RHS of the reduced rule.
1999      Keep to zero when no symbol should be popped.  */
2000   int yylen = 0;
2001
2002   YYDPRINTF ((stderr, "Starting parse\n"));
2003
2004   yystate = 0;
2005   yyerrstatus = 0;
2006   yynerrs = 0;
2007   yychar = YYEMPTY;             /* Cause a token to be read.  */
2008
2009   /* Initialize stack pointers.
2010      Waste one element of value and location stack
2011      so that they stay on the same level as the state stack.
2012      The wasted elements are never initialized.  */
2013
2014   yyssp = yyss;
2015   yyvsp = yyvs;
2016
2017   goto yysetstate;
2018
2019 /*------------------------------------------------------------.
2020 | yynewstate -- Push a new state, which is found in yystate.  |
2021 `------------------------------------------------------------*/
2022  yynewstate:
2023   /* In all cases, when you get here, the value and location stacks
2024      have just been pushed.  So pushing a state here evens the stacks.  */
2025   yyssp++;
2026
2027  yysetstate:
2028   *yyssp = yystate;
2029
2030   if (yyss + yystacksize - 1 <= yyssp)
2031     {
2032       /* Get the current used size of the three stacks, in elements.  */
2033       YYSIZE_T yysize = yyssp - yyss + 1;
2034
2035 #ifdef yyoverflow
2036       {
2037         /* Give user a chance to reallocate the stack.  Use copies of
2038            these so that the &'s don't force the real ones into
2039            memory.  */
2040         YYSTYPE *yyvs1 = yyvs;
2041         yytype_int16 *yyss1 = yyss;
2042
2043
2044         /* Each stack pointer address is followed by the size of the
2045            data in use in that stack, in bytes.  This used to be a
2046            conditional around just the two extra args, but that might
2047            be undefined if yyoverflow is a macro.  */
2048         yyoverflow (YY_("memory exhausted"),
2049                     &yyss1, yysize * sizeof (*yyssp),
2050                     &yyvs1, yysize * sizeof (*yyvsp),
2051
2052                     &yystacksize);
2053
2054         yyss = yyss1;
2055         yyvs = yyvs1;
2056       }
2057 #else /* no yyoverflow */
2058 # ifndef YYSTACK_RELOCATE
2059       goto yyexhaustedlab;
2060 # else
2061       /* Extend the stack our own way.  */
2062       if (YYMAXDEPTH <= yystacksize)
2063         goto yyexhaustedlab;
2064       yystacksize *= 2;
2065       if (YYMAXDEPTH < yystacksize)
2066         yystacksize = YYMAXDEPTH;
2067
2068       {
2069         yytype_int16 *yyss1 = yyss;
2070         union yyalloc *yyptr =
2071           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2072         if (! yyptr)
2073           goto yyexhaustedlab;
2074         YYSTACK_RELOCATE (yyss);
2075         YYSTACK_RELOCATE (yyvs);
2076
2077 #  undef YYSTACK_RELOCATE
2078         if (yyss1 != yyssa)
2079           YYSTACK_FREE (yyss1);
2080       }
2081 # endif
2082 #endif /* no yyoverflow */
2083
2084       yyssp = yyss + yysize - 1;
2085       yyvsp = yyvs + yysize - 1;
2086
2087
2088       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2089                   (unsigned long int) yystacksize));
2090
2091       if (yyss + yystacksize - 1 <= yyssp)
2092         YYABORT;
2093     }
2094
2095   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2096
2097   goto yybackup;
2098
2099 /*-----------.
2100 | yybackup.  |
2101 `-----------*/
2102 yybackup:
2103
2104   /* Do appropriate processing given the current state.  Read a
2105      look-ahead token if we need one and don't already have one.  */
2106
2107   /* First try to decide what to do without reference to look-ahead token.  */
2108   yyn = yypact[yystate];
2109   if (yyn == YYPACT_NINF)
2110     goto yydefault;
2111
2112   /* Not known => get a look-ahead token if don't already have one.  */
2113
2114   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
2115   if (yychar == YYEMPTY)
2116     {
2117       YYDPRINTF ((stderr, "Reading a token: "));
2118       yychar = YYLEX;
2119     }
2120
2121   if (yychar <= YYEOF)
2122     {
2123       yychar = yytoken = YYEOF;
2124       YYDPRINTF ((stderr, "Now at end of input.\n"));
2125     }
2126   else
2127     {
2128       yytoken = YYTRANSLATE (yychar);
2129       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2130     }
2131
2132   /* If the proper action on seeing token YYTOKEN is to reduce or to
2133      detect an error, take that action.  */
2134   yyn += yytoken;
2135   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2136     goto yydefault;
2137   yyn = yytable[yyn];
2138   if (yyn <= 0)
2139     {
2140       if (yyn == 0 || yyn == YYTABLE_NINF)
2141         goto yyerrlab;
2142       yyn = -yyn;
2143       goto yyreduce;
2144     }
2145
2146   if (yyn == YYFINAL)
2147     YYACCEPT;
2148
2149   /* Count tokens shifted since error; after three, turn off error
2150      status.  */
2151   if (yyerrstatus)
2152     yyerrstatus--;
2153
2154   /* Shift the look-ahead token.  */
2155   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2156
2157   /* Discard the shifted token unless it is eof.  */
2158   if (yychar != YYEOF)
2159     yychar = YYEMPTY;
2160
2161   yystate = yyn;
2162   *++yyvsp = yylval;
2163
2164   goto yynewstate;
2165
2166
2167 /*-----------------------------------------------------------.
2168 | yydefault -- do the default action for the current state.  |
2169 `-----------------------------------------------------------*/
2170 yydefault:
2171   yyn = yydefact[yystate];
2172   if (yyn == 0)
2173     goto yyerrlab;
2174   goto yyreduce;
2175
2176
2177 /*-----------------------------.
2178 | yyreduce -- Do a reduction.  |
2179 `-----------------------------*/
2180 yyreduce:
2181   /* yyn is the number of a rule to reduce with.  */
2182   yylen = yyr2[yyn];
2183
2184   /* If YYLEN is nonzero, implement the default value of the action:
2185      `$$ = $1'.
2186
2187      Otherwise, the following line sets YYVAL to garbage.
2188      This behavior is undocumented and Bison
2189      users should not rely upon it.  Assigning to YYVAL
2190      unconditionally makes the parser a bit smaller, and it avoids a
2191      GCC warning that YYVAL may be used uninitialized.  */
2192   yyval = yyvsp[1-yylen];
2193
2194
2195   YY_REDUCE_PRINT (yyn);
2196   switch (yyn)
2197     {
2198         case 2:
2199 #line 175 "rx-parse.y"
2200     { as_bad (_("Unknown opcode: %s"), rx_init_start); }
2201     break;
2202
2203   case 3:
2204 #line 180 "rx-parse.y"
2205     { B1 (0x00); }
2206     break;
2207
2208   case 4:
2209 #line 183 "rx-parse.y"
2210     { B1 (0x01); }
2211     break;
2212
2213   case 5:
2214 #line 186 "rx-parse.y"
2215     { B1 (0x02); }
2216     break;
2217
2218   case 6:
2219 #line 189 "rx-parse.y"
2220     { B1 (0x03); }
2221     break;
2222
2223   case 7:
2224 #line 194 "rx-parse.y"
2225     { if (rx_disp3op ((yyvsp[(2) - (2)].exp)))
2226               { B1 (0x08); rx_disp3 ((yyvsp[(2) - (2)].exp), 5); }
2227             else if (rx_intop ((yyvsp[(2) - (2)].exp), 8, 8))
2228               { B1 (0x2e); PC1 ((yyvsp[(2) - (2)].exp)); }
2229             else if (rx_intop ((yyvsp[(2) - (2)].exp), 16, 16))
2230               { B1 (0x38); PC2 ((yyvsp[(2) - (2)].exp)); }
2231             else if (rx_intop ((yyvsp[(2) - (2)].exp), 24, 24))
2232               { B1 (0x04); PC3 ((yyvsp[(2) - (2)].exp)); }
2233             else
2234               { rx_relax (RX_RELAX_BRANCH, 0);
2235                 rx_linkrelax_branch ();
2236                 /* We'll convert this to a longer one later if needed.  */
2237                 B1 (0x08); rx_disp3 ((yyvsp[(2) - (2)].exp), 5); } }
2238     break;
2239
2240   case 8:
2241 #line 209 "rx-parse.y"
2242     { B1 (0x04); PC3 ((yyvsp[(3) - (3)].exp)); }
2243     break;
2244
2245   case 9:
2246 #line 212 "rx-parse.y"
2247     { B1 (0x08); rx_disp3 ((yyvsp[(3) - (3)].exp), 5); }
2248     break;
2249
2250   case 10:
2251 #line 217 "rx-parse.y"
2252     { if (rx_intop ((yyvsp[(2) - (2)].exp), 16, 16))
2253               { B1 (0x39); PC2 ((yyvsp[(2) - (2)].exp)); }
2254             else if (rx_intop ((yyvsp[(2) - (2)].exp), 24, 24))
2255               { B1 (0x05); PC3 ((yyvsp[(2) - (2)].exp)); }
2256             else
2257               { rx_relax (RX_RELAX_BRANCH, 0);
2258                 rx_linkrelax_branch ();
2259                 B1 (0x39); PC2 ((yyvsp[(2) - (2)].exp)); } }
2260     break;
2261
2262   case 11:
2263 #line 226 "rx-parse.y"
2264     { B1 (0x05), PC3 ((yyvsp[(3) - (3)].exp)); }
2265     break;
2266
2267   case 12:
2268 #line 231 "rx-parse.y"
2269     { if ((yyvsp[(1) - (3)].regno) == COND_EQ || (yyvsp[(1) - (3)].regno) == COND_NE)
2270               { B1 ((yyvsp[(1) - (3)].regno) == COND_EQ ? 0x10 : 0x18); rx_disp3 ((yyvsp[(3) - (3)].exp), 5); }
2271             else
2272               as_bad (_("Only BEQ and BNE may have .S")); }
2273     break;
2274
2275   case 13:
2276 #line 239 "rx-parse.y"
2277     { B1 (0x20); F ((yyvsp[(1) - (3)].regno), 4, 4); PC1 ((yyvsp[(3) - (3)].exp)); }
2278     break;
2279
2280   case 14:
2281 #line 242 "rx-parse.y"
2282     { B1 (0x2e), PC1 ((yyvsp[(3) - (3)].exp)); }
2283     break;
2284
2285   case 15:
2286 #line 247 "rx-parse.y"
2287     { B1 (0x38), PC2 ((yyvsp[(3) - (3)].exp)); }
2288     break;
2289
2290   case 16:
2291 #line 249 "rx-parse.y"
2292     { B1 (0x39), PC2 ((yyvsp[(3) - (3)].exp)); }
2293     break;
2294
2295   case 17:
2296 #line 251 "rx-parse.y"
2297     { if ((yyvsp[(1) - (3)].regno) == COND_EQ || (yyvsp[(1) - (3)].regno) == COND_NE)
2298               { B1 ((yyvsp[(1) - (3)].regno) == COND_EQ ? 0x3a : 0x3b); PC2 ((yyvsp[(3) - (3)].exp)); }
2299             else
2300               as_bad (_("Only BEQ and BNE may have .W")); }
2301     break;
2302
2303   case 18:
2304 #line 256 "rx-parse.y"
2305     { if ((yyvsp[(1) - (2)].regno) == COND_EQ || (yyvsp[(1) - (2)].regno) == COND_NE)
2306               {
2307                 rx_relax (RX_RELAX_BRANCH, 0);
2308                 rx_linkrelax_branch ();
2309                 B1 ((yyvsp[(1) - (2)].regno) == COND_EQ ? 0x10 : 0x18); rx_disp3 ((yyvsp[(2) - (2)].exp), 5);
2310               }
2311             else
2312               {
2313                 rx_relax (RX_RELAX_BRANCH, 0);
2314                 /* This is because we might turn it into a
2315                    jump-over-jump long branch.  */
2316                 rx_linkrelax_branch ();
2317                 B1 (0x20); F ((yyvsp[(1) - (2)].regno), 4, 4); PC1 ((yyvsp[(2) - (2)].exp));
2318               } }
2319     break;
2320
2321   case 19:
2322 #line 275 "rx-parse.y"
2323     { if ((yyvsp[(8) - (9)].regno) <= 7 && rx_uintop ((yyvsp[(4) - (9)].exp), 8) && rx_disp5op0 (&(yyvsp[(6) - (9)].exp), BSIZE))
2324               { B2 (0x3c, 0); rx_field5s2 ((yyvsp[(6) - (9)].exp)); F ((yyvsp[(8) - (9)].regno), 9, 3); O1 ((yyvsp[(4) - (9)].exp)); }
2325             else
2326               { B2 (0xf8, 0x04); F ((yyvsp[(8) - (9)].regno), 8, 4); DSP ((yyvsp[(6) - (9)].exp), 6, BSIZE); O1 ((yyvsp[(4) - (9)].exp));
2327               if ((yyvsp[(4) - (9)].exp).X_op != O_constant && (yyvsp[(4) - (9)].exp).X_op != O_big) rx_linkrelax_imm (12); } }
2328     break;
2329
2330   case 20:
2331 #line 282 "rx-parse.y"
2332     { if ((yyvsp[(8) - (9)].regno) <= 7 && rx_uintop ((yyvsp[(4) - (9)].exp), 8) && rx_disp5op0 (&(yyvsp[(6) - (9)].exp), WSIZE))
2333               { B2 (0x3d, 0); rx_field5s2 ((yyvsp[(6) - (9)].exp)); F ((yyvsp[(8) - (9)].regno), 9, 3); O1 ((yyvsp[(4) - (9)].exp)); }
2334             else
2335               { B2 (0xf8, 0x01); F ((yyvsp[(8) - (9)].regno), 8, 4); DSP ((yyvsp[(6) - (9)].exp), 6, WSIZE); IMMW ((yyvsp[(4) - (9)].exp), 12); } }
2336     break;
2337
2338   case 21:
2339 #line 288 "rx-parse.y"
2340     { if ((yyvsp[(8) - (9)].regno) <= 7 && rx_uintop ((yyvsp[(4) - (9)].exp), 8) && rx_disp5op0 (&(yyvsp[(6) - (9)].exp), LSIZE))
2341               { B2 (0x3e, 0); rx_field5s2 ((yyvsp[(6) - (9)].exp)); F ((yyvsp[(8) - (9)].regno), 9, 3); O1 ((yyvsp[(4) - (9)].exp)); }
2342             else
2343               { B2 (0xf8, 0x02); F ((yyvsp[(8) - (9)].regno), 8, 4); DSP ((yyvsp[(6) - (9)].exp), 6, LSIZE); IMM ((yyvsp[(4) - (9)].exp), 12); } }
2344     break;
2345
2346   case 22:
2347 #line 296 "rx-parse.y"
2348     { B2 (0x3f, 0); F ((yyvsp[(5) - (7)].regno), 8, 4); F ((yyvsp[(7) - (7)].regno), 12, 4); rtsd_immediate ((yyvsp[(3) - (7)].exp));
2349             if ((yyvsp[(5) - (7)].regno) == 0)
2350               rx_error (_("RTSD cannot pop R0"));
2351             if ((yyvsp[(5) - (7)].regno) > (yyvsp[(7) - (7)].regno))
2352               rx_error (_("RTSD first reg must be <= second reg")); }
2353     break;
2354
2355   case 23:
2356 #line 305 "rx-parse.y"
2357     { B2 (0x47, 0); F ((yyvsp[(2) - (4)].regno), 8, 4); F ((yyvsp[(4) - (4)].regno), 12, 4); }
2358     break;
2359
2360   case 24:
2361 #line 310 "rx-parse.y"
2362     { B2 (0x44, 0); F ((yyvsp[(4) - (8)].regno), 8, 4); F ((yyvsp[(8) - (8)].regno), 12, 4); DSP ((yyvsp[(2) - (8)].exp), 6, BSIZE); }
2363     break;
2364
2365   case 25:
2366 #line 313 "rx-parse.y"
2367     { B3 (MEMEX, 0x04, 0); F ((yyvsp[(6) - (8)].regno), 8, 2);  F ((yyvsp[(4) - (8)].regno), 16, 4); F ((yyvsp[(8) - (8)].regno), 20, 4); DSP ((yyvsp[(2) - (8)].exp), 14, sizemap[(yyvsp[(6) - (8)].regno)]); }
2368     break;
2369
2370   case 26:
2371 #line 318 "rx-parse.y"
2372     { B2 (0x5b, 0x00); F ((yyvsp[(2) - (5)].regno), 5, 1); F ((yyvsp[(3) - (5)].regno), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2373     break;
2374
2375   case 27:
2376 #line 323 "rx-parse.y"
2377     { B2 (0x58, 0x00); F ((yyvsp[(2) - (7)].regno), 5, 1); F ((yyvsp[(4) - (7)].regno), 8, 4); F ((yyvsp[(7) - (7)].regno), 12, 4); }
2378     break;
2379
2380   case 28:
2381 #line 326 "rx-parse.y"
2382     { if ((yyvsp[(5) - (8)].regno) <= 7 && (yyvsp[(8) - (8)].regno) <= 7 && rx_disp5op (&(yyvsp[(3) - (8)].exp), (yyvsp[(2) - (8)].regno)))
2383               { B2 (0xb0, 0); F ((yyvsp[(2) - (8)].regno), 4, 1); F ((yyvsp[(5) - (8)].regno), 9, 3); F ((yyvsp[(8) - (8)].regno), 13, 3); rx_field5s ((yyvsp[(3) - (8)].exp)); }
2384             else
2385               { B2 (0x58, 0x00); F ((yyvsp[(2) - (8)].regno), 5, 1); F ((yyvsp[(5) - (8)].regno), 8, 4); F ((yyvsp[(8) - (8)].regno), 12, 4); DSP ((yyvsp[(3) - (8)].exp), 6, (yyvsp[(2) - (8)].regno)); } }
2386     break;
2387
2388   case 29:
2389 #line 334 "rx-parse.y"
2390     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2391               { B2 (0x60, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2392             else
2393               /* This is really an add, but we negate the immediate.  */
2394               { B2 (0x70, 0); F ((yyvsp[(5) - (5)].regno), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); NIMM ((yyvsp[(3) - (5)].exp), 6); } }
2395     break;
2396
2397   case 30:
2398 #line 341 "rx-parse.y"
2399     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2400               { B2 (0x61, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2401             else if (rx_uintop ((yyvsp[(3) - (5)].exp), 8))
2402               { B2 (0x75, 0x50); F ((yyvsp[(5) - (5)].regno), 12, 4); UO1 ((yyvsp[(3) - (5)].exp)); }
2403             else
2404               { B2 (0x74, 0x00); F ((yyvsp[(5) - (5)].regno), 12, 4); IMM ((yyvsp[(3) - (5)].exp), 6); } }
2405     break;
2406
2407   case 31:
2408 #line 349 "rx-parse.y"
2409     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2410               { B2 (0x62, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2411             else
2412               { B2 (0x70, 0); F ((yyvsp[(5) - (5)].regno), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); IMM ((yyvsp[(3) - (5)].exp), 6); } }
2413     break;
2414
2415   case 32:
2416 #line 355 "rx-parse.y"
2417     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2418               { B2 (0x63, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2419             else
2420               { B2 (0x74, 0x10); F ((yyvsp[(5) - (5)].regno), 12, 4); IMM ((yyvsp[(3) - (5)].exp), 6); } }
2421     break;
2422
2423   case 33:
2424 #line 361 "rx-parse.y"
2425     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2426               { B2 (0x64, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2427             else
2428               { B2 (0x74, 0x20); F ((yyvsp[(5) - (5)].regno), 12, 4); IMM ((yyvsp[(3) - (5)].exp), 6); } }
2429     break;
2430
2431   case 34:
2432 #line 367 "rx-parse.y"
2433     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2434               { B2 (0x65, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2435             else
2436               { B2 (0x74, 0x30); F ((yyvsp[(5) - (5)].regno), 12, 4); IMM ((yyvsp[(3) - (5)].exp), 6); } }
2437     break;
2438
2439   case 35:
2440 #line 373 "rx-parse.y"
2441     { if (rx_uintop ((yyvsp[(4) - (6)].exp), 4))
2442               { B2 (0x66, 0); FE ((yyvsp[(4) - (6)].exp), 8, 4); F ((yyvsp[(6) - (6)].regno), 12, 4); }
2443             else if (rx_uintop ((yyvsp[(4) - (6)].exp), 8))
2444               { B2 (0x75, 0x40); F ((yyvsp[(6) - (6)].regno), 12, 4); UO1 ((yyvsp[(4) - (6)].exp)); }
2445             else
2446               { B2 (0xfb, 0x02); F ((yyvsp[(6) - (6)].regno), 8, 4); IMM ((yyvsp[(4) - (6)].exp), 12); } }
2447     break;
2448
2449   case 36:
2450 #line 381 "rx-parse.y"
2451     { if (rx_uintop ((yyvsp[(3) - (5)].exp), 4))
2452               { B2 (0x66, 0); FE ((yyvsp[(3) - (5)].exp), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2453             else if (rx_uintop ((yyvsp[(3) - (5)].exp), 8))
2454               { B2 (0x75, 0x40); F ((yyvsp[(5) - (5)].regno), 12, 4); UO1 ((yyvsp[(3) - (5)].exp)); }
2455             else
2456               { B2 (0xfb, 0x02); F ((yyvsp[(5) - (5)].regno), 8, 4); IMM ((yyvsp[(3) - (5)].exp), 12); } }
2457     break;
2458
2459   case 37:
2460 #line 391 "rx-parse.y"
2461     { B1 (0x67); rtsd_immediate ((yyvsp[(3) - (3)].exp)); }
2462     break;
2463
2464   case 38:
2465 #line 395 "rx-parse.y"
2466     { sub_op = 0; }
2467     break;
2468
2469   case 40:
2470 #line 396 "rx-parse.y"
2471     { sub_op = 1; }
2472     break;
2473
2474   case 42:
2475 #line 397 "rx-parse.y"
2476     { sub_op = 2; }
2477     break;
2478
2479   case 44:
2480 #line 402 "rx-parse.y"
2481     {
2482             if ((yyvsp[(2) - (4)].regno) == (yyvsp[(4) - (4)].regno))
2483               { B2 (0x7e, 0x80); F (LSIZE, 10, 2); F ((yyvsp[(2) - (4)].regno), 12, 4); }
2484             else
2485              { B2 (0x6e, 0); F ((yyvsp[(2) - (4)].regno), 8, 4); F ((yyvsp[(4) - (4)].regno), 12, 4); }
2486             if ((yyvsp[(2) - (4)].regno) == 0)
2487               rx_error (_("PUSHM cannot push R0"));
2488             if ((yyvsp[(2) - (4)].regno) > (yyvsp[(4) - (4)].regno))
2489               rx_error (_("PUSHM first reg must be <= second reg")); }
2490     break;
2491
2492   case 45:
2493 #line 415 "rx-parse.y"
2494     {
2495             if ((yyvsp[(2) - (4)].regno) == (yyvsp[(4) - (4)].regno))
2496               { B2 (0x7e, 0xb0); F ((yyvsp[(2) - (4)].regno), 12, 4); }
2497             else
2498               { B2 (0x6f, 0); F ((yyvsp[(2) - (4)].regno), 8, 4); F ((yyvsp[(4) - (4)].regno), 12, 4); }
2499             if ((yyvsp[(2) - (4)].regno) == 0)
2500               rx_error (_("POPM cannot pop R0"));
2501             if ((yyvsp[(2) - (4)].regno) > (yyvsp[(4) - (4)].regno))
2502               rx_error (_("POPM first reg must be <= second reg")); }
2503     break;
2504
2505   case 46:
2506 #line 428 "rx-parse.y"
2507     { B2 (0x70, 0x00); F ((yyvsp[(5) - (7)].regno), 8, 4); F ((yyvsp[(7) - (7)].regno), 12, 4); IMM ((yyvsp[(3) - (7)].exp), 6); }
2508     break;
2509
2510   case 47:
2511 #line 433 "rx-parse.y"
2512     { B2(0x75, 0x60), UO1 ((yyvsp[(3) - (3)].exp)); }
2513     break;
2514
2515   case 48:
2516 #line 438 "rx-parse.y"
2517     { B2 (0x78, 0); FE ((yyvsp[(3) - (5)].exp), 7, 5); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2518     break;
2519
2520   case 49:
2521 #line 440 "rx-parse.y"
2522     { B2 (0x7a, 0); FE ((yyvsp[(3) - (5)].exp), 7, 5); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2523     break;
2524
2525   case 50:
2526 #line 445 "rx-parse.y"
2527     { B2 (0x7c, 0x00); FE ((yyvsp[(3) - (5)].exp), 7, 5); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2528     break;
2529
2530   case 51:
2531 #line 450 "rx-parse.y"
2532     { B2 (0x7e, 0x30); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2533     break;
2534
2535   case 52:
2536 #line 452 "rx-parse.y"
2537     { B2 (0x7e, 0x40); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2538     break;
2539
2540   case 53:
2541 #line 454 "rx-parse.y"
2542     { B2 (0x7e, 0x50); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2543     break;
2544
2545   case 54:
2546 #line 459 "rx-parse.y"
2547     { B2 (0x7e, 0x80); F ((yyvsp[(2) - (3)].regno), 10, 2); F ((yyvsp[(3) - (3)].regno), 12, 4); }
2548     break;
2549
2550   case 55:
2551 #line 464 "rx-parse.y"
2552     { B2 (0x7e, 0xb0); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2553     break;
2554
2555   case 56:
2556 #line 469 "rx-parse.y"
2557     { if ((yyvsp[(2) - (2)].regno) < 16)
2558               { B2 (0x7e, 0xc0); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2559             else
2560               as_bad (_("PUSHC can only push the first 16 control registers")); }
2561     break;
2562
2563   case 57:
2564 #line 477 "rx-parse.y"
2565     { if ((yyvsp[(2) - (2)].regno) < 16)
2566               { B2 (0x7e, 0xe0); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2567             else
2568               as_bad (_("POPC can only pop the first 16 control registers")); }
2569     break;
2570
2571   case 58:
2572 #line 485 "rx-parse.y"
2573     { B2 (0x7f, 0xa0); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2574     break;
2575
2576   case 59:
2577 #line 487 "rx-parse.y"
2578     { B2 (0x7f, 0xb0); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2579     break;
2580
2581   case 60:
2582 #line 492 "rx-parse.y"
2583     { B2 (0x7f, 0x00); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2584     break;
2585
2586   case 61:
2587 #line 494 "rx-parse.y"
2588     { B2 (0x7f, 0x10); F ((yyvsp[(2) - (2)].regno), 12, 4); }
2589     break;
2590
2591   case 62:
2592 #line 496 "rx-parse.y"
2593     { B2 (0x7f, 0x40); F ((yyvsp[(3) - (3)].regno), 12, 4); }
2594     break;
2595
2596   case 63:
2597 #line 498 "rx-parse.y"
2598     { B2 (0x7f, 0x50); F ((yyvsp[(3) - (3)].regno), 12, 4); }
2599     break;
2600
2601   case 64:
2602 #line 503 "rx-parse.y"
2603     { B2 (0x7f, 0x83); }
2604     break;
2605
2606   case 65:
2607 #line 505 "rx-parse.y"
2608     { B2 (0x7f, 0x87); }
2609     break;
2610
2611   case 66:
2612 #line 507 "rx-parse.y"
2613     { B2 (0x7f, 0x8b); }
2614     break;
2615
2616   case 67:
2617 #line 509 "rx-parse.y"
2618     { B2 (0x7f, 0x8f); }
2619     break;
2620
2621   case 68:
2622 #line 514 "rx-parse.y"
2623     { B2 (0x7f, 0x80); F ((yyvsp[(2) - (2)].regno), 14, 2); }
2624     break;
2625
2626   case 69:
2627 #line 516 "rx-parse.y"
2628     { B2 (0x7f, 0x84); F ((yyvsp[(2) - (2)].regno), 14, 2); }
2629     break;
2630
2631   case 70:
2632 #line 518 "rx-parse.y"
2633     { B2 (0x7f, 0x88); F ((yyvsp[(2) - (2)].regno), 14, 2); }
2634     break;
2635
2636   case 71:
2637 #line 523 "rx-parse.y"
2638     { B2 (0x7f, 0x8c); F ((yyvsp[(2) - (2)].regno), 14, 2); }
2639     break;
2640
2641   case 72:
2642 #line 528 "rx-parse.y"
2643     { B2 (0x7f, 0x94); }
2644     break;
2645
2646   case 73:
2647 #line 530 "rx-parse.y"
2648     { B2 (0x7f, 0x95); }
2649     break;
2650
2651   case 74:
2652 #line 532 "rx-parse.y"
2653     { B2 (0x7f, 0x96); }
2654     break;
2655
2656   case 75:
2657 #line 534 "rx-parse.y"
2658     { B2 (0x7f, 0x93); }
2659     break;
2660
2661   case 76:
2662 #line 539 "rx-parse.y"
2663     { B3 (0x75, 0x70, 0x00); FE ((yyvsp[(3) - (3)].exp), 20, 4); }
2664     break;
2665
2666   case 77:
2667 #line 545 "rx-parse.y"
2668     { if ((yyvsp[(3) - (8)].regno) <= 7 && (yyvsp[(7) - (8)].regno) <= 7 && rx_disp5op (&(yyvsp[(5) - (8)].exp), (yyvsp[(2) - (8)].regno)))
2669               { B2 (0x80, 0); F ((yyvsp[(2) - (8)].regno), 2, 2); F ((yyvsp[(7) - (8)].regno), 9, 3); F ((yyvsp[(3) - (8)].regno), 13, 3); rx_field5s ((yyvsp[(5) - (8)].exp)); }
2670             else
2671               { B2 (0xc3, 0x00); F ((yyvsp[(2) - (8)].regno), 2, 2); F ((yyvsp[(7) - (8)].regno), 8, 4); F ((yyvsp[(3) - (8)].regno), 12, 4); DSP ((yyvsp[(5) - (8)].exp), 4, (yyvsp[(2) - (8)].regno)); }}
2672     break;
2673
2674   case 78:
2675 #line 553 "rx-parse.y"
2676     { if ((yyvsp[(5) - (8)].regno) <= 7 && (yyvsp[(8) - (8)].regno) <= 7 && rx_disp5op (&(yyvsp[(3) - (8)].exp), (yyvsp[(2) - (8)].regno)))
2677               { B2 (0x88, 0); F ((yyvsp[(2) - (8)].regno), 2, 2); F ((yyvsp[(5) - (8)].regno), 9, 3); F ((yyvsp[(8) - (8)].regno), 13, 3); rx_field5s ((yyvsp[(3) - (8)].exp)); }
2678             else
2679               { B2 (0xcc, 0x00); F ((yyvsp[(2) - (8)].regno), 2, 2); F ((yyvsp[(5) - (8)].regno), 8, 4); F ((yyvsp[(8) - (8)].regno), 12, 4); DSP ((yyvsp[(3) - (8)].exp), 6, (yyvsp[(2) - (8)].regno)); } }
2680     break;
2681
2682   case 79:
2683 #line 567 "rx-parse.y"
2684     { B2 (0xc3, 0x00); F ((yyvsp[(2) - (7)].regno), 2, 2); F ((yyvsp[(6) - (7)].regno), 8, 4); F ((yyvsp[(3) - (7)].regno), 12, 4); }
2685     break;
2686
2687   case 80:
2688 #line 572 "rx-parse.y"
2689     { B2 (0xc0, 0); F ((yyvsp[(2) - (10)].regno), 2, 2); F ((yyvsp[(4) - (10)].regno), 8, 4); F ((yyvsp[(9) - (10)].regno), 12, 4); DSP ((yyvsp[(7) - (10)].exp), 4, (yyvsp[(2) - (10)].regno)); }
2690     break;
2691
2692   case 81:
2693 #line 577 "rx-parse.y"
2694     { B2 (0xc0, 0x00); F ((yyvsp[(2) - (11)].regno), 2, 2); F ((yyvsp[(5) - (11)].regno), 8, 4); F ((yyvsp[(10) - (11)].regno), 12, 4); DSP ((yyvsp[(3) - (11)].exp), 6, (yyvsp[(2) - (11)].regno)); DSP ((yyvsp[(8) - (11)].exp), 4, (yyvsp[(2) - (11)].regno)); }
2695     break;
2696
2697   case 82:
2698 #line 582 "rx-parse.y"
2699     { B2 (0xcf, 0x00); F ((yyvsp[(2) - (5)].regno), 2, 2); F ((yyvsp[(3) - (5)].regno), 8, 4); F ((yyvsp[(5) - (5)].regno), 12, 4); }
2700     break;
2701
2702   case 83:
2703 #line 587 "rx-parse.y"
2704     { B2 (0xcc, 0x00); F ((yyvsp[(2) - (7)].regno), 2, 2); F ((yyvsp[(4) - (7)].regno), 8, 4); F ((yyvsp[(7) - (7)].regno), 12, 4); }
2705     break;
2706
2707   case 84:
2708 #line 592 "rx-parse.y"
2709     { B2 (0xf0, 0x00); F ((yyvsp[(7) - (9)].regno), 8, 4); FE ((yyvsp[(3) - (9)].exp), 13, 3); DSP ((yyvsp[(5) - (9)].exp), 6, BSIZE); }
2710     break;
2711
2712   case 85:
2713 #line 594 "rx-parse.y"
2714     { B2 (0xf0, 0x08); F ((yyvsp[(7) - (9)].regno), 8, 4); FE ((yyvsp[(3) - (9)].exp), 13, 3); DSP ((yyvsp[(5) - (9)].exp), 6, BSIZE); }
2715     break;
2716
2717   case 86:
2718 #line 596 "rx-parse.y"
2719     { B2 (0xf4, 0x00); F ((yyvsp[(7) - (9)].regno), 8, 4); FE ((yyvsp[(3) - (9)].exp), 13, 3); DSP ((yyvsp[(5) - (9)].exp), 6, BSIZE); }
2720     break;
2721
2722   case 87:
2723 #line 601 "rx-parse.y"
2724     { B2 (0xf4, 0x08); F ((yyvsp[(2) - (6)].regno), 14, 2); F ((yyvsp[(5) - (6)].regno), 8, 4); DSP ((yyvsp[(3) - (6)].exp), 6, (yyvsp[(2) - (6)].regno)); }
2725     break;
2726
2727   case 88:
2728 #line 605 "rx-parse.y"
2729     { sub_op = 0; }
2730     break;
2731
2732   case 90:
2733 #line 606 "rx-parse.y"
2734     { sub_op = 1; sub_op2 = 1; }
2735     break;
2736
2737   case 92:
2738 #line 607 "rx-parse.y"
2739     { sub_op = 2; }
2740     break;
2741
2742   case 94:
2743 #line 608 "rx-parse.y"
2744     { sub_op = 3; sub_op2 = 2; }
2745     break;
2746
2747   case 96:
2748 #line 609 "rx-parse.y"
2749     { sub_op = 4; }
2750     break;
2751
2752   case 98:
2753 #line 610 "rx-parse.y"
2754     { sub_op = 5; }
2755     break;
2756
2757   case 100:
2758 #line 611 "rx-parse.y"
2759     { sub_op = 6; }
2760     break;
2761
2762   case 102:
2763 #line 612 "rx-parse.y"
2764     { sub_op = 7; }
2765     break;
2766
2767   case 104:
2768 #line 613 "rx-parse.y"
2769     { sub_op = 8; }
2770     break;
2771
2772   case 106:
2773 #line 614 "rx-parse.y"
2774     { sub_op = 9; }
2775     break;
2776
2777   case 108:
2778 #line 615 "rx-parse.y"
2779     { sub_op = 12; }
2780     break;
2781
2782   case 110:
2783 #line 616 "rx-parse.y"
2784     { sub_op = 13; }
2785     break;
2786
2787   case 112:
2788 #line 617 "rx-parse.y"
2789     { sub_op = 14; sub_op2 = 0; }
2790     break;
2791
2792   case 114:
2793 #line 618 "rx-parse.y"
2794     { sub_op = 14; }
2795     break;
2796
2797   case 116:
2798 #line 619 "rx-parse.y"
2799     { sub_op = 15; }
2800     break;
2801
2802   case 118:
2803 #line 623 "rx-parse.y"
2804     { sub_op = 6; }
2805     break;
2806
2807   case 120:
2808 #line 624 "rx-parse.y"
2809     { sub_op = 7; }
2810     break;
2811
2812   case 122:
2813 #line 625 "rx-parse.y"
2814     { sub_op = 16; }
2815     break;
2816
2817   case 124:
2818 #line 626 "rx-parse.y"
2819     { sub_op = 17; }
2820     break;
2821
2822   case 126:
2823 #line 631 "rx-parse.y"
2824     { id24 (1, 0x63, 0x00); F ((yyvsp[(4) - (4)].regno), 16, 4); F ((yyvsp[(2) - (4)].regno), 20, 4); }
2825     break;
2826
2827   case 127:
2828 #line 633 "rx-parse.y"
2829     { id24 (1, 0x67, 0x00); F ((yyvsp[(4) - (4)].regno), 16, 4); F ((yyvsp[(2) - (4)].regno), 20, 4); }
2830     break;
2831
2832   case 128:
2833 #line 635 "rx-parse.y"
2834     { id24 (1, 0x6b, 0x00); F ((yyvsp[(4) - (4)].regno), 16, 4); F ((yyvsp[(2) - (4)].regno), 20, 4); }
2835     break;
2836
2837   case 129:
2838 #line 637 "rx-parse.y"
2839     { id24 (1, 0x6f, 0x00); F ((yyvsp[(4) - (4)].regno), 16, 4); F ((yyvsp[(2) - (4)].regno), 20, 4); }
2840     break;
2841
2842   case 130:
2843 #line 640 "rx-parse.y"
2844     { id24 (1, 0x60, 0x00); F ((yyvsp[(6) - (8)].regno), 16, 4); F ((yyvsp[(2) - (8)].regno), 20, 4); DSP ((yyvsp[(4) - (8)].exp), 14, BSIZE); }
2845     break;
2846
2847   case 131:
2848 #line 642 "rx-parse.y"
2849     { id24 (1, 0x64, 0x00); F ((yyvsp[(6) - (8)].regno), 16, 4); F ((yyvsp[(2) - (8)].regno), 20, 4); DSP ((yyvsp[(4) - (8)].exp), 14, BSIZE); }
2850     break;
2851
2852   case 132:
2853 #line 644 "rx-parse.y"
2854     { id24 (1, 0x68, 0x00); F ((yyvsp[(6) - (8)].regno), 16, 4); F ((yyvsp[(2) - (8)].regno), 20, 4); DSP ((yyvsp[(4) - (8)].exp), 14, BSIZE); }
2855     break;
2856
2857   case 133:
2858 #line 646 "rx-parse.y"
2859     { id24 (1, 0x6c, 0x00); F ((yyvsp[(6) - (8)].regno), 16, 4); F ((yyvsp[(2) - (8)].regno), 20, 4); DSP ((yyvsp[(4) - (8)].exp), 14, BSIZE); }
2860     break;
2861
2862   case 134:
2863 #line 650 "rx-parse.y"
2864     { sub_op = 0; }
2865     break;
2866
2867   case 136:
2868 #line 651 "rx-parse.y"
2869     { sub_op = 1; }
2870     break;
2871
2872   case 138:
2873 #line 652 "rx-parse.y"
2874     { sub_op = 2; }
2875     break;
2876
2877   case 140:
2878 #line 653 "rx-parse.y"
2879     { sub_op = 3; }
2880     break;
2881
2882   case 142:
2883 #line 654 "rx-parse.y"
2884     { sub_op = 4; }
2885     break;
2886
2887   case 144:
2888 #line 655 "rx-parse.y"
2889     { sub_op = 5; }
2890     break;
2891
2892   case 146:
2893 #line 656 "rx-parse.y"
2894     { sub_op = 6; }
2895     break;
2896
2897   case 148:
2898 #line 661 "rx-parse.y"
2899     { id24 (1, 0xdb, 0x00); F ((yyvsp[(1) - (3)].regno), 20, 4); F ((yyvsp[(3) - (3)].regno), 16, 4); }
2900     break;
2901
2902   case 149:
2903 #line 663 "rx-parse.y"
2904     { id24 (1, 0xd0, 0x00); F ((yyvsp[(1) - (6)].regno), 20, 4); F ((yyvsp[(2) - (6)].regno), 12, 2); F ((yyvsp[(5) - (6)].regno), 16, 4); DSP ((yyvsp[(3) - (6)].exp), 14, (yyvsp[(2) - (6)].regno)); }
2905     break;
2906
2907   case 150:
2908 #line 668 "rx-parse.y"
2909     { id24 (1, 0xe0, 0x00); F ((yyvsp[(1) - (9)].regno), 20, 4); FE ((yyvsp[(3) - (9)].exp), 11, 3);
2910               F ((yyvsp[(7) - (9)].regno), 16, 4); DSP ((yyvsp[(5) - (9)].exp), 14, BSIZE); }
2911     break;
2912
2913   case 151:
2914 #line 674 "rx-parse.y"
2915     { id24 (1, 0xe0, 0x0f); FE ((yyvsp[(3) - (9)].exp), 11, 3); F ((yyvsp[(7) - (9)].regno), 16, 4);
2916               DSP ((yyvsp[(5) - (9)].exp), 14, BSIZE); }
2917     break;
2918
2919   case 152:
2920 #line 680 "rx-parse.y"
2921     { id24 (2, 0x00, 0x00); F ((yyvsp[(2) - (4)].regno), 16, 4); F ((yyvsp[(4) - (4)].regno), 20, 4); }
2922     break;
2923
2924   case 153:
2925 #line 682 "rx-parse.y"
2926     { id24 (2, 0x01, 0x00); F ((yyvsp[(2) - (4)].regno), 16, 4); F ((yyvsp[(4) - (4)].regno), 20, 4); }
2927     break;
2928
2929   case 154:
2930 #line 684 "rx-parse.y"
2931     { id24 (2, 0x04, 0x00); F ((yyvsp[(2) - (4)].regno), 16, 4); F ((yyvsp[(4) - (4)].regno), 20, 4); }
2932     break;
2933
2934   case 155:
2935 #line 686 "rx-parse.y"
2936     { id24 (2, 0x05, 0x00); F ((yyvsp[(2) - (4)].regno), 16, 4); F ((yyvsp[(4) - (4)].regno), 20, 4); }
2937     break;
2938
2939   case 156:
2940 #line 692 "rx-parse.y"
2941     { id24 (2, 0x17, 0x00); F ((yyvsp[(2) - (2)].regno), 20, 4); }
2942     break;
2943
2944   case 157:
2945 #line 694 "rx-parse.y"
2946     { id24 (2, 0x17, 0x10); F ((yyvsp[(2) - (2)].regno), 20, 4); }
2947     break;
2948
2949   case 158:
2950 #line 696 "rx-parse.y"
2951     { id24 (2, 0x1f, 0x00); F ((yyvsp[(2) - (2)].regno), 20, 4); }
2952     break;
2953
2954   case 159:
2955 #line 698 "rx-parse.y"
2956     { id24 (2, 0x1f, 0x20); F ((yyvsp[(2) - (2)].regno), 20, 4); }
2957     break;
2958
2959   case 160:
2960 #line 700 "rx-parse.y"
2961     { id24 (2, 0x1f, 0x10); F ((yyvsp[(2) - (2)].regno), 20, 4); }
2962     break;
2963
2964   case 161:
2965 #line 703 "rx-parse.y"
2966     { id24 (2, 0x18, 0x00);
2967             if (rx_uintop ((yyvsp[(3) - (3)].exp), 4) && (yyvsp[(3) - (3)].exp).X_add_number == 1)
2968               ;
2969             else if (rx_uintop ((yyvsp[(3) - (3)].exp), 4) && (yyvsp[(3) - (3)].exp).X_add_number == 2)
2970               F (1, 19, 1);
2971             else
2972               as_bad (_("RACW expects #1 or #2"));}
2973     break;
2974
2975   case 162:
2976 #line 714 "rx-parse.y"
2977     { id24 (2, 0x20, 0); F ((yyvsp[(2) - (8)].regno), 14, 2); F ((yyvsp[(6) - (8)].regno), 16, 4); F ((yyvsp[(3) - (8)].regno), 20, 4); }
2978     break;
2979
2980   case 163:
2981 #line 716 "rx-parse.y"
2982     { id24 (2, 0x24, 0); F ((yyvsp[(2) - (8)].regno), 14, 2); F ((yyvsp[(7) - (8)].regno), 16, 4); F ((yyvsp[(3) - (8)].regno), 20, 4); }
2983     break;
2984
2985   case 164:
2986 #line 721 "rx-parse.y"
2987     { id24 (2, 0x28, 0); F ((yyvsp[(2) - (8)].regno), 14, 2); F ((yyvsp[(4) - (8)].regno), 16, 4); F ((yyvsp[(8) - (8)].regno), 20, 4); }
2988     break;
2989
2990   case 165:
2991 #line 723 "rx-parse.y"
2992     { id24 (2, 0x2c, 0); F ((yyvsp[(2) - (8)].regno), 14, 2); F ((yyvsp[(5) - (8)].regno), 16, 4); F ((yyvsp[(8) - (8)].regno), 20, 4); }
2993     break;
2994
2995   case 166:
2996 #line 728 "rx-parse.y"
2997     { id24 (2, 0x38, 0); F ((yyvsp[(2) - (8)].regno), 15, 1); F ((yyvsp[(4) - (8)].regno), 16, 4); F ((yyvsp[(8) - (8)].regno), 20, 4); }
2998     break;
2999
3000   case 167:
3001 #line 730 "rx-parse.y"
3002     { id24 (2, 0x3c, 0); F ((yyvsp[(2) - (8)].regno), 15, 1); F ((yyvsp[(5) - (8)].regno), 16, 4); F ((yyvsp[(8) - (8)].regno), 20, 4); }
3003     break;
3004
3005   case 168:
3006 #line 734 "rx-parse.y"
3007     { sub_op = 6; }
3008     break;
3009
3010   case 170:
3011 #line 735 "rx-parse.y"
3012     { sub_op = 4; }
3013     break;
3014
3015   case 172:
3016 #line 736 "rx-parse.y"
3017     { sub_op = 5; }
3018     break;
3019
3020   case 174:
3021 #line 737 "rx-parse.y"
3022     { sub_op = 7; }
3023     break;
3024
3025   case 176:
3026 #line 742 "rx-parse.y"
3027     { id24 (2, 0x68, 0x00); F ((yyvsp[(4) - (4)].regno) % 16, 20, 4); F ((yyvsp[(4) - (4)].regno) / 16, 15, 1);
3028             F ((yyvsp[(2) - (4)].regno), 16, 4); }
3029     break;
3030
3031   case 177:
3032 #line 748 "rx-parse.y"
3033     { id24 (2, 0x6a, 0); F ((yyvsp[(2) - (4)].regno), 15, 5); F ((yyvsp[(4) - (4)].regno), 20, 4); }
3034     break;
3035
3036   case 178:
3037 #line 753 "rx-parse.y"
3038     { id24 (2, 0x6e, 0); FE ((yyvsp[(3) - (5)].exp), 15, 5); F ((yyvsp[(5) - (5)].regno), 20, 4); }
3039     break;
3040
3041   case 179:
3042 #line 755 "rx-parse.y"
3043     { id24 (2, 0x6c, 0); FE ((yyvsp[(3) - (5)].exp), 15, 5); F ((yyvsp[(5) - (5)].regno), 20, 4); }
3044     break;
3045
3046   case 180:
3047 #line 760 "rx-parse.y"
3048     { id24 (2, 0x73, 0x00); F ((yyvsp[(5) - (5)].regno), 19, 5); IMM ((yyvsp[(3) - (5)].exp), 12); }
3049     break;
3050
3051   case 181:
3052 #line 765 "rx-parse.y"
3053     { id24 (2, 0xe0, 0x00); F ((yyvsp[(1) - (5)].regno), 16, 4); FE ((yyvsp[(3) - (5)].exp), 11, 5);
3054               F ((yyvsp[(5) - (5)].regno), 20, 4); }
3055     break;
3056
3057   case 182:
3058 #line 771 "rx-parse.y"
3059     { id24 (2, 0xe0, 0xf0); FE ((yyvsp[(3) - (5)].exp), 11, 5); F ((yyvsp[(5) - (5)].regno), 20, 4); }
3060     break;
3061
3062   case 183:
3063 #line 776 "rx-parse.y"
3064     { id24 (3, 0x00, 0); F ((yyvsp[(2) - (9)].regno), 10, 2); F ((yyvsp[(6) - (9)].regno), 12, 4); F ((yyvsp[(8) - (9)].regno), 16, 4); F ((yyvsp[(3) - (9)].regno), 20, 4); }
3065     break;
3066
3067   case 184:
3068 #line 779 "rx-parse.y"
3069     { id24 (3, 0x40, 0); F ((yyvsp[(2) - (9)].regno), 10, 2); F ((yyvsp[(4) - (9)].regno), 12, 4); F ((yyvsp[(6) - (9)].regno), 16, 4); F ((yyvsp[(9) - (9)].regno), 20, 4); }
3070     break;
3071
3072   case 185:
3073 #line 782 "rx-parse.y"
3074     { id24 (3, 0xc0, 0); F ((yyvsp[(2) - (9)].regno), 10, 2); F ((yyvsp[(4) - (9)].regno), 12, 4); F ((yyvsp[(6) - (9)].regno), 16, 4); F ((yyvsp[(9) - (9)].regno), 20, 4); }
3075     break;
3076
3077   case 186:
3078 #line 786 "rx-parse.y"
3079     { sub_op = 0; }
3080     break;
3081
3082   case 188:
3083 #line 787 "rx-parse.y"
3084     { sub_op = 2; }
3085     break;
3086
3087   case 190:
3088 #line 788 "rx-parse.y"
3089     { sub_op = 3; }
3090     break;
3091
3092   case 192:
3093 #line 789 "rx-parse.y"
3094     { sub_op = 4; }
3095     break;
3096
3097   case 194:
3098 #line 790 "rx-parse.y"
3099     { sub_op = 5; }
3100     break;
3101
3102   case 196:
3103 #line 796 "rx-parse.y"
3104     { id24 (2, 0x70, 0x20); F ((yyvsp[(5) - (5)].regno), 20, 4); NBIMM ((yyvsp[(3) - (5)].exp), 12); }
3105     break;
3106
3107   case 197:
3108 #line 806 "rx-parse.y"
3109     { B2 (0x43 + (sub_op<<2), 0); F ((yyvsp[(1) - (3)].regno), 8, 4); F ((yyvsp[(3) - (3)].regno), 12, 4); }
3110     break;
3111
3112   case 198:
3113 #line 808 "rx-parse.y"
3114     { B2 (0x40 + (sub_op<<2), 0); F ((yyvsp[(3) - (7)].regno), 8, 4); F ((yyvsp[(7) - (7)].regno), 12, 4); DSP ((yyvsp[(1) - (7)].exp), 6, BSIZE); }
3115     break;
3116
3117   case 199:
3118 #line 810 "rx-parse.y"
3119     { B3 (MEMEX, sub_op<<2, 0); F ((yyvsp[(5) - (7)].regno), 8, 2); F ((yyvsp[(3) - (7)].regno), 16, 4); F ((yyvsp[(7) - (7)].regno), 20, 4); DSP ((yyvsp[(1) - (7)].exp), 14, sizemap[(yyvsp[(5) - (7)].regno)]); }
3120     break;
3121
3122   case 200:
3123 #line 812 "rx-parse.y"
3124     { id24 (4, sub_op<<4, 0), F ((yyvsp[(5) - (5)].regno), 12, 4), F ((yyvsp[(1) - (5)].regno), 16, 4), F ((yyvsp[(3) - (5)].regno), 20, 4); }
3125     break;
3126
3127   case 201:
3128 #line 819 "rx-parse.y"
3129     { id24 (1, 0x03 + (sub_op<<2), 0x00); F ((yyvsp[(1) - (3)].regno), 16, 4); F ((yyvsp[(3) - (3)].regno), 20, 4); }
3130     break;
3131
3132   case 202:
3133 #line 821 "rx-parse.y"
3134     { B4 (MEMEX, 0xa0, 0x00 + sub_op, 0x00);
3135           F ((yyvsp[(3) - (7)].regno), 24, 4); F ((yyvsp[(7) - (7)].regno), 28, 4); DSP ((yyvsp[(1) - (7)].exp), 14, LSIZE); }
3136     break;
3137
3138   case 203:
3139 #line 829 "rx-parse.y"
3140     { id24 (1, 0x03 + (sub_op<<2), 0x00); F ((yyvsp[(1) - (3)].regno), 16, 4); F ((yyvsp[(3) - (3)].regno), 20, 4); }
3141     break;
3142
3143   case 204:
3144 #line 831 "rx-parse.y"
3145     { id24 (1, 0x00 + (sub_op<<2), 0x00); F ((yyvsp[(3) - (7)].regno), 16, 4); F ((yyvsp[(7) - (7)].regno), 20, 4); DSP ((yyvsp[(1) - (7)].exp), 14, BSIZE); }
3146     break;
3147
3148   case 205:
3149 #line 833 "rx-parse.y"
3150     { B4 (MEMEX, 0x20 + ((yyvsp[(5) - (7)].regno) << 6), 0x00 + sub_op, 0x00);
3151           F ((yyvsp[(3) - (7)].regno), 24, 4); F ((yyvsp[(7) - (7)].regno), 28, 4); DSP ((yyvsp[(1) - (7)].exp), 14, sizemap[(yyvsp[(5) - (7)].regno)]); }
3152     break;
3153
3154   case 206:
3155 #line 839 "rx-parse.y"
3156     { id24 (2, 0x70, sub_op<<4); F ((yyvsp[(4) - (4)].regno), 20, 4); IMM ((yyvsp[(2) - (4)].exp), 12); }
3157     break;
3158
3159   case 211:
3160 #line 854 "rx-parse.y"
3161     { id24 (1, 0x03 + (sub_op<<2), 0x00); F ((yyvsp[(1) - (3)].regno), 16, 4); F ((yyvsp[(3) - (3)].regno), 20, 4); }
3162     break;
3163
3164   case 212:
3165 #line 856 "rx-parse.y"
3166     { B2 (0x7e, sub_op2 << 4); F ((yyvsp[(1) - (1)].regno), 12, 4); }
3167     break;
3168
3169   case 213:
3170 #line 862 "rx-parse.y"
3171     { id24 (1, 0x03 + (sub_op<<2), 0); F ((yyvsp[(1) - (3)].regno), 16, 4); F ((yyvsp[(3) - (3)].regno), 20, 4); }
3172     break;
3173
3174   case 214:
3175 #line 864 "rx-parse.y"
3176     { id24 (1, 0x00 + (sub_op<<2), 0); F ((yyvsp[(3) - (7)].regno), 16, 4); F ((yyvsp[(7) - (7)].regno), 20, 4); DSP ((yyvsp[(1) - (7)].exp), 14, BSIZE); }
3177     break;
3178
3179   case 215:
3180 #line 866 "rx-parse.y"
3181     { B4 (MEMEX, 0x20, 0x00 + sub_op, 0); F ((yyvsp[(5) - (7)].regno), 8, 2); F ((yyvsp[(3) - (7)].regno), 24, 4); F ((yyvsp[(7) - (7)].regno), 28, 4);
3182             DSP ((yyvsp[(1) - (7)].exp), 14, sizemap[(yyvsp[(5) - (7)].regno)]); }
3183     break;
3184
3185   case 216:
3186 #line 873 "rx-parse.y"
3187     { id24 (2, 0x60 + sub_op, 0); F ((yyvsp[(1) - (3)].regno), 16, 4); F ((yyvsp[(3) - (3)].regno), 20, 4); }
3188     break;
3189
3190   case 217:
3191 #line 877 "rx-parse.y"
3192     { B2 (0x68 + (sub_op<<1), 0); FE ((yyvsp[(2) - (4)].exp), 7, 5); F ((yyvsp[(4) - (4)].regno), 12, 4); }
3193     break;
3194
3195   case 218:
3196 #line 879 "rx-parse.y"
3197     { id24 (2, 0x80 + (sub_op << 5), 0); FE ((yyvsp[(2) - (6)].exp), 11, 5); F ((yyvsp[(4) - (6)].regno), 16, 4); F ((yyvsp[(6) - (6)].regno), 20, 4); }
3198     break;
3199
3200   case 220:
3201 #line 885 "rx-parse.y"
3202     { rx_check_float_support (); }
3203     break;
3204
3205   case 221:
3206 #line 887 "rx-parse.y"
3207     { id24 (2, 0x72, sub_op << 4); F ((yyvsp[(5) - (5)].regno), 20, 4); O4 ((yyvsp[(3) - (5)].exp)); }
3208     break;
3209
3210   case 223:
3211 #line 892 "rx-parse.y"
3212     { rx_check_float_support (); }
3213     break;
3214
3215   case 224:
3216 #line 894 "rx-parse.y"
3217     { id24 (1, 0x83 + (sub_op << 2), 0); F ((yyvsp[(2) - (4)].regno), 16, 4); F ((yyvsp[(4) - (4)].regno), 20, 4); }
3218     break;
3219
3220   case 225:
3221 #line 895 "rx-parse.y"
3222     { rx_check_float_support (); }
3223     break;
3224
3225   case 226:
3226 #line 897 "rx-parse.y"
3227     { id24 (1, 0x80 + (sub_op << 2), 0); F ((yyvsp[(4) - (8)].regno), 16, 4); F ((yyvsp[(8) - (8)].regno), 20, 4); DSP ((yyvsp[(2) - (8)].exp), 14, LSIZE); }
3228     break;
3229
3230   case 227:
3231 #line 902 "rx-parse.y"
3232     { (yyval.exp) = zero_expr (); }
3233     break;
3234
3235   case 228:
3236 #line 903 "rx-parse.y"
3237     { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
3238     break;
3239
3240   case 229:
3241 #line 906 "rx-parse.y"
3242     { need_flag = 1; }
3243     break;
3244
3245   case 230:
3246 #line 906 "rx-parse.y"
3247     { need_flag = 0; (yyval.regno) = (yyvsp[(2) - (2)].regno); }
3248     break;
3249
3250   case 231:
3251 #line 911 "rx-parse.y"
3252     { (yyval.regno) = 0; }
3253     break;
3254
3255   case 232:
3256 #line 912 "rx-parse.y"
3257     { (yyval.regno) = 1; }
3258     break;
3259
3260   case 233:
3261 #line 913 "rx-parse.y"
3262     { (yyval.regno) = 2; }
3263     break;
3264
3265   case 234:
3266 #line 914 "rx-parse.y"
3267     { (yyval.regno) = 2; }
3268     break;
3269
3270   case 235:
3271 #line 915 "rx-parse.y"
3272     { (yyval.regno) = 3; }
3273     break;
3274
3275   case 236:
3276 #line 918 "rx-parse.y"
3277     { (yyval.regno) = LSIZE; }
3278     break;
3279
3280   case 237:
3281 #line 919 "rx-parse.y"
3282     { (yyval.regno) = BSIZE; }
3283     break;
3284
3285   case 238:
3286 #line 920 "rx-parse.y"
3287     { (yyval.regno) = WSIZE; }
3288     break;
3289
3290   case 239:
3291 #line 921 "rx-parse.y"
3292     { (yyval.regno) = LSIZE; }
3293     break;
3294
3295   case 240:
3296 #line 924 "rx-parse.y"
3297     { (yyval.regno) = 1; }
3298     break;
3299
3300   case 241:
3301 #line 925 "rx-parse.y"
3302     { (yyval.regno) = 0; }
3303     break;
3304
3305   case 242:
3306 #line 926 "rx-parse.y"
3307     { (yyval.regno) = 1; }
3308     break;
3309
3310   case 243:
3311 #line 929 "rx-parse.y"
3312     {}
3313     break;
3314
3315   case 244:
3316 #line 930 "rx-parse.y"
3317     {}
3318     break;
3319
3320   case 245:
3321 #line 933 "rx-parse.y"
3322     {}
3323     break;
3324
3325   case 246:
3326 #line 934 "rx-parse.y"
3327     {}
3328     break;
3329
3330
3331 /* Line 1267 of yacc.c.  */
3332 #line 3333 "rx-parse.c"
3333       default: break;
3334     }
3335   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3336
3337   YYPOPSTACK (yylen);
3338   yylen = 0;
3339   YY_STACK_PRINT (yyss, yyssp);
3340
3341   *++yyvsp = yyval;
3342
3343
3344   /* Now `shift' the result of the reduction.  Determine what state
3345      that goes to, based on the state we popped back to and the rule
3346      number reduced by.  */
3347
3348   yyn = yyr1[yyn];
3349
3350   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3351   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3352     yystate = yytable[yystate];
3353   else
3354     yystate = yydefgoto[yyn - YYNTOKENS];
3355
3356   goto yynewstate;
3357
3358
3359 /*------------------------------------.
3360 | yyerrlab -- here on detecting error |
3361 `------------------------------------*/
3362 yyerrlab:
3363   /* If not already recovering from an error, report this error.  */
3364   if (!yyerrstatus)
3365     {
3366       ++yynerrs;
3367 #if ! YYERROR_VERBOSE
3368       yyerror (YY_("syntax error"));
3369 #else
3370       {
3371         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3372         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3373           {
3374             YYSIZE_T yyalloc = 2 * yysize;
3375             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3376               yyalloc = YYSTACK_ALLOC_MAXIMUM;
3377             if (yymsg != yymsgbuf)
3378               YYSTACK_FREE (yymsg);
3379             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3380             if (yymsg)
3381               yymsg_alloc = yyalloc;
3382             else
3383               {
3384                 yymsg = yymsgbuf;
3385                 yymsg_alloc = sizeof yymsgbuf;
3386               }
3387           }
3388
3389         if (0 < yysize && yysize <= yymsg_alloc)
3390           {
3391             (void) yysyntax_error (yymsg, yystate, yychar);
3392             yyerror (yymsg);
3393           }
3394         else
3395           {
3396             yyerror (YY_("syntax error"));
3397             if (yysize != 0)
3398               goto yyexhaustedlab;
3399           }
3400       }
3401 #endif
3402     }
3403
3404
3405
3406   if (yyerrstatus == 3)
3407     {
3408       /* If just tried and failed to reuse look-ahead token after an
3409          error, discard it.  */
3410
3411       if (yychar <= YYEOF)
3412         {
3413           /* Return failure if at end of input.  */
3414           if (yychar == YYEOF)
3415             YYABORT;
3416         }
3417       else
3418         {
3419           yydestruct ("Error: discarding",
3420                       yytoken, &yylval);
3421           yychar = YYEMPTY;
3422         }
3423     }
3424
3425   /* Else will try to reuse look-ahead token after shifting the error
3426      token.  */
3427   goto yyerrlab1;
3428
3429
3430 /*---------------------------------------------------.
3431 | yyerrorlab -- error raised explicitly by YYERROR.  |
3432 `---------------------------------------------------*/
3433 yyerrorlab:
3434
3435   /* Pacify compilers like GCC when the user code never invokes
3436      YYERROR and the label yyerrorlab therefore never appears in user
3437      code.  */
3438   if (/*CONSTCOND*/ 0)
3439      goto yyerrorlab;
3440
3441   /* Do not reclaim the symbols of the rule which action triggered
3442      this YYERROR.  */
3443   YYPOPSTACK (yylen);
3444   yylen = 0;
3445   YY_STACK_PRINT (yyss, yyssp);
3446   yystate = *yyssp;
3447   goto yyerrlab1;
3448
3449
3450 /*-------------------------------------------------------------.
3451 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
3452 `-------------------------------------------------------------*/
3453 yyerrlab1:
3454   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
3455
3456   for (;;)
3457     {
3458       yyn = yypact[yystate];
3459       if (yyn != YYPACT_NINF)
3460         {
3461           yyn += YYTERROR;
3462           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3463             {
3464               yyn = yytable[yyn];
3465               if (0 < yyn)
3466                 break;
3467             }
3468         }
3469
3470       /* Pop the current state because it cannot handle the error token.  */
3471       if (yyssp == yyss)
3472         YYABORT;
3473
3474
3475       yydestruct ("Error: popping",
3476                   yystos[yystate], yyvsp);
3477       YYPOPSTACK (1);
3478       yystate = *yyssp;
3479       YY_STACK_PRINT (yyss, yyssp);
3480     }
3481
3482   if (yyn == YYFINAL)
3483     YYACCEPT;
3484
3485   *++yyvsp = yylval;
3486
3487
3488   /* Shift the error token.  */
3489   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3490
3491   yystate = yyn;
3492   goto yynewstate;
3493
3494
3495 /*-------------------------------------.
3496 | yyacceptlab -- YYACCEPT comes here.  |
3497 `-------------------------------------*/
3498 yyacceptlab:
3499   yyresult = 0;
3500   goto yyreturn;
3501
3502 /*-----------------------------------.
3503 | yyabortlab -- YYABORT comes here.  |
3504 `-----------------------------------*/
3505 yyabortlab:
3506   yyresult = 1;
3507   goto yyreturn;
3508
3509 #ifndef yyoverflow
3510 /*-------------------------------------------------.
3511 | yyexhaustedlab -- memory exhaustion comes here.  |
3512 `-------------------------------------------------*/
3513 yyexhaustedlab:
3514   yyerror (YY_("memory exhausted"));
3515   yyresult = 2;
3516   /* Fall through.  */
3517 #endif
3518
3519 yyreturn:
3520   if (yychar != YYEOF && yychar != YYEMPTY)
3521      yydestruct ("Cleanup: discarding lookahead",
3522                  yytoken, &yylval);
3523   /* Do not reclaim the symbols of the rule which action triggered
3524      this YYABORT or YYACCEPT.  */
3525   YYPOPSTACK (yylen);
3526   YY_STACK_PRINT (yyss, yyssp);
3527   while (yyssp != yyss)
3528     {
3529       yydestruct ("Cleanup: popping",
3530                   yystos[*yyssp], yyvsp);
3531       YYPOPSTACK (1);
3532     }
3533 #ifndef yyoverflow
3534   if (yyss != yyssa)
3535     YYSTACK_FREE (yyss);
3536 #endif
3537 #if YYERROR_VERBOSE
3538   if (yymsg != yymsgbuf)
3539     YYSTACK_FREE (yymsg);
3540 #endif
3541   /* Make sure YYID is used.  */
3542   return YYID (yyresult);
3543 }
3544
3545
3546 #line 937 "rx-parse.y"
3547
3548 /* ====================================================================== */
3549
3550 static struct
3551 {
3552   const char * string;
3553   int          token;
3554   int          val;
3555 }
3556 token_table[] =
3557 {
3558   { "r0", REG, 0 },
3559   { "r1", REG, 1 },
3560   { "r2", REG, 2 },
3561   { "r3", REG, 3 },
3562   { "r4", REG, 4 },
3563   { "r5", REG, 5 },
3564   { "r6", REG, 6 },
3565   { "r7", REG, 7 },
3566   { "r8", REG, 8 },
3567   { "r9", REG, 9 },
3568   { "r10", REG, 10 },
3569   { "r11", REG, 11 },
3570   { "r12", REG, 12 },
3571   { "r13", REG, 13 },
3572   { "r14", REG, 14 },
3573   { "r15", REG, 15 },
3574
3575   { "psw", CREG, 0 },
3576   { "pc", CREG, 1 },
3577   { "usp", CREG, 2 },
3578   { "fpsw", CREG, 3 },
3579   /* reserved */
3580   /* reserved */
3581   /* reserved */
3582   { "wr", CREG, 7 },
3583
3584   { "bpsw", CREG, 8 },
3585   { "bpc", CREG, 9 },
3586   { "isp", CREG, 10 },
3587   { "fintv", CREG, 11 },
3588   { "intb", CREG, 12 },
3589
3590   { "pbp", CREG, 16 },
3591   { "pben", CREG, 17 },
3592
3593   { "bbpsw", CREG, 24 },
3594   { "bbpc", CREG, 25 },
3595
3596   { ".s", DOT_S, 0 },
3597   { ".b", DOT_B, 0 },
3598   { ".w", DOT_W, 0 },
3599   { ".l", DOT_L, 0 },
3600   { ".a", DOT_A , 0},
3601   { ".ub", DOT_UB, 0 },
3602   { ".uw", DOT_UW , 0},
3603
3604   { "c", FLAG, 0 },
3605   { "z", FLAG, 1 },
3606   { "s", FLAG, 2 },
3607   { "o", FLAG, 3 },
3608   { "i", FLAG, 8 },
3609   { "u", FLAG, 9 },
3610
3611 #define OPC(x) { #x, x, IS_OPCODE }
3612   OPC(ABS),
3613   OPC(ADC),
3614   OPC(ADD),
3615   { "and", AND_, IS_OPCODE },
3616   OPC(BCLR),
3617   OPC(BCND),
3618   OPC(BMCND),
3619   OPC(BNOT),
3620   OPC(BRA),
3621   OPC(BRK),
3622   OPC(BSET),
3623   OPC(BSR),
3624   OPC(BTST),
3625   OPC(CLRPSW),
3626   OPC(CMP),
3627   OPC(DBT),
3628   OPC(DIV),
3629   OPC(DIVU),
3630   OPC(EDIV),
3631   OPC(EDIVU),
3632   OPC(EMUL),
3633   OPC(EMULU),
3634   OPC(FADD),
3635   OPC(FCMP),
3636   OPC(FDIV),
3637   OPC(FMUL),
3638   OPC(FREIT),
3639   OPC(FSUB),
3640   OPC(FTOI),
3641   OPC(INT),
3642   OPC(ITOF),
3643   OPC(JMP),
3644   OPC(JSR),
3645   OPC(MVFACHI),
3646   OPC(MVFACMI),
3647   OPC(MVFACLO),
3648   OPC(MVFC),
3649   OPC(MVTACHI),
3650   OPC(MVTACLO),
3651   OPC(MVTC),
3652   OPC(MVTIPL),
3653   OPC(MACHI),
3654   OPC(MACLO),
3655   OPC(MAX),
3656   OPC(MIN),
3657   OPC(MOV),
3658   OPC(MOVU),
3659   OPC(MUL),
3660   OPC(MULHI),
3661   OPC(MULLO),
3662   OPC(MULU),
3663   OPC(NEG),
3664   OPC(NOP),
3665   OPC(NOT),
3666   OPC(OR),
3667   OPC(POP),
3668   OPC(POPC),
3669   OPC(POPM),
3670   OPC(PUSH),
3671   OPC(PUSHA),
3672   OPC(PUSHC),
3673   OPC(PUSHM),
3674   OPC(RACW),
3675   OPC(REIT),
3676   OPC(REVL),
3677   OPC(REVW),
3678   OPC(RMPA),
3679   OPC(ROLC),
3680   OPC(RORC),
3681   OPC(ROTL),
3682   OPC(ROTR),
3683   OPC(ROUND),
3684   OPC(RTE),
3685   OPC(RTFI),
3686   OPC(RTS),
3687   OPC(RTSD),
3688   OPC(SAT),
3689   OPC(SATR),
3690   OPC(SBB),
3691   OPC(SCCND),
3692   OPC(SCMPU),
3693   OPC(SETPSW),
3694   OPC(SHAR),
3695   OPC(SHLL),
3696   OPC(SHLR),
3697   OPC(SMOVB),
3698   OPC(SMOVF),
3699   OPC(SMOVU),
3700   OPC(SSTR),
3701   OPC(STNZ),
3702   OPC(STOP),
3703   OPC(STZ),
3704   OPC(SUB),
3705   OPC(SUNTIL),
3706   OPC(SWHILE),
3707   OPC(TST),
3708   OPC(WAIT),
3709   OPC(XCHG),
3710   OPC(XOR),
3711 };
3712
3713 #define NUM_TOKENS (sizeof (token_table) / sizeof (token_table[0]))
3714
3715 static struct
3716 {
3717   char * string;
3718   int    token;
3719 }
3720 condition_opcode_table[] =
3721 {
3722   { "b", BCND },
3723   { "bm", BMCND },
3724   { "sc", SCCND },
3725 };
3726
3727 #define NUM_CONDITION_OPCODES (sizeof (condition_opcode_table) / sizeof (condition_opcode_table[0]))
3728
3729 static struct
3730 {
3731   char * string;
3732   int    val;
3733 }
3734 condition_table[] =
3735 {
3736   { "z", 0 },
3737   { "eq", 0 },
3738   { "geu",  2 },
3739   { "c",  2 },
3740   { "gtu", 4 },
3741   { "pz", 6 },
3742   { "ge", 8 },
3743   { "gt", 10 },
3744   { "o",  12},
3745   /* always = 14 */
3746   { "nz", 1 },
3747   { "ne", 1 },
3748   { "ltu", 3 },
3749   { "nc", 3 },
3750   { "leu", 5 },
3751   { "n", 7 },
3752   { "lt", 9 },
3753   { "le", 11 },
3754   { "no", 13 }
3755   /* never = 15 */
3756 };
3757
3758 #define NUM_CONDITIONS (sizeof (condition_table) / sizeof (condition_table[0]))
3759
3760 void
3761 rx_lex_init (char * beginning, char * ending)
3762 {
3763   rx_init_start = beginning;
3764   rx_lex_start = beginning;
3765   rx_lex_end = ending;
3766   rx_in_brackets = 0;
3767   rx_last_token = 0;
3768
3769   setbuf (stdout, 0);
3770 }
3771
3772 static int
3773 check_condition (char * base)
3774 {
3775   char * cp;
3776   unsigned int i;
3777
3778   if ((unsigned) (rx_lex_end - rx_lex_start) < strlen (base) + 1)
3779     return 0;
3780   if (memcmp (rx_lex_start, base, strlen (base)))
3781     return 0;
3782   cp = rx_lex_start + strlen (base);
3783   for (i = 0; i < NUM_CONDITIONS; i ++)
3784     {
3785       if (strcasecmp (cp, condition_table[i].string) == 0)
3786         {
3787           rx_lval.regno = condition_table[i].val;
3788           return 1;
3789         }
3790     }
3791   return 0;
3792 }
3793
3794 static int
3795 rx_lex (void)
3796 {
3797   unsigned int ci;
3798   char * save_input_pointer;
3799
3800   while (ISSPACE (*rx_lex_start)
3801          && rx_lex_start != rx_lex_end)
3802     rx_lex_start ++;
3803
3804   rx_last_exp_start = rx_lex_start;
3805
3806   if (rx_lex_start == rx_lex_end)
3807     return 0;
3808
3809   if (ISALPHA (*rx_lex_start)
3810       || (rx_pid_register != -1 && memcmp (rx_lex_start, "%pidreg", 7) == 0)
3811       || (rx_gp_register != -1 && memcmp (rx_lex_start, "%gpreg", 6) == 0)
3812       || (*rx_lex_start == '.' && ISALPHA (rx_lex_start[1])))
3813     {
3814       unsigned int i;
3815       char * e;
3816       char save;
3817
3818       for (e = rx_lex_start + 1;
3819            e < rx_lex_end && ISALNUM (*e);
3820            e ++)
3821         ;
3822       save = *e;
3823       *e = 0;
3824
3825       if (strcmp (rx_lex_start, "%pidreg") == 0)
3826         {
3827           {
3828             rx_lval.regno = rx_pid_register;
3829             *e = save;
3830             rx_lex_start = e;
3831             rx_last_token = REG;
3832             return REG;
3833           }
3834         }
3835
3836       if (strcmp (rx_lex_start, "%gpreg") == 0)
3837         {
3838           {
3839             rx_lval.regno = rx_gp_register;
3840             *e = save;
3841             rx_lex_start = e;
3842             rx_last_token = REG;
3843             return REG;
3844           }
3845         }
3846
3847       if (rx_last_token == 0)
3848         for (ci = 0; ci < NUM_CONDITION_OPCODES; ci ++)
3849           if (check_condition (condition_opcode_table[ci].string))
3850             {
3851               *e = save;
3852               rx_lex_start = e;
3853               rx_last_token = condition_opcode_table[ci].token;
3854               return condition_opcode_table[ci].token;
3855             }
3856
3857       for (i = 0; i < NUM_TOKENS; i++)
3858         if (strcasecmp (rx_lex_start, token_table[i].string) == 0
3859             && !(token_table[i].val == IS_OPCODE && rx_last_token != 0)
3860             && !(token_table[i].token == FLAG && !need_flag))
3861           {
3862             rx_lval.regno = token_table[i].val;
3863             *e = save;
3864             rx_lex_start = e;
3865             rx_last_token = token_table[i].token;
3866             return token_table[i].token;
3867           }
3868       *e = save;
3869     }
3870
3871   if (rx_last_token == 0)
3872     {
3873       rx_last_token = UNKNOWN_OPCODE;
3874       return UNKNOWN_OPCODE;
3875     }
3876
3877   if (rx_last_token == UNKNOWN_OPCODE)
3878     return 0;
3879
3880   if (*rx_lex_start == '[')
3881     rx_in_brackets = 1;
3882   if (*rx_lex_start == ']')
3883     rx_in_brackets = 0;
3884
3885   if (rx_in_brackets
3886       || rx_last_token == REG
3887       || strchr ("[],#", *rx_lex_start))
3888     {
3889       rx_last_token = *rx_lex_start;
3890       return *rx_lex_start ++;
3891     }
3892
3893   save_input_pointer = input_line_pointer;
3894   input_line_pointer = rx_lex_start;
3895   rx_lval.exp.X_md = 0;
3896   expression (&rx_lval.exp);
3897
3898   /* We parse but ignore any :<size> modifier on expressions.  */
3899   if (*input_line_pointer == ':')
3900     {
3901       char *cp;
3902
3903       for (cp  = input_line_pointer + 1; *cp && cp < rx_lex_end; cp++)
3904         if (!ISDIGIT (*cp))
3905           break;
3906       if (cp > input_line_pointer+1)
3907         input_line_pointer = cp;
3908     }
3909
3910   rx_lex_start = input_line_pointer;
3911   input_line_pointer = save_input_pointer;
3912   rx_last_token = EXPR;
3913   return EXPR;
3914 }
3915
3916 int
3917 rx_error (const char * str)
3918 {
3919   int len;
3920
3921   len = rx_last_exp_start - rx_init_start;
3922
3923   as_bad ("%s", rx_init_start);
3924   as_bad ("%*s^ %s", len, "", str);
3925   return 0;
3926 }
3927
3928 static int
3929 rx_intop (expressionS exp, int nbits, int opbits)
3930 {
3931   long v;
3932   long mask, msb;
3933
3934   if (exp.X_op == O_big && nbits == 32)
3935       return 1;
3936   if (exp.X_op != O_constant)
3937     return 0;
3938   v = exp.X_add_number;
3939
3940   msb = 1UL << (opbits - 1);
3941   mask = (1UL << opbits) - 1;
3942
3943   if ((v & msb) && ! (v & ~mask))
3944     v -= 1UL << opbits;
3945
3946   switch (nbits)
3947     {
3948     case 4:
3949       return -0x8 <= v && v <= 0x7;
3950     case 5:
3951       return -0x10 <= v && v <= 0x17;
3952     case 8:
3953       return -0x80 <= v && v <= 0x7f;
3954     case 16:
3955       return -0x8000 <= v && v <= 0x7fff;
3956     case 24:
3957       return -0x800000 <= v && v <= 0x7fffff;
3958     case 32:
3959       return 1;
3960     default:
3961       printf ("rx_intop passed %d\n", nbits);
3962       abort ();
3963     }
3964   return 1;
3965 }
3966
3967 static int
3968 rx_uintop (expressionS exp, int nbits)
3969 {
3970   unsigned long v;
3971
3972   if (exp.X_op != O_constant)
3973     return 0;
3974   v = exp.X_add_number;
3975
3976   switch (nbits)
3977     {
3978     case 4:
3979       return v <= 0xf;
3980     case 8:
3981       return v <= 0xff;
3982     case 16:
3983       return v <= 0xffff;
3984     case 24:
3985       return v <= 0xffffff;
3986     default:
3987       printf ("rx_uintop passed %d\n", nbits);
3988       abort ();
3989     }
3990   return 1;
3991 }
3992
3993 static int
3994 rx_disp3op (expressionS exp)
3995 {
3996   unsigned long v;
3997
3998   if (exp.X_op != O_constant)
3999     return 0;
4000   v = exp.X_add_number;
4001   if (v < 3 || v > 10)
4002     return 0;
4003   return 1;
4004 }
4005
4006 static int
4007 rx_disp5op (expressionS * exp, int msize)
4008 {
4009   long v;
4010
4011   if (exp->X_op != O_constant)
4012     return 0;
4013   v = exp->X_add_number;
4014
4015   switch (msize)
4016     {
4017     case BSIZE:
4018       if (0 < v && v <= 31)
4019         return 1;
4020       break;
4021     case WSIZE:
4022       if (v & 1)
4023         return 0;
4024       if (0 < v && v <= 63)
4025         {
4026           exp->X_add_number >>= 1;
4027           return 1;
4028         }
4029       break;
4030     case LSIZE:
4031       if (v & 3)
4032         return 0;
4033       if (0 < v && v <= 127)
4034         {
4035           exp->X_add_number >>= 2;
4036           return 1;
4037         }
4038       break;
4039     }
4040   return 0;
4041 }
4042
4043 /* Just like the above, but allows a zero displacement.  */
4044
4045 static int
4046 rx_disp5op0 (expressionS * exp, int msize)
4047 {
4048   if (exp->X_op != O_constant)
4049     return 0;
4050   if (exp->X_add_number == 0)
4051     return 1;
4052   return rx_disp5op (exp, msize);
4053 }
4054
4055 static int
4056 exp_val (expressionS exp)
4057 {
4058   if (exp.X_op != O_constant)
4059   {
4060     rx_error (_("constant expected"));
4061     return 0;
4062   }
4063   return exp.X_add_number;
4064 }
4065
4066 static expressionS
4067 zero_expr (void)
4068 {
4069   /* Static, so program load sets it to all zeros, which is what we want.  */
4070   static expressionS zero;
4071   zero.X_op = O_constant;
4072   return zero;
4073 }
4074
4075 static int
4076 immediate (expressionS exp, int type, int pos, int bits)
4077 {
4078   /* We will emit constants ourself here, so negate them.  */
4079   if (type == RXREL_NEGATIVE && exp.X_op == O_constant)
4080     exp.X_add_number = - exp.X_add_number;
4081   if (type == RXREL_NEGATIVE_BORROW)
4082     {
4083       if (exp.X_op == O_constant)
4084         exp.X_add_number = - exp.X_add_number - 1;
4085       else
4086         rx_error (_("sbb cannot use symbolic immediates"));
4087     }
4088
4089   if (rx_intop (exp, 8, bits))
4090     {
4091       rx_op (exp, 1, type);
4092       return 1;
4093     }
4094   else if (rx_intop (exp, 16, bits))
4095     {
4096       rx_op (exp, 2, type);
4097       return 2;
4098     }
4099   else if (rx_uintop (exp, 16) && bits == 16)
4100     {
4101       rx_op (exp, 2, type);
4102       return 2;
4103     }
4104   else if (rx_intop (exp, 24, bits))
4105     {
4106       rx_op (exp, 3, type);
4107       return 3;
4108     }
4109   else if (rx_intop (exp, 32, bits))
4110     {
4111       rx_op (exp, 4, type);
4112       return 0;
4113     }
4114   else if (type == RXREL_SIGNED)
4115     {
4116       /* This is a symbolic immediate, we will relax it later.  */
4117       rx_relax (RX_RELAX_IMM, pos);
4118       rx_op (exp, linkrelax ? 4 : 1, type);
4119       return 1;
4120     }
4121   else
4122     {
4123       /* Let the linker deal with it.  */
4124       rx_op (exp, 4, type);
4125       return 0;
4126     }
4127 }
4128
4129 static int
4130 displacement (expressionS exp, int msize)
4131 {
4132   int val;
4133   int vshift = 0;
4134
4135   if (exp.X_op == O_symbol
4136       && exp.X_md)
4137     {
4138       switch (exp.X_md)
4139         {
4140         case BFD_RELOC_GPREL16:
4141           switch (msize)
4142             {
4143             case BSIZE:
4144               exp.X_md = BFD_RELOC_RX_GPRELB;
4145               break;
4146             case WSIZE:
4147               exp.X_md = BFD_RELOC_RX_GPRELW;
4148               break;
4149             case LSIZE:
4150               exp.X_md = BFD_RELOC_RX_GPRELL;
4151               break;
4152             }
4153           O2 (exp);
4154           return 2;
4155         }
4156     }
4157
4158   if (exp.X_op == O_subtract)
4159     {
4160       exp.X_md = BFD_RELOC_RX_DIFF;
4161       O2 (exp);
4162       return 2;
4163     }
4164
4165   if (exp.X_op != O_constant)
4166     {
4167       rx_error (_("displacements must be constants"));
4168       return -1;
4169     }
4170   val = exp.X_add_number;
4171
4172   if (val == 0)
4173     return 0;
4174
4175   switch (msize)
4176     {
4177     case BSIZE:
4178       break;
4179     case WSIZE:
4180       if (val & 1)
4181         rx_error (_("word displacement not word-aligned"));
4182       vshift = 1;
4183       break;
4184     case LSIZE:
4185       if (val & 3)
4186         rx_error (_("long displacement not long-aligned"));
4187       vshift = 2;
4188       break;
4189     default:
4190       as_bad (_("displacement with unknown size (internal bug?)\n"));
4191       break;
4192     }
4193
4194   val >>= vshift;
4195   exp.X_add_number = val;
4196
4197   if (0 <= val && val <= 255 )
4198     {
4199       O1 (exp);
4200       return 1;
4201     }
4202
4203   if (0 <= val && val <= 65535)
4204     {
4205       O2 (exp);
4206       return 2;
4207     }
4208   if (val < 0)
4209     rx_error (_("negative displacements not allowed"));
4210   else
4211     rx_error (_("displacement too large"));
4212   return -1;
4213 }
4214
4215 static void
4216 rtsd_immediate (expressionS exp)
4217 {
4218   int val;
4219
4220   if (exp.X_op != O_constant)
4221     {
4222       rx_error (_("rtsd size must be constant"));
4223       return;
4224     }
4225   val = exp.X_add_number;
4226   if (val & 3)
4227     rx_error (_("rtsd size must be multiple of 4"));
4228
4229   if (val < 0 || val > 1020)
4230     rx_error (_("rtsd size must be 0..1020"));
4231
4232   val >>= 2;
4233   exp.X_add_number = val;
4234   O1 (exp);
4235 }
4236
4237 static void
4238 rx_range (expressionS exp, int minv, int maxv)
4239 {
4240   int val;
4241
4242   if (exp.X_op != O_constant)
4243     return;
4244
4245   val = exp.X_add_number;
4246   if (val < minv || val > maxv)
4247     as_warn (_("Value %d out of range %d..%d"), val, minv, maxv);
4248 }
4249
4250 static void
4251 rx_check_float_support (void)
4252 {
4253   if (rx_cpu == RX100 || rx_cpu == RX200)
4254     rx_error (_("target CPU type does not support floating point instructions"));
4255 }
4256