2
/* A Bison parser, made by GNU Bison 2.4.1. */
1
/* A Bison parser, made by GNU Bison 2.3a. */
4
3
/* Skeleton implementation for Bison's Yacc-like parsers in C
6
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7
6
Free Software Foundation, Inc.
9
This program is free software: you can redistribute it and/or modify
8
This program is free software; you can redistribute it and/or modify
10
9
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation, either version 3 of the License, or
12
(at your option) any later version.
10
the Free Software Foundation; either version 2, or (at your option)
14
13
This program is distributed in the hope that it will be useful,
15
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
16
GNU General Public License for more details.
19
18
You should have received a copy of the GNU General Public License
20
along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
Boston, MA 02110-1301, USA. */
22
23
/* As a special exception, you may create a larger work that contains
23
24
part or all of the Bison parser skeleton and distribute that work
28
29
special exception, which will cause the skeleton and the resulting
29
30
Bison output files to be licensed under the GNU General Public
30
31
License without this special exception.
32
33
This special exception was added by the Free Software Foundation in
33
34
version 2.2 of Bison. */
54
55
/* Pure parsers. */
63
58
/* Using locations. */
64
59
#define YYLSP_NEEDED 0
66
61
/* Substitute the variable and function names. */
67
#define yyparse __gettextparse
68
#define yylex __gettextlex
69
#define yyerror __gettexterror
70
#define yylval __gettextlval
71
#define yychar __gettextchar
72
#define yydebug __gettextdebug
73
#define yynerrs __gettextnerrs
62
#define yyparse __gettextparse
63
#define yylex __gettextlex
64
#define yyerror __gettexterror
65
#define yylval __gettextlval
66
#define yychar __gettextchar
67
#define yydebug __gettextdebug
68
#define yynerrs __gettextnerrs
76
71
/* Copy the first part of user declarations. */
78
/* Line 189 of yacc.c */
72
/* Line 164 of yacc.c. */
81
75
/* Expression parsing for plural form selection.
173
164
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
174
165
typedef union YYSTYPE
177
/* Line 214 of yacc.c */
166
{/* Line 191 of yacc.c. */
178
167
#line 51 "plural.y"
180
169
unsigned long int num;
181
170
enum expression_operator op;
182
171
struct expression *exp;
186
/* Line 214 of yacc.c */
173
/* Line 191 of yacc.c. */
189
176
# define YYSTYPE_IS_TRIVIAL 1
190
177
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
191
178
# define YYSTYPE_IS_DECLARED 1
195
184
/* Copy the second part of user declarations. */
197
/* Line 264 of yacc.c */
185
/* Line 221 of yacc.c. */
198
186
#line 57 "plural.y"
200
188
/* Prototypes for local functions. */
473
460
elements in the stack, and YYPTR gives the new location of the
474
461
stack. Advance YYPTR to a properly aligned location for the next
476
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
463
# define YYSTACK_RELOCATE(Stack) \
479
466
YYSIZE_T yynewbytes; \
480
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
481
Stack = &yyptr->Stack_alloc; \
467
YYCOPY (&yyptr->Stack, Stack, yysize); \
468
Stack = &yyptr->Stack; \
482
469
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
483
470
yyptr += yynewbytes / sizeof (*yyptr); \
896
883
/* The symbols being reduced. */
897
884
for (yyi = 0; yyi < yynrhs; yyi++)
899
YYFPRINTF (stderr, " $%d = ", yyi + 1);
886
fprintf (stderr, " $%d = ", yyi + 1);
900
887
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
901
888
&(yyvsp[(yyi + 1) - (yynrhs)])
903
YYFPRINTF (stderr, "\n");
890
fprintf (stderr, "\n");
1229
/* The lookahead symbol. */
1219
/* The lookahead symbol. */
1232
1222
/* The semantic value of the lookahead symbol. */
1233
1223
YYSTYPE yylval;
1235
/* Number of syntax errors so far. */
1239
/* Number of tokens to shift before error messages enabled. */
1242
/* The stacks and their tools:
1243
`yyss': related to states.
1244
`yyvs': related to semantic values.
1246
Refer to the stacks thru separate pointers, to allow yyoverflow
1247
to reallocate them elsewhere. */
1249
/* The state stack. */
1250
yytype_int16 yyssa[YYINITDEPTH];
1252
yytype_int16 *yyssp;
1254
/* The semantic value stack. */
1255
YYSTYPE yyvsa[YYINITDEPTH];
1259
YYSIZE_T yystacksize;
1225
/* Number of syntax errors so far. */
1231
/* Number of tokens to shift before error messages enabled. */
1263
1233
/* Lookahead token as an internal (translated) token number. */
1265
/* The variables used to return semantic value and location from the
1269
1235
#if YYERROR_VERBOSE
1270
1236
/* Buffer for error messages, and its allocated size. */
1271
1237
char yymsgbuf[128];
1273
1239
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1242
/* Three stacks and their tools:
1243
`yyss': related to states,
1244
`yyvs': related to semantic values,
1245
`yyls': related to locations.
1247
Refer to the stacks thru separate pointers, to allow yyoverflow
1248
to reallocate them elsewhere. */
1250
/* The state stack. */
1251
yytype_int16 yyssa[YYINITDEPTH];
1252
yytype_int16 *yyss = yyssa;
1253
yytype_int16 *yyssp;
1255
/* The semantic value stack. */
1256
YYSTYPE yyvsa[YYINITDEPTH];
1257
YYSTYPE *yyvs = yyvsa;
1276
1262
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1264
YYSIZE_T yystacksize = YYINITDEPTH;
1266
/* The variables used to return semantic value and location from the
1278
1271
/* The number of symbols on the RHS of the reduced rule.
1279
1272
Keep to zero when no symbol should be popped. */
1285
yystacksize = YYINITDEPTH;
1287
1275
YYDPRINTF ((stderr, "Starting parse\n"));
1290
1278
yyerrstatus = 0;
1292
yychar = YYEMPTY; /* Cause a token to be read. */
1280
yychar = YYEMPTY; /* Cause a token to be read. */
1294
1282
/* Initialize stack pointers.
1295
1283
Waste one element of value and location stack
1296
1284
so that they stay on the same level as the state stack.
1297
1285
The wasted elements are never initialized. */
1324
1313
YYSTYPE *yyvs1 = yyvs;
1325
1314
yytype_int16 *yyss1 = yyss;
1327
1317
/* Each stack pointer address is followed by the size of the
1328
1318
data in use in that stack, in bytes. This used to be a
1329
1319
conditional around just the two extra args, but that might
1331
1321
yyoverflow (YY_("memory exhausted"),
1332
1322
&yyss1, yysize * sizeof (*yyssp),
1333
1323
&yyvs1, yysize * sizeof (*yyvsp),
1365
1357
yyssp = yyss + yysize - 1;
1366
1358
yyvsp = yyvs + yysize - 1;
1368
1361
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1369
1362
(unsigned long int) yystacksize));