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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [binutils/] [mcparse.c] - Blame information for rev 826

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

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

powered by: WebSVN 2.1.0

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