1
/* A Bison parser, made by GNU Bison 2.5. */
1
/* A Bison parser, made by GNU Bison 2.7. */
3
3
/* Bison implementation for Yacc-like parsers in C
5
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
5
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
7
7
This program is free software: you can redistribute it and/or modify
8
8
it under the terms of the GNU General Public License as published by
164
162
# define YYERROR_VERBOSE 0
167
/* Enabling the token table. */
168
#ifndef YYTOKEN_TABLE
169
# define YYTOKEN_TABLE 0
165
/* In a future release of Bison, this section will be replaced
166
by #include "ac-parser.h". */
167
#ifndef YY_AMP_AC_YY_AC_PARSER_H_INCLUDED
168
# define YY_AMP_AC_YY_AC_PARSER_H_INCLUDED
169
/* Enabling traces. */
174
extern int amp_ac_yydebug;
174
178
#ifndef YYTOKENTYPE
339
342
# define YYLTYPE_IS_TRIVIAL 1
343
# define YYPUSH_DECLS
345
typedef struct yypstate yypstate;
346
#ifndef YYPUSH_MORE_DEFINED
347
# define YYPUSH_MORE_DEFINED
346
348
enum { YYPUSH_MORE = 4 };
348
#if defined __STDC__ || defined __cplusplus
349
int yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, YYLTYPE const *yypushed_loc, AmpAcScanner* scanner);
354
#if defined __STDC__ || defined __cplusplus
355
yypstate * yypstate_new (void);
357
yypstate * yypstate_new ();
359
#if defined __STDC__ || defined __cplusplus
360
void yypstate_delete (yypstate *yyps);
362
void yypstate_delete ();
351
typedef struct amp_ac_yypstate amp_ac_yypstate;
353
#if defined __STDC__ || defined __cplusplus
354
int amp_ac_yypush_parse (amp_ac_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, AmpAcScanner* scanner);
356
int amp_ac_yypush_parse ();
359
#if defined __STDC__ || defined __cplusplus
360
amp_ac_yypstate * amp_ac_yypstate_new (void);
362
amp_ac_yypstate * amp_ac_yypstate_new ();
364
#if defined __STDC__ || defined __cplusplus
365
void amp_ac_yypstate_delete (amp_ac_yypstate *ps);
367
void amp_ac_yypstate_delete ();
370
#endif /* !YY_AMP_AC_YY_AC_PARSER_H_INCLUDED */
367
372
/* Copy the second part of user declarations. */
370
/* Line 343 of yacc.c */
371
#line 372 "ac-parser.c"
374
/* Line 390 of yacc.c */
375
#line 376 "ac-parser.c"
421
425
# if defined YYENABLE_NLS && YYENABLE_NLS
423
427
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
424
# define YY_(msgid) dgettext ("bison-runtime", msgid)
428
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
428
# define YY_(msgid) msgid
432
# define YY_(Msgid) Msgid
432
436
/* Suppress unused-variable warnings by "using" E. */
433
437
#if ! defined lint || defined __GNUC__
434
# define YYUSE(e) ((void) (e))
438
# define YYUSE(E) ((void) (E))
436
# define YYUSE(e) /* empty */
440
# define YYUSE(E) /* empty */
439
443
/* Identity function, used to suppress warnings about constant conditions. */
443
447
#if (defined __STDC__ || defined __C99__FUNC__ \
444
448
|| defined __cplusplus || defined _MSC_VER)
545
549
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
546
/* Copy COUNT objects from FROM to TO. The source and destination do
550
/* Copy COUNT objects from SRC to DST. The source and destination do
549
553
# if defined __GNUC__ && 1 < __GNUC__
550
# define YYCOPY(To, From, Count) \
551
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
554
# define YYCOPY(Dst, Src, Count) \
555
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
553
# define YYCOPY(To, From, Count) \
557
for (yyi = 0; yyi < (Count); yyi++) \
558
(To)[yyi] = (From)[yyi]; \
557
# define YYCOPY(Dst, Src, Count) \
561
for (yyi = 0; yyi < (Count); yyi++) \
562
(Dst)[yyi] = (Src)[yyi]; \
774
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
778
#if YYDEBUG || YYERROR_VERBOSE || 0
775
779
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
776
780
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
777
781
static const char *const yytname[] =
808
812
"expression_body", "optional_spaces", "spaces", "spaces_with_eol",
809
813
"not_eol_token", "not_brace_token", "args_token", "not_operator_token",
810
814
"word_token", "any_macro", "ac_macro_without_arg_token",
811
"ac_macro_with_arg_token", "end_of_line", 0
815
"ac_macro_with_arg_token", "end_of_line", YY_NULL
1180
#define yypact_value_is_default(yystate) \
1181
((yystate) == (-288))
1184
#define yypact_value_is_default(Yystate) \
1185
(!!((Yystate) == (-288)))
1183
#define yytable_value_is_error(yytable_value) \
1187
#define yytable_value_is_error(Yytable_value) \
1186
1190
static const yytype_int16 yycheck[] =
1418
1422
#define YYRECOVERING() (!!yyerrstatus)
1420
#define YYBACKUP(Token, Value) \
1422
if (yychar == YYEMPTY && yylen == 1) \
1424
#define YYBACKUP(Token, Value) \
1426
if (yychar == YYEMPTY) \
1430
YYPOPSTACK (yylen); \
1431
1436
yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
1434
1439
while (YYID (0))
1441
/* Error token number */
1437
1442
#define YYTERROR 1
1438
1443
#define YYERRCODE 256
1442
1447
If N is 0, then set CURRENT to the empty location which ends
1443
1448
the previous symbol: RHS[0] (always defined). */
1450
#ifndef YYLLOC_DEFAULT
1451
# define YYLLOC_DEFAULT(Current, Rhs, N) \
1455
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1456
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1457
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1458
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1462
(Current).first_line = (Current).last_line = \
1463
YYRHSLOC (Rhs, 0).last_line; \
1464
(Current).first_column = (Current).last_column = \
1465
YYRHSLOC (Rhs, 0).last_column; \
1445
1470
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1446
#ifndef YYLLOC_DEFAULT
1447
# define YYLLOC_DEFAULT(Current, Rhs, N) \
1451
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1452
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1453
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1454
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1458
(Current).first_line = (Current).last_line = \
1459
YYRHSLOC (Rhs, 0).last_line; \
1460
(Current).first_column = (Current).last_column = \
1461
YYRHSLOC (Rhs, 0).last_column; \
1467
1473
/* YY_LOCATION_PRINT -- Print the location on the stream.
1471
1477
#ifndef YY_LOCATION_PRINT
1472
1478
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1473
# define YY_LOCATION_PRINT(File, Loc) \
1474
fprintf (File, "%d.%d-%d.%d", \
1475
(Loc).first_line, (Loc).first_column, \
1476
(Loc).last_line, (Loc).last_column)
1480
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1482
__attribute__((__unused__))
1483
#if (defined __STDC__ || defined __C99__FUNC__ \
1484
|| defined __cplusplus || defined _MSC_VER)
1486
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1489
yy_location_print_ (yyo, yylocp)
1491
YYLTYPE const * const yylocp;
1495
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1496
if (0 <= yylocp->first_line)
1498
res += fprintf (yyo, "%d", yylocp->first_line);
1499
if (0 <= yylocp->first_column)
1500
res += fprintf (yyo, ".%d", yylocp->first_column);
1502
if (0 <= yylocp->last_line)
1504
if (yylocp->first_line < yylocp->last_line)
1506
res += fprintf (yyo, "-%d", yylocp->last_line);
1508
res += fprintf (yyo, ".%d", end_col);
1510
else if (0 <= end_col && yylocp->first_column < end_col)
1511
res += fprintf (yyo, "-%d", end_col);
1516
# define YY_LOCATION_PRINT(File, Loc) \
1517
yy_location_print_ (File, &(Loc))
1478
1520
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1792
1835
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1793
1836
yytype_int16 *yyssp, int yytoken)
1795
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1838
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1796
1839
YYSIZE_T yysize = yysize0;
1798
1840
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1799
1841
/* Internationalized format string. */
1800
const char *yyformat = 0;
1842
const char *yyformat = YY_NULL;
1801
1843
/* Arguments of yyformat. */
1802
1844
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1803
1845
/* Number of reported tokens (one for the "unexpected", one per
1859
1901
yyarg[yycount++] = yytname[yyx];
1860
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1861
if (! (yysize <= yysize1
1862
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1903
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1904
if (! (yysize <= yysize1
1905
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1881
1925
# undef YYCASE_
1884
yysize1 = yysize + yystrlen (yyformat);
1885
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1929
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1930
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1889
1935
if (*yymsg_alloc < yysize)
1967
2014
`yyvs': related to semantic values.
1968
2015
`yyls': related to locations.
1970
Refer to the stacks thru separate pointers, to allow yyoverflow
2017
Refer to the stacks through separate pointers, to allow yyoverflow
1971
2018
to reallocate them elsewhere. */
1973
2020
/* The state stack. */
2055
2102
#if (defined __STDC__ || defined __C99__FUNC__ \
2056
2103
|| defined __cplusplus || defined _MSC_VER)
2058
yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, YYLTYPE const *yypushed_loc, AmpAcScanner* scanner)
2105
yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, YYLTYPE *yypushed_loc, AmpAcScanner* scanner)
2061
2108
yypush_parse (yyps, yypushed_char, yypushed_val, yypushed_loc, scanner)
2062
2109
yypstate *yyps;
2063
2110
int yypushed_char;
2064
2111
YYSTYPE const *yypushed_val;
2065
YYLTYPE const *yypushed_loc;
2112
YYLTYPE *yypushed_loc;
2066
2113
AmpAcScanner* scanner;
2069
2116
/* The lookahead symbol. */
2120
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
2121
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
2122
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
2123
_Pragma ("GCC diagnostic push") \
2124
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
2125
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
2126
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
2127
_Pragma ("GCC diagnostic pop")
2129
/* Default value used for initialization, for pacifying older GCCs
2130
or non-GCC compilers. */
2131
static YYSTYPE yyval_default;
2132
# define YY_INITIAL_VALUE(Value) = Value
2134
static YYLTYPE yyloc_default
2135
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2139
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2140
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2141
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
2143
#ifndef YY_INITIAL_VALUE
2144
# define YY_INITIAL_VALUE(Value) /* Nothing. */
2072
2147
/* The semantic value of the lookahead symbol. */
2148
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
2075
2150
/* Location data for the lookahead symbol. */
2151
YYLTYPE yylloc = yyloc_default;
2080
2156
/* Lookahead token as an internal (translated) token number. */
2082
2158
/* The variables used to return semantic value and location from the
2083
2159
action routines. */
2115
2190
yyerrstatus = 0;
2117
2192
yychar = YYEMPTY; /* Cause a token to be read. */
2119
/* Initialize stack pointers.
2120
Waste one element of value and location stack
2121
so that they stay on the same level as the state stack.
2122
The wasted elements are never initialized. */
2127
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2128
/* Initialize the default location before parsing starts. */
2129
yylloc.first_line = yylloc.last_line = 1;
2130
yylloc.first_column = yylloc.last_column = 1;
2193
yylsp[0] = *yypushed_loc;
2133
2194
goto yysetstate;
2135
2196
/*------------------------------------------------------------.
3363
3339
YY_STACK_PRINT (yyss, yyssp);
3342
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3366
3343
*++yyvsp = yylval;
3344
YY_IGNORE_MAYBE_UNINITIALIZED_END
3368
3346
yyerror_range[2] = yylloc;
3369
3347
/* Using YYLLOC is tempting, but would change the location of
3395
#if !defined(yyoverflow) || YYERROR_VERBOSE
3373
#if !defined yyoverflow || YYERROR_VERBOSE
3396
3374
/*-------------------------------------------------.
3397
3375
| yyexhaustedlab -- memory exhaustion comes here. |
3398
3376
`-------------------------------------------------*/