1 /* A Bison parser, made by GNU Bison 3.0.4.  */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11 
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16 
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19 
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29 
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42 
43 /* Identify Bison output.  */
44 #define YYBISON 1
45 
46 /* Bison version.  */
47 #define YYBISON_VERSION "3.0.4"
48 
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers.  */
53 #define YYPURE 0
54 
55 /* Push parsers.  */
56 #define YYPUSH 0
57 
58 /* Pull parsers.  */
59 #define YYPULL 1
60 
61 
62 
63 
64 /* Copy the first part of user declarations.  */
65 #line 1 "mon_parse.y" /* yacc.c:339  */
66 
67 /* -*- C -*-
68  *
69  * mon_parse.y - Parser for the VICE built-in monitor.
70  *
71  * Written by
72  *  Daniel Sladic <sladic@eecg.toronto.edu>
73  *  Andreas Boose <viceteam@t-online.de>
74  *  Thomas Giesel <skoe@directbox.com>
75  *
76  * This file is part of VICE, the Versatile Commodore Emulator.
77  * See README for copyright notice.
78  *
79  *  This program is free software; you can redistribute it and/or modify
80  *  it under the terms of the GNU General Public License as published by
81  *  the Free Software Foundation; either version 2 of the License, or
82  *  (at your option) any later version.
83  *
84  *  This program is distributed in the hope that it will be useful,
85  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
86  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
87  *  GNU General Public License for more details.
88  *
89  *  You should have received a copy of the GNU General Public License
90  *  along with this program; if not, write to the Free Software
91  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
92  *  02111-1307  USA.
93  *
94  */
95 
96 #include "vice.h"
97 
98 #if !defined(MACOS_COMPILE) && !(defined(__OS2__) && defined(IDE_COMPILE))
99 #ifdef __GNUC__
100 #undef alloca
101 #ifndef ANDROID_COMPILE
102 #define        alloca(n)       __builtin_alloca (n)
103 #endif
104 #else
105 #ifdef HAVE_ALLOCA_H
106 #include <alloca.h>
107 #else  /* Not HAVE_ALLOCA_H.  */
108 #if !defined(_AIX) && !defined(WINCE)
109 #ifndef _MSC_VER
110 extern char *alloca();
111 #else
112 #define alloca(n)   _alloca(n)
113 #endif  /* MSVC */
114 #endif /* Not AIX and not WINCE.  */
115 #endif /* HAVE_ALLOCA_H.  */
116 #endif /* GCC.  */
117 #endif /* MACOS OS2 */
118 
119 /* SunOS 4.x specific stuff */
120 #if defined(sun) || defined(__sun)
121 #  if !defined(__SVR4) && !defined(__svr4__)
122 #    ifdef __sparc__
123 #      define YYFREE
124 #    endif
125 #  endif
126 #endif
127 
128 #include <assert.h>
129 #include <stdio.h>
130 #include <string.h>
131 #include <stdlib.h>
132 
133 #include "asm.h"
134 #include "console.h"
135 #include "lib.h"
136 #include "machine.h"
137 #include "mon_breakpoint.h"
138 #include "mon_command.h"
139 #include "mon_disassemble.h"
140 #include "mon_drive.h"
141 #include "mon_file.h"
142 #include "mon_memmap.h"
143 #include "mon_memory.h"
144 #include "mon_register.h"
145 #include "mon_util.h"
146 #include "montypes.h"
147 #include "resources.h"
148 #include "types.h"
149 #include "uimon.h"
150 
151 #ifdef AMIGA_MORPHOS
152 #undef REG_PC
153 #endif
154 
155 #define join_ints(x,y) (LO16_TO_HI16(x)|y)
156 #define separate_int1(x) (HI16_TO_LO16(x))
157 #define separate_int2(x) (LO16(x))
158 
159 static int yyerror(char *s);
160 static int temp;
161 static int resolve_datatype(unsigned guess_type, const char *num);
162 static int resolve_range(enum t_memspace memspace, MON_ADDR range[2],
163                          const char *num);
164 
165 #ifdef __IBMC__
166 static void __yy_memcpy (char *to, char *from, int count);
167 #endif
168 
169 /* Defined in the lexer */
170 extern int new_cmd, opt_asm;
171 extern void free_buffer(void);
172 extern void make_buffer(char *str);
173 extern int yylex(void);
174 extern int cur_len, last_len;
175 
176 #define ERR_ILLEGAL_INPUT 1     /* Generic error as returned by yacc.  */
177 #define ERR_RANGE_BAD_START 2
178 #define ERR_RANGE_BAD_END 3
179 #define ERR_BAD_CMD 4
180 #define ERR_EXPECT_CHECKNUM 5
181 #define ERR_EXPECT_END_CMD 6
182 #define ERR_MISSING_CLOSE_PAREN 7
183 #define ERR_INCOMPLETE_COMPARE_OP 8
184 #define ERR_EXPECT_FILENAME 9
185 #define ERR_ADDR_TOO_BIG 10
186 #define ERR_IMM_TOO_BIG 11
187 #define ERR_EXPECT_STRING 12
188 #define ERR_UNDEFINED_LABEL 13
189 #define ERR_EXPECT_DEVICE_NUM 14
190 #define ERR_EXPECT_ADDRESS 15
191 #define ERR_INVALID_REGISTER 16
192 
193 #define BAD_ADDR (new_addr(e_invalid_space, 0))
194 #define CHECK_ADDR(x) ((x) == addr_mask(x))
195 
196 #define YYDEBUG 1
197 
198 
199 #line 200 "mon_parse.c" /* yacc.c:339  */
200 
201 # ifndef YY_NULLPTR
202 #  if defined __cplusplus && 201103L <= __cplusplus
203 #   define YY_NULLPTR nullptr
204 #  else
205 #   define YY_NULLPTR 0
206 #  endif
207 # endif
208 
209 /* Enabling verbose error messages.  */
210 #ifdef YYERROR_VERBOSE
211 # undef YYERROR_VERBOSE
212 # define YYERROR_VERBOSE 1
213 #else
214 # define YYERROR_VERBOSE 0
215 #endif
216 
217 /* In a future release of Bison, this section will be replaced
218    by #include "y.tab.h".  */
219 #ifndef YY_YY_MON_PARSE_H_INCLUDED
220 # define YY_YY_MON_PARSE_H_INCLUDED
221 /* Debug traces.  */
222 #ifndef YYDEBUG
223 # define YYDEBUG 1
224 #endif
225 #if YYDEBUG
226 extern int yydebug;
227 #endif
228 
229 /* Token type.  */
230 #ifndef YYTOKENTYPE
231 # define YYTOKENTYPE
232   enum yytokentype
233   {
234     H_NUMBER = 258,
235     D_NUMBER = 259,
236     O_NUMBER = 260,
237     B_NUMBER = 261,
238     CONVERT_OP = 262,
239     B_DATA = 263,
240     H_RANGE_GUESS = 264,
241     D_NUMBER_GUESS = 265,
242     O_NUMBER_GUESS = 266,
243     B_NUMBER_GUESS = 267,
244     BAD_CMD = 268,
245     MEM_OP = 269,
246     IF = 270,
247     MEM_COMP = 271,
248     MEM_DISK8 = 272,
249     MEM_DISK9 = 273,
250     MEM_DISK10 = 274,
251     MEM_DISK11 = 275,
252     EQUALS = 276,
253     TRAIL = 277,
254     CMD_SEP = 278,
255     LABEL_ASGN_COMMENT = 279,
256     CMD_SIDEFX = 280,
257     CMD_RETURN = 281,
258     CMD_BLOCK_READ = 282,
259     CMD_BLOCK_WRITE = 283,
260     CMD_UP = 284,
261     CMD_DOWN = 285,
262     CMD_LOAD = 286,
263     CMD_SAVE = 287,
264     CMD_VERIFY = 288,
265     CMD_IGNORE = 289,
266     CMD_HUNT = 290,
267     CMD_FILL = 291,
268     CMD_MOVE = 292,
269     CMD_GOTO = 293,
270     CMD_REGISTERS = 294,
271     CMD_READSPACE = 295,
272     CMD_WRITESPACE = 296,
273     CMD_RADIX = 297,
274     CMD_MEM_DISPLAY = 298,
275     CMD_BREAK = 299,
276     CMD_TRACE = 300,
277     CMD_IO = 301,
278     CMD_BRMON = 302,
279     CMD_COMPARE = 303,
280     CMD_DUMP = 304,
281     CMD_UNDUMP = 305,
282     CMD_EXIT = 306,
283     CMD_DELETE = 307,
284     CMD_CONDITION = 308,
285     CMD_COMMAND = 309,
286     CMD_ASSEMBLE = 310,
287     CMD_DISASSEMBLE = 311,
288     CMD_NEXT = 312,
289     CMD_STEP = 313,
290     CMD_PRINT = 314,
291     CMD_DEVICE = 315,
292     CMD_HELP = 316,
293     CMD_WATCH = 317,
294     CMD_DISK = 318,
295     CMD_QUIT = 319,
296     CMD_CHDIR = 320,
297     CMD_BANK = 321,
298     CMD_LOAD_LABELS = 322,
299     CMD_SAVE_LABELS = 323,
300     CMD_ADD_LABEL = 324,
301     CMD_DEL_LABEL = 325,
302     CMD_SHOW_LABELS = 326,
303     CMD_CLEAR_LABELS = 327,
304     CMD_RECORD = 328,
305     CMD_MON_STOP = 329,
306     CMD_PLAYBACK = 330,
307     CMD_CHAR_DISPLAY = 331,
308     CMD_SPRITE_DISPLAY = 332,
309     CMD_TEXT_DISPLAY = 333,
310     CMD_SCREENCODE_DISPLAY = 334,
311     CMD_ENTER_DATA = 335,
312     CMD_ENTER_BIN_DATA = 336,
313     CMD_KEYBUF = 337,
314     CMD_BLOAD = 338,
315     CMD_BSAVE = 339,
316     CMD_SCREEN = 340,
317     CMD_UNTIL = 341,
318     CMD_CPU = 342,
319     CMD_YYDEBUG = 343,
320     CMD_BACKTRACE = 344,
321     CMD_SCREENSHOT = 345,
322     CMD_PWD = 346,
323     CMD_DIR = 347,
324     CMD_RESOURCE_GET = 348,
325     CMD_RESOURCE_SET = 349,
326     CMD_LOAD_RESOURCES = 350,
327     CMD_SAVE_RESOURCES = 351,
328     CMD_ATTACH = 352,
329     CMD_DETACH = 353,
330     CMD_MON_RESET = 354,
331     CMD_TAPECTRL = 355,
332     CMD_CARTFREEZE = 356,
333     CMD_CPUHISTORY = 357,
334     CMD_MEMMAPZAP = 358,
335     CMD_MEMMAPSHOW = 359,
336     CMD_MEMMAPSAVE = 360,
337     CMD_COMMENT = 361,
338     CMD_LIST = 362,
339     CMD_STOPWATCH = 363,
340     RESET = 364,
341     CMD_EXPORT = 365,
342     CMD_AUTOSTART = 366,
343     CMD_AUTOLOAD = 367,
344     CMD_MAINCPU_TRACE = 368,
345     CMD_LABEL_ASGN = 369,
346     L_PAREN = 370,
347     R_PAREN = 371,
348     ARG_IMMEDIATE = 372,
349     REG_A = 373,
350     REG_X = 374,
351     REG_Y = 375,
352     COMMA = 376,
353     INST_SEP = 377,
354     L_BRACKET = 378,
355     R_BRACKET = 379,
356     LESS_THAN = 380,
357     REG_U = 381,
358     REG_S = 382,
359     REG_PC = 383,
360     REG_PCR = 384,
361     REG_B = 385,
362     REG_C = 386,
363     REG_D = 387,
364     REG_E = 388,
365     REG_H = 389,
366     REG_L = 390,
367     REG_AF = 391,
368     REG_BC = 392,
369     REG_DE = 393,
370     REG_HL = 394,
371     REG_IX = 395,
372     REG_IY = 396,
373     REG_SP = 397,
374     REG_IXH = 398,
375     REG_IXL = 399,
376     REG_IYH = 400,
377     REG_IYL = 401,
378     PLUS = 402,
379     MINUS = 403,
380     STRING = 404,
381     FILENAME = 405,
382     R_O_L = 406,
383     OPCODE = 407,
384     LABEL = 408,
385     BANKNAME = 409,
386     CPUTYPE = 410,
387     MON_REGISTER = 411,
388     COMPARE_OP = 412,
389     RADIX_TYPE = 413,
390     INPUT_SPEC = 414,
391     CMD_CHECKPT_ON = 415,
392     CMD_CHECKPT_OFF = 416,
393     TOGGLE = 417,
394     MASK = 418
395   };
396 #endif
397 /* Tokens.  */
398 #define H_NUMBER 258
399 #define D_NUMBER 259
400 #define O_NUMBER 260
401 #define B_NUMBER 261
402 #define CONVERT_OP 262
403 #define B_DATA 263
404 #define H_RANGE_GUESS 264
405 #define D_NUMBER_GUESS 265
406 #define O_NUMBER_GUESS 266
407 #define B_NUMBER_GUESS 267
408 #define BAD_CMD 268
409 #define MEM_OP 269
410 #define IF 270
411 #define MEM_COMP 271
412 #define MEM_DISK8 272
413 #define MEM_DISK9 273
414 #define MEM_DISK10 274
415 #define MEM_DISK11 275
416 #define EQUALS 276
417 #define TRAIL 277
418 #define CMD_SEP 278
419 #define LABEL_ASGN_COMMENT 279
420 #define CMD_SIDEFX 280
421 #define CMD_RETURN 281
422 #define CMD_BLOCK_READ 282
423 #define CMD_BLOCK_WRITE 283
424 #define CMD_UP 284
425 #define CMD_DOWN 285
426 #define CMD_LOAD 286
427 #define CMD_SAVE 287
428 #define CMD_VERIFY 288
429 #define CMD_IGNORE 289
430 #define CMD_HUNT 290
431 #define CMD_FILL 291
432 #define CMD_MOVE 292
433 #define CMD_GOTO 293
434 #define CMD_REGISTERS 294
435 #define CMD_READSPACE 295
436 #define CMD_WRITESPACE 296
437 #define CMD_RADIX 297
438 #define CMD_MEM_DISPLAY 298
439 #define CMD_BREAK 299
440 #define CMD_TRACE 300
441 #define CMD_IO 301
442 #define CMD_BRMON 302
443 #define CMD_COMPARE 303
444 #define CMD_DUMP 304
445 #define CMD_UNDUMP 305
446 #define CMD_EXIT 306
447 #define CMD_DELETE 307
448 #define CMD_CONDITION 308
449 #define CMD_COMMAND 309
450 #define CMD_ASSEMBLE 310
451 #define CMD_DISASSEMBLE 311
452 #define CMD_NEXT 312
453 #define CMD_STEP 313
454 #define CMD_PRINT 314
455 #define CMD_DEVICE 315
456 #define CMD_HELP 316
457 #define CMD_WATCH 317
458 #define CMD_DISK 318
459 #define CMD_QUIT 319
460 #define CMD_CHDIR 320
461 #define CMD_BANK 321
462 #define CMD_LOAD_LABELS 322
463 #define CMD_SAVE_LABELS 323
464 #define CMD_ADD_LABEL 324
465 #define CMD_DEL_LABEL 325
466 #define CMD_SHOW_LABELS 326
467 #define CMD_CLEAR_LABELS 327
468 #define CMD_RECORD 328
469 #define CMD_MON_STOP 329
470 #define CMD_PLAYBACK 330
471 #define CMD_CHAR_DISPLAY 331
472 #define CMD_SPRITE_DISPLAY 332
473 #define CMD_TEXT_DISPLAY 333
474 #define CMD_SCREENCODE_DISPLAY 334
475 #define CMD_ENTER_DATA 335
476 #define CMD_ENTER_BIN_DATA 336
477 #define CMD_KEYBUF 337
478 #define CMD_BLOAD 338
479 #define CMD_BSAVE 339
480 #define CMD_SCREEN 340
481 #define CMD_UNTIL 341
482 #define CMD_CPU 342
483 #define CMD_YYDEBUG 343
484 #define CMD_BACKTRACE 344
485 #define CMD_SCREENSHOT 345
486 #define CMD_PWD 346
487 #define CMD_DIR 347
488 #define CMD_RESOURCE_GET 348
489 #define CMD_RESOURCE_SET 349
490 #define CMD_LOAD_RESOURCES 350
491 #define CMD_SAVE_RESOURCES 351
492 #define CMD_ATTACH 352
493 #define CMD_DETACH 353
494 #define CMD_MON_RESET 354
495 #define CMD_TAPECTRL 355
496 #define CMD_CARTFREEZE 356
497 #define CMD_CPUHISTORY 357
498 #define CMD_MEMMAPZAP 358
499 #define CMD_MEMMAPSHOW 359
500 #define CMD_MEMMAPSAVE 360
501 #define CMD_COMMENT 361
502 #define CMD_LIST 362
503 #define CMD_STOPWATCH 363
504 #define RESET 364
505 #define CMD_EXPORT 365
506 #define CMD_AUTOSTART 366
507 #define CMD_AUTOLOAD 367
508 #define CMD_MAINCPU_TRACE 368
509 #define CMD_LABEL_ASGN 369
510 #define L_PAREN 370
511 #define R_PAREN 371
512 #define ARG_IMMEDIATE 372
513 #define REG_A 373
514 #define REG_X 374
515 #define REG_Y 375
516 #define COMMA 376
517 #define INST_SEP 377
518 #define L_BRACKET 378
519 #define R_BRACKET 379
520 #define LESS_THAN 380
521 #define REG_U 381
522 #define REG_S 382
523 #define REG_PC 383
524 #define REG_PCR 384
525 #define REG_B 385
526 #define REG_C 386
527 #define REG_D 387
528 #define REG_E 388
529 #define REG_H 389
530 #define REG_L 390
531 #define REG_AF 391
532 #define REG_BC 392
533 #define REG_DE 393
534 #define REG_HL 394
535 #define REG_IX 395
536 #define REG_IY 396
537 #define REG_SP 397
538 #define REG_IXH 398
539 #define REG_IXL 399
540 #define REG_IYH 400
541 #define REG_IYL 401
542 #define PLUS 402
543 #define MINUS 403
544 #define STRING 404
545 #define FILENAME 405
546 #define R_O_L 406
547 #define OPCODE 407
548 #define LABEL 408
549 #define BANKNAME 409
550 #define CPUTYPE 410
551 #define MON_REGISTER 411
552 #define COMPARE_OP 412
553 #define RADIX_TYPE 413
554 #define INPUT_SPEC 414
555 #define CMD_CHECKPT_ON 415
556 #define CMD_CHECKPT_OFF 416
557 #define TOGGLE 417
558 #define MASK 418
559 
560 /* Value type.  */
561 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
562 
563 union YYSTYPE
564 {
565 #line 135 "mon_parse.y" /* yacc.c:355  */
566 
567     MON_ADDR a;
568     MON_ADDR range[2];
569     int i;
570     REG_ID reg;
571     CONDITIONAL cond_op;
572     cond_node_t *cond_node;
573     RADIXTYPE rt;
574     ACTION action;
575     char *str;
576     asm_mode_addr_info_t mode;
577 
578 #line 579 "mon_parse.c" /* yacc.c:355  */
579 };
580 
581 typedef union YYSTYPE YYSTYPE;
582 # define YYSTYPE_IS_TRIVIAL 1
583 # define YYSTYPE_IS_DECLARED 1
584 #endif
585 
586 
587 extern YYSTYPE yylval;
588 
589 int yyparse (void);
590 
591 #endif /* !YY_YY_MON_PARSE_H_INCLUDED  */
592 
593 /* Copy the second part of user declarations.  */
594 
595 #line 596 "mon_parse.c" /* yacc.c:358  */
596 
597 #ifdef short
598 # undef short
599 #endif
600 
601 #ifdef YYTYPE_UINT8
602 typedef YYTYPE_UINT8 yytype_uint8;
603 #else
604 typedef unsigned char yytype_uint8;
605 #endif
606 
607 #ifdef YYTYPE_INT8
608 typedef YYTYPE_INT8 yytype_int8;
609 #else
610 typedef signed char yytype_int8;
611 #endif
612 
613 #ifdef YYTYPE_UINT16
614 typedef YYTYPE_UINT16 yytype_uint16;
615 #else
616 typedef unsigned short int yytype_uint16;
617 #endif
618 
619 #ifdef YYTYPE_INT16
620 typedef YYTYPE_INT16 yytype_int16;
621 #else
622 typedef short int yytype_int16;
623 #endif
624 
625 #ifndef YYSIZE_T
626 # ifdef __SIZE_TYPE__
627 #  define YYSIZE_T __SIZE_TYPE__
628 # elif defined size_t
629 #  define YYSIZE_T size_t
630 # elif ! defined YYSIZE_T
631 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
632 #  define YYSIZE_T size_t
633 # else
634 #  define YYSIZE_T unsigned int
635 # endif
636 #endif
637 
638 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
639 
640 #ifndef YY_
641 # if defined YYENABLE_NLS && YYENABLE_NLS
642 #  if ENABLE_NLS
643 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
644 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
645 #  endif
646 # endif
647 # ifndef YY_
648 #  define YY_(Msgid) Msgid
649 # endif
650 #endif
651 
652 #ifndef YY_ATTRIBUTE
653 # if (defined __GNUC__                                               \
654       && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
655      || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
656 #  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
657 # else
658 #  define YY_ATTRIBUTE(Spec) /* empty */
659 # endif
660 #endif
661 
662 #ifndef YY_ATTRIBUTE_PURE
663 # define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
664 #endif
665 
666 #ifndef YY_ATTRIBUTE_UNUSED
667 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
668 #endif
669 
670 #if !defined _Noreturn \
671      && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
672 # if defined _MSC_VER && 1200 <= _MSC_VER
673 #  define _Noreturn __declspec (noreturn)
674 # else
675 #  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
676 # endif
677 #endif
678 
679 /* Suppress unused-variable warnings by "using" E.  */
680 #if ! defined lint || defined __GNUC__
681 # define YYUSE(E) ((void) (E))
682 #else
683 # define YYUSE(E) /* empty */
684 #endif
685 
686 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
687 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
688 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
689     _Pragma ("GCC diagnostic push") \
690     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
691     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
692 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
693     _Pragma ("GCC diagnostic pop")
694 #else
695 # define YY_INITIAL_VALUE(Value) Value
696 #endif
697 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
698 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
699 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
700 #endif
701 #ifndef YY_INITIAL_VALUE
702 # define YY_INITIAL_VALUE(Value) /* Nothing. */
703 #endif
704 
705 
706 #if ! defined yyoverflow || YYERROR_VERBOSE
707 
708 /* The parser invokes alloca or malloc; define the necessary symbols.  */
709 
710 # ifdef YYSTACK_USE_ALLOCA
711 #  if YYSTACK_USE_ALLOCA
712 #   ifdef __GNUC__
713 #    define YYSTACK_ALLOC __builtin_alloca
714 #   elif defined __BUILTIN_VA_ARG_INCR
715 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
716 #   elif defined _AIX
717 #    define YYSTACK_ALLOC __alloca
718 #   elif defined _MSC_VER
719 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
720 #    define alloca _alloca
721 #   else
722 #    define YYSTACK_ALLOC alloca
723 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
724 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
725       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
726 #     ifndef EXIT_SUCCESS
727 #      define EXIT_SUCCESS 0
728 #     endif
729 #    endif
730 #   endif
731 #  endif
732 # endif
733 
734 # ifdef YYSTACK_ALLOC
735    /* Pacify GCC's 'empty if-body' warning.  */
736 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
737 #  ifndef YYSTACK_ALLOC_MAXIMUM
738     /* The OS might guarantee only one guard page at the bottom of the stack,
739        and a page size can be as small as 4096 bytes.  So we cannot safely
740        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
741        to allow for a few compiler-allocated temporary stack slots.  */
742 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
743 #  endif
744 # else
745 #  define YYSTACK_ALLOC YYMALLOC
746 #  define YYSTACK_FREE YYFREE
747 #  ifndef YYSTACK_ALLOC_MAXIMUM
748 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
749 #  endif
750 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
751        && ! ((defined YYMALLOC || defined malloc) \
752              && (defined YYFREE || defined free)))
753 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
754 #   ifndef EXIT_SUCCESS
755 #    define EXIT_SUCCESS 0
756 #   endif
757 #  endif
758 #  ifndef YYMALLOC
759 #   define YYMALLOC malloc
760 #   if ! defined malloc && ! defined EXIT_SUCCESS
761 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
762 #   endif
763 #  endif
764 #  ifndef YYFREE
765 #   define YYFREE free
766 #   if ! defined free && ! defined EXIT_SUCCESS
767 void free (void *); /* INFRINGES ON USER NAME SPACE */
768 #   endif
769 #  endif
770 # endif
771 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
772 
773 
774 #if (! defined yyoverflow \
775      && (! defined __cplusplus \
776          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
777 
778 /* A type that is properly aligned for any stack member.  */
779 union yyalloc
780 {
781   yytype_int16 yyss_alloc;
782   YYSTYPE yyvs_alloc;
783 };
784 
785 /* The size of the maximum gap between one aligned stack and the next.  */
786 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
787 
788 /* The size of an array large to enough to hold all stacks, each with
789    N elements.  */
790 # define YYSTACK_BYTES(N) \
791      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
792       + YYSTACK_GAP_MAXIMUM)
793 
794 # define YYCOPY_NEEDED 1
795 
796 /* Relocate STACK from its old location to the new one.  The
797    local variables YYSIZE and YYSTACKSIZE give the old and new number of
798    elements in the stack, and YYPTR gives the new location of the
799    stack.  Advance YYPTR to a properly aligned location for the next
800    stack.  */
801 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
802     do                                                                  \
803       {                                                                 \
804         YYSIZE_T yynewbytes;                                            \
805         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
806         Stack = &yyptr->Stack_alloc;                                    \
807         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
808         yyptr += yynewbytes / sizeof (*yyptr);                          \
809       }                                                                 \
810     while (0)
811 
812 #endif
813 
814 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
815 /* Copy COUNT objects from SRC to DST.  The source and destination do
816    not overlap.  */
817 # ifndef YYCOPY
818 #  if defined __GNUC__ && 1 < __GNUC__
819 #   define YYCOPY(Dst, Src, Count) \
820       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
821 #  else
822 #   define YYCOPY(Dst, Src, Count)              \
823       do                                        \
824         {                                       \
825           YYSIZE_T yyi;                         \
826           for (yyi = 0; yyi < (Count); yyi++)   \
827             (Dst)[yyi] = (Src)[yyi];            \
828         }                                       \
829       while (0)
830 #  endif
831 # endif
832 #endif /* !YYCOPY_NEEDED */
833 
834 /* YYFINAL -- State number of the termination state.  */
835 #define YYFINAL  312
836 /* YYLAST -- Last index in YYTABLE.  */
837 #define YYLAST   1713
838 
839 /* YYNTOKENS -- Number of terminals.  */
840 #define YYNTOKENS  172
841 /* YYNNTS -- Number of nonterminals.  */
842 #define YYNNTS  55
843 /* YYNRULES -- Number of rules.  */
844 #define YYNRULES  314
845 /* YYNSTATES -- Number of states.  */
846 #define YYNSTATES  628
847 
848 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
849    by yylex, with out-of-bounds checking.  */
850 #define YYUNDEFTOK  2
851 #define YYMAXUTOK   418
852 
853 #define YYTRANSLATE(YYX)                                                \
854   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
855 
856 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
857    as returned by yylex, without out-of-bounds checking.  */
858 static const yytype_uint8 yytranslate[] =
859 {
860        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
861        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
862        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
863        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
864      168,   169,   166,   164,     2,   165,     2,   167,     2,     2,
865        2,     2,     2,     2,     2,     2,     2,     2,   171,     2,
866        2,     2,     2,     2,   170,     2,     2,     2,     2,     2,
867        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
868        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
869        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
870        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
871        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
872        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
873        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
874        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
875        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
876        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
877        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
878        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
879        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
880        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
881        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
882        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
883        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
884        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
885        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
886        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
887       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
888       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
889       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
890       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
891       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
892       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
893       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
894       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
895       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
896      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
897      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
898      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
899      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
900      145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
901      155,   156,   157,   158,   159,   160,   161,   162,   163
902 };
903 
904 #if YYDEBUG
905   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
906 static const yytype_uint16 yyrline[] =
907 {
908        0,   199,   199,   200,   201,   204,   205,   208,   209,   210,
909      213,   214,   215,   216,   217,   218,   219,   220,   221,   222,
910      223,   224,   225,   228,   230,   232,   234,   236,   238,   240,
911      242,   244,   246,   248,   250,   252,   254,   256,   258,   260,
912      262,   264,   266,   268,   270,   272,   274,   276,   279,   281,
913      283,   286,   291,   296,   298,   300,   302,   304,   306,   308,
914      310,   312,   314,   318,   325,   324,   327,   329,   331,   335,
915      337,   339,   341,   343,   345,   347,   349,   351,   353,   355,
916      357,   359,   361,   363,   365,   367,   369,   371,   373,   377,
917      386,   389,   393,   396,   405,   408,   417,   422,   424,   426,
918      428,   430,   432,   434,   436,   438,   440,   442,   446,   448,
919      453,   455,   473,   475,   477,   479,   481,   485,   487,   489,
920      491,   493,   495,   497,   499,   501,   503,   505,   507,   509,
921      511,   513,   515,   517,   519,   521,   523,   525,   527,   529,
922      533,   535,   537,   539,   541,   543,   545,   547,   549,   551,
923      553,   555,   557,   559,   561,   563,   565,   567,   569,   573,
924      575,   577,   581,   583,   587,   591,   594,   595,   598,   599,
925      602,   603,   606,   607,   610,   611,   614,   620,   628,   629,
926      632,   636,   637,   640,   641,   644,   645,   647,   651,   652,
927      655,   660,   665,   675,   676,   679,   680,   681,   682,   683,
928      686,   688,   690,   691,   692,   693,   694,   695,   696,   699,
929      700,   702,   707,   709,   711,   713,   717,   723,   729,   737,
930      738,   741,   742,   745,   746,   749,   750,   751,   754,   755,
931      758,   759,   760,   761,   764,   765,   766,   769,   770,   771,
932      772,   773,   776,   777,   778,   781,   791,   792,   795,   802,
933      813,   824,   832,   851,   857,   865,   873,   875,   877,   878,
934      879,   880,   881,   882,   883,   885,   887,   889,   891,   892,
935      893,   894,   895,   896,   897,   898,   899,   900,   901,   902,
936      903,   904,   905,   906,   907,   908,   909,   911,   912,   927,
937      931,   935,   939,   943,   947,   951,   955,   959,   971,   986,
938      990,   994,   998,  1002,  1006,  1010,  1014,  1018,  1030,  1035,
939     1043,  1044,  1045,  1046,  1050
940 };
941 #endif
942 
943 #if YYDEBUG || YYERROR_VERBOSE || 0
944 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
945    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
946 static const char *const yytname[] =
947 {
948   "$end", "error", "$undefined", "H_NUMBER", "D_NUMBER", "O_NUMBER",
949   "B_NUMBER", "CONVERT_OP", "B_DATA", "H_RANGE_GUESS", "D_NUMBER_GUESS",
950   "O_NUMBER_GUESS", "B_NUMBER_GUESS", "BAD_CMD", "MEM_OP", "IF",
951   "MEM_COMP", "MEM_DISK8", "MEM_DISK9", "MEM_DISK10", "MEM_DISK11",
952   "EQUALS", "TRAIL", "CMD_SEP", "LABEL_ASGN_COMMENT", "CMD_SIDEFX",
953   "CMD_RETURN", "CMD_BLOCK_READ", "CMD_BLOCK_WRITE", "CMD_UP", "CMD_DOWN",
954   "CMD_LOAD", "CMD_SAVE", "CMD_VERIFY", "CMD_IGNORE", "CMD_HUNT",
955   "CMD_FILL", "CMD_MOVE", "CMD_GOTO", "CMD_REGISTERS", "CMD_READSPACE",
956   "CMD_WRITESPACE", "CMD_RADIX", "CMD_MEM_DISPLAY", "CMD_BREAK",
957   "CMD_TRACE", "CMD_IO", "CMD_BRMON", "CMD_COMPARE", "CMD_DUMP",
958   "CMD_UNDUMP", "CMD_EXIT", "CMD_DELETE", "CMD_CONDITION", "CMD_COMMAND",
959   "CMD_ASSEMBLE", "CMD_DISASSEMBLE", "CMD_NEXT", "CMD_STEP", "CMD_PRINT",
960   "CMD_DEVICE", "CMD_HELP", "CMD_WATCH", "CMD_DISK", "CMD_QUIT",
961   "CMD_CHDIR", "CMD_BANK", "CMD_LOAD_LABELS", "CMD_SAVE_LABELS",
962   "CMD_ADD_LABEL", "CMD_DEL_LABEL", "CMD_SHOW_LABELS", "CMD_CLEAR_LABELS",
963   "CMD_RECORD", "CMD_MON_STOP", "CMD_PLAYBACK", "CMD_CHAR_DISPLAY",
964   "CMD_SPRITE_DISPLAY", "CMD_TEXT_DISPLAY", "CMD_SCREENCODE_DISPLAY",
965   "CMD_ENTER_DATA", "CMD_ENTER_BIN_DATA", "CMD_KEYBUF", "CMD_BLOAD",
966   "CMD_BSAVE", "CMD_SCREEN", "CMD_UNTIL", "CMD_CPU", "CMD_YYDEBUG",
967   "CMD_BACKTRACE", "CMD_SCREENSHOT", "CMD_PWD", "CMD_DIR",
968   "CMD_RESOURCE_GET", "CMD_RESOURCE_SET", "CMD_LOAD_RESOURCES",
969   "CMD_SAVE_RESOURCES", "CMD_ATTACH", "CMD_DETACH", "CMD_MON_RESET",
970   "CMD_TAPECTRL", "CMD_CARTFREEZE", "CMD_CPUHISTORY", "CMD_MEMMAPZAP",
971   "CMD_MEMMAPSHOW", "CMD_MEMMAPSAVE", "CMD_COMMENT", "CMD_LIST",
972   "CMD_STOPWATCH", "RESET", "CMD_EXPORT", "CMD_AUTOSTART", "CMD_AUTOLOAD",
973   "CMD_MAINCPU_TRACE", "CMD_LABEL_ASGN", "L_PAREN", "R_PAREN",
974   "ARG_IMMEDIATE", "REG_A", "REG_X", "REG_Y", "COMMA", "INST_SEP",
975   "L_BRACKET", "R_BRACKET", "LESS_THAN", "REG_U", "REG_S", "REG_PC",
976   "REG_PCR", "REG_B", "REG_C", "REG_D", "REG_E", "REG_H", "REG_L",
977   "REG_AF", "REG_BC", "REG_DE", "REG_HL", "REG_IX", "REG_IY", "REG_SP",
978   "REG_IXH", "REG_IXL", "REG_IYH", "REG_IYL", "PLUS", "MINUS", "STRING",
979   "FILENAME", "R_O_L", "OPCODE", "LABEL", "BANKNAME", "CPUTYPE",
980   "MON_REGISTER", "COMPARE_OP", "RADIX_TYPE", "INPUT_SPEC",
981   "CMD_CHECKPT_ON", "CMD_CHECKPT_OFF", "TOGGLE", "MASK", "'+'", "'-'",
982   "'*'", "'/'", "'('", "')'", "'@'", "':'", "$accept", "top_level",
983   "command_list", "end_cmd", "command", "machine_state_rules",
984   "register_mod", "symbol_table_rules", "asm_rules", "$@1", "memory_rules",
985   "checkpoint_rules", "checkpoint_control_rules", "monitor_state_rules",
986   "monitor_misc_rules", "disk_rules", "cmd_file_rules", "data_entry_rules",
987   "monitor_debug_rules", "rest_of_line", "opt_rest_of_line", "filename",
988   "device_num", "mem_op", "opt_mem_op", "register", "reg_list", "reg_asgn",
989   "checkpt_num", "address_opt_range", "address_range", "opt_address",
990   "address", "opt_sep", "memspace", "memloc", "memaddr", "expression",
991   "opt_if_cond_expr", "cond_expr", "compare_operand", "data_list",
992   "data_element", "hunt_list", "hunt_element", "value", "d_number",
993   "guess_default", "number", "assembly_instr_list", "assembly_instruction",
994   "post_assemble", "asm_operand_mode", "index_reg", "index_ureg", YY_NULLPTR
995 };
996 #endif
997 
998 # ifdef YYPRINT
999 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1000    (internal) symbol number NUM (which must be that of a token).  */
1001 static const yytype_uint16 yytoknum[] =
1002 {
1003        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1004      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1005      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1006      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
1007      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
1008      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
1009      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
1010      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
1011      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
1012      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
1013      355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
1014      365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
1015      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
1016      385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
1017      395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
1018      405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
1019      415,   416,   417,   418,    43,    45,    42,    47,    40,    41,
1020       64,    58
1021 };
1022 # endif
1023 
1024 #define YYPACT_NINF -398
1025 
1026 #define yypact_value_is_default(Yystate) \
1027   (!!((Yystate) == (-398)))
1028 
1029 #define YYTABLE_NINF -195
1030 
1031 #define yytable_value_is_error(Yytable_value) \
1032   0
1033 
1034   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1035      STATE-NUM.  */
1036 static const yytype_int16 yypact[] =
1037 {
1038     1117,   890,  -398,  -398,   103,   365,   890,   890,    89,    89,
1039       49,    49,    49,   574,  1473,  1473,  1473,  1115,   409,    60,
1040      983,  1231,  1231,  1115,  1473,    49,    49,   365,   742,   574,
1041      574,  1491,  1369,    89,    89,   890,   696,   169,  1231,  -132,
1042      365,  -132,   515,   189,   189,  1491,   426,  1511,  1511,    49,
1043      365,    49,  1369,  1369,  1369,  1369,  1491,   365,  -132,    49,
1044       49,   365,  1369,   137,   365,   365,    49,   365,  -126,  -122,
1045      -78,    49,    49,    49,   890,    89,   -70,   365,    89,   365,
1046       89,    49,  -126,   503,   324,   365,    49,    49,   -73,    70,
1047     1536,   742,   742,   121,  1254,  -398,  -398,  -398,  -398,  -398,
1048     -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,   107,
1049     -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,
1050     -398,  -398,  -398,   890,  -398,   -21,   241,  -398,  -398,  -398,
1051     -398,  -398,  -398,   365,  -398,  -398,   927,   927,  -398,  -398,
1052      890,  -398,   890,  -398,  -398,   669,   691,   669,  -398,  -398,
1053     -398,  -398,  -398,    89,  -398,  -398,  -398,   -70,   -70,   -70,
1054     -398,  -398,  -398,   -70,   -70,  -398,   365,   -70,  -398,   122,
1055      233,  -398,    95,   365,  -398,   -70,  -398,   365,  -398,   340,
1056     -398,  -398,   138,  1473,  -398,  1473,  -398,   365,   -70,   365,
1057      365,  -398,   472,  -398,   365,   152,   109,   171,  -398,   365,
1058     -398,   890,  -398,   890,   241,   365,  -398,  -398,   365,  -398,
1059     1473,   365,  -398,   365,   365,  -398,    65,   365,   -70,   365,
1060      -70,   -70,   365,   -70,  -398,   365,  -398,   365,   365,  -398,
1061      365,  -398,   365,  -398,   365,  -398,   365,  -398,   365,  1097,
1062     -398,   365,   669,   669,  -398,  -398,   365,   365,  -398,  -398,
1063     -398,    89,  -398,  -398,   365,   365,    31,   365,   365,   890,
1064      241,  -398,   890,   890,  -398,  -398,   890,  -398,  -398,   890,
1065      -70,   365,   476,  -398,   365,   255,   365,  -398,  -398,  1592,
1066     1592,   365,  1491,   830,  1546,    61,   264,  1566,  1546,    66,
1067     -398,    74,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,
1068     -398,  -398,  -398,  -398,  -398,  -398,    76,  -398,  -398,   365,
1069     -398,   365,  -398,  -398,  -398,    12,  -398,   890,   890,   890,
1070      890,  -398,  -398,   162,   946,   241,   241,  -398,   277,  1392,
1071     1415,  1455,  -398,   890,   144,  1491,  1253,  1097,  1491,  -398,
1072     1546,  1546,   230,  -398,  -398,  -398,  1473,  -398,  -398,   186,
1073      186,  -398,  1491,  -398,  -398,  -398,   716,   365,    54,  -398,
1074       62,  -398,   241,   241,  -398,  -398,  -398,   186,  -398,  -398,
1075     -398,  -398,    72,  -398,    49,  -398,    49,    71,  -398,    79,
1076     -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  1513,
1077     -398,  -398,  -398,   277,  1435,  -398,  -398,  -398,   890,  -398,
1078     -398,   365,  -398,  -398,   241,  -398,   241,   241,   241,   857,
1079      890,  -398,  -398,  -398,  -398,  1546,  -398,  1546,  -398,   468,
1080       99,   113,   117,   120,   128,   143,    -1,  -398,   442,  -398,
1081     -398,  -398,  -398,   332,    91,  -398,   133,   362,   140,   141,
1082       -5,  -398,   442,   442,  1580,  -398,  -398,  -398,  -398,    -9,
1083       -9,  -398,  -398,   365,  1491,   365,  -398,  -398,   365,  -398,
1084      365,  -398,   365,   241,  -398,  -398,    53,  -398,  -398,  -398,
1085     -398,  -398,  1513,   365,  -398,  -398,   365,   716,   365,   365,
1086      365,   716,   119,  -398,    80,  -398,  -398,  -398,   365,   149,
1087      157,   365,  -398,  -398,   365,   365,   365,   365,   365,   365,
1088     -398,  1097,   365,  -398,   365,   241,  -398,  -398,  -398,  -398,
1089     -398,  -398,   365,   241,   365,   365,   365,  -398,  -398,  -398,
1090     -398,  -398,  -398,  -398,   153,  -107,  -398,   442,  -398,   134,
1091      442,   422,   -98,   442,   442,   534,   173,  -398,  -398,  -398,
1092     -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,
1093     -398,  -398,  -398,  -398,  -398,  -398,  -398,   155,  -398,  -398,
1094     -398,     7,   127,   285,  -398,  -398,    62,    62,  -398,  -398,
1095     -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,
1096     -398,  -398,  -398,  -398,   238,   190,   193,  -398,  -398,   194,
1097      442,   195,  -398,   -69,   198,   212,   213,   216,   222,  -398,
1098     -398,  1491,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,
1099     -398,  -398,   192,  -398,   221,  -398,  -398,   224,  -398,  -398,
1100     -398,  -398,  -398,  -398,   231,  -398,  -398,  -398
1101 };
1102 
1103   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1104      Performed when YYTABLE does not specify something else to do.  Zero
1105      means the default is an error.  */
1106 static const yytype_uint16 yydefact[] =
1107 {
1108        0,     0,    22,     4,     0,     0,     0,     0,     0,     0,
1109        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1110        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1111        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1112        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1113        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1114        0,     0,     0,     0,     0,     0,     0,     0,   167,     0,
1115        0,     0,     0,     0,     0,     0,   194,     0,     0,     0,
1116        0,     0,   167,     0,     0,     0,     0,     0,     0,     0,
1117      268,     0,     0,     0,     2,     5,    10,    47,    11,    13,
1118       12,    14,    15,    16,    17,    18,    19,    20,    21,     0,
1119      237,   238,   239,   240,   236,   235,   234,   195,   196,   197,
1120      198,   199,   176,     0,   229,     0,     0,   208,   241,   228,
1121        9,     8,     7,     0,   109,    35,     0,     0,   193,    42,
1122        0,    44,     0,   169,   168,     0,     0,     0,   182,   230,
1123      233,   232,   231,     0,   181,   186,   192,   194,   194,   194,
1124      190,   200,   201,   194,   194,    28,     0,   194,    48,     0,
1125        0,   179,     0,     0,   111,   194,    75,     0,   183,   194,
1126      173,    90,   174,     0,    96,     0,    29,     0,   194,     0,
1127        0,   115,     9,   104,     0,     0,     0,     0,    68,     0,
1128       40,     0,    38,     0,     0,     0,   165,   119,     0,    94,
1129        0,     0,   114,     0,     0,    23,     0,     0,   194,     0,
1130      194,   194,     0,   194,    59,     0,    61,     0,     0,   160,
1131        0,    77,     0,    79,     0,    81,     0,    83,     0,     0,
1132      163,     0,     0,     0,    46,    92,     0,     0,    31,   164,
1133      124,     0,   126,   166,     0,     0,     0,     0,     0,     0,
1134        0,   133,     0,     0,   136,    33,     0,    84,    85,     0,
1135      194,     0,     9,   151,     0,   170,     0,   139,   113,     0,
1136        0,     0,     0,     0,     0,   269,     0,     0,     0,   270,
1137      271,   272,   273,   274,   277,   280,   281,   282,   283,   284,
1138      285,   286,   275,   278,   276,   279,   249,   245,    98,     0,
1139      100,     0,     1,     6,     3,     0,   177,     0,     0,     0,
1140        0,   121,   108,   194,     0,     0,     0,   171,   194,   143,
1141        0,     0,   101,     0,     0,     0,     0,     0,     0,    27,
1142        0,     0,     0,    50,    49,   110,     0,    74,   172,   210,
1143      210,    30,     0,    36,    37,   103,     0,     0,     0,    66,
1144        0,    67,     0,     0,   118,   112,   120,   210,   117,   122,
1145       25,    24,     0,    52,     0,    54,     0,     0,    56,     0,
1146       58,    60,   159,   161,    76,    78,    80,    82,   222,     0,
1147      220,   221,   123,   194,     0,    91,    32,   127,     0,   125,
1148      129,     0,   131,   132,     0,   154,     0,     0,     0,     0,
1149        0,   137,   152,   138,   155,     0,   157,     0,   116,     0,
1150        0,     0,     0,     0,     0,     0,     0,   248,     0,   310,
1151      311,   314,   313,     0,   293,   312,     0,     0,     0,     0,
1152        0,   287,     0,     0,     0,    97,    99,   207,   206,   202,
1153      203,   204,   205,     0,     0,     0,    43,    45,     0,   144,
1154        0,   148,     0,     0,   227,   226,     0,   224,   225,   185,
1155      187,   191,     0,     0,   180,   178,     0,     0,     0,     0,
1156        0,     0,     0,   216,     0,   215,   217,   107,     0,   247,
1157      246,     0,    41,    39,     0,     0,     0,     0,     0,     0,
1158      162,     0,     0,   146,     0,     0,   130,   153,   134,   135,
1159       34,    86,     0,     0,     0,     0,     0,    62,   258,   259,
1160      260,   261,   262,   263,   254,     0,   295,     0,   291,   289,
1161        0,     0,     0,     0,     0,     0,   308,   294,   296,   250,
1162      251,   252,   297,   253,   288,   149,   188,   150,   140,   142,
1163      147,   102,    72,   223,    71,    69,    73,   209,    89,    95,
1164       70,     0,     0,     0,   105,   106,     0,   244,    65,    93,
1165       26,    51,    53,    55,    57,   219,   141,   145,   128,    87,
1166       88,   156,   158,    63,     0,     0,     0,   292,   290,     0,
1167        0,     0,   303,     0,     0,     0,     0,     0,     0,   214,
1168      213,     0,   212,   211,   242,   243,   264,   257,   265,   266,
1169      267,   255,     0,   305,     0,   301,   299,     0,   304,   306,
1170      307,   298,   309,   218,     0,   302,   300,   256
1171 };
1172 
1173   /* YYPGOTO[NTERM-NUM].  */
1174 static const yytype_int16 yypgoto[] =
1175 {
1176     -398,  -398,  -398,   572,   220,  -398,  -398,  -398,  -398,  -398,
1177     -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,  -398,    83,
1178      268,   102,  -110,  -398,   -15,    -7,  -398,    10,   374,    15,
1179        0,  -307,    29,    64,   -14,  -206,  -398,   234,  -288,  -397,
1180     -398,    28,  -133,  -398,   -91,  -398,  -398,  -398,   130,  -398,
1181     -355,  -398,  -398,   485,   -62
1182 };
1183 
1184   /* YYDEFGOTO[NTERM-NUM].  */
1185 static const yytype_int16 yydefgoto[] =
1186 {
1187       -1,    93,    94,   134,    95,    96,    97,    98,    99,   360,
1188      100,   101,   102,   103,   104,   105,   106,   107,   108,   208,
1189      254,   145,   274,   182,   183,   124,   170,   171,   153,   177,
1190      178,   453,   179,   454,   125,   160,   161,   275,   478,   484,
1191      485,   389,   390,   466,   467,   127,   154,   128,   162,   489,
1192      109,   491,   307,   434,   435
1193 };
1194 
1195   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
1196      positive, shift that token.  If negative, reduce the rule whose
1197      number is the opposite.  If YYTABLE_NINF, syntax error.  */
1198 static const yytype_int16 yytable[] =
1199 {
1200      159,   159,   159,   167,   172,   490,   159,   185,   599,   167,
1201      159,   169,   585,   447,   157,   163,   164,   167,   159,   206,
1202      586,   458,   205,   210,   188,   253,   592,   255,   216,   218,
1203      220,   167,   223,   225,   227,   328,   330,   331,   159,   159,
1204      159,   159,   167,   158,   158,   158,   166,   199,   159,   593,
1205      143,   138,   187,   158,   130,   616,   110,   111,   112,   113,
1206      197,   130,   479,   114,   115,   116,   130,   232,   234,   236,
1207      238,   256,   140,   142,   221,   131,   132,   246,   617,   494,
1208      557,   130,   131,   132,   561,   239,   502,   131,   132,   281,
1209      130,   282,  -194,  -194,  -194,  -194,   130,   201,   203,  -194,
1210     -194,  -194,   131,   132,   130,  -194,  -194,  -194,  -194,  -194,
1211      357,   131,   132,   146,   147,   524,   535,   131,   132,   536,
1212      525,   312,   211,   600,   213,   131,   132,   189,   190,   314,
1213      471,   129,   393,   394,   471,   316,   129,   129,   130,   262,
1214      263,   241,   266,   341,   269,   217,   219,   110,   111,   112,
1215      113,   228,   348,   230,   114,   115,   116,   319,   320,   131,
1216      132,   242,   243,  -189,   563,   129,   603,   356,   251,   159,
1217      130,   159,   130,   257,   258,   259,   317,   318,   319,   320,
1218      401,   448,   428,   270,  -189,  -189,   138,   442,   279,   280,
1219      143,   131,   132,   131,   132,   443,   159,   444,   349,   144,
1220      350,   477,   464,   488,   129,   117,   118,   119,   120,   121,
1221      138,   604,   605,   129,    90,   518,   465,   333,   173,  -194,
1222      306,   334,   335,   336,   498,   367,   495,   337,   338,   519,
1223      138,   340,   499,   520,   130,   126,   521,   563,   529,   346,
1224      136,   137,   130,   335,   522,  -194,   117,   118,   119,   120,
1225      121,   316,   352,   129,   530,   131,   132,  -194,  -194,   523,
1226      358,   533,   534,   131,   132,   133,   129,   129,   167,   204,
1227      129,   566,   129,   562,   584,   129,   129,   129,  -189,   567,
1228      372,   588,   374,   138,   376,   377,   602,   379,   110,   111,
1229      112,   113,   247,   464,   598,   114,   115,   116,   601,  -189,
1230     -189,   117,   118,   119,   120,   121,   611,   465,   260,   612,
1231      167,   419,   563,   624,   313,   398,   159,   167,   613,   615,
1232      206,   167,   618,   -64,   167,   130,   317,   318,   319,   320,
1233      460,   129,   159,   129,   410,   169,   619,   620,   167,   144,
1234      621,  -184,   622,   415,   417,   625,   131,   132,   626,   483,
1235      271,   627,   475,   455,   342,  -184,   606,   315,   607,   158,
1236      462,   476,  -184,  -184,   469,   472,   130,   473,   575,   391,
1237      323,   324,   129,   129,   325,   553,   326,   608,   609,   610,
1238      159,   480,   544,   429,   430,     0,   122,   131,   132,   129,
1239      431,   432,   129,   129,   504,   159,   129,     0,   138,   129,
1240      481,     0,   194,   195,   196,   317,   318,   319,   320,     0,
1241      130,     0,   433,   426,   427,     0,     0,   440,   441,   317,
1242      318,   319,   320,   158,   512,   117,   118,   119,   120,   121,
1243        0,   131,   132,   276,     0,   362,     0,   363,     0,     0,
1244      167,   122,   117,   118,   119,   120,   121,   129,   129,   129,
1245      129,   429,   430,   501,     0,   482,     0,     0,   431,   432,
1246        0,   138,     0,   129,   468,   309,   311,   391,     0,   130,
1247      483,   474,     0,  -182,   483,     0,   496,  -171,   497,     0,
1248      527,   429,   430,   546,     0,     0,   486,     0,   431,   432,
1249      131,   132,   516,   404,  -182,  -182,   406,   407,  -171,  -171,
1250      408,     0,     0,   409,   272,     0,   110,   111,   112,   113,
1251      531,     0,     0,   114,   115,   116,   130,     0,     0,   117,
1252      118,   119,   120,   121,     0,   131,   132,     0,   129,     0,
1253        0,   117,   118,   119,   120,   121,   501,   131,   132,     0,
1254      129,   429,   430,     0,     0,   514,     0,   515,   431,   432,
1255        0,   449,   450,   451,   452,     0,   483,     0,     0,     0,
1256        0,   429,   430,     0,     0,   122,     0,   463,   431,   432,
1257      590,     0,     0,     0,   543,   148,     0,   135,   149,   222,
1258      139,   141,     0,     0,   150,   151,   152,   167,     0,   165,
1259      168,   174,   176,   181,   184,   186,   468,     0,     0,   191,
1260      193,     0,     0,     0,   198,   200,   202,   486,     0,   207,
1261      209,   486,   212,     0,   215,     0,     0,     0,     0,   224,
1262      226,     0,   229,     0,   231,   233,   235,   237,     0,   240,
1263      623,   391,   505,   244,   245,   248,   249,   250,     0,   252,
1264        0,     0,     0,     0,   513,     0,     0,   261,     0,   264,
1265      265,   267,   268,   429,   430,   273,   277,   278,     0,   122,
1266      431,   432,   596,   308,   310,     0,     0,     0,     0,   214,
1267      327,   123,   110,   111,   112,   113,     0,     0,     0,   114,
1268      115,   116,     0,     0,     0,   117,   118,   119,   120,   121,
1269        0,     0,   329,   486,   110,   111,   112,   113,   321,     0,
1270        0,   114,   115,   116,     0,   322,     0,   117,   118,   119,
1271      120,   121,   117,   118,   119,   120,   121,     0,     0,   110,
1272      111,   112,   113,     0,     0,   332,   114,   115,   116,     0,
1273        0,     0,   117,   118,   119,   120,   121,     0,   339,     0,
1274        0,     0,   343,   192,   344,   345,   149,     0,     0,   347,
1275        0,     0,   150,   151,   152,     0,     0,     0,     0,   351,
1276        0,   353,   354,     0,   131,   132,   355,     0,     0,   359,
1277        0,   361,     0,     0,     0,     0,   364,   365,     0,     0,
1278      366,     0,     0,   368,     0,   369,   370,     0,   371,   373,
1279        0,   375,     0,     0,   378,     0,     0,   380,     0,   381,
1280      382,     0,   383,     0,   384,     0,   385,     0,   386,     0,
1281      387,     0,     0,   392,     0,     0,     0,     0,   395,   396,
1282        0,     0,     0,   397,     0,   122,   399,   400,     0,   402,
1283      403,   481,   405,   110,   111,   112,   113,   123,     0,     0,
1284      114,   115,   116,   411,     0,     0,   412,   122,   413,     0,
1285        0,   414,   416,   418,     0,     0,     0,     0,   130,   123,
1286      110,   111,   112,   113,     0,     0,   155,   114,   115,   116,
1287        0,     0,   122,   117,   118,   119,   120,   121,     0,   131,
1288      132,   445,     0,   446,     0,     0,   482,     0,     0,     0,
1289        0,     0,     0,   110,   111,   112,   113,   456,   457,     0,
1290      114,   115,   116,     0,     0,     0,   117,   118,   119,   120,
1291      121,     0,     0,   526,     0,     0,     0,     0,   528,     0,
1292        0,     0,   532,     0,     0,     0,     0,   537,   538,   487,
1293      110,   111,   112,   113,   492,   493,     0,   114,   115,   116,
1294        0,     0,     0,   117,   118,   119,   120,   121,     0,   110,
1295      111,   112,   113,     0,     0,     0,   114,   115,   116,     0,
1296        0,   500,   117,   118,   119,   120,   121,   420,   421,   422,
1297      423,   424,   425,   506,     0,     0,   507,     0,   508,   509,
1298      510,   511,     0,     0,   130,     0,   110,   111,   112,   113,
1299        0,   517,   155,   114,   115,   116,     0,     0,     0,   117,
1300      118,   119,   120,   121,     0,   131,   132,     0,     0,     0,
1301      156,     0,   587,     0,     0,   589,   591,     0,   594,   595,
1302      597,   317,   318,   319,   320,   545,     0,   547,     0,     0,
1303      548,     0,   549,     0,   550,   551,     0,     0,   552,     0,
1304        0,     0,     0,     0,   554,   555,   122,     0,   556,     0,
1305      558,   559,   560,     0,     0,     0,   564,     0,   123,     0,
1306      565,     0,     0,   568,     0,     0,   569,   570,   571,   572,
1307      573,   574,     0,     0,   576,   614,   577,   578,     0,     0,
1308        0,     0,     0,   122,   579,   580,   581,   582,   583,     0,
1309        0,   317,   318,   319,   320,   123,     0,     0,     0,   156,
1310      110,   111,   112,   113,     0,     0,     0,   114,   115,   116,
1311      317,   318,   319,   320,     0,     0,   130,     0,   110,   111,
1312      112,   113,     0,     0,     1,   114,   115,   116,     0,     0,
1313        2,   117,   118,   119,   120,   121,   156,   131,   132,     3,
1314        0,   175,     4,     5,     6,     7,     8,     9,    10,    11,
1315       12,    13,    14,    15,    16,    17,    18,     0,     0,    19,
1316       20,    21,    22,    23,     0,    24,    25,    26,    27,    28,
1317       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
1318       39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
1319       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
1320       59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
1321       69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
1322       79,    80,    81,    82,    83,    84,     0,    85,    86,    87,
1323       88,    89,   130,     0,  -175,  -175,  -175,  -175,     0,     0,
1324     -175,  -175,  -175,  -175,     0,   180,   388,  -175,  -175,  -175,
1325     -175,  -175,     0,   131,   132,     0,   110,   111,   112,   113,
1326        0,     1,   470,   114,   115,   116,     0,     2,   156,    90,
1327        0,     0,     0,     0,     0,     0,     0,    91,    92,     4,
1328        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1329       15,    16,    17,    18,     0,     0,    19,    20,    21,    22,
1330       23,     0,    24,    25,    26,    27,    28,    29,    30,    31,
1331       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1332       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1333       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
1334       62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
1335       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
1336       82,    83,    84,     0,    85,    86,    87,    88,    89,     0,
1337      130,     0,   110,   111,   112,   113,     0,     0,   155,   114,
1338      115,   116,     0,     0,  -175,   117,   118,   119,   120,   121,
1339        0,   131,   132,  -171,     0,  -171,  -171,  -171,  -171,     0,
1340        0,  -171,  -171,  -171,  -171,     0,     0,     0,  -171,  -171,
1341     -171,  -171,  -171,     0,    91,    92,   459,     0,   110,   111,
1342      112,   113,     0,     0,   155,   114,   115,   116,     0,     0,
1343        0,   117,   118,   119,   120,   121,   503,     0,   110,   111,
1344      112,   113,     0,     0,   155,   114,   115,   116,     0,     0,
1345        0,   117,   118,   119,   120,   121,   461,     0,   110,   111,
1346      112,   113,     0,     0,     0,   114,   115,   116,     0,     0,
1347        0,   117,   118,   119,   120,   121,   110,   111,   112,   113,
1348        0,     0,   155,   114,   115,   116,     0,     0,     0,   117,
1349      118,   119,   120,   121,   110,   111,   112,   113,     0,     0,
1350        0,   114,   115,   116,     0,     0,     0,   117,   118,   119,
1351      120,   121,   130,     0,   130,     0,  -194,  -194,  -194,  -194,
1352        0,     0,   156,  -194,  -194,  -194,     0,   117,   118,   119,
1353      120,   121,     0,   131,   132,   131,   132,     0,     0,   110,
1354      111,   112,   113,     0,     0,  -171,   114,   115,   116,   110,
1355      111,   112,   113,     0,     0,     0,   114,   115,   116,     0,
1356        0,     0,     0,     0,     0,     0,     0,     0,   156,   110,
1357      111,   112,   113,     0,     0,     0,   114,   115,   116,     0,
1358        0,     0,     0,   110,   111,   112,   113,     0,   156,     0,
1359      114,   115,   116,   130,     0,  -194,  -194,  -194,  -194,     0,
1360        0,     0,  -194,  -194,  -194,     0,     0,     0,   156,     0,
1361        0,     0,     0,     0,   131,   132,     0,     0,     0,     0,
1362        0,     0,     0,     0,     0,     0,   156,     0,     0,     0,
1363        0,     0,     0,     0,   138,     0,     0,     0,     0,     0,
1364        0,     0,     0,     0,   156,     0,     0,     0,     0,     0,
1365        0,   283,     0,   284,   285,     0,     0,   286,     0,   287,
1366        0,   288,  -194,     0,     0,     0,   289,   290,   291,   292,
1367      293,   294,   295,   296,   297,   298,   299,   300,   301,   302,
1368      303,   304,   305,     0,   436,     0,     0,   437,     0,     0,
1369        0,     0,     0,     0,     0,     0,   438,     0,   439,   539,
1370      540,     0,     0,     0,     0,     0,   431,   541,   542,     0,
1371        0,     0,     0,   138
1372 };
1373 
1374 static const yytype_int16 yycheck[] =
1375 {
1376       14,    15,    16,    17,    18,   360,    20,    22,     1,    23,
1377       24,    18,   119,     1,    14,    15,    16,    31,    32,   151,
1378      127,   328,    36,    38,    24,   151,   124,   149,    42,    43,
1379       44,    45,    46,    47,    48,   145,   146,   147,    52,    53,
1380       54,    55,    56,    14,    15,    16,    17,    32,    62,   147,
1381        1,   121,    23,    24,     1,   124,     3,     4,     5,     6,
1382       31,     1,   350,    10,    11,    12,     1,    52,    53,    54,
1383       55,   149,     8,     9,    45,    22,    23,    62,   147,   367,
1384      477,     1,    22,    23,   481,    56,   393,    22,    23,   162,
1385        1,    21,     3,     4,     5,     6,     1,    33,    34,    10,
1386       11,    12,    22,    23,     1,    16,    17,    18,    19,    20,
1387        1,    22,    23,    11,    12,   116,   121,    22,    23,   124,
1388      121,     0,    39,   116,    41,    22,    23,    25,    26,    22,
1389      336,     1,   242,   243,   340,   156,     6,     7,     1,    75,
1390       76,    58,    78,    21,    80,    43,    44,     3,     4,     5,
1391        6,    49,    14,    51,    10,    11,    12,   166,   167,    22,
1392       23,    59,    60,     1,   157,    35,   563,    15,    66,   183,
1393        1,   185,     1,    71,    72,    73,   164,   165,   166,   167,
1394      149,   169,   121,    81,    22,    23,   121,   121,    86,    87,
1395        1,    22,    23,    22,    23,   121,   210,   121,   183,   150,
1396      185,    15,   149,   149,    74,    16,    17,    18,    19,    20,
1397      121,   566,   567,    83,   152,   116,   163,   153,   158,   154,
1398       90,   157,   158,   159,   153,   210,   154,   163,   164,   116,
1399      121,   167,   153,   116,     1,     1,   116,   157,   147,   175,
1400        6,     7,     1,   179,   116,   156,    16,    17,    18,    19,
1401       20,   156,   188,   123,   121,    22,    23,   168,   149,   116,
1402      196,   121,   121,    22,    23,   162,   136,   137,   282,    35,
1403      140,   122,   142,   154,   121,   145,   146,   147,     1,   122,
1404      216,   147,   218,   121,   220,   221,     1,   223,     3,     4,
1405        5,     6,   155,   149,   121,    10,    11,    12,   171,    22,
1406       23,    16,    17,    18,    19,    20,   116,   163,    74,   116,
1407      324,   282,   157,   121,    94,   251,   330,   331,   124,   124,
1408      151,   335,   124,   152,   338,     1,   164,   165,   166,   167,
1409      330,   201,   346,   203,   270,   342,   124,   124,   352,   150,
1410      124,     1,   120,   279,   280,   124,    22,    23,   124,   356,
1411       82,   120,   342,   324,   121,    15,   118,   123,   120,   330,
1412      331,   346,    22,    23,   335,   337,     1,   338,   501,   239,
1413      136,   137,   242,   243,   140,   466,   142,   139,   140,   141,
1414      394,   352,   444,   119,   120,    -1,   156,    22,    23,   259,
1415      126,   127,   262,   263,   394,   409,   266,    -1,   121,   269,
1416      115,    -1,    28,    29,    30,   164,   165,   166,   167,    -1,
1417        1,    -1,   148,   283,   284,    -1,    -1,   287,   288,   164,
1418      165,   166,   167,   394,   409,    16,    17,    18,    19,    20,
1419       -1,    22,    23,   109,    -1,   201,    -1,   203,    -1,    -1,
1420      454,   156,    16,    17,    18,    19,    20,   317,   318,   319,
1421      320,   119,   120,   389,    -1,   170,    -1,    -1,   126,   127,
1422       -1,   121,    -1,   333,   334,    91,    92,   337,    -1,     1,
1423      477,   341,    -1,     1,   481,    -1,   374,     1,   376,    -1,
1424      148,   119,   120,   454,    -1,    -1,   356,    -1,   126,   127,
1425       22,    23,    24,   259,    22,    23,   262,   263,    22,    23,
1426      266,    -1,    -1,   269,     1,    -1,     3,     4,     5,     6,
1427      148,    -1,    -1,    10,    11,    12,     1,    -1,    -1,    16,
1428       17,    18,    19,    20,    -1,    22,    23,    -1,   398,    -1,
1429       -1,    16,    17,    18,    19,    20,   472,    22,    23,    -1,
1430      410,   119,   120,    -1,    -1,   415,    -1,   417,   126,   127,
1431       -1,   317,   318,   319,   320,    -1,   563,    -1,    -1,    -1,
1432       -1,   119,   120,    -1,    -1,   156,    -1,   333,   126,   127,
1433      148,    -1,    -1,    -1,   444,     1,    -1,     5,     4,   153,
1434        8,     9,    -1,    -1,    10,    11,    12,   601,    -1,    17,
1435       18,    19,    20,    21,    22,    23,   466,    -1,    -1,    27,
1436       28,    -1,    -1,    -1,    32,    33,    34,   477,    -1,    37,
1437       38,   481,    40,    -1,    42,    -1,    -1,    -1,    -1,    47,
1438       48,    -1,    50,    -1,    52,    53,    54,    55,    -1,    57,
1439      601,   501,   398,    61,    62,    63,    64,    65,    -1,    67,
1440       -1,    -1,    -1,    -1,   410,    -1,    -1,    75,    -1,    77,
1441       78,    79,    80,   119,   120,    83,    84,    85,    -1,   156,
1442      126,   127,   128,    91,    92,    -1,    -1,    -1,    -1,   154,
1443        1,   168,     3,     4,     5,     6,    -1,    -1,    -1,    10,
1444       11,    12,    -1,    -1,    -1,    16,    17,    18,    19,    20,
1445       -1,    -1,     1,   563,     3,     4,     5,     6,   126,    -1,
1446       -1,    10,    11,    12,    -1,   133,    -1,    16,    17,    18,
1447       19,    20,    16,    17,    18,    19,    20,    -1,    -1,     3,
1448        4,     5,     6,    -1,    -1,   153,    10,    11,    12,    -1,
1449       -1,    -1,    16,    17,    18,    19,    20,    -1,   166,    -1,
1450       -1,    -1,   170,     1,   172,   173,     4,    -1,    -1,   177,
1451       -1,    -1,    10,    11,    12,    -1,    -1,    -1,    -1,   187,
1452       -1,   189,   190,    -1,    22,    23,   194,    -1,    -1,   197,
1453       -1,   199,    -1,    -1,    -1,    -1,   204,   205,    -1,    -1,
1454      208,    -1,    -1,   211,    -1,   213,   214,    -1,   216,   217,
1455       -1,   219,    -1,    -1,   222,    -1,    -1,   225,    -1,   227,
1456      228,    -1,   230,    -1,   232,    -1,   234,    -1,   236,    -1,
1457      238,    -1,    -1,   241,    -1,    -1,    -1,    -1,   246,   247,
1458       -1,    -1,    -1,   251,    -1,   156,   254,   255,    -1,   257,
1459      258,   115,   260,     3,     4,     5,     6,   168,    -1,    -1,
1460       10,    11,    12,   271,    -1,    -1,   274,   156,   276,    -1,
1461       -1,   279,   280,   281,    -1,    -1,    -1,    -1,     1,   168,
1462        3,     4,     5,     6,    -1,    -1,     9,    10,    11,    12,
1463       -1,    -1,   156,    16,    17,    18,    19,    20,    -1,    22,
1464       23,   309,    -1,   311,    -1,    -1,   170,    -1,    -1,    -1,
1465       -1,    -1,    -1,     3,     4,     5,     6,   325,   326,    -1,
1466       10,    11,    12,    -1,    -1,    -1,    16,    17,    18,    19,
1467       20,    -1,    -1,   428,    -1,    -1,    -1,    -1,   433,    -1,
1468       -1,    -1,   437,    -1,    -1,    -1,    -1,   442,   443,   357,
1469        3,     4,     5,     6,   362,   363,    -1,    10,    11,    12,
1470       -1,    -1,    -1,    16,    17,    18,    19,    20,    -1,     3,
1471        4,     5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,
1472       -1,   389,    16,    17,    18,    19,    20,   137,   138,   139,
1473      140,   141,   142,   401,    -1,    -1,   404,    -1,   406,   407,
1474      408,   409,    -1,    -1,     1,    -1,     3,     4,     5,     6,
1475       -1,   419,     9,    10,    11,    12,    -1,    -1,    -1,    16,
1476       17,    18,    19,    20,    -1,    22,    23,    -1,    -1,    -1,
1477      153,    -1,   527,    -1,    -1,   530,   531,    -1,   533,   534,
1478      535,   164,   165,   166,   167,   453,    -1,   455,    -1,    -1,
1479      458,    -1,   460,    -1,   462,   463,    -1,    -1,   466,    -1,
1480       -1,    -1,    -1,    -1,   472,   473,   156,    -1,   476,    -1,
1481      478,   479,   480,    -1,    -1,    -1,   484,    -1,   168,    -1,
1482      488,    -1,    -1,   491,    -1,    -1,   494,   495,   496,   497,
1483      498,   499,    -1,    -1,   502,   590,   504,   505,    -1,    -1,
1484       -1,    -1,    -1,   156,   512,   513,   514,   515,   516,    -1,
1485       -1,   164,   165,   166,   167,   168,    -1,    -1,    -1,   153,
1486        3,     4,     5,     6,    -1,    -1,    -1,    10,    11,    12,
1487      164,   165,   166,   167,    -1,    -1,     1,    -1,     3,     4,
1488        5,     6,    -1,    -1,     7,    10,    11,    12,    -1,    -1,
1489       13,    16,    17,    18,    19,    20,   153,    22,    23,    22,
1490       -1,   158,    25,    26,    27,    28,    29,    30,    31,    32,
1491       33,    34,    35,    36,    37,    38,    39,    -1,    -1,    42,
1492       43,    44,    45,    46,    -1,    48,    49,    50,    51,    52,
1493       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
1494       63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
1495       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
1496       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
1497       93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
1498      103,   104,   105,   106,   107,   108,    -1,   110,   111,   112,
1499      113,   114,     1,    -1,     3,     4,     5,     6,    -1,    -1,
1500        9,    10,    11,    12,    -1,    14,   149,    16,    17,    18,
1501       19,    20,    -1,    22,    23,    -1,     3,     4,     5,     6,
1502       -1,     7,     9,    10,    11,    12,    -1,    13,   153,   152,
1503       -1,    -1,    -1,    -1,    -1,    -1,    -1,   160,   161,    25,
1504       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
1505       36,    37,    38,    39,    -1,    -1,    42,    43,    44,    45,
1506       46,    -1,    48,    49,    50,    51,    52,    53,    54,    55,
1507       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
1508       66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
1509       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
1510       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
1511       96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
1512      106,   107,   108,    -1,   110,   111,   112,   113,   114,    -1,
1513        1,    -1,     3,     4,     5,     6,    -1,    -1,     9,    10,
1514       11,    12,    -1,    -1,   153,    16,    17,    18,    19,    20,
1515       -1,    22,    23,     1,    -1,     3,     4,     5,     6,    -1,
1516       -1,     9,    10,    11,    12,    -1,    -1,    -1,    16,    17,
1517       18,    19,    20,    -1,   160,   161,     1,    -1,     3,     4,
1518        5,     6,    -1,    -1,     9,    10,    11,    12,    -1,    -1,
1519       -1,    16,    17,    18,    19,    20,     1,    -1,     3,     4,
1520        5,     6,    -1,    -1,     9,    10,    11,    12,    -1,    -1,
1521       -1,    16,    17,    18,    19,    20,     1,    -1,     3,     4,
1522        5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,    -1,
1523       -1,    16,    17,    18,    19,    20,     3,     4,     5,     6,
1524       -1,    -1,     9,    10,    11,    12,    -1,    -1,    -1,    16,
1525       17,    18,    19,    20,     3,     4,     5,     6,    -1,    -1,
1526       -1,    10,    11,    12,    -1,    -1,    -1,    16,    17,    18,
1527       19,    20,     1,    -1,     1,    -1,     3,     4,     5,     6,
1528       -1,    -1,   153,    10,    11,    12,    -1,    16,    17,    18,
1529       19,    20,    -1,    22,    23,    22,    23,    -1,    -1,     3,
1530        4,     5,     6,    -1,    -1,   153,    10,    11,    12,     3,
1531        4,     5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,
1532       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   153,     3,
1533        4,     5,     6,    -1,    -1,    -1,    10,    11,    12,    -1,
1534       -1,    -1,    -1,     3,     4,     5,     6,    -1,   153,    -1,
1535       10,    11,    12,     1,    -1,     3,     4,     5,     6,    -1,
1536       -1,    -1,    10,    11,    12,    -1,    -1,    -1,   153,    -1,
1537       -1,    -1,    -1,    -1,    22,    23,    -1,    -1,    -1,    -1,
1538       -1,    -1,    -1,    -1,    -1,    -1,   153,    -1,    -1,    -1,
1539       -1,    -1,    -1,    -1,   121,    -1,    -1,    -1,    -1,    -1,
1540       -1,    -1,    -1,    -1,   153,    -1,    -1,    -1,    -1,    -1,
1541       -1,   115,    -1,   117,   118,    -1,    -1,   121,    -1,   123,
1542       -1,   125,   149,    -1,    -1,    -1,   130,   131,   132,   133,
1543      134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
1544      144,   145,   146,    -1,   118,    -1,    -1,   121,    -1,    -1,
1545       -1,    -1,    -1,    -1,    -1,    -1,   130,    -1,   132,   119,
1546      120,    -1,    -1,    -1,    -1,    -1,   126,   127,   128,    -1,
1547       -1,    -1,    -1,   121
1548 };
1549 
1550   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1551      symbol of state STATE-NUM.  */
1552 static const yytype_uint8 yystos[] =
1553 {
1554        0,     7,    13,    22,    25,    26,    27,    28,    29,    30,
1555       31,    32,    33,    34,    35,    36,    37,    38,    39,    42,
1556       43,    44,    45,    46,    48,    49,    50,    51,    52,    53,
1557       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
1558       64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
1559       74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
1560       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
1561       94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
1562      104,   105,   106,   107,   108,   110,   111,   112,   113,   114,
1563      152,   160,   161,   173,   174,   176,   177,   178,   179,   180,
1564      182,   183,   184,   185,   186,   187,   188,   189,   190,   222,
1565        3,     4,     5,     6,    10,    11,    12,    16,    17,    18,
1566       19,    20,   156,   168,   197,   206,   209,   217,   219,   220,
1567        1,    22,    23,   162,   175,   175,   209,   209,   121,   175,
1568      205,   175,   205,     1,   150,   193,   193,   193,     1,     4,
1569       10,    11,    12,   200,   218,     9,   153,   202,   204,   206,
1570      207,   208,   220,   202,   202,   175,   204,   206,   175,   197,
1571      198,   199,   206,   158,   175,   158,   175,   201,   202,   204,
1572       14,   175,   195,   196,   175,   196,   175,   204,   202,   193,
1573      193,   175,     1,   175,   200,   200,   200,   204,   175,   201,
1574      175,   205,   175,   205,   209,   206,   151,   175,   191,   175,
1575      196,   191,   175,   191,   154,   175,   206,   193,   206,   193,
1576      206,   204,   153,   206,   175,   206,   175,   206,   193,   175,
1577      193,   175,   201,   175,   201,   175,   201,   175,   201,   204,
1578      175,   191,   193,   193,   175,   175,   201,   155,   175,   175,
1579      175,   193,   175,   151,   192,   149,   149,   193,   193,   193,
1580      209,   175,   205,   205,   175,   175,   205,   175,   175,   205,
1581      193,   192,     1,   175,   194,   209,   109,   175,   175,   193,
1582      193,   162,    21,   115,   117,   118,   121,   123,   125,   130,
1583      131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
1584      141,   142,   143,   144,   145,   146,   220,   224,   175,   200,
1585      175,   200,     0,   176,    22,   209,   156,   164,   165,   166,
1586      167,   175,   175,   209,   209,   209,   209,     1,   194,     1,
1587      194,   194,   175,   205,   205,   205,   205,   205,   205,   175,
1588      205,    21,   121,   175,   175,   175,   205,   175,    14,   201,
1589      201,   175,   205,   175,   175,   175,    15,     1,   205,   175,
1590      181,   175,   209,   209,   175,   175,   175,   201,   175,   175,
1591      175,   175,   205,   175,   205,   175,   205,   205,   175,   205,
1592      175,   175,   175,   175,   175,   175,   175,   175,   149,   213,
1593      214,   220,   175,   194,   194,   175,   175,   175,   205,   175,
1594      175,   149,   175,   175,   209,   175,   209,   209,   209,   209,
1595      205,   175,   175,   175,   175,   205,   175,   205,   175,   204,
1596      137,   138,   139,   140,   141,   142,   220,   220,   121,   119,
1597      120,   126,   127,   148,   225,   226,   118,   121,   130,   132,
1598      220,   220,   121,   121,   121,   175,   175,     1,   169,   209,
1599      209,   209,   209,   203,   205,   204,   175,   175,   203,     1,
1600      202,     1,   204,   209,   149,   163,   215,   216,   220,   204,
1601        9,   207,   213,   204,   220,   199,   201,    15,   210,   210,
1602      204,   115,   170,   197,   211,   212,   220,   175,   149,   221,
1603      222,   223,   175,   175,   210,   154,   193,   193,   153,   153,
1604      175,   205,   203,     1,   202,   209,   175,   175,   175,   175,
1605      175,   175,   201,   209,   220,   220,    24,   175,   116,   116,
1606      116,   116,   116,   116,   116,   121,   225,   148,   225,   147,
1607      121,   148,   225,   121,   121,   121,   124,   225,   225,   119,
1608      120,   127,   128,   220,   226,   175,   204,   175,   175,   175,
1609      175,   175,   175,   216,   175,   175,   175,   211,   175,   175,
1610      175,   211,   154,   157,   175,   175,   122,   122,   175,   175,
1611      175,   175,   175,   175,   175,   214,   175,   175,   175,   175,
1612      175,   175,   175,   175,   121,   119,   127,   225,   147,   225,
1613      148,   225,   124,   147,   225,   225,   128,   225,   121,     1,
1614      116,   171,     1,   211,   222,   222,   118,   120,   139,   140,
1615      141,   116,   116,   124,   225,   124,   124,   147,   124,   124,
1616      124,   124,   120,   204,   121,   124,   124,   120
1617 };
1618 
1619   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1620 static const yytype_uint8 yyr1[] =
1621 {
1622        0,   172,   173,   173,   173,   174,   174,   175,   175,   175,
1623      176,   176,   176,   176,   176,   176,   176,   176,   176,   176,
1624      176,   176,   176,   177,   177,   177,   177,   177,   177,   177,
1625      177,   177,   177,   177,   177,   177,   177,   177,   177,   177,
1626      177,   177,   177,   177,   177,   177,   177,   177,   178,   178,
1627      178,   179,   179,   179,   179,   179,   179,   179,   179,   179,
1628      179,   179,   179,   179,   181,   180,   180,   180,   180,   182,
1629      182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
1630      182,   182,   182,   182,   182,   182,   182,   182,   182,   183,
1631      183,   183,   183,   183,   183,   183,   183,   184,   184,   184,
1632      184,   184,   184,   184,   184,   184,   184,   184,   185,   185,
1633      185,   185,   185,   185,   185,   185,   185,   186,   186,   186,
1634      186,   186,   186,   186,   186,   186,   186,   186,   186,   186,
1635      186,   186,   186,   186,   186,   186,   186,   186,   186,   186,
1636      187,   187,   187,   187,   187,   187,   187,   187,   187,   187,
1637      187,   187,   187,   187,   187,   187,   187,   187,   187,   188,
1638      188,   188,   189,   189,   190,   191,   192,   192,   193,   193,
1639      194,   194,   195,   195,   196,   196,   197,   197,   198,   198,
1640      199,   200,   200,   201,   201,   202,   202,   202,   203,   203,
1641      204,   204,   204,   205,   205,   206,   206,   206,   206,   206,
1642      207,   208,   209,   209,   209,   209,   209,   209,   209,   210,
1643      210,   211,   211,   211,   211,   211,   212,   212,   212,   213,
1644      213,   214,   214,   215,   215,   216,   216,   216,   217,   217,
1645      218,   218,   218,   218,   219,   219,   219,   220,   220,   220,
1646      220,   220,   221,   221,   221,   222,   223,   223,   224,   224,
1647      224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
1648      224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
1649      224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
1650      224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
1651      224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
1652      224,   224,   224,   224,   224,   224,   224,   224,   224,   224,
1653      225,   225,   225,   225,   226
1654 };
1655 
1656   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
1657 static const yytype_uint8 yyr2[] =
1658 {
1659        0,     2,     1,     2,     1,     1,     2,     1,     1,     1,
1660        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1661        1,     1,     1,     2,     3,     3,     5,     3,     2,     2,
1662        3,     2,     3,     2,     4,     2,     3,     3,     2,     4,
1663        2,     4,     2,     4,     2,     4,     2,     1,     2,     3,
1664        3,     5,     3,     5,     3,     5,     3,     5,     3,     2,
1665        3,     2,     4,     5,     0,     5,     3,     3,     2,     5,
1666        5,     5,     5,     5,     3,     2,     3,     2,     3,     2,
1667        3,     2,     3,     2,     2,     2,     4,     5,     5,     5,
1668        2,     3,     2,     5,     2,     5,     2,     3,     2,     3,
1669        2,     3,     5,     3,     2,     5,     5,     4,     3,     2,
1670        3,     2,     3,     2,     2,     2,     3,     3,     3,     2,
1671        3,     3,     3,     3,     2,     3,     2,     3,     5,     3,
1672        4,     3,     3,     2,     4,     4,     2,     3,     3,     2,
1673        5,     5,     5,     3,     4,     5,     4,     5,     4,     5,
1674        5,     2,     3,     4,     3,     3,     5,     3,     5,     3,
1675        2,     3,     4,     2,     2,     1,     1,     0,     1,     1,
1676        1,     1,     2,     1,     1,     0,     1,     2,     3,     1,
1677        3,     1,     1,     1,     1,     3,     1,     3,     2,     0,
1678        1,     3,     1,     1,     0,     1,     1,     1,     1,     1,
1679        1,     1,     3,     3,     3,     3,     3,     3,     1,     2,
1680        0,     3,     3,     3,     3,     1,     1,     1,     4,     3,
1681        1,     1,     1,     2,     1,     1,     1,     1,     1,     1,
1682        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1683        1,     1,     3,     3,     2,     2,     1,     1,     2,     1,
1684        3,     3,     3,     3,     3,     5,     7,     5,     3,     3,
1685        3,     3,     3,     3,     5,     5,     5,     5,     0,     1,
1686        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1687        1,     1,     1,     1,     1,     1,     1,     2,     3,     3,
1688        4,     3,     4,     2,     3,     3,     3,     3,     5,     5,
1689        6,     5,     6,     4,     5,     5,     5,     5,     3,     5,
1690        1,     1,     1,     1,     1
1691 };
1692 
1693 
1694 #define yyerrok         (yyerrstatus = 0)
1695 #define yyclearin       (yychar = YYEMPTY)
1696 #define YYEMPTY         (-2)
1697 #define YYEOF           0
1698 
1699 #define YYACCEPT        goto yyacceptlab
1700 #define YYABORT         goto yyabortlab
1701 #define YYERROR         goto yyerrorlab
1702 
1703 
1704 #define YYRECOVERING()  (!!yyerrstatus)
1705 
1706 #define YYBACKUP(Token, Value)                                  \
1707 do                                                              \
1708   if (yychar == YYEMPTY)                                        \
1709     {                                                           \
1710       yychar = (Token);                                         \
1711       yylval = (Value);                                         \
1712       YYPOPSTACK (yylen);                                       \
1713       yystate = *yyssp;                                         \
1714       goto yybackup;                                            \
1715     }                                                           \
1716   else                                                          \
1717     {                                                           \
1718       yyerror (YY_("syntax error: cannot back up")); \
1719       YYERROR;                                                  \
1720     }                                                           \
1721 while (0)
1722 
1723 /* Error token number */
1724 #define YYTERROR        1
1725 #define YYERRCODE       256
1726 
1727 
1728 
1729 /* Enable debugging if requested.  */
1730 #if YYDEBUG
1731 
1732 # ifndef YYFPRINTF
1733 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1734 #  define YYFPRINTF fprintf
1735 # endif
1736 
1737 # define YYDPRINTF(Args)                        \
1738 do {                                            \
1739   if (yydebug)                                  \
1740     YYFPRINTF Args;                             \
1741 } while (0)
1742 
1743 /* This macro is provided for backward compatibility. */
1744 #ifndef YY_LOCATION_PRINT
1745 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1746 #endif
1747 
1748 
1749 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1750 do {                                                                      \
1751   if (yydebug)                                                            \
1752     {                                                                     \
1753       YYFPRINTF (stderr, "%s ", Title);                                   \
1754       yy_symbol_print (stderr,                                            \
1755                   Type, Value); \
1756       YYFPRINTF (stderr, "\n");                                           \
1757     }                                                                     \
1758 } while (0)
1759 
1760 
1761 /*----------------------------------------.
1762 | Print this symbol's value on YYOUTPUT.  |
1763 `----------------------------------------*/
1764 
1765 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1766 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1767 {
1768   FILE *yyo = yyoutput;
1769   YYUSE (yyo);
1770   if (!yyvaluep)
1771     return;
1772 # ifdef YYPRINT
1773   if (yytype < YYNTOKENS)
1774     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1775 # endif
1776   YYUSE (yytype);
1777 }
1778 
1779 
1780 /*--------------------------------.
1781 | Print this symbol on YYOUTPUT.  |
1782 `--------------------------------*/
1783 
1784 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1785 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1786 {
1787   YYFPRINTF (yyoutput, "%s %s (",
1788              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1789 
1790   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1791   YYFPRINTF (yyoutput, ")");
1792 }
1793 
1794 /*------------------------------------------------------------------.
1795 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1796 | TOP (included).                                                   |
1797 `------------------------------------------------------------------*/
1798 
1799 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)1800 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1801 {
1802   YYFPRINTF (stderr, "Stack now");
1803   for (; yybottom <= yytop; yybottom++)
1804     {
1805       int yybot = *yybottom;
1806       YYFPRINTF (stderr, " %d", yybot);
1807     }
1808   YYFPRINTF (stderr, "\n");
1809 }
1810 
1811 # define YY_STACK_PRINT(Bottom, Top)                            \
1812 do {                                                            \
1813   if (yydebug)                                                  \
1814     yy_stack_print ((Bottom), (Top));                           \
1815 } while (0)
1816 
1817 
1818 /*------------------------------------------------.
1819 | Report that the YYRULE is going to be reduced.  |
1820 `------------------------------------------------*/
1821 
1822 static void
yy_reduce_print(yytype_int16 * yyssp,YYSTYPE * yyvsp,int yyrule)1823 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1824 {
1825   unsigned long int yylno = yyrline[yyrule];
1826   int yynrhs = yyr2[yyrule];
1827   int yyi;
1828   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1829              yyrule - 1, yylno);
1830   /* The symbols being reduced.  */
1831   for (yyi = 0; yyi < yynrhs; yyi++)
1832     {
1833       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1834       yy_symbol_print (stderr,
1835                        yystos[yyssp[yyi + 1 - yynrhs]],
1836                        &(yyvsp[(yyi + 1) - (yynrhs)])
1837                                               );
1838       YYFPRINTF (stderr, "\n");
1839     }
1840 }
1841 
1842 # define YY_REDUCE_PRINT(Rule)          \
1843 do {                                    \
1844   if (yydebug)                          \
1845     yy_reduce_print (yyssp, yyvsp, Rule); \
1846 } while (0)
1847 
1848 /* Nonzero means print parse trace.  It is left uninitialized so that
1849    multiple parsers can coexist.  */
1850 int yydebug;
1851 #else /* !YYDEBUG */
1852 # define YYDPRINTF(Args)
1853 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1854 # define YY_STACK_PRINT(Bottom, Top)
1855 # define YY_REDUCE_PRINT(Rule)
1856 #endif /* !YYDEBUG */
1857 
1858 
1859 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1860 #ifndef YYINITDEPTH
1861 # define YYINITDEPTH 200
1862 #endif
1863 
1864 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1865    if the built-in stack extension method is used).
1866 
1867    Do not make this value too large; the results are undefined if
1868    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1869    evaluated with infinite-precision integer arithmetic.  */
1870 
1871 #ifndef YYMAXDEPTH
1872 # define YYMAXDEPTH 10000
1873 #endif
1874 
1875 
1876 #if YYERROR_VERBOSE
1877 
1878 # ifndef yystrlen
1879 #  if defined __GLIBC__ && defined _STRING_H
1880 #   define yystrlen strlen
1881 #  else
1882 /* Return the length of YYSTR.  */
1883 static YYSIZE_T
yystrlen(const char * yystr)1884 yystrlen (const char *yystr)
1885 {
1886   YYSIZE_T yylen;
1887   for (yylen = 0; yystr[yylen]; yylen++)
1888     continue;
1889   return yylen;
1890 }
1891 #  endif
1892 # endif
1893 
1894 # ifndef yystpcpy
1895 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1896 #   define yystpcpy stpcpy
1897 #  else
1898 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1899    YYDEST.  */
1900 static char *
yystpcpy(char * yydest,const char * yysrc)1901 yystpcpy (char *yydest, const char *yysrc)
1902 {
1903   char *yyd = yydest;
1904   const char *yys = yysrc;
1905 
1906   while ((*yyd++ = *yys++) != '\0')
1907     continue;
1908 
1909   return yyd - 1;
1910 }
1911 #  endif
1912 # endif
1913 
1914 # ifndef yytnamerr
1915 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1916    quotes and backslashes, so that it's suitable for yyerror.  The
1917    heuristic is that double-quoting is unnecessary unless the string
1918    contains an apostrophe, a comma, or backslash (other than
1919    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1920    null, do not copy; instead, return the length of what the result
1921    would have been.  */
1922 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)1923 yytnamerr (char *yyres, const char *yystr)
1924 {
1925   if (*yystr == '"')
1926     {
1927       YYSIZE_T yyn = 0;
1928       char const *yyp = yystr;
1929 
1930       for (;;)
1931         switch (*++yyp)
1932           {
1933           case '\'':
1934           case ',':
1935             goto do_not_strip_quotes;
1936 
1937           case '\\':
1938             if (*++yyp != '\\')
1939               goto do_not_strip_quotes;
1940             /* Fall through.  */
1941           default:
1942             if (yyres)
1943               yyres[yyn] = *yyp;
1944             yyn++;
1945             break;
1946 
1947           case '"':
1948             if (yyres)
1949               yyres[yyn] = '\0';
1950             return yyn;
1951           }
1952     do_not_strip_quotes: ;
1953     }
1954 
1955   if (! yyres)
1956     return yystrlen (yystr);
1957 
1958   return yystpcpy (yyres, yystr) - yyres;
1959 }
1960 # endif
1961 
1962 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1963    about the unexpected token YYTOKEN for the state stack whose top is
1964    YYSSP.
1965 
1966    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1967    not large enough to hold the message.  In that case, also set
1968    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1969    required number of bytes is too large to store.  */
1970 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)1971 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1972                 yytype_int16 *yyssp, int yytoken)
1973 {
1974   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1975   YYSIZE_T yysize = yysize0;
1976   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1977   /* Internationalized format string. */
1978   const char *yyformat = YY_NULLPTR;
1979   /* Arguments of yyformat. */
1980   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1981   /* Number of reported tokens (one for the "unexpected", one per
1982      "expected"). */
1983   int yycount = 0;
1984 
1985   /* There are many possibilities here to consider:
1986      - If this state is a consistent state with a default action, then
1987        the only way this function was invoked is if the default action
1988        is an error action.  In that case, don't check for expected
1989        tokens because there are none.
1990      - The only way there can be no lookahead present (in yychar) is if
1991        this state is a consistent state with a default action.  Thus,
1992        detecting the absence of a lookahead is sufficient to determine
1993        that there is no unexpected or expected token to report.  In that
1994        case, just report a simple "syntax error".
1995      - Don't assume there isn't a lookahead just because this state is a
1996        consistent state with a default action.  There might have been a
1997        previous inconsistent state, consistent state with a non-default
1998        action, or user semantic action that manipulated yychar.
1999      - Of course, the expected token list depends on states to have
2000        correct lookahead information, and it depends on the parser not
2001        to perform extra reductions after fetching a lookahead from the
2002        scanner and before detecting a syntax error.  Thus, state merging
2003        (from LALR or IELR) and default reductions corrupt the expected
2004        token list.  However, the list is correct for canonical LR with
2005        one exception: it will still contain any token that will not be
2006        accepted due to an error action in a later state.
2007   */
2008   if (yytoken != YYEMPTY)
2009     {
2010       int yyn = yypact[*yyssp];
2011       yyarg[yycount++] = yytname[yytoken];
2012       if (!yypact_value_is_default (yyn))
2013         {
2014           /* Start YYX at -YYN if negative to avoid negative indexes in
2015              YYCHECK.  In other words, skip the first -YYN actions for
2016              this state because they are default actions.  */
2017           int yyxbegin = yyn < 0 ? -yyn : 0;
2018           /* Stay within bounds of both yycheck and yytname.  */
2019           int yychecklim = YYLAST - yyn + 1;
2020           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2021           int yyx;
2022 
2023           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2024             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
2025                 && !yytable_value_is_error (yytable[yyx + yyn]))
2026               {
2027                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2028                   {
2029                     yycount = 1;
2030                     yysize = yysize0;
2031                     break;
2032                   }
2033                 yyarg[yycount++] = yytname[yyx];
2034                 {
2035                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
2036                   if (! (yysize <= yysize1
2037                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2038                     return 2;
2039                   yysize = yysize1;
2040                 }
2041               }
2042         }
2043     }
2044 
2045   switch (yycount)
2046     {
2047 # define YYCASE_(N, S)                      \
2048       case N:                               \
2049         yyformat = S;                       \
2050       break
2051       YYCASE_(0, YY_("syntax error"));
2052       YYCASE_(1, YY_("syntax error, unexpected %s"));
2053       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2054       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2055       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2056       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2057 # undef YYCASE_
2058     }
2059 
2060   {
2061     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2062     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2063       return 2;
2064     yysize = yysize1;
2065   }
2066 
2067   if (*yymsg_alloc < yysize)
2068     {
2069       *yymsg_alloc = 2 * yysize;
2070       if (! (yysize <= *yymsg_alloc
2071              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2072         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2073       return 1;
2074     }
2075 
2076   /* Avoid sprintf, as that infringes on the user's name space.
2077      Don't have undefined behavior even if the translation
2078      produced a string with the wrong number of "%s"s.  */
2079   {
2080     char *yyp = *yymsg;
2081     int yyi = 0;
2082     while ((*yyp = *yyformat) != '\0')
2083       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2084         {
2085           yyp += yytnamerr (yyp, yyarg[yyi++]);
2086           yyformat += 2;
2087         }
2088       else
2089         {
2090           yyp++;
2091           yyformat++;
2092         }
2093   }
2094   return 0;
2095 }
2096 #endif /* YYERROR_VERBOSE */
2097 
2098 /*-----------------------------------------------.
2099 | Release the memory associated to this symbol.  |
2100 `-----------------------------------------------*/
2101 
2102 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)2103 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2104 {
2105   YYUSE (yyvaluep);
2106   if (!yymsg)
2107     yymsg = "Deleting";
2108   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2109 
2110   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2111   YYUSE (yytype);
2112   YY_IGNORE_MAYBE_UNINITIALIZED_END
2113 }
2114 
2115 
2116 
2117 
2118 /* The lookahead symbol.  */
2119 int yychar;
2120 
2121 /* The semantic value of the lookahead symbol.  */
2122 YYSTYPE yylval;
2123 /* Number of syntax errors so far.  */
2124 int yynerrs;
2125 
2126 
2127 /*----------.
2128 | yyparse.  |
2129 `----------*/
2130 
2131 int
yyparse(void)2132 yyparse (void)
2133 {
2134     int yystate;
2135     /* Number of tokens to shift before error messages enabled.  */
2136     int yyerrstatus;
2137 
2138     /* The stacks and their tools:
2139        'yyss': related to states.
2140        'yyvs': related to semantic values.
2141 
2142        Refer to the stacks through separate pointers, to allow yyoverflow
2143        to reallocate them elsewhere.  */
2144 
2145     /* The state stack.  */
2146     yytype_int16 yyssa[YYINITDEPTH];
2147     yytype_int16 *yyss;
2148     yytype_int16 *yyssp;
2149 
2150     /* The semantic value stack.  */
2151     YYSTYPE yyvsa[YYINITDEPTH];
2152     YYSTYPE *yyvs;
2153     YYSTYPE *yyvsp;
2154 
2155     YYSIZE_T yystacksize;
2156 
2157   int yyn;
2158   int yyresult;
2159   /* Lookahead token as an internal (translated) token number.  */
2160   int yytoken = 0;
2161   /* The variables used to return semantic value and location from the
2162      action routines.  */
2163   YYSTYPE yyval;
2164 
2165 #if YYERROR_VERBOSE
2166   /* Buffer for error messages, and its allocated size.  */
2167   char yymsgbuf[128];
2168   char *yymsg = yymsgbuf;
2169   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2170 #endif
2171 
2172 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
2173 
2174   /* The number of symbols on the RHS of the reduced rule.
2175      Keep to zero when no symbol should be popped.  */
2176   int yylen = 0;
2177 
2178   yyssp = yyss = yyssa;
2179   yyvsp = yyvs = yyvsa;
2180   yystacksize = YYINITDEPTH;
2181 
2182   YYDPRINTF ((stderr, "Starting parse\n"));
2183 
2184   yystate = 0;
2185   yyerrstatus = 0;
2186   yynerrs = 0;
2187   yychar = YYEMPTY; /* Cause a token to be read.  */
2188   goto yysetstate;
2189 
2190 /*------------------------------------------------------------.
2191 | yynewstate -- Push a new state, which is found in yystate.  |
2192 `------------------------------------------------------------*/
2193  yynewstate:
2194   /* In all cases, when you get here, the value and location stacks
2195      have just been pushed.  So pushing a state here evens the stacks.  */
2196   yyssp++;
2197 
2198  yysetstate:
2199   *yyssp = yystate;
2200 
2201   if (yyss + yystacksize - 1 <= yyssp)
2202     {
2203       /* Get the current used size of the three stacks, in elements.  */
2204       YYSIZE_T yysize = yyssp - yyss + 1;
2205 
2206 #ifdef yyoverflow
2207       {
2208         /* Give user a chance to reallocate the stack.  Use copies of
2209            these so that the &'s don't force the real ones into
2210            memory.  */
2211         YYSTYPE *yyvs1 = yyvs;
2212         yytype_int16 *yyss1 = yyss;
2213 
2214         /* Each stack pointer address is followed by the size of the
2215            data in use in that stack, in bytes.  This used to be a
2216            conditional around just the two extra args, but that might
2217            be undefined if yyoverflow is a macro.  */
2218         yyoverflow (YY_("memory exhausted"),
2219                     &yyss1, yysize * sizeof (*yyssp),
2220                     &yyvs1, yysize * sizeof (*yyvsp),
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_alloc, yyss);
2244         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2245 #  undef YYSTACK_RELOCATE
2246         if (yyss1 != yyssa)
2247           YYSTACK_FREE (yyss1);
2248       }
2249 # endif
2250 #endif /* no yyoverflow */
2251 
2252       yyssp = yyss + yysize - 1;
2253       yyvsp = yyvs + yysize - 1;
2254 
2255       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2256                   (unsigned long int) yystacksize));
2257 
2258       if (yyss + yystacksize - 1 <= yyssp)
2259         YYABORT;
2260     }
2261 
2262   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2263 
2264   if (yystate == YYFINAL)
2265     YYACCEPT;
2266 
2267   goto yybackup;
2268 
2269 /*-----------.
2270 | yybackup.  |
2271 `-----------*/
2272 yybackup:
2273 
2274   /* Do appropriate processing given the current state.  Read a
2275      lookahead token if we need one and don't already have one.  */
2276 
2277   /* First try to decide what to do without reference to lookahead token.  */
2278   yyn = yypact[yystate];
2279   if (yypact_value_is_default (yyn))
2280     goto yydefault;
2281 
2282   /* Not known => get a lookahead token if don't already have one.  */
2283 
2284   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
2285   if (yychar == YYEMPTY)
2286     {
2287       YYDPRINTF ((stderr, "Reading a token: "));
2288       yychar = yylex ();
2289     }
2290 
2291   if (yychar <= YYEOF)
2292     {
2293       yychar = yytoken = YYEOF;
2294       YYDPRINTF ((stderr, "Now at end of input.\n"));
2295     }
2296   else
2297     {
2298       yytoken = YYTRANSLATE (yychar);
2299       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2300     }
2301 
2302   /* If the proper action on seeing token YYTOKEN is to reduce or to
2303      detect an error, take that action.  */
2304   yyn += yytoken;
2305   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2306     goto yydefault;
2307   yyn = yytable[yyn];
2308   if (yyn <= 0)
2309     {
2310       if (yytable_value_is_error (yyn))
2311         goto yyerrlab;
2312       yyn = -yyn;
2313       goto yyreduce;
2314     }
2315 
2316   /* Count tokens shifted since error; after three, turn off error
2317      status.  */
2318   if (yyerrstatus)
2319     yyerrstatus--;
2320 
2321   /* Shift the lookahead token.  */
2322   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2323 
2324   /* Discard the shifted token.  */
2325   yychar = YYEMPTY;
2326 
2327   yystate = yyn;
2328   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2329   *++yyvsp = yylval;
2330   YY_IGNORE_MAYBE_UNINITIALIZED_END
2331 
2332   goto yynewstate;
2333 
2334 
2335 /*-----------------------------------------------------------.
2336 | yydefault -- do the default action for the current state.  |
2337 `-----------------------------------------------------------*/
2338 yydefault:
2339   yyn = yydefact[yystate];
2340   if (yyn == 0)
2341     goto yyerrlab;
2342   goto yyreduce;
2343 
2344 
2345 /*-----------------------------.
2346 | yyreduce -- Do a reduction.  |
2347 `-----------------------------*/
2348 yyreduce:
2349   /* yyn is the number of a rule to reduce with.  */
2350   yylen = yyr2[yyn];
2351 
2352   /* If YYLEN is nonzero, implement the default value of the action:
2353      '$$ = $1'.
2354 
2355      Otherwise, the following line sets YYVAL to garbage.
2356      This behavior is undocumented and Bison
2357      users should not rely upon it.  Assigning to YYVAL
2358      unconditionally makes the parser a bit smaller, and it avoids a
2359      GCC warning that YYVAL may be used uninitialized.  */
2360   yyval = yyvsp[1-yylen];
2361 
2362 
2363   YY_REDUCE_PRINT (yyn);
2364   switch (yyn)
2365     {
2366         case 2:
2367 #line 199 "mon_parse.y" /* yacc.c:1646  */
2368     { (yyval.i) = 0; }
2369 #line 2370 "mon_parse.c" /* yacc.c:1646  */
2370     break;
2371 
2372   case 3:
2373 #line 200 "mon_parse.y" /* yacc.c:1646  */
2374     { (yyval.i) = 0; }
2375 #line 2376 "mon_parse.c" /* yacc.c:1646  */
2376     break;
2377 
2378   case 4:
2379 #line 201 "mon_parse.y" /* yacc.c:1646  */
2380     { new_cmd = 1; asm_mode = 0;  (yyval.i) = 0; }
2381 #line 2382 "mon_parse.c" /* yacc.c:1646  */
2382     break;
2383 
2384   case 9:
2385 #line 210 "mon_parse.y" /* yacc.c:1646  */
2386     { return ERR_EXPECT_END_CMD; }
2387 #line 2388 "mon_parse.c" /* yacc.c:1646  */
2388     break;
2389 
2390   case 22:
2391 #line 225 "mon_parse.y" /* yacc.c:1646  */
2392     { return ERR_BAD_CMD; }
2393 #line 2394 "mon_parse.c" /* yacc.c:1646  */
2394     break;
2395 
2396   case 23:
2397 #line 229 "mon_parse.y" /* yacc.c:1646  */
2398     { mon_bank(e_default_space, NULL); }
2399 #line 2400 "mon_parse.c" /* yacc.c:1646  */
2400     break;
2401 
2402   case 24:
2403 #line 231 "mon_parse.y" /* yacc.c:1646  */
2404     { mon_bank((yyvsp[-1].i), NULL); }
2405 #line 2406 "mon_parse.c" /* yacc.c:1646  */
2406     break;
2407 
2408   case 25:
2409 #line 233 "mon_parse.y" /* yacc.c:1646  */
2410     { mon_bank(e_default_space, (yyvsp[-1].str)); }
2411 #line 2412 "mon_parse.c" /* yacc.c:1646  */
2412     break;
2413 
2414   case 26:
2415 #line 235 "mon_parse.y" /* yacc.c:1646  */
2416     { mon_bank((yyvsp[-3].i), (yyvsp[-1].str)); }
2417 #line 2418 "mon_parse.c" /* yacc.c:1646  */
2418     break;
2419 
2420   case 27:
2421 #line 237 "mon_parse.y" /* yacc.c:1646  */
2422     { mon_jump((yyvsp[-1].a)); }
2423 #line 2424 "mon_parse.c" /* yacc.c:1646  */
2424     break;
2425 
2426   case 28:
2427 #line 239 "mon_parse.y" /* yacc.c:1646  */
2428     { mon_go(); }
2429 #line 2430 "mon_parse.c" /* yacc.c:1646  */
2430     break;
2431 
2432   case 29:
2433 #line 241 "mon_parse.y" /* yacc.c:1646  */
2434     { mon_display_io_regs(0); }
2435 #line 2436 "mon_parse.c" /* yacc.c:1646  */
2436     break;
2437 
2438   case 30:
2439 #line 243 "mon_parse.y" /* yacc.c:1646  */
2440     { mon_display_io_regs((yyvsp[-1].a)); }
2441 #line 2442 "mon_parse.c" /* yacc.c:1646  */
2442     break;
2443 
2444   case 31:
2445 #line 245 "mon_parse.y" /* yacc.c:1646  */
2446     { monitor_cpu_type_set(""); }
2447 #line 2448 "mon_parse.c" /* yacc.c:1646  */
2448     break;
2449 
2450   case 32:
2451 #line 247 "mon_parse.y" /* yacc.c:1646  */
2452     { monitor_cpu_type_set((yyvsp[-1].str)); }
2453 #line 2454 "mon_parse.c" /* yacc.c:1646  */
2454     break;
2455 
2456   case 33:
2457 #line 249 "mon_parse.y" /* yacc.c:1646  */
2458     { mon_cpuhistory(-1); }
2459 #line 2460 "mon_parse.c" /* yacc.c:1646  */
2460     break;
2461 
2462   case 34:
2463 #line 251 "mon_parse.y" /* yacc.c:1646  */
2464     { mon_cpuhistory((yyvsp[-1].i)); }
2465 #line 2466 "mon_parse.c" /* yacc.c:1646  */
2466     break;
2467 
2468   case 35:
2469 #line 253 "mon_parse.y" /* yacc.c:1646  */
2470     { mon_instruction_return(); }
2471 #line 2472 "mon_parse.c" /* yacc.c:1646  */
2472     break;
2473 
2474   case 36:
2475 #line 255 "mon_parse.y" /* yacc.c:1646  */
2476     { machine_write_snapshot((yyvsp[-1].str),0,0,0); /* FIXME */ }
2477 #line 2478 "mon_parse.c" /* yacc.c:1646  */
2478     break;
2479 
2480   case 37:
2481 #line 257 "mon_parse.y" /* yacc.c:1646  */
2482     { machine_read_snapshot((yyvsp[-1].str), 0); }
2483 #line 2484 "mon_parse.c" /* yacc.c:1646  */
2484     break;
2485 
2486   case 38:
2487 #line 259 "mon_parse.y" /* yacc.c:1646  */
2488     { mon_instructions_step(-1); }
2489 #line 2490 "mon_parse.c" /* yacc.c:1646  */
2490     break;
2491 
2492   case 39:
2493 #line 261 "mon_parse.y" /* yacc.c:1646  */
2494     { mon_instructions_step((yyvsp[-1].i)); }
2495 #line 2496 "mon_parse.c" /* yacc.c:1646  */
2496     break;
2497 
2498   case 40:
2499 #line 263 "mon_parse.y" /* yacc.c:1646  */
2500     { mon_instructions_next(-1); }
2501 #line 2502 "mon_parse.c" /* yacc.c:1646  */
2502     break;
2503 
2504   case 41:
2505 #line 265 "mon_parse.y" /* yacc.c:1646  */
2506     { mon_instructions_next((yyvsp[-1].i)); }
2507 #line 2508 "mon_parse.c" /* yacc.c:1646  */
2508     break;
2509 
2510   case 42:
2511 #line 267 "mon_parse.y" /* yacc.c:1646  */
2512     { mon_stack_up(-1); }
2513 #line 2514 "mon_parse.c" /* yacc.c:1646  */
2514     break;
2515 
2516   case 43:
2517 #line 269 "mon_parse.y" /* yacc.c:1646  */
2518     { mon_stack_up((yyvsp[-1].i)); }
2519 #line 2520 "mon_parse.c" /* yacc.c:1646  */
2520     break;
2521 
2522   case 44:
2523 #line 271 "mon_parse.y" /* yacc.c:1646  */
2524     { mon_stack_down(-1); }
2525 #line 2526 "mon_parse.c" /* yacc.c:1646  */
2526     break;
2527 
2528   case 45:
2529 #line 273 "mon_parse.y" /* yacc.c:1646  */
2530     { mon_stack_down((yyvsp[-1].i)); }
2531 #line 2532 "mon_parse.c" /* yacc.c:1646  */
2532     break;
2533 
2534   case 46:
2535 #line 275 "mon_parse.y" /* yacc.c:1646  */
2536     { mon_display_screen(); }
2537 #line 2538 "mon_parse.c" /* yacc.c:1646  */
2538     break;
2539 
2540   case 48:
2541 #line 280 "mon_parse.y" /* yacc.c:1646  */
2542     { (monitor_cpu_for_memspace[default_memspace]->mon_register_print)(default_memspace); }
2543 #line 2544 "mon_parse.c" /* yacc.c:1646  */
2544     break;
2545 
2546   case 49:
2547 #line 282 "mon_parse.y" /* yacc.c:1646  */
2548     { (monitor_cpu_for_memspace[(yyvsp[-1].i)]->mon_register_print)((yyvsp[-1].i)); }
2549 #line 2550 "mon_parse.c" /* yacc.c:1646  */
2550     break;
2551 
2552   case 51:
2553 #line 287 "mon_parse.y" /* yacc.c:1646  */
2554     {
2555                         /* What about the memspace? */
2556                         mon_playback_init((yyvsp[-1].str));
2557                     }
2558 #line 2559 "mon_parse.c" /* yacc.c:1646  */
2559     break;
2560 
2561   case 52:
2562 #line 292 "mon_parse.y" /* yacc.c:1646  */
2563     {
2564                         /* What about the memspace? */
2565                         mon_playback_init((yyvsp[-1].str));
2566                     }
2567 #line 2568 "mon_parse.c" /* yacc.c:1646  */
2568     break;
2569 
2570   case 53:
2571 #line 297 "mon_parse.y" /* yacc.c:1646  */
2572     { mon_save_symbols((yyvsp[-3].i), (yyvsp[-1].str)); }
2573 #line 2574 "mon_parse.c" /* yacc.c:1646  */
2574     break;
2575 
2576   case 54:
2577 #line 299 "mon_parse.y" /* yacc.c:1646  */
2578     { mon_save_symbols(e_default_space, (yyvsp[-1].str)); }
2579 #line 2580 "mon_parse.c" /* yacc.c:1646  */
2580     break;
2581 
2582   case 55:
2583 #line 301 "mon_parse.y" /* yacc.c:1646  */
2584     { mon_add_name_to_symbol_table((yyvsp[-3].a), (yyvsp[-1].str)); }
2585 #line 2586 "mon_parse.c" /* yacc.c:1646  */
2586     break;
2587 
2588   case 56:
2589 #line 303 "mon_parse.y" /* yacc.c:1646  */
2590     { mon_remove_name_from_symbol_table(e_default_space, (yyvsp[-1].str)); }
2591 #line 2592 "mon_parse.c" /* yacc.c:1646  */
2592     break;
2593 
2594   case 57:
2595 #line 305 "mon_parse.y" /* yacc.c:1646  */
2596     { mon_remove_name_from_symbol_table((yyvsp[-3].i), (yyvsp[-1].str)); }
2597 #line 2598 "mon_parse.c" /* yacc.c:1646  */
2598     break;
2599 
2600   case 58:
2601 #line 307 "mon_parse.y" /* yacc.c:1646  */
2602     { mon_print_symbol_table((yyvsp[-1].i)); }
2603 #line 2604 "mon_parse.c" /* yacc.c:1646  */
2604     break;
2605 
2606   case 59:
2607 #line 309 "mon_parse.y" /* yacc.c:1646  */
2608     { mon_print_symbol_table(e_default_space); }
2609 #line 2610 "mon_parse.c" /* yacc.c:1646  */
2610     break;
2611 
2612   case 60:
2613 #line 311 "mon_parse.y" /* yacc.c:1646  */
2614     { mon_clear_symbol_table((yyvsp[-1].i)); }
2615 #line 2616 "mon_parse.c" /* yacc.c:1646  */
2616     break;
2617 
2618   case 61:
2619 #line 313 "mon_parse.y" /* yacc.c:1646  */
2620     { mon_clear_symbol_table(e_default_space); }
2621 #line 2622 "mon_parse.c" /* yacc.c:1646  */
2622     break;
2623 
2624   case 62:
2625 #line 315 "mon_parse.y" /* yacc.c:1646  */
2626     {
2627                         mon_add_name_to_symbol_table((yyvsp[-1].a), mon_prepend_dot_to_name((yyvsp[-3].str)));
2628                     }
2629 #line 2630 "mon_parse.c" /* yacc.c:1646  */
2630     break;
2631 
2632   case 63:
2633 #line 319 "mon_parse.y" /* yacc.c:1646  */
2634     {
2635                         mon_add_name_to_symbol_table((yyvsp[-2].a), mon_prepend_dot_to_name((yyvsp[-4].str)));
2636                     }
2637 #line 2638 "mon_parse.c" /* yacc.c:1646  */
2638     break;
2639 
2640   case 64:
2641 #line 325 "mon_parse.y" /* yacc.c:1646  */
2642     { mon_start_assemble_mode((yyvsp[0].a), NULL); }
2643 #line 2644 "mon_parse.c" /* yacc.c:1646  */
2644     break;
2645 
2646   case 65:
2647 #line 326 "mon_parse.y" /* yacc.c:1646  */
2648     { }
2649 #line 2650 "mon_parse.c" /* yacc.c:1646  */
2650     break;
2651 
2652   case 66:
2653 #line 328 "mon_parse.y" /* yacc.c:1646  */
2654     { mon_start_assemble_mode((yyvsp[-1].a), NULL); }
2655 #line 2656 "mon_parse.c" /* yacc.c:1646  */
2656     break;
2657 
2658   case 67:
2659 #line 330 "mon_parse.y" /* yacc.c:1646  */
2660     { mon_disassemble_lines((yyvsp[-1].range)[0], (yyvsp[-1].range)[1]); }
2661 #line 2662 "mon_parse.c" /* yacc.c:1646  */
2662     break;
2663 
2664   case 68:
2665 #line 332 "mon_parse.y" /* yacc.c:1646  */
2666     { mon_disassemble_lines(BAD_ADDR, BAD_ADDR); }
2667 #line 2668 "mon_parse.c" /* yacc.c:1646  */
2668     break;
2669 
2670   case 69:
2671 #line 336 "mon_parse.y" /* yacc.c:1646  */
2672     { mon_memory_move((yyvsp[-3].range)[0], (yyvsp[-3].range)[1], (yyvsp[-1].a)); }
2673 #line 2674 "mon_parse.c" /* yacc.c:1646  */
2674     break;
2675 
2676   case 70:
2677 #line 338 "mon_parse.y" /* yacc.c:1646  */
2678     { mon_memory_compare((yyvsp[-3].range)[0], (yyvsp[-3].range)[1], (yyvsp[-1].a)); }
2679 #line 2680 "mon_parse.c" /* yacc.c:1646  */
2680     break;
2681 
2682   case 71:
2683 #line 340 "mon_parse.y" /* yacc.c:1646  */
2684     { mon_memory_fill((yyvsp[-3].range)[0], (yyvsp[-3].range)[1],(unsigned char *)(yyvsp[-1].str)); }
2685 #line 2686 "mon_parse.c" /* yacc.c:1646  */
2686     break;
2687 
2688   case 72:
2689 #line 342 "mon_parse.y" /* yacc.c:1646  */
2690     { mon_memory_hunt((yyvsp[-3].range)[0], (yyvsp[-3].range)[1],(unsigned char *)(yyvsp[-1].str)); }
2691 #line 2692 "mon_parse.c" /* yacc.c:1646  */
2692     break;
2693 
2694   case 73:
2695 #line 344 "mon_parse.y" /* yacc.c:1646  */
2696     { mon_memory_display((yyvsp[-3].rt), (yyvsp[-1].range)[0], (yyvsp[-1].range)[1], DF_PETSCII); }
2697 #line 2698 "mon_parse.c" /* yacc.c:1646  */
2698     break;
2699 
2700   case 74:
2701 #line 346 "mon_parse.y" /* yacc.c:1646  */
2702     { mon_memory_display(default_radix, (yyvsp[-1].range)[0], (yyvsp[-1].range)[1], DF_PETSCII); }
2703 #line 2704 "mon_parse.c" /* yacc.c:1646  */
2704     break;
2705 
2706   case 75:
2707 #line 348 "mon_parse.y" /* yacc.c:1646  */
2708     { mon_memory_display(default_radix, BAD_ADDR, BAD_ADDR, DF_PETSCII); }
2709 #line 2710 "mon_parse.c" /* yacc.c:1646  */
2710     break;
2711 
2712   case 76:
2713 #line 350 "mon_parse.y" /* yacc.c:1646  */
2714     { mon_memory_display_data((yyvsp[-1].range)[0], (yyvsp[-1].range)[1], 8, 8); }
2715 #line 2716 "mon_parse.c" /* yacc.c:1646  */
2716     break;
2717 
2718   case 77:
2719 #line 352 "mon_parse.y" /* yacc.c:1646  */
2720     { mon_memory_display_data(BAD_ADDR, BAD_ADDR, 8, 8); }
2721 #line 2722 "mon_parse.c" /* yacc.c:1646  */
2722     break;
2723 
2724   case 78:
2725 #line 354 "mon_parse.y" /* yacc.c:1646  */
2726     { mon_memory_display_data((yyvsp[-1].range)[0], (yyvsp[-1].range)[1], 24, 21); }
2727 #line 2728 "mon_parse.c" /* yacc.c:1646  */
2728     break;
2729 
2730   case 79:
2731 #line 356 "mon_parse.y" /* yacc.c:1646  */
2732     { mon_memory_display_data(BAD_ADDR, BAD_ADDR, 24, 21); }
2733 #line 2734 "mon_parse.c" /* yacc.c:1646  */
2734     break;
2735 
2736   case 80:
2737 #line 358 "mon_parse.y" /* yacc.c:1646  */
2738     { mon_memory_display(0, (yyvsp[-1].range)[0], (yyvsp[-1].range)[1], DF_PETSCII); }
2739 #line 2740 "mon_parse.c" /* yacc.c:1646  */
2740     break;
2741 
2742   case 81:
2743 #line 360 "mon_parse.y" /* yacc.c:1646  */
2744     { mon_memory_display(0, BAD_ADDR, BAD_ADDR, DF_PETSCII); }
2745 #line 2746 "mon_parse.c" /* yacc.c:1646  */
2746     break;
2747 
2748   case 82:
2749 #line 362 "mon_parse.y" /* yacc.c:1646  */
2750     { mon_memory_display(0, (yyvsp[-1].range)[0], (yyvsp[-1].range)[1], DF_SCREEN_CODE); }
2751 #line 2752 "mon_parse.c" /* yacc.c:1646  */
2752     break;
2753 
2754   case 83:
2755 #line 364 "mon_parse.y" /* yacc.c:1646  */
2756     { mon_memory_display(0, BAD_ADDR, BAD_ADDR, DF_SCREEN_CODE); }
2757 #line 2758 "mon_parse.c" /* yacc.c:1646  */
2758     break;
2759 
2760   case 84:
2761 #line 366 "mon_parse.y" /* yacc.c:1646  */
2762     { mon_memmap_zap(); }
2763 #line 2764 "mon_parse.c" /* yacc.c:1646  */
2764     break;
2765 
2766   case 85:
2767 #line 368 "mon_parse.y" /* yacc.c:1646  */
2768     { mon_memmap_show(-1,BAD_ADDR,BAD_ADDR); }
2769 #line 2770 "mon_parse.c" /* yacc.c:1646  */
2770     break;
2771 
2772   case 86:
2773 #line 370 "mon_parse.y" /* yacc.c:1646  */
2774     { mon_memmap_show((yyvsp[-1].i),BAD_ADDR,BAD_ADDR); }
2775 #line 2776 "mon_parse.c" /* yacc.c:1646  */
2776     break;
2777 
2778   case 87:
2779 #line 372 "mon_parse.y" /* yacc.c:1646  */
2780     { mon_memmap_show((yyvsp[-2].i),(yyvsp[-1].range)[0],(yyvsp[-1].range)[1]); }
2781 #line 2782 "mon_parse.c" /* yacc.c:1646  */
2782     break;
2783 
2784   case 88:
2785 #line 374 "mon_parse.y" /* yacc.c:1646  */
2786     { mon_memmap_save((yyvsp[-3].str),(yyvsp[-1].i)); }
2787 #line 2788 "mon_parse.c" /* yacc.c:1646  */
2788     break;
2789 
2790   case 89:
2791 #line 378 "mon_parse.y" /* yacc.c:1646  */
2792     {
2793                       if ((yyvsp[-3].i)) {
2794                           temp = mon_breakpoint_add_checkpoint((yyvsp[-2].range)[0], (yyvsp[-2].range)[1], TRUE, (yyvsp[-3].i), FALSE);
2795                       } else {
2796                           temp = mon_breakpoint_add_checkpoint((yyvsp[-2].range)[0], (yyvsp[-2].range)[1], TRUE, e_exec, FALSE);
2797                       }
2798                       mon_breakpoint_set_checkpoint_condition(temp, (yyvsp[-1].cond_node));
2799                   }
2800 #line 2801 "mon_parse.c" /* yacc.c:1646  */
2801     break;
2802 
2803   case 90:
2804 #line 387 "mon_parse.y" /* yacc.c:1646  */
2805     { mon_breakpoint_print_checkpoints(); }
2806 #line 2807 "mon_parse.c" /* yacc.c:1646  */
2807     break;
2808 
2809   case 91:
2810 #line 390 "mon_parse.y" /* yacc.c:1646  */
2811     {
2812                       mon_breakpoint_add_checkpoint((yyvsp[-1].range)[0], (yyvsp[-1].range)[1], TRUE, e_exec, TRUE);
2813                   }
2814 #line 2815 "mon_parse.c" /* yacc.c:1646  */
2815     break;
2816 
2817   case 92:
2818 #line 394 "mon_parse.y" /* yacc.c:1646  */
2819     { mon_breakpoint_print_checkpoints(); }
2820 #line 2821 "mon_parse.c" /* yacc.c:1646  */
2821     break;
2822 
2823   case 93:
2824 #line 397 "mon_parse.y" /* yacc.c:1646  */
2825     {
2826                       if ((yyvsp[-3].i)) {
2827                           temp = mon_breakpoint_add_checkpoint((yyvsp[-2].range)[0], (yyvsp[-2].range)[1], TRUE, (yyvsp[-3].i), FALSE);
2828                       } else {
2829                           temp = mon_breakpoint_add_checkpoint((yyvsp[-2].range)[0], (yyvsp[-2].range)[1], TRUE, e_load | e_store, FALSE);
2830                       }
2831                       mon_breakpoint_set_checkpoint_condition(temp, (yyvsp[-1].cond_node));
2832                   }
2833 #line 2834 "mon_parse.c" /* yacc.c:1646  */
2834     break;
2835 
2836   case 94:
2837 #line 406 "mon_parse.y" /* yacc.c:1646  */
2838     { mon_breakpoint_print_checkpoints(); }
2839 #line 2840 "mon_parse.c" /* yacc.c:1646  */
2840     break;
2841 
2842   case 95:
2843 #line 409 "mon_parse.y" /* yacc.c:1646  */
2844     {
2845                       if ((yyvsp[-3].i)) {
2846                           temp = mon_breakpoint_add_checkpoint((yyvsp[-2].range)[0], (yyvsp[-2].range)[1], FALSE, (yyvsp[-3].i), FALSE);
2847                       } else {
2848                           temp = mon_breakpoint_add_checkpoint((yyvsp[-2].range)[0], (yyvsp[-2].range)[1], FALSE, e_load | e_store, FALSE);
2849                       }
2850                       mon_breakpoint_set_checkpoint_condition(temp, (yyvsp[-1].cond_node));
2851                   }
2852 #line 2853 "mon_parse.c" /* yacc.c:1646  */
2853     break;
2854 
2855   case 96:
2856 #line 418 "mon_parse.y" /* yacc.c:1646  */
2857     { mon_breakpoint_print_checkpoints(); }
2858 #line 2859 "mon_parse.c" /* yacc.c:1646  */
2859     break;
2860 
2861   case 97:
2862 #line 423 "mon_parse.y" /* yacc.c:1646  */
2863     { mon_breakpoint_switch_checkpoint(e_ON, (yyvsp[-1].i)); }
2864 #line 2865 "mon_parse.c" /* yacc.c:1646  */
2865     break;
2866 
2867   case 98:
2868 #line 425 "mon_parse.y" /* yacc.c:1646  */
2869     { mon_breakpoint_switch_checkpoint(e_ON, -1); }
2870 #line 2871 "mon_parse.c" /* yacc.c:1646  */
2871     break;
2872 
2873   case 99:
2874 #line 427 "mon_parse.y" /* yacc.c:1646  */
2875     { mon_breakpoint_switch_checkpoint(e_OFF, (yyvsp[-1].i)); }
2876 #line 2877 "mon_parse.c" /* yacc.c:1646  */
2877     break;
2878 
2879   case 100:
2880 #line 429 "mon_parse.y" /* yacc.c:1646  */
2881     { mon_breakpoint_switch_checkpoint(e_OFF, -1); }
2882 #line 2883 "mon_parse.c" /* yacc.c:1646  */
2883     break;
2884 
2885   case 101:
2886 #line 431 "mon_parse.y" /* yacc.c:1646  */
2887     { mon_breakpoint_set_ignore_count((yyvsp[-1].i), -1); }
2888 #line 2889 "mon_parse.c" /* yacc.c:1646  */
2889     break;
2890 
2891   case 102:
2892 #line 433 "mon_parse.y" /* yacc.c:1646  */
2893     { mon_breakpoint_set_ignore_count((yyvsp[-3].i), (yyvsp[-1].i)); }
2894 #line 2895 "mon_parse.c" /* yacc.c:1646  */
2895     break;
2896 
2897   case 103:
2898 #line 435 "mon_parse.y" /* yacc.c:1646  */
2899     { mon_breakpoint_delete_checkpoint((yyvsp[-1].i)); }
2900 #line 2901 "mon_parse.c" /* yacc.c:1646  */
2901     break;
2902 
2903   case 104:
2904 #line 437 "mon_parse.y" /* yacc.c:1646  */
2905     { mon_breakpoint_delete_checkpoint(-1); }
2906 #line 2907 "mon_parse.c" /* yacc.c:1646  */
2907     break;
2908 
2909   case 105:
2910 #line 439 "mon_parse.y" /* yacc.c:1646  */
2911     { mon_breakpoint_set_checkpoint_condition((yyvsp[-3].i), (yyvsp[-1].cond_node)); }
2912 #line 2913 "mon_parse.c" /* yacc.c:1646  */
2913     break;
2914 
2915   case 106:
2916 #line 441 "mon_parse.y" /* yacc.c:1646  */
2917     { mon_breakpoint_set_checkpoint_command((yyvsp[-3].i), (yyvsp[-1].str)); }
2918 #line 2919 "mon_parse.c" /* yacc.c:1646  */
2919     break;
2920 
2921   case 107:
2922 #line 443 "mon_parse.y" /* yacc.c:1646  */
2923     { return ERR_EXPECT_STRING; }
2924 #line 2925 "mon_parse.c" /* yacc.c:1646  */
2925     break;
2926 
2927   case 108:
2928 #line 447 "mon_parse.y" /* yacc.c:1646  */
2929     { sidefx = (((yyvsp[-1].action) == e_TOGGLE) ? (sidefx ^ 1) : (yyvsp[-1].action)); }
2930 #line 2931 "mon_parse.c" /* yacc.c:1646  */
2931     break;
2932 
2933   case 109:
2934 #line 449 "mon_parse.y" /* yacc.c:1646  */
2935     {
2936                          mon_out("I/O side effects are %s\n",
2937                                    sidefx ? "enabled" : "disabled");
2938                      }
2939 #line 2940 "mon_parse.c" /* yacc.c:1646  */
2940     break;
2941 
2942   case 110:
2943 #line 454 "mon_parse.y" /* yacc.c:1646  */
2944     { default_radix = (yyvsp[-1].rt); }
2945 #line 2946 "mon_parse.c" /* yacc.c:1646  */
2946     break;
2947 
2948   case 111:
2949 #line 456 "mon_parse.y" /* yacc.c:1646  */
2950     {
2951                          const char *p;
2952 
2953                          if (default_radix == e_hexadecimal)
2954                              p = "Hexadecimal";
2955                          else if (default_radix == e_decimal)
2956                              p = "Decimal";
2957                          else if (default_radix == e_octal)
2958                              p = "Octal";
2959                          else if (default_radix == e_binary)
2960                              p = "Binary";
2961                          else
2962                              p = "Unknown";
2963 
2964                          mon_out("Default radix is %s\n", p);
2965                      }
2966 #line 2967 "mon_parse.c" /* yacc.c:1646  */
2967     break;
2968 
2969   case 112:
2970 #line 474 "mon_parse.y" /* yacc.c:1646  */
2971     { monitor_change_device((yyvsp[-1].i)); }
2972 #line 2973 "mon_parse.c" /* yacc.c:1646  */
2973     break;
2974 
2975   case 113:
2976 #line 476 "mon_parse.y" /* yacc.c:1646  */
2977     { mon_export(); }
2978 #line 2979 "mon_parse.c" /* yacc.c:1646  */
2979     break;
2980 
2981   case 114:
2982 #line 478 "mon_parse.y" /* yacc.c:1646  */
2983     { mon_quit(); YYACCEPT; }
2984 #line 2985 "mon_parse.c" /* yacc.c:1646  */
2985     break;
2986 
2987   case 115:
2988 #line 480 "mon_parse.y" /* yacc.c:1646  */
2989     { mon_exit(); YYACCEPT; }
2990 #line 2991 "mon_parse.c" /* yacc.c:1646  */
2991     break;
2992 
2993   case 116:
2994 #line 482 "mon_parse.y" /* yacc.c:1646  */
2995     { mon_maincpu_toggle_trace((yyvsp[-1].action)); }
2996 #line 2997 "mon_parse.c" /* yacc.c:1646  */
2997     break;
2998 
2999   case 117:
3000 #line 486 "mon_parse.y" /* yacc.c:1646  */
3001     { mon_drive_execute_disk_cmd((yyvsp[-1].str)); }
3002 #line 3003 "mon_parse.c" /* yacc.c:1646  */
3003     break;
3004 
3005   case 118:
3006 #line 488 "mon_parse.y" /* yacc.c:1646  */
3007     { mon_out("\t%d\n",(yyvsp[-1].i)); }
3008 #line 3009 "mon_parse.c" /* yacc.c:1646  */
3009     break;
3010 
3011   case 119:
3012 #line 490 "mon_parse.y" /* yacc.c:1646  */
3013     { mon_command_print_help(NULL); }
3014 #line 3015 "mon_parse.c" /* yacc.c:1646  */
3015     break;
3016 
3017   case 120:
3018 #line 492 "mon_parse.y" /* yacc.c:1646  */
3019     { mon_command_print_help((yyvsp[-1].str)); }
3020 #line 3021 "mon_parse.c" /* yacc.c:1646  */
3021     break;
3022 
3023   case 121:
3024 #line 494 "mon_parse.y" /* yacc.c:1646  */
3025     { mon_print_convert((yyvsp[-1].i)); }
3026 #line 3027 "mon_parse.c" /* yacc.c:1646  */
3027     break;
3028 
3029   case 122:
3030 #line 496 "mon_parse.y" /* yacc.c:1646  */
3031     { mon_change_dir((yyvsp[-1].str)); }
3032 #line 3033 "mon_parse.c" /* yacc.c:1646  */
3033     break;
3034 
3035   case 123:
3036 #line 498 "mon_parse.y" /* yacc.c:1646  */
3037     { mon_keyboard_feed((yyvsp[-1].str)); }
3038 #line 3039 "mon_parse.c" /* yacc.c:1646  */
3039     break;
3040 
3041   case 124:
3042 #line 500 "mon_parse.y" /* yacc.c:1646  */
3043     { mon_backtrace(); }
3044 #line 3045 "mon_parse.c" /* yacc.c:1646  */
3045     break;
3046 
3047   case 125:
3048 #line 502 "mon_parse.y" /* yacc.c:1646  */
3049     { mon_show_dir((yyvsp[-1].str)); }
3050 #line 3051 "mon_parse.c" /* yacc.c:1646  */
3051     break;
3052 
3053   case 126:
3054 #line 504 "mon_parse.y" /* yacc.c:1646  */
3055     { mon_show_pwd(); }
3056 #line 3057 "mon_parse.c" /* yacc.c:1646  */
3057     break;
3058 
3059   case 127:
3060 #line 506 "mon_parse.y" /* yacc.c:1646  */
3061     { mon_screenshot_save((yyvsp[-1].str),-1); }
3062 #line 3063 "mon_parse.c" /* yacc.c:1646  */
3063     break;
3064 
3065   case 128:
3066 #line 508 "mon_parse.y" /* yacc.c:1646  */
3067     { mon_screenshot_save((yyvsp[-3].str),(yyvsp[-1].i)); }
3068 #line 3069 "mon_parse.c" /* yacc.c:1646  */
3069     break;
3070 
3071   case 129:
3072 #line 510 "mon_parse.y" /* yacc.c:1646  */
3073     { mon_resource_get((yyvsp[-1].str)); }
3074 #line 3075 "mon_parse.c" /* yacc.c:1646  */
3075     break;
3076 
3077   case 130:
3078 #line 512 "mon_parse.y" /* yacc.c:1646  */
3079     { mon_resource_set((yyvsp[-2].str),(yyvsp[-1].str)); }
3080 #line 3081 "mon_parse.c" /* yacc.c:1646  */
3081     break;
3082 
3083   case 131:
3084 #line 514 "mon_parse.y" /* yacc.c:1646  */
3085     { resources_load((yyvsp[-1].str)); }
3086 #line 3087 "mon_parse.c" /* yacc.c:1646  */
3087     break;
3088 
3089   case 132:
3090 #line 516 "mon_parse.y" /* yacc.c:1646  */
3091     { resources_save((yyvsp[-1].str)); }
3092 #line 3093 "mon_parse.c" /* yacc.c:1646  */
3093     break;
3094 
3095   case 133:
3096 #line 518 "mon_parse.y" /* yacc.c:1646  */
3097     { mon_reset_machine(-1); }
3098 #line 3099 "mon_parse.c" /* yacc.c:1646  */
3099     break;
3100 
3101   case 134:
3102 #line 520 "mon_parse.y" /* yacc.c:1646  */
3103     { mon_reset_machine((yyvsp[-1].i)); }
3104 #line 3105 "mon_parse.c" /* yacc.c:1646  */
3105     break;
3106 
3107   case 135:
3108 #line 522 "mon_parse.y" /* yacc.c:1646  */
3109     { mon_tape_ctrl((yyvsp[-1].i)); }
3110 #line 3111 "mon_parse.c" /* yacc.c:1646  */
3111     break;
3112 
3113   case 136:
3114 #line 524 "mon_parse.y" /* yacc.c:1646  */
3115     { mon_cart_freeze(); }
3116 #line 3117 "mon_parse.c" /* yacc.c:1646  */
3117     break;
3118 
3119   case 137:
3120 #line 526 "mon_parse.y" /* yacc.c:1646  */
3121     { }
3122 #line 3123 "mon_parse.c" /* yacc.c:1646  */
3123     break;
3124 
3125   case 138:
3126 #line 528 "mon_parse.y" /* yacc.c:1646  */
3127     { mon_stopwatch_reset(); }
3128 #line 3129 "mon_parse.c" /* yacc.c:1646  */
3129     break;
3130 
3131   case 139:
3132 #line 530 "mon_parse.y" /* yacc.c:1646  */
3133     { mon_stopwatch_show("Stopwatch: ", "\n"); }
3134 #line 3135 "mon_parse.c" /* yacc.c:1646  */
3135     break;
3136 
3137   case 140:
3138 #line 534 "mon_parse.y" /* yacc.c:1646  */
3139     { mon_file_load((yyvsp[-3].str), (yyvsp[-2].i), (yyvsp[-1].a), FALSE); }
3140 #line 3141 "mon_parse.c" /* yacc.c:1646  */
3141     break;
3142 
3143   case 141:
3144 #line 536 "mon_parse.y" /* yacc.c:1646  */
3145     { mon_file_load((yyvsp[-3].str), (yyvsp[-2].i), (yyvsp[-1].a), TRUE); }
3146 #line 3147 "mon_parse.c" /* yacc.c:1646  */
3147     break;
3148 
3149   case 142:
3150 #line 538 "mon_parse.y" /* yacc.c:1646  */
3151     { mon_file_save((yyvsp[-3].str), (yyvsp[-2].i), (yyvsp[-1].range)[0], (yyvsp[-1].range)[1], FALSE); }
3152 #line 3153 "mon_parse.c" /* yacc.c:1646  */
3153     break;
3154 
3155   case 143:
3156 #line 540 "mon_parse.y" /* yacc.c:1646  */
3157     { return ERR_EXPECT_DEVICE_NUM; }
3158 #line 3159 "mon_parse.c" /* yacc.c:1646  */
3159     break;
3160 
3161   case 144:
3162 #line 542 "mon_parse.y" /* yacc.c:1646  */
3163     { return ERR_EXPECT_ADDRESS; }
3164 #line 3165 "mon_parse.c" /* yacc.c:1646  */
3165     break;
3166 
3167   case 145:
3168 #line 544 "mon_parse.y" /* yacc.c:1646  */
3169     { mon_file_save((yyvsp[-3].str), (yyvsp[-2].i), (yyvsp[-1].range)[0], (yyvsp[-1].range)[1], TRUE); }
3170 #line 3171 "mon_parse.c" /* yacc.c:1646  */
3171     break;
3172 
3173   case 146:
3174 #line 546 "mon_parse.y" /* yacc.c:1646  */
3175     { return ERR_EXPECT_ADDRESS; }
3176 #line 3177 "mon_parse.c" /* yacc.c:1646  */
3177     break;
3178 
3179   case 147:
3180 #line 548 "mon_parse.y" /* yacc.c:1646  */
3181     { mon_file_verify((yyvsp[-3].str),(yyvsp[-2].i),(yyvsp[-1].a)); }
3182 #line 3183 "mon_parse.c" /* yacc.c:1646  */
3183     break;
3184 
3185   case 148:
3186 #line 550 "mon_parse.y" /* yacc.c:1646  */
3187     { return ERR_EXPECT_ADDRESS; }
3188 #line 3189 "mon_parse.c" /* yacc.c:1646  */
3189     break;
3190 
3191   case 149:
3192 #line 552 "mon_parse.y" /* yacc.c:1646  */
3193     { mon_drive_block_cmd(0,(yyvsp[-3].i),(yyvsp[-2].i),(yyvsp[-1].a)); }
3194 #line 3195 "mon_parse.c" /* yacc.c:1646  */
3195     break;
3196 
3197   case 150:
3198 #line 554 "mon_parse.y" /* yacc.c:1646  */
3199     { mon_drive_block_cmd(1,(yyvsp[-3].i),(yyvsp[-2].i),(yyvsp[-1].a)); }
3200 #line 3201 "mon_parse.c" /* yacc.c:1646  */
3201     break;
3202 
3203   case 151:
3204 #line 556 "mon_parse.y" /* yacc.c:1646  */
3205     { mon_drive_list(-1); }
3206 #line 3207 "mon_parse.c" /* yacc.c:1646  */
3207     break;
3208 
3209   case 152:
3210 #line 558 "mon_parse.y" /* yacc.c:1646  */
3211     { mon_drive_list((yyvsp[-1].i)); }
3212 #line 3213 "mon_parse.c" /* yacc.c:1646  */
3213     break;
3214 
3215   case 153:
3216 #line 560 "mon_parse.y" /* yacc.c:1646  */
3217     { mon_attach((yyvsp[-2].str),(yyvsp[-1].i)); }
3218 #line 3219 "mon_parse.c" /* yacc.c:1646  */
3219     break;
3220 
3221   case 154:
3222 #line 562 "mon_parse.y" /* yacc.c:1646  */
3223     { mon_detach((yyvsp[-1].i)); }
3224 #line 3225 "mon_parse.c" /* yacc.c:1646  */
3225     break;
3226 
3227   case 155:
3228 #line 564 "mon_parse.y" /* yacc.c:1646  */
3229     { mon_autostart((yyvsp[-1].str),0,1); }
3230 #line 3231 "mon_parse.c" /* yacc.c:1646  */
3231     break;
3232 
3233   case 156:
3234 #line 566 "mon_parse.y" /* yacc.c:1646  */
3235     { mon_autostart((yyvsp[-3].str),(yyvsp[-1].i),1); }
3236 #line 3237 "mon_parse.c" /* yacc.c:1646  */
3237     break;
3238 
3239   case 157:
3240 #line 568 "mon_parse.y" /* yacc.c:1646  */
3241     { mon_autostart((yyvsp[-1].str),0,0); }
3242 #line 3243 "mon_parse.c" /* yacc.c:1646  */
3243     break;
3244 
3245   case 158:
3246 #line 570 "mon_parse.y" /* yacc.c:1646  */
3247     { mon_autostart((yyvsp[-3].str),(yyvsp[-1].i),0); }
3248 #line 3249 "mon_parse.c" /* yacc.c:1646  */
3249     break;
3250 
3251   case 159:
3252 #line 574 "mon_parse.y" /* yacc.c:1646  */
3253     { mon_record_commands((yyvsp[-1].str)); }
3254 #line 3255 "mon_parse.c" /* yacc.c:1646  */
3255     break;
3256 
3257   case 160:
3258 #line 576 "mon_parse.y" /* yacc.c:1646  */
3259     { mon_end_recording(); }
3260 #line 3261 "mon_parse.c" /* yacc.c:1646  */
3261     break;
3262 
3263   case 161:
3264 #line 578 "mon_parse.y" /* yacc.c:1646  */
3265     { mon_playback_init((yyvsp[-1].str)); }
3266 #line 3267 "mon_parse.c" /* yacc.c:1646  */
3267     break;
3268 
3269   case 162:
3270 #line 582 "mon_parse.y" /* yacc.c:1646  */
3271     { mon_memory_fill((yyvsp[-2].a), BAD_ADDR, (unsigned char *)(yyvsp[-1].str)); }
3272 #line 3273 "mon_parse.c" /* yacc.c:1646  */
3273     break;
3274 
3275   case 163:
3276 #line 584 "mon_parse.y" /* yacc.c:1646  */
3277     { printf("Not yet.\n"); }
3278 #line 3279 "mon_parse.c" /* yacc.c:1646  */
3279     break;
3280 
3281   case 164:
3282 #line 588 "mon_parse.y" /* yacc.c:1646  */
3283     { yydebug = 1; }
3284 #line 3285 "mon_parse.c" /* yacc.c:1646  */
3285     break;
3286 
3287   case 165:
3288 #line 591 "mon_parse.y" /* yacc.c:1646  */
3289     { (yyval.str) = (yyvsp[0].str); }
3290 #line 3291 "mon_parse.c" /* yacc.c:1646  */
3291     break;
3292 
3293   case 166:
3294 #line 594 "mon_parse.y" /* yacc.c:1646  */
3295     { (yyval.str) = (yyvsp[0].str); }
3296 #line 3297 "mon_parse.c" /* yacc.c:1646  */
3297     break;
3298 
3299   case 167:
3300 #line 595 "mon_parse.y" /* yacc.c:1646  */
3301     { (yyval.str) = NULL; }
3302 #line 3303 "mon_parse.c" /* yacc.c:1646  */
3303     break;
3304 
3305   case 169:
3306 #line 599 "mon_parse.y" /* yacc.c:1646  */
3307     { return ERR_EXPECT_FILENAME; }
3308 #line 3309 "mon_parse.c" /* yacc.c:1646  */
3309     break;
3310 
3311   case 171:
3312 #line 603 "mon_parse.y" /* yacc.c:1646  */
3313     { return ERR_EXPECT_DEVICE_NUM; }
3314 #line 3315 "mon_parse.c" /* yacc.c:1646  */
3315     break;
3316 
3317   case 172:
3318 #line 606 "mon_parse.y" /* yacc.c:1646  */
3319     { (yyval.i) = (yyvsp[-1].i) | (yyvsp[0].i); }
3320 #line 3321 "mon_parse.c" /* yacc.c:1646  */
3321     break;
3322 
3323   case 173:
3324 #line 607 "mon_parse.y" /* yacc.c:1646  */
3325     { (yyval.i) = (yyvsp[0].i); }
3326 #line 3327 "mon_parse.c" /* yacc.c:1646  */
3327     break;
3328 
3329   case 174:
3330 #line 610 "mon_parse.y" /* yacc.c:1646  */
3331     { (yyval.i) = (yyvsp[0].i); }
3332 #line 3333 "mon_parse.c" /* yacc.c:1646  */
3333     break;
3334 
3335   case 175:
3336 #line 611 "mon_parse.y" /* yacc.c:1646  */
3337     { (yyval.i) = 0; }
3338 #line 3339 "mon_parse.c" /* yacc.c:1646  */
3339     break;
3340 
3341   case 176:
3342 #line 614 "mon_parse.y" /* yacc.c:1646  */
3343     {
3344                                     if (!mon_register_valid(default_memspace, (yyvsp[0].reg))) {
3345                                         return ERR_INVALID_REGISTER;
3346                                     }
3347                                     (yyval.i) = new_reg(default_memspace, (yyvsp[0].reg));
3348                                 }
3349 #line 3350 "mon_parse.c" /* yacc.c:1646  */
3350     break;
3351 
3352   case 177:
3353 #line 620 "mon_parse.y" /* yacc.c:1646  */
3354     {
3355                                     if (!mon_register_valid((yyvsp[-1].i), (yyvsp[0].reg))) {
3356                                         return ERR_INVALID_REGISTER;
3357                                     }
3358                                     (yyval.i) = new_reg((yyvsp[-1].i), (yyvsp[0].reg));
3359                                 }
3360 #line 3361 "mon_parse.c" /* yacc.c:1646  */
3361     break;
3362 
3363   case 180:
3364 #line 633 "mon_parse.y" /* yacc.c:1646  */
3365     { (monitor_cpu_for_memspace[reg_memspace((yyvsp[-2].i))]->mon_register_set_val)(reg_memspace((yyvsp[-2].i)), reg_regid((yyvsp[-2].i)), (uint16_t) (yyvsp[0].i)); }
3366 #line 3367 "mon_parse.c" /* yacc.c:1646  */
3367     break;
3368 
3369   case 181:
3370 #line 636 "mon_parse.y" /* yacc.c:1646  */
3371     { (yyval.i) = (yyvsp[0].i); }
3372 #line 3373 "mon_parse.c" /* yacc.c:1646  */
3373     break;
3374 
3375   case 182:
3376 #line 637 "mon_parse.y" /* yacc.c:1646  */
3377     { return ERR_EXPECT_CHECKNUM; }
3378 #line 3379 "mon_parse.c" /* yacc.c:1646  */
3379     break;
3380 
3381   case 184:
3382 #line 641 "mon_parse.y" /* yacc.c:1646  */
3383     { (yyval.range)[0] = (yyvsp[0].a); (yyval.range)[1] = BAD_ADDR; }
3384 #line 3385 "mon_parse.c" /* yacc.c:1646  */
3385     break;
3386 
3387   case 185:
3388 #line 644 "mon_parse.y" /* yacc.c:1646  */
3389     { (yyval.range)[0] = (yyvsp[-2].a); (yyval.range)[1] = (yyvsp[0].a); }
3390 #line 3391 "mon_parse.c" /* yacc.c:1646  */
3391     break;
3392 
3393   case 186:
3394 #line 646 "mon_parse.y" /* yacc.c:1646  */
3395     { if (resolve_range(e_default_space, (yyval.range), (yyvsp[0].str))) return ERR_ADDR_TOO_BIG; }
3396 #line 3397 "mon_parse.c" /* yacc.c:1646  */
3397     break;
3398 
3399   case 187:
3400 #line 648 "mon_parse.y" /* yacc.c:1646  */
3401     { if (resolve_range((yyvsp[-2].i), (yyval.range), (yyvsp[0].str))) return ERR_ADDR_TOO_BIG; }
3402 #line 3403 "mon_parse.c" /* yacc.c:1646  */
3403     break;
3404 
3405   case 188:
3406 #line 651 "mon_parse.y" /* yacc.c:1646  */
3407     { (yyval.a) = (yyvsp[0].a); }
3408 #line 3409 "mon_parse.c" /* yacc.c:1646  */
3409     break;
3410 
3411   case 189:
3412 #line 652 "mon_parse.y" /* yacc.c:1646  */
3413     { (yyval.a) = BAD_ADDR; }
3414 #line 3415 "mon_parse.c" /* yacc.c:1646  */
3415     break;
3416 
3417   case 190:
3418 #line 656 "mon_parse.y" /* yacc.c:1646  */
3419     {
3420              (yyval.a) = new_addr(e_default_space,(yyvsp[0].i));
3421              if (opt_asm) new_cmd = asm_mode = 1;
3422          }
3423 #line 3424 "mon_parse.c" /* yacc.c:1646  */
3424     break;
3425 
3426   case 191:
3427 #line 661 "mon_parse.y" /* yacc.c:1646  */
3428     {
3429              (yyval.a) = new_addr((yyvsp[-2].i), (yyvsp[0].i));
3430              if (opt_asm) new_cmd = asm_mode = 1;
3431          }
3432 #line 3433 "mon_parse.c" /* yacc.c:1646  */
3433     break;
3434 
3435   case 192:
3436 #line 666 "mon_parse.y" /* yacc.c:1646  */
3437     {
3438              temp = mon_symbol_table_lookup_addr(e_default_space, (yyvsp[0].str));
3439              if (temp >= 0)
3440                  (yyval.a) = new_addr(e_default_space, temp);
3441              else
3442                  return ERR_UNDEFINED_LABEL;
3443          }
3444 #line 3445 "mon_parse.c" /* yacc.c:1646  */
3445     break;
3446 
3447   case 195:
3448 #line 679 "mon_parse.y" /* yacc.c:1646  */
3449     { (yyval.i) = e_comp_space; }
3450 #line 3451 "mon_parse.c" /* yacc.c:1646  */
3451     break;
3452 
3453   case 196:
3454 #line 680 "mon_parse.y" /* yacc.c:1646  */
3455     { (yyval.i) = e_disk8_space; }
3456 #line 3457 "mon_parse.c" /* yacc.c:1646  */
3457     break;
3458 
3459   case 197:
3460 #line 681 "mon_parse.y" /* yacc.c:1646  */
3461     { (yyval.i) = e_disk9_space; }
3462 #line 3463 "mon_parse.c" /* yacc.c:1646  */
3463     break;
3464 
3465   case 198:
3466 #line 682 "mon_parse.y" /* yacc.c:1646  */
3467     { (yyval.i) = e_disk10_space; }
3468 #line 3469 "mon_parse.c" /* yacc.c:1646  */
3469     break;
3470 
3471   case 199:
3472 #line 683 "mon_parse.y" /* yacc.c:1646  */
3473     { (yyval.i) = e_disk11_space; }
3474 #line 3475 "mon_parse.c" /* yacc.c:1646  */
3475     break;
3476 
3477   case 200:
3478 #line 686 "mon_parse.y" /* yacc.c:1646  */
3479     { (yyval.i) = (yyvsp[0].i); if (!CHECK_ADDR((yyvsp[0].i))) return ERR_ADDR_TOO_BIG; }
3480 #line 3481 "mon_parse.c" /* yacc.c:1646  */
3481     break;
3482 
3483   case 201:
3484 #line 688 "mon_parse.y" /* yacc.c:1646  */
3485     { (yyval.i) = (yyvsp[0].i); }
3486 #line 3487 "mon_parse.c" /* yacc.c:1646  */
3487     break;
3488 
3489   case 202:
3490 #line 690 "mon_parse.y" /* yacc.c:1646  */
3491     { (yyval.i) = (yyvsp[-2].i) + (yyvsp[0].i); }
3492 #line 3493 "mon_parse.c" /* yacc.c:1646  */
3493     break;
3494 
3495   case 203:
3496 #line 691 "mon_parse.y" /* yacc.c:1646  */
3497     { (yyval.i) = (yyvsp[-2].i) - (yyvsp[0].i); }
3498 #line 3499 "mon_parse.c" /* yacc.c:1646  */
3499     break;
3500 
3501   case 204:
3502 #line 692 "mon_parse.y" /* yacc.c:1646  */
3503     { (yyval.i) = (yyvsp[-2].i) * (yyvsp[0].i); }
3504 #line 3505 "mon_parse.c" /* yacc.c:1646  */
3505     break;
3506 
3507   case 205:
3508 #line 693 "mon_parse.y" /* yacc.c:1646  */
3509     { (yyval.i) = ((yyvsp[0].i)) ? ((yyvsp[-2].i) / (yyvsp[0].i)) : 1; }
3510 #line 3511 "mon_parse.c" /* yacc.c:1646  */
3511     break;
3512 
3513   case 206:
3514 #line 694 "mon_parse.y" /* yacc.c:1646  */
3515     { (yyval.i) = (yyvsp[-1].i); }
3516 #line 3517 "mon_parse.c" /* yacc.c:1646  */
3517     break;
3518 
3519   case 207:
3520 #line 695 "mon_parse.y" /* yacc.c:1646  */
3521     { return ERR_MISSING_CLOSE_PAREN; }
3522 #line 3523 "mon_parse.c" /* yacc.c:1646  */
3523     break;
3524 
3525   case 208:
3526 #line 696 "mon_parse.y" /* yacc.c:1646  */
3527     { (yyval.i) = (yyvsp[0].i); }
3528 #line 3529 "mon_parse.c" /* yacc.c:1646  */
3529     break;
3530 
3531   case 209:
3532 #line 699 "mon_parse.y" /* yacc.c:1646  */
3533     { (yyval.cond_node) = (yyvsp[0].cond_node); }
3534 #line 3535 "mon_parse.c" /* yacc.c:1646  */
3535     break;
3536 
3537   case 210:
3538 #line 700 "mon_parse.y" /* yacc.c:1646  */
3539     { (yyval.cond_node) = 0; }
3540 #line 3541 "mon_parse.c" /* yacc.c:1646  */
3541     break;
3542 
3543   case 211:
3544 #line 703 "mon_parse.y" /* yacc.c:1646  */
3545     {
3546                (yyval.cond_node) = new_cond; (yyval.cond_node)->is_parenthized = FALSE;
3547                (yyval.cond_node)->child1 = (yyvsp[-2].cond_node); (yyval.cond_node)->child2 = (yyvsp[0].cond_node); (yyval.cond_node)->operation = (yyvsp[-1].cond_op);
3548            }
3549 #line 3550 "mon_parse.c" /* yacc.c:1646  */
3550     break;
3551 
3552   case 212:
3553 #line 708 "mon_parse.y" /* yacc.c:1646  */
3554     { return ERR_INCOMPLETE_COMPARE_OP; }
3555 #line 3556 "mon_parse.c" /* yacc.c:1646  */
3556     break;
3557 
3558   case 213:
3559 #line 710 "mon_parse.y" /* yacc.c:1646  */
3560     { (yyval.cond_node) = (yyvsp[-1].cond_node); (yyval.cond_node)->is_parenthized = TRUE; }
3561 #line 3562 "mon_parse.c" /* yacc.c:1646  */
3562     break;
3563 
3564   case 214:
3565 #line 712 "mon_parse.y" /* yacc.c:1646  */
3566     { return ERR_MISSING_CLOSE_PAREN; }
3567 #line 3568 "mon_parse.c" /* yacc.c:1646  */
3568     break;
3569 
3570   case 215:
3571 #line 714 "mon_parse.y" /* yacc.c:1646  */
3572     { (yyval.cond_node) = (yyvsp[0].cond_node); }
3573 #line 3574 "mon_parse.c" /* yacc.c:1646  */
3574     break;
3575 
3576   case 216:
3577 #line 717 "mon_parse.y" /* yacc.c:1646  */
3578     { (yyval.cond_node) = new_cond;
3579                             (yyval.cond_node)->operation = e_INV;
3580                             (yyval.cond_node)->is_parenthized = FALSE;
3581                             (yyval.cond_node)->reg_num = (yyvsp[0].i); (yyval.cond_node)->is_reg = TRUE; (yyval.cond_node)->banknum=-1;
3582                             (yyval.cond_node)->child1 = NULL; (yyval.cond_node)->child2 = NULL;
3583                           }
3584 #line 3585 "mon_parse.c" /* yacc.c:1646  */
3585     break;
3586 
3587   case 217:
3588 #line 723 "mon_parse.y" /* yacc.c:1646  */
3589     { (yyval.cond_node) = new_cond;
3590                             (yyval.cond_node)->operation = e_INV;
3591                             (yyval.cond_node)->is_parenthized = FALSE;
3592                             (yyval.cond_node)->value = (yyvsp[0].i); (yyval.cond_node)->is_reg = FALSE; (yyval.cond_node)->banknum=-1;
3593                             (yyval.cond_node)->child1 = NULL; (yyval.cond_node)->child2 = NULL;
3594                           }
3595 #line 3596 "mon_parse.c" /* yacc.c:1646  */
3596     break;
3597 
3598   case 218:
3599 #line 729 "mon_parse.y" /* yacc.c:1646  */
3600     {(yyval.cond_node)=new_cond;
3601                             (yyval.cond_node)->operation=e_INV;
3602                             (yyval.cond_node)->is_parenthized = FALSE;
3603                             (yyval.cond_node)->banknum=mon_banknum_from_bank(e_default_space,(yyvsp[-2].str)); (yyval.cond_node)->value = (yyvsp[0].a); (yyval.cond_node)->is_reg = FALSE;
3604                             (yyval.cond_node)->child1 = NULL; (yyval.cond_node)->child2 = NULL;
3605                         }
3606 #line 3607 "mon_parse.c" /* yacc.c:1646  */
3607     break;
3608 
3609   case 221:
3610 #line 741 "mon_parse.y" /* yacc.c:1646  */
3611     { mon_add_number_to_buffer((yyvsp[0].i)); }
3612 #line 3613 "mon_parse.c" /* yacc.c:1646  */
3613     break;
3614 
3615   case 222:
3616 #line 742 "mon_parse.y" /* yacc.c:1646  */
3617     { mon_add_string_to_buffer((yyvsp[0].str)); }
3618 #line 3619 "mon_parse.c" /* yacc.c:1646  */
3619     break;
3620 
3621   case 225:
3622 #line 749 "mon_parse.y" /* yacc.c:1646  */
3623     { mon_add_number_to_buffer((yyvsp[0].i)); }
3624 #line 3625 "mon_parse.c" /* yacc.c:1646  */
3625     break;
3626 
3627   case 226:
3628 #line 750 "mon_parse.y" /* yacc.c:1646  */
3629     { mon_add_number_masked_to_buffer((yyvsp[0].i), 0x00); }
3630 #line 3631 "mon_parse.c" /* yacc.c:1646  */
3631     break;
3632 
3633   case 227:
3634 #line 751 "mon_parse.y" /* yacc.c:1646  */
3635     { mon_add_string_to_buffer((yyvsp[0].str)); }
3636 #line 3637 "mon_parse.c" /* yacc.c:1646  */
3637     break;
3638 
3639   case 228:
3640 #line 754 "mon_parse.y" /* yacc.c:1646  */
3641     { (yyval.i) = (yyvsp[0].i); }
3642 #line 3643 "mon_parse.c" /* yacc.c:1646  */
3643     break;
3644 
3645   case 229:
3646 #line 755 "mon_parse.y" /* yacc.c:1646  */
3647     { (yyval.i) = (monitor_cpu_for_memspace[reg_memspace((yyvsp[0].i))]->mon_register_get_val)(reg_memspace((yyvsp[0].i)), reg_regid((yyvsp[0].i))); }
3648 #line 3649 "mon_parse.c" /* yacc.c:1646  */
3649     break;
3650 
3651   case 230:
3652 #line 758 "mon_parse.y" /* yacc.c:1646  */
3653     { (yyval.i) = (yyvsp[0].i); }
3654 #line 3655 "mon_parse.c" /* yacc.c:1646  */
3655     break;
3656 
3657   case 231:
3658 #line 759 "mon_parse.y" /* yacc.c:1646  */
3659     { (yyval.i) = strtol((yyvsp[0].str), NULL, 10); }
3660 #line 3661 "mon_parse.c" /* yacc.c:1646  */
3661     break;
3662 
3663   case 232:
3664 #line 760 "mon_parse.y" /* yacc.c:1646  */
3665     { (yyval.i) = strtol((yyvsp[0].str), NULL, 10); }
3666 #line 3667 "mon_parse.c" /* yacc.c:1646  */
3667     break;
3668 
3669   case 233:
3670 #line 761 "mon_parse.y" /* yacc.c:1646  */
3671     { (yyval.i) = strtol((yyvsp[0].str), NULL, 10); }
3672 #line 3673 "mon_parse.c" /* yacc.c:1646  */
3673     break;
3674 
3675   case 234:
3676 #line 764 "mon_parse.y" /* yacc.c:1646  */
3677     { (yyval.i) = resolve_datatype(B_NUMBER,(yyvsp[0].str)); }
3678 #line 3679 "mon_parse.c" /* yacc.c:1646  */
3679     break;
3680 
3681   case 235:
3682 #line 765 "mon_parse.y" /* yacc.c:1646  */
3683     { (yyval.i) = resolve_datatype(O_NUMBER,(yyvsp[0].str)); }
3684 #line 3685 "mon_parse.c" /* yacc.c:1646  */
3685     break;
3686 
3687   case 236:
3688 #line 766 "mon_parse.y" /* yacc.c:1646  */
3689     { (yyval.i) = resolve_datatype(D_NUMBER,(yyvsp[0].str)); }
3690 #line 3691 "mon_parse.c" /* yacc.c:1646  */
3691     break;
3692 
3693   case 237:
3694 #line 769 "mon_parse.y" /* yacc.c:1646  */
3695     { (yyval.i) = (yyvsp[0].i); }
3696 #line 3697 "mon_parse.c" /* yacc.c:1646  */
3697     break;
3698 
3699   case 238:
3700 #line 770 "mon_parse.y" /* yacc.c:1646  */
3701     { (yyval.i) = (yyvsp[0].i); }
3702 #line 3703 "mon_parse.c" /* yacc.c:1646  */
3703     break;
3704 
3705   case 239:
3706 #line 771 "mon_parse.y" /* yacc.c:1646  */
3707     { (yyval.i) = (yyvsp[0].i); }
3708 #line 3709 "mon_parse.c" /* yacc.c:1646  */
3709     break;
3710 
3711   case 240:
3712 #line 772 "mon_parse.y" /* yacc.c:1646  */
3713     { (yyval.i) = (yyvsp[0].i); }
3714 #line 3715 "mon_parse.c" /* yacc.c:1646  */
3715     break;
3716 
3717   case 241:
3718 #line 773 "mon_parse.y" /* yacc.c:1646  */
3719     { (yyval.i) = (yyvsp[0].i); }
3720 #line 3721 "mon_parse.c" /* yacc.c:1646  */
3721     break;
3722 
3723   case 245:
3724 #line 781 "mon_parse.y" /* yacc.c:1646  */
3725     { (yyval.i) = 0;
3726                                                 if ((yyvsp[-1].str)) {
3727                                                     (monitor_cpu_for_memspace[default_memspace]->mon_assemble_instr)((yyvsp[-1].str), (yyvsp[0].mode));
3728                                                 } else {
3729                                                     new_cmd = 1;
3730                                                     asm_mode = 0;
3731                                                 }
3732                                                 opt_asm = 0;
3733                                               }
3734 #line 3735 "mon_parse.c" /* yacc.c:1646  */
3735     break;
3736 
3737   case 247:
3738 #line 792 "mon_parse.y" /* yacc.c:1646  */
3739     { asm_mode = 0; }
3740 #line 3741 "mon_parse.c" /* yacc.c:1646  */
3741     break;
3742 
3743   case 248:
3744 #line 795 "mon_parse.y" /* yacc.c:1646  */
3745     { if ((yyvsp[0].i) > 0xff) {
3746                           (yyval.mode).addr_mode = ASM_ADDR_MODE_IMMEDIATE_16;
3747                           (yyval.mode).param = (yyvsp[0].i);
3748                         } else {
3749                           (yyval.mode).addr_mode = ASM_ADDR_MODE_IMMEDIATE;
3750                           (yyval.mode).param = (yyvsp[0].i);
3751                         } }
3752 #line 3753 "mon_parse.c" /* yacc.c:1646  */
3753     break;
3754 
3755   case 249:
3756 #line 802 "mon_parse.y" /* yacc.c:1646  */
3757     { if ((yyvsp[0].i) >= 0x10000) {
3758                (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_LONG;
3759                (yyval.mode).param = (yyvsp[0].i);
3760              } else if ((yyvsp[0].i) < 0x100) {
3761                (yyval.mode).addr_mode = ASM_ADDR_MODE_ZERO_PAGE;
3762                (yyval.mode).param = (yyvsp[0].i);
3763              } else {
3764                (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE;
3765                (yyval.mode).param = (yyvsp[0].i);
3766              }
3767            }
3768 #line 3769 "mon_parse.c" /* yacc.c:1646  */
3769     break;
3770 
3771   case 250:
3772 #line 813 "mon_parse.y" /* yacc.c:1646  */
3773     { if ((yyvsp[-2].i) >= 0x10000) {
3774                             (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_LONG_X;
3775                             (yyval.mode).param = (yyvsp[-2].i);
3776                           } else if ((yyvsp[-2].i) < 0x100) {
3777                             (yyval.mode).addr_mode = ASM_ADDR_MODE_ZERO_PAGE_X;
3778                             (yyval.mode).param = (yyvsp[-2].i);
3779                           } else {
3780                             (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_X;
3781                             (yyval.mode).param = (yyvsp[-2].i);
3782                           }
3783                         }
3784 #line 3785 "mon_parse.c" /* yacc.c:1646  */
3785     break;
3786 
3787   case 251:
3788 #line 824 "mon_parse.y" /* yacc.c:1646  */
3789     { if ((yyvsp[-2].i) < 0x100) {
3790                             (yyval.mode).addr_mode = ASM_ADDR_MODE_ZERO_PAGE_Y;
3791                             (yyval.mode).param = (yyvsp[-2].i);
3792                           } else {
3793                             (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_Y;
3794                             (yyval.mode).param = (yyvsp[-2].i);
3795                           }
3796                         }
3797 #line 3798 "mon_parse.c" /* yacc.c:1646  */
3798     break;
3799 
3800   case 252:
3801 #line 832 "mon_parse.y" /* yacc.c:1646  */
3802     { if ((yyvsp[-2].i) < 0x100) {
3803                             (yyval.mode).addr_mode = ASM_ADDR_MODE_STACK_RELATIVE;
3804                             (yyval.mode).param = (yyvsp[-2].i);
3805                           } else { /* 6809 */
3806                             (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
3807                             if ((yyvsp[-2].i) >= -16 && (yyvsp[-2].i) < 16) {
3808                                 (yyval.mode).addr_submode = (yyvsp[0].i) | ((yyvsp[-2].i) & 0x1F);
3809                             } else if ((yyvsp[-2].i) >= -128 && (yyvsp[-2].i) < 128) {
3810                                 (yyval.mode).addr_submode = 0x80 | (yyvsp[0].i) | ASM_ADDR_MODE_INDEXED_OFF8;
3811                                 (yyval.mode).param = (yyvsp[-2].i);
3812                             } else if ((yyvsp[-2].i) >= -32768 && (yyvsp[-2].i) < 32768) {
3813                                 (yyval.mode).addr_submode = 0x80 | (yyvsp[0].i) | ASM_ADDR_MODE_INDEXED_OFF16;
3814                                 (yyval.mode).param = (yyvsp[-2].i);
3815                             } else {
3816                                 (yyval.mode).addr_mode = ASM_ADDR_MODE_ILLEGAL;
3817                                 mon_out("offset too large even for 16 bits (signed)\n");
3818                             }
3819                           }
3820                         }
3821 #line 3822 "mon_parse.c" /* yacc.c:1646  */
3822     break;
3823 
3824   case 253:
3825 #line 851 "mon_parse.y" /* yacc.c:1646  */
3826     { if ((yyvsp[-2].i) < 0x100) {
3827                             (yyval.mode).addr_mode = ASM_ADDR_MODE_DOUBLE;
3828                             (yyval.mode).param = (yyvsp[0].i);
3829                             (yyval.mode).addr_submode = (yyvsp[-2].i);
3830                           }
3831                         }
3832 #line 3833 "mon_parse.c" /* yacc.c:1646  */
3833     break;
3834 
3835   case 254:
3836 #line 857 "mon_parse.y" /* yacc.c:1646  */
3837     { if ((yyvsp[-1].i) < 0x100) {
3838                                (yyval.mode).addr_mode = ASM_ADDR_MODE_INDIRECT;
3839                                (yyval.mode).param = (yyvsp[-1].i);
3840                              } else {
3841                                (yyval.mode).addr_mode = ASM_ADDR_MODE_ABS_INDIRECT;
3842                                (yyval.mode).param = (yyvsp[-1].i);
3843                              }
3844                            }
3845 #line 3846 "mon_parse.c" /* yacc.c:1646  */
3846     break;
3847 
3848   case 255:
3849 #line 865 "mon_parse.y" /* yacc.c:1646  */
3850     { if ((yyvsp[-3].i) < 0x100) {
3851                                            (yyval.mode).addr_mode = ASM_ADDR_MODE_INDIRECT_X;
3852                                            (yyval.mode).param = (yyvsp[-3].i);
3853                                          } else {
3854                                            (yyval.mode).addr_mode = ASM_ADDR_MODE_ABS_INDIRECT_X;
3855                                            (yyval.mode).param = (yyvsp[-3].i);
3856                                          }
3857                                        }
3858 #line 3859 "mon_parse.c" /* yacc.c:1646  */
3859     break;
3860 
3861   case 256:
3862 #line 874 "mon_parse.y" /* yacc.c:1646  */
3863     { (yyval.mode).addr_mode = ASM_ADDR_MODE_STACK_RELATIVE_Y; (yyval.mode).param = (yyvsp[-5].i); }
3864 #line 3865 "mon_parse.c" /* yacc.c:1646  */
3865     break;
3866 
3867   case 257:
3868 #line 876 "mon_parse.y" /* yacc.c:1646  */
3869     { (yyval.mode).addr_mode = ASM_ADDR_MODE_INDIRECT_Y; (yyval.mode).param = (yyvsp[-3].i); }
3870 #line 3871 "mon_parse.c" /* yacc.c:1646  */
3871     break;
3872 
3873   case 258:
3874 #line 877 "mon_parse.y" /* yacc.c:1646  */
3875     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IND_BC; }
3876 #line 3877 "mon_parse.c" /* yacc.c:1646  */
3877     break;
3878 
3879   case 259:
3880 #line 878 "mon_parse.y" /* yacc.c:1646  */
3881     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IND_DE; }
3882 #line 3883 "mon_parse.c" /* yacc.c:1646  */
3883     break;
3884 
3885   case 260:
3886 #line 879 "mon_parse.y" /* yacc.c:1646  */
3887     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IND_HL; }
3888 #line 3889 "mon_parse.c" /* yacc.c:1646  */
3889     break;
3890 
3891   case 261:
3892 #line 880 "mon_parse.y" /* yacc.c:1646  */
3893     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IND_IX; }
3894 #line 3895 "mon_parse.c" /* yacc.c:1646  */
3895     break;
3896 
3897   case 262:
3898 #line 881 "mon_parse.y" /* yacc.c:1646  */
3899     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IND_IY; }
3900 #line 3901 "mon_parse.c" /* yacc.c:1646  */
3901     break;
3902 
3903   case 263:
3904 #line 882 "mon_parse.y" /* yacc.c:1646  */
3905     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IND_SP; }
3906 #line 3907 "mon_parse.c" /* yacc.c:1646  */
3907     break;
3908 
3909   case 264:
3910 #line 884 "mon_parse.y" /* yacc.c:1646  */
3911     { (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_A; (yyval.mode).param = (yyvsp[-3].i); }
3912 #line 3913 "mon_parse.c" /* yacc.c:1646  */
3913     break;
3914 
3915   case 265:
3916 #line 886 "mon_parse.y" /* yacc.c:1646  */
3917     { (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_HL; (yyval.mode).param = (yyvsp[-3].i); }
3918 #line 3919 "mon_parse.c" /* yacc.c:1646  */
3919     break;
3920 
3921   case 266:
3922 #line 888 "mon_parse.y" /* yacc.c:1646  */
3923     { (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_IX; (yyval.mode).param = (yyvsp[-3].i); }
3924 #line 3925 "mon_parse.c" /* yacc.c:1646  */
3925     break;
3926 
3927   case 267:
3928 #line 890 "mon_parse.y" /* yacc.c:1646  */
3929     { (yyval.mode).addr_mode = ASM_ADDR_MODE_ABSOLUTE_IY; (yyval.mode).param = (yyvsp[-3].i); }
3930 #line 3931 "mon_parse.c" /* yacc.c:1646  */
3931     break;
3932 
3933   case 268:
3934 #line 891 "mon_parse.y" /* yacc.c:1646  */
3935     { (yyval.mode).addr_mode = ASM_ADDR_MODE_IMPLIED; }
3936 #line 3937 "mon_parse.c" /* yacc.c:1646  */
3937     break;
3938 
3939   case 269:
3940 #line 892 "mon_parse.y" /* yacc.c:1646  */
3941     { (yyval.mode).addr_mode = ASM_ADDR_MODE_ACCUMULATOR; }
3942 #line 3943 "mon_parse.c" /* yacc.c:1646  */
3943     break;
3944 
3945   case 270:
3946 #line 893 "mon_parse.y" /* yacc.c:1646  */
3947     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_B; }
3948 #line 3949 "mon_parse.c" /* yacc.c:1646  */
3949     break;
3950 
3951   case 271:
3952 #line 894 "mon_parse.y" /* yacc.c:1646  */
3953     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_C; }
3954 #line 3955 "mon_parse.c" /* yacc.c:1646  */
3955     break;
3956 
3957   case 272:
3958 #line 895 "mon_parse.y" /* yacc.c:1646  */
3959     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_D; }
3960 #line 3961 "mon_parse.c" /* yacc.c:1646  */
3961     break;
3962 
3963   case 273:
3964 #line 896 "mon_parse.y" /* yacc.c:1646  */
3965     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_E; }
3966 #line 3967 "mon_parse.c" /* yacc.c:1646  */
3967     break;
3968 
3969   case 274:
3970 #line 897 "mon_parse.y" /* yacc.c:1646  */
3971     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_H; }
3972 #line 3973 "mon_parse.c" /* yacc.c:1646  */
3973     break;
3974 
3975   case 275:
3976 #line 898 "mon_parse.y" /* yacc.c:1646  */
3977     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IXH; }
3978 #line 3979 "mon_parse.c" /* yacc.c:1646  */
3979     break;
3980 
3981   case 276:
3982 #line 899 "mon_parse.y" /* yacc.c:1646  */
3983     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IYH; }
3984 #line 3985 "mon_parse.c" /* yacc.c:1646  */
3985     break;
3986 
3987   case 277:
3988 #line 900 "mon_parse.y" /* yacc.c:1646  */
3989     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_L; }
3990 #line 3991 "mon_parse.c" /* yacc.c:1646  */
3991     break;
3992 
3993   case 278:
3994 #line 901 "mon_parse.y" /* yacc.c:1646  */
3995     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IXL; }
3996 #line 3997 "mon_parse.c" /* yacc.c:1646  */
3997     break;
3998 
3999   case 279:
4000 #line 902 "mon_parse.y" /* yacc.c:1646  */
4001     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IYL; }
4002 #line 4003 "mon_parse.c" /* yacc.c:1646  */
4003     break;
4004 
4005   case 280:
4006 #line 903 "mon_parse.y" /* yacc.c:1646  */
4007     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_AF; }
4008 #line 4009 "mon_parse.c" /* yacc.c:1646  */
4009     break;
4010 
4011   case 281:
4012 #line 904 "mon_parse.y" /* yacc.c:1646  */
4013     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_BC; }
4014 #line 4015 "mon_parse.c" /* yacc.c:1646  */
4015     break;
4016 
4017   case 282:
4018 #line 905 "mon_parse.y" /* yacc.c:1646  */
4019     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_DE; }
4020 #line 4021 "mon_parse.c" /* yacc.c:1646  */
4021     break;
4022 
4023   case 283:
4024 #line 906 "mon_parse.y" /* yacc.c:1646  */
4025     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_HL; }
4026 #line 4027 "mon_parse.c" /* yacc.c:1646  */
4027     break;
4028 
4029   case 284:
4030 #line 907 "mon_parse.y" /* yacc.c:1646  */
4031     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IX; }
4032 #line 4033 "mon_parse.c" /* yacc.c:1646  */
4033     break;
4034 
4035   case 285:
4036 #line 908 "mon_parse.y" /* yacc.c:1646  */
4037     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_IY; }
4038 #line 4039 "mon_parse.c" /* yacc.c:1646  */
4039     break;
4040 
4041   case 286:
4042 #line 909 "mon_parse.y" /* yacc.c:1646  */
4043     { (yyval.mode).addr_mode = ASM_ADDR_MODE_REG_SP; }
4044 #line 4045 "mon_parse.c" /* yacc.c:1646  */
4045     break;
4046 
4047   case 287:
4048 #line 911 "mon_parse.y" /* yacc.c:1646  */
4049     { (yyval.mode).addr_mode = ASM_ADDR_MODE_DIRECT; (yyval.mode).param = (yyvsp[0].i); }
4050 #line 4051 "mon_parse.c" /* yacc.c:1646  */
4051     break;
4052 
4053   case 288:
4054 #line 912 "mon_parse.y" /* yacc.c:1646  */
4055     {    /* Clash with addr,x addr,y addr,s modes! */
4056         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4057         if ((yyvsp[-2].i) >= -16 && (yyvsp[-2].i) < 16) {
4058             (yyval.mode).addr_submode = (3 << 5) | ((yyvsp[-2].i) & 0x1F);
4059         } else if ((yyvsp[-2].i) >= -128 && (yyvsp[-2].i) < 128) {
4060             (yyval.mode).addr_submode = 0x80 | (3 << 5) | ASM_ADDR_MODE_INDEXED_OFF8;
4061             (yyval.mode).param = (yyvsp[-2].i);
4062         } else if ((yyvsp[-2].i) >= -32768 && (yyvsp[-2].i) < 32768) {
4063             (yyval.mode).addr_submode = 0x80 | (3 << 5) | ASM_ADDR_MODE_INDEXED_OFF16;
4064             (yyval.mode).param = (yyvsp[-2].i);
4065         } else {
4066             (yyval.mode).addr_mode = ASM_ADDR_MODE_ILLEGAL;
4067             mon_out("offset too large even for 16 bits (signed)\n");
4068         }
4069     }
4070 #line 4071 "mon_parse.c" /* yacc.c:1646  */
4071     break;
4072 
4073   case 289:
4074 #line 927 "mon_parse.y" /* yacc.c:1646  */
4075     {
4076         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4077         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_INC1;
4078         }
4079 #line 4080 "mon_parse.c" /* yacc.c:1646  */
4080     break;
4081 
4082   case 290:
4083 #line 931 "mon_parse.y" /* yacc.c:1646  */
4084     {
4085         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4086         (yyval.mode).addr_submode = 0x80 | (yyvsp[-2].i) | ASM_ADDR_MODE_INDEXED_INC2;
4087         }
4088 #line 4089 "mon_parse.c" /* yacc.c:1646  */
4089     break;
4090 
4091   case 291:
4092 #line 935 "mon_parse.y" /* yacc.c:1646  */
4093     {
4094         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4095         (yyval.mode).addr_submode = 0x80 | (yyvsp[0].i) | ASM_ADDR_MODE_INDEXED_DEC1;
4096         }
4097 #line 4098 "mon_parse.c" /* yacc.c:1646  */
4098     break;
4099 
4100   case 292:
4101 #line 939 "mon_parse.y" /* yacc.c:1646  */
4102     {
4103         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4104         (yyval.mode).addr_submode = 0x80 | (yyvsp[0].i) | ASM_ADDR_MODE_INDEXED_DEC2;
4105         }
4106 #line 4107 "mon_parse.c" /* yacc.c:1646  */
4107     break;
4108 
4109   case 293:
4110 #line 943 "mon_parse.y" /* yacc.c:1646  */
4111     {
4112         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4113         (yyval.mode).addr_submode = 0x80 | (yyvsp[0].i) | ASM_ADDR_MODE_INDEXED_OFF0;
4114         }
4115 #line 4116 "mon_parse.c" /* yacc.c:1646  */
4116     break;
4117 
4118   case 294:
4119 #line 947 "mon_parse.y" /* yacc.c:1646  */
4120     {
4121         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4122         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_OFFB;
4123         }
4124 #line 4125 "mon_parse.c" /* yacc.c:1646  */
4125     break;
4126 
4127   case 295:
4128 #line 951 "mon_parse.y" /* yacc.c:1646  */
4129     {
4130         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4131         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_OFFA;
4132         }
4133 #line 4134 "mon_parse.c" /* yacc.c:1646  */
4134     break;
4135 
4136   case 296:
4137 #line 955 "mon_parse.y" /* yacc.c:1646  */
4138     {
4139         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4140         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_OFFD;
4141         }
4142 #line 4143 "mon_parse.c" /* yacc.c:1646  */
4143     break;
4144 
4145   case 297:
4146 #line 959 "mon_parse.y" /* yacc.c:1646  */
4147     {
4148         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4149         (yyval.mode).param = (yyvsp[-2].i);
4150         if ((yyvsp[-2].i) >= -128 && (yyvsp[-2].i) < 128) {
4151             (yyval.mode).addr_submode = ASM_ADDR_MODE_INDEXED_OFFPC8;
4152         } else if ((yyvsp[-2].i) >= -32768 && (yyvsp[-2].i) < 32768) {
4153             (yyval.mode).addr_submode = ASM_ADDR_MODE_INDEXED_OFFPC16;
4154         } else {
4155             (yyval.mode).addr_mode = ASM_ADDR_MODE_ILLEGAL;
4156             mon_out("offset too large even for 16 bits (signed)\n");
4157         }
4158     }
4159 #line 4160 "mon_parse.c" /* yacc.c:1646  */
4160     break;
4161 
4162   case 298:
4163 #line 971 "mon_parse.y" /* yacc.c:1646  */
4164     {
4165         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4166         if ((yyvsp[-3].i) >= -16 && (yyvsp[-3].i) < 16) {
4167             (yyval.mode).addr_submode = (yyvsp[-3].i) & 0x1F;
4168         } else if ((yyvsp[-4].i) >= -128 && (yyvsp[-4].i) < 128) {
4169             (yyval.mode).addr_submode = ASM_ADDR_MODE_INDEXED_OFF8;
4170             (yyval.mode).param = (yyvsp[-3].i);
4171         } else if ((yyvsp[-3].i) >= -32768 && (yyvsp[-3].i) < 32768) {
4172             (yyval.mode).addr_submode = ASM_ADDR_MODE_INDEXED_OFF16;
4173             (yyval.mode).param = (yyvsp[-3].i);
4174         } else {
4175             (yyval.mode).addr_mode = ASM_ADDR_MODE_ILLEGAL;
4176             mon_out("offset too large even for 16 bits (signed)\n");
4177         }
4178     }
4179 #line 4180 "mon_parse.c" /* yacc.c:1646  */
4180     break;
4181 
4182   case 299:
4183 #line 986 "mon_parse.y" /* yacc.c:1646  */
4184     {
4185         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4186         (yyval.mode).addr_submode = 0x80 | (yyvsp[-2].i) | ASM_ADDR_MODE_INDEXED_INC1;
4187         }
4188 #line 4189 "mon_parse.c" /* yacc.c:1646  */
4189     break;
4190 
4191   case 300:
4192 #line 990 "mon_parse.y" /* yacc.c:1646  */
4193     {
4194         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4195         (yyval.mode).addr_submode = 0x80 | (yyvsp[-3].i) | ASM_ADDR_MODE_INDEXED_INC2;
4196         }
4197 #line 4198 "mon_parse.c" /* yacc.c:1646  */
4198     break;
4199 
4200   case 301:
4201 #line 994 "mon_parse.y" /* yacc.c:1646  */
4202     {
4203         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4204         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_DEC1;
4205         }
4206 #line 4207 "mon_parse.c" /* yacc.c:1646  */
4207     break;
4208 
4209   case 302:
4210 #line 998 "mon_parse.y" /* yacc.c:1646  */
4211     {
4212         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4213         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_DEC2;
4214         }
4215 #line 4216 "mon_parse.c" /* yacc.c:1646  */
4216     break;
4217 
4218   case 303:
4219 #line 1002 "mon_parse.y" /* yacc.c:1646  */
4220     {
4221         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4222         (yyval.mode).addr_submode = 0x80 | (yyvsp[-1].i) | ASM_ADDR_MODE_INDEXED_OFF0;
4223         }
4224 #line 4225 "mon_parse.c" /* yacc.c:1646  */
4225     break;
4226 
4227   case 304:
4228 #line 1006 "mon_parse.y" /* yacc.c:1646  */
4229     {
4230         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4231         (yyval.mode).addr_submode = 0x80 | (yyvsp[-2].i) | ASM_ADDR_MODE_INDEXED_OFFB;
4232         }
4233 #line 4234 "mon_parse.c" /* yacc.c:1646  */
4234     break;
4235 
4236   case 305:
4237 #line 1010 "mon_parse.y" /* yacc.c:1646  */
4238     {
4239         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4240         (yyval.mode).addr_submode = 0x80 | (yyvsp[-2].i) | ASM_ADDR_MODE_INDEXED_OFFA;
4241         }
4242 #line 4243 "mon_parse.c" /* yacc.c:1646  */
4243     break;
4244 
4245   case 306:
4246 #line 1014 "mon_parse.y" /* yacc.c:1646  */
4247     {
4248         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4249         (yyval.mode).addr_submode = 0x80 | (yyvsp[-2].i) | ASM_ADDR_MODE_INDEXED_OFFD;
4250         }
4251 #line 4252 "mon_parse.c" /* yacc.c:1646  */
4252     break;
4253 
4254   case 307:
4255 #line 1018 "mon_parse.y" /* yacc.c:1646  */
4256     {
4257         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4258         (yyval.mode).param = (yyvsp[-3].i);
4259         if ((yyvsp[-3].i) >= -128 && (yyvsp[-3].i) < 128) {
4260             (yyval.mode).addr_submode = ASM_ADDR_MODE_INDEXED_OFFPC8_IND;
4261         } else if ((yyvsp[-3].i) >= -32768 && (yyvsp[-3].i) < 32768) {
4262             (yyval.mode).addr_submode = ASM_ADDR_MODE_INDEXED_OFFPC16_IND;
4263         } else {
4264             (yyval.mode).addr_mode = ASM_ADDR_MODE_ILLEGAL;
4265             mon_out("offset too large even for 16 bits (signed)\n");
4266         }
4267     }
4268 #line 4269 "mon_parse.c" /* yacc.c:1646  */
4269     break;
4270 
4271   case 308:
4272 #line 1030 "mon_parse.y" /* yacc.c:1646  */
4273     {
4274         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDEXED;
4275         (yyval.mode).addr_submode = 0x80 | ASM_ADDR_MODE_EXTENDED_INDIRECT;
4276         (yyval.mode).param = (yyvsp[-1].i);
4277         }
4278 #line 4279 "mon_parse.c" /* yacc.c:1646  */
4279     break;
4280 
4281   case 309:
4282 #line 1035 "mon_parse.y" /* yacc.c:1646  */
4283     {
4284         (yyval.mode).addr_mode = ASM_ADDR_MODE_INDIRECT_LONG_Y;
4285         (yyval.mode).param = (yyvsp[-3].i);
4286         }
4287 #line 4288 "mon_parse.c" /* yacc.c:1646  */
4288     break;
4289 
4290   case 310:
4291 #line 1043 "mon_parse.y" /* yacc.c:1646  */
4292     { (yyval.i) = (0 << 5); printf("reg_x\n"); }
4293 #line 4294 "mon_parse.c" /* yacc.c:1646  */
4294     break;
4295 
4296   case 311:
4297 #line 1044 "mon_parse.y" /* yacc.c:1646  */
4298     { (yyval.i) = (1 << 5); printf("reg_y\n"); }
4299 #line 4300 "mon_parse.c" /* yacc.c:1646  */
4300     break;
4301 
4302   case 312:
4303 #line 1045 "mon_parse.y" /* yacc.c:1646  */
4304     { (yyval.i) = (yyvsp[0].i); }
4305 #line 4306 "mon_parse.c" /* yacc.c:1646  */
4306     break;
4307 
4308   case 313:
4309 #line 1046 "mon_parse.y" /* yacc.c:1646  */
4310     { (yyval.i) = (3 << 5); printf("reg_s\n"); }
4311 #line 4312 "mon_parse.c" /* yacc.c:1646  */
4312     break;
4313 
4314   case 314:
4315 #line 1050 "mon_parse.y" /* yacc.c:1646  */
4316     { (yyval.i) = (2 << 5); printf("reg_u\n"); }
4317 #line 4318 "mon_parse.c" /* yacc.c:1646  */
4318     break;
4319 
4320 
4321 #line 4322 "mon_parse.c" /* yacc.c:1646  */
4322       default: break;
4323     }
4324   /* User semantic actions sometimes alter yychar, and that requires
4325      that yytoken be updated with the new translation.  We take the
4326      approach of translating immediately before every use of yytoken.
4327      One alternative is translating here after every semantic action,
4328      but that translation would be missed if the semantic action invokes
4329      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4330      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
4331      incorrect destructor might then be invoked immediately.  In the
4332      case of YYERROR or YYBACKUP, subsequent parser actions might lead
4333      to an incorrect destructor call or verbose syntax error message
4334      before the lookahead is translated.  */
4335   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4336 
4337   YYPOPSTACK (yylen);
4338   yylen = 0;
4339   YY_STACK_PRINT (yyss, yyssp);
4340 
4341   *++yyvsp = yyval;
4342 
4343   /* Now 'shift' the result of the reduction.  Determine what state
4344      that goes to, based on the state we popped back to and the rule
4345      number reduced by.  */
4346 
4347   yyn = yyr1[yyn];
4348 
4349   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4350   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4351     yystate = yytable[yystate];
4352   else
4353     yystate = yydefgoto[yyn - YYNTOKENS];
4354 
4355   goto yynewstate;
4356 
4357 
4358 /*--------------------------------------.
4359 | yyerrlab -- here on detecting error.  |
4360 `--------------------------------------*/
4361 yyerrlab:
4362   /* Make sure we have latest lookahead translation.  See comments at
4363      user semantic actions for why this is necessary.  */
4364   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4365 
4366   /* If not already recovering from an error, report this error.  */
4367   if (!yyerrstatus)
4368     {
4369       ++yynerrs;
4370 #if ! YYERROR_VERBOSE
4371       yyerror (YY_("syntax error"));
4372 #else
4373 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4374                                         yyssp, yytoken)
4375       {
4376         char const *yymsgp = YY_("syntax error");
4377         int yysyntax_error_status;
4378         yysyntax_error_status = YYSYNTAX_ERROR;
4379         if (yysyntax_error_status == 0)
4380           yymsgp = yymsg;
4381         else if (yysyntax_error_status == 1)
4382           {
4383             if (yymsg != yymsgbuf)
4384               YYSTACK_FREE (yymsg);
4385             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4386             if (!yymsg)
4387               {
4388                 yymsg = yymsgbuf;
4389                 yymsg_alloc = sizeof yymsgbuf;
4390                 yysyntax_error_status = 2;
4391               }
4392             else
4393               {
4394                 yysyntax_error_status = YYSYNTAX_ERROR;
4395                 yymsgp = yymsg;
4396               }
4397           }
4398         yyerror (yymsgp);
4399         if (yysyntax_error_status == 2)
4400           goto yyexhaustedlab;
4401       }
4402 # undef YYSYNTAX_ERROR
4403 #endif
4404     }
4405 
4406 
4407 
4408   if (yyerrstatus == 3)
4409     {
4410       /* If just tried and failed to reuse lookahead token after an
4411          error, discard it.  */
4412 
4413       if (yychar <= YYEOF)
4414         {
4415           /* Return failure if at end of input.  */
4416           if (yychar == YYEOF)
4417             YYABORT;
4418         }
4419       else
4420         {
4421           yydestruct ("Error: discarding",
4422                       yytoken, &yylval);
4423           yychar = YYEMPTY;
4424         }
4425     }
4426 
4427   /* Else will try to reuse lookahead token after shifting the error
4428      token.  */
4429   goto yyerrlab1;
4430 
4431 
4432 /*---------------------------------------------------.
4433 | yyerrorlab -- error raised explicitly by YYERROR.  |
4434 `---------------------------------------------------*/
4435 yyerrorlab:
4436 
4437   /* Pacify compilers like GCC when the user code never invokes
4438      YYERROR and the label yyerrorlab therefore never appears in user
4439      code.  */
4440   if (/*CONSTCOND*/ 0)
4441      goto yyerrorlab;
4442 
4443   /* Do not reclaim the symbols of the rule whose action triggered
4444      this YYERROR.  */
4445   YYPOPSTACK (yylen);
4446   yylen = 0;
4447   YY_STACK_PRINT (yyss, yyssp);
4448   yystate = *yyssp;
4449   goto yyerrlab1;
4450 
4451 
4452 /*-------------------------------------------------------------.
4453 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
4454 `-------------------------------------------------------------*/
4455 yyerrlab1:
4456   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
4457 
4458   for (;;)
4459     {
4460       yyn = yypact[yystate];
4461       if (!yypact_value_is_default (yyn))
4462         {
4463           yyn += YYTERROR;
4464           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4465             {
4466               yyn = yytable[yyn];
4467               if (0 < yyn)
4468                 break;
4469             }
4470         }
4471 
4472       /* Pop the current state because it cannot handle the error token.  */
4473       if (yyssp == yyss)
4474         YYABORT;
4475 
4476 
4477       yydestruct ("Error: popping",
4478                   yystos[yystate], yyvsp);
4479       YYPOPSTACK (1);
4480       yystate = *yyssp;
4481       YY_STACK_PRINT (yyss, yyssp);
4482     }
4483 
4484   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4485   *++yyvsp = yylval;
4486   YY_IGNORE_MAYBE_UNINITIALIZED_END
4487 
4488 
4489   /* Shift the error token.  */
4490   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4491 
4492   yystate = yyn;
4493   goto yynewstate;
4494 
4495 
4496 /*-------------------------------------.
4497 | yyacceptlab -- YYACCEPT comes here.  |
4498 `-------------------------------------*/
4499 yyacceptlab:
4500   yyresult = 0;
4501   goto yyreturn;
4502 
4503 /*-----------------------------------.
4504 | yyabortlab -- YYABORT comes here.  |
4505 `-----------------------------------*/
4506 yyabortlab:
4507   yyresult = 1;
4508   goto yyreturn;
4509 
4510 #if !defined yyoverflow || YYERROR_VERBOSE
4511 /*-------------------------------------------------.
4512 | yyexhaustedlab -- memory exhaustion comes here.  |
4513 `-------------------------------------------------*/
4514 yyexhaustedlab:
4515   yyerror (YY_("memory exhausted"));
4516   yyresult = 2;
4517   /* Fall through.  */
4518 #endif
4519 
4520 yyreturn:
4521   if (yychar != YYEMPTY)
4522     {
4523       /* Make sure we have latest lookahead translation.  See comments at
4524          user semantic actions for why this is necessary.  */
4525       yytoken = YYTRANSLATE (yychar);
4526       yydestruct ("Cleanup: discarding lookahead",
4527                   yytoken, &yylval);
4528     }
4529   /* Do not reclaim the symbols of the rule whose action triggered
4530      this YYABORT or YYACCEPT.  */
4531   YYPOPSTACK (yylen);
4532   YY_STACK_PRINT (yyss, yyssp);
4533   while (yyssp != yyss)
4534     {
4535       yydestruct ("Cleanup: popping",
4536                   yystos[*yyssp], yyvsp);
4537       YYPOPSTACK (1);
4538     }
4539 #ifndef yyoverflow
4540   if (yyss != yyssa)
4541     YYSTACK_FREE (yyss);
4542 #endif
4543 #if YYERROR_VERBOSE
4544   if (yymsg != yymsgbuf)
4545     YYSTACK_FREE (yymsg);
4546 #endif
4547   return yyresult;
4548 }
4549 #line 1054 "mon_parse.y" /* yacc.c:1906  */
4550 
4551 
parse_and_execute_line(char * input)4552 void parse_and_execute_line(char *input)
4553 {
4554    char *temp_buf;
4555    int i, rc;
4556 
4557    temp_buf = lib_malloc(strlen(input) + 3);
4558    strcpy(temp_buf,input);
4559    i = (int)strlen(input);
4560    temp_buf[i++] = '\n';
4561    temp_buf[i++] = '\0';
4562    temp_buf[i++] = '\0';
4563 
4564    make_buffer(temp_buf);
4565    mon_clear_buffer();
4566    if ( (rc =yyparse()) != 0) {
4567        mon_out("ERROR -- ");
4568        switch(rc) {
4569          case ERR_BAD_CMD:
4570            mon_out("Bad command:\n");
4571            break;
4572          case ERR_RANGE_BAD_START:
4573            mon_out("Bad first address in range:\n");
4574            break;
4575          case ERR_RANGE_BAD_END:
4576            mon_out("Bad second address in range:\n");
4577            break;
4578          case ERR_EXPECT_CHECKNUM:
4579            mon_out("Checkpoint number expected:\n");
4580            break;
4581          case ERR_EXPECT_END_CMD:
4582            mon_out("Unexpected token:\n");
4583            break;
4584          case ERR_MISSING_CLOSE_PAREN:
4585            mon_out("')' expected:\n");
4586            break;
4587          case ERR_INCOMPLETE_COMPARE_OP:
4588            mon_out("Compare operation missing an operand:\n");
4589            break;
4590          case ERR_EXPECT_FILENAME:
4591            mon_out("Expecting a filename:\n");
4592            break;
4593          case ERR_ADDR_TOO_BIG:
4594            mon_out("Address too large:\n");
4595            break;
4596          case ERR_IMM_TOO_BIG:
4597            mon_out("Immediate argument too large:\n");
4598            break;
4599          case ERR_EXPECT_STRING:
4600            mon_out("Expecting a string.\n");
4601            break;
4602          case ERR_UNDEFINED_LABEL:
4603            mon_out("Found an undefined label.\n");
4604            break;
4605          case ERR_EXPECT_DEVICE_NUM:
4606            mon_out("Expecting a device number.\n");
4607            break;
4608          case ERR_EXPECT_ADDRESS:
4609            mon_out("Expecting an address.\n");
4610            break;
4611          case ERR_INVALID_REGISTER:
4612            mon_out("Invalid register.\n");
4613            break;
4614          case ERR_ILLEGAL_INPUT:
4615          default:
4616            mon_out("Wrong syntax:\n");
4617        }
4618        mon_out("  %s\n", input);
4619        for (i = 0; i < last_len; i++)
4620            mon_out(" ");
4621        mon_out("  ^\n");
4622        asm_mode = 0;
4623        new_cmd = 1;
4624    }
4625    lib_free(temp_buf);
4626    free_buffer();
4627 }
4628 
yyerror(char * s)4629 static int yyerror(char *s)
4630 {
4631    fprintf(stderr, "ERR:%s\n", s);
4632    return 0;
4633 }
4634 
resolve_datatype(unsigned guess_type,const char * num)4635 static int resolve_datatype(unsigned guess_type, const char *num)
4636 {
4637    /* FIXME: Handle cases when default type is non-numerical */
4638    if (default_radix == e_hexadecimal) {
4639        return strtol(num, NULL, 16);
4640    }
4641 
4642    if ((guess_type == D_NUMBER) || (default_radix == e_decimal)) {
4643        return strtol(num, NULL, 10);
4644    }
4645 
4646    if ((guess_type == O_NUMBER) || (default_radix == e_octal)) {
4647        return strtol(num, NULL, 8);
4648    }
4649 
4650    return strtol(num, NULL, 2);
4651 }
4652 
4653 /*
4654  * Resolve a character sequence containing 8 hex digits like "08001000".
4655  * This could be a lazy version of "0800 1000". If the default radix is not
4656  * hexadecimal, we handle it like a ordinary number, in the latter case there
4657  * is only one number in the range.
4658  */
resolve_range(enum t_memspace memspace,MON_ADDR range[2],const char * num)4659 static int resolve_range(enum t_memspace memspace, MON_ADDR range[2],
4660                          const char *num)
4661 {
4662     char start[5];
4663     char end[5];
4664     long sa;
4665 
4666     range[1] = BAD_ADDR;
4667 
4668     switch (default_radix)
4669     {
4670     case e_hexadecimal:
4671         /* checked twice, but as the code must have exactly 8 digits: */
4672         if (strlen(num) == 8) {
4673             memcpy(start, num, 4);
4674             start[4] = '\0';
4675             memcpy(end, num + 4, 4);
4676             end[4] = '\0';
4677             sa = strtol(start, NULL, 16);
4678             range[1] = new_addr(memspace, strtol(end, NULL, 16));
4679         }
4680         else
4681             sa = strtol(num, NULL, 16);
4682         break;
4683 
4684     case e_decimal:
4685        sa = strtol(num, NULL, 10);
4686        break;
4687 
4688     case e_octal:
4689        sa = strtol(num, NULL, 8);
4690        break;
4691 
4692     default:
4693        sa = strtol(num, NULL, 2);
4694     }
4695 
4696     if (!CHECK_ADDR(sa))
4697         return ERR_ADDR_TOO_BIG;
4698 
4699     range[0] = new_addr(memspace, sa);
4700     return 0;
4701 }
4702