~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to intl/plural.c

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/*  A Bison parser, made from plural.y
3
 
    by GNU Bison version 1.28  */
 
1
/* A Bison parser, made from plural.y
 
2
   by GNU bison 1.35.  */
4
3
 
5
4
#define YYBISON 1  /* Identify Bison output.  */
6
5
 
11
10
#define yychar __gettextchar
12
11
#define yydebug __gettextdebug
13
12
#define yynerrs __gettextnerrs
14
 
#define EQUOP2  257
15
 
#define CMPOP2  258
16
 
#define ADDOP2  259
17
 
#define MULOP2  260
18
 
#define NUMBER  261
 
13
# define        EQUOP2  257
 
14
# define        CMPOP2  258
 
15
# define        ADDOP2  259
 
16
# define        MULOP2  260
 
17
# define        NUMBER  261
19
18
 
20
19
#line 1 "plural.y"
21
20
 
22
21
/* Expression parsing for plural form selection.
23
 
   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
22
   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
24
23
   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
25
24
 
26
25
   This program is free software; you can redistribute it and/or modify it
64
63
#define YYPARSE_PARAM   arg
65
64
 
66
65
#line 49 "plural.y"
 
66
#ifndef YYSTYPE
67
67
typedef union {
68
68
  unsigned long int num;
69
69
  enum operator op;
70
70
  struct expression *exp;
71
 
} YYSTYPE;
 
71
} yystype;
 
72
# define YYSTYPE yystype
 
73
# define YYSTYPE_IS_TRIVIAL 1
 
74
#endif
72
75
#line 55 "plural.y"
73
76
 
74
77
/* Prototypes for local functions.  */
75
 
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
76
 
                                           struct expression * const *args));
77
 
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
78
 
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
79
 
                                                   struct expression *right));
80
 
static struct expression *new_exp_2 PARAMS ((enum operator op,
81
 
                                             struct expression *left,
82
 
                                             struct expression *right));
83
 
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
84
 
                                                   struct expression *bexp,
85
 
                                                   struct expression *tbranch,
86
 
                                                   struct expression *fbranch));
87
 
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
88
 
static void yyerror PARAMS ((const char *str));
 
78
static int yylex (YYSTYPE *lval, const char **pexp);
 
79
static void yyerror (const char *str);
89
80
 
90
81
/* Allocation of expressions.  */
91
82
 
92
83
static struct expression *
93
 
new_exp (nargs, op, args)
94
 
     int nargs;
95
 
     enum operator op;
96
 
     struct expression * const *args;
 
84
new_exp (int nargs, enum operator op, struct expression * const *args)
97
85
{
98
86
  int i;
99
87
  struct expression *newp;
122
110
}
123
111
 
124
112
static inline struct expression *
125
 
new_exp_0 (op)
126
 
     enum operator op;
 
113
new_exp_0 (enum operator op)
127
114
{
128
115
  return new_exp (0, op, NULL);
129
116
}
130
117
 
131
118
static inline struct expression *
132
 
new_exp_1 (op, right)
133
 
     enum operator op;
134
 
     struct expression *right;
 
119
new_exp_1 (enum operator op, struct expression *right)
135
120
{
136
121
  struct expression *args[1];
137
122
 
140
125
}
141
126
 
142
127
static struct expression *
143
 
new_exp_2 (op, left, right)
144
 
     enum operator op;
145
 
     struct expression *left;
146
 
     struct expression *right;
 
128
new_exp_2 (enum operator op, struct expression *left, struct expression *right)
147
129
{
148
130
  struct expression *args[2];
149
131
 
153
135
}
154
136
 
155
137
static inline struct expression *
156
 
new_exp_3 (op, bexp, tbranch, fbranch)
157
 
     enum operator op;
158
 
     struct expression *bexp;
159
 
     struct expression *tbranch;
160
 
     struct expression *fbranch;
 
138
new_exp_3 (enum operator op, struct expression *bexp,
 
139
           struct expression *tbranch, struct expression *fbranch)
161
140
{
162
141
  struct expression *args[3];
163
142
 
167
146
  return new_exp (3, op, args);
168
147
}
169
148
 
170
 
#include <stdio.h>
171
 
 
172
 
#ifndef __cplusplus
173
 
#ifndef __STDC__
174
 
#define const
175
 
#endif
 
149
#ifndef YYDEBUG
 
150
# define YYDEBUG 0
176
151
#endif
177
152
 
178
153
 
181
156
#define YYFLAG          -32768
182
157
#define YYNTBASE        16
183
158
 
 
159
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
184
160
#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
185
161
 
186
 
static const char yytranslate[] = {     0,
187
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
188
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
189
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
190
 
     2,     2,    10,     2,     2,     2,     2,     5,     2,    14,
191
 
    15,     2,     2,     2,     2,     2,     2,     2,     2,     2,
192
 
     2,     2,     2,     2,     2,     2,     2,    12,     2,     2,
193
 
     2,     2,     3,     2,     2,     2,     2,     2,     2,     2,
194
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
195
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
196
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
197
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,    13,
198
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
199
 
     2,     2,     2,     4,     2,     2,     2,     2,     2,     2,
200
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
201
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
202
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
203
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
204
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
205
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
206
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
207
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
208
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
209
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
210
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
211
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
212
 
     2,     2,     2,     2,     2,     1,     6,     7,     8,     9,
213
 
    11
214
 
};
215
 
 
216
 
#if YYDEBUG != 0
217
 
static const short yyprhs[] = {     0,
218
 
     0,     2,     8,    12,    16,    20,    24,    28,    32,    35,
219
 
    37,    39
220
 
};
221
 
 
222
 
static const short yyrhs[] = {    17,
223
 
     0,    17,     3,    17,    12,    17,     0,    17,     4,    17,
224
 
     0,    17,     5,    17,     0,    17,     6,    17,     0,    17,
225
 
     7,    17,     0,    17,     8,    17,     0,    17,     9,    17,
226
 
     0,    10,    17,     0,    13,     0,    11,     0,    14,    17,
227
 
    15,     0
228
 
};
229
 
 
230
 
#endif
231
 
 
232
 
#if YYDEBUG != 0
233
 
static const short yyrline[] = { 0,
234
 
   174,   182,   186,   190,   194,   198,   202,   206,   210,   214,
235
 
   218,   223
236
 
};
237
 
#endif
238
 
 
239
 
 
240
 
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
241
 
 
242
 
static const char * const yytname[] = {   "$","error","$undefined.","'?'","'|'",
243
 
"'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'",
244
 
"start","exp", NULL
245
 
};
246
 
#endif
247
 
 
248
 
static const short yyr1[] = {     0,
249
 
    16,    17,    17,    17,    17,    17,    17,    17,    17,    17,
250
 
    17,    17
251
 
};
252
 
 
253
 
static const short yyr2[] = {     0,
254
 
     1,     5,     3,     3,     3,     3,     3,     3,     2,     1,
255
 
     1,     3
256
 
};
257
 
 
258
 
static const short yydefact[] = {     0,
259
 
     0,    11,    10,     0,     1,     9,     0,     0,     0,     0,
260
 
     0,     0,     0,     0,    12,     0,     3,     4,     5,     6,
261
 
     7,     8,     0,     2,     0,     0,     0
262
 
};
263
 
 
264
 
static const short yydefgoto[] = {    25,
265
 
     5
266
 
};
267
 
 
268
 
static const short yypact[] = {    -9,
269
 
    -9,-32768,-32768,    -9,    34,-32768,    11,    -9,    -9,    -9,
270
 
    -9,    -9,    -9,    -9,-32768,    24,    39,    43,    16,    26,
271
 
    -3,-32768,    -9,    34,    21,    53,-32768
272
 
};
273
 
 
274
 
