1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
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. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
64 /* Substitute the variable and function names. */
65 #define yyparse __gettextparse
66 #define yylex __gettextlex
67 #define yyerror __gettexterror
68 #define yylval __gettextlval
69 #define yychar __gettextchar
70 #define yydebug __gettextdebug
71 #define yynerrs __gettextnerrs
74 /* Copy the first part of user declarations. */
76 /* Line 268 of yacc.c */
79 /* Expression parsing for plural form selection.
80 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
81 This file is part of the GNU C Library.
82 Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
84 The GNU C Library is free software; you can redistribute it and/or
85 modify it under the terms of the GNU Lesser General Public
86 License as published by the Free Software Foundation; either
87 version 2.1 of the License, or (at your option) any later version.
89 The GNU C Library is distributed in the hope that it will be useful,
90 but WITHOUT ANY WARRANTY; without even the implied warranty of
91 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
92 Lesser General Public License for more details.
94 You should have received a copy of the GNU Lesser General Public
95 License along with the GNU C Library; if not, see
96 <http://www.gnu.org/licenses/>. */
98 /* The bison generated parser uses alloca. AIX 3 forces us to put this
99 declaration at the beginning of the file. The declaration in bison's
100 skeleton file comes too late. This must come before <config.h>
101 because <config.h> may include arbitrary system headers. */
102 #if defined _AIX && !defined __GNUC__
112 #include "plural-exp.h"
114 /* The main function generated by the parser is called __gettextparse,
115 but we want it to be called PLURAL_PARSE. */
117 # define __gettextparse PLURAL_PARSE
120 #define YYLEX_PARAM &((struct parse_args *) arg)->cp
121 #define YYPARSE_PARAM arg
124 /* Line 268 of yacc.c */
127 /* Enabling traces. */
132 /* Enabling verbose error messages. */
133 #ifdef YYERROR_VERBOSE
134 # undef YYERROR_VERBOSE
135 # define YYERROR_VERBOSE 1
137 # define YYERROR_VERBOSE 0
140 /* Enabling the token table. */
141 #ifndef YYTOKEN_TABLE
142 # define YYTOKEN_TABLE 0
149 /* Put the tokens into the symbol table, so that GDB and other debuggers
169 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
170 typedef union YYSTYPE
173 /* Line 293 of yacc.c */
176 unsigned long int num
;
178 struct expression
*exp
;
182 /* Line 293 of yacc.c */
185 # define YYSTYPE_IS_TRIVIAL 1
186 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
187 # define YYSTYPE_IS_DECLARED 1
191 /* Copy the second part of user declarations. */
193 /* Line 343 of yacc.c */
196 /* Prototypes for local functions. */
197 static struct expression
*new_exp
PARAMS ((int nargs
, enum operator op
,
198 struct expression
* const *args
));
199 static inline struct expression
*new_exp_0
PARAMS ((enum operator op
));
200 static inline struct expression
*new_exp_1
PARAMS ((enum operator op
,
201 struct expression
*right
));
202 static struct expression
*new_exp_2
PARAMS ((enum operator op
,
203 struct expression
*left
,
204 struct expression
*right
));
205 static inline struct expression
*new_exp_3
PARAMS ((enum operator op
,
206 struct expression
*bexp
,
207 struct expression
*tbranch
,
208 struct expression
*fbranch
));
209 static int yylex
PARAMS ((YYSTYPE
*lval
, const char **pexp
));
210 static void yyerror
PARAMS ((const char *str
));
212 /* Allocation of expressions. */
214 static struct expression
*
215 new_exp (nargs
, op
, args
)
218 struct expression
* const *args
;
221 struct expression
*newp
;
223 /* If any of the argument could not be malloc'ed, just return NULL. */
224 for (i
= nargs
- 1; i
>= 0; i
--)
228 /* Allocate a new expression. */
229 newp
= (struct expression
*) malloc (sizeof (*newp
));
233 newp
->operation
= op
;
234 for (i
= nargs
- 1; i
>= 0; i
--)
235 newp
->val
.args
[i
] = args
[i
];
240 for (i
= nargs
- 1; i
>= 0; i
--)
241 FREE_EXPRESSION (args
[i
]);
246 static inline struct expression
*
250 return new_exp (0, op
, NULL
);
253 static inline struct expression
*
254 new_exp_1 (op
, right
)
256 struct expression
*right
;
258 struct expression
*args
[1];
261 return new_exp (1, op
, args
);
264 static struct expression
*
265 new_exp_2 (op
, left
, right
)
267 struct expression
*left
;
268 struct expression
*right
;
270 struct expression
*args
[2];
274 return new_exp (2, op
, args
);
277 static inline struct expression
*
278 new_exp_3 (op
, bexp
, tbranch
, fbranch
)
280 struct expression
*bexp
;
281 struct expression
*tbranch
;
282 struct expression
*fbranch
;
284 struct expression
*args
[3];
289 return new_exp (3, op
, args
);
294 /* Line 343 of yacc.c */
302 typedef YYTYPE_UINT8 yytype_uint8
;
304 typedef unsigned char yytype_uint8
;
308 typedef YYTYPE_INT8 yytype_int8
;
309 #elif (defined __STDC__ || defined __C99__FUNC__ \
310 || defined __cplusplus || defined _MSC_VER)
311 typedef signed char yytype_int8
;
313 typedef short int yytype_int8
;
317 typedef YYTYPE_UINT16 yytype_uint16
;
319 typedef unsigned short int yytype_uint16
;
323 typedef YYTYPE_INT16 yytype_int16
;
325 typedef short int yytype_int16
;
329 # ifdef __SIZE_TYPE__
330 # define YYSIZE_T __SIZE_TYPE__
331 # elif defined size_t
332 # define YYSIZE_T size_t
333 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
334 || defined __cplusplus || defined _MSC_VER)
335 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
336 # define YYSIZE_T size_t
338 # define YYSIZE_T unsigned int
342 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
345 # if defined YYENABLE_NLS && YYENABLE_NLS
347 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
348 # define YY_(msgid) dgettext ("bison-runtime", msgid)
352 # define YY_(msgid) msgid
356 /* Suppress unused-variable warnings by "using" E. */
357 #if ! defined lint || defined __GNUC__
358 # define YYUSE(e) ((void) (e))
360 # define YYUSE(e) /* empty */
363 /* Identity function, used to suppress warnings about constant conditions. */
367 #if (defined __STDC__ || defined __C99__FUNC__ \
368 || defined __cplusplus || defined _MSC_VER)
381 #if ! defined yyoverflow || YYERROR_VERBOSE
383 /* The parser invokes alloca or malloc; define the necessary symbols. */
385 # ifdef YYSTACK_USE_ALLOCA
386 # if YYSTACK_USE_ALLOCA
388 # define YYSTACK_ALLOC __builtin_alloca
389 # elif defined __BUILTIN_VA_ARG_INCR
390 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
392 # define YYSTACK_ALLOC __alloca
393 # elif defined _MSC_VER
394 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
395 # define alloca _alloca
397 # define YYSTACK_ALLOC alloca
398 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
399 || defined __cplusplus || defined _MSC_VER)
400 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
401 # ifndef EXIT_SUCCESS
402 # define EXIT_SUCCESS 0
409 # ifdef YYSTACK_ALLOC
410 /* Pacify GCC's `empty if-body' warning. */
411 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
412 # ifndef YYSTACK_ALLOC_MAXIMUM
413 /* The OS might guarantee only one guard page at the bottom of the stack,
414 and a page size can be as small as 4096 bytes. So we cannot safely
415 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
416 to allow for a few compiler-allocated temporary stack slots. */
417 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
420 # define YYSTACK_ALLOC YYMALLOC
421 # define YYSTACK_FREE YYFREE
422 # ifndef YYSTACK_ALLOC_MAXIMUM
423 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
425 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
426 && ! ((defined YYMALLOC || defined malloc) \
427 && (defined YYFREE || defined free)))
428 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
429 # ifndef EXIT_SUCCESS
430 # define EXIT_SUCCESS 0
434 # define YYMALLOC malloc
435 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
436 || defined __cplusplus || defined _MSC_VER)
437 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
442 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
443 || defined __cplusplus || defined _MSC_VER)
444 void free (void *); /* INFRINGES ON USER NAME SPACE */
448 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
451 #if (! defined yyoverflow \
452 && (! defined __cplusplus \
453 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
455 /* A type that is properly aligned for any stack member. */
458 yytype_int16 yyss_alloc
;
462 /* The size of the maximum gap between one aligned stack and the next. */
463 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
465 /* The size of an array large to enough to hold all stacks, each with
467 # define YYSTACK_BYTES(N) \
468 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
469 + YYSTACK_GAP_MAXIMUM)
471 # define YYCOPY_NEEDED 1
473 /* Relocate STACK from its old location to the new one. The
474 local variables YYSIZE and YYSTACKSIZE give the old and new number of
475 elements in the stack, and YYPTR gives the new location of the
476 stack. Advance YYPTR to a properly aligned location for the next
478 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
481 YYSIZE_T yynewbytes; \
482 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
483 Stack = &yyptr->Stack_alloc; \
484 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
485 yyptr += yynewbytes / sizeof (*yyptr); \
491 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
492 /* Copy COUNT objects from FROM to TO. The source and destination do
495 # if defined __GNUC__ && 1 < __GNUC__
496 # define YYCOPY(To, From, Count) \
497 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
499 # define YYCOPY(To, From, Count) \
503 for (yyi = 0; yyi < (Count); yyi++) \
504 (To)[yyi] = (From)[yyi]; \
509 #endif /* !YYCOPY_NEEDED */
511 /* YYFINAL -- State number of the termination state. */
513 /* YYLAST -- Last index in YYTABLE. */
516 /* YYNTOKENS -- Number of terminals. */
518 /* YYNNTS -- Number of nonterminals. */
520 /* YYNRULES -- Number of rules. */
522 /* YYNRULES -- Number of states. */
525 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
527 #define YYMAXUTOK 262
529 #define YYTRANSLATE(YYX) \
530 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
532 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
533 static const yytype_uint8 yytranslate
[] =
535 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
539 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
541 2, 2, 2, 3, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 4, 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, 1, 2, 6, 7,
565 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
567 static const yytype_uint8 yyprhs
[] =
569 0, 0, 3, 5, 11, 15, 19, 23, 27, 31,
573 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
574 static const yytype_int8 yyrhs
[] =
576 17, 0, -1, 18, -1, 18, 3, 18, 12, 18,
577 -1, 18, 4, 18, -1, 18, 5, 18, -1, 18,
578 6, 18, -1, 18, 7, 18, -1, 18, 8, 18,
579 -1, 18, 9, 18, -1, 10, 18, -1, 13, -1,
580 11, -1, 14, 18, 15, -1
583 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
584 static const yytype_uint8 yyrline
[] =
586 0, 174, 174, 182, 186, 190, 194, 198, 202, 206,
591 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
592 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
593 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
594 static const char *const yytname
[] =
596 "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
597 "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
598 "$accept", "start", "exp", 0
603 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
605 static const yytype_uint16 yytoknum
[] =
607 0, 256, 257, 63, 124, 38, 258, 259, 260, 261,
608 33, 262, 58, 110, 40, 41
612 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
613 static const yytype_uint8 yyr1
[] =
615 0, 16, 17, 18, 18, 18, 18, 18, 18, 18,
619 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
620 static const yytype_uint8 yyr2
[] =
622 0, 2, 1, 5, 3, 3, 3, 3, 3, 3,
626 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
627 Performed when YYTABLE doesn't specify something else to do. Zero
628 means the default is an error. */
629 static const yytype_uint8 yydefact
[] =
631 0, 0, 12, 11, 0, 0, 2, 10, 0, 1,
632 0, 0, 0, 0, 0, 0, 0, 13, 0, 4,
636 /* YYDEFGOTO[NTERM-NUM]. */
637 static const yytype_int8 yydefgoto
[] =
642 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
644 #define YYPACT_NINF -10
645 static const yytype_int8 yypact
[] =
647 -9, -9, -10, -10, -9, 8, 36, -10, 13, -10,
648 -9, -9, -9, -9, -9, -9, -9, -10, 26, 41,
649 45, 18, -2, 14, -10, -9, 36
652 /* YYPGOTO[NTERM-NUM]. */
653 static const yytype_int8 yypgoto
[] =
658 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
659 positive, shift that token. If negative, reduce the rule which
660 number is the opposite. If YYTABLE_NINF, syntax error. */
661 #define YYTABLE_NINF -1
662 static const yytype_uint8 yytable
[] =
664 7, 1, 2, 8, 3, 4, 15, 16, 9, 18,
665 19, 20, 21, 22, 23, 24, 10, 11, 12, 13,
666 14, 15, 16, 16, 26, 14, 15, 16, 17, 10,
667 11, 12, 13, 14, 15, 16, 0, 0, 25, 10,
668 11, 12, 13, 14, 15, 16, 12, 13, 14, 15,
672 #define yypact_value_is_default(yystate) \
675 #define yytable_value_is_error(yytable_value) \
678 static const yytype_int8 yycheck
[] =
680 1, 10, 11, 4, 13, 14, 8, 9, 0, 10,
681 11, 12, 13, 14, 15, 16, 3, 4, 5, 6,
682 7, 8, 9, 9, 25, 7, 8, 9, 15, 3,
683 4, 5, 6, 7, 8, 9, -1, -1, 12, 3,
684 4, 5, 6, 7, 8, 9, 5, 6, 7, 8,
688 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
689 symbol of state STATE-NUM. */
690 static const yytype_uint8 yystos
[] =
692 0, 10, 11, 13, 14, 17, 18, 18, 18, 0,
693 3, 4, 5, 6, 7, 8, 9, 15, 18, 18,
694 18, 18, 18, 18, 18, 12, 18
697 #define yyerrok (yyerrstatus = 0)
698 #define yyclearin (yychar = YYEMPTY)
702 #define YYACCEPT goto yyacceptlab
703 #define YYABORT goto yyabortlab
704 #define YYERROR goto yyerrorlab
707 /* Like YYERROR except do call yyerror. This remains here temporarily
708 to ease the transition to the new meaning of YYERROR, for GCC.
709 Once GCC version 2 has supplanted version 1, this can go. However,
710 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
711 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
714 #define YYFAIL goto yyerrlab
716 /* This is here to suppress warnings from the GCC cpp's
717 -Wunused-macros. Normally we don't worry about that warning, but
718 some users do, and we want to make it easy for users to remove
719 YYFAIL uses, which will produce warnings from Bison 2.5. */
722 #define YYRECOVERING() (!!yyerrstatus)
724 #define YYBACKUP(Token, Value) \
726 if (yychar == YYEMPTY && yylen == 1) \
735 yyerror (YY_("syntax error: cannot back up")); \
742 #define YYERRCODE 256
745 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
746 If N is 0, then set CURRENT to the empty location which ends
747 the previous symbol: RHS[0] (always defined). */
749 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
750 #ifndef YYLLOC_DEFAULT
751 # define YYLLOC_DEFAULT(Current, Rhs, N) \
755 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
756 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
757 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
758 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
762 (Current).first_line = (Current).last_line = \
763 YYRHSLOC (Rhs, 0).last_line; \
764 (Current).first_column = (Current).last_column = \
765 YYRHSLOC (Rhs, 0).last_column; \
771 /* This macro is provided for backward compatibility. */
773 #ifndef YY_LOCATION_PRINT
774 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
778 /* YYLEX -- calling `yylex' with the right arguments. */
781 # define YYLEX yylex (&yylval, YYLEX_PARAM)
783 # define YYLEX yylex (&yylval)
786 /* Enable debugging if requested. */
790 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
791 # define YYFPRINTF fprintf
794 # define YYDPRINTF(Args) \
800 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
804 YYFPRINTF (stderr, "%s ", Title); \
805 yy_symbol_print (stderr, \
807 YYFPRINTF (stderr, "\n"); \
812 /*--------------------------------.
813 | Print this symbol on YYOUTPUT. |
814 `--------------------------------*/
817 #if (defined __STDC__ || defined __C99__FUNC__ \
818 || defined __cplusplus || defined _MSC_VER)
820 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
823 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
826 YYSTYPE
const * const yyvaluep
;
832 if (yytype
< YYNTOKENS
)
833 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
845 /*--------------------------------.
846 | Print this symbol on YYOUTPUT. |
847 `--------------------------------*/
849 #if (defined __STDC__ || defined __C99__FUNC__ \
850 || defined __cplusplus || defined _MSC_VER)
852 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
855 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
858 YYSTYPE
const * const yyvaluep
;
861 if (yytype
< YYNTOKENS
)
862 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
864 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
866 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
867 YYFPRINTF (yyoutput
, ")");
870 /*------------------------------------------------------------------.
871 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
873 `------------------------------------------------------------------*/
875 #if (defined __STDC__ || defined __C99__FUNC__ \
876 || defined __cplusplus || defined _MSC_VER)
878 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
881 yy_stack_print (yybottom
, yytop
)
882 yytype_int16
*yybottom
;
886 YYFPRINTF (stderr
, "Stack now");
887 for (; yybottom
<= yytop
; yybottom
++)
889 int yybot
= *yybottom
;
890 YYFPRINTF (stderr
, " %d", yybot
);
892 YYFPRINTF (stderr
, "\n");
895 # define YY_STACK_PRINT(Bottom, Top) \
898 yy_stack_print ((Bottom), (Top)); \
902 /*------------------------------------------------.
903 | Report that the YYRULE is going to be reduced. |
904 `------------------------------------------------*/
906 #if (defined __STDC__ || defined __C99__FUNC__ \
907 || defined __cplusplus || defined _MSC_VER)
909 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
912 yy_reduce_print (yyvsp
, yyrule
)
917 int yynrhs
= yyr2
[yyrule
];
919 unsigned long int yylno
= yyrline
[yyrule
];
920 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
922 /* The symbols being reduced. */
923 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
925 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
926 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
927 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
929 YYFPRINTF (stderr
, "\n");
933 # define YY_REDUCE_PRINT(Rule) \
936 yy_reduce_print (yyvsp, Rule); \
939 /* Nonzero means print parse trace. It is left uninitialized so that
940 multiple parsers can coexist. */
943 # define YYDPRINTF(Args)
944 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
945 # define YY_STACK_PRINT(Bottom, Top)
946 # define YY_REDUCE_PRINT(Rule)
947 #endif /* !YYDEBUG */
950 /* YYINITDEPTH -- initial size of the parser's stacks. */
952 # define YYINITDEPTH 200
955 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
956 if the built-in stack extension method is used).
958 Do not make this value too large; the results are undefined if
959 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
960 evaluated with infinite-precision integer arithmetic. */
963 # define YYMAXDEPTH 10000
970 # if defined __GLIBC__ && defined _STRING_H
971 # define yystrlen strlen
973 /* Return the length of YYSTR. */
974 #if (defined __STDC__ || defined __C99__FUNC__ \
975 || defined __cplusplus || defined _MSC_VER)
977 yystrlen (const char *yystr
)
985 for (yylen
= 0; yystr
[yylen
]; yylen
++)
993 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
994 # define yystpcpy stpcpy
996 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
998 #if (defined __STDC__ || defined __C99__FUNC__ \
999 || defined __cplusplus || defined _MSC_VER)
1001 yystpcpy (char *yydest
, const char *yysrc
)
1004 yystpcpy (yydest
, yysrc
)
1010 const char *yys
= yysrc
;
1012 while ((*yyd
++ = *yys
++) != '\0')
1021 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1022 quotes and backslashes, so that it's suitable for yyerror. The
1023 heuristic is that double-quoting is unnecessary unless the string
1024 contains an apostrophe, a comma, or backslash (other than
1025 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1026 null, do not copy; instead, return the length of what the result
1029 yytnamerr (char *yyres
, const char *yystr
)
1034 char const *yyp
= yystr
;
1041 goto do_not_strip_quotes
;
1045 goto do_not_strip_quotes
;
1058 do_not_strip_quotes
: ;
1062 return yystrlen (yystr
);
1064 return yystpcpy (yyres
, yystr
) - yyres
;
1068 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1069 about the unexpected token YYTOKEN for the state stack whose top is
1072 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1073 not large enough to hold the message. In that case, also set
1074 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1075 required number of bytes is too large to store. */
1077 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1078 yytype_int16
*yyssp
, int yytoken
)
1080 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytoken
]);
1081 YYSIZE_T yysize
= yysize0
;
1083 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1084 /* Internationalized format string. */
1085 const char *yyformat
= 0;
1086 /* Arguments of yyformat. */
1087 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1088 /* Number of reported tokens (one for the "unexpected", one per
1092 /* There are many possibilities here to consider:
1093 - Assume YYFAIL is not used. It's too flawed to consider. See
1094 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1095 for details. YYERROR is fine as it does not invoke this
1097 - If this state is a consistent state with a default action, then
1098 the only way this function was invoked is if the default action
1099 is an error action. In that case, don't check for expected
1100 tokens because there are none.
1101 - The only way there can be no lookahead present (in yychar) is if
1102 this state is a consistent state with a default action. Thus,
1103 detecting the absence of a lookahead is sufficient to determine
1104 that there is no unexpected or expected token to report. In that
1105 case, just report a simple "syntax error".
1106 - Don't assume there isn't a lookahead just because this state is a
1107 consistent state with a default action. There might have been a
1108 previous inconsistent state, consistent state with a non-default
1109 action, or user semantic action that manipulated yychar.
1110 - Of course, the expected token list depends on states to have
1111 correct lookahead information, and it depends on the parser not
1112 to perform extra reductions after fetching a lookahead from the
1113 scanner and before detecting a syntax error. Thus, state merging
1114 (from LALR or IELR) and default reductions corrupt the expected
1115 token list. However, the list is correct for canonical LR with
1116 one exception: it will still contain any token that will not be
1117 accepted due to an error action in a later state.
1119 if (yytoken
!= YYEMPTY
)
1121 int yyn
= yypact
[*yyssp
];
1122 yyarg
[yycount
++] = yytname
[yytoken
];
1123 if (!yypact_value_is_default (yyn
))
1125 /* Start YYX at -YYN if negative to avoid negative indexes in
1126 YYCHECK. In other words, skip the first -YYN actions for
1127 this state because they are default actions. */
1128 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1129 /* Stay within bounds of both yycheck and yytname. */
1130 int yychecklim
= YYLAST
- yyn
+ 1;
1131 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1134 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1135 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1136 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1138 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1144 yyarg
[yycount
++] = yytname
[yyx
];
1145 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1146 if (! (yysize
<= yysize1
1147 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1156 # define YYCASE_(N, S) \
1160 YYCASE_(0, YY_("syntax error"));
1161 YYCASE_(1, YY_("syntax error, unexpected %s"));
1162 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1163 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1164 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1165 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1169 yysize1
= yysize
+ yystrlen (yyformat
);
1170 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1174 if (*yymsg_alloc
< yysize
)
1176 *yymsg_alloc
= 2 * yysize
;
1177 if (! (yysize
<= *yymsg_alloc
1178 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1179 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
1183 /* Avoid sprintf, as that infringes on the user's name space.
1184 Don't have undefined behavior even if the translation
1185 produced a string with the wrong number of "%s"s. */
1189 while ((*yyp
= *yyformat
) != '\0')
1190 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1192 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1203 #endif /* YYERROR_VERBOSE */
1205 /*-----------------------------------------------.
1206 | Release the memory associated to this symbol. |
1207 `-----------------------------------------------*/
1210 #if (defined __STDC__ || defined __C99__FUNC__ \
1211 || defined __cplusplus || defined _MSC_VER)
1213 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1216 yydestruct (yymsg
, yytype
, yyvaluep
)
1226 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1237 /* Prevent warnings from -Wmissing-prototypes. */
1238 #ifdef YYPARSE_PARAM
1239 #if defined __STDC__ || defined __cplusplus
1240 int yyparse (void *YYPARSE_PARAM
);
1244 #else /* ! YYPARSE_PARAM */
1245 #if defined __STDC__ || defined __cplusplus
1250 #endif /* ! YYPARSE_PARAM */
1257 #ifdef YYPARSE_PARAM
1258 #if (defined __STDC__ || defined __C99__FUNC__ \
1259 || defined __cplusplus || defined _MSC_VER)
1261 yyparse (void *YYPARSE_PARAM
)
1264 yyparse (YYPARSE_PARAM
)
1265 void *YYPARSE_PARAM
;
1267 #else /* ! YYPARSE_PARAM */
1268 #if (defined __STDC__ || defined __C99__FUNC__ \
1269 || defined __cplusplus || defined _MSC_VER)
1279 /* The lookahead symbol. */
1282 /* The semantic value of the lookahead symbol. */
1285 /* Number of syntax errors so far. */
1289 /* Number of tokens to shift before error messages enabled. */
1292 /* The stacks and their tools:
1293 `yyss': related to states.
1294 `yyvs': related to semantic values.
1296 Refer to the stacks thru separate pointers, to allow yyoverflow
1297 to reallocate them elsewhere. */
1299 /* The state stack. */
1300 yytype_int16 yyssa
[YYINITDEPTH
];
1302 yytype_int16
*yyssp
;
1304 /* The semantic value stack. */
1305 YYSTYPE yyvsa
[YYINITDEPTH
];
1309 YYSIZE_T yystacksize
;
1313 /* Lookahead token as an internal (translated) token number. */
1315 /* The variables used to return semantic value and location from the
1320 /* Buffer for error messages, and its allocated size. */
1322 char *yymsg
= yymsgbuf
;
1323 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1326 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1328 /* The number of symbols on the RHS of the reduced rule.
1329 Keep to zero when no symbol should be popped. */
1335 yystacksize
= YYINITDEPTH
;
1337 YYDPRINTF ((stderr
, "Starting parse\n"));
1342 yychar
= YYEMPTY
; /* Cause a token to be read. */
1344 /* Initialize stack pointers.
1345 Waste one element of value and location stack
1346 so that they stay on the same level as the state stack.
1347 The wasted elements are never initialized. */
1353 /*------------------------------------------------------------.
1354 | yynewstate -- Push a new state, which is found in yystate. |
1355 `------------------------------------------------------------*/
1357 /* In all cases, when you get here, the value and location stacks
1358 have just been pushed. So pushing a state here evens the stacks. */
1364 if (yyss
+ yystacksize
- 1 <= yyssp
)
1366 /* Get the current used size of the three stacks, in elements. */
1367 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1371 /* Give user a chance to reallocate the stack. Use copies of
1372 these so that the &'s don't force the real ones into
1374 YYSTYPE
*yyvs1
= yyvs
;
1375 yytype_int16
*yyss1
= yyss
;
1377 /* Each stack pointer address is followed by the size of the
1378 data in use in that stack, in bytes. This used to be a
1379 conditional around just the two extra args, but that might
1380 be undefined if yyoverflow is a macro. */
1381 yyoverflow (YY_("memory exhausted"),
1382 &yyss1
, yysize
* sizeof (*yyssp
),
1383 &yyvs1
, yysize
* sizeof (*yyvsp
),
1389 #else /* no yyoverflow */
1390 # ifndef YYSTACK_RELOCATE
1391 goto yyexhaustedlab
;
1393 /* Extend the stack our own way. */
1394 if (YYMAXDEPTH
<= yystacksize
)
1395 goto yyexhaustedlab
;
1397 if (YYMAXDEPTH
< yystacksize
)
1398 yystacksize
= YYMAXDEPTH
;
1401 yytype_int16
*yyss1
= yyss
;
1402 union yyalloc
*yyptr
=
1403 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1405 goto yyexhaustedlab
;
1406 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1407 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1408 # undef YYSTACK_RELOCATE
1410 YYSTACK_FREE (yyss1
);
1413 #endif /* no yyoverflow */
1415 yyssp
= yyss
+ yysize
- 1;
1416 yyvsp
= yyvs
+ yysize
- 1;
1418 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1419 (unsigned long int) yystacksize
));
1421 if (yyss
+ yystacksize
- 1 <= yyssp
)
1425 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1427 if (yystate
== YYFINAL
)
1437 /* Do appropriate processing given the current state. Read a
1438 lookahead token if we need one and don't already have one. */
1440 /* First try to decide what to do without reference to lookahead token. */
1441 yyn
= yypact
[yystate
];
1442 if (yypact_value_is_default (yyn
))
1445 /* Not known => get a lookahead token if don't already have one. */
1447 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1448 if (yychar
== YYEMPTY
)
1450 YYDPRINTF ((stderr
, "Reading a token: "));
1454 if (yychar
<= YYEOF
)
1456 yychar
= yytoken
= YYEOF
;
1457 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1461 yytoken
= YYTRANSLATE (yychar
);
1462 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1465 /* If the proper action on seeing token YYTOKEN is to reduce or to
1466 detect an error, take that action. */
1468 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1473 if (yytable_value_is_error (yyn
))
1479 /* Count tokens shifted since error; after three, turn off error
1484 /* Shift the lookahead token. */
1485 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1487 /* Discard the shifted token. */
1496 /*-----------------------------------------------------------.
1497 | yydefault -- do the default action for the current state. |
1498 `-----------------------------------------------------------*/
1500 yyn
= yydefact
[yystate
];
1506 /*-----------------------------.
1507 | yyreduce -- Do a reduction. |
1508 `-----------------------------*/
1510 /* yyn is the number of a rule to reduce with. */
1513 /* If YYLEN is nonzero, implement the default value of the action:
1516 Otherwise, the following line sets YYVAL to garbage.
1517 This behavior is undocumented and Bison
1518 users should not rely upon it. Assigning to YYVAL
1519 unconditionally makes the parser a bit smaller, and it avoids a
1520 GCC warning that YYVAL may be used uninitialized. */
1521 yyval
= yyvsp
[1-yylen
];
1524 YY_REDUCE_PRINT (yyn
);
1529 /* Line 1806 of yacc.c */
1530 #line 175 "plural.y"
1532 if ((yyvsp
[(1) - (1)].exp
) == NULL
)
1534 ((struct parse_args
*) arg
)->res
= (yyvsp
[(1) - (1)].exp
);
1540 /* Line 1806 of yacc.c */
1541 #line 183 "plural.y"
1543 (yyval
.exp
) = new_exp_3 (qmop
, (yyvsp
[(1) - (5)].exp
), (yyvsp
[(3) - (5)].exp
), (yyvsp
[(5) - (5)].exp
));
1549 /* Line 1806 of yacc.c */
1550 #line 187 "plural.y"
1552 (yyval
.exp
) = new_exp_2 (lor
, (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
));
1558 /* Line 1806 of yacc.c */
1559 #line 191 "plural.y"
1561 (yyval
.exp
) = new_exp_2 (land
, (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
));
1567 /* Line 1806 of yacc.c */
1568 #line 195 "plural.y"
1570 (yyval
.exp
) = new_exp_2 ((yyvsp
[(2) - (3)].op
), (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
));
1576 /* Line 1806 of yacc.c */
1577 #line 199 "plural.y"
1579 (yyval
.exp
) = new_exp_2 ((yyvsp
[(2) - (3)].op
), (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
));
1585 /* Line 1806 of yacc.c */
1586 #line 203 "plural.y"
1588 (yyval
.exp
) = new_exp_2 ((yyvsp
[(2) - (3)].op
), (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
));
1594 /* Line 1806 of yacc.c */
1595 #line 207 "plural.y"
1597 (yyval
.exp
) = new_exp_2 ((yyvsp
[(2) - (3)].op
), (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
));
1603 /* Line 1806 of yacc.c */
1604 #line 211 "plural.y"
1606 (yyval
.exp
) = new_exp_1 (lnot
, (yyvsp
[(2) - (2)].exp
));
1612 /* Line 1806 of yacc.c */
1613 #line 215 "plural.y"
1615 (yyval
.exp
) = new_exp_0 (var
);
1621 /* Line 1806 of yacc.c */
1622 #line 219 "plural.y"
1624 if (((yyval
.exp
) = new_exp_0 (num
)) != NULL
)
1625 (yyval
.exp
)->val
.num
= (yyvsp
[(1) - (1)].num
);
1631 /* Line 1806 of yacc.c */
1632 #line 224 "plural.y"
1634 (yyval
.exp
) = (yyvsp
[(2) - (3)].exp
);
1640 /* Line 1806 of yacc.c */
1641 #line 1642 "plural.c"
1644 /* User semantic actions sometimes alter yychar, and that requires
1645 that yytoken be updated with the new translation. We take the
1646 approach of translating immediately before every use of yytoken.
1647 One alternative is translating here after every semantic action,
1648 but that translation would be missed if the semantic action invokes
1649 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1650 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1651 incorrect destructor might then be invoked immediately. In the
1652 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1653 to an incorrect destructor call or verbose syntax error message
1654 before the lookahead is translated. */
1655 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
1659 YY_STACK_PRINT (yyss
, yyssp
);
1663 /* Now `shift' the result of the reduction. Determine what state
1664 that goes to, based on the state we popped back to and the rule
1665 number reduced by. */
1669 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1670 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1671 yystate
= yytable
[yystate
];
1673 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1678 /*------------------------------------.
1679 | yyerrlab -- here on detecting error |
1680 `------------------------------------*/
1682 /* Make sure we have latest lookahead translation. See comments at
1683 user semantic actions for why this is necessary. */
1684 yytoken
= yychar
== YYEMPTY
? YYEMPTY
: YYTRANSLATE (yychar
);
1686 /* If not already recovering from an error, report this error. */
1690 #if ! YYERROR_VERBOSE
1691 yyerror (YY_("syntax error"));
1693 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1696 char const *yymsgp
= YY_("syntax error");
1697 int yysyntax_error_status
;
1698 yysyntax_error_status
= YYSYNTAX_ERROR
;
1699 if (yysyntax_error_status
== 0)
1701 else if (yysyntax_error_status
== 1)
1703 if (yymsg
!= yymsgbuf
)
1704 YYSTACK_FREE (yymsg
);
1705 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
1709 yymsg_alloc
= sizeof yymsgbuf
;
1710 yysyntax_error_status
= 2;
1714 yysyntax_error_status
= YYSYNTAX_ERROR
;
1719 if (yysyntax_error_status
== 2)
1720 goto yyexhaustedlab
;
1722 # undef YYSYNTAX_ERROR
1728 if (yyerrstatus
== 3)
1730 /* If just tried and failed to reuse lookahead token after an
1731 error, discard it. */
1733 if (yychar
<= YYEOF
)
1735 /* Return failure if at end of input. */
1736 if (yychar
== YYEOF
)
1741 yydestruct ("Error: discarding",
1747 /* Else will try to reuse lookahead token after shifting the error
1752 /*---------------------------------------------------.
1753 | yyerrorlab -- error raised explicitly by YYERROR. |
1754 `---------------------------------------------------*/
1757 /* Pacify compilers like GCC when the user code never invokes
1758 YYERROR and the label yyerrorlab therefore never appears in user
1760 if (/*CONSTCOND*/ 0)
1763 /* Do not reclaim the symbols of the rule which action triggered
1767 YY_STACK_PRINT (yyss
, yyssp
);
1772 /*-------------------------------------------------------------.
1773 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1774 `-------------------------------------------------------------*/
1776 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1780 yyn
= yypact
[yystate
];
1781 if (!yypact_value_is_default (yyn
))
1784 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1792 /* Pop the current state because it cannot handle the error token. */
1797 yydestruct ("Error: popping",
1798 yystos
[yystate
], yyvsp
);
1801 YY_STACK_PRINT (yyss
, yyssp
);
1807 /* Shift the error token. */
1808 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1814 /*-------------------------------------.
1815 | yyacceptlab -- YYACCEPT comes here. |
1816 `-------------------------------------*/
1821 /*-----------------------------------.
1822 | yyabortlab -- YYABORT comes here. |
1823 `-----------------------------------*/
1828 #if !defined(yyoverflow) || YYERROR_VERBOSE
1829 /*-------------------------------------------------.
1830 | yyexhaustedlab -- memory exhaustion comes here. |
1831 `-------------------------------------------------*/
1833 yyerror (YY_("memory exhausted"));
1839 if (yychar
!= YYEMPTY
)
1841 /* Make sure we have latest lookahead translation. See comments at
1842 user semantic actions for why this is necessary. */
1843 yytoken
= YYTRANSLATE (yychar
);
1844 yydestruct ("Cleanup: discarding lookahead",
1847 /* Do not reclaim the symbols of the rule which action triggered
1848 this YYABORT or YYACCEPT. */
1850 YY_STACK_PRINT (yyss
, yyssp
);
1851 while (yyssp
!= yyss
)
1853 yydestruct ("Cleanup: popping",
1854 yystos
[*yyssp
], yyvsp
);
1859 YYSTACK_FREE (yyss
);
1862 if (yymsg
!= yymsgbuf
)
1863 YYSTACK_FREE (yymsg
);
1865 /* Make sure YYID is used. */
1866 return YYID (yyresult
);
1871 /* Line 2067 of yacc.c */
1872 #line 229 "plural.y"
1877 FREE_EXPRESSION (exp
)
1878 struct expression
*exp
;
1883 /* Handle the recursive case. */
1887 FREE_EXPRESSION (exp
->val
.args
[2]);
1890 FREE_EXPRESSION (exp
->val
.args
[1]);
1893 FREE_EXPRESSION (exp
->val
.args
[0]);
1908 const char *exp
= *pexp
;
1919 if (exp
[0] != ' ' && exp
[0] != '\t')
1928 case '0': case '1': case '2': case '3': case '4':
1929 case '5': case '6': case '7': case '8': case '9':
1931 unsigned long int n
= result
- '0';
1932 while (exp
[0] >= '0' && exp
[0] <= '9')
1958 lval
->op
= not_equal
;
1965 if (exp
[0] == result
)
1975 lval
->op
= less_or_equal
;
1978 lval
->op
= less_than
;
1986 lval
->op
= greater_or_equal
;
1989 lval
->op
= greater_than
;
2023 /* Nothing, just return the character. */
2029 /* Be safe and let the user call this function again. */
2052 /* Do nothing. We don't print error messages here. */