mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-12 09:17:41 +03:00
Feature: Enable use of user metadata in context
This commit is contained in:
parent
f74108e4eb
commit
a06b5f84d0
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -45,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.4.2"
|
||||
#define YYBISON_VERSION "2.5"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -74,7 +73,7 @@
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
/* Line 268 of yacc.c */
|
||||
#line 17 "template_syntax.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -127,8 +126,8 @@ extern "C"
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 132 "template_syntax.cc"
|
||||
/* Line 268 of yacc.c */
|
||||
#line 131 "template_syntax.cc"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
@ -171,7 +170,7 @@ extern "C"
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
/* Line 293 of yacc.c */
|
||||
#line 74 "template_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
@ -179,8 +178,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 184 "template_syntax.cc"
|
||||
/* Line 293 of yacc.c */
|
||||
#line 183 "template_syntax.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
@ -204,8 +203,8 @@ typedef struct YYLTYPE
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 264 of yacc.c */
|
||||
#line 209 "template_syntax.cc"
|
||||
/* Line 343 of yacc.c */
|
||||
#line 208 "template_syntax.cc"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -308,11 +307,11 @@ YYID (yyi)
|
||||
# define alloca _alloca
|
||||
# else
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@ -335,24 +334,24 @@ YYID (yyi)
|
||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
||||
# endif
|
||||
# if (defined __cplusplus && ! defined _STDLIB_H \
|
||||
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
|
||||
&& ! ((defined YYMALLOC || defined malloc) \
|
||||
&& (defined YYFREE || defined free)))
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYMALLOC
|
||||
# define YYMALLOC malloc
|
||||
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYFREE
|
||||
# define YYFREE free
|
||||
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
@ -383,23 +382,7 @@ union yyalloc
|
||||
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
||||
+ 2 * YYSTACK_GAP_MAXIMUM)
|
||||
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
# define YYCOPY_NEEDED 1
|
||||
|
||||
/* Relocate STACK from its old location to the new one. The
|
||||
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
||||
@ -419,6 +402,26 @@ union yyalloc
|
||||
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !YYCOPY_NEEDED */
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL 6
|
||||
/* YYLAST -- Last index in YYTABLE. */
|
||||
@ -528,8 +531,8 @@ static const yytype_uint8 yyr2[] =
|
||||
0, 2, 1, 2, 3, 5, 2, 3, 5
|
||||
};
|
||||
|
||||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
||||
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
||||
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE doesn't specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
static const yytype_uint8 yydefact[] =
|
||||
{
|
||||
@ -560,8 +563,7 @@ static const yytype_int8 yypgoto[] =
|
||||
|
||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule which
|
||||
number is the opposite. If zero, do what YYDEFACT says.
|
||||
If YYTABLE_NINF, syntax error. */
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
#define YYTABLE_NINF -1
|
||||
static const yytype_uint8 yytable[] =
|
||||
{
|
||||
@ -569,6 +571,12 @@ static const yytype_uint8 yytable[] =
|
||||
12, 15, 17, 16, 18, 7
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
((yystate) == (-8))
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
YYID (0)
|
||||
|
||||
static const yytype_uint8 yycheck[] =
|
||||
{
|
||||
0, 3, 9, 9, 5, 7, 4, 8, 6, 9,
|
||||
@ -616,7 +624,6 @@ do \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
yytoken = YYTRANSLATE (yychar); \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
@ -880,7 +887,6 @@ int yydebug;
|
||||
# define YYMAXDEPTH 10000
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
|
||||
@ -983,115 +989,142 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Copy into YYRESULT an error message about the unexpected token
|
||||
YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
||||
including the terminating null byte. If YYRESULT is null, do not
|
||||
copy anything; just return the number of bytes that would be
|
||||
copied. As a special case, return 0 if an ordinary "syntax error"
|
||||
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
||||
size calculation. */
|
||||
static YYSIZE_T
|
||||
yysyntax_error (char *yyresult, int yystate, int yychar)
|
||||
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
|
||||
about the unexpected token YYTOKEN for the state stack whose top is
|
||||
YYSSP.
|
||||
|
||||
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
|
||||
not large enough to hold the message. In that case, also set
|
||||
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
|
||||
required number of bytes is too large to store. */
|
||||
static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
int yyn = yypact[yystate];
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = 0;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
"expected"). */
|
||||
int yycount = 0;
|
||||
|
||||
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
||||
return 0;
|
||||
else
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider. See
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||
for details. YYERROR is fine as it does not invoke this
|
||||
function.
|
||||
- If this state is a consistent state with a default action, then
|
||||
the only way this function was invoked is if the default action
|
||||
is an error action. In that case, don't check for expected
|
||||
tokens because there are none.
|
||||
- The only way there can be no lookahead present (in yychar) is if
|
||||
this state is a consistent state with a default action. Thus,
|
||||
detecting the absence of a lookahead is sufficient to determine
|
||||
that there is no unexpected or expected token to report. In that
|
||||
case, just report a simple "syntax error".
|
||||
- Don't assume there isn't a lookahead just because this state is a
|
||||
consistent state with a default action. There might have been a
|
||||
previous inconsistent state, consistent state with a non-default
|
||||
action, or user semantic action that manipulated yychar.
|
||||
- Of course, the expected token list depends on states to have
|
||||
correct lookahead information, and it depends on the parser not
|
||||
to perform extra reductions after fetching a lookahead from the
|
||||
scanner and before detecting a syntax error. Thus, state merging
|
||||
(from LALR or IELR) and default reductions corrupt the expected
|
||||
token list. However, the list is correct for canonical LR with
|
||||
one exception: it will still contain any token that will not be
|
||||
accepted due to an error action in a later state.
|
||||
*/
|
||||
if (yytoken != YYEMPTY)
|
||||
{
|
||||
int yytype = YYTRANSLATE (yychar);
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
int yysize_overflow = 0;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
int yyx;
|
||||
int yyn = yypact[*yyssp];
|
||||
yyarg[yycount++] = yytname[yytoken];
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. In other words, skip the first -YYN actions for
|
||||
this state because they are default actions. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yyx;
|
||||
|
||||
# if 0
|
||||
/* This is so xgettext sees the translatable formats that are
|
||||
constructed on the fly. */
|
||||
YY_("syntax error, unexpected %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
||||
# endif
|
||||
char *yyfmt;
|
||||
char const *yyf;
|
||||
static char const yyunexpected[] = "syntax error, unexpected %s";
|
||||
static char const yyexpecting[] = ", expecting %s";
|
||||
static char const yyor[] = " or %s";
|
||||
char yyformat[sizeof yyunexpected
|
||||
+ sizeof yyexpecting - 1
|
||||
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
||||
* (sizeof yyor - 1))];
|
||||
char const *yyprefix = yyexpecting;
|
||||
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yycount = 1;
|
||||
|
||||
yyarg[0] = yytname[yytype];
|
||||
yyfmt = yystpcpy (yyformat, yyunexpected);
|
||||
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
yyformat[sizeof yyunexpected - 1] = '\0';
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
yyfmt = yystpcpy (yyfmt, yyprefix);
|
||||
yyprefix = yyor;
|
||||
}
|
||||
|
||||
yyf = YY_(yyformat);
|
||||
yysize1 = yysize + yystrlen (yyf);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
|
||||
if (yysize_overflow)
|
||||
return YYSIZE_MAXIMUM;
|
||||
|
||||
if (yyresult)
|
||||
{
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
char *yyp = yyresult;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyf) != '\0')
|
||||
{
|
||||
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyf += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return yysize;
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
|
||||
&& !yytable_value_is_error (yytable[yyx + yyn]))
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (yycount)
|
||||
{
|
||||
# define YYCASE_(N, S) \
|
||||
case N: \
|
||||
yyformat = S; \
|
||||
break
|
||||
YYCASE_(0, YY_("syntax error"));
|
||||
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
||||
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
||||
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
|
||||
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
|
||||
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
*yymsg_alloc = 2 * yysize;
|
||||
if (! (yysize <= *yymsg_alloc
|
||||
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
{
|
||||
char *yyp = *yymsg;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyformat) != '\0')
|
||||
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyformat += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyformat++;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
|
||||
|
||||
/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
@ -1132,6 +1165,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, tmpl, error_msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
@ -1148,12 +1182,9 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1219,7 +1250,7 @@ YYLTYPE yylloc;
|
||||
YYLTYPE *yylsp;
|
||||
|
||||
/* The locations where the error started and ended. */
|
||||
YYLTYPE yyerror_range[2];
|
||||
YYLTYPE yyerror_range[3];
|
||||
|
||||
YYSIZE_T yystacksize;
|
||||
|
||||
@ -1368,7 +1399,7 @@ yybackup:
|
||||
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYPACT_NINF)
|
||||
if (yypact_value_is_default (yyn))
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
@ -1399,8 +1430,8 @@ yybackup:
|
||||
yyn = yytable[yyn];
|
||||
if (yyn <= 0)
|
||||
{
|
||||
if (yyn == 0 || yyn == YYTABLE_NINF)
|
||||
goto yyerrlab;
|
||||
if (yytable_value_is_error (yyn))
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
@ -1456,7 +1487,7 @@ yyreduce:
|
||||
{
|
||||
case 4:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 99 "template_syntax.y"
|
||||
{
|
||||
Attribute * pattr;
|
||||
@ -1466,12 +1497,12 @@ yyreduce:
|
||||
pattr = new SingleAttribute(name,unescape(value));
|
||||
|
||||
tmpl->set(pattr);
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 109 "template_syntax.y"
|
||||
{
|
||||
Attribute * pattr;
|
||||
@ -1484,12 +1515,12 @@ yyreduce:
|
||||
tmpl->set(pattr);
|
||||
|
||||
delete amap;
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 122 "template_syntax.y"
|
||||
{
|
||||
Attribute * pattr;
|
||||
@ -1499,12 +1530,12 @@ yyreduce:
|
||||
pattr = new SingleAttribute(name,value);
|
||||
|
||||
tmpl->set(pattr);
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 134 "template_syntax.y"
|
||||
{
|
||||
map<string,string>* vattr;
|
||||
@ -1517,12 +1548,12 @@ yyreduce:
|
||||
vattr->insert(make_pair(name,unescape(value)));
|
||||
|
||||
(yyval.val_attr) = static_cast<void *>(vattr);
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 147 "template_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(3) - (5)].val_str));
|
||||
@ -1535,15 +1566,26 @@ yyreduce:
|
||||
|
||||
attrmap->insert(make_pair(name,unescape(value)));
|
||||
(yyval.val_attr) = (yyvsp[(1) - (5)].val_attr);
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1545 "template_syntax.cc"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 1576 "template_syntax.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
that yytoken be updated with the new translation. We take the
|
||||
approach of translating immediately before every use of yytoken.
|
||||
One alternative is translating here after every semantic action,
|
||||
but that translation would be missed if the semantic action invokes
|
||||
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
|
||||
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
|
||||
incorrect destructor might then be invoked immediately. In the
|
||||
case of YYERROR or YYBACKUP, subsequent parser actions might lead
|
||||
to an incorrect destructor call or verbose syntax error message
|
||||
before the lookahead is translated. */
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1572,6 +1614,10 @@ yyreduce:
|
||||
| yyerrlab -- here on detecting error |
|
||||
`------------------------------------*/
|
||||
yyerrlab:
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||
|
||||
/* If not already recovering from an error, report this error. */
|
||||
if (!yyerrstatus)
|
||||
{
|
||||
@ -1579,41 +1625,40 @@ yyerrlab:
|
||||
#if ! YYERROR_VERBOSE
|
||||
yyerror (&yylloc, mc, tmpl, error_msg, YY_("syntax error"));
|
||||
#else
|
||||
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
|
||||
yyssp, yytoken)
|
||||
{
|
||||
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
||||
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
||||
{
|
||||
YYSIZE_T yyalloc = 2 * yysize;
|
||||
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
||||
if (yymsg)
|
||||
yymsg_alloc = yyalloc;
|
||||
else
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 < yysize && yysize <= yymsg_alloc)
|
||||
{
|
||||
(void) yysyntax_error (yymsg, yystate, yychar);
|
||||
yyerror (&yylloc, mc, tmpl, error_msg, yymsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
yyerror (&yylloc, mc, tmpl, error_msg, YY_("syntax error"));
|
||||
if (yysize != 0)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
char const *yymsgp = YY_("syntax error");
|
||||
int yysyntax_error_status;
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
if (yysyntax_error_status == 0)
|
||||
yymsgp = yymsg;
|
||||
else if (yysyntax_error_status == 1)
|
||||
{
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
|
||||
if (!yymsg)
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
yysyntax_error_status = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
yymsgp = yymsg;
|
||||
}
|
||||
}
|
||||
yyerror (&yylloc, mc, tmpl, error_msg, yymsgp);
|
||||
if (yysyntax_error_status == 2)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
# undef YYSYNTAX_ERROR
|
||||
#endif
|
||||
}
|
||||
|
||||
yyerror_range[0] = yylloc;
|
||||
yyerror_range[1] = yylloc;
|
||||
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
@ -1650,7 +1695,7 @@ yyerrorlab:
|
||||
if (/*CONSTCOND*/ 0)
|
||||
goto yyerrorlab;
|
||||
|
||||
yyerror_range[0] = yylsp[1-yylen];
|
||||
yyerror_range[1] = yylsp[1-yylen];
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYERROR. */
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1669,7 +1714,7 @@ yyerrlab1:
|
||||
for (;;)
|
||||
{
|
||||
yyn = yypact[yystate];
|
||||
if (yyn != YYPACT_NINF)
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
yyn += YYTERROR;
|
||||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||||
@ -1684,7 +1729,7 @@ yyerrlab1:
|
||||
if (yyssp == yyss)
|
||||
YYABORT;
|
||||
|
||||
yyerror_range[0] = *yylsp;
|
||||
yyerror_range[1] = *yylsp;
|
||||
yydestruct ("Error: popping",
|
||||
yystos[yystate], yyvsp, yylsp, mc, tmpl, error_msg);
|
||||
YYPOPSTACK (1);
|
||||
@ -1694,10 +1739,10 @@ yyerrlab1:
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
yyerror_range[1] = yylloc;
|
||||
yyerror_range[2] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
the lookahead. YYLOC is available though. */
|
||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
||||
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||
*++yylsp = yyloc;
|
||||
|
||||
/* Shift the error token. */
|
||||
@ -1733,8 +1778,13 @@ yyexhaustedlab:
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, tmpl, error_msg);
|
||||
{
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = YYTRANSLATE (yychar);
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, tmpl, error_msg);
|
||||
}
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYABORT or YYACCEPT. */
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1759,7 +1809,7 @@ yyreturn:
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
/* Line 2067 of yacc.c */
|
||||
#line 160 "template_syntax.y"
|
||||
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -54,7 +53,7 @@
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 74 "template_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
@ -62,8 +61,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 67 "template_syntax.hh"
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 66 "template_syntax.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -45,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
#define YYBISON_VERSION "2.5"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -74,7 +73,7 @@
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
/* Line 268 of yacc.c */
|
||||
#line 17 "vm_var_syntax.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -307,7 +306,7 @@ void get_network_attribute(VirtualMachine * vm,
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/*
|
||||
|
||||
void get_user_attribute(VirtualMachine * vm,
|
||||
const string& attr_name,
|
||||
string& attr_value)
|
||||
@ -337,7 +336,7 @@ void get_user_attribute(VirtualMachine * vm,
|
||||
|
||||
user->unlock();
|
||||
}
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
@ -408,6 +407,19 @@ void insert_vector(VirtualMachine * vm,
|
||||
|
||||
return;
|
||||
}
|
||||
else if (name == "USER")
|
||||
{
|
||||
string value;
|
||||
|
||||
get_user_attribute(vm, vname, value);
|
||||
|
||||
if (!value.empty())
|
||||
{
|
||||
parsed << value;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( num = vm->get_template_attribute(name.c_str(),values) ) <= 0 )
|
||||
@ -447,8 +459,8 @@ void insert_vector(VirtualMachine * vm,
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 452 "vm_var_syntax.cc"
|
||||
/* Line 268 of yacc.c */
|
||||
#line 464 "vm_var_syntax.cc"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
@ -493,8 +505,8 @@ void insert_vector(VirtualMachine * vm,
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 395 "vm_var_syntax.y"
|
||||
/* Line 293 of yacc.c */
|
||||
#line 408 "vm_var_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
int val_int;
|
||||
@ -502,8 +514,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 507 "vm_var_syntax.cc"
|
||||
/* Line 293 of yacc.c */
|
||||
#line 519 "vm_var_syntax.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
@ -527,8 +539,8 @@ typedef struct YYLTYPE
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 264 of yacc.c */
|
||||
#line 532 "vm_var_syntax.cc"
|
||||
/* Line 343 of yacc.c */
|
||||
#line 544 "vm_var_syntax.cc"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -631,11 +643,11 @@ YYID (yyi)
|
||||
# define alloca _alloca
|
||||
# else
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@ -658,24 +670,24 @@ YYID (yyi)
|
||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
||||
# endif
|
||||
# if (defined __cplusplus && ! defined _STDLIB_H \
|
||||
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
|
||||
&& ! ((defined YYMALLOC || defined malloc) \
|
||||
&& (defined YYFREE || defined free)))
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYMALLOC
|
||||
# define YYMALLOC malloc
|
||||
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYFREE
|
||||
# define YYFREE free
|
||||
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
@ -706,23 +718,7 @@ union yyalloc
|
||||
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
||||
+ 2 * YYSTACK_GAP_MAXIMUM)
|
||||
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
# define YYCOPY_NEEDED 1
|
||||
|
||||
/* Relocate STACK from its old location to the new one. The
|
||||
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
||||
@ -742,6 +738,26 @@ union yyalloc
|
||||
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !YYCOPY_NEEDED */
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL 7
|
||||
/* YYLAST -- Last index in YYTABLE. */
|
||||
@ -814,7 +830,7 @@ static const yytype_int8 yyrhs[] =
|
||||
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
||||
static const yytype_uint16 yyrline[] =
|
||||
{
|
||||
0, 419, 419, 420, 423, 427, 440, 455
|
||||
0, 432, 432, 433, 436, 440, 453, 468
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -851,8 +867,8 @@ static const yytype_uint8 yyr2[] =
|
||||
0, 2, 1, 2, 1, 2, 5, 9
|
||||
};
|
||||
|
||||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
||||
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
||||
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE doesn't specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
static const yytype_uint8 yydefact[] =
|
||||
{
|
||||
@ -883,8 +899,7 @@ static const yytype_int8 yypgoto[] =
|
||||
|
||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule which
|
||||
number is the opposite. If zero, do what YYDEFACT says.
|
||||
If YYTABLE_NINF, syntax error. */
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
#define YYTABLE_NINF -1
|
||||
static const yytype_uint8 yytable[] =
|
||||
{
|
||||
@ -892,6 +907,12 @@ static const yytype_uint8 yytable[] =
|
||||
2, 12, 13, 14, 15, 16, 8, 0, 17
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
((yystate) == (-5))
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
YYID (0)
|
||||
|
||||
static const yytype_int8 yycheck[] =
|
||||
{
|
||||
0, 5, 4, 7, 6, -1, 9, 10, 9, 9,
|
||||
@ -939,7 +960,6 @@ do \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
yytoken = YYTRANSLATE (yychar); \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
@ -1207,7 +1227,6 @@ int yydebug;
|
||||
# define YYMAXDEPTH 10000
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
|
||||
@ -1310,115 +1329,142 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Copy into YYRESULT an error message about the unexpected token
|
||||
YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
||||
including the terminating null byte. If YYRESULT is null, do not
|
||||
copy anything; just return the number of bytes that would be
|
||||
copied. As a special case, return 0 if an ordinary "syntax error"
|
||||
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
||||
size calculation. */
|
||||
static YYSIZE_T
|
||||
yysyntax_error (char *yyresult, int yystate, int yychar)
|
||||
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
|
||||
about the unexpected token YYTOKEN for the state stack whose top is
|
||||
YYSSP.
|
||||
|
||||
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
|
||||
not large enough to hold the message. In that case, also set
|
||||
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
|
||||
required number of bytes is too large to store. */
|
||||
static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
int yyn = yypact[yystate];
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = 0;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
"expected"). */
|
||||
int yycount = 0;
|
||||
|
||||
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
||||
return 0;
|
||||
else
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider. See
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||
for details. YYERROR is fine as it does not invoke this
|
||||
function.
|
||||
- If this state is a consistent state with a default action, then
|
||||
the only way this function was invoked is if the default action
|
||||
is an error action. In that case, don't check for expected
|
||||
tokens because there are none.
|
||||
- The only way there can be no lookahead present (in yychar) is if
|
||||
this state is a consistent state with a default action. Thus,
|
||||
detecting the absence of a lookahead is sufficient to determine
|
||||
that there is no unexpected or expected token to report. In that
|
||||
case, just report a simple "syntax error".
|
||||
- Don't assume there isn't a lookahead just because this state is a
|
||||
consistent state with a default action. There might have been a
|
||||
previous inconsistent state, consistent state with a non-default
|
||||
action, or user semantic action that manipulated yychar.
|
||||
- Of course, the expected token list depends on states to have
|
||||
correct lookahead information, and it depends on the parser not
|
||||
to perform extra reductions after fetching a lookahead from the
|
||||
scanner and before detecting a syntax error. Thus, state merging
|
||||
(from LALR or IELR) and default reductions corrupt the expected
|
||||
token list. However, the list is correct for canonical LR with
|
||||
one exception: it will still contain any token that will not be
|
||||
accepted due to an error action in a later state.
|
||||
*/
|
||||
if (yytoken != YYEMPTY)
|
||||
{
|
||||
int yytype = YYTRANSLATE (yychar);
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
int yysize_overflow = 0;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
int yyx;
|
||||
int yyn = yypact[*yyssp];
|
||||
yyarg[yycount++] = yytname[yytoken];
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. In other words, skip the first -YYN actions for
|
||||
this state because they are default actions. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yyx;
|
||||
|
||||
# if 0
|
||||
/* This is so xgettext sees the translatable formats that are
|
||||
constructed on the fly. */
|
||||
YY_("syntax error, unexpected %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
||||
# endif
|
||||
char *yyfmt;
|
||||
char const *yyf;
|
||||
static char const yyunexpected[] = "syntax error, unexpected %s";
|
||||
static char const yyexpecting[] = ", expecting %s";
|
||||
static char const yyor[] = " or %s";
|
||||
char yyformat[sizeof yyunexpected
|
||||
+ sizeof yyexpecting - 1
|
||||
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
||||
* (sizeof yyor - 1))];
|
||||
char const *yyprefix = yyexpecting;
|
||||
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yycount = 1;
|
||||
|
||||
yyarg[0] = yytname[yytype];
|
||||
yyfmt = yystpcpy (yyformat, yyunexpected);
|
||||
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
yyformat[sizeof yyunexpected - 1] = '\0';
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
yyfmt = yystpcpy (yyfmt, yyprefix);
|
||||
yyprefix = yyor;
|
||||
}
|
||||
|
||||
yyf = YY_(yyformat);
|
||||
yysize1 = yysize + yystrlen (yyf);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
|
||||
if (yysize_overflow)
|
||||
return YYSIZE_MAXIMUM;
|
||||
|
||||
if (yyresult)
|
||||
{
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
char *yyp = yyresult;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyf) != '\0')
|
||||
{
|
||||
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyf += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return yysize;
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
|
||||
&& !yytable_value_is_error (yytable[yyx + yyn]))
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (yycount)
|
||||
{
|
||||
# define YYCASE_(N, S) \
|
||||
case N: \
|
||||
yyformat = S; \
|
||||
break
|
||||
YYCASE_(0, YY_("syntax error"));
|
||||
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
||||
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
||||
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
|
||||
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
|
||||
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
*yymsg_alloc = 2 * yysize;
|
||||
if (! (yysize <= *yymsg_alloc
|
||||
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
{
|
||||
char *yyp = *yymsg;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyformat) != '\0')
|
||||
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyformat += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyformat++;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
|
||||
|
||||
/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
@ -1461,6 +1507,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, vm, parsed, errmsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
@ -1477,12 +1524,9 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1698,7 +1742,7 @@ yybackup:
|
||||
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYPACT_NINF)
|
||||
if (yypact_value_is_default (yyn))
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
@ -1729,8 +1773,8 @@ yybackup:
|
||||
yyn = yytable[yyn];
|
||||
if (yyn <= 0)
|
||||
{
|
||||
if (yyn == 0 || yyn == YYTABLE_NINF)
|
||||
goto yyerrlab;
|
||||
if (yytable_value_is_error (yyn))
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
@ -1786,17 +1830,17 @@ yyreduce:
|
||||
{
|
||||
case 4:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 424 "vm_var_syntax.y"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 437 "vm_var_syntax.y"
|
||||
{
|
||||
(*parsed) << (yyvsp[(1) - (1)].val_str);
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 428 "vm_var_syntax.y"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 441 "vm_var_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(1) - (2)].val_str));
|
||||
|
||||
@ -1808,13 +1852,13 @@ yyreduce:
|
||||
{
|
||||
(*parsed) << (yyvsp[(2) - (2)].val_char);
|
||||
}
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 441 "vm_var_syntax.y"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 454 "vm_var_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(1) - (5)].val_str));
|
||||
string vname((yyvsp[(3) - (5)].val_str));
|
||||
@ -1828,13 +1872,13 @@ yyreduce:
|
||||
{
|
||||
(*parsed) << (yyvsp[(5) - (5)].val_char);
|
||||
}
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 456 "vm_var_syntax.y"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 469 "vm_var_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(1) - (9)].val_str));
|
||||
string vname((yyvsp[(3) - (9)].val_str));
|
||||
@ -1851,15 +1895,26 @@ yyreduce:
|
||||
{
|
||||
(*parsed) << (yyvsp[(9) - (9)].val_char);
|
||||
}
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1861 "vm_var_syntax.cc"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 1905 "vm_var_syntax.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
that yytoken be updated with the new translation. We take the
|
||||
approach of translating immediately before every use of yytoken.
|
||||
One alternative is translating here after every semantic action,
|
||||
but that translation would be missed if the semantic action invokes
|
||||
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
|
||||
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
|
||||
incorrect destructor might then be invoked immediately. In the
|
||||
case of YYERROR or YYBACKUP, subsequent parser actions might lead
|
||||
to an incorrect destructor call or verbose syntax error message
|
||||
before the lookahead is translated. */
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1888,6 +1943,10 @@ yyreduce:
|
||||
| yyerrlab -- here on detecting error |
|
||||
`------------------------------------*/
|
||||
yyerrlab:
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||
|
||||
/* If not already recovering from an error, report this error. */
|
||||
if (!yyerrstatus)
|
||||
{
|
||||
@ -1895,37 +1954,36 @@ yyerrlab:
|
||||
#if ! YYERROR_VERBOSE
|
||||
yyerror (&yylloc, mc, vm, parsed, errmsg, YY_("syntax error"));
|
||||
#else
|
||||
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
|
||||
yyssp, yytoken)
|
||||
{
|
||||
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
||||
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
||||
{
|
||||
YYSIZE_T yyalloc = 2 * yysize;
|
||||
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
||||
if (yymsg)
|
||||
yymsg_alloc = yyalloc;
|
||||
else
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 < yysize && yysize <= yymsg_alloc)
|
||||
{
|
||||
(void) yysyntax_error (yymsg, yystate, yychar);
|
||||
yyerror (&yylloc, mc, vm, parsed, errmsg, yymsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
yyerror (&yylloc, mc, vm, parsed, errmsg, YY_("syntax error"));
|
||||
if (yysize != 0)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
char const *yymsgp = YY_("syntax error");
|
||||
int yysyntax_error_status;
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
if (yysyntax_error_status == 0)
|
||||
yymsgp = yymsg;
|
||||
else if (yysyntax_error_status == 1)
|
||||
{
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
|
||||
if (!yymsg)
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
yysyntax_error_status = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
yymsgp = yymsg;
|
||||
}
|
||||
}
|
||||
yyerror (&yylloc, mc, vm, parsed, errmsg, yymsgp);
|
||||
if (yysyntax_error_status == 2)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
# undef YYSYNTAX_ERROR
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1985,7 +2043,7 @@ yyerrlab1:
|
||||
for (;;)
|
||||
{
|
||||
yyn = yypact[yystate];
|
||||
if (yyn != YYPACT_NINF)
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
yyn += YYTERROR;
|
||||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||||
@ -2049,8 +2107,13 @@ yyexhaustedlab:
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, vm, parsed, errmsg);
|
||||
{
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = YYTRANSLATE (yychar);
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, vm, parsed, errmsg);
|
||||
}
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYABORT or YYACCEPT. */
|
||||
YYPOPSTACK (yylen);
|
||||
@ -2075,8 +2138,8 @@ yyreturn:
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
#line 474 "vm_var_syntax.y"
|
||||
/* Line 2067 of yacc.c */
|
||||
#line 487 "vm_var_syntax.y"
|
||||
|
||||
|
||||
extern "C" void vm_var__error(
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -56,8 +55,8 @@
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 395 "vm_var_syntax.y"
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 408 "vm_var_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
int val_int;
|
||||
@ -65,8 +64,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 70 "vm_var_syntax.hh"
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 69 "vm_var_syntax.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
|
@ -245,7 +245,7 @@ void get_network_attribute(VirtualMachine * vm,
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/*
|
||||
|
||||
void get_user_attribute(VirtualMachine * vm,
|
||||
const string& attr_name,
|
||||
string& attr_value)
|
||||
@ -275,7 +275,7 @@ void get_user_attribute(VirtualMachine * vm,
|
||||
|
||||
user->unlock();
|
||||
}
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
@ -346,6 +346,19 @@ void insert_vector(VirtualMachine * vm,
|
||||
|
||||
return;
|
||||
}
|
||||
else if (name == "USER")
|
||||
{
|
||||
string value;
|
||||
|
||||
get_user_attribute(vm, vname, value);
|
||||
|
||||
if (!value.empty())
|
||||
{
|
||||
parsed << value;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( num = vm->get_template_attribute(name.c_str(),values) ) <= 0 )
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -45,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
#define YYBISON_VERSION "2.5"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -74,7 +73,7 @@
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
/* Line 268 of yacc.c */
|
||||
#line 17 "expr_arith.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -130,8 +129,8 @@ extern "C"
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 135 "expr_arith.cc"
|
||||
/* Line 268 of yacc.c */
|
||||
#line 134 "expr_arith.cc"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
@ -170,7 +169,7 @@ extern "C"
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
/* Line 293 of yacc.c */
|
||||
#line 78 "expr_arith.y"
|
||||
|
||||
char * val_str;
|
||||
@ -179,8 +178,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 184 "expr_arith.cc"
|
||||
/* Line 293 of yacc.c */
|
||||
#line 183 "expr_arith.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
@ -204,8 +203,8 @@ typedef struct YYLTYPE
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 264 of yacc.c */
|
||||
#line 209 "expr_arith.cc"
|
||||
/* Line 343 of yacc.c */
|
||||
#line 208 "expr_arith.cc"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -308,11 +307,11 @@ YYID (yyi)
|
||||
# define alloca _alloca
|
||||
# else
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@ -335,24 +334,24 @@ YYID (yyi)
|
||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
||||
# endif
|
||||
# if (defined __cplusplus && ! defined _STDLIB_H \
|
||||
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
|
||||
&& ! ((defined YYMALLOC || defined malloc) \
|
||||
&& (defined YYFREE || defined free)))
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYMALLOC
|
||||
# define YYMALLOC malloc
|
||||
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYFREE
|
||||
# define YYFREE free
|
||||
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
@ -383,23 +382,7 @@ union yyalloc
|
||||
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
||||
+ 2 * YYSTACK_GAP_MAXIMUM)
|
||||
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
# define YYCOPY_NEEDED 1
|
||||
|
||||
/* Relocate STACK from its old location to the new one. The
|
||||
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
||||
@ -419,6 +402,26 @@ union yyalloc
|
||||
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !YYCOPY_NEEDED */
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL 10
|
||||
/* YYLAST -- Last index in YYTABLE. */
|
||||
@ -532,8 +535,8 @@ static const yytype_uint8 yyr2[] =
|
||||
3, 2, 3
|
||||
};
|
||||
|
||||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
||||
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
||||
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE doesn't specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
static const yytype_uint8 yydefact[] =
|
||||
{
|
||||
@ -564,8 +567,7 @@ static const yytype_int8 yypgoto[] =
|
||||
|
||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule which
|
||||
number is the opposite. If zero, do what YYDEFACT says.
|
||||
If YYTABLE_NINF, syntax error. */
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
#define YYTABLE_NINF -1
|
||||
static const yytype_uint8 yytable[] =
|
||||
{
|
||||
@ -574,6 +576,12 @@ static const yytype_uint8 yytable[] =
|
||||
4, 5, 11, 12, 13, 14
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
((yystate) == (-5))
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
YYID (0)
|
||||
|
||||
static const yytype_int8 yycheck[] =
|
||||
{
|
||||
1, 5, 6, -1, 5, 0, 3, 4, 5, 6,
|
||||
@ -622,7 +630,6 @@ do \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
yytoken = YYTRANSLATE (yychar); \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
@ -890,7 +897,6 @@ int yydebug;
|
||||
# define YYMAXDEPTH 10000
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
|
||||
@ -993,115 +999,142 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Copy into YYRESULT an error message about the unexpected token
|
||||
YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
||||
including the terminating null byte. If YYRESULT is null, do not
|
||||
copy anything; just return the number of bytes that would be
|
||||
copied. As a special case, return 0 if an ordinary "syntax error"
|
||||
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
||||
size calculation. */
|
||||
static YYSIZE_T
|
||||
yysyntax_error (char *yyresult, int yystate, int yychar)
|
||||
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
|
||||
about the unexpected token YYTOKEN for the state stack whose top is
|
||||
YYSSP.
|
||||
|
||||
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
|
||||
not large enough to hold the message. In that case, also set
|
||||
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
|
||||
required number of bytes is too large to store. */
|
||||
static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
int yyn = yypact[yystate];
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = 0;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
"expected"). */
|
||||
int yycount = 0;
|
||||
|
||||
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
||||
return 0;
|
||||
else
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider. See
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||
for details. YYERROR is fine as it does not invoke this
|
||||
function.
|
||||
- If this state is a consistent state with a default action, then
|
||||
the only way this function was invoked is if the default action
|
||||
is an error action. In that case, don't check for expected
|
||||
tokens because there are none.
|
||||
- The only way there can be no lookahead present (in yychar) is if
|
||||
this state is a consistent state with a default action. Thus,
|
||||
detecting the absence of a lookahead is sufficient to determine
|
||||
that there is no unexpected or expected token to report. In that
|
||||
case, just report a simple "syntax error".
|
||||
- Don't assume there isn't a lookahead just because this state is a
|
||||
consistent state with a default action. There might have been a
|
||||
previous inconsistent state, consistent state with a non-default
|
||||
action, or user semantic action that manipulated yychar.
|
||||
- Of course, the expected token list depends on states to have
|
||||
correct lookahead information, and it depends on the parser not
|
||||
to perform extra reductions after fetching a lookahead from the
|
||||
scanner and before detecting a syntax error. Thus, state merging
|
||||
(from LALR or IELR) and default reductions corrupt the expected
|
||||
token list. However, the list is correct for canonical LR with
|
||||
one exception: it will still contain any token that will not be
|
||||
accepted due to an error action in a later state.
|
||||
*/
|
||||
if (yytoken != YYEMPTY)
|
||||
{
|
||||
int yytype = YYTRANSLATE (yychar);
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
int yysize_overflow = 0;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
int yyx;
|
||||
int yyn = yypact[*yyssp];
|
||||
yyarg[yycount++] = yytname[yytoken];
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. In other words, skip the first -YYN actions for
|
||||
this state because they are default actions. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yyx;
|
||||
|
||||
# if 0
|
||||
/* This is so xgettext sees the translatable formats that are
|
||||
constructed on the fly. */
|
||||
YY_("syntax error, unexpected %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
||||
# endif
|
||||
char *yyfmt;
|
||||
char const *yyf;
|
||||
static char const yyunexpected[] = "syntax error, unexpected %s";
|
||||
static char const yyexpecting[] = ", expecting %s";
|
||||
static char const yyor[] = " or %s";
|
||||
char yyformat[sizeof yyunexpected
|
||||
+ sizeof yyexpecting - 1
|
||||
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
||||
* (sizeof yyor - 1))];
|
||||
char const *yyprefix = yyexpecting;
|
||||
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yycount = 1;
|
||||
|
||||
yyarg[0] = yytname[yytype];
|
||||
yyfmt = yystpcpy (yyformat, yyunexpected);
|
||||
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
yyformat[sizeof yyunexpected - 1] = '\0';
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
yyfmt = yystpcpy (yyfmt, yyprefix);
|
||||
yyprefix = yyor;
|
||||
}
|
||||
|
||||
yyf = YY_(yyformat);
|
||||
yysize1 = yysize + yystrlen (yyf);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
|
||||
if (yysize_overflow)
|
||||
return YYSIZE_MAXIMUM;
|
||||
|
||||
if (yyresult)
|
||||
{
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
char *yyp = yyresult;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyf) != '\0')
|
||||
{
|
||||
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyf += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return yysize;
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
|
||||
&& !yytable_value_is_error (yytable[yyx + yyn]))
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (yycount)
|
||||
{
|
||||
# define YYCASE_(N, S) \
|
||||
case N: \
|
||||
yyformat = S; \
|
||||
break
|
||||
YYCASE_(0, YY_("syntax error"));
|
||||
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
||||
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
||||
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
|
||||
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
|
||||
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
*yymsg_alloc = 2 * yysize;
|
||||
if (! (yysize <= *yymsg_alloc
|
||||
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
{
|
||||
char *yyp = *yymsg;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyformat) != '\0')
|
||||
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyformat += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyformat++;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
|
||||
|
||||
/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
@ -1144,6 +1177,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, oxml, result, error_msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
@ -1160,12 +1194,9 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1381,7 +1412,7 @@ yybackup:
|
||||
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYPACT_NINF)
|
||||
if (yypact_value_is_default (yyn))
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
@ -1412,8 +1443,8 @@ yybackup:
|
||||
yyn = yytable[yyn];
|
||||
if (yyn <= 0)
|
||||
{
|
||||
if (yyn == 0 || yyn == YYTABLE_NINF)
|
||||
goto yyerrlab;
|
||||
if (yytable_value_is_error (yyn))
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
@ -1469,21 +1500,21 @@ yyreduce:
|
||||
{
|
||||
case 2:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 100 "expr_arith.y"
|
||||
{ result = static_cast<int>((yyvsp[(1) - (1)].val_float));;}
|
||||
{ result = static_cast<int>((yyvsp[(1) - (1)].val_float));}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 101 "expr_arith.y"
|
||||
{ result = 0; ;}
|
||||
{ result = 0; }
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 104 "expr_arith.y"
|
||||
{ float val = 0.0;
|
||||
|
||||
@ -1509,71 +1540,82 @@ yyreduce:
|
||||
}
|
||||
|
||||
(yyval.val_float) = val;
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 129 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (1)].val_float); ;}
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (1)].val_float); }
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 130 "expr_arith.y"
|
||||
{ (yyval.val_float) = static_cast<float>((yyvsp[(1) - (1)].val_int)); ;}
|
||||
{ (yyval.val_float) = static_cast<float>((yyvsp[(1) - (1)].val_int)); }
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 131 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) + (yyvsp[(3) - (3)].val_float);;}
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) + (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 132 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) - (yyvsp[(3) - (3)].val_float);;}
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) - (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 133 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) * (yyvsp[(3) - (3)].val_float);;}
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) * (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 134 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) / (yyvsp[(3) - (3)].val_float);;}
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) / (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 135 "expr_arith.y"
|
||||
{ (yyval.val_float) = - (yyvsp[(2) - (2)].val_float);;}
|
||||
{ (yyval.val_float) = - (yyvsp[(2) - (2)].val_float);}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 136 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(2) - (3)].val_float);;}
|
||||
{ (yyval.val_float) = (yyvsp[(2) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1575 "expr_arith.cc"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 1606 "expr_arith.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
that yytoken be updated with the new translation. We take the
|
||||
approach of translating immediately before every use of yytoken.
|
||||
One alternative is translating here after every semantic action,
|
||||
but that translation would be missed if the semantic action invokes
|
||||
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
|
||||
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
|
||||
incorrect destructor might then be invoked immediately. In the
|
||||
case of YYERROR or YYBACKUP, subsequent parser actions might lead
|
||||
to an incorrect destructor call or verbose syntax error message
|
||||
before the lookahead is translated. */
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1602,6 +1644,10 @@ yyreduce:
|
||||
| yyerrlab -- here on detecting error |
|
||||
`------------------------------------*/
|
||||
yyerrlab:
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||
|
||||
/* If not already recovering from an error, report this error. */
|
||||
if (!yyerrstatus)
|
||||
{
|
||||
@ -1609,37 +1655,36 @@ yyerrlab:
|
||||
#if ! YYERROR_VERBOSE
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error"));
|
||||
#else
|
||||
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
|
||||
yyssp, yytoken)
|
||||
{
|
||||
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
||||
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
||||
{
|
||||
YYSIZE_T yyalloc = 2 * yysize;
|
||||
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
||||
if (yymsg)
|
||||
yymsg_alloc = yyalloc;
|
||||
else
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 < yysize && yysize <= yymsg_alloc)
|
||||
{
|
||||
(void) yysyntax_error (yymsg, yystate, yychar);
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, yymsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error"));
|
||||
if (yysize != 0)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
char const *yymsgp = YY_("syntax error");
|
||||
int yysyntax_error_status;
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
if (yysyntax_error_status == 0)
|
||||
yymsgp = yymsg;
|
||||
else if (yysyntax_error_status == 1)
|
||||
{
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
|
||||
if (!yymsg)
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
yysyntax_error_status = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
yymsgp = yymsg;
|
||||
}
|
||||
}
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, yymsgp);
|
||||
if (yysyntax_error_status == 2)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
# undef YYSYNTAX_ERROR
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1699,7 +1744,7 @@ yyerrlab1:
|
||||
for (;;)
|
||||
{
|
||||
yyn = yypact[yystate];
|
||||
if (yyn != YYPACT_NINF)
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
yyn += YYTERROR;
|
||||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||||
@ -1763,8 +1808,13 @@ yyexhaustedlab:
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, oxml, result, error_msg);
|
||||
{
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = YYTRANSLATE (yychar);
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, oxml, result, error_msg);
|
||||
}
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYABORT or YYACCEPT. */
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1789,7 +1839,7 @@ yyreturn:
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
/* Line 2067 of yacc.c */
|
||||
#line 139 "expr_arith.y"
|
||||
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -50,7 +49,7 @@
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 78 "expr_arith.y"
|
||||
|
||||
char * val_str;
|
||||
@ -59,8 +58,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 64 "expr_arith.hh"
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 63 "expr_arith.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -45,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
#define YYBISON_VERSION "2.5"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -74,7 +73,7 @@
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
/* Line 268 of yacc.c */
|
||||
#line 17 "expr_bool.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -135,8 +134,8 @@ void get_xml_attribute(ObjectXML * oxml, const char* attr, string& val);
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 140 "expr_bool.cc"
|
||||
/* Line 268 of yacc.c */
|
||||
#line 139 "expr_bool.cc"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
@ -175,7 +174,7 @@ void get_xml_attribute(ObjectXML * oxml, const char* attr, string& val);
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
/* Line 293 of yacc.c */
|
||||
#line 83 "expr_bool.y"
|
||||
|
||||
char * val_str;
|
||||
@ -184,8 +183,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 189 "expr_bool.cc"
|
||||
/* Line 293 of yacc.c */
|
||||
#line 188 "expr_bool.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
@ -209,8 +208,8 @@ typedef struct YYLTYPE
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 264 of yacc.c */
|
||||
#line 214 "expr_bool.cc"
|
||||
/* Line 343 of yacc.c */
|
||||
#line 213 "expr_bool.cc"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -313,11 +312,11 @@ YYID (yyi)
|
||||
# define alloca _alloca
|
||||
# else
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@ -340,24 +339,24 @@ YYID (yyi)
|
||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
||||
# endif
|
||||
# if (defined __cplusplus && ! defined _STDLIB_H \
|
||||
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
|
||||
&& ! ((defined YYMALLOC || defined malloc) \
|
||||
&& (defined YYFREE || defined free)))
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef _STDLIB_H
|
||||
# define _STDLIB_H 1
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYMALLOC
|
||||
# define YYMALLOC malloc
|
||||
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YYFREE
|
||||
# define YYFREE free
|
||||
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
@ -388,23 +387,7 @@ union yyalloc
|
||||
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
||||
+ 2 * YYSTACK_GAP_MAXIMUM)
|
||||
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
# define YYCOPY_NEEDED 1
|
||||
|
||||
/* Relocate STACK from its old location to the new one. The
|
||||
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
||||
@ -424,6 +407,26 @@ union yyalloc
|
||||
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !YYCOPY_NEEDED */
|
||||
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL 12
|
||||
/* YYLAST -- Last index in YYTABLE. */
|
||||
@ -540,8 +543,8 @@ static const yytype_uint8 yyr2[] =
|
||||
3, 3, 3, 4, 3, 3, 2, 3
|
||||
};
|
||||
|
||||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
||||
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
||||
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE doesn't specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
static const yytype_uint8 yydefact[] =
|
||||
{
|
||||
@ -574,8 +577,7 @@ static const yytype_int8 yypgoto[] =
|
||||
|
||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule which
|
||||
number is the opposite. If zero, do what YYDEFACT says.
|
||||
If YYTABLE_NINF, syntax error. */
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
#define YYTABLE_NINF -1
|
||||
static const yytype_uint8 yytable[] =
|
||||
{
|
||||
@ -584,6 +586,12 @@ static const yytype_uint8 yytable[] =
|
||||
16, 17, 18, 26, 27, 28, 19, 21, 20, 22
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
((yystate) == (-6))
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
YYID (0)
|
||||
|
||||
static const yytype_int8 yycheck[] =
|
||||
{
|
||||
1, 3, 3, 0, 9, 7, 4, 5, 4, 5,
|
||||
@ -633,7 +641,6 @@ do \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
yytoken = YYTRANSLATE (yychar); \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
@ -901,7 +908,6 @@ int yydebug;
|
||||
# define YYMAXDEPTH 10000
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
|
||||
@ -1004,115 +1010,142 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Copy into YYRESULT an error message about the unexpected token
|
||||
YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
||||
including the terminating null byte. If YYRESULT is null, do not
|
||||
copy anything; just return the number of bytes that would be
|
||||
copied. As a special case, return 0 if an ordinary "syntax error"
|
||||
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
||||
size calculation. */
|
||||
static YYSIZE_T
|
||||
yysyntax_error (char *yyresult, int yystate, int yychar)
|
||||
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
|
||||
about the unexpected token YYTOKEN for the state stack whose top is
|
||||
YYSSP.
|
||||
|
||||
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
|
||||
not large enough to hold the message. In that case, also set
|
||||
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
|
||||
required number of bytes is too large to store. */
|
||||
static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
int yyn = yypact[yystate];
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = 0;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
"expected"). */
|
||||
int yycount = 0;
|
||||
|
||||
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
||||
return 0;
|
||||
else
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider. See
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||
for details. YYERROR is fine as it does not invoke this
|
||||
function.
|
||||
- If this state is a consistent state with a default action, then
|
||||
the only way this function was invoked is if the default action
|
||||
is an error action. In that case, don't check for expected
|
||||
tokens because there are none.
|
||||
- The only way there can be no lookahead present (in yychar) is if
|
||||
this state is a consistent state with a default action. Thus,
|
||||
detecting the absence of a lookahead is sufficient to determine
|
||||
that there is no unexpected or expected token to report. In that
|
||||
case, just report a simple "syntax error".
|
||||
- Don't assume there isn't a lookahead just because this state is a
|
||||
consistent state with a default action. There might have been a
|
||||
previous inconsistent state, consistent state with a non-default
|
||||
action, or user semantic action that manipulated yychar.
|
||||
- Of course, the expected token list depends on states to have
|
||||
correct lookahead information, and it depends on the parser not
|
||||
to perform extra reductions after fetching a lookahead from the
|
||||
scanner and before detecting a syntax error. Thus, state merging
|
||||
(from LALR or IELR) and default reductions corrupt the expected
|
||||
token list. However, the list is correct for canonical LR with
|
||||
one exception: it will still contain any token that will not be
|
||||
accepted due to an error action in a later state.
|
||||
*/
|
||||
if (yytoken != YYEMPTY)
|
||||
{
|
||||
int yytype = YYTRANSLATE (yychar);
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
int yysize_overflow = 0;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
int yyx;
|
||||
int yyn = yypact[*yyssp];
|
||||
yyarg[yycount++] = yytname[yytoken];
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. In other words, skip the first -YYN actions for
|
||||
this state because they are default actions. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yyx;
|
||||
|
||||
# if 0
|
||||
/* This is so xgettext sees the translatable formats that are
|
||||
constructed on the fly. */
|
||||
YY_("syntax error, unexpected %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
||||
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
||||
# endif
|
||||
char *yyfmt;
|
||||
char const *yyf;
|
||||
static char const yyunexpected[] = "syntax error, unexpected %s";
|
||||
static char const yyexpecting[] = ", expecting %s";
|
||||
static char const yyor[] = " or %s";
|
||||
char yyformat[sizeof yyunexpected
|
||||
+ sizeof yyexpecting - 1
|
||||
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
||||
* (sizeof yyor - 1))];
|
||||
char const *yyprefix = yyexpecting;
|
||||
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
int yychecklim = YYLAST - yyn + 1;
|
||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||
int yycount = 1;
|
||||
|
||||
yyarg[0] = yytname[yytype];
|
||||
yyfmt = yystpcpy (yyformat, yyunexpected);
|
||||
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
yyformat[sizeof yyunexpected - 1] = '\0';
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
yyfmt = yystpcpy (yyfmt, yyprefix);
|
||||
yyprefix = yyor;
|
||||
}
|
||||
|
||||
yyf = YY_(yyformat);
|
||||
yysize1 = yysize + yystrlen (yyf);
|
||||
yysize_overflow |= (yysize1 < yysize);
|
||||
yysize = yysize1;
|
||||
|
||||
if (yysize_overflow)
|
||||
return YYSIZE_MAXIMUM;
|
||||
|
||||
if (yyresult)
|
||||
{
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
char *yyp = yyresult;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyf) != '\0')
|
||||
{
|
||||
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyf += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return yysize;
|
||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
|
||||
&& !yytable_value_is_error (yytable[yyx + yyn]))
|
||||
{
|
||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||
{
|
||||
yycount = 1;
|
||||
yysize = yysize0;
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (yycount)
|
||||
{
|
||||
# define YYCASE_(N, S) \
|
||||
case N: \
|
||||
yyformat = S; \
|
||||
break
|
||||
YYCASE_(0, YY_("syntax error"));
|
||||
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
||||
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
||||
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
|
||||
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
|
||||
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
*yymsg_alloc = 2 * yysize;
|
||||
if (! (yysize <= *yymsg_alloc
|
||||
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
{
|
||||
char *yyp = *yymsg;
|
||||
int yyi = 0;
|
||||
while ((*yyp = *yyformat) != '\0')
|
||||
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
|
||||
{
|
||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||
yyformat += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yyp++;
|
||||
yyformat++;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
|
||||
|
||||
/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
@ -1155,6 +1188,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, oxml, result, error_msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
@ -1171,12 +1205,9 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1392,7 +1423,7 @@ yybackup:
|
||||
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYPACT_NINF)
|
||||
if (yypact_value_is_default (yyn))
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
@ -1423,8 +1454,8 @@ yybackup:
|
||||
yyn = yytable[yyn];
|
||||
if (yyn <= 0)
|
||||
{
|
||||
if (yyn == 0 || yyn == YYTABLE_NINF)
|
||||
goto yyerrlab;
|
||||
if (yytable_value_is_error (yyn))
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
@ -1480,152 +1511,163 @@ yyreduce:
|
||||
{
|
||||
case 2:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 103 "expr_bool.y"
|
||||
{ result=(yyvsp[(1) - (1)].val_int); ;}
|
||||
{ result=(yyvsp[(1) - (1)].val_int); }
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 104 "expr_bool.y"
|
||||
{ result=true; ;}
|
||||
{ result=true; }
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 107 "expr_bool.y"
|
||||
{ int val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val == (yyvsp[(3) - (3)].val_int);;}
|
||||
(yyval.val_int) = val == (yyvsp[(3) - (3)].val_int);}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 112 "expr_bool.y"
|
||||
{ int val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val);
|
||||
(yyval.val_int) = val != (yyvsp[(4) - (4)].val_int);;}
|
||||
(yyval.val_int) = val != (yyvsp[(4) - (4)].val_int);}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 117 "expr_bool.y"
|
||||
{ int val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val > (yyvsp[(3) - (3)].val_int);;}
|
||||
(yyval.val_int) = val > (yyvsp[(3) - (3)].val_int);}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 122 "expr_bool.y"
|
||||
{ int val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val < (yyvsp[(3) - (3)].val_int);;}
|
||||
(yyval.val_int) = val < (yyvsp[(3) - (3)].val_int);}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 127 "expr_bool.y"
|
||||
{ float val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val == (yyvsp[(3) - (3)].val_float);;}
|
||||
(yyval.val_int) = val == (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 132 "expr_bool.y"
|
||||
{ float val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val);
|
||||
(yyval.val_int) = val != (yyvsp[(4) - (4)].val_float);;}
|
||||
(yyval.val_int) = val != (yyvsp[(4) - (4)].val_float);}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 137 "expr_bool.y"
|
||||
{ float val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val > (yyvsp[(3) - (3)].val_float);;}
|
||||
(yyval.val_int) = val > (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 142 "expr_bool.y"
|
||||
{ float val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val < (yyvsp[(3) - (3)].val_float);;}
|
||||
(yyval.val_int) = val < (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 147 "expr_bool.y"
|
||||
{ string val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = (val.empty() || (yyvsp[(3) - (3)].val_str)==0) ? false : fnmatch((yyvsp[(3) - (3)].val_str),val.c_str(),0)==0;;}
|
||||
(yyval.val_int) = (val.empty() || (yyvsp[(3) - (3)].val_str)==0) ? false : fnmatch((yyvsp[(3) - (3)].val_str),val.c_str(),0)==0;}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 152 "expr_bool.y"
|
||||
{ string val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val);
|
||||
(yyval.val_int) = (val.empty() || (yyvsp[(4) - (4)].val_str)==0) ? false : fnmatch((yyvsp[(4) - (4)].val_str),val.c_str(),0)!=0;;}
|
||||
(yyval.val_int) = (val.empty() || (yyvsp[(4) - (4)].val_str)==0) ? false : fnmatch((yyvsp[(4) - (4)].val_str),val.c_str(),0)!=0;}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 157 "expr_bool.y"
|
||||
{ (yyval.val_int) = (yyvsp[(1) - (3)].val_int) && (yyvsp[(3) - (3)].val_int); ;}
|
||||
{ (yyval.val_int) = (yyvsp[(1) - (3)].val_int) && (yyvsp[(3) - (3)].val_int); }
|
||||
break;
|
||||
|
||||
case 15:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 158 "expr_bool.y"
|
||||
{ (yyval.val_int) = (yyvsp[(1) - (3)].val_int) || (yyvsp[(3) - (3)].val_int); ;}
|
||||
{ (yyval.val_int) = (yyvsp[(1) - (3)].val_int) || (yyvsp[(3) - (3)].val_int); }
|
||||
break;
|
||||
|
||||
case 16:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 159 "expr_bool.y"
|
||||
{ (yyval.val_int) = ! (yyvsp[(2) - (2)].val_int); ;}
|
||||
{ (yyval.val_int) = ! (yyvsp[(2) - (2)].val_int); }
|
||||
break;
|
||||
|
||||
case 17:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 160 "expr_bool.y"
|
||||
{ (yyval.val_int) = (yyvsp[(2) - (3)].val_int); ;}
|
||||
{ (yyval.val_int) = (yyvsp[(2) - (3)].val_int); }
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1627 "expr_bool.cc"
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 1658 "expr_bool.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
that yytoken be updated with the new translation. We take the
|
||||
approach of translating immediately before every use of yytoken.
|
||||
One alternative is translating here after every semantic action,
|
||||
but that translation would be missed if the semantic action invokes
|
||||
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
|
||||
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
|
||||
incorrect destructor might then be invoked immediately. In the
|
||||
case of YYERROR or YYBACKUP, subsequent parser actions might lead
|
||||
to an incorrect destructor call or verbose syntax error message
|
||||
before the lookahead is translated. */
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1654,6 +1696,10 @@ yyreduce:
|
||||
| yyerrlab -- here on detecting error |
|
||||
`------------------------------------*/
|
||||
yyerrlab:
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||
|
||||
/* If not already recovering from an error, report this error. */
|
||||
if (!yyerrstatus)
|
||||
{
|
||||
@ -1661,37 +1707,36 @@ yyerrlab:
|
||||
#if ! YYERROR_VERBOSE
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error"));
|
||||
#else
|
||||
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
|
||||
yyssp, yytoken)
|
||||
{
|
||||
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
||||
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
||||
{
|
||||
YYSIZE_T yyalloc = 2 * yysize;
|
||||
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
||||
yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
||||
if (yymsg)
|
||||
yymsg_alloc = yyalloc;
|
||||
else
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 < yysize && yysize <= yymsg_alloc)
|
||||
{
|
||||
(void) yysyntax_error (yymsg, yystate, yychar);
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, yymsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error"));
|
||||
if (yysize != 0)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
char const *yymsgp = YY_("syntax error");
|
||||
int yysyntax_error_status;
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
if (yysyntax_error_status == 0)
|
||||
yymsgp = yymsg;
|
||||
else if (yysyntax_error_status == 1)
|
||||
{
|
||||
if (yymsg != yymsgbuf)
|
||||
YYSTACK_FREE (yymsg);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
|
||||
if (!yymsg)
|
||||
{
|
||||
yymsg = yymsgbuf;
|
||||
yymsg_alloc = sizeof yymsgbuf;
|
||||
yysyntax_error_status = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
yysyntax_error_status = YYSYNTAX_ERROR;
|
||||
yymsgp = yymsg;
|
||||
}
|
||||
}
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, yymsgp);
|
||||
if (yysyntax_error_status == 2)
|
||||
goto yyexhaustedlab;
|
||||
}
|
||||
# undef YYSYNTAX_ERROR
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1751,7 +1796,7 @@ yyerrlab1:
|
||||
for (;;)
|
||||
{
|
||||
yyn = yypact[yystate];
|
||||
if (yyn != YYPACT_NINF)
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
yyn += YYTERROR;
|
||||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||||
@ -1815,8 +1860,13 @@ yyexhaustedlab:
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, oxml, result, error_msg);
|
||||
{
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
yytoken = YYTRANSLATE (yychar);
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, mc, oxml, result, error_msg);
|
||||
}
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYABORT or YYACCEPT. */
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1841,7 +1891,7 @@ yyreturn:
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
/* Line 2067 of yacc.c */
|
||||
#line 163 "expr_bool.y"
|
||||
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -50,7 +49,7 @@
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 83 "expr_bool.y"
|
||||
|
||||
char * val_str;
|
||||
@ -59,8 +58,8 @@ typedef union YYSTYPE
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 64 "expr_bool.hh"
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 63 "expr_bool.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
|
Loading…
Reference in New Issue
Block a user