static const short yypgoto[] = {-32768,
275
 
    -1
 
162
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
 
163
static const char yytranslate[] =
 
164
{
 
165
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
166
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
167
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
168
       2,     2,     2,    10,     2,     2,     2,     2,     5,     2,
 
169
      14,    15,     2,     2,     2,     2,     2,     2,     2,     2,
 
170
       2,     2,     2,     2,     2,     2,     2,     2,    12,     2,
 
171
       2,     2,     2,     3,     2,     2,     2,     2,     2,     2,
 
172
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
173
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
174
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
175
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
176
      13,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
177
       2,     2,     2,     2,     4,     2,     2,     2,     2,     2,
 
178
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
179
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
180
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
181
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
182
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
183
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
184
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
185
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
186
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
187
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
188
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
189
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
190
       2,     2,     2,     2,     2,     2,     1,     6,     7,     8,
 
191
       9,    11
 
192
};
 
193
 
 
194
#if YYDEBUG
 
195
static const short yyprhs[] =
 
196
{
 
197
       0,     0,     2,     8,    12,    16,    20,    24,    28,    32,
 
198
      35,    37,    39
 
199
};
 
200
static const short yyrhs[] =
 
201
{
 
202
      17,     0,    17,     3,    17,    12,    17,     0,    17,     4,
 
203
      17,     0,    17,     5,    17,     0,    17,     6,    17,     0,
 
204
      17,     7,    17,     0,    17,     8,    17,     0,    17,     9,
 
205
      17,     0,    10,    17,     0,    13,     0,    11,     0,    14,
 
206
      17,    15,     0
 
207
};
 
208
 
 
209
#endif
 
210
 
 
211
#if YYDEBUG
 
212
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
 
213
static const short yyrline[] =
 
214
{
 
215
       0,   150,   158,   162,   166,   170,   174,   178,   182,   186,
 
216
     190,   194,   199
 
217
};
 
218
#endif
 
219
 
 
220
 
 
221
#if (YYDEBUG) || defined YYERROR_VERBOSE
 
222
 
 
223
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
 
224
static const char *const yytname[] =
 
225
{
 
226
  "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", 
 
227
  "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", 
 
228
  "start", "exp", 0
 
229
};
 
230
#endif
 
231
 
 
232
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
 
233
static const short yyr1[] =
 
234
{
 
235
       0,    16,    17,    17,    17,    17,    17,    17,    17,    17,
 
236
      17,    17,    17
 
237
};
 
238
 
 
239
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
 
240
static const short yyr2[] =
 
241
{
 
242
       0,     1,     5,     3,     3,     3,     3,     3,     3,     2,
 
243
       1,     1,     3
 
244
};
 
245
 
 
246
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
 
247
   doesn't specify something else to do.  Zero means the default is an
 
248
   error. */
 
249
static const short yydefact[] =
 
250
{
 
251
       0,     0,    11,    10,     0,     1,     9,     0,     0,     0,
 
252
       0,     0,     0,     0,     0,    12,     0,     3,     4,     5,
 
253
       6,     7,     8,     0,     2,     0,     0,     0
 
254
};
 
255
 
 
256
static const short yydefgoto[] =
 
257
{
 
258
      25,     5
 
259
};
 
260
 
 
261
static const short yypact[] =
 
262
{
 
263
      -9,    -9,-32768,-32768,    -9,    34,-32768,    11,    -9,    -9,
 
264
      -9,    -9,    -9,    -9,    -9,-32768,    24,    39,    43,    16,
 
265
      26,    -3,-32768,    -9,    34,    21,    53,-32768
 
266
};
 
267
 
 
268
static const short yypgoto[] =
 
269
{
 
270
  -32768,    -1
276
271
};
277
272
 
278
273
 
279
274
#define YYLAST          53
280
275
 
281
276
 
282
 
static const short yytable[] = {     6,
283
 
     1,     2,     7,     3,     4,    14,    16,    17,    18,    19,
284
 
    20,    21,    22,     8,     9,    10,    11,    12,    13,    14,
285
 
    26,    24,    12,    13,    14,    15,     8,     9,    10,    11,
286
 
    12,    13,    14,    13,    14,    23,     8,     9,    10,    11,
287
 
    12,    13,    14,    10,    11,    12,    13,    14,    11,    12,
288
 
    13,    14,    27
 
277
static const short yytable[] =
 
278
{
 
279
       6,     1,     2,     7,     3,     4,    14,    16,    17,    18,
 
280
      19,    20,    21,    22,     8,     9,    10,    11,    12,    13,
 
281
      14,    26,    24,    12,    13,    14,    15,     8,     9,    10,
 
282
      11,    12,    13,    14,    13,    14,    23,     8,     9,    10,
 
283
      11,    12,    13,    14,    10,    11,    12,    13,    14,    11,
 
284
      12,    13,    14,    27
289
285
};
290
286
 
291
 
static const short yycheck[] = {     1,
292
 
    10,    11,     4,    13,    14,     9,     8,     9,    10,    11,
293
 
    12,    13,    14,     3,     4,     5,     6,     7,     8,     9,
294
 
     0,    23,     7,     8,     9,    15,     3,     4,     5,     6,
295
 
     7,     8,     9,     8,     9,    12,     3,     4,     5,     6,
296
 
     7,     8,     9,     5,     6,     7,     8,     9,     6,     7,
297
 
     8,     9,     0
 
287
static const short yycheck[] =
 
288
{
 
289
       1,    10,    11,     4,    13,    14,     9,     8,     9,    10,
 
290
      11,    12,    13,    14,     3,     4,     5,     6,     7,     8,
 
291
       9,     0,    23,     7,     8,     9,    15,     3,     4,     5,
 
292
       6,     7,     8,     9,     8,     9,    12,     3,     4,     5,
 
293
       6,     7,     8,     9,     5,     6,     7,     8,     9,     6,
 
294
       7,     8,     9,     0
298
295
};
299
296
#define YYPURE 1
300
297
 
301
298
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
302
 
#line 3 "/usr/local/share/bison.simple"
303
 
/* This file comes from bison-1.28.  */
 
299
#line 3 "/usr/local/share/bison/bison.simple"
304
300
 
305
301
/* Skeleton output parser for bison,
306
 
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
 
302
 
 
303
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
 
304
   Foundation, Inc.
307
305
 
308
306
   This program is free software; you can redistribute it and/or modify
309
307
   it under the terms of the GNU General Public License as published by
325
323
   This special exception was added by the Free Software Foundation
326
324
   in version 1.24 of Bison.  */
327
325
 
328
 
/* This is the parser code that is written into each bison parser
329
 
  when the %semantic_parser declaration is not specified in the grammar.
330
 
  It was written by Richard Stallman by simplifying the hairy parser
331
 
  used when %semantic_parser is specified.  */
332
 
 
333
 
#ifndef YYSTACK_USE_ALLOCA
334
 
#ifdef alloca
335
 
#define YYSTACK_USE_ALLOCA
336
 
#else /* alloca not defined */
337
 
#ifdef __GNUC__
338
 
#define YYSTACK_USE_ALLOCA
339
 
#define alloca __builtin_alloca
340
 
#else /* not GNU C.  */
341
 
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
342
 
#define YYSTACK_USE_ALLOCA
343
 
#include <alloca.h>
344
 
#else /* not sparc */
345
 
/* We think this test detects Watcom and Microsoft C.  */
346
 
/* This used to test MSDOS, but that is a bad idea
347
 
   since that symbol is in the user namespace.  */
348
 
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
349
 
#if 0 /* No need for malloc.h, which pollutes the namespace;
350
 
         instead, just don't use alloca.  */
351
 
#include <malloc.h>
352
 
#endif
353
 
#else /* not MSDOS, or __TURBOC__ */
354
 
#if defined(_AIX)
355
 
/* I don't know what this was needed for, but it pollutes the namespace.
356
 
   So I turned it off.   rms, 2 May 1997.  */
357
 
/* #include <malloc.h>  */
358
 
 #pragma alloca
359
 
#define YYSTACK_USE_ALLOCA
360
 
#else /* not MSDOS, or __TURBOC__, or _AIX */
361
 
#if 0
362
 
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
363
 
                 and on HPUX 10.  Eventually we can turn this on.  */
364
 
#define YYSTACK_USE_ALLOCA
365
 
#define alloca __builtin_alloca
366
 
#endif /* __hpux */
367
 
#endif
368
 
#endif /* not _AIX */
369
 
#endif /* not MSDOS, or __TURBOC__ */
370
 
#endif /* not sparc */
371
 
#endif /* not GNU C */
372
 
#endif /* alloca not defined */
373
 
#endif /* YYSTACK_USE_ALLOCA not defined */
374
 
 
375
 
#ifdef YYSTACK_USE_ALLOCA
376
 
#define YYSTACK_ALLOC alloca
377
 
#else
378
 
#define YYSTACK_ALLOC malloc
379
 
#endif
380
 
 
381
 
/* Note: there must be only one dollar sign in this file.
382
 
   It is replaced by the list of actions, each action
383
 
   as one case of the switch.  */
 
326
/* This is the parser code that is written into each bison parser when
 
327
   the %semantic_parser declaration is not specified in the grammar.
 
328
   It was written by Richard Stallman by simplifying the hairy parser
 
329
   used when %semantic_parser is specified.  */
 
330
 
 
331
/* All symbols defined below should begin with yy or YY, to avoid
 
332
   infringing on user name space.  This should be done even for local
 
333
   variables, as they might otherwise be expanded by user macros.
 
334
   There are some unavoidable exceptions within include files to
 
335
   define necessary library symbols; they are noted "INFRINGES ON
 
336
   USER NAME SPACE" below.  */
 
337
 
 
338
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
 
339
 
 
340
/* The parser invokes alloca or malloc; define the necessary symbols.  */
 
341
 
 
342
# if YYSTACK_USE_ALLOCA
 
343
#  define YYSTACK_ALLOC alloca
 
344
# else
 
345
#  ifndef YYSTACK_USE_ALLOCA
 
346
#   if defined (alloca) || defined (_ALLOCA_H)
 
347
#    define YYSTACK_ALLOC alloca
 
348
#   else
 
349
#    ifdef __GNUC__
 
350
#     define YYSTACK_ALLOC __builtin_alloca
 
351
#    endif
 
352
#   endif
 
353
#  endif
 
354
# endif
 
355
 
 
356
# ifdef YYSTACK_ALLOC
 
357
   /* Pacify GCC's `empty if-body' warning. */
 
358
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
 
359
# else
 
360
#  if defined (__STDC__) || defined (__cplusplus)
 
361
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 
362
#   define YYSIZE_T size_t
 
363
#  endif
 
364
#  define YYSTACK_ALLOC malloc
 
365
#  define YYSTACK_FREE free
 
366
# endif
 
367
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
 
368
 
 
369
 
 
370
#if (! defined (yyoverflow) \
 
371
     && (! defined (__cplusplus) \
 
372
         || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
373
 
 
374
/* A type that is properly aligned for any stack member.  */
 
375
union yyalloc
 
376
{
 
377
  short yyss;
 
378
  YYSTYPE yyvs;
 
379
# if YYLSP_NEEDED
 
380
  YYLTYPE yyls;
 
381
# endif
 
382
};
 
383
 
 
384
/* The size of the maximum gap between one aligned stack and the next.  */
 
385
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
 
386
 
 
387
/* The size of an array large to enough to hold all stacks, each with
 
388
   N elements.  */
 
389
# if YYLSP_NEEDED
 
390
#  define YYSTACK_BYTES(N) \
 
391
     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))      \
 
392
      + 2 * YYSTACK_GAP_MAX)
 
393
# else
 
394
#  define YYSTACK_BYTES(N) \
 
395
     ((N) * (sizeof (short) + sizeof (YYSTYPE))                         \
 
396
      + YYSTACK_GAP_MAX)
 
397
# endif
 
398
 
 
399
/* Copy COUNT objects from FROM to TO.  The source and destination do
 
400
   not overlap.  */
 
401
# ifndef YYCOPY
 
402
#  if 1 < __GNUC__
 
403
#   define YYCOPY(To, From, Count) \
 
404
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
 
405
#  else
 
406
#   define YYCOPY(To, From, Count)              \
 
407
      do                                        \
 
408
        {                                       \
 
409
          register YYSIZE_T yyi;                \
 
410
          for (yyi = 0; yyi < (Count); yyi++)   \
 
411
            (To)[yyi] = (From)[yyi];            \
 
412
        }                                       \
 
413
      while (0)
 
414
#  endif
 
415
# endif
 
416
 
 
417
/* Relocate STACK from its old location to the new one.  The
 
418
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
 
419
   elements in the stack, and YYPTR gives the new location of the
 
420
   stack.  Advance YYPTR to a properly aligned location for the next
 
421
   stack.  */
 
422
# define YYSTACK_RELOCATE(Stack)                                        \
 
423
    do                                                                  \
 
424
      {                                                                 \
 
425
        YYSIZE_T yynewbytes;                                            \
 
426
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
 
427
        Stack = &yyptr->Stack;                                          \
 
428
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
 
429
        yyptr += yynewbytes / sizeof (*yyptr);                          \
 
430
      }                                                                 \
 
431
    while (0)
 
432
 
 
433
#endif
 
434
 
 
435
 
 
436
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
 
437
# define YYSIZE_T __SIZE_TYPE__
 
438
#endif
 
439
#if ! defined (YYSIZE_T) && defined (size_t)
 
440
# define YYSIZE_T size_t
 
441
#endif
 
442
#if ! defined (YYSIZE_T)
 
443
# if defined (__STDC__) || defined (__cplusplus)
 
444
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 
445
#  define YYSIZE_T size_t
 
446
# endif
 
447
#endif
 
448
#if ! defined (YYSIZE_T)
 
449
# define YYSIZE_T unsigned int
 
450
#endif
384
451
 
385
452
#define yyerrok         (yyerrstatus = 0)
386
453
#define yyclearin       (yychar = YYEMPTY)
389
456
#define YYACCEPT        goto yyacceptlab
390
457
#define YYABORT         goto yyabortlab
391
458
#define YYERROR         goto yyerrlab1
392
 
/* Like YYERROR except do call yyerror.
393
 
   This remains here temporarily to ease the
394
 
   transition to the new meaning of YYERROR, for GCC.
 
459
/* Like YYERROR except do call yyerror.  This remains here temporarily
 
460
   to ease the transition to the new meaning of YYERROR, for GCC.
395
461
   Once GCC version 2 has supplanted version 1, this can go.  */
396
462
#define YYFAIL          goto yyerrlab
397
463
#define YYRECOVERING()  (!!yyerrstatus)
398
 
#define YYBACKUP(token, value) \
 
464
#define YYBACKUP(Token, Value)                                  \
399
465
do                                                              \
400
466
  if (yychar == YYEMPTY && yylen == 1)                          \
401
 
    { yychar = (token), yylval = (value);                       \
 
467
    {                                                           \
 
468
      yychar = (Token);                                         \
 
469
      yylval = (Value);                                         \
402
470
      yychar1 = YYTRANSLATE (yychar);                           \
403
471
      YYPOPSTACK;                                               \
404
472
      goto yybackup;                                            \
405
473
    }                                                           \
406
474
  else                                                          \
407
 
    { yyerror ("syntax error: cannot back up"); YYERROR; }      \
 
475
    {                                                           \
 
476
      yyerror ("syntax error: cannot back up");                 \
 
477
      YYERROR;                                                  \
 
478
    }                                                           \
408
479
while (0)
409
480
 
410
481
#define YYTERROR        1
411
482
#define YYERRCODE       256
412
483
 
413
 
#ifndef YYPURE
414
 
#define YYLEX           yylex()
415
 
#endif
416
 
 
417
 
#ifdef YYPURE
418
 
#ifdef YYLSP_NEEDED
419
 
#ifdef YYLEX_PARAM
420
 
#define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
421
 
#else
422
 
#define YYLEX           yylex(&yylval, &yylloc)
423
 
#endif
424
 
#else /* not YYLSP_NEEDED */
425
 
#ifdef YYLEX_PARAM
426
 
#define YYLEX           yylex(&yylval, YYLEX_PARAM)
427
 
#else
428
 
#define YYLEX           yylex(&yylval)
429
 
#endif
430
 
#endif /* not YYLSP_NEEDED */
431
 
#endif
432
 
 
433
 
/* If nonreentrant, generate the variables here */
434
 
 
435
 
#ifndef YYPURE
436
 
 
437
 
int     yychar;                 /*  the lookahead symbol                */
438
 
YYSTYPE yylval;                 /*  the semantic value of the           */
439
 
                                /*  lookahead symbol                    */
440
 
 
441
 
#ifdef YYLSP_NEEDED
442
 
YYLTYPE yylloc;                 /*  location data for the lookahead     */
443
 
                                /*  symbol                              */
444
 
#endif
445
 
 
446
 
int yynerrs;                    /*  number of parse errors so far       */
447
 
#endif  /* not YYPURE */
448
 
 
449
 
#if YYDEBUG != 0
450
 
int yydebug;                    /*  nonzero means print parse trace     */
451
 
/* Since this is uninitialized, it does not stop multiple parsers
452
 
   from coexisting.  */
453
 
#endif
454
 
 
455
 
/*  YYINITDEPTH indicates the initial size of the parser's stacks       */
456
 
 
 
484
 
 
485
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
 
486
   are run).
 
487
 
 
488
   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
 
489
   first token.  By default, to implement support for ranges, extend
 
490
   its range to the last symbol.  */
 
491
 
 
492
#ifndef YYLLOC_DEFAULT
 
493
# define YYLLOC_DEFAULT(Current, Rhs, N)        \
 
494
   Current.last_line   = Rhs[N].last_line;      \
 
495
   Current.last_column = Rhs[N].last_column;
 
496
#endif
 
497
 
 
498
 
 
499
/* YYLEX -- calling `yylex' with the right arguments.  */
 
500
 
 
501
#if YYPURE
 
502
# if YYLSP_NEEDED
 
503
#  ifdef YYLEX_PARAM
 
504
#   define YYLEX                yylex (&yylval, &yylloc, YYLEX_PARAM)
 
505
#  else
 
506
#   define YYLEX                yylex (&yylval, &yylloc)
 
507
#  endif
 
508
# else /* !YYLSP_NEEDED */
 
509
#  ifdef YYLEX_PARAM
 
510
#   define YYLEX                yylex (&yylval, YYLEX_PARAM)
 
511
#  else
 
512
#   define YYLEX                yylex (&yylval)
 
513
#  endif
 
514
# endif /* !YYLSP_NEEDED */
 
515
#else /* !YYPURE */
 
516
# define YYLEX                  yylex ()
 
517
#endif /* !YYPURE */
 
518
 
 
519
 
 
520
/* Enable debugging if requested.  */
 
521
#if YYDEBUG
 
522
 
 
523
# ifndef YYFPRINTF
 
524
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
 
525
#  define YYFPRINTF fprintf
 
526
# endif
 
527
 
 
528
# define YYDPRINTF(Args)                        \
 
529
do {                                            \
 
530
  if (yydebug)                                  \
 
531
    YYFPRINTF Args;                             \
 
532
} while (0)
 
533
/* Nonzero means print parse trace.  It is left uninitialized so that
 
534
   multiple parsers can coexist.  */
 
535
int yydebug;
 
536
#else /* !YYDEBUG */
 
537
# define YYDPRINTF(Args)
 
538
#endif /* !YYDEBUG */
 
539
 
 
540
/* YYINITDEPTH -- initial size of the parser's stacks.  */
457
541
#ifndef YYINITDEPTH
458
 
#define YYINITDEPTH 200
 
542
# define YYINITDEPTH 200
459
543
#endif
460
544
 
461
 
/*  YYMAXDEPTH is the maximum size the stacks can grow to
462
 
    (effective only if the built-in stack extension method is used).  */
 
545
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
 
546
   if the built-in stack extension method is used).
 
