OpenCores
URL https://opencores.org/ocsvn/diogenes/diogenes/trunk

Subversion Repositories diogenes

[/] [diogenes/] [tags/] [initial/] [diogenes/] [asm/] [y.tab.c] - Blame information for rev 236

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 fellnhofer
/* A Bison parser, made by GNU Bison 2.2.  */
2
 
3
/* Skeleton implementation for Bison's Yacc-like parsers in C
4
 
5
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
   Free Software Foundation, Inc.
7
 
8
   This program is free software; you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation; either version 2, or (at your option)
11
   any later version.
12
 
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
 
18
   You should have received a copy of the GNU General Public License
19
   along with this program; if not, write to the Free Software
20
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
   Boston, MA 02110-1301, USA.  */
22
 
23
/* As a special exception, you may create a larger work that contains
24
   part or all of the Bison parser skeleton and distribute that work
25
   under terms of your choice, so long as that work isn't itself a
26
   parser generator using the skeleton or a modified version thereof
27
   as a parser skeleton.  Alternatively, if you modify or redistribute
28
   the parser skeleton itself, you may (at your option) remove this
29
   special exception, which will cause the skeleton and the resulting
30
   Bison output files to be licensed under the GNU General Public
31
   License without this special exception.
32
 
33
   This special exception was added by the Free Software Foundation in
34
   version 2.2 of Bison.  */
35
 
36
/* C LALR(1) parser skeleton written by Richard Stallman, by
37
   simplifying the original so-called "semantic" parser.  */
38
 
39
/* All symbols defined below should begin with yy or YY, to avoid
40
   infringing on user name space.  This should be done even for local
41
   variables, as they might otherwise be expanded by user macros.
42
   There are some unavoidable exceptions within include files to
43
   define necessary library symbols; they are noted "INFRINGES ON
44
   USER NAME SPACE" below.  */
45
 
46
/* Identify Bison output.  */
47
#define YYBISON 1
48
 
49
/* Bison version.  */
50
#define YYBISON_VERSION "2.2"
51
 
52
/* Skeleton name.  */
53
#define YYSKELETON_NAME "yacc.c"
54
 
55
/* Pure parsers.  */
56
#define YYPURE 0
57
 
58
/* Using locations.  */
59
#define YYLSP_NEEDED 0
60
 
61
 
62
 
63
/* Tokens.  */
64
#ifndef YYTOKENTYPE
65
# define YYTOKENTYPE
66
   /* Put the tokens into the symbol table, so that GDB and other debuggers
67
      know about them.  */
68
   enum yytokentype {
69
     C = 258,
70
     OBRA = 259,
71
     CBRA = 260,
72
     OSBRA = 261,
73
     CSBRA = 262,
74
     NUM = 263,
75
     IMM = 264,
76
     LABEL = 265,
77
     USELAB = 266,
78
     REG = 267,
79
     ARI = 268,
80
     LDI = 269,
81
     LSI = 270,
82
     CMP = 271,
83
     BR = 272,
84
     SHA = 273,
85
     JUMP = 274,
86
     CALL = 275,
87
     MOV = 276,
88
     MEM = 277,
89
     SEL = 278,
90
     SELI = 279,
91
     LDL = 280,
92
     NOP = 281
93
   };
94
#endif
95
/* Tokens.  */
96
#define C 258
97
#define OBRA 259
98
#define CBRA 260
99
#define OSBRA 261
100
#define CSBRA 262
101
#define NUM 263
102
#define IMM 264
103
#define LABEL 265
104
#define USELAB 266
105
#define REG 267
106
#define ARI 268
107
#define LDI 269
108
#define LSI 270
109
#define CMP 271
110
#define BR 272
111
#define SHA 273
112
#define JUMP 274
113
#define CALL 275
114
#define MOV 276
115
#define MEM 277
116
#define SEL 278
117
#define SELI 279
118
#define LDL 280
119
#define NOP 281
120
 
121
 
122
 
123
 
124
/* Copy the first part of user declarations.  */
125
#line 3 "yacc.in"
126
 
127
 
128
 
129
#include <stdio.h>
130
#include <string.h>
131
#include "tools.h"
132
 
133
#define YYERROR_VERBOSE
134
 
135
int temp;
136
int firstpass=1;
137
 
138
void yyerror(const char *str)
139
{
140
        fprintf(stderr,"error: %s\n",str);
141
}
142
 
143
int yywrap()
144
{
145
        return 1;
146
}
147
 
148
int main(int argc, char **argv)
149
{
150
        if(argc>=2) {
151
                if(!strcmp(argv[1], "-h")) hex = 1;
152
                if(!strcmp(argv[1], "-b")) hex = 2;
153
        }
154
        if(!hash_init()) {
155
                exit(1);
156
                printf("could not create hash table\n");
157
        }
158
 
159
        if(hex && argc==3) stdin = fopen(argv[2], "r");
160
        if(!hex && argc==2) stdin = fopen(argv[1], "r");
161
 
162
        firstpass = 1;
163
        address = 0;
164
    if(yyparse()) exit(1);
165
        firstpass = 0;
166
        address = 0;
167
        rewind(stdin);
168
        (void) PROC_FLUSH_BUF (stdin );
169
    yyparse();
170
    return 0;
171
}
172
 
173
 
174
 
175
/* Enabling traces.  */
176
#ifndef YYDEBUG
177
# define YYDEBUG 0
178
#endif
179
 
180
/* Enabling verbose error messages.  */
181
#ifdef YYERROR_VERBOSE
182
# undef YYERROR_VERBOSE
183
# define YYERROR_VERBOSE 1
184
#else
185
# define YYERROR_VERBOSE 0
186
#endif
187
 
188
/* Enabling the token table.  */
189
#ifndef YYTOKEN_TABLE
190
# define YYTOKEN_TABLE 0
191
#endif
192
 
193
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
194
typedef union YYSTYPE
195
#line 55 "yacc.in"
196
{
197
        int num;
198
        char *str;
199
}
200
/* Line 193 of yacc.c.  */
201
#line 202 "yacc.tab.in"
202
        YYSTYPE;
203
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
204
# define YYSTYPE_IS_DECLARED 1
205
# define YYSTYPE_IS_TRIVIAL 1
206
#endif
207
 
208
 
209
 
210
/* Copy the second part of user declarations.  */
211
 
212
 
213
/* Line 216 of yacc.c.  */
214
#line 215 "yacc.tab.in"
215
 
216
#ifdef short
217
# undef short
218
#endif
219
 
220
#ifdef YYTYPE_UINT8
221
typedef YYTYPE_UINT8 yytype_uint8;
222
#else
223
typedef unsigned char yytype_uint8;
224
#endif
225
 
226
#ifdef YYTYPE_INT8
227
typedef YYTYPE_INT8 yytype_int8;
228
#elif (defined __STDC__ || defined __C99__FUNC__ \
229
     || defined __cplusplus || defined _MSC_VER)
230
typedef signed char yytype_int8;
231
#else
232
typedef short int yytype_int8;
233
#endif
234
 
235
#ifdef YYTYPE_UINT16
236
typedef YYTYPE_UINT16 yytype_uint16;
237
#else
238
typedef unsigned short int yytype_uint16;
239
#endif
240
 
241
#ifdef YYTYPE_INT16
242
typedef YYTYPE_INT16 yytype_int16;
243
#else
244
typedef short int yytype_int16;
245
#endif
246
 
247
#ifndef YYSIZE_T
248
# ifdef __SIZE_TYPE__
249
#  define YYSIZE_T __SIZE_TYPE__
250
# elif defined size_t
251
#  define YYSIZE_T size_t
252
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
253
     || defined __cplusplus || defined _MSC_VER)
254
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
255
#  define YYSIZE_T size_t
256
# else
257
#  define YYSIZE_T unsigned int
258
# endif
259
#endif
260
 
261
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
262
 
263
#ifndef YY_
264
# if YYENABLE_NLS
265
#  if ENABLE_NLS
266
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
267
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
268
#  endif
269
# endif
270
# ifndef YY_
271
#  define YY_(msgid) msgid
272
# endif
273
#endif
274
 
275
/* Suppress unused-variable warnings by "using" E.  */
276
#if ! defined lint || defined __GNUC__
277
# define YYUSE(e) ((void) (e))
278
#else
279
# define YYUSE(e) /* empty */
280
#endif
281
 
282
/* Identity function, used to suppress warnings about constant conditions.  */
283
#ifndef lint
284
# define YYID(n) (n)
285
#else
286
#if (defined __STDC__ || defined __C99__FUNC__ \
287
     || defined __cplusplus || defined _MSC_VER)
