imagemap: Rebuild parsers
This commit is contained in:
@ -72,6 +72,7 @@ typedef int flex_int32_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned short int flex_uint16_t;
|
||||
typedef unsigned int flex_uint32_t;
|
||||
#endif /* ! C99 */
|
||||
|
||||
/* Limits of integral types. */
|
||||
#ifndef INT8_MIN
|
||||
@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
@ -620,7 +611,7 @@ char *cern_text;
|
||||
#endif /* FLEX_SCANNER */
|
||||
|
||||
|
||||
#line 624 "<stdout>"
|
||||
#line 615 "<stdout>"
|
||||
|
||||
#define INITIAL 0
|
||||
#define comment 1
|
||||
@ -702,12 +693,7 @@ static int input (void );
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
@ -726,7 +712,7 @@ static int input (void );
|
||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
size_t n; \
|
||||
unsigned n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( cern_in )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
@ -811,7 +797,7 @@ YY_DECL
|
||||
#line 44 "imap_cern.l"
|
||||
|
||||
|
||||
#line 815 "<stdout>"
|
||||
#line 801 "<stdout>"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -988,7 +974,7 @@ YY_RULE_SETUP
|
||||
#line 89 "imap_cern.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 992 "<stdout>"
|
||||
#line 978 "<stdout>"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(comment):
|
||||
yyterminate();
|
||||
@ -1747,8 +1733,8 @@ YY_BUFFER_STATE cern__scan_string (yyconst char * yystr )
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to cern_lex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* 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.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 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
|
||||
the Free Software Foundation; either version 3, 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
|
||||
@ -16,9 +16,7 @@
|
||||
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
|
||||
@ -47,7 +45,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.3"
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -55,6 +53,12 @@
|
||||
/* Pure parsers. */
|
||||
#define YYPURE 0
|
||||
|
||||
/* Push parsers. */
|
||||
#define YYPUSH 0
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 0
|
||||
|
||||
@ -68,40 +72,9 @@
|
||||
#define yynerrs cern_nerrs
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
RECTANGLE = 258,
|
||||
POLYGON = 259,
|
||||
CIRCLE = 260,
|
||||
DEFAULT = 261,
|
||||
AUTHOR = 262,
|
||||
DESCRIPTION = 263,
|
||||
BEGIN_COMMENT = 264,
|
||||
FLOAT = 265,
|
||||
COMMENT = 266,
|
||||
LINK = 267
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define RECTANGLE 258
|
||||
#define POLYGON 259
|
||||
#define CIRCLE 260
|
||||
#define DEFAULT 261
|
||||
#define AUTHOR 262
|
||||
#define DESCRIPTION 263
|
||||
#define BEGIN_COMMENT 264
|
||||
#define FLOAT 265
|
||||
#define COMMENT 266
|
||||
#define LINK 267
|
||||
|
||||
|
||||
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 1 "imap_cern.y"
|
||||
|
||||
/*
|
||||
@ -140,14 +113,17 @@
|
||||
#include "imap_rectangle.h"
|
||||
#include "imap_string.h"
|
||||
|
||||
extern int cern_lex();
|
||||
extern int cern_restart();
|
||||
extern int cern_lex(void);
|
||||
extern int cern_restart(FILE *cern_in);
|
||||
static void cern_error(char* s);
|
||||
|
||||
static Object_t *current_object;
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 126 "y.tab.c"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
@ -166,29 +142,67 @@ static Object_t *current_object;
|
||||
# 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 {
|
||||
RECTANGLE = 258,
|
||||
POLYGON = 259,
|
||||
CIRCLE = 260,
|
||||
DEFAULT = 261,
|
||||
AUTHOR = 262,
|
||||
DESCRIPTION = 263,
|
||||
BEGIN_COMMENT = 264,
|
||||
FLOAT = 265,
|
||||
COMMENT = 266,
|
||||
LINK = 267
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define RECTANGLE 258
|
||||
#define POLYGON 259
|
||||
#define CIRCLE 260
|
||||
#define DEFAULT 261
|
||||
#define AUTHOR 262
|
||||
#define DESCRIPTION 263
|
||||
#define BEGIN_COMMENT 264
|
||||
#define FLOAT 265
|
||||
#define COMMENT 266
|
||||
#define LINK 267
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 46 "imap_cern.y"
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 46 "imap_cern.y"
|
||||
|
||||
int val;
|
||||
double value;
|
||||
char *id;
|
||||
}
|
||||
/* Line 187 of yacc.c. */
|
||||
#line 179 "y.tab.c"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 194 "y.tab.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 192 "y.tab.c"
|
||||
/* Line 264 of yacc.c */
|
||||
#line 206 "y.tab.c"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -238,7 +252,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)
|
||||
@ -263,14 +277,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
|
||||
|
||||
@ -351,8 +365,8 @@ 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. */
|
||||
@ -387,12 +401,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); \
|
||||
} \
|
||||
@ -493,8 +507,9 @@ static const char *const yytname[] =
|
||||
"$end", "error", "$undefined", "RECTANGLE", "POLYGON", "CIRCLE",
|
||||
"DEFAULT", "AUTHOR", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT", "COMMENT",
|
||||
"LINK", "'('", "','", "')'", "$accept", "cern_file", "area_list", "area",
|
||||
"default", "rectangle", "circle", "polygon", "@1", "coord_list", "coord",
|
||||
"comment_line", "real_comment", "author_line", "description_line", 0
|
||||
"default", "rectangle", "circle", "polygon", "$@1", "coord_list",
|
||||
"coord", "comment_line", "real_comment", "author_line",
|
||||
"description_line", 0
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -609,9 +624,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)
|
||||
|
||||
@ -668,7 +692,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, \
|
||||
@ -779,17 +803,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
|
||||
#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");
|
||||
}
|
||||
|
||||
@ -823,11 +850,11 @@ yy_reduce_print (yyvsp, yyrule)
|
||||
/* 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)])
|
||||
);
|
||||
fprintf (stderr, "\n");
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1107,10 +1134,8 @@ yydestruct (yymsg, yytype, yyvaluep)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
@ -1126,11 +1151,10 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
/* 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. */
|
||||
@ -1138,9 +1162,9 @@ int yynerrs;
|
||||
|
||||
|
||||
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1165,13 +1189,38 @@ yyparse ()
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
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;
|
||||
|
||||
/* 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 yyn;
|
||||
int yyresult;
|
||||
/* 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];
|
||||
@ -1179,39 +1228,17 @@ yyparse ()
|
||||
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;
|
||||
@ -1223,7 +1250,6 @@ yyparse ()
|
||||
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;
|
||||
|
||||
@ -1253,7 +1279,6 @@ yyparse ()
|
||||
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
|
||||
@ -1261,7 +1286,6 @@ yyparse ()
|
||||
yyoverflow (YY_("memory exhausted"),
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
|
||||
&yystacksize);
|
||||
|
||||
yyss = yyss1;
|
||||
@ -1284,9 +1308,8 @@ yyparse ()
|
||||
(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);
|
||||
@ -1297,7 +1320,6 @@ yyparse ()
|
||||
yyssp = yyss + yysize - 1;
|
||||
yyvsp = yyvs + yysize - 1;
|
||||
|
||||
|
||||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||||
(unsigned long int) yystacksize));
|
||||
|
||||
@ -1307,6 +1329,9 @@ yyparse ()
|
||||
|
||||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||||
|
||||
if (yystate == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
goto yybackup;
|
||||
|
||||
/*-----------.
|
||||
@ -1315,16 +1340,16 @@ yyparse ()
|
||||
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: "));
|
||||
@ -1356,19 +1381,15 @@ 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)
|
||||
/* Discard the shifted token. */
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
@ -1409,6 +1430,8 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 10:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 74 "imap_cern.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1418,6 +1441,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 83 "imap_cern.y"
|
||||
{
|
||||
gint x = (gint) (yyvsp[(3) - (12)].value);
|
||||
@ -1432,6 +1457,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 96 "imap_cern.y"
|
||||
{
|
||||
gint x = (gint) (yyvsp[(3) - (8)].value);
|
||||
@ -1445,11 +1472,15 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 107 "imap_cern.y"
|
||||
{current_object = create_polygon(NULL);}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 108 "imap_cern.y"
|
||||
{
|
||||
object_set_url(current_object, (yyvsp[(4) - (4)].id));
|
||||
@ -1459,12 +1490,16 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 16:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 117 "imap_cern.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 122 "imap_cern.y"
|
||||
{
|
||||
Polygon_t *polygon = ObjectToPolygon(current_object);
|
||||
@ -1475,6 +1510,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 21:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 136 "imap_cern.y"
|
||||
{
|
||||
g_free ((yyvsp[(2) - (2)].id));
|
||||
@ -1482,6 +1519,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 22:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 142 "imap_cern.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1491,6 +1530,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 23:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 150 "imap_cern.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1504,8 +1545,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1267 of yacc.c. */
|
||||
#line 1509 "y.tab.c"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1551 "y.tab.c"
|
||||
default: break;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
@ -1516,7 +1558,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. */
|
||||
@ -1581,7 +1622,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)
|
||||
@ -1598,7 +1639,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;
|
||||
|
||||
@ -1655,9 +1696,6 @@ yyerrlab1:
|
||||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
|
||||
@ -1682,7 +1720,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#ifndef yyoverflow
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
@ -1693,7 +1731,7 @@ yyexhaustedlab:
|
||||
#endif
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval);
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
@ -1719,6 +1757,8 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
#line 162 "imap_cern.y"
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* 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.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 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 3, 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
|
||||
@ -16,9 +16,7 @@
|
||||
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
|
||||
@ -33,6 +31,7 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
@ -68,19 +67,25 @@
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 46 "imap_cern.y"
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 46 "imap_cern.y"
|
||||
|
||||
int val;
|
||||
double value;
|
||||
char *id;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 79 "y.tab.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 83 "y.tab.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
|
||||
|
||||
extern YYSTYPE cern_lval;
|
||||
|
||||
|
||||
|
@ -72,6 +72,7 @@ typedef int flex_int32_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned short int flex_uint16_t;
|
||||
typedef unsigned int flex_uint32_t;
|
||||
#endif /* ! C99 */
|
||||
|
||||
/* Limits of integral types. */
|
||||
#ifndef INT8_MIN
|
||||
@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
@ -644,7 +635,7 @@ char *csim_text;
|
||||
|
||||
|
||||
|
||||
#line 648 "<stdout>"
|
||||
#line 639 "<stdout>"
|
||||
|
||||
#define INITIAL 0
|
||||
#define quoted_string 1
|
||||
@ -727,12 +718,7 @@ static int input (void );
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
@ -751,7 +737,7 @@ static int input (void );
|
||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
size_t n; \
|
||||
unsigned n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( csim_in )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
@ -836,7 +822,7 @@ YY_DECL
|
||||
#line 45 "imap_csim.l"
|
||||
|
||||
|
||||
#line 840 "<stdout>"
|
||||
#line 826 "<stdout>"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -1109,7 +1095,7 @@ YY_RULE_SETUP
|
||||
#line 134 "imap_csim.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 1113 "<stdout>"
|
||||
#line 1099 "<stdout>"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(quoted_string):
|
||||
case YY_STATE_EOF(comment):
|
||||
@ -1869,8 +1855,8 @@ YY_BUFFER_STATE csim__scan_string (yyconst char * yystr )
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to csim_lex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* 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.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 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
|
||||
the Free Software Foundation; either version 3, 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
|
||||
@ -16,9 +16,7 @@
|
||||
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
|
||||
@ -47,7 +45,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.3"
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -55,6 +53,12 @@
|
||||
/* Pure parsers. */
|
||||
#define YYPURE 0
|
||||
|
||||
/* Push parsers. */
|
||||
#define YYPUSH 0
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 0
|
||||
|
||||
@ -68,6 +72,79 @@
|
||||
#define yynerrs csim_nerrs
|
||||
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 1 "imap_csim.y"
|
||||
|
||||
/*
|
||||
* This is a plug-in for GIMP.
|
||||
*
|
||||
* Generates clickable image maps.
|
||||
*
|
||||
* Copyright (C) 1998-2005 Maurits Rijk lpeek.mrijk@consunet.nl
|
||||
*
|
||||
* 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 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "imap_circle.h"
|
||||
#include "imap_file.h"
|
||||
#include "imap_main.h"
|
||||
#include "imap_polygon.h"
|
||||
#include "imap_rectangle.h"
|
||||
#include "imap_string.h"
|
||||
|
||||
extern int csim_lex(void);
|
||||
extern int csim_restart(FILE *csim_in);
|
||||
static void csim_error(char* s);
|
||||
|
||||
static enum {UNDEFINED, RECTANGLE, CIRCLE, POLYGON} current_type;
|
||||
static Object_t *current_object;
|
||||
static MapInfo_t *_map_info;
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 128 "y.tab.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. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
@ -133,96 +210,33 @@
|
||||
|
||||
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
#line 1 "imap_csim.y"
|
||||
|
||||
/*
|
||||
* This is a plug-in for GIMP.
|
||||
*
|
||||
* Generates clickable image maps.
|
||||
*
|
||||
* Copyright (C) 1998-2005 Maurits Rijk lpeek.mrijk@consunet.nl
|
||||
*
|
||||
* 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 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "imap_circle.h"
|
||||
#include "imap_file.h"
|
||||
#include "imap_main.h"
|
||||
#include "imap_polygon.h"
|
||||
#include "imap_rectangle.h"
|
||||
#include "imap_string.h"
|
||||
|
||||
extern int csim_lex();
|
||||
extern int csim_restart();
|
||||
static void csim_error(char* s);
|
||||
|
||||
static enum {UNDEFINED, RECTANGLE, CIRCLE, POLYGON} current_type;
|
||||
static Object_t *current_object;
|
||||
static MapInfo_t *_map_info;
|
||||
|
||||
|
||||
|
||||
/* 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 48 "imap_csim.y"
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 48 "imap_csim.y"
|
||||
|
||||
int val;
|
||||
double value;
|
||||
char *id;
|
||||
}
|
||||
/* Line 187 of yacc.c. */
|
||||
#line 213 "y.tab.c"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 228 "y.tab.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 226 "y.tab.c"
|
||||
/* Line 264 of yacc.c */
|
||||
#line 240 "y.tab.c"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -272,7 +286,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)
|
||||
@ -297,14 +311,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
|
||||
|
||||
@ -385,8 +399,8 @@ 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. */
|
||||
@ -421,12 +435,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); \
|
||||
} \
|
||||
@ -704,9 +718,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)
|
||||
|
||||
@ -763,7 +786,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, \
|
||||
@ -874,17 +897,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
|
||||
#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");
|
||||
}
|
||||
|
||||
@ -918,11 +944,11 @@ yy_reduce_print (yyvsp, yyrule)
|
||||
/* 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)])
|
||||
);
|
||||
fprintf (stderr, "\n");
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1202,10 +1228,8 @@ yydestruct (yymsg, yytype, yyvaluep)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
@ -1221,11 +1245,10 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
/* 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. */
|
||||
@ -1233,9 +1256,9 @@ int yynerrs;
|
||||
|
||||
|
||||
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1260,13 +1283,38 @@ yyparse ()
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
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;
|
||||
|
||||
/* 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 yyn;
|
||||
int yyresult;
|
||||
/* 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];
|
||||
@ -1274,39 +1322,17 @@ yyparse ()
|
||||
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;
|
||||
@ -1318,7 +1344,6 @@ yyparse ()
|
||||
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;
|
||||
|
||||
@ -1348,7 +1373,6 @@ yyparse ()
|
||||
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
|
||||
@ -1356,7 +1380,6 @@ yyparse ()
|
||||
yyoverflow (YY_("memory exhausted"),
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
|
||||
&yystacksize);
|
||||
|
||||
yyss = yyss1;
|
||||
@ -1379,9 +1402,8 @@ yyparse ()
|
||||
(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);
|
||||
@ -1392,7 +1414,6 @@ yyparse ()
|
||||
yyssp = yyss + yysize - 1;
|
||||
yyvsp = yyvs + yysize - 1;
|
||||
|
||||
|
||||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||||
(unsigned long int) yystacksize));
|
||||
|
||||
@ -1402,6 +1423,9 @@ yyparse ()
|
||||
|
||||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||||
|
||||
if (yystate == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
goto yybackup;
|
||||
|
||||
/*-----------.
|
||||
@ -1410,16 +1434,16 @@ yyparse ()
|
||||
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: "));
|
||||
@ -1451,19 +1475,15 @@ 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)
|
||||
/* Discard the shifted token. */
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
@ -1504,6 +1524,8 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 3:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 69 "imap_csim.y"
|
||||
{
|
||||
g_strreplace(&_map_info->image_name, (yyvsp[(5) - (7)].id));
|
||||
@ -1512,21 +1534,29 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 81 "imap_csim.y"
|
||||
{}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 82 "imap_csim.y"
|
||||
{ g_free ((yyvsp[(3) - (3)].id)); }
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 83 "imap_csim.y"
|
||||
{ g_free ((yyvsp[(3) - (3)].id)); }
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 87 "imap_csim.y"
|
||||
{
|
||||
_map_info->old_image_width = (yyvsp[(3) - (3)].val);
|
||||
@ -1534,6 +1564,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 93 "imap_csim.y"
|
||||
{
|
||||
_map_info->old_image_height = (yyvsp[(3) - (3)].val);
|
||||
@ -1541,6 +1573,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 99 "imap_csim.y"
|
||||
{
|
||||
(yyval.val) = (gint) (yyvsp[(1) - (1)].value);
|
||||
@ -1548,6 +1582,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 103 "imap_csim.y"
|
||||
{
|
||||
(yyval.val) = (gint) g_ascii_strtod ((yyvsp[(1) - (1)].id), NULL);
|
||||
@ -1556,6 +1592,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 15:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 110 "imap_csim.y"
|
||||
{
|
||||
g_strreplace(&_map_info->title, (yyvsp[(5) - (6)].id));
|
||||
@ -1564,6 +1602,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 21:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 126 "imap_csim.y"
|
||||
{
|
||||
g_free ((yyvsp[(2) - (3)].id));
|
||||
@ -1571,6 +1611,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 22:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 132 "imap_csim.y"
|
||||
{
|
||||
g_strreplace(&_map_info->author, (yyvsp[(2) - (3)].id));
|
||||
@ -1579,6 +1621,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 23:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 139 "imap_csim.y"
|
||||
{
|
||||
gchar *description;
|
||||
@ -1591,6 +1635,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 26:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 154 "imap_csim.y"
|
||||
{
|
||||
if (current_type != UNDEFINED)
|
||||
@ -1599,6 +1645,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 41:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 181 "imap_csim.y"
|
||||
{
|
||||
if (!g_ascii_strcasecmp((yyvsp[(3) - (3)].id), "RECT")) {
|
||||
@ -1618,6 +1666,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 42:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 199 "imap_csim.y"
|
||||
{
|
||||
char *p;
|
||||
@ -1679,6 +1729,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 43:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 259 "imap_csim.y"
|
||||
{
|
||||
if (current_type == UNDEFINED) {
|
||||
@ -1691,12 +1743,16 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 44:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 270 "imap_csim.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
case 46:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 276 "imap_csim.y"
|
||||
{
|
||||
g_free ((yyvsp[(2) - (2)].id));
|
||||
@ -1704,6 +1760,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 47:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 282 "imap_csim.y"
|
||||
{
|
||||
object_set_comment(current_object, (yyvsp[(3) - (3)].id));
|
||||
@ -1712,6 +1770,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 48:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 289 "imap_csim.y"
|
||||
{
|
||||
object_set_target(current_object, (yyvsp[(3) - (3)].id));
|
||||
@ -1720,6 +1780,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 49:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 296 "imap_csim.y"
|
||||
{
|
||||
object_set_mouse_over(current_object, (yyvsp[(3) - (3)].id));
|
||||
@ -1728,6 +1790,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 50:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 303 "imap_csim.y"
|
||||
{
|
||||
object_set_mouse_out(current_object, (yyvsp[(3) - (3)].id));
|
||||
@ -1736,6 +1800,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 51:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 310 "imap_csim.y"
|
||||
{
|
||||
object_set_focus(current_object, (yyvsp[(3) - (3)].id));
|
||||
@ -1744,6 +1810,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 52:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 317 "imap_csim.y"
|
||||
{
|
||||
object_set_blur(current_object, (yyvsp[(3) - (3)].id));
|
||||
@ -1752,8 +1820,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1267 of yacc.c. */
|
||||
#line 1757 "y.tab.c"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1826 "y.tab.c"
|
||||
default: break;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
@ -1764,7 +1833,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. */
|
||||
@ -1829,7 +1897,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)
|
||||
@ -1846,7 +1914,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;
|
||||
|
||||
@ -1903,9 +1971,6 @@ yyerrlab1:
|
||||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
|
||||
@ -1930,7 +1995,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#ifndef yyoverflow
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
@ -1941,7 +2006,7 @@ yyexhaustedlab:
|
||||
#endif
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval);
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
@ -1967,6 +2032,8 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
#line 326 "imap_csim.y"
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* 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.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 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 3, 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
|
||||
@ -16,9 +16,7 @@
|
||||
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
|
||||
@ -33,6 +31,7 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
@ -100,19 +99,25 @@
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 48 "imap_csim.y"
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 48 "imap_csim.y"
|
||||
|
||||
int val;
|
||||
double value;
|
||||
char *id;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 111 "y.tab.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 115 "y.tab.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
|
||||
|
||||
extern YYSTYPE csim_lval;
|
||||
|
||||
|
||||
|
@ -72,6 +72,7 @@ typedef int flex_int32_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned short int flex_uint16_t;
|
||||
typedef unsigned int flex_uint32_t;
|
||||
#endif /* ! C99 */
|
||||
|
||||
/* Limits of integral types. */
|
||||
#ifndef INT8_MIN
|
||||
@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
@ -584,7 +575,7 @@ char *ncsa_text;
|
||||
|
||||
|
||||
|
||||
#line 588 "<stdout>"
|
||||
#line 579 "<stdout>"
|
||||
|
||||
#define INITIAL 0
|
||||
#define imap_link 1
|
||||
@ -667,12 +658,7 @@ static int input (void );
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
@ -691,7 +677,7 @@ static int input (void );
|
||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
size_t n; \
|
||||
unsigned n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( ncsa_in )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
@ -776,7 +762,7 @@ YY_DECL
|
||||
#line 45 "imap_ncsa.l"
|
||||
|
||||
|
||||
#line 780 "<stdout>"
|
||||
#line 766 "<stdout>"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -965,7 +951,7 @@ YY_RULE_SETUP
|
||||
#line 108 "imap_ncsa.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 969 "<stdout>"
|
||||
#line 955 "<stdout>"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(imap_link):
|
||||
case YY_STATE_EOF(comment):
|
||||
@ -1725,8 +1711,8 @@ YY_BUFFER_STATE ncsa__scan_string (yyconst char * yystr )
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to ncsa_lex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* 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.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 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
|
||||
the Free Software Foundation; either version 3, 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
|
||||
@ -16,9 +16,7 @@
|
||||
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
|
||||
@ -47,7 +45,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.3"
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -55,6 +53,12 @@
|
||||
/* Pure parsers. */
|
||||
#define YYPURE 0
|
||||
|
||||
/* Push parsers. */
|
||||
#define YYPUSH 0
|
||||
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 0
|
||||
|
||||
@ -68,42 +72,9 @@
|
||||
#define yynerrs ncsa_nerrs
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
RECTANGLE = 258,
|
||||
POLYGON = 259,
|
||||
CIRCLE = 260,
|
||||
DEFAULT = 261,
|
||||
AUTHOR = 262,
|
||||
TITLE = 263,
|
||||
DESCRIPTION = 264,
|
||||
BEGIN_COMMENT = 265,
|
||||
FLOAT = 266,
|
||||
LINK = 267,
|
||||
COMMENT = 268
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define RECTANGLE 258
|
||||
#define POLYGON 259
|
||||
#define CIRCLE 260
|
||||
#define DEFAULT 261
|
||||
#define AUTHOR 262
|
||||
#define TITLE 263
|
||||
#define DESCRIPTION 264
|
||||
#define BEGIN_COMMENT 265
|
||||
#define FLOAT 266
|
||||
#define LINK 267
|
||||
#define COMMENT 268
|
||||
|
||||
|
||||
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 1 "imap_ncsa.y"
|
||||
|
||||
/*
|
||||
@ -141,14 +112,17 @@
|
||||
#include "imap_rectangle.h"
|
||||
#include "imap_string.h"
|
||||
|
||||
extern int ncsa_lex();
|
||||
extern int ncsa_restart();
|
||||
extern int ncsa_lex(void);
|
||||
extern int ncsa_restart(FILE *ncsa_in);
|
||||
static void ncsa_error(char* s);
|
||||
|
||||
static Object_t *current_object;
|
||||
|
||||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 125 "y.tab.c"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
@ -167,29 +141,69 @@ static Object_t *current_object;
|
||||
# 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 {
|
||||
RECTANGLE = 258,
|
||||
POLYGON = 259,
|
||||
CIRCLE = 260,
|
||||
DEFAULT = 261,
|
||||
AUTHOR = 262,
|
||||
TITLE = 263,
|
||||
DESCRIPTION = 264,
|
||||
BEGIN_COMMENT = 265,
|
||||
FLOAT = 266,
|
||||
LINK = 267,
|
||||
COMMENT = 268
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define RECTANGLE 258
|
||||
#define POLYGON 259
|
||||
#define CIRCLE 260
|
||||
#define DEFAULT 261
|
||||
#define AUTHOR 262
|
||||
#define TITLE 263
|
||||
#define DESCRIPTION 264
|
||||
#define BEGIN_COMMENT 265
|
||||
#define FLOAT 266
|
||||
#define LINK 267
|
||||
#define COMMENT 268
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 45 "imap_ncsa.y"
|
||||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 45 "imap_ncsa.y"
|
||||
|
||||
int val;
|
||||
double value;
|
||||
char *id;
|
||||
}
|
||||
/* Line 187 of yacc.c. */
|
||||
#line 180 "y.tab.c"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 195 "y.tab.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 193 "y.tab.c"
|
||||
/* Line 264 of yacc.c */
|
||||
#line 207 "y.tab.c"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -239,7 +253,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)
|
||||
@ -264,14 +278,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
|
||||
|
||||
@ -352,8 +366,8 @@ 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. */
|
||||
@ -388,12 +402,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); \
|
||||
} \
|
||||
@ -496,7 +510,7 @@ static const char *const yytname[] =
|
||||
"LINK", "COMMENT", "','", "$accept", "ncsa_file", "comment_lines",
|
||||
"comment_line", "real_comment", "author_line", "title_line",
|
||||
"description_line", "area_list", "area", "default", "rectangle",
|
||||
"circle", "polygon", "@1", "coord_list", "coord", 0
|
||||
"circle", "polygon", "$@1", "coord_list", "coord", 0
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -608,9 +622,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)
|
||||
|
||||
@ -667,7 +690,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 +801,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
|
||||
#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");
|
||||
}
|
||||
|
||||
@ -822,11 +848,11 @@ yy_reduce_print (yyvsp, yyrule)
|
||||
/* 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)])
|
||||
);
|
||||
fprintf (stderr, "\n");
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1106,10 +1132,8 @@ yydestruct (yymsg, yytype, yyvaluep)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
@ -1125,11 +1149,10 @@ int yyparse ();
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
|
||||
/* 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. */
|
||||
@ -1137,9 +1160,9 @@ int yynerrs;
|
||||
|
||||
|
||||
|
||||
/*----------.
|
||||
| yyparse. |
|
||||
`----------*/
|
||||
/*-------------------------.
|
||||
| yyparse or yypush_parse. |
|
||||
`-------------------------*/
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
@ -1164,13 +1187,38 @@ yyparse ()
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
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;
|
||||
|
||||
/* 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 yyn;
|
||||
int yyresult;
|
||||
/* 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];
|
||||
@ -1178,39 +1226,17 @@ yyparse ()
|
||||
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;
|
||||
@ -1222,7 +1248,6 @@ yyparse ()
|
||||
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;
|
||||
|
||||
@ -1252,7 +1277,6 @@ yyparse ()
|
||||
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
|
||||
@ -1260,7 +1284,6 @@ yyparse ()
|
||||
yyoverflow (YY_("memory exhausted"),
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
|
||||
&yystacksize);
|
||||
|
||||
yyss = yyss1;
|
||||
@ -1283,9 +1306,8 @@ yyparse ()
|
||||
(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);
|
||||
@ -1296,7 +1318,6 @@ yyparse ()
|
||||
yyssp = yyss + yysize - 1;
|
||||
yyvsp = yyvs + yysize - 1;
|
||||
|
||||
|
||||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||||
(unsigned long int) yystacksize));
|
||||
|
||||
@ -1306,6 +1327,9 @@ yyparse ()
|
||||
|
||||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||||
|
||||
if (yystate == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
goto yybackup;
|
||||
|
||||
/*-----------.
|
||||
@ -1314,16 +1338,16 @@ yyparse ()
|
||||
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: "));
|
||||
@ -1355,19 +1379,15 @@ 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)
|
||||
/* Discard the shifted token. */
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
@ -1408,6 +1428,8 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 9:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 72 "imap_ncsa.y"
|
||||
{
|
||||
g_free ((yyvsp[(2) - (2)].id));
|
||||
@ -1415,6 +1437,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 78 "imap_ncsa.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1424,6 +1448,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 86 "imap_ncsa.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1433,6 +1459,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 94 "imap_ncsa.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1446,6 +1474,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 20:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 117 "imap_ncsa.y"
|
||||
{
|
||||
MapInfo_t *info = get_map_info();
|
||||
@ -1455,6 +1485,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 21:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 126 "imap_ncsa.y"
|
||||
{
|
||||
gint x = (gint) (yyvsp[(3) - (8)].value);
|
||||
@ -1469,6 +1501,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 22:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 139 "imap_ncsa.y"
|
||||
{
|
||||
gint x = (gint) (yyvsp[(3) - (8)].value);
|
||||
@ -1482,11 +1516,15 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 23:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 150 "imap_ncsa.y"
|
||||
{current_object = create_polygon(NULL);}
|
||||
break;
|
||||
|
||||
case 24:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 151 "imap_ncsa.y"
|
||||
{
|
||||
object_set_url(current_object, (yyvsp[(2) - (4)].id));
|
||||
@ -1496,12 +1534,16 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 26:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 160 "imap_ncsa.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
case 27:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 165 "imap_ncsa.y"
|
||||
{
|
||||
Polygon_t *polygon = ObjectToPolygon(current_object);
|
||||
@ -1512,8 +1554,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1267 of yacc.c. */
|
||||
#line 1517 "y.tab.c"
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 1560 "y.tab.c"
|
||||
default: break;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
@ -1524,7 +1567,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. */
|
||||
@ -1589,7 +1631,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)
|
||||
@ -1606,7 +1648,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;
|
||||
|
||||
@ -1663,9 +1705,6 @@ yyerrlab1:
|
||||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
|
||||
@ -1690,7 +1729,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#ifndef yyoverflow
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
@ -1701,7 +1740,7 @@ yyexhaustedlab:
|
||||
#endif
|
||||
|
||||
yyreturn:
|
||||
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||
if (yychar != YYEMPTY)
|
||||
yydestruct ("Cleanup: discarding lookahead",
|
||||
yytoken, &yylval);
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
@ -1727,6 +1766,8 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Line 1684 of yacc.c */
|
||||
#line 173 "imap_ncsa.y"
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* 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.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 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 3, 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
|
||||
@ -16,9 +16,7 @@
|
||||
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
|
||||
@ -33,6 +31,7 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
@ -70,19 +69,25 @@
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 45 "imap_ncsa.y"
|
||||
{
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 45 "imap_ncsa.y"
|
||||
|
||||
int val;
|
||||
double value;
|
||||
char *id;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 81 "y.tab.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1685 of yacc.c */
|
||||
#line 85 "y.tab.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
|
||||
|
||||
extern YYSTYPE ncsa_lval;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user