547
 
 
548
   Do not make this value too large; the results are undefined if
 
549
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
 
550
   evaluated with infinite-precision integer arithmetic.  */
463
551
 
464
552
#if YYMAXDEPTH == 0
465
 
#undef YYMAXDEPTH
 
553
# undef YYMAXDEPTH
466
554
#endif
467
555
 
468
556
#ifndef YYMAXDEPTH
469
 
#define YYMAXDEPTH 10000
470
 
#endif
471
 
 
472
 
/* Define __yy_memcpy.  Note that the size argument
473
 
   should be passed with type unsigned int, because that is what the non-GCC
474
 
   definitions require.  With GCC, __builtin_memcpy takes an arg
475
 
   of type size_t, but it can handle unsigned int.  */
476
 
 
477
 
#if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
478
 
#define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
479
 
#else                           /* not GNU C or C++ */
480
 
#ifndef __cplusplus
481
 
 
482
 
/* This is the most reliable way to avoid incompatibilities
483
 
   in available built-in functions on various systems.  */
484
 
static void
485
 
__yy_memcpy (to, from, count)
486
 
     char *to;
487
 
     char *from;
488
 
     unsigned int count;
489
 
{
490
 
  register char *f = from;
491
 
  register char *t = to;
492
 
  register int i = count;
493
 
 
494
 
  while (i-- > 0)
495
 
    *t++ = *f++;
496
 
}
497
 
 
498
 