288
static int
289
YYID (int i)
290
#else
291
static int
292
YYID (i)
293
    int i;
294
#endif
295
{
296
  return i;
297
}
298
#endif
299
 
300
#if ! defined yyoverflow || YYERROR_VERBOSE
301
 
302
/* The parser invokes alloca or malloc; define the necessary symbols.  */
303
 
304
# ifdef YYSTACK_USE_ALLOCA
305
#  if YYSTACK_USE_ALLOCA
306
#   ifdef __GNUC__
307
#    define YYSTACK_ALLOC __builtin_alloca
308
#   elif defined __BUILTIN_VA_ARG_INCR
309
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
310
#   elif defined _AIX
311
#    define YYSTACK_ALLOC __alloca
312
#   elif defined _MSC_VER
313
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
314
#    define alloca _alloca
315
#   else
316
#    define YYSTACK_ALLOC alloca
317
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
318
     || defined __cplusplus || defined _MSC_VER)
319
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
320
#     ifndef _STDLIB_H
321
#      define _STDLIB_H 1
322
#     endif
323
#    endif
324
#   endif
325
#  endif
326
# endif
327
 
328
# ifdef YYSTACK_ALLOC
329
   /* Pacify GCC's `empty if-body' warning.  */
330
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
331
#  ifndef YYSTACK_ALLOC_MAXIMUM
332
    /* The OS might guarantee only one guard page at the bottom of the stack,
333
       and a page size can be as small as 4096 bytes.  So we cannot safely
334
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
335
       to allow for a few compiler-allocated temporary stack slots.  */
336
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
337
#  endif
338
# else
339
#  define YYSTACK_ALLOC YYMALLOC
340
#  define YYSTACK_FREE YYFREE
341
#  ifndef YYSTACK_ALLOC_MAXIMUM
342
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
343
#  endif
344
#  if (defined __cplusplus && ! defined _STDLIB_H \
345
       && ! ((defined YYMALLOC || defined malloc) \
346
             && (defined YYFREE || defined free)))
347
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
348
#   ifndef _STDLIB_H
349
#    define _STDLIB_H 1
350
#   endif
351
#  endif
352
#  ifndef YYMALLOC
353
#   define YYMALLOC malloc
354
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
355
     || defined __cplusplus || defined _MSC_VER)
356
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
357
#   endif
358
#  endif
359
#  ifndef YYFREE
360
#   define YYFREE free
361
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
362
     || defined __cplusplus || defined _MSC_VER)
363
void free (void *); /* INFRINGES ON USER NAME SPACE */
364
#   endif
365
#  endif
366
# endif
367
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
368
 
369
 
370
#if (! defined yyoverflow \
371
     && (! defined __cplusplus \
372
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
373
 
374
/* A type that is properly aligned for any stack member.  */
375
union yyalloc
376
{
377
  yytype_int16 yyss;
378
  YYSTYPE yyvs;
379
  };
380
 
381
/* The size of the maximum gap between one aligned stack and the next.  */
382
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
383
 
384
/* The size of an array large to enough to hold all stacks, each with
385
   N elements.  */
386
# define YYSTACK_BYTES(N) \
387
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
388
      + YYSTACK_GAP_MAXIMUM)
389
 
390
/* Copy COUNT objects from FROM to TO.  The source and destination do
391
   not overlap.  */
392
# ifndef YYCOPY
393
#  if defined __GNUC__ && 1 < __GNUC__
394
#   define YYCOPY(To, From, Count) \
395
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
396
#  else
397
#   define YYCOPY(To, From, Count)              \
398
      do                                        \
399
        {                                       \
400
          YYSIZE_T yyi;                         \
401
          for (yyi = 0; yyi < (Count); yyi++)    \
402
            (To)[yyi] = (From)[yyi];            \
403
        }                                       \
404
      while (YYID (0))
405
#  endif
406
# endif
407
 
408
/* Relocate STACK from its old location to the new one.  The
409
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
410
   elements in the stack, and YYPTR gives the new location of the
411
   stack.  Advance YYPTR to a properly aligned location for the next
412
   stack.  */
413
# define YYSTACK_RELOCATE(Stack)                                        \
414
    do                                                                  \
415
      {                                                                 \
416
        YYSIZE_T yynewbytes;                                            \
417
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
418
        Stack = &yyptr->Stack;                                          \
419
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
420
        yyptr += yynewbytes / sizeof (*yyptr);                          \
421
      }                                                                 \
422
    while (YYID (0))
423
 
424
#endif
425
 
426
/* YYFINAL -- State number of the termination state.  */
427
#define YYFINAL  43
428
/* YYLAST -- Last index in YYTABLE.  */
429
#define YYLAST   95
430
 
431
/* YYNTOKENS -- Number of terminals.  */
432
#define YYNTOKENS  27
433
/* YYNNTS -- Number of nonterminals.  */
434
#define YYNNTS  20
435
/* YYNRULES -- Number of rules.  */
436
#define YYNRULES  40
437
/* YYNRULES -- Number of states.  */
438
#define YYNSTATES  99
439
 
440
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
441
#define YYUNDEFTOK  2
442
#define YYMAXUTOK   281
443
 
444
#define YYTRANSLATE(YYX)                                                \
445
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
446
 
447
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
448
static const yytype_uint8 yytranslate[] =
449
{
450
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
451
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
452
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
453
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
454
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
455
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
456
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
457
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
458
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
459
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
460
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
461
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
462
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
463
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
464
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
465
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
466
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
467
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
468
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
469
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
470
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
471
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
472
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
474
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
475
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
476
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
477
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
478
      25,    26
479
};
480
 
481
#if YYDEBUG
482
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
483
   YYRHS.  */
484
static const yytype_uint8 yyprhs[] =
485
{
486
       0,     0,     3,     5,     8,    10,    12,    14,    16,    18,
487
      20,    22,    24,    26,    28,    30,    32,    34,    36,    43,
488
      48,    53,    60,    65,    70,    75,    82,    87,    94,    99,
489
     106,   113,   122,   127,   134,   139,   144,   146,   148,   150,
490
     152
491
};
492
 
493
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
494
static const yytype_int8 yyrhs[] =
495
{
496
      28,     0,    -1,    29,    -1,    28,    29,    -1,    10,    -1,
497
      30,    -1,    31,    -1,    32,    -1,    33,    -1,    34,    -1,
498
      35,    -1,    36,    -1,    37,    -1,    38,    -1,    39,    -1,
499
      40,    -1,    41,    -1,    26,    -1,    13,    12,     3,    12,
500
       3,    12,    -1,    14,    12,     3,    43,    -1,    15,    12,
501
       3,    43,    -1,    16,    12,     3,    12,     3,    12,    -1,
502
      17,    12,     3,    11,    -1,    17,    12,     3,    44,    -1,
503
      18,    12,     3,    45,    -1,    18,    12,     3,    12,     3,
504
      45,    -1,    19,     6,    12,     7,    -1,    20,    12,     3,
505
       6,    12,     7,    -1,    21,    12,     3,    12,    -1,    22,
506
      12,     3,     4,    12,     5,    -1,    23,    12,     3,     4,
507
      12,     5,    -1,    23,    12,     3,    12,     3,     4,    12,
508
       5,    -1,    24,    12,     3,    42,    -1,    24,    12,     3,
509
      12,     3,    42,    -1,    25,    12,     3,    46,    -1,    25,
510
      12,     3,    11,    -1,     9,    -1,     9,    -1,     9,    -1,
511
       9,    -1,     9,    -1
512
};
513
 
514
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
515
static const yytype_uint8 yyrline[] =
516
{
517
       0,    70,    70,    70,    72,    73,    74,    75,    76,    77,
518
      78,    79,    80,    81,    82,    83,    84,    89,    91,    93,
519
      94,    96,    98,   101,   103,   104,   107,   108,   110,   112,
520
     114,   115,   118,   119,   122,   128,   137,   143,   148,   155,
521
     161
522
};
523
#endif
524
 
525
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
526
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
527
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
528
static const char *const yytname[] =
529
{
530
  "$end", "error", "$undefined", "C", "OBRA", "CBRA", "OSBRA", "CSBRA",
531
  "NUM", "IMM", "LABEL", "USELAB", "REG", "ARI", "LDI", "LSI", "CMP", "BR",
532
  "SHA", "JUMP", "CALL", "MOV", "MEM", "SEL", "SELI", "LDL", "NOP",
533
  "$accept", "asms", "asm", "nop", "ari", "ldsi", "cmp", "br", "sha",
534
  "jmpcall", "mov", "mem", "sel", "seli", "ldl", "imm2b", "imm8b",
535
  "imm8bs", "imm6b", "imm32", 0
536
};
537
#endif
538
 
