xref: /netbsd-src/external/gpl3/binutils.old/dist/binutils/mcparse.c (revision e992f068c547fd6e84b3f104dc2340adcc955732)
1*e992f068Schristos /* A Bison parser, made by GNU Bison 3.8.2.  */
275fd0b74Schristos 
3ede78133Schristos /* Bison implementation for Yacc-like parsers in C
475fd0b74Schristos 
5*e992f068Schristos    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6*e992f068Schristos    Inc.
775fd0b74Schristos 
8ede78133Schristos    This program is free software: you can redistribute it and/or modify
975fd0b74Schristos    it under the terms of the GNU General Public License as published by
10ede78133Schristos    the Free Software Foundation, either version 3 of the License, or
11ede78133Schristos    (at your option) any later version.
1275fd0b74Schristos 
1375fd0b74Schristos    This program is distributed in the hope that it will be useful,
1475fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1575fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1675fd0b74Schristos    GNU General Public License for more details.
1775fd0b74Schristos 
1875fd0b74Schristos    You should have received a copy of the GNU General Public License
19*e992f068Schristos    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
2075fd0b74Schristos 
2175fd0b74Schristos /* As a special exception, you may create a larger work that contains
2275fd0b74Schristos    part or all of the Bison parser skeleton and distribute that work
2375fd0b74Schristos    under terms of your choice, so long as that work isn't itself a
2475fd0b74Schristos    parser generator using the skeleton or a modified version thereof
2575fd0b74Schristos    as a parser skeleton.  Alternatively, if you modify or redistribute
2675fd0b74Schristos    the parser skeleton itself, you may (at your option) remove this
2775fd0b74Schristos    special exception, which will cause the skeleton and the resulting
2875fd0b74Schristos    Bison output files to be licensed under the GNU General Public
2975fd0b74Schristos    License without this special exception.
3075fd0b74Schristos 
3175fd0b74Schristos    This special exception was added by the Free Software Foundation in
3275fd0b74Schristos    version 2.2 of Bison.  */
3375fd0b74Schristos 
3475fd0b74Schristos /* C LALR(1) parser skeleton written by Richard Stallman, by
3575fd0b74Schristos    simplifying the original so-called "semantic" parser.  */
3675fd0b74Schristos 
37*e992f068Schristos /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38*e992f068Schristos    especially those whose name start with YY_ or yy_.  They are
39*e992f068Schristos    private implementation details that can be changed or removed.  */
40*e992f068Schristos 
4175fd0b74Schristos /* All symbols defined below should begin with yy or YY, to avoid
4275fd0b74Schristos    infringing on user name space.  This should be done even for local
4375fd0b74Schristos    variables, as they might otherwise be expanded by user macros.
4475fd0b74Schristos    There are some unavoidable exceptions within include files to
4575fd0b74Schristos    define necessary library symbols; they are noted "INFRINGES ON
4675fd0b74Schristos    USER NAME SPACE" below.  */
4775fd0b74Schristos 
48*e992f068Schristos /* Identify Bison output, and Bison version.  */
49*e992f068Schristos #define YYBISON 30802
5075fd0b74Schristos 
51*e992f068Schristos /* Bison version string.  */
52*e992f068Schristos #define YYBISON_VERSION "3.8.2"
5375fd0b74Schristos 
5475fd0b74Schristos /* Skeleton name.  */
5575fd0b74Schristos #define YYSKELETON_NAME "yacc.c"
5675fd0b74Schristos 
5775fd0b74Schristos /* Pure parsers.  */
5875fd0b74Schristos #define YYPURE 0
5975fd0b74Schristos 
60ede78133Schristos /* Push parsers.  */
61ede78133Schristos #define YYPUSH 0
62ede78133Schristos 
63ede78133Schristos /* Pull parsers.  */
64ede78133Schristos #define YYPULL 1
6575fd0b74Schristos 
6675fd0b74Schristos 
6775fd0b74Schristos 
68ede78133Schristos 
69*e992f068Schristos /* First part of user prologue.  */
70*e992f068Schristos #line 1 "mcparse.y"
71ede78133Schristos  /* mcparse.y -- parser for Windows mc files
72*e992f068Schristos   Copyright (C) 2007-2022 Free Software Foundation, Inc.
73ede78133Schristos 
74ede78133Schristos   Parser for Windows mc files
75ede78133Schristos   Written by Kai Tietz, Onevision.
76ede78133Schristos 
77ede78133Schristos   This file is part of GNU Binutils.
78ede78133Schristos 
79ede78133Schristos   This program is free software; you can redistribute it and/or modify
80ede78133Schristos   it under the terms of the GNU General Public License as published by
81ede78133Schristos   the Free Software Foundation; either version 3 of the License, or
82ede78133Schristos   (at your option) any later version.
83ede78133Schristos 
84ede78133Schristos   This program is distributed in the hope that it will be useful,
85ede78133Schristos   but WITHOUT ANY WARRANTY; without even the implied warranty of
86ede78133Schristos   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
87ede78133Schristos   GNU General Public License for more details.
88ede78133Schristos 
89ede78133Schristos   You should have received a copy of the GNU General Public License
90ede78133Schristos   along with this program; if not, write to the Free Software
91ede78133Schristos   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
92ede78133Schristos   02110-1301, USA.  */
93ede78133Schristos 
94ede78133Schristos /* This is a parser for Windows rc files.  It is based on the parser
95ede78133Schristos    by Gunther Ebert <gunther.ebert@ixos-leipzig.de>.  */
96ede78133Schristos 
97ede78133Schristos #include "sysdep.h"
98ede78133Schristos #include "bfd.h"
99ede78133Schristos #include "bucomm.h"
100ede78133Schristos #include "libiberty.h"
101ede78133Schristos #include "windmc.h"
102ede78133Schristos #include "safe-ctype.h"
103ede78133Schristos 
104ede78133Schristos static rc_uint_type mc_last_id = 0;
105ede78133Schristos static rc_uint_type mc_sefa_val = 0;
106ede78133Schristos static unichar *mc_last_symbol = NULL;
107ede78133Schristos static const mc_keyword *mc_cur_severity = NULL;
108ede78133Schristos static const mc_keyword *mc_cur_facility = NULL;
109ede78133Schristos static mc_node *cur_node = NULL;
110ede78133Schristos 
111ede78133Schristos 
112*e992f068Schristos #line 113 "mcparse.c"
113ede78133Schristos 
114*e992f068Schristos # ifndef YY_CAST
115*e992f068Schristos #  ifdef __cplusplus
116*e992f068Schristos #   define YY_CAST(Type, Val) static_cast<Type> (Val)
117*e992f068Schristos #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
118*e992f068Schristos #  else
119*e992f068Schristos #   define YY_CAST(Type, Val) ((Type) (Val))
120*e992f068Schristos #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
121*e992f068Schristos #  endif
122*e992f068Schristos # endif
123ede78133Schristos # ifndef YY_NULLPTR
124*e992f068Schristos #  if defined __cplusplus
125*e992f068Schristos #   if 201103L <= __cplusplus
126ede78133Schristos #    define YY_NULLPTR nullptr
127ede78133Schristos #   else
128ede78133Schristos #    define YY_NULLPTR 0
129ede78133Schristos #   endif
130ede78133Schristos #  else
131*e992f068Schristos #   define YY_NULLPTR ((void*)0)
132*e992f068Schristos #  endif
133ede78133Schristos # endif
134ede78133Schristos 
135*e992f068Schristos /* Use api.header.include to #include this header
136*e992f068Schristos    instead of duplicating it here.  */
137ede78133Schristos #ifndef YY_YY_MCPARSE_H_INCLUDED
138ede78133Schristos # define YY_YY_MCPARSE_H_INCLUDED
139ede78133Schristos /* Debug traces.  */
140ede78133Schristos #ifndef YYDEBUG
141ede78133Schristos # define YYDEBUG 0
142ede78133Schristos #endif
143ede78133Schristos #if YYDEBUG
144ede78133Schristos extern int yydebug;
145ede78133Schristos #endif
146ede78133Schristos 
147*e992f068Schristos /* Token kinds.  */
14875fd0b74Schristos #ifndef YYTOKENTYPE
14975fd0b74Schristos # define YYTOKENTYPE
150ede78133Schristos   enum yytokentype
151ede78133Schristos   {
152*e992f068Schristos     YYEMPTY = -2,
153*e992f068Schristos     YYEOF = 0,                     /* "end of file"  */
154*e992f068Schristos     YYerror = 256,                 /* error  */
155*e992f068Schristos     YYUNDEF = 257,                 /* "invalid token"  */
156*e992f068Schristos     NL = 258,                      /* NL  */
157*e992f068Schristos     MCIDENT = 259,                 /* MCIDENT  */
158*e992f068Schristos     MCFILENAME = 260,              /* MCFILENAME  */
159*e992f068Schristos     MCLINE = 261,                  /* MCLINE  */
160*e992f068Schristos     MCCOMMENT = 262,               /* MCCOMMENT  */
161*e992f068Schristos     MCTOKEN = 263,                 /* MCTOKEN  */
162*e992f068Schristos     MCENDLINE = 264,               /* MCENDLINE  */
163*e992f068Schristos     MCLANGUAGENAMES = 265,         /* MCLANGUAGENAMES  */
164*e992f068Schristos     MCFACILITYNAMES = 266,         /* MCFACILITYNAMES  */
165*e992f068Schristos     MCSEVERITYNAMES = 267,         /* MCSEVERITYNAMES  */
166*e992f068Schristos     MCOUTPUTBASE = 268,            /* MCOUTPUTBASE  */
167*e992f068Schristos     MCMESSAGEIDTYPEDEF = 269,      /* MCMESSAGEIDTYPEDEF  */
168*e992f068Schristos     MCLANGUAGE = 270,              /* MCLANGUAGE  */
169*e992f068Schristos     MCMESSAGEID = 271,             /* MCMESSAGEID  */
170*e992f068Schristos     MCSEVERITY = 272,              /* MCSEVERITY  */
171*e992f068Schristos     MCFACILITY = 273,              /* MCFACILITY  */
172*e992f068Schristos     MCSYMBOLICNAME = 274,          /* MCSYMBOLICNAME  */
173*e992f068Schristos     MCNUMBER = 275                 /* MCNUMBER  */
17475fd0b74Schristos   };
175*e992f068Schristos   typedef enum yytokentype yytoken_kind_t;
17675fd0b74Schristos #endif
177*e992f068Schristos /* Token kinds.  */
178*e992f068Schristos #define YYEMPTY -2
179*e992f068Schristos #define YYEOF 0
180*e992f068Schristos #define YYerror 256
181*e992f068Schristos #define YYUNDEF 257
18275fd0b74Schristos #define NL 258
18375fd0b74Schristos #define MCIDENT 259
18475fd0b74Schristos #define MCFILENAME 260
18575fd0b74Schristos #define MCLINE 261
18675fd0b74Schristos #define MCCOMMENT 262
18775fd0b74Schristos #define MCTOKEN 263
18875fd0b74Schristos #define MCENDLINE 264
18975fd0b74Schristos #define MCLANGUAGENAMES 265
19075fd0b74Schristos #define MCFACILITYNAMES 266
19175fd0b74Schristos #define MCSEVERITYNAMES 267
19275fd0b74Schristos #define MCOUTPUTBASE 268
19375fd0b74Schristos #define MCMESSAGEIDTYPEDEF 269
19475fd0b74Schristos #define MCLANGUAGE 270
19575fd0b74Schristos #define MCMESSAGEID 271
19675fd0b74Schristos #define MCSEVERITY 272
19775fd0b74Schristos #define MCFACILITY 273
19875fd0b74Schristos #define MCSYMBOLICNAME 274
19975fd0b74Schristos #define MCNUMBER 275
20075fd0b74Schristos 
201ede78133Schristos /* Value type.  */
20275fd0b74Schristos #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
203ede78133Schristos union YYSTYPE
20475fd0b74Schristos {
205*e992f068Schristos #line 44 "mcparse.y"
206ede78133Schristos 
20775fd0b74Schristos   rc_uint_type ival;
20875fd0b74Schristos   unichar *ustr;
20975fd0b74Schristos   const mc_keyword *tok;
21075fd0b74Schristos   mc_node *nod;
211ede78133Schristos 
212*e992f068Schristos #line 213 "mcparse.c"
213ede78133Schristos 
214*e992f068Schristos };
215ede78133Schristos typedef union YYSTYPE YYSTYPE;
21675fd0b74Schristos # define YYSTYPE_IS_TRIVIAL 1
217ede78133Schristos # define YYSTYPE_IS_DECLARED 1
21875fd0b74Schristos #endif
21975fd0b74Schristos 
22075fd0b74Schristos 
221ede78133Schristos extern YYSTYPE yylval;
222ede78133Schristos 
223*e992f068Schristos 
224ede78133Schristos int yyparse (void);
225ede78133Schristos 
226*e992f068Schristos 
227ede78133Schristos #endif /* !YY_YY_MCPARSE_H_INCLUDED  */
228*e992f068Schristos /* Symbol kind.  */
229*e992f068Schristos enum yysymbol_kind_t
230*e992f068Schristos {
231*e992f068Schristos   YYSYMBOL_YYEMPTY = -2,
232*e992f068Schristos   YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
233*e992f068Schristos   YYSYMBOL_YYerror = 1,                    /* error  */
234*e992f068Schristos   YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
235*e992f068Schristos   YYSYMBOL_NL = 3,                         /* NL  */
236*e992f068Schristos   YYSYMBOL_MCIDENT = 4,                    /* MCIDENT  */
237*e992f068Schristos   YYSYMBOL_MCFILENAME = 5,                 /* MCFILENAME  */
238*e992f068Schristos   YYSYMBOL_MCLINE = 6,                     /* MCLINE  */
239*e992f068Schristos   YYSYMBOL_MCCOMMENT = 7,                  /* MCCOMMENT  */
240*e992f068Schristos   YYSYMBOL_MCTOKEN = 8,                    /* MCTOKEN  */
241*e992f068Schristos   YYSYMBOL_MCENDLINE = 9,                  /* MCENDLINE  */
242*e992f068Schristos   YYSYMBOL_MCLANGUAGENAMES = 10,           /* MCLANGUAGENAMES  */
243*e992f068Schristos   YYSYMBOL_MCFACILITYNAMES = 11,           /* MCFACILITYNAMES  */
244*e992f068Schristos   YYSYMBOL_MCSEVERITYNAMES = 12,           /* MCSEVERITYNAMES  */
245*e992f068Schristos   YYSYMBOL_MCOUTPUTBASE = 13,              /* MCOUTPUTBASE  */
246*e992f068Schristos   YYSYMBOL_MCMESSAGEIDTYPEDEF = 14,        /* MCMESSAGEIDTYPEDEF  */
247*e992f068Schristos   YYSYMBOL_MCLANGUAGE = 15,                /* MCLANGUAGE  */
248*e992f068Schristos   YYSYMBOL_MCMESSAGEID = 16,               /* MCMESSAGEID  */
249*e992f068Schristos   YYSYMBOL_MCSEVERITY = 17,                /* MCSEVERITY  */
250*e992f068Schristos   YYSYMBOL_MCFACILITY = 18,                /* MCFACILITY  */
251*e992f068Schristos   YYSYMBOL_MCSYMBOLICNAME = 19,            /* MCSYMBOLICNAME  */
252*e992f068Schristos   YYSYMBOL_MCNUMBER = 20,                  /* MCNUMBER  */
253*e992f068Schristos   YYSYMBOL_21_ = 21,                       /* '='  */
254*e992f068Schristos   YYSYMBOL_22_ = 22,                       /* '('  */
255*e992f068Schristos   YYSYMBOL_23_ = 23,                       /* ')'  */
256*e992f068Schristos   YYSYMBOL_24_ = 24,                       /* ':'  */
257*e992f068Schristos   YYSYMBOL_25_ = 25,                       /* '+'  */
258*e992f068Schristos   YYSYMBOL_YYACCEPT = 26,                  /* $accept  */
259*e992f068Schristos   YYSYMBOL_input = 27,                     /* input  */
260*e992f068Schristos   YYSYMBOL_entities = 28,                  /* entities  */
261*e992f068Schristos   YYSYMBOL_entity = 29,                    /* entity  */
262*e992f068Schristos   YYSYMBOL_global_section = 30,            /* global_section  */
263*e992f068Schristos   YYSYMBOL_severitymaps = 31,              /* severitymaps  */
264*e992f068Schristos   YYSYMBOL_severitymap = 32,               /* severitymap  */
265*e992f068Schristos   YYSYMBOL_facilitymaps = 33,              /* facilitymaps  */
266*e992f068Schristos   YYSYMBOL_facilitymap = 34,               /* facilitymap  */
267*e992f068Schristos   YYSYMBOL_langmaps = 35,                  /* langmaps  */
268*e992f068Schristos   YYSYMBOL_langmap = 36,                   /* langmap  */
269*e992f068Schristos   YYSYMBOL_alias_name = 37,                /* alias_name  */
270*e992f068Schristos   YYSYMBOL_message = 38,                   /* message  */
271*e992f068Schristos   YYSYMBOL_39_1 = 39,                      /* $@1  */
272*e992f068Schristos   YYSYMBOL_id = 40,                        /* id  */
273*e992f068Schristos   YYSYMBOL_vid = 41,                       /* vid  */
274*e992f068Schristos   YYSYMBOL_sefasy_def = 42,                /* sefasy_def  */
275*e992f068Schristos   YYSYMBOL_severity = 43,                  /* severity  */
276*e992f068Schristos   YYSYMBOL_facility = 44,                  /* facility  */
277*e992f068Schristos   YYSYMBOL_symbol = 45,                    /* symbol  */
278*e992f068Schristos   YYSYMBOL_lang_entities = 46,             /* lang_entities  */
279*e992f068Schristos   YYSYMBOL_lang_entity = 47,               /* lang_entity  */
280*e992f068Schristos   YYSYMBOL_lines = 48,                     /* lines  */
281*e992f068Schristos   YYSYMBOL_comments = 49,                  /* comments  */
282*e992f068Schristos   YYSYMBOL_lang = 50,                      /* lang  */
283*e992f068Schristos   YYSYMBOL_token = 51,                     /* token  */
284*e992f068Schristos   YYSYMBOL_lex_want_nl = 52,               /* lex_want_nl  */
285*e992f068Schristos   YYSYMBOL_lex_want_line = 53,             /* lex_want_line  */
286*e992f068Schristos   YYSYMBOL_lex_want_filename = 54          /* lex_want_filename  */
287*e992f068Schristos };
288*e992f068Schristos typedef enum yysymbol_kind_t yysymbol_kind_t;
28975fd0b74Schristos 
29075fd0b74Schristos 
291*e992f068Schristos 
29275fd0b74Schristos 
29375fd0b74Schristos #ifdef short
29475fd0b74Schristos # undef short
29575fd0b74Schristos #endif
29675fd0b74Schristos 
297*e992f068Schristos /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
298*e992f068Schristos    <limits.h> and (if available) <stdint.h> are included
299*e992f068Schristos    so that the code can choose integer types of a good width.  */
300*e992f068Schristos 
301*e992f068Schristos #ifndef __PTRDIFF_MAX__
302*e992f068Schristos # include <limits.h> /* INFRINGES ON USER NAME SPACE */
303*e992f068Schristos # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
304*e992f068Schristos #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
305*e992f068Schristos #  define YY_STDINT_H
306*e992f068Schristos # endif
30775fd0b74Schristos #endif
30875fd0b74Schristos 
309*e992f068Schristos /* Narrow types that promote to a signed type and that can represent a
310*e992f068Schristos    signed or unsigned integer of at least N bits.  In tables they can
311*e992f068Schristos    save space and decrease cache pressure.  Promoting to a signed type
312*e992f068Schristos    helps avoid bugs in integer arithmetic.  */
313*e992f068Schristos 
314*e992f068Schristos #ifdef __INT_LEAST8_MAX__
315*e992f068Schristos typedef __INT_LEAST8_TYPE__ yytype_int8;
316*e992f068Schristos #elif defined YY_STDINT_H
317*e992f068Schristos typedef int_least8_t yytype_int8;
31875fd0b74Schristos #else
319ede78133Schristos typedef signed char yytype_int8;
32075fd0b74Schristos #endif
32175fd0b74Schristos 
322*e992f068Schristos #ifdef __INT_LEAST16_MAX__
323*e992f068Schristos typedef __INT_LEAST16_TYPE__ yytype_int16;
324*e992f068Schristos #elif defined YY_STDINT_H
325*e992f068Schristos typedef int_least16_t yytype_int16;
32675fd0b74Schristos #else
327*e992f068Schristos typedef short yytype_int16;
32875fd0b74Schristos #endif
32975fd0b74Schristos 
330*e992f068Schristos /* Work around bug in HP-UX 11.23, which defines these macros
331*e992f068Schristos    incorrectly for preprocessor constants.  This workaround can likely
332*e992f068Schristos    be removed in 2023, as HPE has promised support for HP-UX 11.23
333*e992f068Schristos    (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
334*e992f068Schristos    <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
335*e992f068Schristos #ifdef __hpux
336*e992f068Schristos # undef UINT_LEAST8_MAX
337*e992f068Schristos # undef UINT_LEAST16_MAX
338*e992f068Schristos # define UINT_LEAST8_MAX 255
339*e992f068Schristos # define UINT_LEAST16_MAX 65535
340*e992f068Schristos #endif
341*e992f068Schristos 
342*e992f068Schristos #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
343*e992f068Schristos typedef __UINT_LEAST8_TYPE__ yytype_uint8;
344*e992f068Schristos #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
345*e992f068Schristos        && UINT_LEAST8_MAX <= INT_MAX)
346*e992f068Schristos typedef uint_least8_t yytype_uint8;
347*e992f068Schristos #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
348*e992f068Schristos typedef unsigned char yytype_uint8;
34975fd0b74Schristos #else
350*e992f068Schristos typedef short yytype_uint8;
351*e992f068Schristos #endif
352*e992f068Schristos 
353*e992f068Schristos #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
354*e992f068Schristos typedef __UINT_LEAST16_TYPE__ yytype_uint16;
355*e992f068Schristos #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
356*e992f068Schristos        && UINT_LEAST16_MAX <= INT_MAX)
357*e992f068Schristos typedef uint_least16_t yytype_uint16;
358*e992f068Schristos #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
359*e992f068Schristos typedef unsigned short yytype_uint16;
360*e992f068Schristos #else
361*e992f068Schristos typedef int yytype_uint16;
362*e992f068Schristos #endif
363*e992f068Schristos 
364*e992f068Schristos #ifndef YYPTRDIFF_T
365*e992f068Schristos # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
366*e992f068Schristos #  define YYPTRDIFF_T __PTRDIFF_TYPE__
367*e992f068Schristos #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
368*e992f068Schristos # elif defined PTRDIFF_MAX
369*e992f068Schristos #  ifndef ptrdiff_t
370*e992f068Schristos #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
371*e992f068Schristos #  endif
372*e992f068Schristos #  define YYPTRDIFF_T ptrdiff_t
373*e992f068Schristos #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
374*e992f068Schristos # else
375*e992f068Schristos #  define YYPTRDIFF_T long
376*e992f068Schristos #  define YYPTRDIFF_MAXIMUM LONG_MAX
377*e992f068Schristos # endif
37875fd0b74Schristos #endif
37975fd0b74Schristos 
38075fd0b74Schristos #ifndef YYSIZE_T
38175fd0b74Schristos # ifdef __SIZE_TYPE__
38275fd0b74Schristos #  define YYSIZE_T __SIZE_TYPE__
38375fd0b74Schristos # elif defined size_t
38475fd0b74Schristos #  define YYSIZE_T size_t
385*e992f068Schristos # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
38675fd0b74Schristos #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
38775fd0b74Schristos #  define YYSIZE_T size_t
38875fd0b74Schristos # else
389*e992f068Schristos #  define YYSIZE_T unsigned
39075fd0b74Schristos # endif
39175fd0b74Schristos #endif
39275fd0b74Schristos 
393*e992f068Schristos #define YYSIZE_MAXIMUM                                  \
394*e992f068Schristos   YY_CAST (YYPTRDIFF_T,                                 \
395*e992f068Schristos            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
396*e992f068Schristos             ? YYPTRDIFF_MAXIMUM                         \
397*e992f068Schristos             : YY_CAST (YYSIZE_T, -1)))
398*e992f068Schristos 
399*e992f068Schristos #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
400*e992f068Schristos 
401*e992f068Schristos 
402*e992f068Schristos /* Stored state numbers (used for stacks). */
403*e992f068Schristos typedef yytype_int8 yy_state_t;
404*e992f068Schristos 
405*e992f068Schristos /* State numbers in computations.  */
406*e992f068Schristos typedef int yy_state_fast_t;
40775fd0b74Schristos 
40875fd0b74Schristos #ifndef YY_
40975fd0b74Schristos # if defined YYENABLE_NLS && YYENABLE_NLS
41075fd0b74Schristos #  if ENABLE_NLS
41175fd0b74Schristos #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
412ede78133Schristos #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
41375fd0b74Schristos #  endif
41475fd0b74Schristos # endif
41575fd0b74Schristos # ifndef YY_
416ede78133Schristos #  define YY_(Msgid) Msgid
417ede78133Schristos # endif
418ede78133Schristos #endif
419ede78133Schristos 
420ede78133Schristos 
421ede78133Schristos #ifndef YY_ATTRIBUTE_PURE
422*e992f068Schristos # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
423*e992f068Schristos #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
424*e992f068Schristos # else
425*e992f068Schristos #  define YY_ATTRIBUTE_PURE
426*e992f068Schristos # endif
427ede78133Schristos #endif
428ede78133Schristos 
429ede78133Schristos #ifndef YY_ATTRIBUTE_UNUSED
430*e992f068Schristos # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
431*e992f068Schristos #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
432ede78133Schristos # else
433*e992f068Schristos #  define YY_ATTRIBUTE_UNUSED
43475fd0b74Schristos # endif
43575fd0b74Schristos #endif
43675fd0b74Schristos 
43775fd0b74Schristos /* Suppress unused-variable warnings by "using" E.  */
43875fd0b74Schristos #if ! defined lint || defined __GNUC__
439*e992f068Schristos # define YY_USE(E) ((void) (E))
44075fd0b74Schristos #else
441*e992f068Schristos # define YY_USE(E) /* empty */
44275fd0b74Schristos #endif
44375fd0b74Schristos 
444ede78133Schristos /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
445*e992f068Schristos #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
446*e992f068Schristos # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
447*e992f068Schristos #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
448*e992f068Schristos     _Pragma ("GCC diagnostic push")                                     \
449*e992f068Schristos     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
450*e992f068Schristos # else
451ede78133Schristos #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
452ede78133Schristos     _Pragma ("GCC diagnostic push")                                     \
453ede78133Schristos     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
454ede78133Schristos     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
455*e992f068Schristos # endif
456ede78133Schristos # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
457ede78133Schristos     _Pragma ("GCC diagnostic pop")
45875fd0b74Schristos #else
459ede78133Schristos # define YY_INITIAL_VALUE(Value) Value
46075fd0b74Schristos #endif
461ede78133Schristos #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
462ede78133Schristos # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
463ede78133Schristos # define YY_IGNORE_MAYBE_UNINITIALIZED_END
46475fd0b74Schristos #endif
465ede78133Schristos #ifndef YY_INITIAL_VALUE
466ede78133Schristos # define YY_INITIAL_VALUE(Value) /* Nothing. */
467ede78133Schristos #endif
468ede78133Schristos 
469*e992f068Schristos #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
470*e992f068Schristos # define YY_IGNORE_USELESS_CAST_BEGIN                          \
471*e992f068Schristos     _Pragma ("GCC diagnostic push")                            \
472*e992f068Schristos     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
473*e992f068Schristos # define YY_IGNORE_USELESS_CAST_END            \
474*e992f068Schristos     _Pragma ("GCC diagnostic pop")
475*e992f068Schristos #endif
476*e992f068Schristos #ifndef YY_IGNORE_USELESS_CAST_BEGIN
477*e992f068Schristos # define YY_IGNORE_USELESS_CAST_BEGIN
478*e992f068Schristos # define YY_IGNORE_USELESS_CAST_END
479*e992f068Schristos #endif
48075fd0b74Schristos 
481*e992f068Schristos 
482*e992f068Schristos #define YY_ASSERT(E) ((void) (0 && (E)))
483*e992f068Schristos 
484*e992f068Schristos #if !defined yyoverflow
48575fd0b74Schristos 
48675fd0b74Schristos /* The parser invokes alloca or malloc; define the necessary symbols.  */
48775fd0b74Schristos 
48875fd0b74Schristos # ifdef YYSTACK_USE_ALLOCA
48975fd0b74Schristos #  if YYSTACK_USE_ALLOCA
49075fd0b74Schristos #   ifdef __GNUC__
49175fd0b74Schristos #    define YYSTACK_ALLOC __builtin_alloca
49275fd0b74Schristos #   elif defined __BUILTIN_VA_ARG_INCR
49375fd0b74Schristos #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
49475fd0b74Schristos #   elif defined _AIX
49575fd0b74Schristos #    define YYSTACK_ALLOC __alloca
49675fd0b74Schristos #   elif defined _MSC_VER
49775fd0b74Schristos #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
49875fd0b74Schristos #    define alloca _alloca
49975fd0b74Schristos #   else
50075fd0b74Schristos #    define YYSTACK_ALLOC alloca
501ede78133Schristos #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
50275fd0b74Schristos #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
503ede78133Schristos       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
504ede78133Schristos #     ifndef EXIT_SUCCESS
505ede78133Schristos #      define EXIT_SUCCESS 0
50675fd0b74Schristos #     endif
50775fd0b74Schristos #    endif
50875fd0b74Schristos #   endif
50975fd0b74Schristos #  endif
51075fd0b74Schristos # endif
51175fd0b74Schristos 
51275fd0b74Schristos # ifdef YYSTACK_ALLOC
513ede78133Schristos    /* Pacify GCC's 'empty if-body' warning.  */
514ede78133Schristos #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
51575fd0b74Schristos #  ifndef YYSTACK_ALLOC_MAXIMUM
51675fd0b74Schristos     /* The OS might guarantee only one guard page at the bottom of the stack,
51775fd0b74Schristos        and a page size can be as small as 4096 bytes.  So we cannot safely
51875fd0b74Schristos        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
51975fd0b74Schristos        to allow for a few compiler-allocated temporary stack slots.  */
52075fd0b74Schristos #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
52175fd0b74Schristos #  endif
52275fd0b74Schristos # else
52375fd0b74Schristos #  define YYSTACK_ALLOC YYMALLOC
52475fd0b74Schristos #  define YYSTACK_FREE YYFREE
52575fd0b74Schristos #  ifndef YYSTACK_ALLOC_MAXIMUM
52675fd0b74Schristos #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
52775fd0b74Schristos #  endif
528ede78133Schristos #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
52975fd0b74Schristos        && ! ((defined YYMALLOC || defined malloc) \
53075fd0b74Schristos              && (defined YYFREE || defined free)))
53175fd0b74Schristos #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
532ede78133Schristos #   ifndef EXIT_SUCCESS
533ede78133Schristos #    define EXIT_SUCCESS 0
53475fd0b74Schristos #   endif
53575fd0b74Schristos #  endif
53675fd0b74Schristos #  ifndef YYMALLOC
53775fd0b74Schristos #   define YYMALLOC malloc
538ede78133Schristos #   if ! defined malloc && ! defined EXIT_SUCCESS
53975fd0b74Schristos void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
54075fd0b74Schristos #   endif
54175fd0b74Schristos #  endif
54275fd0b74Schristos #  ifndef YYFREE
54375fd0b74Schristos #   define YYFREE free
544ede78133Schristos #   if ! defined free && ! defined EXIT_SUCCESS
54575fd0b74Schristos void free (void *); /* INFRINGES ON USER NAME SPACE */
54675fd0b74Schristos #   endif
54775fd0b74Schristos #  endif
54875fd0b74Schristos # endif
549*e992f068Schristos #endif /* !defined yyoverflow */
55075fd0b74Schristos 
55175fd0b74Schristos #if (! defined yyoverflow \
55275fd0b74Schristos      && (! defined __cplusplus \
55375fd0b74Schristos          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
55475fd0b74Schristos 
55575fd0b74Schristos /* A type that is properly aligned for any stack member.  */
55675fd0b74Schristos union yyalloc
55775fd0b74Schristos {
558*e992f068Schristos   yy_state_t yyss_alloc;
559ede78133Schristos   YYSTYPE yyvs_alloc;
56075fd0b74Schristos };
56175fd0b74Schristos 
56275fd0b74Schristos /* The size of the maximum gap between one aligned stack and the next.  */
563*e992f068Schristos # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
56475fd0b74Schristos 
56575fd0b74Schristos /* The size of an array large to enough to hold all stacks, each with
56675fd0b74Schristos    N elements.  */
56775fd0b74Schristos # define YYSTACK_BYTES(N) \
568*e992f068Schristos      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
56975fd0b74Schristos       + YYSTACK_GAP_MAXIMUM)
57075fd0b74Schristos 
571ede78133Schristos # define YYCOPY_NEEDED 1
57275fd0b74Schristos 
57375fd0b74Schristos /* Relocate STACK from its old location to the new one.  The
57475fd0b74Schristos    local variables YYSIZE and YYSTACKSIZE give the old and new number of
57575fd0b74Schristos    elements in the stack, and YYPTR gives the new location of the
57675fd0b74Schristos    stack.  Advance YYPTR to a properly aligned location for the next
57775fd0b74Schristos    stack.  */
578ede78133Schristos # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
57975fd0b74Schristos     do                                                                  \
58075fd0b74Schristos       {                                                                 \
581*e992f068Schristos         YYPTRDIFF_T yynewbytes;                                         \
582ede78133Schristos         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
583ede78133Schristos         Stack = &yyptr->Stack_alloc;                                    \
584*e992f068Schristos         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
585*e992f068Schristos         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
58675fd0b74Schristos       }                                                                 \
587ede78133Schristos     while (0)
58875fd0b74Schristos 
58975fd0b74Schristos #endif
59075fd0b74Schristos 
591ede78133Schristos #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
592ede78133Schristos /* Copy COUNT objects from SRC to DST.  The source and destination do
593ede78133Schristos    not overlap.  */
594ede78133Schristos # ifndef YYCOPY
595ede78133Schristos #  if defined __GNUC__ && 1 < __GNUC__
596ede78133Schristos #   define YYCOPY(Dst, Src, Count) \
597*e992f068Schristos       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
598ede78133Schristos #  else
599ede78133Schristos #   define YYCOPY(Dst, Src, Count)              \
600ede78133Schristos       do                                        \
601ede78133Schristos         {                                       \
602*e992f068Schristos           YYPTRDIFF_T yyi;                      \
603ede78133Schristos           for (yyi = 0; yyi < (Count); yyi++)   \
604ede78133Schristos             (Dst)[yyi] = (Src)[yyi];            \
605ede78133Schristos         }                                       \
606ede78133Schristos       while (0)
607ede78133Schristos #  endif
608ede78133Schristos # endif
609ede78133Schristos #endif /* !YYCOPY_NEEDED */
610ede78133Schristos 
61175fd0b74Schristos /* YYFINAL -- State number of the termination state.  */
61275fd0b74Schristos #define YYFINAL  3
61375fd0b74Schristos /* YYLAST -- Last index in YYTABLE.  */
61475fd0b74Schristos #define YYLAST   114
61575fd0b74Schristos 
61675fd0b74Schristos /* YYNTOKENS -- Number of terminals.  */
61775fd0b74Schristos #define YYNTOKENS  26
61875fd0b74Schristos /* YYNNTS -- Number of nonterminals.  */
61975fd0b74Schristos #define YYNNTS  29
62075fd0b74Schristos /* YYNRULES -- Number of rules.  */
62175fd0b74Schristos #define YYNRULES  82
622ede78133Schristos /* YYNSTATES -- Number of states.  */
62375fd0b74Schristos #define YYNSTATES  125
62475fd0b74Schristos 
625*e992f068Schristos /* YYMAXUTOK -- Last valid token kind.  */
62675fd0b74Schristos #define YYMAXUTOK   275
62775fd0b74Schristos 
628*e992f068Schristos 
629*e992f068Schristos /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
630*e992f068Schristos    as returned by yylex, with out-of-bounds checking.  */
63175fd0b74Schristos #define YYTRANSLATE(YYX)                                \
632*e992f068Schristos   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
633*e992f068Schristos    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
634*e992f068Schristos    : YYSYMBOL_YYUNDEF)
63575fd0b74Schristos 
636ede78133Schristos /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
637*e992f068Schristos    as returned by yylex.  */
638*e992f068Schristos static const yytype_int8 yytranslate[] =
63975fd0b74Schristos {
64075fd0b74Schristos        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
64175fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
64275fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
64375fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
64475fd0b74Schristos       22,    23,     2,    25,     2,     2,     2,     2,     2,     2,
64575fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,    24,     2,
64675fd0b74Schristos        2,    21,     2,     2,     2,     2,     2,     2,     2,     2,
64775fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
64875fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
64975fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65075fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65175fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65275fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65375fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65475fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65575fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65675fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65775fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65875fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
65975fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
66075fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
66175fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
66275fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
66375fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
66475fd0b74Schristos        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
66575fd0b74Schristos        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
66675fd0b74Schristos        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
66775fd0b74Schristos       15,    16,    17,    18,    19,    20
66875fd0b74Schristos };
66975fd0b74Schristos 
67075fd0b74Schristos #if YYDEBUG
671ede78133Schristos /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
672*e992f068Schristos static const yytype_int16 yyrline[] =
67375fd0b74Schristos {
67475fd0b74Schristos        0,    66,    66,    69,    71,    73,    74,    75,    80,    84,
67575fd0b74Schristos       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
67675fd0b74Schristos       95,    96,   102,   106,   110,   117,   118,   119,   123,   127,
67775fd0b74Schristos      128,   132,   133,   134,   138,   142,   143,   147,   148,   149,
67875fd0b74Schristos      153,   157,   158,   159,   160,   165,   168,   172,   177,   176,
679*e992f068Schristos      190,   191,   192,   196,   199,   203,   207,   212,   219,   225,
680*e992f068Schristos      231,   239,   247,   255,   262,   263,   267,   277,   281,   293,
681*e992f068Schristos      294,   297,   298,   312,   316,   321,   326,   331,   338,   339,
682*e992f068Schristos      343,   347,   351
68375fd0b74Schristos };
68475fd0b74Schristos #endif
68575fd0b74Schristos 
686*e992f068Schristos /** Accessing symbol of state STATE.  */
687*e992f068Schristos #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
688*e992f068Schristos 
689*e992f068Schristos #if YYDEBUG || 0
690*e992f068Schristos /* The user-facing name of the symbol whose (internal) number is
691*e992f068Schristos    YYSYMBOL.  No bounds checking.  */
692*e992f068Schristos static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
693*e992f068Schristos 
69475fd0b74Schristos /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
69575fd0b74Schristos    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
69675fd0b74Schristos static const char *const yytname[] =
69775fd0b74Schristos {
698*e992f068Schristos   "\"end of file\"", "error", "\"invalid token\"", "NL", "MCIDENT",
699*e992f068Schristos   "MCFILENAME", "MCLINE", "MCCOMMENT", "MCTOKEN", "MCENDLINE",
700*e992f068Schristos   "MCLANGUAGENAMES", "MCFACILITYNAMES", "MCSEVERITYNAMES", "MCOUTPUTBASE",
70175fd0b74Schristos   "MCMESSAGEIDTYPEDEF", "MCLANGUAGE", "MCMESSAGEID", "MCSEVERITY",
70275fd0b74Schristos   "MCFACILITY", "MCSYMBOLICNAME", "MCNUMBER", "'='", "'('", "')'", "':'",
70375fd0b74Schristos   "'+'", "$accept", "input", "entities", "entity", "global_section",
70475fd0b74Schristos   "severitymaps", "severitymap", "facilitymaps", "facilitymap", "langmaps",
705ede78133Schristos   "langmap", "alias_name", "message", "$@1", "id", "vid", "sefasy_def",
70675fd0b74Schristos   "severity", "facility", "symbol", "lang_entities", "lang_entity",
70775fd0b74Schristos   "lines", "comments", "lang", "token", "lex_want_nl", "lex_want_line",
708ede78133Schristos   "lex_want_filename", YY_NULLPTR
70975fd0b74Schristos };
71075fd0b74Schristos 
711*e992f068Schristos static const char *
yysymbol_name(yysymbol_kind_t yysymbol)712*e992f068Schristos yysymbol_name (yysymbol_kind_t yysymbol)
71375fd0b74Schristos {
714*e992f068Schristos   return yytname[yysymbol];
715*e992f068Schristos }
71675fd0b74Schristos #endif
71775fd0b74Schristos 
718*e992f068Schristos #define YYPACT_NINF (-34)
719ede78133Schristos 
720*e992f068Schristos #define yypact_value_is_default(Yyn) \
721*e992f068Schristos   ((Yyn) == YYPACT_NINF)
722ede78133Schristos 
723*e992f068Schristos #define YYTABLE_NINF (-83)
724ede78133Schristos 
725*e992f068Schristos #define yytable_value_is_error(Yyn) \
726ede78133Schristos   0
727ede78133Schristos 
728ede78133Schristos /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
729ede78133Schristos    STATE-NUM.  */
730ede78133Schristos static const yytype_int8 yypact[] =
73175fd0b74Schristos {
732ede78133Schristos      -34,    62,    70,   -34,   -34,   -34,    15,    22,    30,   -15,
733ede78133Schristos       34,    37,   -34,   -34,   -34,   -34,    56,   -34,    10,   -34,
734ede78133Schristos       12,   -34,    20,    25,   -34,    52,   -34,     0,    80,   -34,
735ede78133Schristos      -34,    71,   -34,    84,   -34,    86,   -34,   -34,   -34,   -34,
736ede78133Schristos      -34,    45,   -34,     1,    68,    74,    76,   -34,   -34,   -34,
737ede78133Schristos      -34,   -34,   -34,     4,   -34,    38,   -34,     6,   -34,    39,
738ede78133Schristos      -34,    29,   -34,    40,   -34,   -34,    93,    94,    99,    43,
739ede78133Schristos       76,   -34,   -34,   -34,   -34,   -34,   -34,    46,   -34,   -34,
740ede78133Schristos      -34,   -34,    47,   -34,   -34,   -34,   -34,    49,   -34,   -34,
741ede78133Schristos      -34,   -34,    83,   -34,     3,   -34,     2,   -34,    81,   -34,
742ede78133Schristos       81,    92,   -34,   -34,    48,   -34,    82,    72,   -34,   -34,
743ede78133Schristos      -34,   104,   105,   108,   -34,   -34,   -34,    73,   -34,   -34,
744ede78133Schristos      -34,   -34,   -34,   -34,   -34
74575fd0b74Schristos };
74675fd0b74Schristos 
747ede78133Schristos /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
748ede78133Schristos    Performed when YYTABLE does not specify something else to do.  Zero
74975fd0b74Schristos    means the default is an error.  */
750*e992f068Schristos static const yytype_int8 yydefact[] =
75175fd0b74Schristos {
75275fd0b74Schristos        3,     0,     0,     1,     8,    71,     0,     0,     0,     0,
75375fd0b74Schristos        0,     0,     4,     5,     6,    57,     7,    16,     0,    20,
75475fd0b74Schristos        0,    12,     0,     0,    24,     0,    52,     0,    48,    72,
75575fd0b74Schristos       15,     0,    19,     0,    11,     0,    21,    23,    22,    51,
75675fd0b74Schristos       54,     0,    50,     0,     0,     0,     0,    58,    59,    60,
75775fd0b74Schristos       39,    78,    79,     0,    37,     0,    33,     0,    31,     0,
75875fd0b74Schristos       27,     0,    25,     0,    56,    55,     0,     0,     0,     0,
75975fd0b74Schristos       49,    64,    81,    14,    13,    38,    44,     0,    18,    17,
76075fd0b74Schristos       32,    36,     0,    10,     9,    26,    30,     0,    61,    62,
76175fd0b74Schristos       63,    77,     0,    65,     0,    43,     0,    35,    45,    29,
76275fd0b74Schristos       45,     0,    69,    67,     0,    42,     0,     0,    34,    28,
76375fd0b74Schristos       76,    78,    79,     0,    70,    68,    66,     0,    47,    46,
76475fd0b74Schristos       74,    73,    75,    41,    40
76575fd0b74Schristos };
76675fd0b74Schristos 
76775fd0b74Schristos /* YYPGOTO[NTERM-NUM].  */
76875fd0b74Schristos static const yytype_int8 yypgoto[] =
76975fd0b74Schristos {
77075fd0b74Schristos      -34,   -34,   -34,   -34,   -34,   -34,    50,   -34,    53,   -34,
77175fd0b74Schristos       59,    13,   -34,   -34,   -34,   -34,   -34,   -34,   -34,   -34,
77275fd0b74Schristos      -34,    44,   -34,   -34,   -34,   -33,   -34,   -34,   -34
77375fd0b74Schristos };
77475fd0b74Schristos 
775ede78133Schristos /* YYDEFGOTO[NTERM-NUM].  */
776ede78133Schristos static const yytype_int8 yydefgoto[] =
777ede78133Schristos {
778*e992f068Schristos        0,     1,     2,    12,    13,    61,    62,    57,    58,    53,
779ede78133Schristos       54,   108,    14,    46,    15,    42,    28,    47,    48,    49,
780ede78133Schristos       70,    71,   104,    16,    72,    55,    92,    94,   106
781ede78133Schristos };
782ede78133Schristos 
783ede78133Schristos /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
784ede78133Schristos    positive, shift that token.  If negative, reduce the rule whose
785ede78133Schristos    number is the opposite.  If YYTABLE_NINF, syntax error.  */
78675fd0b74Schristos static const yytype_int8 yytable[] =
78775fd0b74Schristos {
78875fd0b74Schristos       59,    39,    63,   105,   102,    73,    23,    78,    51,   103,
78975fd0b74Schristos       51,    30,    52,    32,    52,   -53,    17,   -53,   -53,   -53,
79075fd0b74Schristos       40,    34,    66,    19,    59,    41,   -82,    74,    63,    79,
79175fd0b74Schristos       83,    21,    31,    51,    33,    24,    18,    52,    26,    76,
79275fd0b74Schristos       81,    86,    35,    20,    91,    36,    64,    95,    97,   114,
79375fd0b74Schristos       99,    22,    84,    37,   115,    25,    38,   116,    27,    77,
79475fd0b74Schristos       82,    87,     3,    29,   -80,    65,    96,    98,   113,   100,
79575fd0b74Schristos       -2,     4,    50,   118,   123,    51,   119,     5,   124,    52,
79675fd0b74Schristos        6,     7,     8,     9,    10,    56,    11,    60,    51,    67,
79775fd0b74Schristos       51,    69,    52,   110,    52,    68,   111,    43,    44,    45,
79875fd0b74Schristos      112,    88,    89,    90,   101,   107,   117,   120,   121,   122,
79975fd0b74Schristos       80,    85,    75,   109,    93
80075fd0b74Schristos };
80175fd0b74Schristos 
802*e992f068Schristos static const yytype_int8 yycheck[] =
80375fd0b74Schristos {
80475fd0b74Schristos       33,     1,    35,     1,     1,     1,    21,     1,     4,     6,
80575fd0b74Schristos        4,     1,     8,     1,     8,    15,     1,    17,    18,    19,
80675fd0b74Schristos       20,     1,    21,     1,    57,    25,    24,    23,    61,    23,
80775fd0b74Schristos        1,     1,    22,     4,    22,     1,    21,     8,     1,     1,
80875fd0b74Schristos        1,     1,    22,    21,     1,    20,     1,     1,     1,     1,
80975fd0b74Schristos        1,    21,    23,     1,     6,    21,     4,     9,    21,    21,
81075fd0b74Schristos       21,    21,     0,     7,    21,    20,    20,    20,   101,    20,
81175fd0b74Schristos        0,     1,     1,     1,     1,     4,     4,     7,     5,     8,
81275fd0b74Schristos       10,    11,    12,    13,    14,     1,    16,     1,     4,    21,
81375fd0b74Schristos        4,    15,     8,     1,     8,    21,     4,    17,    18,    19,
81475fd0b74Schristos        8,     8,     8,     4,    21,    24,    24,     3,     3,     1,
81575fd0b74Schristos       57,    61,    53,   100,    70
81675fd0b74Schristos };
81775fd0b74Schristos 
818*e992f068Schristos /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
819*e992f068Schristos    state STATE-NUM.  */
820*e992f068Schristos static const yytype_int8 yystos[] =
82175fd0b74Schristos {
82275fd0b74Schristos        0,    27,    28,     0,     1,     7,    10,    11,    12,    13,
82375fd0b74Schristos       14,    16,    29,    30,    38,    40,    49,     1,    21,     1,
82475fd0b74Schristos       21,     1,    21,    21,     1,    21,     1,    21,    42,     7,
82575fd0b74Schristos        1,    22,     1,    22,     1,    22,    20,     1,     4,     1,
82675fd0b74Schristos       20,    25,    41,    17,    18,    19,    39,    43,    44,    45,
82775fd0b74Schristos        1,     4,     8,    35,    36,    51,     1,    33,    34,    51,
82875fd0b74Schristos        1,    31,    32,    51,     1,    20,    21,    21,    21,    15,
82975fd0b74Schristos       46,    47,    50,     1,    23,    36,     1,    21,     1,    23,
83075fd0b74Schristos       34,     1,    21,     1,    23,    32,     1,    21,     8,     8,
83175fd0b74Schristos        4,     1,    52,    47,    53,     1,    20,     1,    20,     1,
83275fd0b74Schristos       20,    21,     1,     6,    48,     1,    54,    24,    37,    37,
83375fd0b74Schristos        1,     4,     8,    51,     1,     6,     9,    24,     1,     4,
83475fd0b74Schristos        3,     3,     1,     1,     5
83575fd0b74Schristos };
83675fd0b74Schristos 
837*e992f068Schristos /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
838*e992f068Schristos static const yytype_int8 yyr1[] =
839ede78133Schristos {
840ede78133Schristos        0,    26,    27,    28,    28,    29,    29,    29,    29,    30,
841ede78133Schristos       30,    30,    30,    30,    30,    30,    30,    30,    30,    30,
842ede78133Schristos       30,    30,    30,    30,    30,    31,    31,    31,    32,    32,
843ede78133Schristos       32,    33,    33,    33,    34,    34,    34,    35,    35,    35,
844ede78133Schristos       36,    36,    36,    36,    36,    37,    37,    37,    39,    38,
845ede78133Schristos       40,    40,    40,    41,    41,    41,    41,    42,    42,    42,
846ede78133Schristos       42,    43,    44,    45,    46,    46,    47,    48,    48,    48,
847ede78133Schristos       48,    49,    49,    50,    50,    50,    50,    50,    51,    51,
848ede78133Schristos       52,    53,    54
849ede78133Schristos };
850ede78133Schristos 
851*e992f068Schristos /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
852*e992f068Schristos static const yytype_int8 yyr2[] =
853ede78133Schristos {
854ede78133Schristos        0,     2,     1,     0,     2,     1,     1,     1,     1,     5,
855ede78133Schristos        5,     3,     2,     5,     5,     3,     2,     5,     5,     3,
856ede78133Schristos        2,     3,     3,     3,     2,     1,     2,     1,     4,     3,
857ede78133Schristos        2,     1,     2,     1,     4,     3,     2,     1,     2,     1,
858ede78133Schristos        6,     6,     4,     3,     2,     0,     2,     2,     0,     4,
859ede78133Schristos        3,     3,     2,     0,     1,     2,     2,     0,     2,     2,
860ede78133Schristos        2,     3,     3,     3,     1,     2,     4,     1,     2,     1,
861ede78133Schristos        2,     1,     2,     5,     5,     5,     4,     2,     1,     1,
862ede78133Schristos        0,     0,     0
863ede78133Schristos };
864ede78133Schristos 
865ede78133Schristos 
866*e992f068Schristos enum { YYENOMEM = -2 };
867*e992f068Schristos 
86875fd0b74Schristos #define yyerrok         (yyerrstatus = 0)
86975fd0b74Schristos #define yyclearin       (yychar = YYEMPTY)
87075fd0b74Schristos 
87175fd0b74Schristos #define YYACCEPT        goto yyacceptlab
87275fd0b74Schristos #define YYABORT         goto yyabortlab
87375fd0b74Schristos #define YYERROR         goto yyerrorlab
874*e992f068Schristos #define YYNOMEM         goto yyexhaustedlab
87575fd0b74Schristos 
87675fd0b74Schristos 
87775fd0b74Schristos #define YYRECOVERING()  (!!yyerrstatus)
87875fd0b74Schristos 
87975fd0b74Schristos #define YYBACKUP(Token, Value)                                    \
88075fd0b74Schristos   do                                                              \
881ede78133Schristos     if (yychar == YYEMPTY)                                        \
88275fd0b74Schristos       {                                                           \
88375fd0b74Schristos         yychar = (Token);                                         \
88475fd0b74Schristos         yylval = (Value);                                         \
885ede78133Schristos         YYPOPSTACK (yylen);                                       \
886ede78133Schristos         yystate = *yyssp;                                         \
88775fd0b74Schristos         goto yybackup;                                            \
88875fd0b74Schristos       }                                                           \
88975fd0b74Schristos     else                                                          \
89075fd0b74Schristos       {                                                           \
89175fd0b74Schristos         yyerror (YY_("syntax error: cannot back up")); \
89275fd0b74Schristos         YYERROR;                                                  \
89375fd0b74Schristos       }                                                           \
894ede78133Schristos   while (0)
89575fd0b74Schristos 
896*e992f068Schristos /* Backward compatibility with an undocumented macro.
897*e992f068Schristos    Use YYerror or YYUNDEF. */
898*e992f068Schristos #define YYERRCODE YYUNDEF
89975fd0b74Schristos 
90075fd0b74Schristos 
90175fd0b74Schristos /* Enable debugging if requested.  */
90275fd0b74Schristos #if YYDEBUG
90375fd0b74Schristos 
90475fd0b74Schristos # ifndef YYFPRINTF
90575fd0b74Schristos #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
90675fd0b74Schristos #  define YYFPRINTF fprintf
90775fd0b74Schristos # endif
90875fd0b74Schristos 
90975fd0b74Schristos # define YYDPRINTF(Args)                        \
91075fd0b74Schristos do {                                            \
91175fd0b74Schristos   if (yydebug)                                  \
91275fd0b74Schristos     YYFPRINTF Args;                             \
913ede78133Schristos } while (0)
914ede78133Schristos 
915ede78133Schristos 
91675fd0b74Schristos 
917*e992f068Schristos 
918*e992f068Schristos # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
91975fd0b74Schristos do {                                                                      \
92075fd0b74Schristos   if (yydebug)                                                            \
92175fd0b74Schristos     {                                                                     \
92275fd0b74Schristos       YYFPRINTF (stderr, "%s ", Title);                                   \
92375fd0b74Schristos       yy_symbol_print (stderr,                                            \
924*e992f068Schristos                   Kind, Value); \
92575fd0b74Schristos       YYFPRINTF (stderr, "\n");                                           \
92675fd0b74Schristos     }                                                                     \
927ede78133Schristos } while (0)
92875fd0b74Schristos 
92975fd0b74Schristos 
930*e992f068Schristos /*-----------------------------------.
931*e992f068Schristos | Print this symbol's value on YYO.  |
932*e992f068Schristos `-----------------------------------*/
93375fd0b74Schristos 
93475fd0b74Schristos static void
yy_symbol_value_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)935*e992f068Schristos yy_symbol_value_print (FILE *yyo,
936*e992f068Schristos                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
93775fd0b74Schristos {
938*e992f068Schristos   FILE *yyoutput = yyo;
939*e992f068Schristos   YY_USE (yyoutput);
94075fd0b74Schristos   if (!yyvaluep)
94175fd0b74Schristos     return;
942*e992f068Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
943*e992f068Schristos   YY_USE (yykind);
944*e992f068Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_END
94575fd0b74Schristos }
94675fd0b74Schristos 
94775fd0b74Schristos 
948*e992f068Schristos /*---------------------------.
949*e992f068Schristos | Print this symbol on YYO.  |
950*e992f068Schristos `---------------------------*/
95175fd0b74Schristos 
95275fd0b74Schristos static void
yy_symbol_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)953*e992f068Schristos yy_symbol_print (FILE *yyo,
954*e992f068Schristos                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
95575fd0b74Schristos {
956*e992f068Schristos   YYFPRINTF (yyo, "%s %s (",
957*e992f068Schristos              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
95875fd0b74Schristos 
959*e992f068Schristos   yy_symbol_value_print (yyo, yykind, yyvaluep);
960*e992f068Schristos   YYFPRINTF (yyo, ")");
96175fd0b74Schristos }
96275fd0b74Schristos 
96375fd0b74Schristos /*------------------------------------------------------------------.
96475fd0b74Schristos | yy_stack_print -- Print the state stack from its BOTTOM up to its |
96575fd0b74Schristos | TOP (included).                                                   |
96675fd0b74Schristos `------------------------------------------------------------------*/
96775fd0b74Schristos 
96875fd0b74Schristos static void
yy_stack_print(yy_state_t * yybottom,yy_state_t * yytop)969*e992f068Schristos yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
97075fd0b74Schristos {
97175fd0b74Schristos   YYFPRINTF (stderr, "Stack now");
972ede78133Schristos   for (; yybottom <= yytop; yybottom++)
973ede78133Schristos     {
974ede78133Schristos       int yybot = *yybottom;
975ede78133Schristos       YYFPRINTF (stderr, " %d", yybot);
976ede78133Schristos     }
97775fd0b74Schristos   YYFPRINTF (stderr, "\n");
97875fd0b74Schristos }
97975fd0b74Schristos 
98075fd0b74Schristos # define YY_STACK_PRINT(Bottom, Top)                            \
98175fd0b74Schristos do {                                                            \
98275fd0b74Schristos   if (yydebug)                                                  \
98375fd0b74Schristos     yy_stack_print ((Bottom), (Top));                           \
984ede78133Schristos } while (0)
98575fd0b74Schristos 
98675fd0b74Schristos 
98775fd0b74Schristos /*------------------------------------------------.
98875fd0b74Schristos | Report that the YYRULE is going to be reduced.  |
98975fd0b74Schristos `------------------------------------------------*/
99075fd0b74Schristos 
99175fd0b74Schristos static void
yy_reduce_print(yy_state_t * yyssp,YYSTYPE * yyvsp,int yyrule)992*e992f068Schristos yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
993*e992f068Schristos                  int yyrule)
99475fd0b74Schristos {
995*e992f068Schristos   int yylno = yyrline[yyrule];
99675fd0b74Schristos   int yynrhs = yyr2[yyrule];
99775fd0b74Schristos   int yyi;
998*e992f068Schristos   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
99975fd0b74Schristos              yyrule - 1, yylno);
100075fd0b74Schristos   /* The symbols being reduced.  */
100175fd0b74Schristos   for (yyi = 0; yyi < yynrhs; yyi++)
100275fd0b74Schristos     {
1003ede78133Schristos       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1004ede78133Schristos       yy_symbol_print (stderr,
1005*e992f068Schristos                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1006*e992f068Schristos                        &yyvsp[(yyi + 1) - (yynrhs)]);
1007ede78133Schristos       YYFPRINTF (stderr, "\n");
100875fd0b74Schristos     }
100975fd0b74Schristos }
101075fd0b74Schristos 
101175fd0b74Schristos # define YY_REDUCE_PRINT(Rule)          \
101275fd0b74Schristos do {                                    \
101375fd0b74Schristos   if (yydebug)                          \
1014ede78133Schristos     yy_reduce_print (yyssp, yyvsp, Rule); \
1015ede78133Schristos } while (0)
101675fd0b74Schristos 
101775fd0b74Schristos /* Nonzero means print parse trace.  It is left uninitialized so that
101875fd0b74Schristos    multiple parsers can coexist.  */
101975fd0b74Schristos int yydebug;
102075fd0b74Schristos #else /* !YYDEBUG */
1021*e992f068Schristos # define YYDPRINTF(Args) ((void) 0)
1022*e992f068Schristos # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
102375fd0b74Schristos # define YY_STACK_PRINT(Bottom, Top)
102475fd0b74Schristos # define YY_REDUCE_PRINT(Rule)
102575fd0b74Schristos #endif /* !YYDEBUG */
102675fd0b74Schristos 
102775fd0b74Schristos 
102875fd0b74Schristos /* YYINITDEPTH -- initial size of the parser's stacks.  */
102975fd0b74Schristos #ifndef YYINITDEPTH
103075fd0b74Schristos # define YYINITDEPTH 200
103175fd0b74Schristos #endif
103275fd0b74Schristos 
103375fd0b74Schristos /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
103475fd0b74Schristos    if the built-in stack extension method is used).
103575fd0b74Schristos 
103675fd0b74Schristos    Do not make this value too large; the results are undefined if
103775fd0b74Schristos    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
103875fd0b74Schristos    evaluated with infinite-precision integer arithmetic.  */
103975fd0b74Schristos 
104075fd0b74Schristos #ifndef YYMAXDEPTH
104175fd0b74Schristos # define YYMAXDEPTH 10000
104275fd0b74Schristos #endif
104375fd0b74Schristos 
104475fd0b74Schristos 
104575fd0b74Schristos 
104675fd0b74Schristos 
104775fd0b74Schristos 
104875fd0b74Schristos 
104975fd0b74Schristos /*-----------------------------------------------.
105075fd0b74Schristos | Release the memory associated to this symbol.  |
105175fd0b74Schristos `-----------------------------------------------*/
105275fd0b74Schristos 
105375fd0b74Schristos static void
yydestruct(const char * yymsg,yysymbol_kind_t yykind,YYSTYPE * yyvaluep)1054*e992f068Schristos yydestruct (const char *yymsg,
1055*e992f068Schristos             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
105675fd0b74Schristos {
1057*e992f068Schristos   YY_USE (yyvaluep);
105875fd0b74Schristos   if (!yymsg)
105975fd0b74Schristos     yymsg = "Deleting";
1060*e992f068Schristos   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
106175fd0b74Schristos 
1062ede78133Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1063*e992f068Schristos   YY_USE (yykind);
1064ede78133Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_END
106575fd0b74Schristos }
106675fd0b74Schristos 
106775fd0b74Schristos 
1068*e992f068Schristos /* Lookahead token kind.  */
106975fd0b74Schristos int yychar;
107075fd0b74Schristos 
1071ede78133Schristos /* The semantic value of the lookahead symbol.  */
107275fd0b74Schristos YYSTYPE yylval;
107375fd0b74Schristos /* Number of syntax errors so far.  */
107475fd0b74Schristos int yynerrs;
107575fd0b74Schristos 
107675fd0b74Schristos 
1077*e992f068Schristos 
1078*e992f068Schristos 
107975fd0b74Schristos /*----------.
108075fd0b74Schristos | yyparse.  |
108175fd0b74Schristos `----------*/
108275fd0b74Schristos 
108375fd0b74Schristos int
yyparse(void)108475fd0b74Schristos yyparse (void)
108575fd0b74Schristos {
1086*e992f068Schristos     yy_state_fast_t yystate = 0;
108775fd0b74Schristos     /* Number of tokens to shift before error messages enabled.  */
1088*e992f068Schristos     int yyerrstatus = 0;
1089ede78133Schristos 
1090*e992f068Schristos     /* Refer to the stacks through separate pointers, to allow yyoverflow
1091ede78133Schristos        to reallocate them elsewhere.  */
1092ede78133Schristos 
1093*e992f068Schristos     /* Their size.  */
1094*e992f068Schristos     YYPTRDIFF_T yystacksize = YYINITDEPTH;
1095ede78133Schristos 
1096*e992f068Schristos     /* The state stack: array, bottom, top.  */
1097*e992f068Schristos     yy_state_t yyssa[YYINITDEPTH];
1098*e992f068Schristos     yy_state_t *yyss = yyssa;
1099*e992f068Schristos     yy_state_t *yyssp = yyss;
1100*e992f068Schristos 
1101*e992f068Schristos     /* The semantic value stack: array, bottom, top.  */
1102ede78133Schristos     YYSTYPE yyvsa[YYINITDEPTH];
1103*e992f068Schristos     YYSTYPE *yyvs = yyvsa;
1104*e992f068Schristos     YYSTYPE *yyvsp = yyvs;
1105ede78133Schristos 
1106ede78133Schristos   int yyn;
1107*e992f068Schristos   /* The return value of yyparse.  */
1108ede78133Schristos   int yyresult;
1109*e992f068Schristos   /* Lookahead symbol kind.  */
1110*e992f068Schristos   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1111ede78133Schristos   /* The variables used to return semantic value and location from the
1112ede78133Schristos      action routines.  */
1113ede78133Schristos   YYSTYPE yyval;
1114ede78133Schristos 
1115*e992f068Schristos 
111675fd0b74Schristos 
111775fd0b74Schristos #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
111875fd0b74Schristos 
111975fd0b74Schristos   /* The number of symbols on the RHS of the reduced rule.
112075fd0b74Schristos      Keep to zero when no symbol should be popped.  */
112175fd0b74Schristos   int yylen = 0;
112275fd0b74Schristos 
112375fd0b74Schristos   YYDPRINTF ((stderr, "Starting parse\n"));
112475fd0b74Schristos 
112575fd0b74Schristos   yychar = YYEMPTY; /* Cause a token to be read.  */
1126*e992f068Schristos 
112775fd0b74Schristos   goto yysetstate;
112875fd0b74Schristos 
1129*e992f068Schristos 
113075fd0b74Schristos /*------------------------------------------------------------.
1131*e992f068Schristos | yynewstate -- push a new state, which is found in yystate.  |
113275fd0b74Schristos `------------------------------------------------------------*/
113375fd0b74Schristos yynewstate:
113475fd0b74Schristos   /* In all cases, when you get here, the value and location stacks
113575fd0b74Schristos      have just been pushed.  So pushing a state here evens the stacks.  */
113675fd0b74Schristos   yyssp++;
113775fd0b74Schristos 
1138*e992f068Schristos 
1139*e992f068Schristos /*--------------------------------------------------------------------.
1140*e992f068Schristos | yysetstate -- set current state (the top of the stack) to yystate.  |
1141*e992f068Schristos `--------------------------------------------------------------------*/
114275fd0b74Schristos yysetstate:
1143*e992f068Schristos   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1144*e992f068Schristos   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1145*e992f068Schristos   YY_IGNORE_USELESS_CAST_BEGIN
1146*e992f068Schristos   *yyssp = YY_CAST (yy_state_t, yystate);
1147*e992f068Schristos   YY_IGNORE_USELESS_CAST_END
1148*e992f068Schristos   YY_STACK_PRINT (yyss, yyssp);
114975fd0b74Schristos 
115075fd0b74Schristos   if (yyss + yystacksize - 1 <= yyssp)
1151*e992f068Schristos #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1152*e992f068Schristos     YYNOMEM;
1153*e992f068Schristos #else
115475fd0b74Schristos     {
115575fd0b74Schristos       /* Get the current used size of the three stacks, in elements.  */
1156*e992f068Schristos       YYPTRDIFF_T yysize = yyssp - yyss + 1;
115775fd0b74Schristos 
1158*e992f068Schristos # if defined yyoverflow
115975fd0b74Schristos       {
116075fd0b74Schristos         /* Give user a chance to reallocate the stack.  Use copies of
116175fd0b74Schristos            these so that the &'s don't force the real ones into
116275fd0b74Schristos            memory.  */
1163*e992f068Schristos         yy_state_t *yyss1 = yyss;
116475fd0b74Schristos         YYSTYPE *yyvs1 = yyvs;
116575fd0b74Schristos 
116675fd0b74Schristos         /* Each stack pointer address is followed by the size of the
116775fd0b74Schristos            data in use in that stack, in bytes.  This used to be a
116875fd0b74Schristos            conditional around just the two extra args, but that might
116975fd0b74Schristos            be undefined if yyoverflow is a macro.  */
117075fd0b74Schristos         yyoverflow (YY_("memory exhausted"),
1171*e992f068Schristos                     &yyss1, yysize * YYSIZEOF (*yyssp),
1172*e992f068Schristos                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
117375fd0b74Schristos                     &yystacksize);
117475fd0b74Schristos         yyss = yyss1;
117575fd0b74Schristos         yyvs = yyvs1;
117675fd0b74Schristos       }
1177*e992f068Schristos # else /* defined YYSTACK_RELOCATE */
117875fd0b74Schristos       /* Extend the stack our own way.  */
117975fd0b74Schristos       if (YYMAXDEPTH <= yystacksize)
1180*e992f068Schristos         YYNOMEM;
118175fd0b74Schristos       yystacksize *= 2;
118275fd0b74Schristos       if (YYMAXDEPTH < yystacksize)
118375fd0b74Schristos         yystacksize = YYMAXDEPTH;
118475fd0b74Schristos 
118575fd0b74Schristos       {
1186*e992f068Schristos         yy_state_t *yyss1 = yyss;
118775fd0b74Schristos         union yyalloc *yyptr =
1188*e992f068Schristos           YY_CAST (union yyalloc *,
1189*e992f068Schristos                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
119075fd0b74Schristos         if (! yyptr)
1191*e992f068Schristos           YYNOMEM;
1192ede78133Schristos         YYSTACK_RELOCATE (yyss_alloc, yyss);
1193ede78133Schristos         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
119475fd0b74Schristos #  undef YYSTACK_RELOCATE
119575fd0b74Schristos         if (yyss1 != yyssa)
119675fd0b74Schristos           YYSTACK_FREE (yyss1);
119775fd0b74Schristos       }
119875fd0b74Schristos # endif
119975fd0b74Schristos 
120075fd0b74Schristos       yyssp = yyss + yysize - 1;
120175fd0b74Schristos       yyvsp = yyvs + yysize - 1;
120275fd0b74Schristos 
1203*e992f068Schristos       YY_IGNORE_USELESS_CAST_BEGIN
1204*e992f068Schristos       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1205*e992f068Schristos                   YY_CAST (long, yystacksize)));
1206*e992f068Schristos       YY_IGNORE_USELESS_CAST_END
120775fd0b74Schristos 
120875fd0b74Schristos       if (yyss + yystacksize - 1 <= yyssp)
120975fd0b74Schristos         YYABORT;
121075fd0b74Schristos     }
1211*e992f068Schristos #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
121275fd0b74Schristos 
121375fd0b74Schristos 
1214ede78133Schristos   if (yystate == YYFINAL)
1215ede78133Schristos     YYACCEPT;
1216ede78133Schristos 
121775fd0b74Schristos   goto yybackup;
121875fd0b74Schristos 
1219*e992f068Schristos 
122075fd0b74Schristos /*-----------.
122175fd0b74Schristos | yybackup.  |
122275fd0b74Schristos `-----------*/
122375fd0b74Schristos yybackup:
122475fd0b74Schristos   /* Do appropriate processing given the current state.  Read a
1225ede78133Schristos      lookahead token if we need one and don't already have one.  */
122675fd0b74Schristos 
1227ede78133Schristos   /* First try to decide what to do without reference to lookahead token.  */
122875fd0b74Schristos   yyn = yypact[yystate];
1229ede78133Schristos   if (yypact_value_is_default (yyn))
123075fd0b74Schristos     goto yydefault;
123175fd0b74Schristos 
1232ede78133Schristos   /* Not known => get a lookahead token if don't already have one.  */
123375fd0b74Schristos 
1234*e992f068Schristos   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
123575fd0b74Schristos   if (yychar == YYEMPTY)
123675fd0b74Schristos     {
1237*e992f068Schristos       YYDPRINTF ((stderr, "Reading a token\n"));
1238ede78133Schristos       yychar = yylex ();
123975fd0b74Schristos     }
124075fd0b74Schristos 
124175fd0b74Schristos   if (yychar <= YYEOF)
124275fd0b74Schristos     {
1243*e992f068Schristos       yychar = YYEOF;
1244*e992f068Schristos       yytoken = YYSYMBOL_YYEOF;
124575fd0b74Schristos       YYDPRINTF ((stderr, "Now at end of input.\n"));
124675fd0b74Schristos     }
1247*e992f068Schristos   else if (yychar == YYerror)
1248*e992f068Schristos     {
1249*e992f068Schristos       /* The scanner already issued an error message, process directly
1250*e992f068Schristos          to error recovery.  But do not keep the error token as
1251*e992f068Schristos          lookahead, it is too special and may lead us to an endless
1252*e992f068Schristos          loop in error recovery. */
1253*e992f068Schristos       yychar = YYUNDEF;
1254*e992f068Schristos       yytoken = YYSYMBOL_YYerror;
1255*e992f068Schristos       goto yyerrlab1;
1256*e992f068Schristos     }
125775fd0b74Schristos   else
125875fd0b74Schristos     {
125975fd0b74Schristos       yytoken = YYTRANSLATE (yychar);
126075fd0b74Schristos       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
126175fd0b74Schristos     }
126275fd0b74Schristos 
126375fd0b74Schristos   /* If the proper action on seeing token YYTOKEN is to reduce or to
126475fd0b74Schristos      detect an error, take that action.  */
126575fd0b74Schristos   yyn += yytoken;
126675fd0b74Schristos   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
126775fd0b74Schristos     goto yydefault;
126875fd0b74Schristos   yyn = yytable[yyn];
126975fd0b74Schristos   if (yyn <= 0)
127075fd0b74Schristos     {
1271ede78133Schristos       if (yytable_value_is_error (yyn))
127275fd0b74Schristos         goto yyerrlab;
127375fd0b74Schristos       yyn = -yyn;
127475fd0b74Schristos       goto yyreduce;
127575fd0b74Schristos     }
127675fd0b74Schristos 
127775fd0b74Schristos   /* Count tokens shifted since error; after three, turn off error
127875fd0b74Schristos      status.  */
127975fd0b74Schristos   if (yyerrstatus)
128075fd0b74Schristos     yyerrstatus--;
128175fd0b74Schristos 
1282ede78133Schristos   /* Shift the lookahead token.  */
128375fd0b74Schristos   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
128475fd0b74Schristos   yystate = yyn;
1285ede78133Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
128675fd0b74Schristos   *++yyvsp = yylval;
1287ede78133Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_END
128875fd0b74Schristos 
1289*e992f068Schristos   /* Discard the shifted token.  */
1290*e992f068Schristos   yychar = YYEMPTY;
129175fd0b74Schristos   goto yynewstate;
129275fd0b74Schristos 
129375fd0b74Schristos 
129475fd0b74Schristos /*-----------------------------------------------------------.
129575fd0b74Schristos | yydefault -- do the default action for the current state.  |
129675fd0b74Schristos `-----------------------------------------------------------*/
129775fd0b74Schristos yydefault:
129875fd0b74Schristos   yyn = yydefact[yystate];
129975fd0b74Schristos   if (yyn == 0)
130075fd0b74Schristos     goto yyerrlab;
130175fd0b74Schristos   goto yyreduce;
130275fd0b74Schristos 
130375fd0b74Schristos 
130475fd0b74Schristos /*-----------------------------.
1305*e992f068Schristos | yyreduce -- do a reduction.  |
130675fd0b74Schristos `-----------------------------*/
130775fd0b74Schristos yyreduce:
130875fd0b74Schristos   /* yyn is the number of a rule to reduce with.  */
130975fd0b74Schristos   yylen = yyr2[yyn];
131075fd0b74Schristos 
131175fd0b74Schristos   /* If YYLEN is nonzero, implement the default value of the action:
1312ede78133Schristos      '$$ = $1'.
131375fd0b74Schristos 
131475fd0b74Schristos      Otherwise, the following line sets YYVAL to garbage.
131575fd0b74Schristos      This behavior is undocumented and Bison
131675fd0b74Schristos      users should not rely upon it.  Assigning to YYVAL
131775fd0b74Schristos      unconditionally makes the parser a bit smaller, and it avoids a
131875fd0b74Schristos      GCC warning that YYVAL may be used uninitialized.  */
131975fd0b74Schristos   yyval = yyvsp[1-yylen];
132075fd0b74Schristos 
132175fd0b74Schristos 
132275fd0b74Schristos   YY_REDUCE_PRINT (yyn);
132375fd0b74Schristos   switch (yyn)
132475fd0b74Schristos     {
1325*e992f068Schristos   case 7: /* entity: comments  */
1326*e992f068Schristos #line 76 "mcparse.y"
132775fd0b74Schristos           {
132875fd0b74Schristos 	    cur_node = mc_add_node ();
1329ede78133Schristos 	    cur_node->user_text = (yyvsp[0].ustr);
133075fd0b74Schristos 	  }
1331*e992f068Schristos #line 1332 "mcparse.c"
133275fd0b74Schristos     break;
133375fd0b74Schristos 
1334*e992f068Schristos   case 8: /* entity: error  */
1335*e992f068Schristos #line 80 "mcparse.y"
133675fd0b74Schristos                 { mc_fatal ("syntax error"); }
1337*e992f068Schristos #line 1338 "mcparse.c"
133875fd0b74Schristos     break;
133975fd0b74Schristos 
1340*e992f068Schristos   case 10: /* global_section: MCSEVERITYNAMES '=' '(' severitymaps error  */
1341*e992f068Schristos #line 85 "mcparse.y"
134275fd0b74Schristos                                                      { mc_fatal ("missing ')' in SeverityNames"); }
1343*e992f068Schristos #line 1344 "mcparse.c"
134475fd0b74Schristos     break;
134575fd0b74Schristos 
1346*e992f068Schristos   case 11: /* global_section: MCSEVERITYNAMES '=' error  */
1347*e992f068Schristos #line 86 "mcparse.y"
134875fd0b74Schristos                                     { mc_fatal ("missing '(' in SeverityNames"); }
1349*e992f068Schristos #line 1350 "mcparse.c"
135075fd0b74Schristos     break;
135175fd0b74Schristos 
1352*e992f068Schristos   case 12: /* global_section: MCSEVERITYNAMES error  */
1353*e992f068Schristos #line 87 "mcparse.y"
135475fd0b74Schristos                                 { mc_fatal ("missing '=' for SeverityNames"); }
1355*e992f068Schristos #line 1356 "mcparse.c"
135675fd0b74Schristos     break;
135775fd0b74Schristos 
1358*e992f068Schristos   case 14: /* global_section: MCLANGUAGENAMES '=' '(' langmaps error  */
1359*e992f068Schristos #line 89 "mcparse.y"
136075fd0b74Schristos                                                  { mc_fatal ("missing ')' in LanguageNames"); }
1361*e992f068Schristos #line 1362 "mcparse.c"
136275fd0b74Schristos     break;
136375fd0b74Schristos 
1364*e992f068Schristos   case 15: /* global_section: MCLANGUAGENAMES '=' error  */
1365*e992f068Schristos #line 90 "mcparse.y"
136675fd0b74Schristos                                     { mc_fatal ("missing '(' in LanguageNames"); }
1367*e992f068Schristos #line 1368 "mcparse.c"
136875fd0b74Schristos     break;
136975fd0b74Schristos 
1370*e992f068Schristos   case 16: /* global_section: MCLANGUAGENAMES error  */
1371*e992f068Schristos #line 91 "mcparse.y"
137275fd0b74Schristos                                 { mc_fatal ("missing '=' for LanguageNames"); }
1373*e992f068Schristos #line 1374 "mcparse.c"
137475fd0b74Schristos     break;
137575fd0b74Schristos 
1376*e992f068Schristos   case 18: /* global_section: MCFACILITYNAMES '=' '(' facilitymaps error  */
1377*e992f068Schristos #line 93 "mcparse.y"
137875fd0b74Schristos                                                      { mc_fatal ("missing ')' in FacilityNames"); }
1379*e992f068Schristos #line 1380 "mcparse.c"
138075fd0b74Schristos     break;
138175fd0b74Schristos 
1382*e992f068Schristos   case 19: /* global_section: MCFACILITYNAMES '=' error  */
1383*e992f068Schristos #line 94 "mcparse.y"
138475fd0b74Schristos                                     { mc_fatal ("missing '(' in FacilityNames"); }
1385*e992f068Schristos #line 1386 "mcparse.c"
138675fd0b74Schristos     break;
138775fd0b74Schristos 
1388*e992f068Schristos   case 20: /* global_section: MCFACILITYNAMES error  */
1389*e992f068Schristos #line 95 "mcparse.y"
139075fd0b74Schristos                                 { mc_fatal ("missing '=' for FacilityNames"); }
1391*e992f068Schristos #line 1392 "mcparse.c"
139275fd0b74Schristos     break;
139375fd0b74Schristos 
1394*e992f068Schristos   case 21: /* global_section: MCOUTPUTBASE '=' MCNUMBER  */
1395*e992f068Schristos #line 97 "mcparse.y"
139675fd0b74Schristos           {
1397ede78133Schristos 	    if ((yyvsp[0].ival) != 10 && (yyvsp[0].ival) != 16)
139875fd0b74Schristos 	      mc_fatal ("OutputBase allows 10 or 16 as value");
1399ede78133Schristos 	    mcset_out_values_are_decimal = ((yyvsp[0].ival) == 10 ? 1 : 0);
140075fd0b74Schristos 	  }
1401*e992f068Schristos #line 1402 "mcparse.c"
140275fd0b74Schristos     break;
140375fd0b74Schristos 
1404*e992f068Schristos   case 22: /* global_section: MCMESSAGEIDTYPEDEF '=' MCIDENT  */
1405*e992f068Schristos #line 103 "mcparse.y"
140675fd0b74Schristos           {
1407ede78133Schristos 	    mcset_msg_id_typedef = (yyvsp[0].ustr);
140875fd0b74Schristos 	  }
1409*e992f068Schristos #line 1410 "mcparse.c"
141075fd0b74Schristos     break;
141175fd0b74Schristos 
1412*e992f068Schristos   case 23: /* global_section: MCMESSAGEIDTYPEDEF '=' error  */
1413*e992f068Schristos #line 107 "mcparse.y"
141475fd0b74Schristos           {
141575fd0b74Schristos 	    mc_fatal ("MessageIdTypedef expects an identifier");
141675fd0b74Schristos 	  }
1417*e992f068Schristos #line 1418 "mcparse.c"
141875fd0b74Schristos     break;
141975fd0b74Schristos 
1420*e992f068Schristos   case 24: /* global_section: MCMESSAGEIDTYPEDEF error  */
1421*e992f068Schristos #line 111 "mcparse.y"
142275fd0b74Schristos           {
142375fd0b74Schristos 	    mc_fatal ("missing '=' for MessageIdTypedef");
142475fd0b74Schristos 	  }
1425*e992f068Schristos #line 1426 "mcparse.c"
142675fd0b74Schristos     break;
142775fd0b74Schristos 
1428*e992f068Schristos   case 27: /* severitymaps: error  */
1429*e992f068Schristos #line 119 "mcparse.y"
143075fd0b74Schristos                 { mc_fatal ("severity ident missing"); }
1431*e992f068Schristos #line 1432 "mcparse.c"
143275fd0b74Schristos     break;
143375fd0b74Schristos 
1434*e992f068Schristos   case 28: /* severitymap: token '=' MCNUMBER alias_name  */
1435*e992f068Schristos #line 124 "mcparse.y"
143675fd0b74Schristos           {
1437ede78133Schristos 	    mc_add_keyword ((yyvsp[-3].ustr), MCTOKEN, "severity", (yyvsp[-1].ival), (yyvsp[0].ustr));
143875fd0b74Schristos 	  }
1439*e992f068Schristos #line 1440 "mcparse.c"
144075fd0b74Schristos     break;
144175fd0b74Schristos 
1442*e992f068Schristos   case 29: /* severitymap: token '=' error  */
1443*e992f068Schristos #line 127 "mcparse.y"
144475fd0b74Schristos                           { mc_fatal ("severity number missing"); }
1445*e992f068Schristos #line 1446 "mcparse.c"
144675fd0b74Schristos     break;
144775fd0b74Schristos 
1448*e992f068Schristos   case 30: /* severitymap: token error  */
1449*e992f068Schristos #line 128 "mcparse.y"
145075fd0b74Schristos                       { mc_fatal ("severity missing '='"); }
1451*e992f068Schristos #line 1452 "mcparse.c"
145275fd0b74Schristos     break;
145375fd0b74Schristos 
1454*e992f068Schristos   case 33: /* facilitymaps: error  */
1455*e992f068Schristos #line 134 "mcparse.y"
145675fd0b74Schristos                 { mc_fatal ("missing ident in FacilityNames"); }
1457*e992f068Schristos #line 1458 "mcparse.c"
145875fd0b74Schristos     break;
145975fd0b74Schristos 
1460*e992f068Schristos   case 34: /* facilitymap: token '=' MCNUMBER alias_name  */
1461*e992f068Schristos #line 139 "mcparse.y"
146275fd0b74Schristos           {
1463ede78133Schristos 	    mc_add_keyword ((yyvsp[-3].ustr), MCTOKEN, "facility", (yyvsp[-1].ival), (yyvsp[0].ustr));
146475fd0b74Schristos 	  }
1465*e992f068Schristos #line 1466 "mcparse.c"
146675fd0b74Schristos     break;
146775fd0b74Schristos 
1468*e992f068Schristos   case 35: /* facilitymap: token '=' error  */
1469*e992f068Schristos #line 142 "mcparse.y"
147075fd0b74Schristos                           { mc_fatal ("facility number missing"); }
1471*e992f068Schristos #line 1472 "mcparse.c"
147275fd0b74Schristos     break;
147375fd0b74Schristos 
1474*e992f068Schristos   case 36: /* facilitymap: token error  */
1475*e992f068Schristos #line 143 "mcparse.y"
147675fd0b74Schristos                       { mc_fatal ("facility missing '='"); }
1477*e992f068Schristos #line 1478 "mcparse.c"
147875fd0b74Schristos     break;
147975fd0b74Schristos 
1480*e992f068Schristos   case 39: /* langmaps: error  */
1481*e992f068Schristos #line 149 "mcparse.y"
148275fd0b74Schristos                 { mc_fatal ("missing ident in LanguageNames"); }
1483*e992f068Schristos #line 1484 "mcparse.c"
148475fd0b74Schristos     break;
148575fd0b74Schristos 
1486*e992f068Schristos   case 40: /* langmap: token '=' MCNUMBER lex_want_filename ':' MCFILENAME  */
1487*e992f068Schristos #line 154 "mcparse.y"
148875fd0b74Schristos           {
1489ede78133Schristos 	    mc_add_keyword ((yyvsp[-5].ustr), MCTOKEN, "language", (yyvsp[-3].ival), (yyvsp[0].ustr));
149075fd0b74Schristos 	  }
1491*e992f068Schristos #line 1492 "mcparse.c"
149275fd0b74Schristos     break;
149375fd0b74Schristos 
1494*e992f068Schristos   case 41: /* langmap: token '=' MCNUMBER lex_want_filename ':' error  */
1495*e992f068Schristos #line 157 "mcparse.y"
149675fd0b74Schristos                                                          { mc_fatal ("missing filename in LanguageNames"); }
1497*e992f068Schristos #line 1498 "mcparse.c"
149875fd0b74Schristos     break;
149975fd0b74Schristos 
1500*e992f068Schristos   case 42: /* langmap: token '=' MCNUMBER error  */
1501*e992f068Schristos #line 158 "mcparse.y"
150275fd0b74Schristos                                    { mc_fatal ("missing ':' in LanguageNames"); }
1503*e992f068Schristos #line 1504 "mcparse.c"
150475fd0b74Schristos     break;
150575fd0b74Schristos 
1506*e992f068Schristos   case 43: /* langmap: token '=' error  */
1507*e992f068Schristos #line 159 "mcparse.y"
150875fd0b74Schristos                           { mc_fatal ("missing language code in LanguageNames"); }
1509*e992f068Schristos #line 1510 "mcparse.c"
151075fd0b74Schristos     break;
151175fd0b74Schristos 
1512*e992f068Schristos   case 44: /* langmap: token error  */
1513*e992f068Schristos #line 160 "mcparse.y"
151475fd0b74Schristos                       { mc_fatal ("missing '=' for LanguageNames"); }
1515*e992f068Schristos #line 1516 "mcparse.c"
151675fd0b74Schristos     break;
151775fd0b74Schristos 
1518*e992f068Schristos   case 45: /* alias_name: %empty  */
1519*e992f068Schristos #line 165 "mcparse.y"
152075fd0b74Schristos           {
152175fd0b74Schristos 	    (yyval.ustr) = NULL;
152275fd0b74Schristos 	  }
1523*e992f068Schristos #line 1524 "mcparse.c"
152475fd0b74Schristos     break;
152575fd0b74Schristos 
1526*e992f068Schristos   case 46: /* alias_name: ':' MCIDENT  */
1527*e992f068Schristos #line 169 "mcparse.y"
152875fd0b74Schristos           {
1529ede78133Schristos 	    (yyval.ustr) = (yyvsp[0].ustr);
153075fd0b74Schristos 	  }
1531*e992f068Schristos #line 1532 "mcparse.c"
153275fd0b74Schristos     break;
153375fd0b74Schristos 
1534*e992f068Schristos   case 47: /* alias_name: ':' error  */
1535*e992f068Schristos #line 172 "mcparse.y"
153675fd0b74Schristos                     { mc_fatal ("illegal token in identifier"); (yyval.ustr) = NULL; }
1537*e992f068Schristos #line 1538 "mcparse.c"
153875fd0b74Schristos     break;
153975fd0b74Schristos 
1540*e992f068Schristos   case 48: /* $@1: %empty  */
1541*e992f068Schristos #line 177 "mcparse.y"
154275fd0b74Schristos           {
154375fd0b74Schristos 	    cur_node = mc_add_node ();
154475fd0b74Schristos 	    cur_node->symbol = mc_last_symbol;
154575fd0b74Schristos 	    cur_node->facility = mc_cur_facility;
154675fd0b74Schristos 	    cur_node->severity = mc_cur_severity;
1547ede78133Schristos 	    cur_node->id = ((yyvsp[-1].ival) & 0xffffUL);
1548ede78133Schristos 	    cur_node->vid = ((yyvsp[-1].ival) & 0xffffUL) | mc_sefa_val;
1549*e992f068Schristos 	    cur_node->id_typecast = mcset_msg_id_typedef;
1550ede78133Schristos 	    mc_last_id = (yyvsp[-1].ival);
155175fd0b74Schristos 	  }
1552*e992f068Schristos #line 1553 "mcparse.c"
155375fd0b74Schristos     break;
155475fd0b74Schristos 
1555*e992f068Schristos   case 50: /* id: MCMESSAGEID '=' vid  */
1556*e992f068Schristos #line 190 "mcparse.y"
1557ede78133Schristos                               { (yyval.ival) = (yyvsp[0].ival); }
1558*e992f068Schristos #line 1559 "mcparse.c"
155975fd0b74Schristos     break;
156075fd0b74Schristos 
1561*e992f068Schristos   case 51: /* id: MCMESSAGEID '=' error  */
1562*e992f068Schristos #line 191 "mcparse.y"
156375fd0b74Schristos                                 { mc_fatal ("missing number in MessageId"); (yyval.ival) = 0; }
1564*e992f068Schristos #line 1565 "mcparse.c"
156575fd0b74Schristos     break;
156675fd0b74Schristos 
1567*e992f068Schristos   case 52: /* id: MCMESSAGEID error  */
1568*e992f068Schristos #line 192 "mcparse.y"
156975fd0b74Schristos                             { mc_fatal ("missing '=' for MessageId"); (yyval.ival) = 0; }
1570*e992f068Schristos #line 1571 "mcparse.c"
157175fd0b74Schristos     break;
157275fd0b74Schristos 
1573*e992f068Schristos   case 53: /* vid: %empty  */
1574*e992f068Schristos #line 196 "mcparse.y"
157575fd0b74Schristos           {
157675fd0b74Schristos 	    (yyval.ival) = ++mc_last_id;
157775fd0b74Schristos 	  }
1578*e992f068Schristos #line 1579 "mcparse.c"
157975fd0b74Schristos     break;
158075fd0b74Schristos 
1581*e992f068Schristos   case 54: /* vid: MCNUMBER  */
1582*e992f068Schristos #line 200 "mcparse.y"
158375fd0b74Schristos           {
1584ede78133Schristos 	    (yyval.ival) = (yyvsp[0].ival);
158575fd0b74Schristos 	  }
1586*e992f068Schristos #line 1587 "mcparse.c"
158775fd0b74Schristos     break;
158875fd0b74Schristos 
1589*e992f068Schristos   case 55: /* vid: '+' MCNUMBER  */
1590*e992f068Schristos #line 204 "mcparse.y"
159175fd0b74Schristos           {
1592ede78133Schristos 	    (yyval.ival) = mc_last_id + (yyvsp[0].ival);
159375fd0b74Schristos 	  }
1594*e992f068Schristos #line 1595 "mcparse.c"
159575fd0b74Schristos     break;
159675fd0b74Schristos 
1597*e992f068Schristos   case 56: /* vid: '+' error  */
1598*e992f068Schristos #line 207 "mcparse.y"
159975fd0b74Schristos                     { mc_fatal ("missing number after MessageId '+'"); }
1600*e992f068Schristos #line 1601 "mcparse.c"
160175fd0b74Schristos     break;
160275fd0b74Schristos 
1603*e992f068Schristos   case 57: /* sefasy_def: %empty  */
1604*e992f068Schristos #line 212 "mcparse.y"
160575fd0b74Schristos           {
160675fd0b74Schristos 	    (yyval.ival) = 0;
160775fd0b74Schristos 	    mc_sefa_val = (mcset_custom_bit ? 1 : 0) << 29;
160875fd0b74Schristos 	    mc_last_symbol = NULL;
160975fd0b74Schristos 	    mc_cur_severity = NULL;
161075fd0b74Schristos 	    mc_cur_facility = NULL;
161175fd0b74Schristos 	  }
1612*e992f068Schristos #line 1613 "mcparse.c"
161375fd0b74Schristos     break;
161475fd0b74Schristos 
1615*e992f068Schristos   case 58: /* sefasy_def: sefasy_def severity  */
1616*e992f068Schristos #line 220 "mcparse.y"
161775fd0b74Schristos           {
1618ede78133Schristos 	    if ((yyvsp[-1].ival) & 1)
161975fd0b74Schristos 	      mc_warn (_("duplicate definition of Severity"));
1620ede78133Schristos 	    (yyval.ival) = (yyvsp[-1].ival) | 1;
162175fd0b74Schristos 	  }
1622*e992f068Schristos #line 1623 "mcparse.c"
162375fd0b74Schristos     break;
162475fd0b74Schristos 
1625*e992f068Schristos   case 59: /* sefasy_def: sefasy_def facility  */
1626*e992f068Schristos #line 226 "mcparse.y"
162775fd0b74Schristos           {
1628ede78133Schristos 	    if ((yyvsp[-1].ival) & 2)
162975fd0b74Schristos 	      mc_warn (_("duplicate definition of Facility"));
1630ede78133Schristos 	    (yyval.ival) = (yyvsp[-1].ival) | 2;
163175fd0b74Schristos 	  }
1632*e992f068Schristos #line 1633 "mcparse.c"
163375fd0b74Schristos     break;
163475fd0b74Schristos 
1635*e992f068Schristos   case 60: /* sefasy_def: sefasy_def symbol  */
1636*e992f068Schristos #line 232 "mcparse.y"
163775fd0b74Schristos           {
1638ede78133Schristos 	    if ((yyvsp[-1].ival) & 4)
163975fd0b74Schristos 	      mc_warn (_("duplicate definition of SymbolicName"));
1640ede78133Schristos 	    (yyval.ival) = (yyvsp[-1].ival) | 4;
164175fd0b74Schristos 	  }
1642*e992f068Schristos #line 1643 "mcparse.c"
164375fd0b74Schristos     break;
164475fd0b74Schristos 
1645*e992f068Schristos   case 61: /* severity: MCSEVERITY '=' MCTOKEN  */
1646*e992f068Schristos #line 240 "mcparse.y"
164775fd0b74Schristos           {
164875fd0b74Schristos 	    mc_sefa_val &= ~ (0x3UL << 30);
1649ede78133Schristos 	    mc_sefa_val |= (((yyvsp[0].tok)->nval & 0x3UL) << 30);
1650ede78133Schristos 	    mc_cur_severity = (yyvsp[0].tok);
165175fd0b74Schristos 	  }
1652*e992f068Schristos #line 1653 "mcparse.c"
165375fd0b74Schristos     break;
165475fd0b74Schristos 
1655*e992f068Schristos   case 62: /* facility: MCFACILITY '=' MCTOKEN  */
1656*e992f068Schristos #line 248 "mcparse.y"
165775fd0b74Schristos           {
165875fd0b74Schristos 	    mc_sefa_val &= ~ (0xfffUL << 16);
1659ede78133Schristos 	    mc_sefa_val |= (((yyvsp[0].tok)->nval & 0xfffUL) << 16);
1660ede78133Schristos 	    mc_cur_facility = (yyvsp[0].tok);
166175fd0b74Schristos 	  }
1662*e992f068Schristos #line 1663 "mcparse.c"
166375fd0b74Schristos     break;
166475fd0b74Schristos 
1665*e992f068Schristos   case 63: /* symbol: MCSYMBOLICNAME '=' MCIDENT  */
1666*e992f068Schristos #line 256 "mcparse.y"
166775fd0b74Schristos         {
1668ede78133Schristos 	  mc_last_symbol = (yyvsp[0].ustr);
166975fd0b74Schristos 	}
1670*e992f068Schristos #line 1671 "mcparse.c"
167175fd0b74Schristos     break;
167275fd0b74Schristos 
1673*e992f068Schristos   case 66: /* lang_entity: lang lex_want_line lines MCENDLINE  */
1674*e992f068Schristos #line 268 "mcparse.y"
167575fd0b74Schristos           {
167675fd0b74Schristos 	    mc_node_lang *h;
1677ede78133Schristos 	    h = mc_add_node_lang (cur_node, (yyvsp[-3].tok), cur_node->vid);
1678ede78133Schristos 	    h->message = (yyvsp[-1].ustr);
167975fd0b74Schristos 	    if (mcset_max_message_length != 0 && unichar_len (h->message) > mcset_max_message_length)
168075fd0b74Schristos 	      mc_warn ("message length to long");
168175fd0b74Schristos 	  }
1682*e992f068Schristos #line 1683 "mcparse.c"
168375fd0b74Schristos     break;
168475fd0b74Schristos 
1685*e992f068Schristos   case 67: /* lines: MCLINE  */
1686*e992f068Schristos #line 278 "mcparse.y"
168775fd0b74Schristos           {
1688ede78133Schristos 	    (yyval.ustr) = (yyvsp[0].ustr);
168975fd0b74Schristos 	  }
1690*e992f068Schristos #line 1691 "mcparse.c"
169175fd0b74Schristos     break;
169275fd0b74Schristos 
1693*e992f068Schristos   case 68: /* lines: lines MCLINE  */
1694*e992f068Schristos #line 282 "mcparse.y"
169575fd0b74Schristos           {
169675fd0b74Schristos 	    unichar *h;
169775fd0b74Schristos 	    rc_uint_type l1,l2;
1698ede78133Schristos 	    l1 = unichar_len ((yyvsp[-1].ustr));
1699ede78133Schristos 	    l2 = unichar_len ((yyvsp[0].ustr));
170075fd0b74Schristos 	    h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
1701ede78133Schristos 	    if (l1) memcpy (h, (yyvsp[-1].ustr), l1 * sizeof (unichar));
1702ede78133Schristos 	    if (l2) memcpy (&h[l1], (yyvsp[0].ustr), l2 * sizeof (unichar));
170375fd0b74Schristos 	    h[l1 + l2] = 0;
170475fd0b74Schristos 	    (yyval.ustr) = h;
170575fd0b74Schristos 	  }
1706*e992f068Schristos #line 1707 "mcparse.c"
170775fd0b74Schristos     break;
170875fd0b74Schristos 
1709*e992f068Schristos   case 69: /* lines: error  */
1710*e992f068Schristos #line 293 "mcparse.y"
171175fd0b74Schristos                 { mc_fatal ("missing end of message text"); (yyval.ustr) = NULL; }
1712*e992f068Schristos #line 1713 "mcparse.c"
171375fd0b74Schristos     break;
171475fd0b74Schristos 
1715*e992f068Schristos   case 70: /* lines: lines error  */
1716*e992f068Schristos #line 294 "mcparse.y"
1717ede78133Schristos                       { mc_fatal ("missing end of message text"); (yyval.ustr) = (yyvsp[-1].ustr); }
1718*e992f068Schristos #line 1719 "mcparse.c"
171975fd0b74Schristos     break;
172075fd0b74Schristos 
1721*e992f068Schristos   case 71: /* comments: MCCOMMENT  */
1722*e992f068Schristos #line 297 "mcparse.y"
1723ede78133Schristos                     { (yyval.ustr) = (yyvsp[0].ustr); }
1724*e992f068Schristos #line 1725 "mcparse.c"
172575fd0b74Schristos     break;
172675fd0b74Schristos 
1727*e992f068Schristos   case 72: /* comments: comments MCCOMMENT  */
1728*e992f068Schristos #line 299 "mcparse.y"
172975fd0b74Schristos           {
173075fd0b74Schristos 	    unichar *h;
173175fd0b74Schristos 	    rc_uint_type l1,l2;
1732ede78133Schristos 	    l1 = unichar_len ((yyvsp[-1].ustr));
1733ede78133Schristos 	    l2 = unichar_len ((yyvsp[0].ustr));
173475fd0b74Schristos 	    h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
1735ede78133Schristos 	    if (l1) memcpy (h, (yyvsp[-1].ustr), l1 * sizeof (unichar));
1736ede78133Schristos 	    if (l2) memcpy (&h[l1], (yyvsp[0].ustr), l2 * sizeof (unichar));
173775fd0b74Schristos 	    h[l1 + l2] = 0;
173875fd0b74Schristos 	    (yyval.ustr) = h;
173975fd0b74Schristos 	  }
1740*e992f068Schristos #line 1741 "mcparse.c"
174175fd0b74Schristos     break;
174275fd0b74Schristos 
1743*e992f068Schristos   case 73: /* lang: MCLANGUAGE lex_want_nl '=' MCTOKEN NL  */
1744*e992f068Schristos #line 313 "mcparse.y"
174575fd0b74Schristos           {
1746ede78133Schristos 	    (yyval.tok) = (yyvsp[-1].tok);
174775fd0b74Schristos 	  }
1748*e992f068Schristos #line 1749 "mcparse.c"
174975fd0b74Schristos     break;
175075fd0b74Schristos 
1751*e992f068Schristos   case 74: /* lang: MCLANGUAGE lex_want_nl '=' MCIDENT NL  */
1752*e992f068Schristos #line 317 "mcparse.y"
175375fd0b74Schristos           {
175475fd0b74Schristos 	    (yyval.tok) = NULL;
175575fd0b74Schristos 	    mc_fatal (_("undeclared language identifier"));
175675fd0b74Schristos 	  }
1757*e992f068Schristos #line 1758 "mcparse.c"
175875fd0b74Schristos     break;
175975fd0b74Schristos 
1760*e992f068Schristos   case 75: /* lang: MCLANGUAGE lex_want_nl '=' token error  */
1761*e992f068Schristos #line 322 "mcparse.y"
176275fd0b74Schristos           {
176375fd0b74Schristos 	    (yyval.tok) = NULL;
176475fd0b74Schristos 	    mc_fatal ("missing newline after Language");
176575fd0b74Schristos 	  }
1766*e992f068Schristos #line 1767 "mcparse.c"
176775fd0b74Schristos     break;
176875fd0b74Schristos 
1769*e992f068Schristos   case 76: /* lang: MCLANGUAGE lex_want_nl '=' error  */
1770*e992f068Schristos #line 327 "mcparse.y"
177175fd0b74Schristos           {
177275fd0b74Schristos 	    (yyval.tok) = NULL;
177375fd0b74Schristos 	    mc_fatal ("missing ident for Language");
177475fd0b74Schristos 	  }
1775*e992f068Schristos #line 1776 "mcparse.c"
177675fd0b74Schristos     break;
177775fd0b74Schristos 
1778*e992f068Schristos   case 77: /* lang: MCLANGUAGE error  */
1779*e992f068Schristos #line 332 "mcparse.y"
178075fd0b74Schristos           {
178175fd0b74Schristos 	    (yyval.tok) = NULL;
178275fd0b74Schristos 	    mc_fatal ("missing '=' for Language");
178375fd0b74Schristos 	  }
1784*e992f068Schristos #line 1785 "mcparse.c"
178575fd0b74Schristos     break;
178675fd0b74Schristos 
1787*e992f068Schristos   case 78: /* token: MCIDENT  */
1788*e992f068Schristos #line 338 "mcparse.y"
1789ede78133Schristos                 { (yyval.ustr) = (yyvsp[0].ustr); }
1790*e992f068Schristos #line 1791 "mcparse.c"
179175fd0b74Schristos     break;
179275fd0b74Schristos 
1793*e992f068Schristos   case 79: /* token: MCTOKEN  */
1794*e992f068Schristos #line 339 "mcparse.y"
1795ede78133Schristos                    { (yyval.ustr) = (yyvsp[0].tok)->usz; }
1796*e992f068Schristos #line 1797 "mcparse.c"
179775fd0b74Schristos     break;
179875fd0b74Schristos 
1799*e992f068Schristos   case 80: /* lex_want_nl: %empty  */
1800*e992f068Schristos #line 343 "mcparse.y"
180175fd0b74Schristos                         { mclex_want_nl = 1; }
1802*e992f068Schristos #line 1803 "mcparse.c"
180375fd0b74Schristos     break;
180475fd0b74Schristos 
1805*e992f068Schristos   case 81: /* lex_want_line: %empty  */
1806*e992f068Schristos #line 347 "mcparse.y"
180775fd0b74Schristos                         { mclex_want_line = 1; }
1808*e992f068Schristos #line 1809 "mcparse.c"
180975fd0b74Schristos     break;
181075fd0b74Schristos 
1811*e992f068Schristos   case 82: /* lex_want_filename: %empty  */
1812*e992f068Schristos #line 351 "mcparse.y"
181375fd0b74Schristos                         { mclex_want_filename = 1; }
1814*e992f068Schristos #line 1815 "mcparse.c"
181575fd0b74Schristos     break;
181675fd0b74Schristos 
181775fd0b74Schristos 
1818*e992f068Schristos #line 1819 "mcparse.c"
1819*e992f068Schristos 
182075fd0b74Schristos       default: break;
182175fd0b74Schristos     }
1822ede78133Schristos   /* User semantic actions sometimes alter yychar, and that requires
1823ede78133Schristos      that yytoken be updated with the new translation.  We take the
1824ede78133Schristos      approach of translating immediately before every use of yytoken.
1825ede78133Schristos      One alternative is translating here after every semantic action,
1826ede78133Schristos      but that translation would be missed if the semantic action invokes
1827ede78133Schristos      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1828ede78133Schristos      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1829ede78133Schristos      incorrect destructor might then be invoked immediately.  In the
1830ede78133Schristos      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1831ede78133Schristos      to an incorrect destructor call or verbose syntax error message
1832ede78133Schristos      before the lookahead is translated.  */
1833*e992f068Schristos   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
183475fd0b74Schristos 
183575fd0b74Schristos   YYPOPSTACK (yylen);
183675fd0b74Schristos   yylen = 0;
183775fd0b74Schristos 
183875fd0b74Schristos   *++yyvsp = yyval;
183975fd0b74Schristos 
1840ede78133Schristos   /* Now 'shift' the result of the reduction.  Determine what state
184175fd0b74Schristos      that goes to, based on the state we popped back to and the rule
184275fd0b74Schristos      number reduced by.  */
1843*e992f068Schristos   {
1844*e992f068Schristos     const int yylhs = yyr1[yyn] - YYNTOKENS;
1845*e992f068Schristos     const int yyi = yypgoto[yylhs] + *yyssp;
1846*e992f068Schristos     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1847*e992f068Schristos                ? yytable[yyi]
1848*e992f068Schristos                : yydefgoto[yylhs]);
1849*e992f068Schristos   }
185075fd0b74Schristos 
185175fd0b74Schristos   goto yynewstate;
185275fd0b74Schristos 
185375fd0b74Schristos 
1854ede78133Schristos /*--------------------------------------.
1855ede78133Schristos | yyerrlab -- here on detecting error.  |
1856ede78133Schristos `--------------------------------------*/
185775fd0b74Schristos yyerrlab:
1858ede78133Schristos   /* Make sure we have latest lookahead translation.  See comments at
1859ede78133Schristos      user semantic actions for why this is necessary.  */
1860*e992f068Schristos   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
186175fd0b74Schristos   /* If not already recovering from an error, report this error.  */
186275fd0b74Schristos   if (!yyerrstatus)
186375fd0b74Schristos     {
186475fd0b74Schristos       ++yynerrs;
186575fd0b74Schristos       yyerror (YY_("syntax error"));
186675fd0b74Schristos     }
186775fd0b74Schristos 
186875fd0b74Schristos   if (yyerrstatus == 3)
186975fd0b74Schristos     {
1870ede78133Schristos       /* If just tried and failed to reuse lookahead token after an
187175fd0b74Schristos          error, discard it.  */
187275fd0b74Schristos 
187375fd0b74Schristos       if (yychar <= YYEOF)
187475fd0b74Schristos         {
187575fd0b74Schristos           /* Return failure if at end of input.  */
187675fd0b74Schristos           if (yychar == YYEOF)
187775fd0b74Schristos             YYABORT;
187875fd0b74Schristos         }
187975fd0b74Schristos       else
188075fd0b74Schristos         {
188175fd0b74Schristos           yydestruct ("Error: discarding",
188275fd0b74Schristos                       yytoken, &yylval);
188375fd0b74Schristos           yychar = YYEMPTY;
188475fd0b74Schristos         }
188575fd0b74Schristos     }
188675fd0b74Schristos 
1887ede78133Schristos   /* Else will try to reuse lookahead token after shifting the error
188875fd0b74Schristos      token.  */
188975fd0b74Schristos   goto yyerrlab1;
189075fd0b74Schristos 
189175fd0b74Schristos 
189275fd0b74Schristos /*---------------------------------------------------.
189375fd0b74Schristos | yyerrorlab -- error raised explicitly by YYERROR.  |
189475fd0b74Schristos `---------------------------------------------------*/
189575fd0b74Schristos yyerrorlab:
1896*e992f068Schristos   /* Pacify compilers when the user code never invokes YYERROR and the
1897*e992f068Schristos      label yyerrorlab therefore never appears in user code.  */
1898*e992f068Schristos   if (0)
1899*e992f068Schristos     YYERROR;
1900*e992f068Schristos   ++yynerrs;
190175fd0b74Schristos 
1902ede78133Schristos   /* Do not reclaim the symbols of the rule whose action triggered
190375fd0b74Schristos      this YYERROR.  */
190475fd0b74Schristos   YYPOPSTACK (yylen);
190575fd0b74Schristos   yylen = 0;
190675fd0b74Schristos   YY_STACK_PRINT (yyss, yyssp);
190775fd0b74Schristos   yystate = *yyssp;
190875fd0b74Schristos   goto yyerrlab1;
190975fd0b74Schristos 
191075fd0b74Schristos 
191175fd0b74Schristos /*-------------------------------------------------------------.
191275fd0b74Schristos | yyerrlab1 -- common code for both syntax error and YYERROR.  |
191375fd0b74Schristos `-------------------------------------------------------------*/
191475fd0b74Schristos yyerrlab1:
191575fd0b74Schristos   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
191675fd0b74Schristos 
1917*e992f068Schristos   /* Pop stack until we find a state that shifts the error token.  */
191875fd0b74Schristos   for (;;)
191975fd0b74Schristos     {
192075fd0b74Schristos       yyn = yypact[yystate];
1921ede78133Schristos       if (!yypact_value_is_default (yyn))
192275fd0b74Schristos         {
1923*e992f068Schristos           yyn += YYSYMBOL_YYerror;
1924*e992f068Schristos           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
192575fd0b74Schristos             {
192675fd0b74Schristos               yyn = yytable[yyn];
192775fd0b74Schristos               if (0 < yyn)
192875fd0b74Schristos                 break;
192975fd0b74Schristos             }
193075fd0b74Schristos         }
193175fd0b74Schristos 
193275fd0b74Schristos       /* Pop the current state because it cannot handle the error token.  */
193375fd0b74Schristos       if (yyssp == yyss)
193475fd0b74Schristos         YYABORT;
193575fd0b74Schristos 
193675fd0b74Schristos 
193775fd0b74Schristos       yydestruct ("Error: popping",
1938*e992f068Schristos                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
193975fd0b74Schristos       YYPOPSTACK (1);
194075fd0b74Schristos       yystate = *yyssp;
194175fd0b74Schristos       YY_STACK_PRINT (yyss, yyssp);
194275fd0b74Schristos     }
194375fd0b74Schristos 
1944ede78133Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
194575fd0b74Schristos   *++yyvsp = yylval;
1946ede78133Schristos   YY_IGNORE_MAYBE_UNINITIALIZED_END
194775fd0b74Schristos 
194875fd0b74Schristos 
194975fd0b74Schristos   /* Shift the error token.  */
1950*e992f068Schristos   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
195175fd0b74Schristos 
195275fd0b74Schristos   yystate = yyn;
195375fd0b74Schristos   goto yynewstate;
195475fd0b74Schristos 
195575fd0b74Schristos 
195675fd0b74Schristos /*-------------------------------------.
195775fd0b74Schristos | yyacceptlab -- YYACCEPT comes here.  |
195875fd0b74Schristos `-------------------------------------*/
195975fd0b74Schristos yyacceptlab:
196075fd0b74Schristos   yyresult = 0;
1961*e992f068Schristos   goto yyreturnlab;
1962*e992f068Schristos 
196375fd0b74Schristos 
196475fd0b74Schristos /*-----------------------------------.
196575fd0b74Schristos | yyabortlab -- YYABORT comes here.  |
196675fd0b74Schristos `-----------------------------------*/
196775fd0b74Schristos yyabortlab:
196875fd0b74Schristos   yyresult = 1;
1969*e992f068Schristos   goto yyreturnlab;
197075fd0b74Schristos 
1971*e992f068Schristos 
1972*e992f068Schristos /*-----------------------------------------------------------.
1973*e992f068Schristos | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
1974*e992f068Schristos `-----------------------------------------------------------*/
197575fd0b74Schristos yyexhaustedlab:
197675fd0b74Schristos   yyerror (YY_("memory exhausted"));
197775fd0b74Schristos   yyresult = 2;
1978*e992f068Schristos   goto yyreturnlab;
197975fd0b74Schristos 
1980*e992f068Schristos 
1981*e992f068Schristos /*----------------------------------------------------------.
1982*e992f068Schristos | yyreturnlab -- parsing is finished, clean up and return.  |
1983*e992f068Schristos `----------------------------------------------------------*/
1984*e992f068Schristos yyreturnlab:
1985ede78133Schristos   if (yychar != YYEMPTY)
1986ede78133Schristos     {
1987ede78133Schristos       /* Make sure we have latest lookahead translation.  See comments at
1988ede78133Schristos          user semantic actions for why this is necessary.  */
1989ede78133Schristos       yytoken = YYTRANSLATE (yychar);
199075fd0b74Schristos       yydestruct ("Cleanup: discarding lookahead",
199175fd0b74Schristos                   yytoken, &yylval);
1992ede78133Schristos     }
1993ede78133Schristos   /* Do not reclaim the symbols of the rule whose action triggered
199475fd0b74Schristos      this YYABORT or YYACCEPT.  */
199575fd0b74Schristos   YYPOPSTACK (yylen);
199675fd0b74Schristos   YY_STACK_PRINT (yyss, yyssp);
199775fd0b74Schristos   while (yyssp != yyss)
199875fd0b74Schristos     {
199975fd0b74Schristos       yydestruct ("Cleanup: popping",
2000*e992f068Schristos                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
200175fd0b74Schristos       YYPOPSTACK (1);
200275fd0b74Schristos     }
200375fd0b74Schristos #ifndef yyoverflow
200475fd0b74Schristos   if (yyss != yyssa)
200575fd0b74Schristos     YYSTACK_FREE (yyss);
200675fd0b74Schristos #endif
2007*e992f068Schristos 
2008ede78133Schristos   return yyresult;
200975fd0b74Schristos }
2010*e992f068Schristos 
2011*e992f068Schristos #line 354 "mcparse.y"
201275fd0b74Schristos 
201375fd0b74Schristos 
201475fd0b74Schristos /* Something else.  */
2015