fix compiler warning on mac (issue #6737)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Russell Bryant 19 years ago
parent 1a206c1bf8
commit e2b353fca9

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 2.0. */ /* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. */ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a /* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction. Bison output file, you may use that output file without restriction.
@ -36,6 +36,9 @@
/* Identify Bison output. */ /* Identify Bison output. */
#define YYBISON 1 #define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.1"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
@ -84,6 +87,7 @@
TOKEN = 278 TOKEN = 278
}; };
#endif #endif
/* Tokens. */
#define TOK_COLONCOLON 258 #define TOK_COLONCOLON 258
#define TOK_COND 259 #define TOK_COND 259
#define TOK_OR 260 #define TOK_OR 260
@ -142,10 +146,10 @@
#include <asterisk/ast_expr.h> #include <asterisk/ast_expr.h>
#include <asterisk/logger.h> #include <asterisk/logger.h>
#ifdef LONG_LONG_MIN #if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
#define QUAD_MIN LONG_LONG_MIN #define QUAD_MIN LONG_LONG_MIN
#endif #endif
#ifdef LONG_LONG_MAX #if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
#define QUAD_MAX LONG_LONG_MAX #define QUAD_MAX LONG_LONG_MAX
#endif #endif
@ -258,13 +262,18 @@ if ((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) \
# define YYERROR_VERBOSE 0 # define YYERROR_VERBOSE 0
#endif #endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 142 "ast_expr2.y" #line 142 "ast_expr2.y"
typedef union YYSTYPE { typedef union YYSTYPE {
struct val *val; struct val *val;
} YYSTYPE; } YYSTYPE;
/* Line 190 of yacc.c. */ /* Line 196 of yacc.c. */
#line 268 "ast_expr2.c" #line 277 "ast_expr2.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
@ -290,17 +299,36 @@ typedef struct YYLTYPE
extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t)); extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
/* Line 213 of yacc.c. */ /* Line 219 of yacc.c. */
#line 295 "ast_expr2.c" #line 304 "ast_expr2.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
# ifndef YYFREE #ifndef YY_
# define YYFREE free # if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif # endif
# ifndef YYMALLOC # ifndef YY_
# define YYMALLOC malloc # define YY_(msgid) msgid
# endif # endif
#endif
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */ /* The parser invokes alloca or malloc; define the necessary symbols. */
@ -310,6 +338,10 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
# define YYSTACK_ALLOC __builtin_alloca # define YYSTACK_ALLOC __builtin_alloca
# else # else
# define YYSTACK_ALLOC alloca # define YYSTACK_ALLOC alloca
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYINCLUDED_STDLIB_H
# endif
# endif # endif
# endif # endif
# endif # endif
@ -317,13 +349,39 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
# ifdef YYSTACK_ALLOC # ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */ /* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else # ifndef YYSTACK_ALLOC_MAXIMUM
# if defined (__STDC__) || defined (__cplusplus) /* The OS might guarantee only one guard page at the bottom of the stack,
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ and a page size can be as small as 4096 bytes. So we cannot safely
# define YYSIZE_T size_t invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
# endif # endif
# else
# define YYSTACK_ALLOC YYMALLOC # define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE # define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
# endif
# ifdef __cplusplus
extern "C" {
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
&& (defined (__STDC__) || defined (__cplusplus)))
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
&& (defined (__STDC__) || defined (__cplusplus)))
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifdef __cplusplus
}
# endif
# endif # endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
@ -360,7 +418,7 @@ union yyalloc
# define YYCOPY(To, From, Count) \ # define YYCOPY(To, From, Count) \
do \ do \
{ \ { \
register YYSIZE_T yyi; \ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \ for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \ (To)[yyi] = (From)[yyi]; \
} \ } \
@ -410,7 +468,7 @@ union yyalloc
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
#define YYMAXUTOK 278 #define YYMAXUTOK 278
#define YYTRANSLATE(YYX) \ #define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@ -479,8 +537,8 @@ static const unsigned char yyrline[] =
}; };
#endif #endif
#if YYDEBUG || YYERROR_VERBOSE #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] = static const char *const yytname[] =
{ {
@ -609,22 +667,6 @@ static const unsigned char yystos[] =
26, 26, 26, 26, 3, 26 26, 26, 26, 26, 3, 26
}; };
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY) #define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2) #define YYEMPTY (-2)
@ -654,8 +696,8 @@ do \
goto yybackup; \ goto yybackup; \
} \ } \
else \ else \
{ \ { \
yyerror ("syntax error: cannot back up");\ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \ YYERROR; \
} \ } \
while (0) while (0)
@ -734,7 +776,7 @@ do { \
if (yydebug) \ if (yydebug) \
{ \ { \
YYFPRINTF (stderr, "%s ", Title); \ YYFPRINTF (stderr, "%s ", Title); \
yysymprint (stderr, \ yysymprint (stderr, \
Type, Value, Location); \ Type, Value, Location); \
YYFPRINTF (stderr, "\n"); \ YYFPRINTF (stderr, "\n"); \
} \ } \
@ -782,13 +824,13 @@ yy_reduce_print (yyrule)
#endif #endif
{ {
int yyi; int yyi;
unsigned int yylno = yyrline[yyrule]; unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
yyrule - 1, yylno); yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */ /* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
} }
# define YY_REDUCE_PRINT(Rule) \ # define YY_REDUCE_PRINT(Rule) \
@ -817,7 +859,7 @@ int yydebug;
if the built-in stack extension method is used). if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */ evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH #ifndef YYMAXDEPTH
@ -841,7 +883,7 @@ yystrlen (yystr)
const char *yystr; const char *yystr;
# endif # endif
{ {
register const char *yys = yystr; const char *yys = yystr;
while (*yys++ != '\0') while (*yys++ != '\0')
continue; continue;
@ -866,8 +908,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc; const char *yysrc;
# endif # endif
{ {
register char *yyd = yydest; char *yyd = yydest;
register const char *yys = yysrc; const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0') while ((*yyd++ = *yys++) != '\0')
continue; continue;
@ -877,7 +919,55 @@ yystpcpy (yydest, yysrc)
# endif # endif
# endif # endif
#endif /* !YYERROR_VERBOSE */ # ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
contains an apostrophe, a comma, or backslash (other than
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
size_t yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
case '"':
if (yyres)
yyres[yyn] = '\0';
return yyn;
}
do_not_strip_quotes: ;
}
if (! yyres)
return yystrlen (yystr);
return yystpcpy (yyres, yystr) - yyres;
}
# endif
#endif /* YYERROR_VERBOSE */
@ -908,7 +998,7 @@ yysymprint (yyoutput, yytype, yyvaluep, yylocationp)
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
YY_LOCATION_PRINT (yyoutput, *yylocationp); YY_LOCATION_PRINT (yyoutput, *yylocationp);
fprintf (yyoutput, ": "); YYFPRINTF (yyoutput, ": ");
# ifdef YYPRINT # ifdef YYPRINT
if (yytype < YYNTOKENS) if (yytype < YYNTOKENS)
@ -995,7 +1085,7 @@ yyparse (void)
#else #else
int int
yyparse () yyparse ()
;
#endif #endif
#endif #endif
{ {
@ -1010,8 +1100,8 @@ int yynerrs;
/* Location data for the look-ahead symbol. */ /* Location data for the look-ahead symbol. */
YYLTYPE yylloc; YYLTYPE yylloc;
register int yystate; int yystate;
register int yyn; int yyn;
int yyresult; int yyresult;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
@ -1029,12 +1119,12 @@ YYLTYPE yylloc;
/* The state stack. */ /* The state stack. */
short int yyssa[YYINITDEPTH]; short int yyssa[YYINITDEPTH];
short int *yyss = yyssa; short int *yyss = yyssa;
register short int *yyssp; short int *yyssp;
/* The semantic value stack. */ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp; YYSTYPE *yyvsp;
/* The location stack. */ /* The location stack. */
YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE yylsa[YYINITDEPTH];
@ -1077,10 +1167,6 @@ YYLTYPE yylloc;
yylloc.first_column = yylloc.last_column = 0; yylloc.first_column = yylloc.last_column = 0;
#endif #endif
yyvsp[0] = yylval;
yylsp[0] = yylloc;
goto yysetstate; goto yysetstate;
/*------------------------------------------------------------. /*------------------------------------------------------------.
@ -1113,7 +1199,7 @@ YYLTYPE yylloc;
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */ be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow", yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp), &yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp), &yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp), &yyls1, yysize * sizeof (*yylsp),
@ -1124,11 +1210,11 @@ YYLTYPE yylloc;
} }
#else /* no yyoverflow */ #else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE # ifndef YYSTACK_RELOCATE
goto yyoverflowlab; goto yyexhaustedlab;
# else # else
/* Extend the stack our own way. */ /* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize) if (YYMAXDEPTH <= yystacksize)
goto yyoverflowlab; goto yyexhaustedlab;
yystacksize *= 2; yystacksize *= 2;
if (YYMAXDEPTH < yystacksize) if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH; yystacksize = YYMAXDEPTH;
@ -1138,7 +1224,7 @@ YYLTYPE yylloc;
union yyalloc *yyptr = union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr) if (! yyptr)
goto yyoverflowlab; goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs); YYSTACK_RELOCATE (yyvs);
YYSTACK_RELOCATE (yyls); YYSTACK_RELOCATE (yyls);
@ -1438,10 +1524,11 @@ yyreduce:
break; break;
default: break;
} }
/* Line 1037 of yacc.c. */ /* Line 1126 of yacc.c. */
#line 1445 "ast_expr2.c" #line 1532 "ast_expr2.c"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
@ -1480,12 +1567,36 @@ yyerrlab:
if (YYPACT_NINF < yyn && yyn < YYLAST) if (YYPACT_NINF < yyn && yyn < YYLAST)
{ {
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar); int yytype = YYTRANSLATE (yychar);
const char* yyprefix; YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
char *yymsg; YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
char *yymsg = 0;
# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx; 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 /* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */ YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0; int yyxbegin = yyn < 0 ? -yyn : 0;
@ -1493,48 +1604,68 @@ yyerrlab:
/* Stay within bounds of both yycheck and yytname. */ /* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn; int yychecklim = YYLAST - yyn;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 0; int yycount = 1;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
yyprefix = ", expecting ";
for (yyx = yyxbegin; yyx < yyxend; ++yyx) for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{ {
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
yycount += 1;
if (yycount == 5)
{ {
yysize = 0; yycount = 1;
yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break; break;
} }
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
} }
yysize += (sizeof ("syntax error, unexpected ")
+ yystrlen (yytname[yytype]));
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
yyp = yystpcpy (yyp, yytname[yytype]);
if (yycount < 5) yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg)
{
/* 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 = *yyf))
{ {
yyprefix = ", expecting "; if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
for (yyx = yyxbegin; yyx < yyxend; ++yyx) {
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yyp += yytnamerr (yyp, yyarg[yyi++]);
{ yyf += 2;
yyp = yystpcpy (yyp, yyprefix); }
yyp = yystpcpy (yyp, yytname[yyx]); else
yyprefix = " or "; {
} yyp++;
yyf++;
}
} }
yyerror (yymsg); yyerror (yymsg);
YYSTACK_FREE (yymsg); YYSTACK_FREE (yymsg);
} }
else else
yyerror ("syntax error; also virtual memory exhausted"); {
yyerror (YY_("syntax error"));
goto yyexhaustedlab;
}
} }
else else
#endif /* YYERROR_VERBOSE */ #endif /* YYERROR_VERBOSE */
yyerror ("syntax error"); yyerror (YY_("syntax error"));
} }
yyerror_range[0] = yylloc; yyerror_range[0] = yylloc;
@ -1546,18 +1677,9 @@ yyerrlab:
if (yychar <= YYEOF) if (yychar <= YYEOF)
{ {
/* If at end of input, pop the error token, /* Return failure if at end of input. */
then the rest of the stack, then return failure. */
if (yychar == YYEOF) if (yychar == YYEOF)
for (;;) YYABORT;
{
yyerror_range[0] = *yylsp;
YYPOPSTACK;
if (yyssp == yyss)
YYABORT;
yydestruct ("Error: popping",
yystos[*yyssp], yyvsp, yylsp);
}
} }
else else
{ {
@ -1576,12 +1698,11 @@ yyerrlab:
`---------------------------------------------------*/ `---------------------------------------------------*/
yyerrorlab: yyerrorlab:
#ifdef __GNUC__ /* Pacify compilers like GCC when the user code never invokes
/* Pacify GCC when the user code never invokes YYERROR and the label YYERROR and the label yyerrorlab therefore never appears in user
yyerrorlab therefore never appears in user code. */ code. */
if (0) if (0)
goto yyerrorlab; goto yyerrorlab;
#endif
yyerror_range[0] = yylsp[1-yylen]; yyerror_range[0] = yylsp[1-yylen];
yylsp -= yylen; yylsp -= yylen;
@ -1651,23 +1772,29 @@ yyacceptlab:
| yyabortlab -- YYABORT comes here. | | yyabortlab -- YYABORT comes here. |
`-----------------------------------*/ `-----------------------------------*/
yyabortlab: yyabortlab:
yydestruct ("Error: discarding lookahead",
yytoken, &yylval, &yylloc);
yychar = YYEMPTY;
yyresult = 1; yyresult = 1;
goto yyreturn; goto yyreturn;
#ifndef yyoverflow #ifndef yyoverflow
/*----------------------------------------------. /*-------------------------------------------------.
| yyoverflowlab -- parser overflow comes here. | | yyexhaustedlab -- memory exhaustion comes here. |
`----------------------------------------------*/ `-------------------------------------------------*/
yyoverflowlab: yyexhaustedlab:
yyerror ("parser stack overflow"); yyerror (YY_("memory exhausted"));
yyresult = 2; yyresult = 2;
/* Fall through. */ /* Fall through. */
#endif #endif
yyreturn: yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp, yylsp);
YYPOPSTACK;
}
#ifndef yyoverflow #ifndef yyoverflow
if (yyss != yyssa) if (yyss != yyssa)
YYSTACK_FREE (yyss); YYSTACK_FREE (yyss);

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 2.0. */ /* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. */ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a /* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction. Bison output file, you may use that output file without restriction.
@ -52,6 +52,7 @@
TOKEN = 278 TOKEN = 278
}; };
#endif #endif
/* Tokens. */
#define TOK_COLONCOLON 258 #define TOK_COLONCOLON 258
#define TOK_COND 259 #define TOK_COND 259
#define TOK_OR 260 #define TOK_OR 260
@ -82,8 +83,8 @@
typedef union YYSTYPE { typedef union YYSTYPE {
struct val *val; struct val *val;
} YYSTYPE; } YYSTYPE;
/* Line 1318 of yacc.c. */ /* Line 1447 of yacc.c. */
#line 87 "ast_expr2.h" #line 88 "ast_expr2.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1

@ -29,10 +29,10 @@
#include <asterisk/ast_expr.h> #include <asterisk/ast_expr.h>
#include <asterisk/logger.h> #include <asterisk/logger.h>
#ifdef LONG_LONG_MIN #if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
#define QUAD_MIN LONG_LONG_MIN #define QUAD_MIN LONG_LONG_MIN
#endif #endif
#ifdef LONG_LONG_MAX #if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
#define QUAD_MAX LONG_LONG_MAX #define QUAD_MAX LONG_LONG_MAX
#endif #endif

Loading…
Cancel
Save