539
# ifdef YYPRINT
540
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
541
   token YYLEX-NUM.  */
542
static const yytype_uint16 yytoknum[] =
543
{
544
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
545
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
546
     275,   276,   277,   278,   279,   280,   281
547
};
548
# endif
549
 
550
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
551
static const yytype_uint8 yyr1[] =
552
{
553
       0,    27,    28,    28,    29,    29,    29,    29,    29,    29,
554
      29,    29,    29,    29,    29,    29,    29,    30,    31,    32,
555
      32,    33,    34,    34,    35,    35,    36,    36,    37,    38,
556
      39,    39,    40,    40,    41,    41,    42,    43,    44,    45,
557
      46
558
};
559
 
560
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
561
static const yytype_uint8 yyr2[] =
562
{
563
       0,     2,     1,     2,     1,     1,     1,     1,     1,     1,
564
       1,     1,     1,     1,     1,     1,     1,     1,     6,     4,
565
       4,     6,     4,     4,     4,     6,     4,     6,     4,     6,
566
       6,     8,     4,     6,     4,     4,     1,     1,     1,     1,
567
       1
568
};
569
 
570
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
571
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
572
   means the default is an error.  */
573
static const yytype_uint8 yydefact[] =
574
{
575
       0,     4,     0,     0,     0,     0,     0,     0,     0,     0,
576
       0,     0,     0,     0,     0,    17,     0,     2,     5,     6,
577
       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
578
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
579
       0,     0,     0,     1,     3,     0,     0,     0,     0,     0,
580
       0,     0,     0,     0,     0,     0,     0,     0,     0,    37,
581
      19,    20,     0,    38,    22,    23,    39,     0,    24,    26,
582
       0,    28,     0,     0,     0,    36,     0,    32,    40,    35,
583
      34,     0,     0,     0,     0,     0,     0,     0,     0,    18,
584
      21,    25,    27,    29,    30,     0,    33,     0,    31
585
};
586
 
587
/* YYDEFGOTO[NTERM-NUM].  */
588
static const yytype_int8 yydefgoto[] =
589
{
590
      -1,    16,    17,    18,    19,    20,    21,    22,    23,    24,
591
      25,    26,    27,    28,    29,    77,    60,    65,    68,    80
592
};
593
 
594
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
595
   STATE-NUM.  */
596
#define YYPACT_NINF -21
597
static const yytype_int8 yypact[] =
598
{
599
      17,   -21,    -8,    -5,    -4,    -1,    16,    37,     6,    38,
600
      39,    40,    41,    42,    43,   -21,     0,   -21,   -21,   -21,
601
     -21,   -21,   -21,   -21,   -21,   -21,   -21,   -21,   -21,   -21,
602
      26,    45,    53,    54,    55,    56,    48,    58,    59,    60,
603
      61,    62,    63,   -21,   -21,    57,    64,    64,    65,    35,
604
      -7,    67,    66,    68,    71,    -3,    -6,    36,    73,   -21,
605
     -21,   -21,    75,   -21,   -21,   -21,   -21,    76,   -21,   -21,
606
      69,   -21,    70,    72,    80,   -21,    82,   -21,   -21,   -21,
607
     -21,    74,    77,    78,    81,    85,    86,    88,    84,   -21,
608
     -21,   -21,   -21,   -21,   -21,    83,   -21,    89,   -21
609
};
610
 
611
/* YYPGOTO[NTERM-NUM].  */
612
static const yytype_int8 yypgoto[] =
613
{
614
     -21,   -21,    51,   -21,   -21,   -21,   -21,   -21,   -21,   -21,
615
     -21,   -21,   -21,   -21,   -21,   -20,    23,   -21,   -12,   -21
616
};
617
 
618
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
619
   positive, shift that token.  If negative, reduce the rule which
620
   number is the opposite.  If zero, do what YYDEFACT says.
621
   If YYTABLE_NINF, syntax error.  */
622
#define YYTABLE_NINF -1
623
static const yytype_uint8 yytable[] =
624
{
625
      43,    73,    66,    75,    30,    67,    76,    31,    32,    74,
626
       1,    33,    36,     2,     3,     4,     5,     6,     7,     8,
627
       9,    10,    11,    12,    13,    14,    15,     1,    34,    45,
628
       2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
629
      12,    13,    14,    15,    63,    78,    64,    79,    46,    35,
630
      37,    38,    39,    40,    41,    42,    47,    48,    49,    50,
631
      51,    52,    53,    54,    55,    56,    57,    44,    96,    58,
632
      61,    91,    70,    59,    69,    72,    81,    62,    82,    83,
633
      71,    84,    85,    87,    86,    88,    89,    66,    92,    90,
634
      93,    94,    95,    75,    98,    97
635
};
636
 
637
static const yytype_uint8 yycheck[] =
638
{
639
       0,     4,     9,     9,    12,    12,    12,    12,    12,    12,
640
      10,    12,     6,    13,    14,    15,    16,    17,    18,    19,
641
      20,    21,    22,    23,    24,    25,    26,    10,    12,     3,
642
      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
643
      23,    24,    25,    26,     9,     9,    11,    11,     3,    12,
644
      12,    12,    12,    12,    12,    12,     3,     3,     3,     3,
645
      12,     3,     3,     3,     3,     3,     3,    16,    88,    12,
646
      47,    83,     6,     9,     7,     4,     3,    12,     3,     3,
647
      12,    12,    12,     3,    12,     3,    12,     9,     7,    12,
648
       5,     5,     4,     9,     5,    12
649
};
650
 
651
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
652
   symbol of state STATE-NUM.  */
653
static const yytype_uint8 yystos[] =
654
{
655
       0,    10,    13,    14,    15,    16,    17,    18,    19,    20,
656
      21,    22,    23,    24,    25,    26,    28,    29,    30,    31,
657
      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
658
      12,    12,    12,    12,    12,    12,     6,    12,    12,    12,
659
      12,    12,    12,     0,    29,     3,     3,     3,     3,     3,
660
       3,    12,     3,     3,     3,     3,     3,     3,    12,     9,
661
      43,    43,    12,     9,    11,    44,     9,    12,    45,     7,
662
       6,    12,     4,     4,    12,     9,    12,    42,     9,    11,
663
      46,     3,     3,     3,    12,    12,    12,     3,     3,    12,
664
      12,    45,     7,     5,     5,     4,    42,    12,     5
665
};
666
 
667
#define yyerrok         (yyerrstatus = 0)
668
#define yyclearin       (yychar = YYEMPTY)
669
#define YYEMPTY         (-2)
670
#define YYEOF           0
671
 
672
#define YYACCEPT        goto yyacceptlab
673
#define YYABORT         goto yyabortlab
674
#define YYERROR         goto yyerrorlab
675
 
676
 
677
/* Like YYERROR except do call yyerror.  This remains here temporarily
678
   to ease the transition to the new meaning of YYERROR, for GCC.
679
   Once GCC version 2 has supplanted version 1, this can go.  */
680
 
681
#define YYFAIL          goto yyerrlab
682
 
683
#define YYRECOVERING()  (!!yyerrstatus)
684
 
685
#define YYBACKUP(Token, Value)                                  \
686
do                                                              \
687
  if (yychar == YYEMPTY && yylen == 1)                          \
688
    {                                                           \
689
      yychar = (Token);                                         \
690
      yylval = (Value);                                         \
691
      yytoken = YYTRANSLATE (yychar);                           \
692
      YYPOPSTACK (1);                                           \
693
      goto yybackup;                                            \
694
    }                                                           \
695
  else                                                          \
696
    {                                                           \
697
      yyerror (YY_("syntax error: cannot back up")); \
698
      YYERROR;                                                  \
699
    }                                                           \
700
while (YYID (0))
701
 
702
 
703
#define YYTERROR        1
704
#define YYERRCODE       256
705
 
706
 
707
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
708
   If N is 0, then set CURRENT to the empty location which ends
709
   the previous symbol: RHS[0] (always defined).  */
710
 
711
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
712
#ifndef YYLLOC_DEFAULT
713
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
714
    do                                                                  \
715
      if (YYID (N))                                                    \
716
        {                                                               \
717
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
718
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
719
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
720
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
721
        }                                                               \
722
      else                                                              \