#else /* __cplusplus */
499
 
 
500
 
/* This is the most reliable way to avoid incompatibilities
501
 
   in available built-in functions on various systems.  */
502
 
static void
503
 
__yy_memcpy (char *to, char *from, unsigned int count)
504
 
{
505
 
  register char *t = to;
506
 
  register char *f = from;
507
 
  register int i = count;
508
 
 
509
 
  while (i-- > 0)
510
 
    *t++ = *f++;
511
 
}
512
 
 
513
 
#endif
514
 
#endif
515
 
 
516
 
#line 217 "/usr/local/share/bison.simple"
 
557
# define YYMAXDEPTH 10000
 
558
#endif
 
559
 
 
560
#ifdef YYERROR_VERBOSE
 
561
 
 
562
# ifndef yystrlen
 
563
#  if defined (__GLIBC__) && defined (_STRING_H)
 
564
#   define yystrlen strlen
 
565
#  else
 
566
/* Return the length of YYSTR.  */
 
567
static YYSIZE_T
 
568
#   if defined (__STDC__) || defined (__cplusplus)
 
569
yystrlen (const char *yystr)
 
570
#   else
 
571
yystrlen (yystr)
 
572
     const char *yystr;
 
573
#   endif
 
574
{
 
575
  register const char *yys = yystr;
 
576
 
 
577
  while (*yys++ != '\0')
 
578
    continue;
 
579
 
 
580
  return yys - yystr - 1;
 
581
}
 
582
#  endif
 
583
# endif
 
584
 
 
585
# ifndef yystpcpy
 
586
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
 
587
#   define yystpcpy stpcpy
 
588
#  else
 
589
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
 
590
   YYDEST.  */
 
591
static char *
 
592
#   if defined (__STDC__) || defined (__cplusplus)
 
593
yystpcpy (char *yydest, const char *yysrc)
 
594
#   else
 
595
yystpcpy (yydest, yysrc)
 
596
     char *yydest;
 
597
     const char *yysrc;
 
598
#   endif
 
599
{
 
600
  register char *yyd = yydest;
 
601
  register const char *yys = yysrc;
 
602
 
 
603
  while ((*yyd++ = *yys++) != '\0')
 
604
    continue;
 
605
 
 
606
  return yyd - 1;
 
607
}
 
608
#  endif
 
609
# endif
 
610
#endif
 
611
 
 
612
#line 315 "/usr/local/share/bison/bison.simple"
 
613
 
517
614
 
518
615
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
519
616
   into yyparse.  The argument should have type void *.
522
619
   to the proper pointer type.  */
523
620
 
524
621
#ifdef YYPARSE_PARAM
525
 
#ifdef __cplusplus
526
 
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
527
 
#define YYPARSE_PARAM_DECL
528
 
#else /* not __cplusplus */
529
 
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
530
 
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
531
 
#endif /* not __cplusplus */
532
 
#else /* not YYPARSE_PARAM */
533
 
#define YYPARSE_PARAM_ARG
534
 
#define YYPARSE_PARAM_DECL
535
 
#endif /* not YYPARSE_PARAM */
 
622
# if defined (__STDC__) || defined (__cplusplus)
 
623
#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
 
624
#  define YYPARSE_PARAM_DECL
 
625
# else
 
626
#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
 
627
#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
 
628
# endif
 
629
#else /* !YYPARSE_PARAM */
 
630
# define YYPARSE_PARAM_ARG
 
631
# define YYPARSE_PARAM_DECL
 
632
#endif /* !YYPARSE_PARAM */
536
633
 
537
634
/* Prevent warning if -Wstrict-prototypes.  */
538
635
#ifdef __GNUC__
539
 
#ifdef YYPARSE_PARAM
 
636
# ifdef YYPARSE_PARAM
540
637
int yyparse (void *);
541
 
#else
 
638
# else
542
639
int yyparse (void);
543
 
#endif
544
 
#endif
 
640
# endif
 
641
#endif
 
642
 
 
643
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
 
644
   variables are global, or local to YYPARSE.  */
 
645
 
 
646
#define YY_DECL_NON_LSP_VARIABLES                       \
 
647
/* The lookahead symbol.  */                            \
 
648
int yychar;                                             \
 
649
                                                        \
 
650
/* The semantic value of the lookahead symbol. */       \
 
651
YYSTYPE yylval;                                         \
 
652
                                                        \
 
653
/* Number of parse errors so far.  */                   \
 
654
int yynerrs;
 
655
 
 
656
#if YYLSP_NEEDED
 
657
# define YY_DECL_VARIABLES                      \
 
658
YY_DECL_NON_LSP_VARIABLES                       \
 
659
                                                \
 
660
/* Location data for the lookahead symbol.  */  \
 
661
YYLTYPE yylloc;
 
662
#else
 
663
# define YY_DECL_VARIABLES                      \
 
664
YY_DECL_NON_LSP_VARIABLES
 
665
#endif
 
666
 
 
667
 
 
668
/* If nonreentrant, generate the variables here. */
 
669
 
 
670
#if !YYPURE
 
671
YY_DECL_VARIABLES
 
672
#endif  /* !YYPURE */
545
673
 
546
674
int
547
 
yyparse(YYPARSE_PARAM_ARG)
 
675
yyparse (YYPARSE_PARAM_ARG)
548
676
     YYPARSE_PARAM_DECL
549
677
{
 
678
  /* If reentrant, generate the variables here. */
 
679
#if YYPURE
 
680
  YY_DECL_VARIABLES
 
681
#endif  /* !YYPURE */
 
682
 
550
683
  register int yystate;
551
684
  register int yyn;
 
685
  int yyresult;
 
686
  /* Number of tokens to shift before error messages enabled.  */
 
687
  int yyerrstatus;
 
688
  /* Lookahead token as an internal (translated) token number.  */
 
689
  int yychar1 = 0;
 
690
 
 
691
  /* Three stacks and their tools:
 
692
     `yyss': related to states,
 
693
     `yyvs': related to semantic values,
 
694
     `yyls': related to locations.
 
695
 
 
696
     Refer to the stacks thru separate pointers, to allow yyoverflow
 
697
     to reallocate them elsewhere.  */
 
698
 
 
699
  /* The state stack. */
 
700
  short yyssa[YYINITDEPTH];
 
701
  short *yyss = yyssa;
552
702
  register short *yyssp;
 
703
 
 
704
  /* The semantic value stack.  */
 
705
  YYSTYPE yyvsa[YYINITDEPTH];
 
706
  YYSTYPE *yyvs = yyvsa;
553
707
  register YYSTYPE *yyvsp;
554
 
  int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
555
 
  int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
556
 
 
557
 
  short yyssa[YYINITDEPTH];     /*  the state stack                     */
558
 
  YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
559
 
 
560
 
  short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
561
 
  YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
562
 
 
563
 
#ifdef YYLSP_NEEDED
564
 
  YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
 
708
 
 
709
#if YYLSP_NEEDED
 
710
  /* The location stack.  */
 
711
  YYLTYPE yylsa[YYINITDEPTH];
565
712
  YYLTYPE *yyls = yylsa;
566
713
  YYLTYPE *yylsp;
 
714
#endif
567
715
 
568
 
#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 
716
#if YYLSP_NEEDED
 
717
# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
569
718
#else
570
 
#define YYPOPSTACK   (yyvsp--, yyssp--)
571
 
#endif
572
 
 
573
 
  int yystacksize = YYINITDEPTH;
574
 
  int yyfree_stacks = 0;
575
 
 
576
 
#ifdef YYPURE
577
 
  int yychar;
578
 
  YYSTYPE yylval;
579
 
  int yynerrs;
580
 
#ifdef YYLSP_NEEDED
581
 
  YYLTYPE yylloc;
582
 
#endif
583
 
#endif
584
 
 
585
 
  YYSTYPE yyval;                /*  the variable used to return         */
586
 
                                /*  semantic values from the action     */
587
 
                                /*  routines                            */
588
 
 
 
719
# define YYPOPSTACK   (yyvsp--, yyssp--)
 
720
#endif
 
721
 
 
722
  YYSIZE_T yystacksize = YYINITDEPTH;
 
723
 
 
724
 
 
725
  /* The variables used to return semantic value and location from the
 
726
     action routines.  */
 
727
  YYSTYPE yyval;
 
728
#if YYLSP_NEEDED
 
729
  YYLTYPE yyloc;
 
730
#endif
 
731
 
 
732
  /* When reducing, the number of symbols on the RHS of the reduced
 
733
     rule. */
589
734
  int yylen;
590
735
 
591
 
#if YYDEBUG != 0
592
 
  if (yydebug)
593
 
    fprintf(stderr, "Starting parse\n");
594
 
#endif
 
736
  YYDPRINTF ((stderr, "Starting parse\n"));
595
737
 
596
738
  yystate = 0;
597
739
  yyerrstatus = 0;
603
745
     so that they stay on the same level as the state stack.
604
746
     The wasted elements are never initialized.  */
605
747
 
606
 
  yyssp = yyss - 1;
 
748
  yyssp = yyss;
607
749
  yyvsp = yyvs;
608
 
#ifdef YYLSP_NEEDED
 
750
#if YYLSP_NEEDED
609
751
  yylsp = yyls;
610
752
#endif
611
 
 
612
 
/* Push a new state, which is found in  yystate  .  */
613
 
/* In all cases, when you get here, the value and location stacks
614
 
   have just been pushed. so pushing a state here evens the stacks.  */
615
 
yynewstate:
616
 
 
617
 
  *++yyssp = yystate;
 
753
  goto yysetstate;
 
754
 
 
755
/*------------------------------------------------------------.
 
756
| yynewstate -- Push a new state, which is found in yystate.  |
 
757
`------------------------------------------------------------*/
 
758
 yynewstate:
 
759
  /* In all cases, when you get here, the value and location stacks
 
760
     have just been pushed. so pushing a state here evens the stacks.
 
761
     */
 
762
  yyssp++;
 
763
 
 
764
 yysetstate:
 
765
  *yyssp = yystate;
618
766
 
619
767
  if (yyssp >= yyss + yystacksize - 1)
620
768
    {
621
 
      /* Give user a chance to reallocate the stack */
622
 
      /* Use copies of these so that the &'s don't force the real ones into memory. */
623
 
      YYSTYPE *yyvs1 = yyvs;
624
 
      short *yyss1 = yyss;
625
 
#ifdef YYLSP_NEEDED
626
 
      YYLTYPE *yyls1 = yyls;
627
 
#endif
628
 
 
629
769
      /* Get the current used size of the three stacks, in elements.  */
630
 
      int size = yyssp - yyss + 1;
 
770
      YYSIZE_T yysize = yyssp - yyss + 1;
631
771
 
632
772
#ifdef yyoverflow
633
 
      /* Each stack pointer address is followed by the size of
634
 
         the data in use in that stack, in bytes.  */
635
 
#ifdef YYLSP_NEEDED
636
 
      /* This used to be a conditional around just the two extra args,
637
 
         but that might be undefined if yyoverflow is a macro.  */
638
 
      yyoverflow("parser stack overflow",
639
 
                 &yyss1, size * sizeof (*yyssp),
640
 
                 &yyvs1, size * sizeof (*yyvsp),
641
 
                 &yyls1, size * sizeof (*yylsp),
642
 
                 &yystacksize);
643
 
#else
644
 
      yyoverflow("parser stack overflow",
645
 
                 &yyss1, size * sizeof (*yyssp),
646
 
                 &yyvs1, size * sizeof (*yyvsp),
647
 
                 &yystacksize);
648
 
#endif
 
773
      {
 
774
        /* Give user a chance to reallocate the stack. Use copies of
 
775
           these so that the &'s don't force the real ones into
 
776
           memory.  */
 
777
        YYSTYPE *yyvs1 = yyvs;
 
778
        short *yyss1 = yyss;
649
779
 
650
 
      yyss = yyss1; yyvs = yyvs1;
651
 
#ifdef YYLSP_NEEDED
652
 
      yyls = yyls1;
653
 
#endif
 
780
        /* Each stack pointer address is followed by the size of the
 
781
           data in use in that stack, in bytes.  */
 
782
# if YYLSP_NEEDED
 
783
        YYLTYPE *yyls1 = yyls;
 
784
        /* This used to be a conditional around just the two extra args,
 
785
           but that might be undefined if yyoverflow is a macro.  */
 
786
        yyoverflow ("parser stack overflow",
 
787
                    &yyss1, yysize * sizeof (*yyssp),
 
788
                    &yyvs1, yysize * sizeof (*yyvsp),
 
789
                    &yyls1, yysize * sizeof (*yylsp),
 
790
                    &yystacksize);
 
791
        yyls = yyls1;
 
792
# else
 
793
        yyoverflow ("parser stack overflow",
 
794
                    &yyss1, yysize * sizeof (*yyssp),
 
795
                    &yyvs1, yysize * sizeof (*yyvsp),
 
796
                    &yystacksize);
 
797
# endif
 
798
        yyss = yyss1;
 
799
        yyvs = yyvs1;
 
800
      }
654
801
#else /* no yyoverflow */
 
802
# ifndef YYSTACK_RELOCATE
 
803
      goto yyoverflowlab;
 
804
# else
655
805
      /* Extend the stack our own way.  */
656
806
      if (yystacksize >= YYMAXDEPTH)
657
 
        {
658
 
          yyerror("parser stack overflow");
659
 
          if (yyfree_stacks)
660
 
            {
661
 
              free (yyss);
662
 
              free (yyvs);
663
 
#ifdef YYLSP_NEEDED
664
 
              free (yyls);
665
 
#endif
666
 
            }
667
 
          return 2;
668
 
        }
 
807
        goto yyoverflowlab;
669
808
      yystacksize *= 2;
670
809
      if (yystacksize > YYMAXDEPTH)
671
810
        yystacksize = YYMAXDEPTH;
672
 
#ifndef YYSTACK_USE_ALLOCA
673
 
      yyfree_stacks = 1;
674
 
#endif
675
 
      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
676
 
      __yy_memcpy ((char *)yyss, (char *)yyss1,
677
 
                   size * (unsigned int) sizeof (*yyssp));
678
 
      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
679
 
      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
680
 
                   size * (unsigned int) sizeof (*yyvsp));
681
 
#ifdef YYLSP_NEEDED
682
 
      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
683
 
      __yy_memcpy ((char *)yyls, (char *)yyls1,
684
 
                   size * (unsigned int) sizeof (*yylsp));
685
 
#endif
 
811
 
 
812
      {
 
813
        short *yyss1 = yyss;
 
814
        union yyalloc *yyptr =
 
815
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 
816
        if (! yyptr)
 
817
          goto yyoverflowlab;
 
818
        YYSTACK_RELOCATE (yyss);
 
819
        YYSTACK_RELOCATE (yyvs);
 
820
# if YYLSP_NEEDED
 
821
        YYSTACK_RELOCATE (yyls);
 
822
# endif
 
823
# undef YYSTACK_RELOCATE
 
824
        if (yyss1 != yyssa)
 
825
          YYSTACK_FREE (yyss1);
 
826
      }
 
827
# endif
686
828
#endif /* no yyoverflow */
687
829
 
688
 
      yyssp = yyss + size - 1;
689
 
      yyvsp = yyvs + size - 1;
690
 
#ifdef YYLSP_NEEDED
691
 
      yylsp = yyls + size - 1;
 
830
      yyssp = yyss + yysize - 1;
 
831
      yyvsp = yyvs + yysize - 1;
 
832
#if YYLSP_NEEDED
 
833
      yylsp = yyls + yysize - 1;
692
834
#endif
693
835
 
694
 
#if YYDEBUG != 0
695
 
      if (yydebug)
696
 
        fprintf(stderr, "Stack size increased to %d\n", yystacksize);
697
 
#endif
 
836
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 
837
                  (unsigned long int) yystacksize));
698
838
 
699
839
      if (yyssp >= yyss + yystacksize - 1)
700
840
        YYABORT;
701
841
    }
702
842
 
703
 
#if YYDEBUG != 0
704
 
  if (yydebug)
705
 
    fprintf(stderr, "Entering state %d\n", yystate);
706
 
#endif
 
843
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
707
844
 
708
845
  goto yybackup;
709
 
 yybackup:
 
846
 
 
847
 
 
848
/*-----------.
 
849
| yybackup.  |
 
850
`-----------*/
 
851
yybackup:
710
852
 
711
853
/* Do appropriate processing given the current state.  */
712
854
/* Read a lookahead token if we need one and don't already have one.  */
725
867
 
726
868
  if (yychar == YYEMPTY)
727
869
    {
728
 
#if YYDEBUG != 0
729
 
      if (yydebug)
730
 
        fprintf(stderr, "Reading a token: ");
731
 
#endif
 
870
      YYDPRINTF ((stderr, "Reading a token: "));
732
871
      yychar = YYLEX;
733
872
    }
734
873
 
739
878
      yychar1 = 0;
740
879
      yychar = YYEOF;           /* Don't call YYLEX any more */
741
880
 
742
 
#if YYDEBUG != 0
743
 
      if (yydebug)
744
 
        fprintf(stderr, "Now at end of input.\n");
745
 
#endif
 
881
      YYDPRINTF ((stderr, "Now at end of input.\n"));
746
882
    }
747
883
  else
748
884
    {
749
 
      yychar1 = YYTRANSLATE(yychar);
 
885
      yychar1 = YYTRANSLATE (yychar);
750
886
 
751
 
#if YYDEBUG != 0
 
887
#if YYDEBUG
 
888
     /* We have to keep this `#if YYDEBUG', since we use variables
 
889
        which are defined only if `YYDEBUG' is set.  */
752
890
      if (yydebug)
753
891
        {
754
 
          fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
755
 
          /* Give the individual parser a way to print the precise meaning
756
 
             of a token, for further debugging info.  */
757
 
#ifdef YYPRINT
 
892
          YYFPRINTF (stderr, "Next token is %d (%s",
 
893
                     yychar, yytname[yychar1]);
 
894
          /* Give the individual parser a way to print the precise
 
895
             meaning of a token, for further debugging info.  */
 
896
# ifdef YYPRINT
758
897
          YYPRINT (stderr, yychar, yylval);
759
 
#endif
760
 
          fprintf (stderr, ")\n");
 
898
# endif
 
899
          YYFPRINTF (stderr, ")\n");
761
900
        }
762
901
#endif
763
902
    }
789
928
    YYACCEPT;
790
929
 
791
930
  /* Shift the lookahead token.  */
792
 
 
793
 
#if YYDEBUG != 0
794
 
  if (yydebug)
795
 
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
796
 
#endif
 
931
  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
 
932
              yychar, yytname[yychar1]));
797
933
 
798
934
  /* Discard the token being shifted unless it is eof.  */
799
935
  if (yychar != YYEOF)
800
936
    yychar = YYEMPTY;
801
937
 
802
938
  *++yyvsp = yylval;
803
 
#ifdef YYLSP_NEEDED
 
939
#if YYLSP_NEEDED
804
940
  *++yylsp = yylloc;
805
941
#endif
806
942
 
807
 
  /* count tokens shifted since error; after three, turn off error status.  */
808
 
  if (yyerrstatus) yyerrstatus--;
 
943
  /* Count tokens shifted since error; after three, turn off error
 
944
     status.  */
 
945
  if (yyerrstatus)
 
946
    yyerrstatus--;
809
947
 
810
948
  yystate = yyn;
811
949
  goto yynewstate;
812
950
 
813
 
/* Do the default action for the current state.  */
 
951
 
 
952
/*-----------------------------------------------------------.
 
953
| yydefault -- do the default action for the current state.  |
 
954
`-----------------------------------------------------------*/
814
955
yydefault:
815
 
 
816
956
  yyn = yydefact[yystate];
817
957
  if (yyn == 0)
818
958
    goto yyerrlab;
819
 
 
820
 
/* Do a reduction.  yyn is the number of a rule to reduce with.  */
 
959
  goto yyreduce;
 
960
 
 
961
 
 
962
/*-----------------------------.
 
963
| yyreduce -- Do a reduction.  |
 
964
`-----------------------------*/
821
965
yyreduce:
 
966
  /* yyn is the number of a rule to reduce with.  */
822
967
  yylen = yyr2[yyn];
823
 
  if (yylen > 0)
824
 
    yyval = yyvsp[1-yylen]; /* implement default value of the action */
825
 
 
826
 
#if YYDEBUG != 0
 
968
 
 
969
  /* If YYLEN is nonzero, implement the default value of the action:
 
970
     `$$ = $1'.
 
971
 
 
972
     Otherwise, the following line sets YYVAL to the semantic value of
 
973
     the lookahead token.  This behavior is undocumented and Bison
 
974
     users should not rely upon it.  Assigning to YYVAL
 
975
     unconditionally makes the parser a bit smaller, and it avoids a
 
976
     GCC warning that YYVAL may be used uninitialized.  */
 
977
  yyval = yyvsp[1-yylen];
 
978
 
 
979
#if YYLSP_NEEDED
 
980
  /* Similarly for the default location.  Let the user run additional
 
981
     commands if for instance locations are ranges.  */
 
982
  yyloc = yylsp[1-yylen];
 
983
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
 
984
#endif
 
985
 
 
986
#if YYDEBUG
 
987
  /* We have to keep this `#if YYDEBUG', since we use variables which
 
988
     are defined only if `YYDEBUG' is set.  */
827
989
  if (yydebug)
828
990
    {
829
 
      int i;
 
991
      int yyi;
830
992
 
831
 
      fprintf (stderr, "Reducing via rule %d (line %d), ",
832
 
               yyn, yyrline[yyn]);
 
993
      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
 
994
                 yyn, yyrline[yyn]);
833
995
 
834
996
      /* Print the symbols being reduced, and their result.  */
835
 
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
836
 
        fprintf (stderr, "%s ", yytname[yyrhs[i]]);
837
 
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
 
997
      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
 
998
        YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
 
999
      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
838
1000
    }
839
1001
#endif
840
1002
 
