mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-26 06:50:09 +03:00
bug #1738: Complie with latests flex and yacc
This commit is contained in:
parent
98c385ca60
commit
9e99408878
@ -28,7 +28,7 @@
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||
#define YY_FLEX_SUBMINOR_VERSION 37
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
@ -161,15 +161,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.
|
||||
@ -181,7 +173,12 @@ typedef unsigned int flex_uint32_t;
|
||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||
#endif
|
||||
|
||||
extern int template_leng;
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
extern yy_size_t template_leng;
|
||||
|
||||
extern FILE *template_in, *template_out;
|
||||
|
||||
@ -220,11 +217,6 @@ extern FILE *template_in, *template_out;
|
||||
|
||||
#define unput(c) yyunput( c, (yytext_ptr) )
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||
#define YY_STRUCT_YY_BUFFER_STATE
|
||||
struct yy_buffer_state
|
||||
@ -242,7 +234,7 @@ struct yy_buffer_state
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
int yy_n_chars;
|
||||
yy_size_t yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
@ -312,8 +304,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
||||
|
||||
/* yy_hold_char holds the character lost when template_text is formed. */
|
||||
static char yy_hold_char;
|
||||
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
int template_leng;
|
||||
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
yy_size_t template_leng;
|
||||
|
||||
/* Points to current character in buffer. */
|
||||
static char *yy_c_buf_p = (char *) 0;
|
||||
@ -341,7 +333,7 @@ static void template__init_buffer (YY_BUFFER_STATE b,FILE *file );
|
||||
|
||||
YY_BUFFER_STATE template__scan_buffer (char *base,yy_size_t size );
|
||||
YY_BUFFER_STATE template__scan_string (yyconst char *yy_str );
|
||||
YY_BUFFER_STATE template__scan_bytes (yyconst char *bytes,int len );
|
||||
YY_BUFFER_STATE template__scan_bytes (yyconst char *bytes,yy_size_t len );
|
||||
|
||||
void *template_alloc (yy_size_t );
|
||||
void *template_realloc (void *,yy_size_t );
|
||||
@ -562,7 +554,7 @@ char *template_text;
|
||||
llocp->first_column = llocp->last_column; \
|
||||
llocp->last_column += template_leng;
|
||||
|
||||
#line 566 "template_parser.c"
|
||||
#line 558 "template_parser.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define VALUE 1
|
||||
@ -602,7 +594,7 @@ FILE *template_get_out (void );
|
||||
|
||||
void template_set_out (FILE * out_str );
|
||||
|
||||
int template_get_leng (void );
|
||||
yy_size_t template_get_leng (void );
|
||||
|
||||
char *template_get_text (void );
|
||||
|
||||
@ -642,12 +634,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. */
|
||||
@ -754,7 +741,7 @@ YY_DECL
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Comments (lines with an starting #), and empty lines */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#line 758 "template_parser.c"
|
||||
#line 745 "template_parser.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -931,7 +918,7 @@ YY_RULE_SETUP
|
||||
#line 89 "template_parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 935 "template_parser.c"
|
||||
#line 922 "template_parser.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(VALUE):
|
||||
yyterminate();
|
||||
@ -1118,21 +1105,21 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
else
|
||||
{
|
||||
int num_to_read =
|
||||
yy_size_t num_to_read =
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
||||
|
||||
while ( num_to_read <= 0 )
|
||||
{ /* Not enough room in the buffer - grow it. */
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
|
||||
int yy_c_buf_p_offset =
|
||||
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
{
|
||||
int new_size = b->yy_buf_size * 2;
|
||||
yy_size_t new_size = b->yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->yy_buf_size += b->yy_buf_size / 8;
|
||||
@ -1163,7 +1150,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
/* Read in more data. */
|
||||
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
||||
(yy_n_chars), (size_t) num_to_read );
|
||||
(yy_n_chars), num_to_read );
|
||||
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||||
}
|
||||
@ -1258,7 +1245,7 @@ static int yy_get_next_buffer (void)
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||
yy_is_jam = (yy_current_state == 43);
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
@ -1285,7 +1272,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
else
|
||||
{ /* need more input */
|
||||
int offset = (yy_c_buf_p) - (yytext_ptr);
|
||||
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
|
||||
++(yy_c_buf_p);
|
||||
|
||||
switch ( yy_get_next_buffer( ) )
|
||||
@ -1450,10 +1437,6 @@ static void template__load_buffer_state (void)
|
||||
template_free((void *) b );
|
||||
}
|
||||
|
||||
#ifndef __cplusplus
|
||||
extern int isatty (int );
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
* This function is sometimes called more than once on the same buffer,
|
||||
* such as during a template_restart() or at EOF.
|
||||
@ -1566,7 +1549,7 @@ void template_pop_buffer_state (void)
|
||||
*/
|
||||
static void template_ensure_buffer_stack (void)
|
||||
{
|
||||
int num_to_alloc;
|
||||
yy_size_t num_to_alloc;
|
||||
|
||||
if (!(yy_buffer_stack)) {
|
||||
|
||||
@ -1663,7 +1646,7 @@ YY_BUFFER_STATE template__scan_string (yyconst char * yystr )
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE template__scan_bytes (yyconst char * yybytes, int _yybytes_len )
|
||||
YY_BUFFER_STATE template__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
@ -1750,7 +1733,7 @@ FILE *template_get_out (void)
|
||||
/** Get the length of the current token.
|
||||
*
|
||||
*/
|
||||
int template_get_leng (void)
|
||||
yy_size_t template_get_leng (void)
|
||||
{
|
||||
return template_leng;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.6.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.6.5"
|
||||
#define YYBISON_VERSION "2.7"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -70,7 +70,7 @@
|
||||
#define yylloc template__lloc
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
/* Line 360 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 17 "template_syntax.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -122,7 +122,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
/* Line 360 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 127 "template_syntax.cc"
|
||||
|
||||
# ifndef YY_NULL
|
||||
@ -173,14 +173,14 @@ extern int template__debug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 376 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 74 "template_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
void * val_attr;
|
||||
|
||||
|
||||
/* Line 376 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 185 "template_syntax.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -220,7 +220,7 @@ int template__parse ();
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
/* Line 379 of yacc.c */
|
||||
/* Line 390 of yacc.c */
|
||||
#line 225 "template_syntax.cc"
|
||||
|
||||
#ifdef short
|
||||
@ -695,14 +695,46 @@ while (YYID (0))
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
do { \
|
||||
fprintf (File, "%d.%d", (Loc).first_line, (Loc).first_column); \
|
||||
if ((Loc).first_line < (Loc).last_line) \
|
||||
fprintf (File, "-%d.%d", (Loc).last_line, (Loc).last_column - 1); \
|
||||
else if ((Loc).first_column < (Loc).last_column - 1) \
|
||||
fprintf (File, "-%d", (Loc).last_column - 1); \
|
||||
} while (0)
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static unsigned
|
||||
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
|
||||
#else
|
||||
static unsigned
|
||||
yy_location_print_ (yyo, yylocp)
|
||||
FILE *yyo;
|
||||
YYLTYPE const * const yylocp;
|
||||
#endif
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += fprintf (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += fprintf (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += fprintf (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += fprintf (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += fprintf (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
@ -780,7 +812,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, tmpl, error_
|
||||
switch (yytype)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1032,7 +1064,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULL;
|
||||
@ -1095,11 +1126,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1119,10 +1152,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
@ -1190,7 +1225,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, tmpl, error_msg)
|
||||
{
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1243,6 +1278,11 @@ int yychar;
|
||||
static YYSTYPE yyval_default;
|
||||
# define YY_INITIAL_VALUE(Value) = Value
|
||||
#endif
|
||||
static YYLTYPE yyloc_default
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
@ -1255,11 +1295,7 @@ static YYSTYPE yyval_default;
|
||||
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
|
||||
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
YYLTYPE yylloc = yyloc_default;
|
||||
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
@ -1516,7 +1552,7 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 6:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 103 "template_syntax.y"
|
||||
{
|
||||
Attribute * pattr;
|
||||
@ -1530,7 +1566,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 7:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 113 "template_syntax.y"
|
||||
{
|
||||
Attribute * pattr;
|
||||
@ -1547,7 +1583,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 8:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 126 "template_syntax.y"
|
||||
{
|
||||
Attribute * pattr;
|
||||
@ -1561,7 +1597,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 9:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 138 "template_syntax.y"
|
||||
{
|
||||
map<string,string>* vattr;
|
||||
@ -1578,7 +1614,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 10:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 151 "template_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(3) - (5)].val_str));
|
||||
@ -1595,8 +1631,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1778 of yacc.c */
|
||||
#line 1600 "template_syntax.cc"
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 1636 "template_syntax.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@ -1834,7 +1870,7 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
/* Line 2041 of yacc.c */
|
||||
/* Line 2055 of yacc.c */
|
||||
#line 164 "template_syntax.y"
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.6.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
@ -60,14 +60,14 @@ extern int template__debug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 2042 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 74 "template_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
void * val_attr;
|
||||
|
||||
|
||||
/* Line 2042 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 72 "template_syntax.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.6.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.6.5"
|
||||
#define YYBISON_VERSION "2.7"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -70,7 +70,7 @@
|
||||
#define yylloc vm_file_var__lloc
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
/* Line 360 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 17 "vm_file_var_syntax.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -217,7 +217,7 @@ int get_image_path(VirtualMachine * vm,
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* Line 360 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 222 "vm_file_var_syntax.cc"
|
||||
|
||||
# ifndef YY_NULL
|
||||
@ -270,7 +270,7 @@ extern int vm_file_var__debug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 376 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 170 "vm_file_var_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
@ -278,7 +278,7 @@ typedef union YYSTYPE
|
||||
char val_char;
|
||||
|
||||
|
||||
/* Line 376 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 283 "vm_file_var_syntax.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -318,7 +318,7 @@ int vm_file_var__parse ();
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
/* Line 379 of yacc.c */
|
||||
/* Line 390 of yacc.c */
|
||||
#line 323 "vm_file_var_syntax.cc"
|
||||
|
||||
#ifdef short
|
||||
@ -789,14 +789,46 @@ while (YYID (0))
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
do { \
|
||||
fprintf (File, "%d.%d", (Loc).first_line, (Loc).first_column); \
|
||||
if ((Loc).first_line < (Loc).last_line) \
|
||||
fprintf (File, "-%d.%d", (Loc).last_line, (Loc).last_column - 1); \
|
||||
else if ((Loc).first_column < (Loc).last_column - 1) \
|
||||
fprintf (File, "-%d", (Loc).last_column - 1); \
|
||||
} while (0)
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static unsigned
|
||||
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
|
||||
#else
|
||||
static unsigned
|
||||
yy_location_print_ (yyo, yylocp)
|
||||
FILE *yyo;
|
||||
YYLTYPE const * const yylocp;
|
||||
#endif
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += fprintf (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += fprintf (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += fprintf (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += fprintf (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += fprintf (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
@ -876,7 +908,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, vm, img_ids,
|
||||
switch (yytype)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1130,7 +1162,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULL;
|
||||
@ -1193,11 +1224,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1217,10 +1250,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
@ -1290,7 +1325,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, vm, img_ids, errmsg)
|
||||
{
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1344,6 +1379,11 @@ int yychar;
|
||||
static YYSTYPE yyval_default;
|
||||
# define YY_INITIAL_VALUE(Value) = Value
|
||||
#endif
|
||||
static YYLTYPE yyloc_default
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
@ -1356,11 +1396,7 @@ static YYSTYPE yyval_default;
|
||||
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
|
||||
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
YYLTYPE yylloc = yyloc_default;
|
||||
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
@ -1617,7 +1653,7 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 4:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 200 "vm_file_var_syntax.y"
|
||||
{
|
||||
string file((yyvsp[(1) - (7)].val_str));
|
||||
@ -1639,7 +1675,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 5:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 218 "vm_file_var_syntax.y"
|
||||
{
|
||||
string file((yyvsp[(1) - (11)].val_str));
|
||||
@ -1664,8 +1700,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1778 of yacc.c */
|
||||
#line 1669 "vm_file_var_syntax.cc"
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 1705 "vm_file_var_syntax.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@ -1903,7 +1939,7 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
/* Line 2041 of yacc.c */
|
||||
/* Line 2055 of yacc.c */
|
||||
#line 239 "vm_file_var_syntax.y"
|
||||
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
/* A Bison parser, made by GNU Bison 2.6.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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 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/>. */
|
||||
|
||||
@ -26,7 +26,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. */
|
||||
|
||||
@ -62,7 +62,7 @@ extern int vm_file_var__debug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 2042 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 170 "vm_file_var_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
@ -70,7 +70,7 @@ typedef union YYSTYPE
|
||||
char val_char;
|
||||
|
||||
|
||||
/* Line 2042 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 75 "vm_file_var_syntax.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||
#define YY_FLEX_SUBMINOR_VERSION 37
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
@ -161,15 +161,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.
|
||||
@ -181,7 +173,12 @@ typedef unsigned int flex_uint32_t;
|
||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||
#endif
|
||||
|
||||
extern int vm_var_leng;
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
extern yy_size_t vm_var_leng;
|
||||
|
||||
extern FILE *vm_var_in, *vm_var_out;
|
||||
|
||||
@ -220,11 +217,6 @@ extern FILE *vm_var_in, *vm_var_out;
|
||||
|
||||
#define unput(c) yyunput( c, (yytext_ptr) )
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||
#define YY_STRUCT_YY_BUFFER_STATE
|
||||
struct yy_buffer_state
|
||||
@ -242,7 +234,7 @@ struct yy_buffer_state
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
int yy_n_chars;
|
||||
yy_size_t yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
@ -312,8 +304,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
||||
|
||||
/* yy_hold_char holds the character lost when vm_var_text is formed. */
|
||||
static char yy_hold_char;
|
||||
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
int vm_var_leng;
|
||||
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
yy_size_t vm_var_leng;
|
||||
|
||||
/* Points to current character in buffer. */
|
||||
static char *yy_c_buf_p = (char *) 0;
|
||||
@ -341,7 +333,7 @@ static void vm_var__init_buffer (YY_BUFFER_STATE b,FILE *file );
|
||||
|
||||
YY_BUFFER_STATE vm_var__scan_buffer (char *base,yy_size_t size );
|
||||
YY_BUFFER_STATE vm_var__scan_string (yyconst char *yy_str );
|
||||
YY_BUFFER_STATE vm_var__scan_bytes (yyconst char *bytes,int len );
|
||||
YY_BUFFER_STATE vm_var__scan_bytes (yyconst char *bytes,yy_size_t len );
|
||||
|
||||
void *vm_var_alloc (yy_size_t );
|
||||
void *vm_var_realloc (void *,yy_size_t );
|
||||
@ -546,7 +538,7 @@ char *vm_var_text;
|
||||
llocp->last_column += vm_var_leng;
|
||||
|
||||
|
||||
#line 550 "vm_var_parser.c"
|
||||
#line 542 "vm_var_parser.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define VAR 1
|
||||
@ -587,7 +579,7 @@ FILE *vm_var_get_out (void );
|
||||
|
||||
void vm_var_set_out (FILE * out_str );
|
||||
|
||||
int vm_var_get_leng (void );
|
||||
yy_size_t vm_var_get_leng (void );
|
||||
|
||||
char *vm_var_get_text (void );
|
||||
|
||||
@ -627,12 +619,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. */
|
||||
@ -744,7 +731,7 @@ YY_DECL
|
||||
/* $NUM.CONTEXT_VARIABLE */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#line 748 "vm_var_parser.c"
|
||||
#line 735 "vm_var_parser.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -920,7 +907,7 @@ YY_RULE_SETUP
|
||||
#line 92 "vm_var_parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 924 "vm_var_parser.c"
|
||||
#line 911 "vm_var_parser.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(VALUE):
|
||||
yyterminate();
|
||||
@ -1107,21 +1094,21 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
else
|
||||
{
|
||||
int num_to_read =
|
||||
yy_size_t num_to_read =
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
||||
|
||||
while ( num_to_read <= 0 )
|
||||
{ /* Not enough room in the buffer - grow it. */
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
|
||||
int yy_c_buf_p_offset =
|
||||
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
{
|
||||
int new_size = b->yy_buf_size * 2;
|
||||
yy_size_t new_size = b->yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->yy_buf_size += b->yy_buf_size / 8;
|
||||
@ -1152,7 +1139,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
/* Read in more data. */
|
||||
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
||||
(yy_n_chars), (size_t) num_to_read );
|
||||
(yy_n_chars), num_to_read );
|
||||
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||||
}
|
||||
@ -1247,7 +1234,7 @@ static int yy_get_next_buffer (void)
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||
yy_is_jam = (yy_current_state == 33);
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
@ -1274,7 +1261,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
else
|
||||
{ /* need more input */
|
||||
int offset = (yy_c_buf_p) - (yytext_ptr);
|
||||
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
|
||||
++(yy_c_buf_p);
|
||||
|
||||
switch ( yy_get_next_buffer( ) )
|
||||
@ -1439,10 +1426,6 @@ static void vm_var__load_buffer_state (void)
|
||||
vm_var_free((void *) b );
|
||||
}
|
||||
|
||||
#ifndef __cplusplus
|
||||
extern int isatty (int );
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
* This function is sometimes called more than once on the same buffer,
|
||||
* such as during a vm_var_restart() or at EOF.
|
||||
@ -1555,7 +1538,7 @@ void vm_var_pop_buffer_state (void)
|
||||
*/
|
||||
static void vm_var_ensure_buffer_stack (void)
|
||||
{
|
||||
int num_to_alloc;
|
||||
yy_size_t num_to_alloc;
|
||||
|
||||
if (!(yy_buffer_stack)) {
|
||||
|
||||
@ -1652,7 +1635,7 @@ YY_BUFFER_STATE vm_var__scan_string (yyconst char * yystr )
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE vm_var__scan_bytes (yyconst char * yybytes, int _yybytes_len )
|
||||
YY_BUFFER_STATE vm_var__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
@ -1739,7 +1722,7 @@ FILE *vm_var_get_out (void)
|
||||
/** Get the length of the current token.
|
||||
*
|
||||
*/
|
||||
int vm_var_get_leng (void)
|
||||
yy_size_t vm_var_get_leng (void)
|
||||
{
|
||||
return vm_var_leng;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.6.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.6.5"
|
||||
#define YYBISON_VERSION "2.7"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -70,7 +70,7 @@
|
||||
#define yylloc vm_var__lloc
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
/* Line 360 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 17 "vm_var_syntax.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -463,7 +463,7 @@ void insert_vector(VirtualMachine * vm,
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* Line 360 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 468 "vm_var_syntax.cc"
|
||||
|
||||
# ifndef YY_NULL
|
||||
@ -516,7 +516,7 @@ extern int vm_var__debug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 376 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 416 "vm_var_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
@ -524,7 +524,7 @@ typedef union YYSTYPE
|
||||
char val_char;
|
||||
|
||||
|
||||
/* Line 376 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 529 "vm_var_syntax.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -564,7 +564,7 @@ int vm_var__parse ();
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
/* Line 379 of yacc.c */
|
||||
/* Line 390 of yacc.c */
|
||||
#line 569 "vm_var_syntax.cc"
|
||||
|
||||
#ifdef short
|
||||
@ -1035,14 +1035,46 @@ while (YYID (0))
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
do { \
|
||||
fprintf (File, "%d.%d", (Loc).first_line, (Loc).first_column); \
|
||||
if ((Loc).first_line < (Loc).last_line) \
|
||||
fprintf (File, "-%d.%d", (Loc).last_line, (Loc).last_column - 1); \
|
||||
else if ((Loc).first_column < (Loc).last_column - 1) \
|
||||
fprintf (File, "-%d", (Loc).last_column - 1); \
|
||||
} while (0)
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static unsigned
|
||||
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
|
||||
#else
|
||||
static unsigned
|
||||
yy_location_print_ (yyo, yylocp)
|
||||
FILE *yyo;
|
||||
YYLTYPE const * const yylocp;
|
||||
#endif
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += fprintf (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += fprintf (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += fprintf (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += fprintf (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += fprintf (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
@ -1122,7 +1154,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, vm, parsed,
|
||||
switch (yytype)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1376,7 +1408,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULL;
|
||||
@ -1439,11 +1470,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1463,10 +1496,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
@ -1536,7 +1571,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, vm, parsed, errmsg)
|
||||
{
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1590,6 +1625,11 @@ int yychar;
|
||||
static YYSTYPE yyval_default;
|
||||
# define YY_INITIAL_VALUE(Value) = Value
|
||||
#endif
|
||||
static YYLTYPE yyloc_default
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
@ -1602,11 +1642,7 @@ static YYSTYPE yyval_default;
|
||||
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
|
||||
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
YYLTYPE yylloc = yyloc_default;
|
||||
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
@ -1863,7 +1899,7 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 4:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 445 "vm_var_syntax.y"
|
||||
{
|
||||
(*parsed) << (yyvsp[(1) - (1)].val_str);
|
||||
@ -1871,7 +1907,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 5:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 449 "vm_var_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(1) - (2)].val_str));
|
||||
@ -1888,7 +1924,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 6:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 462 "vm_var_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(1) - (5)].val_str));
|
||||
@ -1907,7 +1943,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 7:
|
||||
/* Line 1778 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 477 "vm_var_syntax.y"
|
||||
{
|
||||
string name((yyvsp[(1) - (9)].val_str));
|
||||
@ -1929,8 +1965,8 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1778 of yacc.c */
|
||||
#line 1934 "vm_var_syntax.cc"
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 1970 "vm_var_syntax.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@ -2168,7 +2204,7 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
/* Line 2041 of yacc.c */
|
||||
/* Line 2055 of yacc.c */
|
||||
#line 495 "vm_var_syntax.y"
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.6.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
@ -62,7 +62,7 @@ extern int vm_var__debug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 2042 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 416 "vm_var_syntax.y"
|
||||
|
||||
char * val_str;
|
||||
@ -70,7 +70,7 @@ typedef union YYSTYPE
|
||||
char val_char;
|
||||
|
||||
|
||||
/* Line 2042 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 75 "vm_var_syntax.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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
|
||||
@ -44,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.5"
|
||||
#define YYBISON_VERSION "2.7"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -58,8 +58,6 @@
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 1
|
||||
|
||||
/* Substitute the variable and function names. */
|
||||
#define yyparse expr_arith__parse
|
||||
@ -72,8 +70,7 @@
|
||||
#define yylloc expr_arith__lloc
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 268 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 17 "expr_arith.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -128,14 +125,16 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
/* Line 371 of yacc.c */
|
||||
#line 130 "expr_arith.cc"
|
||||
|
||||
/* Line 268 of yacc.c */
|
||||
#line 134 "expr_arith.cc"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
# define YY_NULL nullptr
|
||||
# else
|
||||
# define YY_NULL 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
@ -145,11 +144,17 @@ extern "C"
|
||||
# define YYERROR_VERBOSE 0
|
||||
#endif
|
||||
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE 0
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
by #include "expr_arith.hh". */
|
||||
#ifndef YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED
|
||||
# define YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int expr_arith__debug;
|
||||
#endif
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -164,12 +169,10 @@ extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 293 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 78 "expr_arith.y"
|
||||
|
||||
char * val_str;
|
||||
@ -177,9 +180,8 @@ typedef union YYSTYPE
|
||||
float val_float;
|
||||
|
||||
|
||||
|
||||
/* Line 293 of yacc.c */
|
||||
#line 183 "expr_arith.cc"
|
||||
/* Line 387 of yacc.c */
|
||||
#line 185 "expr_arith.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
@ -200,11 +202,26 @@ typedef struct YYLTYPE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int expr_arith__parse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int expr_arith__parse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int expr_arith__parse (mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg);
|
||||
#else
|
||||
int expr_arith__parse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED */
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 343 of yacc.c */
|
||||
#line 208 "expr_arith.cc"
|
||||
/* Line 390 of yacc.c */
|
||||
#line 225 "expr_arith.cc"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -257,24 +274,24 @@ typedef short int yytype_int16;
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YY_
|
||||
# define YY_(msgid) msgid
|
||||
# define YY_(Msgid) Msgid
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#if ! defined lint || defined __GNUC__
|
||||
# define YYUSE(e) ((void) (e))
|
||||
# define YYUSE(E) ((void) (E))
|
||||
#else
|
||||
# define YYUSE(e) /* empty */
|
||||
# define YYUSE(E) /* empty */
|
||||
#endif
|
||||
|
||||
/* Identity function, used to suppress warnings about constant conditions. */
|
||||
#ifndef lint
|
||||
# define YYID(n) (n)
|
||||
# define YYID(N) (N)
|
||||
#else
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
@ -310,6 +327,7 @@ YYID (yyi)
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
@ -403,20 +421,20 @@ union yyalloc
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
/* Copy COUNT objects from SRC to DST. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(Dst)[yyi] = (Src)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
@ -501,13 +519,13 @@ static const yytype_uint8 yyrline[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||
#if YYDEBUG || YYERROR_VERBOSE || 0
|
||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||||
static const char *const yytname[] =
|
||||
{
|
||||
"$end", "error", "$undefined", "'+'", "'-'", "'*'", "'/'", "INTEGER",
|
||||
"STRING", "FLOAT", "'('", "')'", "$accept", "stmt", "expr", 0
|
||||
"STRING", "FLOAT", "'('", "')'", "$accept", "stmt", "expr", YY_NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -576,10 +594,10 @@ static const yytype_uint8 yytable[] =
|
||||
4, 5, 11, 12, 13, 14
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
((yystate) == (-5))
|
||||
#define yypact_value_is_default(Yystate) \
|
||||
(!!((Yystate) == (-5)))
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
#define yytable_value_is_error(Yytable_value) \
|
||||
YYID (0)
|
||||
|
||||
static const yytype_int8 yycheck[] =
|
||||
@ -624,23 +642,24 @@ static const yytype_uint8 yystos[] =
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (yylen); \
|
||||
yystate = *yyssp; \
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error: cannot back up")); \
|
||||
YYERROR; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
|
||||
|
||||
/* Error token number */
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
|
||||
@ -649,27 +668,28 @@ while (YYID (0))
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
#endif
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
|
||||
|
||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||
This macro was not mandated originally: define only if we know
|
||||
@ -677,10 +697,46 @@ while (YYID (0))
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# 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, \
|
||||
(Loc).last_line, (Loc).last_column)
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static unsigned
|
||||
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
|
||||
#else
|
||||
static unsigned
|
||||
yy_location_print_ (yyo, yylocp)
|
||||
FILE *yyo;
|
||||
YYLTYPE const * const yylocp;
|
||||
#endif
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += fprintf (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += fprintf (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += fprintf (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += fprintf (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += fprintf (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
@ -688,7 +744,6 @@ while (YYID (0))
|
||||
|
||||
|
||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||
|
||||
#ifdef YYLEX_PARAM
|
||||
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
|
||||
#else
|
||||
@ -743,6 +798,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, oxml, result
|
||||
char ** error_msg;
|
||||
#endif
|
||||
{
|
||||
FILE *yyo = yyoutput;
|
||||
YYUSE (yyo);
|
||||
if (!yyvaluep)
|
||||
return;
|
||||
YYUSE (yylocationp);
|
||||
@ -759,7 +816,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, oxml, result
|
||||
switch (yytype)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1011,12 +1068,11 @@ static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = 0;
|
||||
const char *yyformat = YY_NULL;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
@ -1076,11 +1132,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1100,10 +1158,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
@ -1173,25 +1233,11 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, oxml, result, error_msg)
|
||||
{
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int yyparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg);
|
||||
#else
|
||||
int yyparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
/*----------.
|
||||
@ -1226,11 +1272,40 @@ yyparse (mc, oxml, result, error_msg)
|
||||
/* The lookahead symbol. */
|
||||
int yychar;
|
||||
|
||||
|
||||
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
/* Default value used for initialization, for pacifying older GCCs
|
||||
or non-GCC compilers. */
|
||||
static YYSTYPE yyval_default;
|
||||
# define YY_INITIAL_VALUE(Value) = Value
|
||||
#endif
|
||||
static YYLTYPE yyloc_default
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
#endif
|
||||
#ifndef YY_INITIAL_VALUE
|
||||
# define YY_INITIAL_VALUE(Value) /* Nothing. */
|
||||
#endif
|
||||
|
||||
/* The semantic value of the lookahead symbol. */
|
||||
YYSTYPE yylval;
|
||||
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
|
||||
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc;
|
||||
YYLTYPE yylloc = yyloc_default;
|
||||
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;
|
||||
@ -1244,7 +1319,7 @@ YYLTYPE yylloc;
|
||||
`yyvs': related to semantic values.
|
||||
`yyls': related to locations.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
Refer to the stacks through separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
@ -1270,7 +1345,7 @@ YYLTYPE yylloc;
|
||||
int yyn;
|
||||
int yyresult;
|
||||
/* Lookahead token as an internal (translated) token number. */
|
||||
int yytoken;
|
||||
int yytoken = 0;
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
@ -1289,10 +1364,9 @@ YYLTYPE yylloc;
|
||||
Keep to zero when no symbol should be popped. */
|
||||
int yylen = 0;
|
||||
|
||||
yytoken = 0;
|
||||
yyss = yyssa;
|
||||
yyvs = yyvsa;
|
||||
yyls = yylsa;
|
||||
yyssp = yyss = yyssa;
|
||||
yyvsp = yyvs = yyvsa;
|
||||
yylsp = yyls = yylsa;
|
||||
yystacksize = YYINITDEPTH;
|
||||
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
@ -1301,21 +1375,7 @@ YYLTYPE yylloc;
|
||||
yyerrstatus = 0;
|
||||
yynerrs = 0;
|
||||
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 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 = 1;
|
||||
#endif
|
||||
|
||||
yylsp[0] = yylloc;
|
||||
goto yysetstate;
|
||||
|
||||
/*------------------------------------------------------------.
|
||||
@ -1461,7 +1521,9 @@ yybackup:
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
*++yyvsp = yylval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
*++yylsp = yylloc;
|
||||
goto yynewstate;
|
||||
|
||||
@ -1499,22 +1561,19 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 2:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 100 "expr_arith.y"
|
||||
{ result = static_cast<int>((yyvsp[(1) - (1)].val_float));}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 101 "expr_arith.y"
|
||||
{ result = 0; }
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 104 "expr_arith.y"
|
||||
{ float val = 0.0;
|
||||
|
||||
@ -1547,65 +1606,56 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 132 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (1)].val_float); }
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 133 "expr_arith.y"
|
||||
{ (yyval.val_float) = static_cast<float>((yyvsp[(1) - (1)].val_int)); }
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 134 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) + (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 135 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) - (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 136 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) * (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 137 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(1) - (3)].val_float) / (yyvsp[(3) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 138 "expr_arith.y"
|
||||
{ (yyval.val_float) = - (yyvsp[(2) - (2)].val_float);}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 139 "expr_arith.y"
|
||||
{ (yyval.val_float) = (yyvsp[(2) - (3)].val_float);}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 1609 "expr_arith.cc"
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 1659 "expr_arith.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@ -1770,7 +1820,9 @@ yyerrlab1:
|
||||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
*++yyvsp = yylval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
|
||||
yyerror_range[2] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
@ -1799,7 +1851,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
#if !defined yyoverflow || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
@ -1841,8 +1893,7 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Line 2067 of yacc.c */
|
||||
/* Line 2055 of yacc.c */
|
||||
#line 142 "expr_arith.y"
|
||||
|
||||
|
||||
@ -1871,4 +1922,3 @@ extern "C" void expr_arith__error(
|
||||
llocp->last_column);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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
|
||||
@ -30,6 +30,15 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED
|
||||
# define YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int expr_arith__debug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -44,12 +53,10 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 2068 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 78 "expr_arith.y"
|
||||
|
||||
char * val_str;
|
||||
@ -57,17 +64,14 @@ typedef union YYSTYPE
|
||||
float val_float;
|
||||
|
||||
|
||||
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 63 "expr_arith.hh"
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 69 "expr_arith.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
{
|
||||
@ -81,5 +85,4 @@ typedef struct YYLTYPE
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* !YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED */
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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
|
||||
@ -44,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.5"
|
||||
#define YYBISON_VERSION "2.7"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -58,8 +58,6 @@
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 1
|
||||
|
||||
/* Substitute the variable and function names. */
|
||||
#define yyparse expr_bool__parse
|
||||
@ -72,8 +70,7 @@
|
||||
#define yylloc expr_bool__lloc
|
||||
|
||||
/* Copy the first part of user declarations. */
|
||||
|
||||
/* Line 268 of yacc.c */
|
||||
/* Line 371 of yacc.c */
|
||||
#line 17 "expr_bool.y"
|
||||
|
||||
#include <iostream>
|
||||
@ -135,14 +132,16 @@ int get_xml_attribute(ObjectXML * oxml, const char* attr, string& val);
|
||||
void get_xml_values(ObjectXML * oxml, const char* attr, vector<string>& results);
|
||||
|
||||
|
||||
/* Line 371 of yacc.c */
|
||||
#line 137 "expr_bool.cc"
|
||||
|
||||
/* Line 268 of yacc.c */
|
||||
#line 141 "expr_bool.cc"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
# define YY_NULL nullptr
|
||||
# else
|
||||
# define YY_NULL 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
@ -152,11 +151,17 @@ void get_xml_values(ObjectXML * oxml, const char* attr, vector<string>& results)
|
||||
# define YYERROR_VERBOSE 0
|
||||
#endif
|
||||
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE 0
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
by #include "expr_bool.hh". */
|
||||
#ifndef YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED
|
||||
# define YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int expr_bool__debug;
|
||||
#endif
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -171,12 +176,10 @@ void get_xml_values(ObjectXML * oxml, const char* attr, vector<string>& results)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 293 of yacc.c */
|
||||
/* Line 387 of yacc.c */
|
||||
#line 85 "expr_bool.y"
|
||||
|
||||
char * val_str;
|
||||
@ -184,9 +187,8 @@ typedef union YYSTYPE
|
||||
float val_float;
|
||||
|
||||
|
||||
|
||||
/* Line 293 of yacc.c */
|
||||
#line 190 "expr_bool.cc"
|
||||
/* Line 387 of yacc.c */
|
||||
#line 192 "expr_bool.cc"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
@ -207,11 +209,26 @@ typedef struct YYLTYPE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int expr_bool__parse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int expr_bool__parse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int expr_bool__parse (mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg);
|
||||
#else
|
||||
int expr_bool__parse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED */
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
|
||||
|
||||
/* Line 343 of yacc.c */
|
||||
#line 215 "expr_bool.cc"
|
||||
/* Line 390 of yacc.c */
|
||||
#line 232 "expr_bool.cc"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
@ -264,24 +281,24 @@ typedef short int yytype_int16;
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef YY_
|
||||
# define YY_(msgid) msgid
|
||||
# define YY_(Msgid) Msgid
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Suppress unused-variable warnings by "using" E. */
|
||||
#if ! defined lint || defined __GNUC__
|
||||
# define YYUSE(e) ((void) (e))
|
||||
# define YYUSE(E) ((void) (E))
|
||||
#else
|
||||
# define YYUSE(e) /* empty */
|
||||
# define YYUSE(E) /* empty */
|
||||
#endif
|
||||
|
||||
/* Identity function, used to suppress warnings about constant conditions. */
|
||||
#ifndef lint
|
||||
# define YYID(n) (n)
|
||||
# define YYID(N) (N)
|
||||
#else
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
@ -317,6 +334,7 @@ YYID (yyi)
|
||||
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
# endif
|
||||
@ -410,20 +428,20 @@ union yyalloc
|
||||
#endif
|
||||
|
||||
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||
/* Copy COUNT objects from SRC to DST. The source and destination do
|
||||
not overlap. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(Dst)[yyi] = (Src)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
@ -511,13 +529,13 @@ static const yytype_uint8 yyrline[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||
#if YYDEBUG || YYERROR_VERBOSE || 0
|
||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||||
static const char *const yytname[] =
|
||||
{
|
||||
"$end", "error", "$undefined", "'!'", "'&'", "'|'", "INTEGER", "STRING",
|
||||
"FLOAT", "'='", "'>'", "'<'", "'('", "')'", "$accept", "stmt", "expr", 0
|
||||
"FLOAT", "'='", "'>'", "'<'", "'('", "')'", "$accept", "stmt", "expr", YY_NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -588,10 +606,10 @@ static const yytype_uint8 yytable[] =
|
||||
16, 17, 18, 26, 27, 28, 19, 21, 20, 22
|
||||
};
|
||||
|
||||
#define yypact_value_is_default(yystate) \
|
||||
((yystate) == (-6))
|
||||
#define yypact_value_is_default(Yystate) \
|
||||
(!!((Yystate) == (-6)))
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
#define yytable_value_is_error(Yytable_value) \
|
||||
YYID (0)
|
||||
|
||||
static const yytype_int8 yycheck[] =
|
||||
@ -637,23 +655,24 @@ static const yytype_uint8 yystos[] =
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (yylen); \
|
||||
yystate = *yyssp; \
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error: cannot back up")); \
|
||||
YYERROR; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
|
||||
|
||||
/* Error token number */
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
|
||||
@ -662,27 +681,28 @@ while (YYID (0))
|
||||
If N is 0, then set CURRENT to the empty location which ends
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
#endif
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
|
||||
|
||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||
This macro was not mandated originally: define only if we know
|
||||
@ -690,10 +710,46 @@ while (YYID (0))
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# 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, \
|
||||
(Loc).last_line, (Loc).last_column)
|
||||
|
||||
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
||||
|
||||
__attribute__((__unused__))
|
||||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||||
|| defined __cplusplus || defined _MSC_VER)
|
||||
static unsigned
|
||||
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
|
||||
#else
|
||||
static unsigned
|
||||
yy_location_print_ (yyo, yylocp)
|
||||
FILE *yyo;
|
||||
YYLTYPE const * const yylocp;
|
||||
#endif
|
||||
{
|
||||
unsigned res = 0;
|
||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||
if (0 <= yylocp->first_line)
|
||||
{
|
||||
res += fprintf (yyo, "%d", yylocp->first_line);
|
||||
if (0 <= yylocp->first_column)
|
||||
res += fprintf (yyo, ".%d", yylocp->first_column);
|
||||
}
|
||||
if (0 <= yylocp->last_line)
|
||||
{
|
||||
if (yylocp->first_line < yylocp->last_line)
|
||||
{
|
||||
res += fprintf (yyo, "-%d", yylocp->last_line);
|
||||
if (0 <= end_col)
|
||||
res += fprintf (yyo, ".%d", end_col);
|
||||
}
|
||||
else if (0 <= end_col && yylocp->first_column < end_col)
|
||||
res += fprintf (yyo, "-%d", end_col);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
yy_location_print_ (File, &(Loc))
|
||||
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
@ -701,7 +757,6 @@ while (YYID (0))
|
||||
|
||||
|
||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||
|
||||
#ifdef YYLEX_PARAM
|
||||
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
|
||||
#else
|
||||
@ -756,6 +811,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, oxml, result
|
||||
char ** error_msg;
|
||||
#endif
|
||||
{
|
||||
FILE *yyo = yyoutput;
|
||||
YYUSE (yyo);
|
||||
if (!yyvaluep)
|
||||
return;
|
||||
YYUSE (yylocationp);
|
||||
@ -772,7 +829,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, oxml, result
|
||||
switch (yytype)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1024,12 +1081,11 @@ static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
yytype_int16 *yyssp, int yytoken)
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = 0;
|
||||
const char *yyformat = YY_NULL;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
@ -1089,11 +1145,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1113,10 +1171,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
@ -1186,25 +1246,11 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, mc, oxml, result, error_msg)
|
||||
{
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Prevent warnings from -Wmissing-prototypes. */
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int yyparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int yyparse (mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg);
|
||||
#else
|
||||
int yyparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
|
||||
/*----------.
|
||||
@ -1239,11 +1285,40 @@ yyparse (mc, oxml, result, error_msg)
|
||||
/* The lookahead symbol. */
|
||||
int yychar;
|
||||
|
||||
|
||||
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
/* Default value used for initialization, for pacifying older GCCs
|
||||
or non-GCC compilers. */
|
||||
static YYSTYPE yyval_default;
|
||||
# define YY_INITIAL_VALUE(Value) = Value
|
||||
#endif
|
||||
static YYLTYPE yyloc_default
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
= { 1, 1, 1, 1 }
|
||||
# endif
|
||||
;
|
||||
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
#endif
|
||||
#ifndef YY_INITIAL_VALUE
|
||||
# define YY_INITIAL_VALUE(Value) /* Nothing. */
|
||||
#endif
|
||||
|
||||
/* The semantic value of the lookahead symbol. */
|
||||
YYSTYPE yylval;
|
||||
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
|
||||
|
||||
/* Location data for the lookahead symbol. */
|
||||
YYLTYPE yylloc;
|
||||
YYLTYPE yylloc = yyloc_default;
|
||||
|
||||
|
||||
/* Number of syntax errors so far. */
|
||||
int yynerrs;
|
||||
@ -1257,7 +1332,7 @@ YYLTYPE yylloc;
|
||||
`yyvs': related to semantic values.
|
||||
`yyls': related to locations.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
Refer to the stacks through separate pointers, to allow yyoverflow
|
||||
to reallocate them elsewhere. */
|
||||
|
||||
/* The state stack. */
|
||||
@ -1283,7 +1358,7 @@ YYLTYPE yylloc;
|
||||
int yyn;
|
||||
int yyresult;
|
||||
/* Lookahead token as an internal (translated) token number. */
|
||||
int yytoken;
|
||||
int yytoken = 0;
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
@ -1302,10 +1377,9 @@ YYLTYPE yylloc;
|
||||
Keep to zero when no symbol should be popped. */
|
||||
int yylen = 0;
|
||||
|
||||
yytoken = 0;
|
||||
yyss = yyssa;
|
||||
yyvs = yyvsa;
|
||||
yyls = yylsa;
|
||||
yyssp = yyss = yyssa;
|
||||
yyvsp = yyvs = yyvsa;
|
||||
yylsp = yyls = yylsa;
|
||||
yystacksize = YYINITDEPTH;
|
||||
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
@ -1314,21 +1388,7 @@ YYLTYPE yylloc;
|
||||
yyerrstatus = 0;
|
||||
yynerrs = 0;
|
||||
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 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 = 1;
|
||||
#endif
|
||||
|
||||
yylsp[0] = yylloc;
|
||||
goto yysetstate;
|
||||
|
||||
/*------------------------------------------------------------.
|
||||
@ -1474,7 +1534,9 @@ yybackup:
|
||||
yychar = YYEMPTY;
|
||||
|
||||
yystate = yyn;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
*++yyvsp = yylval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
*++yylsp = yylloc;
|
||||
goto yynewstate;
|
||||
|
||||
@ -1512,22 +1574,19 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 2:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 105 "expr_bool.y"
|
||||
{ result=(yyvsp[(1) - (1)].val_int); }
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 106 "expr_bool.y"
|
||||
{ result=true; }
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 109 "expr_bool.y"
|
||||
{ int val, rc;
|
||||
|
||||
@ -1536,8 +1595,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 114 "expr_bool.y"
|
||||
{ int val, rc;
|
||||
|
||||
@ -1546,8 +1604,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 119 "expr_bool.y"
|
||||
{ int val, rc;
|
||||
|
||||
@ -1556,8 +1613,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 124 "expr_bool.y"
|
||||
{ int val, rc;
|
||||
|
||||
@ -1566,8 +1622,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 129 "expr_bool.y"
|
||||
{ float val, rc;
|
||||
|
||||
@ -1576,8 +1631,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 134 "expr_bool.y"
|
||||
{ float val, rc;
|
||||
|
||||
@ -1586,8 +1640,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 10:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 139 "expr_bool.y"
|
||||
{ float val, rc;
|
||||
|
||||
@ -1596,8 +1649,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 144 "expr_bool.y"
|
||||
{ float val, rc;
|
||||
|
||||
@ -1606,8 +1658,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 12:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 149 "expr_bool.y"
|
||||
{ string val; int rc;
|
||||
|
||||
@ -1616,8 +1667,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 154 "expr_bool.y"
|
||||
{ string val; int rc;
|
||||
|
||||
@ -1626,37 +1676,32 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 159 "expr_bool.y"
|
||||
{ (yyval.val_int) = (yyvsp[(1) - (3)].val_int) && (yyvsp[(3) - (3)].val_int); }
|
||||
break;
|
||||
|
||||
case 15:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 160 "expr_bool.y"
|
||||
{ (yyval.val_int) = (yyvsp[(1) - (3)].val_int) || (yyvsp[(3) - (3)].val_int); }
|
||||
break;
|
||||
|
||||
case 16:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 161 "expr_bool.y"
|
||||
{ (yyval.val_int) = ! (yyvsp[(2) - (2)].val_int); }
|
||||
break;
|
||||
|
||||
case 17:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 162 "expr_bool.y"
|
||||
{ (yyval.val_int) = (yyvsp[(2) - (3)].val_int); }
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 1660 "expr_bool.cc"
|
||||
/* Line 1792 of yacc.c */
|
||||
#line 1705 "expr_bool.cc"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@ -1821,7 +1866,9 @@ yyerrlab1:
|
||||
YY_STACK_PRINT (yyss, yyssp);
|
||||
}
|
||||
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
*++yyvsp = yylval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
|
||||
yyerror_range[2] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
@ -1850,7 +1897,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
#if !defined yyoverflow || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
@ -1892,8 +1939,7 @@ yyreturn:
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Line 2067 of yacc.c */
|
||||
/* Line 2055 of yacc.c */
|
||||
#line 165 "expr_bool.y"
|
||||
|
||||
|
||||
@ -2009,4 +2055,4 @@ int get_xml_attribute(ObjectXML * oxml, const char* attr, string& val)
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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
|
||||
@ -30,6 +30,15 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED
|
||||
# define YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int expr_bool__debug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -44,12 +53,10 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
/* Line 2068 of yacc.c */
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 85 "expr_bool.y"
|
||||
|
||||
char * val_str;
|
||||
@ -57,17 +64,14 @@ typedef union YYSTYPE
|
||||
float val_float;
|
||||
|
||||
|
||||
|
||||
/* Line 2068 of yacc.c */
|
||||
#line 63 "expr_bool.hh"
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 69 "expr_bool.hh"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
{
|
||||
@ -81,5 +85,4 @@ typedef struct YYLTYPE
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* !YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED */
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||
#define YY_FLEX_SUBMINOR_VERSION 37
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
@ -161,15 +161,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.
|
||||
@ -181,7 +173,12 @@ typedef unsigned int flex_uint32_t;
|
||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||
#endif
|
||||
|
||||
extern int expr_leng;
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
extern yy_size_t expr_leng;
|
||||
|
||||
extern FILE *expr_in, *expr_out;
|
||||
|
||||
@ -220,11 +217,6 @@ extern FILE *expr_in, *expr_out;
|
||||
|
||||
#define unput(c) yyunput( c, (yytext_ptr) )
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||
#define YY_TYPEDEF_YY_SIZE_T
|
||||
typedef size_t yy_size_t;
|
||||
#endif
|
||||
|
||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||
#define YY_STRUCT_YY_BUFFER_STATE
|
||||
struct yy_buffer_state
|
||||
@ -242,7 +234,7 @@ struct yy_buffer_state
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
int yy_n_chars;
|
||||
yy_size_t yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
@ -312,8 +304,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
||||
|
||||
/* yy_hold_char holds the character lost when expr_text is formed. */
|
||||
static char yy_hold_char;
|
||||
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
int expr_leng;
|
||||
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
yy_size_t expr_leng;
|
||||
|
||||
/* Points to current character in buffer. */
|
||||
static char *yy_c_buf_p = (char *) 0;
|
||||
@ -341,7 +333,7 @@ static void expr__init_buffer (YY_BUFFER_STATE b,FILE *file );
|
||||
|
||||
YY_BUFFER_STATE expr__scan_buffer (char *base,yy_size_t size );
|
||||
YY_BUFFER_STATE expr__scan_string (yyconst char *yy_str );
|
||||
YY_BUFFER_STATE expr__scan_bytes (yyconst char *bytes,int len );
|
||||
YY_BUFFER_STATE expr__scan_bytes (yyconst char *bytes,yy_size_t len );
|
||||
|
||||
void *expr_alloc (yy_size_t );
|
||||
void *expr_realloc (void *,yy_size_t );
|
||||
@ -533,7 +525,7 @@ char *expr_text;
|
||||
#define YY_USER_ACTION llocp->first_line = expr_lineno; \
|
||||
llocp->first_column = llocp->last_column; \
|
||||
llocp->last_column += expr_leng;
|
||||
#line 537 "expr_parser.c"
|
||||
#line 529 "expr_parser.c"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
@ -572,7 +564,7 @@ FILE *expr_get_out (void );
|
||||
|
||||
void expr_set_out (FILE * out_str );
|
||||
|
||||
int expr_get_leng (void );
|
||||
yy_size_t expr_get_leng (void );
|
||||
|
||||
char *expr_get_text (void );
|
||||
|
||||
@ -612,12 +604,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. */
|
||||
@ -722,7 +709,7 @@ YY_DECL
|
||||
|
||||
/* --- Tokens --- */
|
||||
|
||||
#line 726 "expr_parser.c"
|
||||
#line 713 "expr_parser.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -865,7 +852,7 @@ YY_RULE_SETUP
|
||||
#line 68 "expr_parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 869 "expr_parser.c"
|
||||
#line 856 "expr_parser.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
||||
@ -1051,21 +1038,21 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
else
|
||||
{
|
||||
int num_to_read =
|
||||
yy_size_t num_to_read =
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
||||
|
||||
while ( num_to_read <= 0 )
|
||||
{ /* Not enough room in the buffer - grow it. */
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
|
||||
int yy_c_buf_p_offset =
|
||||
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
{
|
||||
int new_size = b->yy_buf_size * 2;
|
||||
yy_size_t new_size = b->yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->yy_buf_size += b->yy_buf_size / 8;
|
||||
@ -1096,7 +1083,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
/* Read in more data. */
|
||||
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
||||
(yy_n_chars), (size_t) num_to_read );
|
||||
(yy_n_chars), num_to_read );
|
||||
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||||
}
|
||||
@ -1191,7 +1178,7 @@ static int yy_get_next_buffer (void)
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||
yy_is_jam = (yy_current_state == 19);
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
@ -1218,7 +1205,7 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
else
|
||||
{ /* need more input */
|
||||
int offset = (yy_c_buf_p) - (yytext_ptr);
|
||||
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
|
||||
++(yy_c_buf_p);
|
||||
|
||||
switch ( yy_get_next_buffer( ) )
|
||||
@ -1383,10 +1370,6 @@ static void expr__load_buffer_state (void)
|
||||
expr_free((void *) b );
|
||||
}
|
||||
|
||||
#ifndef __cplusplus
|
||||
extern int isatty (int );
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
* This function is sometimes called more than once on the same buffer,
|
||||
* such as during a expr_restart() or at EOF.
|
||||
@ -1499,7 +1482,7 @@ void expr_pop_buffer_state (void)
|
||||
*/
|
||||
static void expr_ensure_buffer_stack (void)
|
||||
{
|
||||
int num_to_alloc;
|
||||
yy_size_t num_to_alloc;
|
||||
|
||||
if (!(yy_buffer_stack)) {
|
||||
|
||||
@ -1596,7 +1579,7 @@ YY_BUFFER_STATE expr__scan_string (yyconst char * yystr )
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE expr__scan_bytes (yyconst char * yybytes, int _yybytes_len )
|
||||
YY_BUFFER_STATE expr__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
@ -1683,7 +1666,7 @@ FILE *expr_get_out (void)
|
||||
/** Get the length of the current token.
|
||||
*
|
||||
*/
|
||||
int expr_get_leng (void)
|
||||
yy_size_t expr_get_leng (void)
|
||||
{
|
||||
return expr_leng;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user