723
        {                                                               \
724
          (Current).first_line   = (Current).last_line   =              \
725
            YYRHSLOC (Rhs, 0).last_line;                         \
726
          (Current).first_column = (Current).last_column =              \
727
            YYRHSLOC (Rhs, 0).last_column;                               \
728
        }                                                               \
729
    while (YYID (0))
730
#endif
731
 
732
 
733
/* YY_LOCATION_PRINT -- Print the location on the stream.
734
   This macro was not mandated originally: define only if we know
735
   we won't break user code: when these are the locations we know.  */
736
 
737
#ifndef YY_LOCATION_PRINT
738
# if YYLTYPE_IS_TRIVIAL
739
#  define YY_LOCATION_PRINT(File, Loc)                  \
740
     fprintf (File, "%d.%d-%d.%d",                      \
741
              (Loc).first_line, (Loc).first_column,     \
742
              (Loc).last_line,  (Loc).last_column)
743
# else
744
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
745
# endif
746
#endif
747
 
748
 
749
/* YYLEX -- calling `yylex' with the right arguments.  */
750
 
751
#ifdef YYLEX_PARAM
752
# define YYLEX yylex (YYLEX_PARAM)
753
#else
754
# define YYLEX yylex ()
755
#endif
756
 
757
/* Enable debugging if requested.  */
758
#if YYDEBUG
759
 
760
# ifndef YYFPRINTF
761
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
762
#  define YYFPRINTF fprintf
763
# endif
764
 
765
# define YYDPRINTF(Args)                        \
766
do {                                            \
767
  if (yydebug)                                  \
768
    YYFPRINTF Args;                             \
769
} while (YYID (0))
770
 
771
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
772
do {                                                                      \
773
  if (yydebug)                                                            \
774
    {                                                                     \
775
      YYFPRINTF (stderr, "%s ", Title);                                   \
776
      yy_symbol_print (stderr,                                            \
777
                  Type, Value); \
778
      YYFPRINTF (stderr, "\n");                                           \
779
    }                                                                     \
780
} while (YYID (0))
781
 
782
 
783
/*--------------------------------.
784
| Print this symbol on YYOUTPUT.  |
785
`--------------------------------*/
786
 
787
/*ARGSUSED*/
788
#if (defined __STDC__ || defined __C99__FUNC__ \
789
     || defined __cplusplus || defined _MSC_VER)
790
static void
791
yy_symbol_value_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep)
792
#else
793
static void
794
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
795
    FILE *yyoutput;
796
    int yytype;
797
    const YYSTYPE * const yyvaluep;
798
#endif
799
{
800
  if (!yyvaluep)
801
    return;
802
# ifdef YYPRINT
803
  if (yytype < YYNTOKENS)
804
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
805
# else
806
  YYUSE (yyoutput);
807
# endif
808
  switch (yytype)
809
    {
810
      default:
811
        break;
812
    }
813
}
814
 
815
 
816
/*--------------------------------.
817
| Print this symbol on YYOUTPUT.  |
818
`--------------------------------*/
819
 
820
#if (defined __STDC__ || defined __C99__FUNC__ \
821
     || defined __cplusplus || defined _MSC_VER)
822
static void
823
yy_symbol_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep)
824
#else
825
static void
826
yy_symbol_print (yyoutput, yytype, yyvaluep)
827
    FILE *yyoutput;
828
    int yytype;
829
    const YYSTYPE * const yyvaluep;
830
#endif
831
{
832
  if (yytype < YYNTOKENS)
833
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
834
  else
835
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
836
 
837
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
838
  YYFPRINTF (yyoutput, ")");
839
}
840
 
841
/*------------------------------------------------------------------.
842
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
843
| TOP (included).                                                   |
844
`------------------------------------------------------------------*/
845
 
846
#if (defined __STDC__ || defined __C99__FUNC__ \
847
     || defined __cplusplus || defined _MSC_VER)
848
static void
849
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
850
#else
851
static void
852
yy_stack_print (bottom, top)
853
    yytype_int16 *bottom;
854
    yytype_int16 *top;
855
#endif
856
{
857
  YYFPRINTF (stderr, "Stack now");
858
  for (; bottom <= top; ++bottom)
859
    YYFPRINTF (stderr, " %d", *bottom);
860
  YYFPRINTF (stderr, "\n");
861
}
862
 
863
# define YY_STACK_PRINT(Bottom, Top)                            \
864
do {                                                            \
865
  if (yydebug)                                                  \
866
    yy_stack_print ((Bottom), (Top));                           \
867
} while (YYID (0))
868
 
869
 
870
/*------------------------------------------------.
871
| Report that the YYRULE is going to be reduced.  |
872
`------------------------------------------------*/
873
 
874
#if (defined __STDC__ || defined __C99__FUNC__ \
875
     || defined __cplusplus || defined _MSC_VER)
876
static void
877
yy_reduce_print (YYSTYPE *yyvsp,
878
                   int yyrule)
879
#else
880
static void
881
yy_reduce_print (yyvsp, yyrule
882
                   )
883
    YYSTYPE *yyvsp;
884
 
885
                   int yyrule;
886
#endif
887
{
888
  int yynrhs = yyr2[yyrule];
889
  int yyi;
890
  unsigned long int yylno = yyrline[yyrule];
891
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
892
             yyrule - 1, yylno);
893
  /* The symbols being reduced.  */
894
  for (yyi = 0; yyi < yynrhs; yyi++)
895
    {
896
      fprintf (stderr, "   $%d = ", yyi + 1);
897
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
898
                       &(yyvsp[(yyi + 1) - (yynrhs)])
899
                                       );
900
      fprintf (stderr, "\n");
901
    }
902
}
903
 
904
# define YY_REDUCE_PRINT(Rule)          \
905
do {                                    \
906
  if (yydebug)                          \
907
    yy_reduce_print (yyvsp, Rule); \
908
} while (YYID (0))
909
 
910
/* Nonzero means print parse trace.  It is left uninitialized so that
911
   multiple parsers can coexist.  */
912
int yydebug;
913
#else /* !YYDEBUG */
914
# define YYDPRINTF(Args)
915
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
916
# define YY_STACK_PRINT(Bottom, Top)
917
# define YY_REDUCE_PRINT(Rule)
918
#endif /* !YYDEBUG */
919
 
920
 
921
/* YYINITDEPTH -- initial size of the parser's stacks.  */
922
#ifndef YYINITDEPTH
923
# define YYINITDEPTH 200
924
#endif
925
 
926
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
927
   if the built-in stack extension method is used).
928
 
929
   Do not make this value too large; the results are undefined if
930
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
931
   evaluated with infinite-precision integer arithmetic.  */
932
 
933
#ifndef YYMAXDEPTH
934
# define YYMAXDEPTH 10000
935
#endif
936
 
937
 
938
 
939
#if YYERROR_VERBOSE
940
 
941
# ifndef yystrlen
942
#  if defined __GLIBC__ && defined _STRING_H
943
#   define yystrlen strlen
944
#  else
945
/* Return the length of YYSTR.  */
946
#if (defined __STDC__ || defined __C99__FUNC__ \
947
     || defined __cplusplus || defined _MSC_VER)
948
static YYSIZE_T
949
yystrlen (const char *yystr)
950
#else
951
static YYSIZE_T
952
yystrlen (yystr)
953
    const char *yystr;
954
#endif
955
{
956
  YYSIZE_T yylen;
957
  for (yylen = 0; yystr[yylen]; yylen++)
958
    continue;
959
  return yylen;
960
}
961
#  endif
962
# endif
963
 
964
# ifndef yystpcpy
965
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
966
#   define yystpcpy stpcpy
967
#  else
968
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
969
   YYDEST.  */
970
#if (defined __STDC__ || defined __C99__FUNC__ \
971
     || defined __cplusplus || defined _MSC_VER)
972
static char *
973
yystpcpy (char *yydest, const char *yysrc)
974
#else
975
static char *
976
yystpcpy (yydest, yysrc)
977
    char *yydest;
978
    const char *yysrc;
979
#endif
980
{
981
  char *yyd = yydest;
982
  const char *yys = yysrc;
983
 
984
  while ((*yyd++ = *yys++) != '\0')
985
    continue;
986
 
987
  return yyd - 1;
988
}
989
#  endif
990
# endif
991
 
992
# ifndef yytnamerr
993
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
994
   quotes and backslashes, so that it's suitable for yyerror.  The
995
   heuristic is that double-quoting is unnecessary unless the string