841
 
 
842
1003
  switch (yyn) {
843
1004
 
844
1005
case 1:
845
 
#line 175 "plural.y"
 
1006
#line 151 "plural.y"
846
1007
{
847
1008
            if (yyvsp[0].exp == NULL)
848
1009
              YYABORT;
849
1010
            ((struct parse_args *) arg)->res = yyvsp[0].exp;
850
 
          ;
851
 
    break;}
 
1011
          }
 
1012
    break;
852
1013
case 2:
853
 
#line 183 "plural.y"
 
1014
#line 159 "plural.y"
854
1015
{
855
1016
            yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
856
 
          ;
857
 
    break;}
 
1017
          }
 
1018
    break;
858
1019
case 3:
859
 
#line 187 "plural.y"
 
1020
#line 163 "plural.y"
860
1021
{
861
1022
            yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
862
 
          ;
863
 
    break;}
 
1023
          }
 
1024
    break;
864
1025
case 4:
865
 
#line 191 "plural.y"
 
1026
#line 167 "plural.y"
866
1027
{
867
1028
            yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
868
 
          ;
869
 
    break;}
 
1029
          }
 
1030
    break;
870
1031
case 5:
871
 
#line 195 "plural.y"
 
1032
#line 171 "plural.y"
872
1033
{
873
1034
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
874
 
          ;
875
 
    break;}
 
1035
          }
 
1036
    break;
876
1037
case 6:
877
 
#line 199 "plural.y"
 
1038
#line 175 "plural.y"
878
1039
{
879
1040
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
880
 
          ;
881
 
    break;}
 
1041
          }
 
1042
    break;
882
1043
case 7:
883
 
#line 203 "plural.y"
 
1044
#line 179 "plural.y"
884
1045
{
885
1046
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
886
 
          ;
887
 
    break;}
 
1047
          }
 
1048
    break;
888
1049
case 8:
889
 
#line 207 "plural.y"
 
1050
#line 183 "plural.y"
890
1051
{
891
1052
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
892
 
          ;
893
 
    break;}
 
1053
          }
 
1054
    break;
894
1055
case 9:
895
 
#line 211 "plural.y"
 
1056
#line 187 "plural.y"
896
1057
{
897
1058
            yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
898
 
          ;
899
 
    break;}
 
1059
          }
 
1060
    break;
900
1061
case 10:
901
 
#line 215 "plural.y"
 
1062
#line 191 "plural.y"
902
1063
{
903
1064
            yyval.exp = new_exp_0 (var);
904
 
          ;
905
 
    break;}
 
1065
          }
 
1066
    break;
906
1067
case 11:
907
 
#line 219 "plural.y"
 
1068
#line 195 "plural.y"
908
1069
{
909
1070
            if ((yyval.exp = new_exp_0 (num)) != NULL)
910
1071
              yyval.exp->val.num = yyvsp[0].num;
911
 
          ;
912
 
    break;}
 
1072
          }
 
1073
    break;
913
1074
case 12:
914
 
#line 224 "plural.y"
 
1075
#line 200 "plural.y"
915
1076
{
916
1077
            yyval.exp = yyvsp[-1].exp;
917
 
          ;
918
 
    break;}
 
1078
          }
 
1079
    break;
919
1080
}
920
 
   /* the action file gets copied in in place of this dollarsign */
921
 
#line 543 "/usr/local/share/bison.simple"
 
1081
 
 
1082
#line 705 "/usr/local/share/bison/bison.simple"
 
1083
 
922
1084
 
923
1085
  yyvsp -= yylen;
924
1086
  yyssp -= yylen;
925
 
#ifdef YYLSP_NEEDED
 
1087
#if YYLSP_NEEDED
926
1088
  yylsp -= yylen;
927
1089
#endif
928
1090
 
929
 
#if YYDEBUG != 0
 
1091
#if YYDEBUG
930
1092
  if (yydebug)
931
1093
    {
932
 
      short *ssp1 = yyss - 1;
933
 
      fprintf (stderr, "state stack now");
934
 
      while (ssp1 != yyssp)
935
 
        fprintf (stderr, " %d", *++ssp1);
936
 
      fprintf (stderr, "\n");
 
1094
      short *yyssp1 = yyss - 1;
 
1095
      YYFPRINTF (stderr, "state stack now");
 
1096
      while (yyssp1 != yyssp)
 
1097
        YYFPRINTF (stderr, " %d", *++yyssp1);
 
1098
      YYFPRINTF (stderr, "\n");
937
1099
    }
938
1100
#endif
939
1101
 
940
1102
  *++yyvsp = yyval;
941
 
 
942
 
#ifdef YYLSP_NEEDED
943
 
  yylsp++;
944
 
  if (yylen == 0)
945
 
    {
946
 
      yylsp->first_line = yylloc.first_line;
947
 
      yylsp->first_column = yylloc.first_column;
948
 
      yylsp->last_line = (yylsp-1)->last_line;
949
 
      yylsp->last_column = (yylsp-1)->last_column;
950
 
      yylsp->text = 0;
951
 
    }
952
 
  else
953
 
    {
954
 
      yylsp->last_line = (yylsp+yylen-1)->last_line;
955
 
      yylsp->last_column = (yylsp+yylen-1)->last_column;
956
 
    }
 
1103
#if YYLSP_NEEDED
 
1104
  *++yylsp = yyloc;
957
1105
#endif
958
1106
 
959
 
  /* Now "shift" the result of the reduction.
960
 
     Determine what state that goes to,
961
 
     based on the state we popped back to
962
 
     and the rule number reduced by.  */
 
1107
  /* Now `shift' the result of the reduction.  Determine what state
 
1108
     that goes to, based on the state we popped back to and the rule
 
1109
     number reduced by.  */
963
1110
 
964
1111
  yyn = yyr1[yyn];
965
1112
 
971
1118
 
972
1119
  goto yynewstate;
973
1120
 
974
 
yyerrlab:   /* here on detecting error */
975
1121
 
976
 
  if (! yyerrstatus)
977
 
    /* If not already recovering from an error, report this error.  */
 
1122
/*------------------------------------.
 
1123
| yyerrlab -- here on detecting error |
 
1124
`------------------------------------*/
 
1125
yyerrlab:
 
1126
  /* If not already recovering from an error, report this error.  */
 
1127
  if (!yyerrstatus)
978
1128
    {
979
1129
      ++yynerrs;
980
1130
 
983
1133
 
984
1134
      if (yyn > YYFLAG && yyn < YYLAST)
985
1135
        {
986
 
          int size = 0;
987
 
          char *msg;
988
 
          int x, count;
 
1136
          YYSIZE_T yysize = 0;
 
1137
          char *yymsg;
 
1138
          int yyx, yycount;
989
1139
 
990
 
          count = 0;
991
 
          /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
992
 
          for (x = (yyn < 0 ? -yyn : 0);
993
 
               x < (sizeof(yytname) / sizeof(char *)); x++)
994
 
            if (yycheck[x + yyn] == x)
995
 
              size += strlen(yytname[x]) + 15, count++;
996
 
          msg = (char *) malloc(size + 15);
997
 
          if (msg != 0)
 
1140
          yycount = 0;
 
1141
          /* Start YYX at -YYN if negative to avoid negative indexes in
 
1142
             YYCHECK.  */
 
1143
          for (yyx = yyn < 0 ? -yyn : 0;
 
1144
               yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
 
1145
            if (yycheck[yyx + yyn] == yyx)
 
1146
              yysize += yystrlen (yytname[yyx]) + 15, yycount++;
 
1147
          yysize += yystrlen ("parse error, unexpected ") + 1;
 
1148
          yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
 
1149
          yymsg = (char *) YYSTACK_ALLOC (yysize);
 
1150
          if (yymsg != 0)
998
1151
            {
999
 
              strcpy(msg, "parse error");
 
1152
              char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
 
1153
              yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1000
1154
 
1001
 
              if (count < 5)
 
1155
              if (yycount < 5)
1002
1156
                {
1003
 
                  count = 0;
1004
 
                  for (x = (yyn < 0 ? -yyn : 0);
1005
 
                       x < (sizeof(yytname) / sizeof(char *)); x++)
1006
 
                    if (yycheck[x + yyn] == x)
 
1157
                  yycount = 0;
 
1158
                  for (yyx = yyn < 0 ? -yyn : 0;
 
1159
                       yyx < (int) (sizeof (yytname) / sizeof (char *));
 
1160
                       yyx++)
 
1161
                    if (yycheck[yyx + yyn] == yyx)
1007
1162
                      {
1008
 
                        strcat(msg, count == 0 ? ", expecting `" : " or `");
1009
 
                        strcat(msg, yytname[x]);
1010
 
                        strcat(msg, "'");
1011
 
                        count++;
 
1163
                        const char *yyq = ! yycount ? ", expecting " : " or ";
 
1164
                        yyp = yystpcpy (yyp, yyq);
 
1165
                        yyp = yystpcpy (yyp, yytname[yyx]);
 
1166
                        yycount++;
1012
1167
                      }
1013
1168
                }
1014
 
              yyerror(msg);
1015
 
              free(msg);
 
1169
              yyerror (yymsg);
 
1170
              YYSTACK_FREE (yymsg);
1016
1171
            }
1017
1172
          else
1018
 
            yyerror ("parse error; also virtual memory exceeded");
 
1173
            yyerror ("parse error; also virtual memory exhausted");
1019
1174
        }
1020
1175
      else
1021
 
#endif /* YYERROR_VERBOSE */
1022
 
        yyerror("parse error");
 
1176
#endif /* defined (YYERROR_VERBOSE) */
 
1177
        yyerror ("parse error");
1023
1178
    }
1024
 
 
1025
1179
  goto yyerrlab1;
1026
 
yyerrlab1:   /* here on error raised explicitly by an action */
1027
 
 
 
1180
 
 
1181
 
 
1182
/*--------------------------------------------------.
 
1183
| yyerrlab1 -- error raised explicitly by an action |
 
1184
`--------------------------------------------------*/
 
1185
yyerrlab1:
1028
1186
  if (yyerrstatus == 3)
1029
1187
    {
1030
 
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
 
1188
      /* If just tried and failed to reuse lookahead token after an
 
1189
         error, discard it.  */
1031
1190
 
1032
1191
      /* return failure if at end of input */
1033
1192
      if (yychar == YYEOF)
1034
1193
        YYABORT;
1035
 
 
1036
 
#if YYDEBUG != 0
1037
 
      if (yydebug)
1038
 
        fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
1039
 
#endif
1040
 
 
 
1194
      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
 
1195
                  yychar, yytname[yychar1]));
