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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [binutils/] [mcparse.c] - Blame information for rev 6

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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