996
   contains an apostrophe, a comma, or backslash (other than
997
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
998
   null, do not copy; instead, return the length of what the result
999
   would have been.  */
1000
static YYSIZE_T
1001
yytnamerr (char *yyres, const char *yystr)
1002
{
1003
  if (*yystr == '"')
1004
    {
1005
      YYSIZE_T yyn = 0;
1006
      char const *yyp = yystr;
1007
 
1008
      for (;;)
1009
        switch (*++yyp)
1010
          {
1011
          case '\'':
1012
          case ',':
1013
            goto do_not_strip_quotes;
1014
 
1015
          case '\\':
1016
            if (*++yyp != '\\')
1017
              goto do_not_strip_quotes;
1018
            /* Fall through.  */
1019
          default:
1020
            if (yyres)
1021
              yyres[yyn] = *yyp;
1022
            yyn++;
1023
            break;
1024
 
1025
          case '"':
1026
            if (yyres)
1027
              yyres[yyn] = '\0';
1028
            return yyn;
1029
          }
1030
    do_not_strip_quotes: ;
1031
    }
1032
 
1033
  if (! yyres)
1034
    return yystrlen (yystr);
1035
 
1036
  return yystpcpy (yyres, yystr) - yyres;
1037
}
1038
# endif
1039
 
1040
/* Copy into YYRESULT an error message about the unexpected token
1041
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1042
   including the terminating null byte.  If YYRESULT is null, do not
1043
   copy anything; just return the number of bytes that would be
1044
   copied.  As a special case, return 0 if an ordinary "syntax error"
1045
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1046
   size calculation.  */
1047
static YYSIZE_T
1048
yysyntax_error (char *yyresult, int yystate, int yychar)
1049
{
1050
  int yyn = yypact[yystate];
1051
 
1052
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1053
    return 0;
1054
  else
1055
    {
1056
      int yytype = YYTRANSLATE (yychar);
1057
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1058
      YYSIZE_T yysize = yysize0;
1059
      YYSIZE_T yysize1;
1060
      int yysize_overflow = 0;
1061
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1062
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1063
      int yyx;
1064
 
1065
# if 0
1066
      /* This is so xgettext sees the translatable formats that are
1067
         constructed on the fly.  */
1068
      YY_("syntax error, unexpected %s");
1069
      YY_("syntax error, unexpected %s, expecting %s");
1070
      YY_("syntax error, unexpected %s, expecting %s or %s");
1071
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1072
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1073
# endif
1074
      char *yyfmt;
1075
      char const *yyf;
1076
      static char const yyunexpected[] = "syntax error, unexpected %s";
1077
      static char const yyexpecting[] = ", expecting %s";
1078
      static char const yyor[] = " or %s";
1079
      char yyformat[sizeof yyunexpected
1080
                    + sizeof yyexpecting - 1
1081
                    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1082
                       * (sizeof yyor - 1))];
1083
      char const *yyprefix = yyexpecting;
1084
 
1085
      /* Start YYX at -YYN if negative to avoid negative indexes in
1086
         YYCHECK.  */
1087
      int yyxbegin = yyn < 0 ? -yyn : 0;
1088
 
1089
      /* Stay within bounds of both yycheck and yytname.  */
1090
      int yychecklim = YYLAST - yyn + 1;
1091
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1092
      int yycount = 1;
1093
 
1094
      yyarg[0] = yytname[yytype];
1095
      yyfmt = yystpcpy (yyformat, yyunexpected);
1096
 
1097
      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1098
        if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1099
          {
1100
            if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1101
              {
1102
                yycount = 1;
1103
                yysize = yysize0;
1104
                yyformat[sizeof yyunexpected - 1] = '\0';
1105
                break;
1106
              }
1107
            yyarg[yycount++] = yytname[yyx];
1108
            yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1109
            yysize_overflow |= (yysize1 < yysize);
1110
            yysize = yysize1;
1111
            yyfmt = yystpcpy (yyfmt, yyprefix);
1112
            yyprefix = yyor;
1113
          }
1114
 
1115
      yyf = YY_(yyformat);
1116
      yysize1 = yysize + yystrlen (yyf);
1117
      yysize_overflow |= (yysize1 < yysize);
1118
      yysize = yysize1;
1119
 
1120
      if (yysize_overflow)
1121
        return YYSIZE_MAXIMUM;
1122
 
1123
      if (yyresult)
1124
        {
1125
          /* Avoid sprintf, as that infringes on the user's name space.
1126
             Don't have undefined behavior even if the translation
1127
             produced a string with the wrong number of "%s"s.  */
1128
          char *yyp = yyresult;
1129
          int yyi = 0;
1130
          while ((*yyp = *yyf) != '\0')
1131
            {
1132
              if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1133
                {
1134
                  yyp += yytnamerr (yyp, yyarg[yyi++]);
1135
                  yyf += 2;
1136
                }
1137
              else
1138
                {
1139
                  yyp++;
1140
                  yyf++;
1141
                }
1142
            }
1143
        }
1144
      return yysize;
1145
    }
1146
}
1147
#endif /* YYERROR_VERBOSE */
1148
 
1149
 
1150
/*-----------------------------------------------.
1151
| Release the memory associated to this symbol.  |
1152
`-----------------------------------------------*/
1153
 
1154
/*ARGSUSED*/
1155
#if (defined __STDC__ || defined __C99__FUNC__ \
1156
     || defined __cplusplus || defined _MSC_VER)
1157
static void
1158
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1159
#else
1160
static void
1161
yydestruct (yymsg, yytype, yyvaluep)
1162
    const char *yymsg;
1163
    int yytype;
1164
    YYSTYPE *yyvaluep;
1165
#endif
1166
{
1167
  YYUSE (yyvaluep);
1168
 
1169
  if (!yymsg)
1170
    yymsg = "Deleting";
1171
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1172
 
1173
  switch (yytype)
1174
    {
1175
 
1176
      default:
1177
        break;
1178
    }
1179
}
1180
 
1181
 
1182
/* Prevent warnings from -Wmissing-prototypes.  */
1183
 
1184
#ifdef YYPARSE_PARAM
1185
#if defined __STDC__ || defined __cplusplus
1186
int yyparse (void *YYPARSE_PARAM);
1187
#else
1188
int yyparse ();
1189
#endif
1190
#else /* ! YYPARSE_PARAM */
1191
#if defined __STDC__ || defined __cplusplus
1192
int yyparse (void);
1193
#else
1194
int yyparse ();
1195
#endif
1196
#endif /* ! YYPARSE_PARAM */
1197
 
1198
 
1199
 
1200
/* The look-ahead symbol.  */
1201
int yychar;
1202
 
1203
/* The semantic value of the look-ahead symbol.  */
1204
YYSTYPE yylval;
1205
 
1206
/* Number of syntax errors so far.  */
1207
int yynerrs;
1208
 
1209
 
1210
 
1211
/*----------.
1212
| yyparse.  |
1213
`----------*/
1214
 
1215
#ifdef YYPARSE_PARAM
1216
#if (defined __STDC__ || defined __C99__FUNC__ \
1217
     || defined __cplusplus || defined _MSC_VER)
1218
int
1219
yyparse (void *YYPARSE_PARAM)
1220
#else
1221
int
1222
yyparse (YYPARSE_PARAM)
1223
    void *YYPARSE_PARAM;
1224
#endif
1225
#else /* ! YYPARSE_PARAM */
1226
#if (defined __STDC__ || defined __C99__FUNC__ \
1227
     || defined __cplusplus || defined _MSC_VER)
1228
int
1229
yyparse (void)
1230
#else
1231
int
1232
yyparse ()
1233
 
