remove usage of ngspiceVersion.xml in autogen.sh
This commit is contained in:
parent
a8a743d620
commit
fbf52906b0
|
|
@ -172,9 +172,7 @@ $znew
|
|||
echo "-->"$ADMSDIR/$adms_dir
|
||||
(
|
||||
cd $ADMSDIR/$adms_dir
|
||||
$ADMSXML `ls admsva/*.va` -Iadmsva -xv \
|
||||
-e ../admst/ngspiceVersion.xml \
|
||||
-e ../admst/ngspiceMakefile.am.xml
|
||||
$ADMSXML `ls admsva/*.va` -Iadmsva -xv -e ../admst/ngspiceMakefile.am.xml
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -1,24 +1,22 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 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
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
|
@ -29,7 +27,7 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
|
@ -47,7 +45,7 @@
|
|||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.3"
|
||||
#define YYBISON_VERSION "2.4.2"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
|
|
@ -55,50 +53,29 @@
|
|||
/* Pure parsers. */
|
||||
#define YYPURE 1
|
||||
|
||||
/* Push parsers. */
|
||||
#define YYPUSH 0
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 1
|
||||
|
||||
/* Substitute the variable and function names. */
|
||||
#define yyparse PPparse
|
||||
#define yylex PPlex
|
||||
#define yyerror PPerror
|
||||
#define yylval PPlval
|
||||
#define yychar PPchar
|
||||
#define yydebug PPdebug
|
||||
#define yynerrs PPnerrs
|
||||
#define yylloc PPlloc
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
TOK_NUM = 258,
|
||||
TOK_STR = 259,
|
||||
TOK_LE = 260,
|
||||
TOK_GE = 261,
|
||||
TOK_NE = 262,
|
||||
TOK_LRANGE = 263,
|
||||
TOK_RRANGE = 264,
|
||||
NEG = 265
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define TOK_NUM 258
|
||||
#define TOK_STR 259
|
||||
#define TOK_LE 260
|
||||
#define TOK_GE 261
|
||||
#define TOK_NE 262
|
||||
#define TOK_LRANGE 263
|
||||
#define TOK_RRANGE 264
|
||||
#define NEG 265
|
||||
|
||||
|
||||
|
||||
#define yyparse PPparse
|
||||
#define yylex PPlex
|
||||
#define yyerror PPerror
|
||||
#define yylval PPlval
|
||||
#define yychar PPchar
|
||||
#define yydebug PPdebug
|
||||
#define yynerrs PPnerrs
|
||||
#define yylloc PPlloc
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
#line 1 "parse-bison.y"
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 1 "./parse-bison.y"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -134,6 +111,9 @@
|
|||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 116 "parse-bison.c"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 1
|
||||
|
|
@ -152,20 +132,45 @@
|
|||
# define YYTOKEN_TABLE 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
TOK_NUM = 258,
|
||||
TOK_STR = 259,
|
||||
TOK_LE = 260,
|
||||
TOK_GE = 261,
|
||||
TOK_NE = 262,
|
||||
TOK_LRANGE = 263,
|
||||
TOK_RRANGE = 264,
|
||||
NEG = 265
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 50 "parse-bison.y"
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 50 "./parse-bison.y"
|
||||
|
||||
double num;
|
||||
const char *str;
|
||||
struct pnode *pnode;
|
||||
}
|
||||
/* Line 187 of yacc.c. */
|
||||
#line 165 "parse-bison.c"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 170 "parse-bison.c"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
|
|
@ -185,8 +190,8 @@ typedef struct YYLTYPE
|
|||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 216 of yacc.c. */
|
||||
#line 190 "parse-bison.c"
|
||||
/* Line 264 of yacc.c */
|
||||
#line 195 "parse-bison.c"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
|
|
@ -236,7 +241,7 @@ typedef short int yytype_int16;
|
|||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||||
|
||||
#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
|
|
@ -261,14 +266,14 @@ typedef short int yytype_int16;
|
|||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static int
|
||||
YYID (int i)
|
||||
YYID (int yyi)
|
||||
#else
|
||||
static int
|
||||
YYID (i)
|
||||
int i;
|
||||
YYID (yyi)
|
||||
int yyi;
|
||||
#endif
|
||||
{
|
||||
return i;
|
||||
return yyi;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -350,9 +355,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
|
|||
/* A type that is properly aligned for any stack member. */
|
||||
union yyalloc
|
||||
{
|
||||
yytype_int16 yyss;
|
||||
YYSTYPE yyvs;
|
||||
YYLTYPE yyls;
|
||||
yytype_int16 yyss_alloc;
|
||||
YYSTYPE yyvs_alloc;
|
||||
YYLTYPE yyls_alloc;
|
||||
};
|
||||
|
||||
/* The size of the maximum gap between one aligned stack and the next. */
|
||||
|
|
@ -387,12 +392,12 @@ union yyalloc
|
|||
elements in the stack, and YYPTR gives the new location of the
|
||||
stack. Advance YYPTR to a properly aligned location for the next
|
||||
stack. */
|
||||
# define YYSTACK_RELOCATE(Stack) \
|
||||
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yynewbytes; \
|
||||
YYCOPY (&yyptr->Stack, Stack, yysize); \
|
||||
Stack = &yyptr->Stack; \
|
||||
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
|
||||
Stack = &yyptr->Stack_alloc; \
|
||||
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
||||
yyptr += yynewbytes / sizeof (*yyptr); \
|
||||
} \
|
||||
|
|
@ -659,9 +664,18 @@ static const yytype_uint8 yystos[] =
|
|||
|
||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||
Once GCC version 2 has supplanted version 1, this can go. */
|
||||
Once GCC version 2 has supplanted version 1, this can go. However,
|
||||
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
|
||||
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||
discussed. */
|
||||
|
||||
#define YYFAIL goto yyerrlab
|
||||
#if defined YYFAIL
|
||||
/* This is here to suppress warnings from the GCC cpp's
|
||||
-Wunused-macros. Normally we don't worry about that warning, but
|
||||
some users do, and we want to make it easy for users to remove
|
||||
YYFAIL uses, which will produce warnings from Bison 2.5. */
|
||||
#endif
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
|
|
@ -718,7 +732,7 @@ while (YYID (0))
|
|||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if YYLTYPE_IS_TRIVIAL
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
|
|
@ -840,17 +854,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval)
|
|||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static void
|
||||
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
|
||||
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
|
||||
#else
|
||||
static void
|
||||
yy_stack_print (bottom, top)
|
||||
yytype_int16 *bottom;
|
||||
yytype_int16 *top;
|
||||
yy_stack_print (yybottom, yytop)
|
||||
yytype_int16 *yybottom;
|
||||
yytype_int16 *yytop;
|
||||
#endif
|
||||
{
|
||||
YYFPRINTF (stderr, "Stack now");
|
||||
for (; bottom <= top; ++bottom)
|
||||
YYFPRINTF (stderr, " %d", *bottom);
|
||||
for (; yybottom <= yytop; yybottom++)
|
||||
{
|
||||
int yybot = *yybottom;
|
||||
YYFPRINTF (stderr, " %d", yybot);
|
||||
}
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
|
||||
|
|
@ -887,11 +904,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, line, retval)
|
|||
/* The symbols being reduced. */
|
||||
for (yyi = 0; yyi < yynrhs; yyi++)
|
||||
{
|
||||
fprintf (stderr, " $%d = ", yyi + 1);
|
||||
YYFPRINTF (stderr, " $%d = ", yyi + 1);
|
||||
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
|
||||
&(yyvsp[(yyi + 1) - (yynrhs)])
|
||||
, &(yylsp[(yyi + 1) - (yynrhs)]) , line, retval);
|
||||
fprintf (stderr, "\n");
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1177,10 +1194,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, line, retval)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
|
|
@ -1199,10 +1214,9 @@ int yyparse ();
|
|||
|
||||
|
||||
|
||||
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|
|
@ -1227,24 +1241,59 @@ yyparse (line, retval)
|
|||
#endif
|
||||
#endif
|
||||
{
|
||||
/* The look-ahead symbol. */
|
||||
/* The lookahead symbol. */
|
||||
int yychar;
|
||||
|
||||
/* The semantic value of the look-ahead symbol. */
|
||||
/* The semantic value of the lookahead symbol. */
|
||||
YYSTYPE yylval;
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;
|
||||
/* Location data for the look-ahead symbol. */
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc;
|
||||
|
||||
int yystate;
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;
|
||||
|
||||
int yystate;
|
||||
/* Number of tokens to shift before error messages enabled. */
|
||||
int yyerrstatus;
|
||||
|
||||
/* The stacks and their tools:
|
||||
`yyss': related to states.
|
||||
`yyvs': related to semantic values.
|
||||
`yyls': related to locations.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
yytype_int16 yyssa[YYINITDEPTH];
|
||||
yytype_int16 *yyss;
|
||||
yytype_int16 *yyssp;
|
||||
|
||||
/* The semantic value stack. */
|
||||
YYSTYPE yyvsa[YYINITDEPTH];
|
||||
YYSTYPE *yyvs;
|
||||
YYSTYPE *yyvsp;
|
||||
|
||||
/* The location stack. */
|
||||
YYLTYPE yylsa[YYINITDEPTH];
|
||||
YYLTYPE *yyls;
|
||||
YYLTYPE *yylsp;
|
||||
|
||||
/* The locations where the error started and ended. */
|
||||
YYLTYPE yyerror_range[2];
|
||||
|
||||
YYSIZE_T yystacksize;
|
||||
|
||||
int yyn;
|
||||
int yyresult;
|
||||
/* Number of tokens to shift before error messages enabled. */
|
||||
int yyerrstatus;
|
||||
/* Look-ahead token as an internal (translated) token number. */
|
||||
int yytoken = 0;
|
||||
/* Lookahead token as an internal (translated) token number. */
|
||||
int yytoken;
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
YYLTYPE yyloc;
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
/* Buffer for error messages, and its allocated size. */
|
||||
char yymsgbuf[128];
|
||||
|
|
@ -1252,74 +1301,51 @@ YYLTYPE yylloc;
|
|||
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
|
||||
#endif
|
||||
|
||||
/* Three stacks and their tools:
|
||||
`yyss': related to states,
|
||||
`yyvs': related to semantic values,
|
||||
`yyls': related to locations.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
yytype_int16 yyssa[YYINITDEPTH];
|
||||
yytype_int16 *yyss = yyssa;
|
||||
yytype_int16 *yyssp;
|
||||
|
||||
/* The semantic value stack. */
|
||||
YYSTYPE yyvsa[YYINITDEPTH];
|
||||
YYSTYPE *yyvs = yyvsa;
|
||||
YYSTYPE *yyvsp;
|
||||
|
||||
/* The location stack. */
|
||||
YYLTYPE yylsa[YYINITDEPTH];
|
||||
YYLTYPE *yyls = yylsa;
|
||||
YYLTYPE *yylsp;
|
||||
/* The locations where the error started and ended. */
|
||||
YYLTYPE yyerror_range[2];
|
||||
|
||||
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
|
||||
|
||||
YYSIZE_T yystacksize = YYINITDEPTH;
|
||||
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
YYLTYPE yyloc;
|
||||
|
||||
/* The number of symbols on the RHS of the reduced rule.
|
||||
Keep to zero when no symbol should be popped. */
|
||||
int yylen = 0;
|
||||
|
||||
yytoken = 0;
|
||||
yyss = yyssa;
|
||||
yyvs = yyvsa;
|
||||
yyls = yylsa;
|
||||
yystacksize = YYINITDEPTH;
|
||||
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
|
||||
yystate = 0;
|
||||
yyerrstatus = 0;
|
||||
yynerrs = 0;
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
|
||||
/* Initialize stack pointers.
|
||||
Waste one element of value and location stack
|
||||
so that they stay on the same level as the state stack.
|
||||
The wasted elements are never initialized. */
|
||||
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;
|
||||
yylsp = yyls;
|
||||
#if YYLTYPE_IS_TRIVIAL
|
||||
|
||||
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
/* Initialize the default location before parsing starts. */
|
||||
yylloc.first_line = yylloc.last_line = 1;
|
||||
yylloc.first_column = yylloc.last_column = 0;
|
||||
yylloc.first_column = yylloc.last_column = 1;
|
||||
#endif
|
||||
|
||||
/* User initialization code. */
|
||||
|
||||
/* User initialization code. */
|
||||
#line 102 "parse-bison.y"
|
||||
/* Line 1251 of yacc.c */
|
||||
#line 102 "./parse-bison.y"
|
||||
{
|
||||
yylval.num = 0.0;
|
||||
}
|
||||
/* Line 1069 of yacc.c. */
|
||||
#line 1322 "parse-bison.c"
|
||||
|
||||
/* Line 1251 of yacc.c */
|
||||
#line 1347 "parse-bison.c"
|
||||
yyvsp[0] = yylval;
|
||||
|
||||
goto yysetstate;
|
||||
|
||||
/*------------------------------------------------------------.
|
||||
|
|
@ -1356,6 +1382,7 @@ YYLTYPE yylloc;
|
|||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
&yyls1, yysize * sizeof (*yylsp),
|
||||
&yystacksize);
|
||||
|
||||
yyls = yyls1;
|
||||
yyss = yyss1;
|
||||
yyvs = yyvs1;
|
||||
|
|
@ -1377,9 +1404,9 @@ YYLTYPE yylloc;
|
|||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||
if (! yyptr)
|
||||
goto yyexhaustedlab;
|
||||
YYSTACK_RELOCATE (yyss);
|
||||
YYSTACK_RELOCATE (yyvs);
|
||||
YYSTACK_RELOCATE (yyls);
|
||||
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
||||
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
|
||||
YYSTACK_RELOCATE (yyls_alloc, yyls);
|
||||
# undef YYSTACK_RELOCATE
|
||||
if (yyss1 != yyssa)
|
||||
YYSTACK_FREE (yyss1);
|
||||
|
|
@ -1400,6 +1427,9 @@ YYLTYPE yylloc;
|
|||
|
||||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||||
|
||||
if (yystate == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
goto yybackup;
|
||||
|
||||
/*-----------.
|
||||
|
|
@ -1408,16 +1438,16 @@ YYLTYPE yylloc;
|
|||
yybackup:
|
||||
|
||||
/* Do appropriate processing given the current state. Read a
|
||||
look-ahead token if we need one and don't already have one. */
|
||||
lookahead token if we need one and don't already have one. */
|
||||
|
||||
/* First try to decide what to do without reference to look-ahead token. */
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYPACT_NINF)
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a look-ahead token if don't already have one. */
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
|
||||
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
|
||||
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
|
||||
if (yychar == YYEMPTY)
|
||||
{
|
||||
YYDPRINTF ((stderr, "Reading a token: "));
|
||||
|
|
@ -1449,20 +1479,16 @@ yybackup:
|
|||
goto yyreduce;
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
/* Count tokens shifted since error; after three, turn off error
|
||||
status. */
|
||||
if (yyerrstatus)
|
||||
yyerrstatus--;
|
||||
|
||||
/* Shift the look-ahead token. */
|
||||
/* Shift the lookahead token. */
|
||||
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
||||
|
||||
/* Discard the shifted token unless it is eof. */
|
||||
if (yychar != YYEOF)
|
||||
yychar = YYEMPTY;
|
||||
/* Discard the shifted token. */
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
*++yyvsp = yylval;
|
||||
|
|
@ -1503,22 +1529,30 @@ yyreduce:
|
|||
switch (yyn)
|
||||
{
|
||||
case 2:
|
||||
#line 113 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 113 "./parse-bison.y"
|
||||
{ *retval = NULL; ;}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
#line 114 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 114 "./parse-bison.y"
|
||||
{ *retval = (yyvsp[(1) - (1)].pnode); ;}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
#line 119 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 119 "./parse-bison.y"
|
||||
{ (yyvsp[(1) - (2)].pnode)->pn_next = (yyvsp[(2) - (2)].pnode); (yyvsp[(2) - (2)].pnode)->pn_use ++; (yyval.pnode) = (yyvsp[(1) - (2)].pnode); ;}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
#line 123 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 123 "./parse-bison.y"
|
||||
{
|
||||
(yyvsp[(1) - (1)].pnode)->pn_name = copy_substring((yylsp[(1) - (1)]).start, (yylsp[(1) - (1)]).stop);
|
||||
(yyval.pnode) = (yyvsp[(1) - (1)].pnode);
|
||||
|
|
@ -1526,129 +1560,178 @@ yyreduce:
|
|||
break;
|
||||
|
||||
case 7:
|
||||
#line 130 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 130 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mknnode((yyvsp[(1) - (1)].num)); ;}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
#line 131 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 131 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mksnode((yyvsp[(1) - (1)].str)); ;}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
#line 133 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 133 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_COMMA, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
#line 134 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 134 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_PLUS, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
#line 135 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 135 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_MINUS, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
#line 136 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 136 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_TIMES, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
#line 137 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 137 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_MOD, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
#line 138 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 138 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_DIVIDE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
#line 139 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 139 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_POWER, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
#line 141 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 141 "./parse-bison.y"
|
||||
{ (yyval.pnode) = (yyvsp[(2) - (3)].pnode); ;}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
#line 143 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 143 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkunode(PT_OP_UMINUS, (yyvsp[(2) - (2)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 18:
|
||||
#line 144 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 144 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkunode(PT_OP_NOT, (yyvsp[(2) - (2)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 19:
|
||||
#line 146 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 146 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkfnode((yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].pnode)); if(!(yyval.pnode)) YYABORT; ;}
|
||||
break;
|
||||
|
||||
case 20:
|
||||
#line 148 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 148 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_EQ, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 21:
|
||||
#line 149 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 149 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_NE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 22:
|
||||
#line 150 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 150 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_GT, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 23:
|
||||
#line 151 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 151 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_LT, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 24:
|
||||
#line 152 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 152 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_GE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 25:
|
||||
#line 153 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 153 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_LE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 26:
|
||||
#line 155 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 155 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_AND, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 27:
|
||||
#line 156 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 156 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_OR, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 28:
|
||||
#line 158 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 158 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_INDX, (yyvsp[(1) - (4)].pnode), (yyvsp[(3) - (4)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 29:
|
||||
#line 159 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 159 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_RANGE, (yyvsp[(1) - (4)].pnode), (yyvsp[(3) - (4)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 30:
|
||||
#line 160 "parse-bison.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 160 "./parse-bison.y"
|
||||
{ (yyval.pnode) = mkbnode(PT_OP_TERNARY,(yyvsp[(1) - (5)].pnode),
|
||||
mkbnode(PT_OP_COMMA,(yyvsp[(3) - (5)].pnode),(yyvsp[(5) - (5)].pnode))); ;}
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1267 of yacc.c. */
|
||||
#line 1652 "parse-bison.c"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1735 "parse-bison.c"
|
||||
default: break;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
|
@ -1724,7 +1807,7 @@ yyerrlab:
|
|||
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse look-ahead token after an
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
|
||||
if (yychar <= YYEOF)
|
||||
|
|
@ -1741,7 +1824,7 @@ yyerrlab:
|
|||
}
|
||||
}
|
||||
|
||||
/* Else will try to reuse look-ahead token after shifting the error
|
||||
/* Else will try to reuse lookahead token after shifting the error
|
||||
token. */
|
||||
goto yyerrlab1;
|
||||
|
||||
|
|
@ -1799,14 +1882,11 @@ yyerrlab1:
|
|||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
yyerror_range[1] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
the look-ahead. YYLOC is available though. */
|
||||
the lookahead. YYLOC is available though. */
|
||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
||||
*++yylsp = yyloc;
|
||||
|
||||
|
|
@ -1831,7 +1911,7 @@ yyabortlab:
|
|||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#ifndef yyoverflow
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
|
|
@ -1842,7 +1922,7 @@ yyexhaustedlab:
|
|||
#endif
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, &yylloc, line, retval);
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
|
|
@ -1868,7 +1948,9 @@ yyreturn:
|
|||
}
|
||||
|
||||
|
||||
#line 164 "parse-bison.y"
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
#line 164 "./parse-bison.y"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,22 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 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
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
|
@ -29,10 +27,11 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
|
|
@ -49,33 +48,28 @@
|
|||
NEG = 265
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define TOK_NUM 258
|
||||
#define TOK_STR 259
|
||||
#define TOK_LE 260
|
||||
#define TOK_GE 261
|
||||
#define TOK_NE 262
|
||||
#define TOK_LRANGE 263
|
||||
#define TOK_RRANGE 264
|
||||
#define NEG 265
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 50 "parse-bison.y"
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 50 "./parse-bison.y"
|
||||
|
||||
double num;
|
||||
const char *str;
|
||||
struct pnode *pnode;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 75 "parse-bison.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 69 "parse-bison.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -94,3 +88,4 @@ typedef struct YYLTYPE
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
<!--
|
||||
$Id$
|
||||
$Log$
|
||||
Revision 1.18 2011-05-19 10:11:06 r29173
|
||||
Revision 1.19 2011-05-19 14:26:58 r29173
|
||||
remove usage of ngspiceVersion.xml in autogen.sh
|
||||
|
||||
Revision 1.18 2011/05/19 10:11:06 r29173
|
||||
all xml files are concatenated into one single file ngspice.xml - except ngspiceMakefile.am.xml
|
||||
|
||||
Revision 1.17 2011/02/21 19:40:23 dwarning
|
||||
|
|
@ -93,8 +96,40 @@
|
|||
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[name='hic0_full']">
|
||||
<admst:new datatype="attribute" arguments="ngspicename">
|
||||
<admst:push into="../attribute" select="." onduplicate="abort"/>
|
||||
<admst:value-to select="value" value="hicum0"/>
|
||||
</admst:new>
|
||||
</admst:when>
|
||||
<admst:when test="[name='hic2_full']">
|
||||
<admst:new datatype="attribute" arguments="ngspicename">
|
||||
<admst:push into="../attribute" select="." onduplicate="abort"/>
|
||||
<admst:value-to select="value" value="hicum2"/>
|
||||
</admst:new>
|
||||
</admst:when>
|
||||
<admst:when test="[name='bjt504_va']">
|
||||
<admst:new datatype="attribute" arguments="ngspicename">
|
||||
<admst:push into="../attribute" select="." onduplicate="abort"/>
|
||||
<admst:value-to select="value" value="mextram"/>
|
||||
</admst:new>
|
||||
</admst:when>
|
||||
<admst:when test="[name='psp102']">
|
||||
<admst:new datatype="attribute" arguments="ngspicename">
|
||||
<admst:push into="../attribute" select="." onduplicate="abort"/>
|
||||
<admst:value-to select="value" value="psp102"/>
|
||||
</admst:new>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:new datatype="attribute" arguments="ngspicename">
|
||||
<admst:push into="../attribute" select="." onduplicate="abort"/>
|
||||
<admst:value-of select="../name"/>
|
||||
<admst:value-to select="value" value="%s"/>
|
||||
</admst:new>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:variable name="module" select="%(attribute[name='ngspicename']/value)"/>
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ADMSXMLINTERFACE=\$(srcdir)/../admst
|
||||
|
|
@ -193,11 +228,7 @@ MAINTAINERCLEANFILES = Makefile.in
|
|||
|
||||
<admst:for-each select="/module">
|
||||
<admst:open file="Makefile.am">
|
||||
<admst:value-of select="/simulator/package_string"/>
|
||||
<admst:text format="##\n## Interface: %s\n"/>
|
||||
<admst:value-of select="/simulator/currentdate"/>
|
||||
<admst:value-of select="/simulator/fullname"/>
|
||||
<admst:text format="## created by: %s - %s\n"/>
|
||||
<admst:text format="## created automatically\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:message format="Makefile.am: file created\n"/>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,22 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 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
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
|
@ -29,7 +27,7 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
|
@ -47,7 +45,7 @@
|
|||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.3"
|
||||
#define YYBISON_VERSION "2.4.2"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
|
|
@ -55,17 +53,66 @@
|
|||
/* Pure parsers. */
|
||||
#define YYPURE 1
|
||||
|
||||
/* Push parsers. */
|
||||
#define YYPUSH 0
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 0
|
||||
|
||||
/* Substitute the variable and function names. */
|
||||
#define yyparse PTparse
|
||||
#define yylex PTlex
|
||||
#define yyerror PTerror
|
||||
#define yylval PTlval
|
||||
#define yychar PTchar
|
||||
#define yydebug PTdebug
|
||||
#define yynerrs PTnerrs
|
||||
#define yyparse PTparse
|
||||
#define yylex PTlex
|
||||
#define yyerror PTerror
|
||||
#define yylval PTlval
|
||||
#define yychar PTchar
|
||||
#define yydebug PTdebug
|
||||
#define yynerrs PTnerrs
|
||||
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 1 "./inpptree-parser.y"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "inpptree-parser.h"
|
||||
|
||||
extern int PTlex (YYSTYPE *lvalp, char **line);
|
||||
|
||||
static void PTerror (char **line, struct INPparseNode **retval, void *ckt, char const *);
|
||||
|
||||
#if defined (_MSC_VER)
|
||||
# define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 98 "inpptree-parser.c"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
# undef YYERROR_VERBOSE
|
||||
# define YYERROR_VERBOSE 1
|
||||
#else
|
||||
# define YYERROR_VERBOSE 0
|
||||
#endif
|
||||
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
|
|
@ -87,82 +134,36 @@
|
|||
NEG = 268
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define TOK_NUM 258
|
||||
#define TOK_STR 259
|
||||
#define TOK_LE 260
|
||||
#define TOK_LT 261
|
||||
#define TOK_GE 262
|
||||
#define TOK_GT 263
|
||||
#define TOK_EQ 264
|
||||
#define TOK_NE 265
|
||||
#define TOK_OR 266
|
||||
#define TOK_AND 267
|
||||
#define NEG 268
|
||||
|
||||
|
||||
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
#line 1 "inpptree-parser.y"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "inpptree-parser.h"
|
||||
|
||||
extern int PTlex (YYSTYPE *lvalp, char **line);
|
||||
|
||||
static void PTerror (char **line, struct INPparseNode **retval, void *ckt, char const *);
|
||||
|
||||
#if defined (_MSC_VER)
|
||||
# define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
# undef YYERROR_VERBOSE
|
||||
# define YYERROR_VERBOSE 1
|
||||
#else
|
||||
# define YYERROR_VERBOSE 0
|
||||
#endif
|
||||
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE 0
|
||||
#endif
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 31 "inpptree-parser.y"
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 31 "./inpptree-parser.y"
|
||||
|
||||
double num;
|
||||
const char *str;
|
||||
struct INPparseNode *pnode;
|
||||
}
|
||||
/* Line 187 of yacc.c. */
|
||||
#line 153 "inpptree-parser.c"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 155 "inpptree-parser.c"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 216 of yacc.c. */
|
||||
#line 166 "inpptree-parser.c"
|
||||
/* Line 264 of yacc.c */
|
||||
#line 167 "inpptree-parser.c"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
|
|
@ -212,7 +213,7 @@ typedef short int yytype_int16;
|
|||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||||
|
||||
#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
|
|
@ -237,14 +238,14 @@ typedef short int yytype_int16;
|
|||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static int
|
||||
YYID (int i)
|
||||
YYID (int yyi)
|
||||
#else
|
||||
static int
|
||||
YYID (i)
|
||||
int i;
|
||||
YYID (yyi)
|
||||
int yyi;
|
||||
#endif
|
||||
{
|
||||
return i;
|
||||
return yyi;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -325,9 +326,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
|
|||
/* A type that is properly aligned for any stack member. */
|
||||
union yyalloc
|
||||
{
|
||||
yytype_int16 yyss;
|
||||
YYSTYPE yyvs;
|
||||
};
|
||||
yytype_int16 yyss_alloc;
|
||||
YYSTYPE yyvs_alloc;
|
||||
};
|
||||
|
||||
/* The size of the maximum gap between one aligned stack and the next. */
|
||||
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
|
||||
|
|
@ -361,12 +362,12 @@ union yyalloc
|
|||
elements in the stack, and YYPTR gives the new location of the
|
||||
stack. Advance YYPTR to a properly aligned location for the next
|
||||
stack. */
|
||||
# define YYSTACK_RELOCATE(Stack) \
|
||||
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yynewbytes; \
|
||||
YYCOPY (&yyptr->Stack, Stack, yysize); \
|
||||
Stack = &yyptr->Stack; \
|
||||
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
|
||||
Stack = &yyptr->Stack_alloc; \
|
||||
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
||||
yyptr += yynewbytes / sizeof (*yyptr); \
|
||||
} \
|
||||
|
|
@ -599,9 +600,18 @@ static const yytype_uint8 yystos[] =
|
|||
|
||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||
Once GCC version 2 has supplanted version 1, this can go. */
|
||||
Once GCC version 2 has supplanted version 1, this can go. However,
|
||||
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
|
||||
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||
discussed. */
|
||||
|
||||
#define YYFAIL goto yyerrlab
|
||||
#if defined YYFAIL
|
||||
/* This is here to suppress warnings from the GCC cpp's
|
||||
-Wunused-macros. Normally we don't worry about that warning, but
|
||||
some users do, and we want to make it easy for users to remove
|
||||
YYFAIL uses, which will produce warnings from Bison 2.5. */
|
||||
#endif
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
|
|
@ -658,7 +668,7 @@ while (YYID (0))
|
|||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if YYLTYPE_IS_TRIVIAL
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
|
|
@ -778,17 +788,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, line, retval, ckt)
|
|||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static void
|
||||
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
|
||||
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
|
||||
#else
|
||||
static void
|
||||
yy_stack_print (bottom, top)
|
||||
yytype_int16 *bottom;
|
||||
yytype_int16 *top;
|
||||
yy_stack_print (yybottom, yytop)
|
||||
yytype_int16 *yybottom;
|
||||
yytype_int16 *yytop;
|
||||
#endif
|
||||
{
|
||||
YYFPRINTF (stderr, "Stack now");
|
||||
for (; bottom <= top; ++bottom)
|
||||
YYFPRINTF (stderr, " %d", *bottom);
|
||||
for (; yybottom <= yytop; yybottom++)
|
||||
{
|
||||
int yybot = *yybottom;
|
||||
YYFPRINTF (stderr, " %d", yybot);
|
||||
}
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
|
||||
|
|
@ -825,11 +838,11 @@ yy_reduce_print (yyvsp, yyrule, line, retval, ckt)
|
|||
/* The symbols being reduced. */
|
||||
for (yyi = 0; yyi < yynrhs; yyi++)
|
||||
{
|
||||
fprintf (stderr, " $%d = ", yyi + 1);
|
||||
YYFPRINTF (stderr, " $%d = ", yyi + 1);
|
||||
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
|
||||
&(yyvsp[(yyi + 1) - (yynrhs)])
|
||||
, line, retval, ckt);
|
||||
fprintf (stderr, "\n");
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1115,10 +1128,8 @@ yydestruct (yymsg, yytype, yyvaluep, line, retval, ckt)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
|
|
@ -1137,10 +1148,9 @@ int yyparse ();
|
|||
|
||||
|
||||
|
||||
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|
|
@ -1166,22 +1176,46 @@ yyparse (line, retval, ckt)
|
|||
#endif
|
||||
#endif
|
||||
{
|
||||
/* The look-ahead symbol. */
|
||||
/* The lookahead symbol. */
|
||||
int yychar;
|
||||
|
||||
/* The semantic value of the look-ahead symbol. */
|
||||
/* The semantic value of the lookahead symbol. */
|
||||
YYSTYPE yylval;
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;
|
||||
|
||||
int yystate;
|
||||
/* Number of tokens to shift before error messages enabled. */
|
||||
int yyerrstatus;
|
||||
|
||||
/* The stacks and their tools:
|
||||
`yyss': related to states.
|
||||
`yyvs': related to semantic values.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
yytype_int16 yyssa[YYINITDEPTH];
|
||||
yytype_int16 *yyss;
|
||||
yytype_int16 *yyssp;
|
||||
|
||||
/* The semantic value stack. */
|
||||
YYSTYPE yyvsa[YYINITDEPTH];
|
||||
YYSTYPE *yyvs;
|
||||
YYSTYPE *yyvsp;
|
||||
|
||||
YYSIZE_T yystacksize;
|
||||
|
||||
int yystate;
|
||||
int yyn;
|
||||
int yyresult;
|
||||
/* Number of tokens to shift before error messages enabled. */
|
||||
int yyerrstatus;
|
||||
/* Look-ahead token as an internal (translated) token number. */
|
||||
int yytoken = 0;
|
||||
/* Lookahead token as an internal (translated) token number. */
|
||||
int yytoken;
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
/* Buffer for error messages, and its allocated size. */
|
||||
char yymsgbuf[128];
|
||||
|
|
@ -1189,51 +1223,28 @@ int yynerrs;
|
|||
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
|
||||
#endif
|
||||
|
||||
/* Three stacks and their tools:
|
||||
`yyss': related to states,
|
||||
`yyvs': related to semantic values,
|
||||
`yyls': related to locations.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
yytype_int16 yyssa[YYINITDEPTH];
|
||||
yytype_int16 *yyss = yyssa;
|
||||
yytype_int16 *yyssp;
|
||||
|
||||
/* The semantic value stack. */
|
||||
YYSTYPE yyvsa[YYINITDEPTH];
|
||||
YYSTYPE *yyvs = yyvsa;
|
||||
YYSTYPE *yyvsp;
|
||||
|
||||
|
||||
|
||||
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
|
||||
|
||||
YYSIZE_T yystacksize = YYINITDEPTH;
|
||||
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
|
||||
|
||||
/* The number of symbols on the RHS of the reduced rule.
|
||||
Keep to zero when no symbol should be popped. */
|
||||
int yylen = 0;
|
||||
|
||||
yytoken = 0;
|
||||
yyss = yyssa;
|
||||
yyvs = yyvsa;
|
||||
yystacksize = YYINITDEPTH;
|
||||
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
|
||||
yystate = 0;
|
||||
yyerrstatus = 0;
|
||||
yynerrs = 0;
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
|
||||
/* Initialize stack pointers.
|
||||
Waste one element of value and location stack
|
||||
so that they stay on the same level as the state stack.
|
||||
The wasted elements are never initialized. */
|
||||
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;
|
||||
|
||||
|
|
@ -1263,7 +1274,6 @@ int yynerrs;
|
|||
YYSTYPE *yyvs1 = yyvs;
|
||||
yytype_int16 *yyss1 = yyss;
|
||||
|
||||
|
||||
/* Each stack pointer address is followed by the size of the
|
||||
data in use in that stack, in bytes. This used to be a
|
||||
conditional around just the two extra args, but that might
|
||||
|
|
@ -1271,7 +1281,6 @@ int yynerrs;
|
|||
yyoverflow (YY_("memory exhausted"),
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
|
||||
&yystacksize);
|
||||
|
||||
yyss = yyss1;
|
||||
|
|
@ -1294,9 +1303,8 @@ int yynerrs;
|
|||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||
if (! yyptr)
|
||||
goto yyexhaustedlab;
|
||||
YYSTACK_RELOCATE (yyss);
|
||||
YYSTACK_RELOCATE (yyvs);
|
||||
|
||||
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
||||
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
|
||||
# undef YYSTACK_RELOCATE
|
||||
if (yyss1 != yyssa)
|
||||
YYSTACK_FREE (yyss1);
|
||||
|
|
@ -1307,7 +1315,6 @@ int yynerrs;
|
|||
yyssp = yyss + yysize - 1;
|
||||
yyvsp = yyvs + yysize - 1;
|
||||
|
||||
|
||||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||||
(unsigned long int) yystacksize));
|
||||
|
||||
|
|
@ -1317,6 +1324,9 @@ int yynerrs;
|
|||
|
||||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||||
|
||||
if (yystate == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
goto yybackup;
|
||||
|
||||
/*-----------.
|
||||
|
|
@ -1325,16 +1335,16 @@ int yynerrs;
|
|||
yybackup:
|
||||
|
||||
/* Do appropriate processing given the current state. Read a
|
||||
look-ahead token if we need one and don't already have one. */
|
||||
lookahead token if we need one and don't already have one. */
|
||||
|
||||
/* First try to decide what to do without reference to look-ahead token. */
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYPACT_NINF)
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a look-ahead token if don't already have one. */
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
|
||||
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
|
||||
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
|
||||
if (yychar == YYEMPTY)
|
||||
{
|
||||
YYDPRINTF ((stderr, "Reading a token: "));
|
||||
|
|
@ -1366,20 +1376,16 @@ yybackup:
|
|||
goto yyreduce;
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
/* Count tokens shifted since error; after three, turn off error
|
||||
status. */
|
||||
if (yyerrstatus)
|
||||
yyerrstatus--;
|
||||
|
||||
/* Shift the look-ahead token. */
|
||||
/* Shift the lookahead token. */
|
||||
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
||||
|
||||
/* Discard the shifted token unless it is eof. */
|
||||
if (yychar != YYEOF)
|
||||
yychar = YYEMPTY;
|
||||
/* Discard the shifted token. */
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
*++yyvsp = yylval;
|
||||
|
|
@ -1419,62 +1425,86 @@ yyreduce:
|
|||
switch (yyn)
|
||||
{
|
||||
case 2:
|
||||
#line 59 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 59 "./inpptree-parser.y"
|
||||
{ *retval = (yyvsp[(1) - (1)].pnode); ;}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
#line 63 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 63 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mknnode((yyvsp[(1) - (1)].num)); ;}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
#line 64 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 64 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mksnode((yyvsp[(1) - (1)].str), ckt); ;}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
#line 66 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 66 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkbnode("+", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
#line 67 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 67 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkbnode("-", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
#line 68 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 68 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkbnode("*", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
#line 69 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 69 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkbnode("/", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
#line 70 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 70 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkbnode("^", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
#line 72 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 72 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = (yyvsp[(2) - (3)].pnode); ;}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
#line 74 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 74 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("-",(yyvsp[(2) - (2)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
#line 76 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 76 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode((yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
#line 78 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 78 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("ternary_fcn",
|
||||
mkbnode(",",
|
||||
mkbnode(",", (yyvsp[(1) - (5)].pnode), (yyvsp[(3) - (5)].pnode)),
|
||||
|
|
@ -1482,37 +1512,51 @@ yyreduce:
|
|||
break;
|
||||
|
||||
case 14:
|
||||
#line 83 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 83 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("eq0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); ;}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
#line 84 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 84 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("ne0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); ;}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
#line 85 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 85 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("gt0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); ;}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
#line 86 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 86 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("lt0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); ;}
|
||||
break;
|
||||
|
||||
case 18:
|
||||
#line 87 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 87 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("ge0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); ;}
|
||||
break;
|
||||
|
||||
case 19:
|
||||
#line 88 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 88 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("le0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); ;}
|
||||
break;
|
||||
|
||||
case 20:
|
||||
#line 90 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 90 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("ne0",
|
||||
mkbnode("+",
|
||||
mkfnode("ne0", (yyvsp[(1) - (3)].pnode)),
|
||||
|
|
@ -1520,7 +1564,9 @@ yyreduce:
|
|||
break;
|
||||
|
||||
case 21:
|
||||
#line 94 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 94 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("eq0",
|
||||
mkbnode("+",
|
||||
mkfnode("eq0", (yyvsp[(1) - (3)].pnode)),
|
||||
|
|
@ -1528,18 +1574,23 @@ yyreduce:
|
|||
break;
|
||||
|
||||
case 22:
|
||||
#line 98 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 98 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkfnode("eq0", (yyvsp[(2) - (2)].pnode)); ;}
|
||||
break;
|
||||
|
||||
case 24:
|
||||
#line 104 "inpptree-parser.y"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 104 "./inpptree-parser.y"
|
||||
{ (yyval.pnode) = mkbnode(",", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); ;}
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1267 of yacc.c. */
|
||||
#line 1543 "inpptree-parser.c"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1594 "inpptree-parser.c"
|
||||
default: break;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
|
@ -1550,7 +1601,6 @@ yyreduce:
|
|||
|
||||
*++yyvsp = yyval;
|
||||
|
||||
|
||||
/* Now `shift' the result of the reduction. Determine what state
|
||||
that goes to, based on the state we popped back to and the rule
|
||||
number reduced by. */
|
||||
|
|
@ -1615,7 +1665,7 @@ yyerrlab:
|
|||
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse look-ahead token after an
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
|
||||
if (yychar <= YYEOF)
|
||||
|
|
@ -1632,7 +1682,7 @@ yyerrlab:
|
|||
}
|
||||
}
|
||||
|
||||
/* Else will try to reuse look-ahead token after shifting the error
|
||||
/* Else will try to reuse lookahead token after shifting the error
|
||||
token. */
|
||||
goto yyerrlab1;
|
||||
|
||||
|
|
@ -1689,9 +1739,6 @@ yyerrlab1:
|
|||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
|
||||
|
|
@ -1716,7 +1763,7 @@ yyabortlab:
|
|||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#ifndef yyoverflow
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
|
|
@ -1727,7 +1774,7 @@ yyexhaustedlab:
|
|||
#endif
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval, line, retval, ckt);
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
|
|
@ -1753,7 +1800,9 @@ yyreturn:
|
|||
}
|
||||
|
||||
|
||||
#line 106 "inpptree-parser.y"
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
#line 106 "./inpptree-parser.y"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,22 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 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
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
|
@ -29,10 +27,11 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
|
|
@ -52,37 +51,30 @@
|
|||
NEG = 268
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define TOK_NUM 258
|
||||
#define TOK_STR 259
|
||||
#define TOK_LE 260
|
||||
#define TOK_LT 261
|
||||
#define TOK_GE 262
|
||||
#define TOK_GT 263
|
||||
#define TOK_EQ 264
|
||||
#define TOK_NE 265
|
||||
#define TOK_OR 266
|
||||
#define TOK_AND 267
|
||||
#define NEG 268
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 31 "inpptree-parser.y"
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 31 "./inpptree-parser.y"
|
||||
|
||||
double num;
|
||||
const char *str;
|
||||
struct INPparseNode *pnode;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 81 "inpptree-parser.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 72 "inpptree-parser.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue