148
254
return new_exp (3, op, args);
158
#define YYFLAG -32768
161
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
162
#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
164
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
165
static const char yytranslate[] =
167
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
168
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
169
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
170
2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
171
14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
172
2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
173
2, 2, 2, 3, 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
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
177
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
178
13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
179
2, 2, 2, 2, 4, 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, 2, 2, 2, 2,
191
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
192
2, 2, 2, 2, 2, 2, 1, 6, 7, 8,
197
static const short yyprhs[] =
199
0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
202
static const short yyrhs[] =
204
17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
205
17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
206
17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
207
17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
214
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
215
static const short yyrline[] =
217
0, 152, 160, 164, 168, 172, 176, 180, 184, 188,
223
#if (YYDEBUG) || defined YYERROR_VERBOSE
225
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
226
static const char *const yytname[] =
228
"$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
229
"ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
234
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
235
static const short yyr1[] =
237
0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
241
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
242
static const short yyr2[] =
244
0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
248
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
249
doesn't specify something else to do. Zero means the default is an
251
static const short yydefact[] =
253
0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
254
0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
255
6, 7, 8, 0, 2, 0, 0, 0
258
static const short yydefgoto[] =
263
static const short yypact[] =
265
-9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
266
-9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
267
26, -3,-32768, -9, 34, 21, 53,-32768
270
static const short yypgoto[] =
279
static const short yytable[] =
281
6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
282
19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
283
14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
284
11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
285
11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
289
static const short yycheck[] =
291
1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
292
11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
293
9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
294
6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
295
6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
300
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
301
#line 3 "bison.simple"
303
/* Skeleton output parser for bison,
305
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
308
This program is free software; you can redistribute it and/or modify
309
it under the terms of the GNU General Public License as published by
310
the Free Software Foundation; either version 2, or (at your option)
313
This program is distributed in the hope that it will be useful,
314
but WITHOUT ANY WARRANTY; without even the implied warranty of
315
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
316
GNU General Public License for more details.
318
You should have received a copy of the GNU General Public License
319
along with this program; if not, write to the Free Software
320
Foundation, Inc., 59 Temple Place - Suite 330,
321
Boston, MA 02111-1307, USA. */
323
/* As a special exception, when this file is copied by Bison into a
324
Bison output file, you may use that output file without restriction.
325
This special exception was added by the Free Software Foundation
326
in version 1.24 of Bison. */
328
/* This is the parser code that is written into each bison parser when
329
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. */
333
/* All symbols defined below should begin with yy or YY, to avoid
334
infringing on user name space. This should be done even for local
335
variables, as they might otherwise be expanded by user macros.
336
There are some unavoidable exceptions within include files to
337
define necessary library symbols; they are noted "INFRINGES ON
338
USER NAME SPACE" below. */
340
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
259
/* Line 216 of yacc.c. */
267
typedef YYTYPE_UINT8 yytype_uint8;
269
typedef unsigned char yytype_uint8;
273
typedef YYTYPE_INT8 yytype_int8;
274
#elif (defined __STDC__ || defined __C99__FUNC__ \
275
|| defined __cplusplus || defined _MSC_VER)
276
typedef signed char yytype_int8;
278
typedef short int yytype_int8;
282
typedef YYTYPE_UINT16 yytype_uint16;
284
typedef unsigned short int yytype_uint16;
288
typedef YYTYPE_INT16 yytype_int16;
290
typedef short int yytype_int16;
294
# ifdef __SIZE_TYPE__
295
# define YYSIZE_T __SIZE_TYPE__
296
# elif defined size_t
297
# define YYSIZE_T size_t
298
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
299
|| defined __cplusplus || defined _MSC_VER)
300
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
301
# define YYSIZE_T size_t
303
# define YYSIZE_T unsigned int
307
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
312
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
313
# define YY_(msgid) dgettext ("bison-runtime", msgid)
317
# define YY_(msgid) msgid
321
/* Suppress unused-variable warnings by "using" E. */
322
#if ! defined lint || defined __GNUC__
323
# define YYUSE(e) ((void) (e))
325
# define YYUSE(e) /* empty */
328
/* Identity function, used to suppress warnings about constant conditions. */
332
#if (defined __STDC__ || defined __C99__FUNC__ \
333
|| defined __cplusplus || defined _MSC_VER)
346
#if ! defined yyoverflow || YYERROR_VERBOSE
342
348
/* The parser invokes alloca or malloc; define the necessary symbols. */
344
# if YYSTACK_USE_ALLOCA
345
# define YYSTACK_ALLOC alloca
347
# ifndef YYSTACK_USE_ALLOCA
348
# if defined (alloca) || defined (_ALLOCA_H)
350
# ifdef YYSTACK_USE_ALLOCA
351
# if YYSTACK_USE_ALLOCA
353
# define YYSTACK_ALLOC __builtin_alloca
354
# elif defined __BUILTIN_VA_ARG_INCR
355
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
357
# define YYSTACK_ALLOC __alloca
358
# elif defined _MSC_VER
359
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
360
# define alloca _alloca
349
362
# define YYSTACK_ALLOC alloca
352
# define YYSTACK_ALLOC __builtin_alloca
363
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
364
|| defined __cplusplus || defined _MSC_VER)
365
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
358
374
# ifdef YYSTACK_ALLOC
359
/* Pacify GCC's `empty if-body' warning. */
360
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
375
/* Pacify GCC's `empty if-body' warning. */
376
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
377
# ifndef YYSTACK_ALLOC_MAXIMUM
378
/* The OS might guarantee only one guard page at the bottom of the stack,
379
and a page size can be as small as 4096 bytes. So we cannot safely
380
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
381
to allow for a few compiler-allocated temporary stack slots. */
382
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
362
# if defined (__STDC__) || defined (__cplusplus)
385
# define YYSTACK_ALLOC YYMALLOC
386
# define YYSTACK_FREE YYFREE
387
# ifndef YYSTACK_ALLOC_MAXIMUM
388
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
390
# if (defined __cplusplus && ! defined _STDLIB_H \
391
&& ! ((defined YYMALLOC || defined malloc) \
392
&& (defined YYFREE || defined free)))
363
393
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
364
# define YYSIZE_T size_t
366
# define YYSTACK_ALLOC malloc
367
# define YYSTACK_FREE free
399
# define YYMALLOC malloc
400
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
401
|| defined __cplusplus || defined _MSC_VER)
402
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
407
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
408
|| defined __cplusplus || defined _MSC_VER)
409
void free (void *); /* INFRINGES ON USER NAME SPACE */
369
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
372
#if (! defined (yyoverflow) \
373
&& (! defined (__cplusplus) \
374
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
413
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
416
#if (! defined yyoverflow \
417
&& (! defined __cplusplus \
418
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
376
420
/* A type that is properly aligned for any stack member. */
386
427
/* The size of the maximum gap between one aligned stack and the next. */
387
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
428
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
389
430
/* The size of an array large to enough to hold all stacks, each with
392
# define YYSTACK_BYTES(N) \
393
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
394
+ 2 * YYSTACK_GAP_MAX)
396
# define YYSTACK_BYTES(N) \
397
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
432
# define YYSTACK_BYTES(N) \
433
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
434
+ YYSTACK_GAP_MAXIMUM)
401
436
/* Copy COUNT objects from FROM to TO. The source and destination do
439
# if defined __GNUC__ && 1 < __GNUC__
405
440
# define YYCOPY(To, From, Count) \
406
441
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
408
443
# define YYCOPY(To, From, Count) \
411
register YYSIZE_T yyi; \
412
447
for (yyi = 0; yyi < (Count); yyi++) \
413
448
(To)[yyi] = (From)[yyi]; \
427
462
YYSIZE_T yynewbytes; \
428
463
YYCOPY (&yyptr->Stack, Stack, yysize); \
429
464
Stack = &yyptr->Stack; \
430
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
465
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
431
466
yyptr += yynewbytes / sizeof (*yyptr); \
438
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
439
# define YYSIZE_T __SIZE_TYPE__
441
#if ! defined (YYSIZE_T) && defined (size_t)
442
# define YYSIZE_T size_t
444
#if ! defined (YYSIZE_T)
445
# if defined (__STDC__) || defined (__cplusplus)
446
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
447
# define YYSIZE_T size_t
472
/* YYFINAL -- State number of the termination state. */
474
/* YYLAST -- Last index in YYTABLE. */
477
/* YYNTOKENS -- Number of terminals. */
479
/* YYNNTS -- Number of nonterminals. */
481
/* YYNRULES -- Number of rules. */
483
/* YYNRULES -- Number of states. */
486
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
488
#define YYMAXUTOK 262
490
#define YYTRANSLATE(YYX) \
491
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
493
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
494
static const yytype_uint8 yytranslate[] =
496
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
497
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
499
2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
500
14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
501
2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
502
2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
503
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507
13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508
2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
509
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
512
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
515
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
516
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521
2, 2, 2, 2, 2, 2, 1, 2, 6, 7,
526
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
528
static const yytype_uint8 yyprhs[] =
530
0, 0, 3, 5, 11, 15, 19, 23, 27, 31,
534
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
535
static const yytype_int8 yyrhs[] =
537
17, 0, -1, 18, -1, 18, 3, 18, 12, 18,
538
-1, 18, 4, 18, -1, 18, 5, 18, -1, 18,
539
6, 18, -1, 18, 7, 18, -1, 18, 8, 18,
540
-1, 18, 9, 18, -1, 10, 18, -1, 13, -1,
541
11, -1, 14, 18, 15, -1
544
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
545
static const yytype_uint8 yyrline[] =
547
0, 154, 154, 162, 166, 170, 174, 178, 182, 186,
552
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
553
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
554
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
555
static const char *const yytname[] =
557
"$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
558
"ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
559
"$accept", "start", "exp", 0
564
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
566
static const yytype_uint16 yytoknum[] =
568
0, 256, 257, 63, 124, 38, 258, 259, 260, 261,
569
33, 262, 58, 110, 40, 41
450
#if ! defined (YYSIZE_T)
451
# define YYSIZE_T unsigned int
573
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
574
static const yytype_uint8 yyr1[] =
576
0, 16, 17, 18, 18, 18, 18, 18, 18, 18,
580
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
581
static const yytype_uint8 yyr2[] =
583
0, 2, 1, 5, 3, 3, 3, 3, 3, 3,
587
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
588
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
589
means the default is an error. */
590
static const yytype_uint8 yydefact[] =
592
0, 0, 12, 11, 0, 0, 2, 10, 0, 1,
593
0, 0, 0, 0, 0, 0, 0, 13, 0, 4,
597
/* YYDEFGOTO[NTERM-NUM]. */
598
static const yytype_int8 yydefgoto[] =
603
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
605
#define YYPACT_NINF -10
606
static const yytype_int8 yypact[] =
608
-9, -9, -10, -10, -9, 8, 36, -10, 13, -10,
609
-9, -9, -9, -9, -9, -9, -9, -10, 26, 41,
610
45, 18, -2, 14, -10, -9, 36
613
/* YYPGOTO[NTERM-NUM]. */
614
static const yytype_int8 yypgoto[] =
619
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
620
positive, shift that token. If negative, reduce the rule which
621
number is the opposite. If zero, do what YYDEFACT says.
622
If YYTABLE_NINF, syntax error. */
623
#define YYTABLE_NINF -1
624
static const yytype_uint8 yytable[] =
626
7, 1, 2, 8, 3, 4, 15, 16, 9, 18,
627
19, 20, 21, 22, 23, 24, 10, 11, 12, 13,
628
14, 15, 16, 16, 26, 14, 15, 16, 17, 10,
629
11, 12, 13, 14, 15, 16, 0, 0, 25, 10,
630
11, 12, 13, 14, 15, 16, 12, 13, 14, 15,
634
static const yytype_int8 yycheck[] =
636
1, 10, 11, 4, 13, 14, 8, 9, 0, 10,
637
11, 12, 13, 14, 15, 16, 3, 4, 5, 6,
638
7, 8, 9, 9, 25, 7, 8, 9, 15, 3,
639
4, 5, 6, 7, 8, 9, -1, -1, 12, 3,
640
4, 5, 6, 7, 8, 9, 5, 6, 7, 8,
644
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
645
symbol of state STATE-NUM. */
646
static const yytype_uint8 yystos[] =
648
0, 10, 11, 13, 14, 17, 18, 18, 18, 0,
649
3, 4, 5, 6, 7, 8, 9, 15, 18, 18,
650
18, 18, 18, 18, 18, 12, 18
454
653
#define yyerrok (yyerrstatus = 0)
455
654
#define yyclearin (yychar = YYEMPTY)
458
658
#define YYACCEPT goto yyacceptlab
459
#define YYABORT goto yyabortlab
460
#define YYERROR goto yyerrlab1
659
#define YYABORT goto yyabortlab
660
#define YYERROR goto yyerrorlab
461
663
/* Like YYERROR except do call yyerror. This remains here temporarily
462
664
to ease the transition to the new meaning of YYERROR, for GCC.
463
665
Once GCC version 2 has supplanted version 1, this can go. */
464
667
#define YYFAIL goto yyerrlab
465
669
#define YYRECOVERING() (!!yyerrstatus)
466
671
#define YYBACKUP(Token, Value) \
468
673
if (yychar == YYEMPTY && yylen == 1) \
470
675
yychar = (Token); \
471
676
yylval = (Value); \
472
yychar1 = YYTRANSLATE (yychar); \
677
yytoken = YYTRANSLATE (yychar); \
478
yyerror ("syntax error: cannot back up"); \
683
yyerror (YY_("syntax error: cannot back up")); \
483
689
#define YYTERROR 1
484
690
#define YYERRCODE 256
487
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
490
When YYLLOC_DEFAULT is run, CURRENT is set the location of the
491
first token. By default, to implement support for ranges, extend
492
its range to the last symbol. */
693
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
694
If N is 0, then set CURRENT to the empty location which ends
695
the previous symbol: RHS[0] (always defined). */
697
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
494
698
#ifndef YYLLOC_DEFAULT
495
# define YYLLOC_DEFAULT(Current, Rhs, N) \
496
Current.last_line = Rhs[N].last_line; \
497
Current.last_column = Rhs[N].last_column;
699
# define YYLLOC_DEFAULT(Current, Rhs, N) \
703
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
704
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
705
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
706
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
710
(Current).first_line = (Current).last_line = \
711
YYRHSLOC (Rhs, 0).last_line; \
712
(Current).first_column = (Current).last_column = \
713
YYRHSLOC (Rhs, 0).last_column; \
719
/* YY_LOCATION_PRINT -- Print the location on the stream.
720
This macro was not mandated originally: define only if we know
721
we won't break user code: when these are the locations we know. */
723
#ifndef YY_LOCATION_PRINT
724
# if YYLTYPE_IS_TRIVIAL
725
# define YY_LOCATION_PRINT(File, Loc) \
726
fprintf (File, "%d.%d-%d.%d", \
727
(Loc).first_line, (Loc).first_column, \
728
(Loc).last_line, (Loc).last_column)
730
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
501
735
/* YYLEX -- calling `yylex' with the right arguments. */
506
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
508
# define YYLEX yylex (&yylval, &yylloc)
510
# else /* !YYLSP_NEEDED */
512
# define YYLEX yylex (&yylval, YYLEX_PARAM)
514
# define YYLEX yylex (&yylval)
516
# endif /* !YYLSP_NEEDED */
518
# define YYLEX yylex ()
738
# define YYLEX yylex (&yylval, YYLEX_PARAM)
740
# define YYLEX yylex (&yylval)
522
743
/* Enable debugging if requested. */
976
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
977
quotes and backslashes, so that it's suitable for yyerror. The
978
heuristic is that double-quoting is unnecessary unless the string
979
contains an apostrophe, a comma, or backslash (other than
980
backslash-backslash). YYSTR is taken from yytname. If YYRES is
981
null, do not copy; instead, return the length of what the result
984
yytnamerr (char *yyres, const char *yystr)
989
char const *yyp = yystr;
996
goto do_not_strip_quotes;
1000
goto do_not_strip_quotes;
1013
do_not_strip_quotes: ;
1017
return yystrlen (yystr);
1019
return yystpcpy (yyres, yystr) - yyres;
1023
/* Copy into YYRESULT an error message about the unexpected token
1024
YYCHAR while in state YYSTATE. Return the number of bytes copied,
1025
including the terminating null byte. If YYRESULT is null, do not
1026
copy anything; just return the number of bytes that would be
1027
copied. As a special case, return 0 if an ordinary "syntax error"
1028
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1029
size calculation. */
1031
yysyntax_error (char *yyresult, int yystate, int yychar)
1033
int yyn = yypact[yystate];
1035
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1039
int yytype = YYTRANSLATE (yychar);
1040
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1041
YYSIZE_T yysize = yysize0;
1043
int yysize_overflow = 0;
1044
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1045
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1049
/* This is so xgettext sees the translatable formats that are
1050
constructed on the fly. */
1051
YY_("syntax error, unexpected %s");
1052
YY_("syntax error, unexpected %s, expecting %s");
1053
YY_("syntax error, unexpected %s, expecting %s or %s");
1054
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1055
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1059
static char const yyunexpected[] = "syntax error, unexpected %s";
1060
static char const yyexpecting[] = ", expecting %s";
1061
static char const yyor[] = " or %s";
1062
char yyformat[sizeof yyunexpected
1063
+ sizeof yyexpecting - 1
1064
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1065
* (sizeof yyor - 1))];
1066
char const *yyprefix = yyexpecting;
1068
/* Start YYX at -YYN if negative to avoid negative indexes in
1070
int yyxbegin = yyn < 0 ? -yyn : 0;
1072
/* Stay within bounds of both yycheck and yytname. */
1073
int yychecklim = YYLAST - yyn + 1;
1074
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1077
yyarg[0] = yytname[yytype];
1078
yyfmt = yystpcpy (yyformat, yyunexpected);
1080
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1081
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1083
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1087
yyformat[sizeof yyunexpected - 1] = '\0';
1090
yyarg[yycount++] = yytname[yyx];
1091
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1092
yysize_overflow |= (yysize1 < yysize);
1094
yyfmt = yystpcpy (yyfmt, yyprefix);
1098
yyf = YY_(yyformat);
1099
yysize1 = yysize + yystrlen (yyf);
1100
yysize_overflow |= (yysize1 < yysize);
1103
if (yysize_overflow)
1104
return YYSIZE_MAXIMUM;
1108
/* Avoid sprintf, as that infringes on the user's name space.
1109
Don't have undefined behavior even if the translation
1110
produced a string with the wrong number of "%s"s. */
1111
char *yyp = yyresult;
1113
while ((*yyp = *yyf) != '\0')
1115
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1117
yyp += yytnamerr (yyp, yyarg[yyi++]);
1130
#endif /* YYERROR_VERBOSE */
1133
/*-----------------------------------------------.
1134
| Release the memory associated to this symbol. |
1135
`-----------------------------------------------*/
1138
#if (defined __STDC__ || defined __C99__FUNC__ \
1139
|| defined __cplusplus || defined _MSC_VER)
1141
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1144
yydestruct (yymsg, yytype, yyvaluep)
1154
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
614
#line 315 "bison.simple"
617
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
618
into yyparse. The argument should have type void *.
619
It should actually point to an object.
620
Grammar actions can access the variable by casting it
621
to the proper pointer type. */
1165
/* Prevent warnings from -Wmissing-prototypes. */
623
1167
#ifdef YYPARSE_PARAM
624
# if defined (__STDC__) || defined (__cplusplus)
625
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
626
# define YYPARSE_PARAM_DECL
628
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
629
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
631
#else /* !YYPARSE_PARAM */
632
# define YYPARSE_PARAM_ARG
633
# define YYPARSE_PARAM_DECL
634
#endif /* !YYPARSE_PARAM */
636
/* Prevent warning if -Wstrict-prototypes. */
638
# ifdef YYPARSE_PARAM
639
int yyparse (void *);
1168
#if defined __STDC__ || defined __cplusplus
1169
int yyparse (void *YYPARSE_PARAM);
1173
#else /* ! YYPARSE_PARAM */
1174
#if defined __STDC__ || defined __cplusplus
641
1175
int yyparse (void);
645
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
646
variables are global, or local to YYPARSE. */
648
#define YY_DECL_NON_LSP_VARIABLES \
649
/* The lookahead symbol. */ \
652
/* The semantic value of the lookahead symbol. */ \
655
/* Number of parse errors so far. */ \
1179
#endif /* ! YYPARSE_PARAM */
1190
#ifdef YYPARSE_PARAM
1191
#if (defined __STDC__ || defined __C99__FUNC__ \
1192
|| defined __cplusplus || defined _MSC_VER)
1194
yyparse (void *YYPARSE_PARAM)
1197
yyparse (YYPARSE_PARAM)
1198
void *YYPARSE_PARAM;
1200
#else /* ! YYPARSE_PARAM */
1201
#if (defined __STDC__ || defined __C99__FUNC__ \
1202
|| defined __cplusplus || defined _MSC_VER)
1212
/* The look-ahead symbol. */
1215
/* The semantic value of the look-ahead symbol. */
1218
/* Number of syntax errors so far. */
659
# define YY_DECL_VARIABLES \
660
YY_DECL_NON_LSP_VARIABLES \
662
/* Location data for the lookahead symbol. */ \
665
# define YY_DECL_VARIABLES \
666
YY_DECL_NON_LSP_VARIABLES
670
/* If nonreentrant, generate the variables here. */
677
yyparse (YYPARSE_PARAM_ARG)
680
/* If reentrant, generate the variables here. */
685
register int yystate;
688
1224
/* Number of tokens to shift before error messages enabled. */
689
1225
int yyerrstatus;
690
/* Lookahead token as an internal (translated) token number. */
1226
/* Look-ahead token as an internal (translated) token number. */
1229
/* Buffer for error messages, and its allocated size. */
1231
char *yymsg = yymsgbuf;
1232
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
693
1235
/* Three stacks and their tools:
694
1236
`yyss': related to states,
1129
1585
if (!yyerrstatus)
1133
#ifdef YYERROR_VERBOSE
1134
yyn = yypact[yystate];
1136
if (yyn > YYFLAG && yyn < YYLAST)
1138
YYSIZE_T yysize = 0;
1143
/* Start YYX at -YYN if negative to avoid negative indexes in
1145
for (yyx = yyn < 0 ? -yyn : 0;
1146
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1147
if (yycheck[yyx + yyn] == yyx)
1148
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1149
yysize += yystrlen ("parse error, unexpected ") + 1;
1150
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1151
yymsg = (char *) YYSTACK_ALLOC (yysize);
1154
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1155
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1160
for (yyx = yyn < 0 ? -yyn : 0;
1161
yyx < (int) (sizeof (yytname) / sizeof (char *));
1163
if (yycheck[yyx + yyn] == yyx)
1165
const char *yyq = ! yycount ? ", expecting " : " or ";
1166
yyp = yystpcpy (yyp, yyq);
1167
yyp = yystpcpy (yyp, yytname[yyx]);
1588
#if ! YYERROR_VERBOSE
1589
yyerror (YY_("syntax error"));
1592
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1593
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1595
YYSIZE_T yyalloc = 2 * yysize;
1596
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1597
yyalloc = YYSTACK_ALLOC_MAXIMUM;
1598
if (yymsg != yymsgbuf)
1172
1599
YYSTACK_FREE (yymsg);
1175
yyerror ("parse error; also virtual memory exhausted");
1178
#endif /* defined (YYERROR_VERBOSE) */
1179
yyerror ("parse error");
1600
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1602
yymsg_alloc = yyalloc;
1606
yymsg_alloc = sizeof yymsgbuf;
1610
if (0 < yysize && yysize <= yymsg_alloc)
1612
(void) yysyntax_error (yymsg, yystate, yychar);
1617
yyerror (YY_("syntax error"));
1619
goto yyexhaustedlab;
1184
/*--------------------------------------------------.
1185
| yyerrlab1 -- error raised explicitly by an action |
1186
`--------------------------------------------------*/
1188
1627
if (yyerrstatus == 3)
1190
/* If just tried and failed to reuse lookahead token after an
1629
/* If just tried and failed to reuse look-ahead token after an
1191
1630
error, discard it. */
1193
/* return failure if at end of input */
1194
if (yychar == YYEOF)
1196
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1197
yychar, yytname[yychar1]));
1632
if (yychar <= YYEOF)
1634
/* Return failure if at end of input. */
1635
if (yychar == YYEOF)
1640
yydestruct ("Error: discarding",
1201
/* Else will try to reuse lookahead token after shifting the error
1646
/* Else will try to reuse look-ahead token after shifting the error
1204
yyerrstatus = 3; /* Each real token shifted decrements this */
1209
/*-------------------------------------------------------------------.
1210
| yyerrdefault -- current state does not do anything special for the |
1212
`-------------------------------------------------------------------*/
1215
/* This is wrong; only states that explicitly want error tokens
1216
should shift them. */
1218
/* If its default is to accept any token, ok. Otherwise pop it. */
1219
yyn = yydefact[yystate];
1225
/*---------------------------------------------------------------.
1226
| yyerrpop -- pop the current state because it cannot handle the |
1228
`---------------------------------------------------------------*/
1241
short *yyssp1 = yyss - 1;
1242
YYFPRINTF (stderr, "Error: state stack now");
1243
while (yyssp1 != yyssp)
1244
YYFPRINTF (stderr, " %d", *++yyssp1);
1245
YYFPRINTF (stderr, "\n");
1253
yyn = yypact[yystate];
1258
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1651
/*---------------------------------------------------.
1652
| yyerrorlab -- error raised explicitly by YYERROR. |
1653
`---------------------------------------------------*/
1656
/* Pacify compilers like GCC when the user code never invokes
1657
YYERROR and the label yyerrorlab therefore never appears in user
1659
if (/*CONSTCOND*/ 0)
1662
/* Do not reclaim the symbols of the rule which action triggered
1666
YY_STACK_PRINT (yyss, yyssp);
1671
/*-------------------------------------------------------------.
1672
| yyerrlab1 -- common code for both syntax error and YYERROR. |
1673
`-------------------------------------------------------------*/
1675
yyerrstatus = 3; /* Each real token shifted decrements this. */
1679
yyn = yypact[yystate];
1680
if (yyn != YYPACT_NINF)
1683
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1691
/* Pop the current state because it cannot handle the error token. */
1696
yydestruct ("Error: popping",
1697
yystos[yystate], yyvsp);
1700
YY_STACK_PRINT (yyss, yyssp);
1272
1703
if (yyn == YYFINAL)
1275
YYDPRINTF ((stderr, "Shifting error token, "));
1277
1706
*++yyvsp = yylval;
1709
/* Shift the error token. */
1710
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1283
1713
goto yynewstate;