1234
#endif
1235
#endif
1236
{
1237
 
1238
  int yystate;
1239
  int yyn;
1240
  int yyresult;
1241
  /* Number of tokens to shift before error messages enabled.  */
1242
  int yyerrstatus;
1243
  /* Look-ahead token as an internal (translated) token number.  */
1244
  int yytoken = 0;
1245
#if YYERROR_VERBOSE
1246
  /* Buffer for error messages, and its allocated size.  */
1247
  char yymsgbuf[128];
1248
  char *yymsg = yymsgbuf;
1249
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1250
#endif
1251
 
1252
  /* Three stacks and their tools:
1253
     `yyss': related to states,
1254
     `yyvs': related to semantic values,
1255
     `yyls': related to locations.
1256
 
1257
     Refer to the stacks thru separate pointers, to allow yyoverflow
1258
     to reallocate them elsewhere.  */
1259
 
1260
  /* The state stack.  */
1261
  yytype_int16 yyssa[YYINITDEPTH];
1262
  yytype_int16 *yyss = yyssa;
1263
  yytype_int16 *yyssp;
1264
 
1265
  /* The semantic value stack.  */
1266
  YYSTYPE yyvsa[YYINITDEPTH];
1267
  YYSTYPE *yyvs = yyvsa;
1268
  YYSTYPE *yyvsp;
1269
 
1270
 
1271
 
1272
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1273
 
1274
  YYSIZE_T yystacksize = YYINITDEPTH;
1275
 
1276
  /* The variables used to return semantic value and location from the
1277
     action routines.  */
1278
  YYSTYPE yyval;
1279
 
1280
 
1281
  /* The number of symbols on the RHS of the reduced rule.
1282
     Keep to zero when no symbol should be popped.  */
1283
  int yylen = 0;
1284
 
1285
  YYDPRINTF ((stderr, "Starting parse\n"));
1286
 
1287
  yystate = 0;
1288
  yyerrstatus = 0;
1289
  yynerrs = 0;
1290
  yychar = YYEMPTY;             /* Cause a token to be read.  */
1291
 
1292
  /* Initialize stack pointers.
1293
     Waste one element of value and location stack
1294
     so that they stay on the same level as the state stack.
1295
     The wasted elements are never initialized.  */
1296
 
1297
  yyssp = yyss;
1298
  yyvsp = yyvs;
1299
 
1300
  goto yysetstate;
1301
 
1302
/*------------------------------------------------------------.
1303
| yynewstate -- Push a new state, which is found in yystate.  |
1304
`------------------------------------------------------------*/
1305
 yynewstate:
1306
  /* In all cases, when you get here, the value and location stacks
1307
     have just been pushed.  So pushing a state here evens the stacks.  */
1308
  yyssp++;
1309
 
1310
 yysetstate:
1311
  *yyssp = yystate;
1312
 
1313
  if (yyss + yystacksize - 1 <= yyssp)
1314
    {
1315
      /* Get the current used size of the three stacks, in elements.  */
1316
      YYSIZE_T yysize = yyssp - yyss + 1;
1317
 
1318
#ifdef yyoverflow
1319
      {
1320
        /* Give user a chance to reallocate the stack.  Use copies of
1321
           these so that the &'s don't force the real ones into
1322
           memory.  */
1323
        YYSTYPE *yyvs1 = yyvs;
1324
        yytype_int16 *yyss1 = yyss;
1325
 
1326
 
1327
        /* Each stack pointer address is followed by the size of the
1328
           data in use in that stack, in bytes.  This used to be a
1329
           conditional around just the two extra args, but that might
1330
           be undefined if yyoverflow is a macro.  */
1331
        yyoverflow (YY_("memory exhausted"),
1332
                    &yyss1, yysize * sizeof (*yyssp),
1333
                    &yyvs1, yysize * sizeof (*yyvsp),
1334
 
1335
                    &yystacksize);
1336
 
1337
        yyss = yyss1;
1338
        yyvs = yyvs1;
1339
      }
1340
#else /* no yyoverflow */
1341
# ifndef YYSTACK_RELOCATE
1342
      goto yyexhaustedlab;
1343
# else
1344
      /* Extend the stack our own way.  */
1345
      if (YYMAXDEPTH <= yystacksize)
1346
        goto yyexhaustedlab;
1347
      yystacksize *= 2;
1348
      if (YYMAXDEPTH < yystacksize)
1349
        yystacksize = YYMAXDEPTH;
1350
 
1351
      {
1352
        yytype_int16 *yyss1 = yyss;
1353
        union yyalloc *yyptr =
1354
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1355
        if (! yyptr)
1356
          goto yyexhaustedlab;
1357
        YYSTACK_RELOCATE (yyss);
1358
        YYSTACK_RELOCATE (yyvs);
1359
 
1360
#  undef YYSTACK_RELOCATE
1361
        if (yyss1 != yyssa)
1362
          YYSTACK_FREE (yyss1);
1363
      }
1364
# endif
1365
#endif /* no yyoverflow */
1366
 
1367
      yyssp = yyss + yysize - 1;
1368
      yyvsp = yyvs + yysize - 1;
1369
 
1370
 
1371
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1372
                  (unsigned long int) yystacksize));
1373
 
1374
      if (yyss + yystacksize - 1 <= yyssp)
1375
        YYABORT;
1376
    }
1377
 
1378
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1379
 
1380
  goto yybackup;
1381
 
1382
/*-----------.
1383
| yybackup.  |
1384
`-----------*/
1385
yybackup:
1386
 
1387
  /* Do appropriate processing given the current state.  Read a
1388
     look-ahead token if we need one and don't already have one.  */
1389
 
1390
  /* First try to decide what to do without reference to look-ahead token.  */
1391
  yyn = yypact[yystate];
1392
  if (yyn == YYPACT_NINF)
1393
    goto yydefault;
1394
 
1395
  /* Not known => get a look-ahead token if don't already have one.  */
1396
 
1397
  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1398
  if (yychar == YYEMPTY)
1399
    {
1400
      YYDPRINTF ((stderr, "Reading a token: "));
1401
      yychar = YYLEX;
1402
    }
1403
 
1404
  if (yychar <= YYEOF)
1405
    {
1406
      yychar = yytoken = YYEOF;
1407
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1408
    }
1409
  else
1410
    {
1411
      yytoken = YYTRANSLATE (yychar);
1412
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1413
    }
1414
 
1415
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1416
     detect an error, take that action.  */
1417
  yyn += yytoken;
1418
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1419
    goto yydefault;
1420
  yyn = yytable[yyn];
1421
  if (yyn <= 0)
1422
    {
1423
      if (yyn == 0 || yyn == YYTABLE_NINF)
1424
        goto yyerrlab;
1425
      yyn = -yyn;
1426
      goto yyreduce;
1427
    }
1428
 
1429
  if (yyn == YYFINAL)
1430
    YYACCEPT;
1431
 
1432
  /* Count tokens shifted since error; after three, turn off error
1433
     status.  */
1434
  if (yyerrstatus)
1435
    yyerrstatus--;
1436
 
1437
  /* Shift the look-ahead token.  */
1438
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1439
 
1440
  /* Discard the shifted token unless it is eof.  */
1441
  if (yychar != YYEOF)
1442
    yychar = YYEMPTY;
1443
 
1444
  yystate = yyn;
1445
  *++yyvsp = yylval;
1446
 
1447
  goto yynewstate;
1448
 
1449
 
1450
/*-----------------------------------------------------------.
1451
| yydefault -- do the default action for the current state.  |
1452
`-----------------------------------------------------------*/
1453
yydefault:
1454
  yyn = yydefact[yystate];
1455
  if (yyn == 0)
1456
    goto yyerrlab;
1457
  goto yyreduce;
1458
 
1459
 
1460
/*-----------------------------.
1461
| yyreduce -- Do a reduction.  |
1462
`-----------------------------*/
1463
yyreduce:
1464
  /* yyn is the number of a rule to reduce with.  */
1465
  yylen = yyr2[yyn];
1466
 
1467
  /* If YYLEN is nonzero, implement the default value of the action:
1468
     `$$ = $1'.
1469
 
1470
     Otherwise, the following line sets YYVAL to garbage.
1471
     This behavior is undocumented and Bison
1472
     users should not rely upon it.  Assigning to YYVAL
1473
     unconditionally makes the parser a bit smaller, and it avoids a
1474
     GCC warning that YYVAL may be used uninitialized.  */
1475
  yyval = yyvsp[1-yylen];
1476
 
1477
 
1478
  YY_REDUCE_PRINT (yyn);
1479
  switch (yyn)
