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