remove extra dependencies

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming 2005-08-26 19:55:11 +00:00
parent 66e69e0143
commit 6319baba24
3 changed files with 102 additions and 129 deletions

View File

@ -352,10 +352,10 @@ ifneq ($(wildcard .tags-depend),)
include .tags-depend
endif
ast_expr2.c: FORCE
ast_expr2.c:
bison -d --name-prefix=ast_yy ast_expr2.y -o ast_expr2.c
ast_expr2f.c: FORCE
ast_expr2f.c:
flex ast_expr2.fl
testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */
/* A Bison parser, made by GNU Bison 1.875. */
/* 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 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
@ -260,7 +260,7 @@ typedef union YYSTYPE {
struct val *val;
} YYSTYPE;
/* Line 191 of yacc.c. */
#line 264 "ast_expr2.c"
#line 263 "ast_expr2.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@ -287,29 +287,22 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
/* Line 214 of yacc.c. */
#line 291 "ast_expr2.c"
#line 290 "ast_expr2.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
# ifndef YYFREE
# define YYFREE free
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# endif
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# endif
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
@ -322,21 +315,20 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
&& defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short int yyss;
short yyss;
YYSTYPE yyvs;
YYLTYPE yyls;
};
@ -347,13 +339,13 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
((N) * (sizeof (short) + 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__
# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
@ -389,7 +381,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
typedef short int yysigned_char;
typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@ -484,10 +476,10 @@ static const unsigned char yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "TOK_COLONCOLON", "TOK_COND", "TOK_OR",
"TOK_AND", "TOK_NE", "TOK_LE", "TOK_GE", "TOK_LT", "TOK_GT", "TOK_EQ",
"TOK_MINUS", "TOK_PLUS", "TOK_MOD", "TOK_DIV", "TOK_MULT", "TOK_COMPL",
"TOK_EQTILDE", "TOK_COLON", "TOK_LP", "TOK_RP", "TOKEN", "$accept",
"$end", "error", "$undefined", "TOK_COLONCOLON", "TOK_COND", "TOK_OR",
"TOK_AND", "TOK_NE", "TOK_LE", "TOK_GE", "TOK_LT", "TOK_GT", "TOK_EQ",
"TOK_MINUS", "TOK_PLUS", "TOK_MOD", "TOK_DIV", "TOK_MULT", "TOK_COMPL",
"TOK_EQTILDE", "TOK_COLON", "TOK_LP", "TOK_RP", "TOKEN", "$accept",
"start", "expr", 0
};
#endif
@ -495,7 +487,7 @@ static const char *const yytname[] =
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
static const unsigned short int yytoknum[] =
static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@ -632,8 +624,7 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@ -667,11 +658,11 @@ while (0)
are run). */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
((Current).first_line = (Rhs)[1].first_line, \
(Current).first_column = (Rhs)[1].first_column, \
(Current).last_line = (Rhs)[N].last_line, \
(Current).last_column = (Rhs)[N].last_column)
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.first_line = Rhs[1].first_line; \
Current.first_column = Rhs[1].first_column; \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
@ -715,17 +706,17 @@ do { \
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
| TOP (cinluded). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short int *bottom, short int *top)
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
short int *bottom;
short int *top;
short *bottom;
short *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@ -755,9 +746,9 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
unsigned int yylno = yyrline[yyrule];
unsigned int yylineno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
yyrule - 1, yylno);
yyrule - 1, yylineno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
@ -794,7 +785,7 @@ int yydebug;
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
@ -998,9 +989,9 @@ YYLTYPE yylloc;
to reallocate them elsewhere. */
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
register short int *yyssp;
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
@ -1041,7 +1032,6 @@ YYLTYPE yylloc;
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
goto yysetstate;
/*------------------------------------------------------------.
@ -1067,7 +1057,7 @@ YYLTYPE yylloc;
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short int *yyss1 = yyss;
short *yyss1 = yyss;
YYLTYPE *yyls1 = yyls;
/* Each stack pointer address is followed by the size of the
@ -1095,7 +1085,7 @@ YYLTYPE yylloc;
yystacksize = YYMAXDEPTH;
{
short int *yyss1 = yyss;
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
@ -1224,7 +1214,7 @@ yyreduce:
yyval = yyvsp[1-yylen];
/* Default location. */
YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
@ -1376,8 +1366,8 @@ yyreduce:
}
/* Line 1010 of yacc.c. */
#line 1381 "ast_expr2.c"
/* Line 991 of yacc.c. */
#line 1370 "ast_expr2.c"
yyvsp -= yylen;
yyssp -= yylen;
@ -1418,33 +1408,18 @@ yyerrlab:
{
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
const char* yyprefix;
char *yymsg;
int yyx;
int yyx, yycount;
yycount = 0;
/* 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;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 0;
yyprefix = ", expecting ";
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
yycount += 1;
if (yycount == 5)
{
yysize = 0;
break;
}
}
yysize += (sizeof ("syntax error, unexpected ")
+ yystrlen (yytname[yytype]));
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("syntax error, unexpected ") + 1;
yysize += yystrlen (yytname[yytype]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
@ -1453,13 +1428,16 @@ yyerrlab:
if (yycount < 5)
{
yyprefix = ", expecting ";
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
yyp = yystpcpy (yyp, yyprefix);
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yyprefix = " or ";
yycount++;
}
}
yyerror (yymsg);
@ -1480,59 +1458,53 @@ yyerrlab:
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
/* Return failure if at end of input. */
if (yychar == YYEOF)
{
/* If at end of input, pop the error token,
then the rest of the stack, then return failure. */
if (yychar == YYEOF)
for (;;)
{
YYPOPSTACK;
if (yyssp == yyss)
YYABORT;
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[*yyssp], yyvsp, yylsp);
}
/* Pop the error token. */
YYPOPSTACK;
/* Pop the rest of the stack. */
while (yyss < yyssp)
{
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[*yyssp], yyvsp, yylsp);
YYPOPSTACK;
}
YYABORT;
}
else
{
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
yydestruct (yytoken, &yylval, &yylloc);
yychar = YYEMPTY;
*++yylerrsp = yylloc;
}
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
yydestruct (yytoken, &yylval, &yylloc);
yychar = YYEMPTY;
*++yylerrsp = yylloc;
}
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
goto yyerrlab2;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action. |
`----------------------------------------------------*/
yyerrlab1:
#ifdef __GNUC__
/* Pacify GCC when the user code never invokes YYERROR and the label
yyerrorlab therefore never appears in user code. */
if (0)
goto yyerrorlab;
/* Suppress GCC warning that yyerrlab1 is unused when no action
invokes YYERROR. */
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
&& !defined __cplusplus
__attribute__ ((__unused__))
#endif
yyvsp -= yylen;
yyssp -= yylen;
yystate = *yyssp;
yylerrsp = yylsp;
*++yylerrsp = yyloc;
yylsp -= yylen;
goto yyerrlab1;
goto yyerrlab2;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
/*---------------------------------------------------------------.
| yyerrlab2 -- pop states until the error token can be shifted. |
`---------------------------------------------------------------*/
yyerrlab2:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@ -1555,8 +1527,9 @@ yyerrlab1:
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[yystate], yyvsp, yylsp);
YYPOPSTACK;
yystate = *yyssp;
yyvsp--;
yystate = *--yyssp;
yylsp--;
YY_STACK_PRINT (yyss, yyssp);
}
@ -1566,7 +1539,7 @@ yyerrlab1:
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
YYLLOC_DEFAULT (yyloc, yylsp, yylerrsp - yylsp);
YYLLOC_DEFAULT (yyloc, yylsp, (yylerrsp - yylsp));
*++yylsp = yyloc;
yystate = yyn;

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */
/* A Bison parser, made by GNU Bison 1.875. */
/* 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 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
@ -82,8 +82,8 @@
typedef union YYSTYPE {
struct val *val;
} YYSTYPE;
/* Line 1285 of yacc.c. */
#line 87 "ast_expr2.h"
/* Line 1249 of yacc.c. */
#line 86 "ast_expr2.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1