1480
    {
1481
        case 4:
1482
#line 72 "yacc.in"
1483
    {if(firstpass)add_label((yyvsp[(1) - (1)].str), address);;}
1484
    break;
1485
 
1486
  case 5:
1487
#line 73 "yacc.in"
1488
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1489
    break;
1490
 
1491
  case 6:
1492
#line 74 "yacc.in"
1493
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1494
    break;
1495
 
1496
  case 7:
1497
#line 75 "yacc.in"
1498
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1499
    break;
1500
 
1501
  case 8:
1502
#line 76 "yacc.in"
1503
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1504
    break;
1505
 
1506
  case 9:
1507
#line 77 "yacc.in"
1508
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1509
    break;
1510
 
1511
  case 10:
1512
#line 78 "yacc.in"
1513
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1514
    break;
1515
 
1516
  case 11:
1517
#line 79 "yacc.in"
1518
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1519
    break;
1520
 
1521
  case 12:
1522
#line 80 "yacc.in"
1523
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1524
    break;
1525
 
1526
  case 13:
1527
#line 81 "yacc.in"
1528
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1529
    break;
1530
 
1531
  case 14:
1532
#line 82 "yacc.in"
1533
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1534
    break;
1535
 
1536
  case 15:
1537
#line 83 "yacc.in"
1538
    {if(!firstpass)xprintf((yyvsp[(1) - (1)].num));address++;;}
1539
    break;
1540
 
1541
  case 16:
1542
#line 84 "yacc.in"
1543
    {;;}
1544
    break;
1545
 
1546
  case 17:
1547
#line 89 "yacc.in"
1548
    { (yyval.num) = (yyvsp[(1) - (1)].num); ;}
1549
    break;
1550
 
1551
  case 18:
1552
#line 91 "yacc.in"
1553
    { (yyval.num) = ((yyvsp[(1) - (6)].num)<<12) | ((yyvsp[(2) - (6)].num)<<8) | ((yyvsp[(4) - (6)].num)<<4) | (yyvsp[(6) - (6)].num); ;}
1554
    break;
1555
 
1556
  case 19:
1557
#line 93 "yacc.in"
1558
    { (yyval.num) = (0x6000) | ((yyvsp[(2) - (4)].num)<<8) | ((yyvsp[(4) - (4)].num)&0xff); ;}
1559
    break;
1560
 
1561
  case 20:
1562
#line 94 "yacc.in"
1563
    { (yyval.num) = (0x7000) | ((yyvsp[(2) - (4)].num)<<8) | ((yyvsp[(4) - (4)].num)&0xff); ;}
1564
    break;
1565
 
1566
  case 21:
1567
#line 96 "yacc.in"
1568
    { (yyval.num) = (0x8000) | ((yyvsp[(1) - (6)].num)<<12) | ((yyvsp[(2) - (6)].num)<<8) | ((yyvsp[(4) - (6)].num)<<4) | (yyvsp[(6) - (6)].num);;}
1569
    break;
1570
 
1571
  case 22:
1572
#line 98 "yacc.in"
1573
    { (yyval.num) = (0xc000) | ((yyvsp[(1) - (4)].num)<<12) | (((get_label((yyvsp[(4) - (4)].str))-address)&0xff) << 4) | (yyvsp[(2) - (4)].num);
1574
                                                                                //      if(!firstpass) printf(" @%d - %d: %d",  address, $4, get_label($4)); 
1575
                                                                                ;}
1576
    break;
1577
 
1578
  case 23:
1579
#line 101 "yacc.in"
1580
    { (yyval.num) = (0xc000) | ((yyvsp[(1) - (4)].num)<<12) | (((yyvsp[(4) - (4)].num)&0xff) << 4) | (yyvsp[(2) - (4)].num); ;}
1581
    break;
1582
 
1583
  case 24:
1584
#line 103 "yacc.in"
1585
    { (yyval.num) = (0xe000) | ((yyvsp[(2) - (4)].num)<<8) | ((yyvsp[(1) - (4)].num)<<6) | ((yyvsp[(4) - (4)].num)&0x3f); ;}
1586
    break;
1587
 
1588
  case 25:
1589
#line 104 "yacc.in"
1590
    { if(((yyvsp[(2) - (6)].num)^0x8) != (yyvsp[(4) - (6)].num)) { yyerror("wrong sister register"); YYERROR; }
1591
                                                                                  (yyval.num) = (0xe000) | ((yyvsp[(2) - (6)].num)<<8) | (1<<7) | ((yyvsp[(1) - (6)].num)<<6) | ((yyvsp[(6) - (6)].num)&0x3f); ;}
1592
    break;
1593
 
1594
  case 26:
1595
#line 107 "yacc.in"
1596
    { (yyval.num) = (0xf000) | ((yyvsp[(3) - (4)].num)<<4) | (yyvsp[(1) - (4)].num); ;}
1597
    break;
1598
 
1599
  case 27:
1600
#line 108 "yacc.in"
1601
    { (yyval.num) = (0xf000) | ((yyvsp[(2) - (6)].num)<<8) | ((yyvsp[(5) - (6)].num)<<4) | (yyvsp[(1) - (6)].num); ;}
1602
    break;
1603
 
1604
  case 28:
1605
#line 110 "yacc.in"
1606
    { (yyval.num) = (0xf000) | ((yyvsp[(2) - (4)].num)<<8) | ((yyvsp[(4) - (4)].num)<<4) | 1; ;}
1607
    break;
1608
 
1609
  case 29:
1610
#line 112 "yacc.in"
1611
    { (yyval.num) = (0xf000) | ((yyvsp[(2) - (6)].num)<<8) | ((yyvsp[(5) - (6)].num)<<4) | (yyvsp[(1) - (6)].num); ;}
1612
    break;
1613
 
1614
  case 30:
1615
#line 114 "yacc.in"
1616
    { (yyval.num) = (0xf000) | ((yyvsp[(2) - (6)].num)<<8) | ((yyvsp[(5) - (6)].num)<<4) | (yyvsp[(1) - (6)].num); ;}
1617
    break;
1618
 
1619
  case 31:
1620
#line 115 "yacc.in"
1621
    { if(((yyvsp[(2) - (8)].num)^0x8) != (yyvsp[(4) - (8)].num)) { yyerror("wrong sister register"); YYERROR; }
1622
                                                                                  (yyval.num) = (0xf000) | ((yyvsp[(2) - (8)].num)<<8) | ((yyvsp[(7) - (8)].num)<<4) | (1<<3) | (yyvsp[(1) - (8)].num); ;}
1623
    break;
1624
 
1625
  case 32:
1626
#line 118 "yacc.in"
1627
    { (yyval.num) = (0xf000) | ((yyvsp[(2) - (4)].num)<<8) | ((yyvsp[(4) - (4)].num)<<6) | (yyvsp[(1) - (4)].num); ;}
1628
    break;
1629
 
1630
  case 33:
1631
#line 119 "yacc.in"
1632
    { if(((yyvsp[(2) - (6)].num)^0x8) != (yyvsp[(4) - (6)].num)) { yyerror("wrong sister register"); YYERROR; }
1633
                                                                                  (yyval.num) = (0xf000) | ((yyvsp[(2) - (6)].num)<<8) | ((yyvsp[(6) - (6)].num)<<4) | (1<<3) | (yyvsp[(1) - (6)].num); ;}
1634
    break;
1635
 
1636
  case 34:
1637
#line 123 "yacc.in"
1638
    { if(!firstpass)xprintf(0x6000|((yyvsp[(2) - (4)].num)<<8)|(((yyvsp[(4) - (4)].num)>>24)&0xff));address++;
1639
                                  if(!firstpass)xprintf(0x7000|((yyvsp[(2) - (4)].num)<<8)|(((yyvsp[(4) - (4)].num)>>18)&0xff));address++;
1640
                                  if(!firstpass)xprintf(0x7000|((yyvsp[(2) - (4)].num)<<8)|(((yyvsp[(4) - (4)].num)>>8)&0xff));address++;
1641
                                  if(!firstpass)xprintf(0x7000|((yyvsp[(2) - (4)].num)<<8)|(((yyvsp[(4) - (4)].num)>>0)&0xff));address++;
1642
                                ;}
1643
    break;
1644
 
1645
  case 35:
1646
#line 129 "yacc.in"
1647
    { temp = get_abs_label((yyvsp[(4) - (4)].str));
1648
                                  if(!firstpass)xprintf(0x6000|((yyvsp[(2) - (4)].num)<<8)|((temp>>24)&0xff));address++;
1649
                                  if(!firstpass)xprintf(0x7000|((yyvsp[(2) - (4)].num)<<8)|((temp>>18)&0xff));address++;
1650
                                  if(!firstpass)xprintf(0x7000|((yyvsp[(2) - (4)].num)<<8)|((temp>>8)&0xff));address++;
1651
                                  if(!firstpass)xprintf(0x7000|((yyvsp[(2) - (4)].num)<<8)|((temp>>0)&0xff));address++;
1652
                                ;}
1653
    break;
1654
 
1655
  case 36:
1656
#line 137 "yacc.in"
1657
    {
1658
                                        temp = check_imm((yyvsp[(1) - (1)].str), &(yyval.num), 0, 3);
1659
                                        if(temp==1) { yyerror("2 Bit immediate expected"); YYERROR; }
1660
                                        if(temp==2) { yyerror("Immediate syntax"); YYERROR; }
1661
                                ;}
1662
    break;
1663
 
1664
  case 37:
1665
#line 143 "yacc.in"
1666
    {
1667
                                        temp = check_imm((yyvsp[(1) - (1)].str), &(yyval.num), 0, 255);
1668
                                        if(temp==1) { yyerror("8 Bit unsigned immediate expected"); YYERROR; }
1669
                                        if(temp==2) { yyerror("Immediate syntax"); YYERROR; }
1670
                                ;}
1671
    break;
1672
 
1673
  case 38:
1674
#line 148 "yacc.in"
1675
    {
1676
                                        temp = check_imm((yyvsp[(1) - (1)].str), &(yyval.num), -128, 127);
1677
                                        if(temp==1) { yyerror("8 bit signed immediate expected"); YYERROR; }
1678
                                        if(temp==2) { yyerror("Immediate syntax"); YYERROR; }
1679
                                ;}
1680
    break;
1681
 
1682
  case 39:
1683
#line 155 "yacc.in"
1684
    {
1685
                                        temp = check_imm((yyvsp[(1) - (1)].str), &(yyval.num), -32, 31);
1686
                                        if(temp==1) { printf("Immediate Value %d out of range: -32..31 allowed\n", (yyval.num)); YYERROR; }
1687
                                        if(temp==2) { yyerror("Immediate syntax"); YYERROR; }
1688
                                ;}
1689
    break;
1690
 
1691
  case 40:
1692
#line 161 "yacc.in"
1693
    {
1694
                                        temp = check_imm((yyvsp[(1) - (1)].str), &(yyval.num), 0x1000000, 0x7fffffff);
1695
                                        if(temp==1) { printf("Immediate Value %d out of range: -32b..31b allowed\n", (yyval.num)); YYERROR; }
1696
                                        if(temp==2) { yyerror("Immediate syntax"); YYERROR; }
1697
                                ;}
1698
    break;
1699
 
1700
 
1701
/* Line 1267 of yacc.c.  */
1702
#line 1703 "yacc.tab.in"
1703
      default: break;
1704
    }