1041
1196
      yychar = YYEMPTY;
1042
1197
    }
1043
1198
 
1044
 
  /* Else will try to reuse lookahead token
1045
 
     after shifting the error token.  */
 
1199
  /* Else will try to reuse lookahead token after shifting the error
 
1200
     token.  */
1046
1201
 
1047
1202
  yyerrstatus = 3;              /* Each real token shifted decrements this */
1048
1203
 
1049
1204
  goto yyerrhandle;
1050
1205
 
1051
 
yyerrdefault:  /* current state does not do anything special for the error token. */
1052
1206
 
 
1207
/*-------------------------------------------------------------------.
 
1208
| yyerrdefault -- current state does not do anything special for the |
 
1209
| error token.                                                       |
 
1210
`-------------------------------------------------------------------*/
 
1211
yyerrdefault:
1053
1212
#if 0
1054
1213
  /* This is wrong; only states that explicitly want error tokens
1055
1214
     should shift them.  */
1056
 
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
1057
 
  if (yyn) goto yydefault;
 
1215
 
 
1216
  /* If its default is to accept any token, ok.  Otherwise pop it.  */
 
1217
  yyn = yydefact[yystate];
 
1218
  if (yyn)
 
1219
    goto yydefault;
1058
1220
#endif
1059
1221
 
1060
 
yyerrpop:   /* pop the current state because it cannot handle the error token */
1061
1222
 
1062
 
  if (yyssp == yyss) YYABORT;
 
1223
/*---------------------------------------------------------------.
 
1224
| yyerrpop -- pop the current state because it cannot handle the |
 
1225
| error token                                                    |
 
1226
`---------------------------------------------------------------*/
 
1227
yyerrpop:
 
1228
  if (yyssp == yyss)
 
1229
    YYABORT;
1063
1230
  yyvsp--;
1064
1231
  yystate = *--yyssp;
1065
 
#ifdef YYLSP_NEEDED
 
1232
#if YYLSP_NEEDED
1066
1233
  yylsp--;
1067
1234
#endif
1068
1235
 
1069
 
#if YYDEBUG != 0
 
1236
#if YYDEBUG
1070
1237
  if (yydebug)
1071
1238
    {
1072
 
      short *ssp1 = yyss - 1;
1073
 
      fprintf (stderr, "Error: state stack now");
1074
 
      while (ssp1 != yyssp)
1075
 
        fprintf (stderr, " %d", *++ssp1);
1076
 
      fprintf (stderr, "\n");
 
1239
      short *yyssp1 = yyss - 1;
 
1240
      YYFPRINTF (stderr, "Error: state stack now");
 
1241
      while (yyssp1 != yyssp)
 
1242
        YYFPRINTF (stderr, " %d", *++yyssp1);
 
1243
      YYFPRINTF (stderr, "\n");
1077
1244
    }
1078
1245
#endif
1079
1246
 
 
1247
/*--------------.
 
1248
| yyerrhandle.  |
 
1249
`--------------*/
1080
1250
yyerrhandle:
1081
 
 
1082
1251
  yyn = yypact[yystate];
1083
1252
  if (yyn == YYFLAG)
1084
1253
    goto yyerrdefault;
1101
1270
  if (yyn == YYFINAL)
1102
1271
    YYACCEPT;
1103
1272
 
1104
 
#if YYDEBUG != 0
1105
 
  if (yydebug)
1106
 
    fprintf(stderr, "Shifting error token, ");
1107
 
#endif
 
1273
  YYDPRINTF ((stderr, "Shifting error token, "));
1108
1274
 
1109
1275
  *++yyvsp = yylval;
1110
 
#ifdef YYLSP_NEEDED
 
1276
#if YYLSP_NEEDED
1111
1277
  *++yylsp = yylloc;
1112
1278
#endif
1113
1279
 
1114
1280
  yystate = yyn;
1115
1281
  goto yynewstate;
1116
1282
 
1117
 
 yyacceptlab:
1118
 
  /* YYACCEPT comes here.  */
1119
 
  if (yyfree_stacks)
1120
 
    {
1121
 
      free (yyss);
1122
 
      free (yyvs);
1123
 
#ifdef YYLSP_NEEDED
1124
 
      free (yyls);
1125
 
#endif
1126
 
    }
1127
 
  return 0;
1128
 
 
1129
 
 yyabortlab:
1130
 
  /* YYABORT comes here.  */
1131
 
  if (yyfree_stacks)
1132
 
    {
1133
 
      free (yyss);
1134
 
      free (yyvs);
1135
 
#ifdef YYLSP_NEEDED
1136
 
      free (yyls);
1137
 
#endif
1138
 
    }
1139
 
  return 1;
 
1283
 
 
1284
/*-------------------------------------.
 
1285
| yyacceptlab -- YYACCEPT comes here.  |
 
1286
`-------------------------------------*/
 
1287
yyacceptlab:
 
1288
  yyresult = 0;
 
1289
  goto yyreturn;
 
1290
 
 
1291
/*-----------------------------------.
 
1292
| yyabortlab -- YYABORT comes here.  |
 
1293
`-----------------------------------*/
 
1294
yyabortlab:
 
1295
  yyresult = 1;
 
1296
  goto yyreturn;
 
1297
 
 
1298
/*---------------------------------------------.
 
1299
| yyoverflowab -- parser overflow comes here.  |
 
1300
`---------------------------------------------*/
 
1301
yyoverflowlab:
 
1302
  yyerror ("parser stack overflow");
 
1303
  yyresult = 2;
 
1304
  /* Fall through.  */
 
1305
 
 
1306
yyreturn:
 
1307
#ifndef yyoverflow
 
1308
  if (yyss != yyssa)
 
1309
    YYSTACK_FREE (yyss);
 
1310
#endif
 
1311
  return yyresult;
1140
1312
}
1141
 
#line 229 "plural.y"
 
1313
#line 205 "plural.y"
1142
1314
 
1143
1315
 
1144
1316
void
1145
1317
internal_function
1146
 
FREE_EXPRESSION (exp)
1147
 
     struct expression *exp;
 
1318
FREE_EXPRESSION (struct expression *exp)
1148
1319
{
1149
1320
  if (exp == NULL)
1150
1321
    return;
1170
1341
 
1171
1342
 
1172
1343
static int
1173
 
yylex (lval, pexp)
1174
 
     YYSTYPE *lval;
1175
 
     const char **pexp;
 
1344
yylex (YYSTYPE *lval, const char **pexp)
1176
1345
{
1177
1346
  const char *exp = *pexp;
1178
1347
  int result;
1315
1484
 
1316
1485
 
1317
1486
static void
1318
 
yyerror (str)
1319
 
     const char *str;
 
1487
yyerror (const char *str)
1320
1488
{
1321
1489
  /* Do nothing.  We don't print error messages here.  */
1322
1490
}