OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [binutils/] [mcparse.c] - Blame information for rev 443

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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