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