1705
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1706
 
1707
  YYPOPSTACK (yylen);
1708
  yylen = 0;
1709
  YY_STACK_PRINT (yyss, yyssp);
1710
 
1711
  *++yyvsp = yyval;
1712
 
1713
 
1714
  /* Now `shift' the result of the reduction.  Determine what state
1715
     that goes to, based on the state we popped back to and the rule
1716
     number reduced by.  */
1717
 
1718
  yyn = yyr1[yyn];
1719
 
1720
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1721
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1722
    yystate = yytable[yystate];
1723
  else
1724
    yystate = yydefgoto[yyn - YYNTOKENS];
1725
 
1726
  goto yynewstate;
1727
 
1728
 
1729
/*------------------------------------.
1730
| yyerrlab -- here on detecting error |
1731
`------------------------------------*/
1732
yyerrlab:
1733
  /* If not already recovering from an error, report this error.  */
1734
  if (!yyerrstatus)
1735
    {
1736
      ++yynerrs;
1737
#if ! YYERROR_VERBOSE
1738
      yyerror (YY_("syntax error"));
1739
#else
1740
      {
1741
        YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1742
        if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1743
          {
1744
            YYSIZE_T yyalloc = 2 * yysize;
1745
            if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1746
              yyalloc = YYSTACK_ALLOC_MAXIMUM;
1747
            if (yymsg != yymsgbuf)
1748
              YYSTACK_FREE (yymsg);
1749
            yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1750
            if (yymsg)
1751
              yymsg_alloc = yyalloc;
1752
            else
1753
              {
1754
                yymsg = yymsgbuf;
1755
                yymsg_alloc = sizeof yymsgbuf;
1756
              }
1757
          }
1758
 
1759
        if (0 < yysize && yysize <= yymsg_alloc)
1760
          {
1761
            (void) yysyntax_error (yymsg, yystate, yychar);
1762
            yyerror (yymsg);
1763
          }
1764
        else
1765
          {
1766
            yyerror (YY_("syntax error"));
1767
            if (yysize != 0)
1768
              goto yyexhaustedlab;
1769
          }
1770
      }
1771
#endif
1772
    }
1773
 
1774
 
1775
 
1776
  if (yyerrstatus == 3)
1777
    {
1778
      /* If just tried and failed to reuse look-ahead token after an
1779
         error, discard it.  */
1780
 
1781
      if (yychar <= YYEOF)
1782
        {
1783
          /* Return failure if at end of input.  */
1784
          if (yychar == YYEOF)
1785
            YYABORT;
1786
        }
1787
      else
1788
        {
1789
          yydestruct ("Error: discarding",
1790
                      yytoken, &yylval);
1791
          yychar = YYEMPTY;
1792
        }
1793
    }
1794
 
1795
  /* Else will try to reuse look-ahead token after shifting the error
1796
     token.  */
1797
  goto yyerrlab1;
1798
 
1799
 
1800
/*---------------------------------------------------.
1801
| yyerrorlab -- error raised explicitly by YYERROR.  |
1802
`---------------------------------------------------*/
1803
yyerrorlab:
1804
 
1805
  /* Pacify compilers like GCC when the user code never invokes
1806
     YYERROR and the label yyerrorlab therefore never appears in user
1807
     code.  */
1808
  if (/*CONSTCOND*/ 0)
1809
     goto yyerrorlab;
1810
 
1811
  /* Do not reclaim the symbols of the rule which action triggered
1812
     this YYERROR.  */
1813
  YYPOPSTACK (yylen);
1814
  yylen = 0;
1815
  YY_STACK_PRINT (yyss, yyssp);
1816
  yystate = *yyssp;
1817
  goto yyerrlab1;
1818
 
1819
 
1820
/*-------------------------------------------------------------.
1821
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1822
`-------------------------------------------------------------*/
1823
yyerrlab1:
1824
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1825
 
1826
  for (;;)
1827
    {
1828
      yyn = yypact[yystate];
1829
      if (yyn != YYPACT_NINF)
1830
        {
1831
          yyn += YYTERROR;
1832
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1833
            {
1834
              yyn = yytable[yyn];
1835
              if (0 < yyn)
1836
                break;
1837
            }
1838
        }
1839
 
1840
      /* Pop the current state because it cannot handle the error token.  */
1841
      if (yyssp == yyss)
1842
        YYABORT;
1843
 
1844
 
1845
      yydestruct ("Error: popping",
1846
                  yystos[yystate], yyvsp);
1847
      YYPOPSTACK (1);
1848
      yystate = *yyssp;
1849
      YY_STACK_PRINT (yyss, yyssp);
1850
    }
1851
 
1852
  if (yyn == YYFINAL)
1853
    YYACCEPT;
1854
 
1855
  *++yyvsp = yylval;
1856
 
1857
 
1858
  /* Shift the error token.  */
1859
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1860
 
1861
  yystate = yyn;
1862
  goto yynewstate;
1863
 
1864
 
1865
/*-------------------------------------.
1866
| yyacceptlab -- YYACCEPT comes here.  |
1867
`-------------------------------------*/
1868
yyacceptlab:
1869
  yyresult = 0;
1870
  goto yyreturn;
1871
 
1872
/*-----------------------------------.
1873
| yyabortlab -- YYABORT comes here.  |
1874
`-----------------------------------*/
1875
yyabortlab:
1876
  yyresult = 1;
1877
  goto yyreturn;
1878
 
1879
#ifndef yyoverflow
1880
/*-------------------------------------------------.
1881
| yyexhaustedlab -- memory exhaustion comes here.  |
1882
`-------------------------------------------------*/
1883
yyexhaustedlab:
1884
  yyerror (YY_("memory exhausted"));
1885
  yyresult = 2;
1886
  /* Fall through.  */
1887
#endif
1888
 
1889
yyreturn:
1890
  if (yychar != YYEOF && yychar != YYEMPTY)
1891
     yydestruct ("Cleanup: discarding lookahead",
1892
                 yytoken, &yylval);
1893
  /* Do not reclaim the symbols of the rule which action triggered
1894
     this YYABORT or YYACCEPT.  */
1895
  YYPOPSTACK (yylen);
1896
  YY_STACK_PRINT (yyss, yyssp);
1897
  while (yyssp != yyss)
1898
    {
1899
      yydestruct ("Cleanup: popping",
1900
                  yystos[*yyssp], yyvsp);
1901
      YYPOPSTACK (1);
1902
    }
1903
#ifndef yyoverflow
1904
  if (yyss != yyssa)
1905
    YYSTACK_FREE (yyss);
1906
#endif
1907
#if YYERROR_VERBOSE
1908
  if (yymsg != yymsgbuf)
1909
    YYSTACK_FREE (yymsg);
1910
#endif
1911
  return yyresult;
1912
}
1913
 
1914
 
1915
#line 167 "yacc.in"
1916
 
1917
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.