diff --git a/src/template/template_parser.c b/src/template/template_parser.c index 2c473ec80d..694c159a88 100644 --- a/src/template/template_parser.c +++ b/src/template/template_parser.c @@ -28,7 +28,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -161,7 +161,15 @@ 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. @@ -173,12 +181,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#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 int template_leng; extern FILE *template_in, *template_out; @@ -217,6 +220,11 @@ 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 @@ -234,7 +242,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int 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 @@ -304,8 +312,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 yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t template_leng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int template_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -333,7 +341,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,yy_size_t len ); +YY_BUFFER_STATE template__scan_bytes (yyconst char *bytes,int len ); void *template_alloc (yy_size_t ); void *template_realloc (void *,yy_size_t ); @@ -554,7 +562,7 @@ char *template_text; llocp->first_column = llocp->last_column; \ llocp->last_column += template_leng; -#line 558 "template_parser.c" +#line 566 "template_parser.c" #define INITIAL 0 #define VALUE 1 @@ -594,7 +602,7 @@ FILE *template_get_out (void ); void template_set_out (FILE * out_str ); -yy_size_t template_get_leng (void ); +int template_get_leng (void ); char *template_get_text (void ); @@ -634,7 +642,12 @@ 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. */ @@ -741,7 +754,7 @@ YY_DECL /* ------------------------------------------------------------------------- */ /* Comments (lines with an starting #), and empty lines */ /* ------------------------------------------------------------------------- */ -#line 745 "template_parser.c" +#line 758 "template_parser.c" if ( !(yy_init) ) { @@ -918,7 +931,7 @@ YY_RULE_SETUP #line 89 "template_parser.l" ECHO; YY_BREAK -#line 922 "template_parser.c" +#line 935 "template_parser.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(VALUE): yyterminate(); @@ -1105,21 +1118,21 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int 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_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1150,7 +1163,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), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1245,7 +1258,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 @@ -1272,7 +1285,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1437,6 +1450,10 @@ 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. @@ -1549,7 +1566,7 @@ void template_pop_buffer_state (void) */ static void template_ensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -1646,7 +1663,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, yy_size_t _yybytes_len ) +YY_BUFFER_STATE template__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -1733,7 +1750,7 @@ FILE *template_get_out (void) /** Get the length of the current token. * */ -yy_size_t template_get_leng (void) +int template_get_leng (void) { return template_leng; } diff --git a/src/vm/vm_var_parser.c b/src/vm/vm_var_parser.c index f3a5f4a8ae..bb55442e3e 100644 --- a/src/vm/vm_var_parser.c +++ b/src/vm/vm_var_parser.c @@ -28,7 +28,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -161,7 +161,15 @@ 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. @@ -173,12 +181,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#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 int vm_var_leng; extern FILE *vm_var_in, *vm_var_out; @@ -217,6 +220,11 @@ 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 @@ -234,7 +242,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int 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 @@ -304,8 +312,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 yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t vm_var_leng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int vm_var_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -333,7 +341,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,yy_size_t len ); +YY_BUFFER_STATE vm_var__scan_bytes (yyconst char *bytes,int len ); void *vm_var_alloc (yy_size_t ); void *vm_var_realloc (void *,yy_size_t ); @@ -538,7 +546,7 @@ char *vm_var_text; llocp->last_column += vm_var_leng; -#line 542 "vm_var_parser.c" +#line 550 "vm_var_parser.c" #define INITIAL 0 #define VAR 1 @@ -579,7 +587,7 @@ FILE *vm_var_get_out (void ); void vm_var_set_out (FILE * out_str ); -yy_size_t vm_var_get_leng (void ); +int vm_var_get_leng (void ); char *vm_var_get_text (void ); @@ -619,7 +627,12 @@ 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. */ @@ -731,7 +744,7 @@ YY_DECL /* $NUM.CONTEXT_VARIABLE */ /* ------------------------------------------------------------------------- */ -#line 735 "vm_var_parser.c" +#line 748 "vm_var_parser.c" if ( !(yy_init) ) { @@ -907,7 +920,7 @@ YY_RULE_SETUP #line 92 "vm_var_parser.l" ECHO; YY_BREAK -#line 911 "vm_var_parser.c" +#line 924 "vm_var_parser.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(VALUE): yyterminate(); @@ -1094,21 +1107,21 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int 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_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1139,7 +1152,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), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1234,7 +1247,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 @@ -1261,7 +1274,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1426,6 +1439,10 @@ 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. @@ -1538,7 +1555,7 @@ void vm_var_pop_buffer_state (void) */ static void vm_var_ensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -1635,7 +1652,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, yy_size_t _yybytes_len ) +YY_BUFFER_STATE vm_var__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -1722,7 +1739,7 @@ FILE *vm_var_get_out (void) /** Get the length of the current token. * */ -yy_size_t vm_var_get_leng (void) +int vm_var_get_leng (void) { return vm_var_leng; } diff --git a/src/xml/expr_bool.cc b/src/xml/expr_bool.cc index b4b20ef924..a3454b5d6b 100644 --- a/src/xml/expr_bool.cc +++ b/src/xml/expr_bool.cc @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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.7" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,6 +58,8 @@ /* Pull parsers. */ #define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ #define yyparse expr_bool__parse @@ -70,7 +72,8 @@ #define yylloc expr_bool__lloc /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ + +/* Line 268 of yacc.c */ #line 17 "expr_bool.y" #include @@ -78,6 +81,7 @@ #include #include #include +#include #include #include @@ -131,17 +135,17 @@ int get_xml_attribute(ObjectXML * oxml, const char* attr, string& val); void get_xml_values(ObjectXML * oxml, const char* attr, vector& results); +void get_vm_ids(ObjectXML * oxml, set& vm_ids); -/* Line 371 of yacc.c */ -#line 137 "expr_bool.cc" -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif + +/* Line 268 of yacc.c */ +#line 144 "expr_bool.cc" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -151,18 +155,12 @@ void get_xml_values(ObjectXML * oxml, const char* attr, vector& results) # define YYERROR_VERBOSE 0 #endif -/* 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; +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 #endif + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -176,19 +174,22 @@ extern int expr_bool__debug; #endif + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 387 of yacc.c */ -#line 85 "expr_bool.y" + +/* Line 293 of yacc.c */ +#line 88 "expr_bool.y" char * val_str; int val_int; float val_float; -/* Line 387 of yacc.c */ -#line 192 "expr_bool.cc" + +/* Line 293 of yacc.c */ +#line 193 "expr_bool.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -209,26 +210,11 @@ 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 390 of yacc.c */ -#line 232 "expr_bool.cc" + +/* Line 343 of yacc.c */ +#line 218 "expr_bool.cc" #ifdef short # undef short @@ -281,24 +267,24 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* 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) @@ -334,7 +320,6 @@ YYID (yyi) # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -428,20 +413,20 @@ union yyalloc #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do +/* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ while (YYID (0)) # endif # endif @@ -524,18 +509,18 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 105, 105, 106, 109, 114, 119, 124, 129, 134, - 139, 144, 149, 154, 159, 160, 161, 162 + 0, 108, 108, 109, 112, 128, 144, 149, 154, 159, + 164, 169, 174, 179, 184, 185, 186, 187 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* 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", YY_NULL + "FLOAT", "'='", "'>'", "'<'", "'('", "')'", "$accept", "stmt", "expr", 0 }; #endif @@ -606,10 +591,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[] = @@ -655,24 +640,23 @@ static const yytype_uint8 yystos[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + 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 @@ -681,28 +665,27 @@ 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 @@ -710,46 +693,10 @@ while (YYID (0)) #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - -/* 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)) - +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -757,6 +704,7 @@ yy_location_print_ (yyo, yylocp) /* YYLEX -- calling `yylex' with the right arguments. */ + #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else @@ -811,8 +759,6 @@ 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); @@ -829,7 +775,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, mc, oxml, result switch (yytype) { default: - break; + break; } } @@ -1081,11 +1027,12 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1145,13 +1092,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; } } } @@ -1171,12 +1116,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; if (*yymsg_alloc < yysize) { @@ -1246,11 +1189,25 @@ 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 */ /*----------. @@ -1285,40 +1242,11 @@ 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 YY_INITIAL_VALUE(yyval_default); +YYSTYPE yylval; /* Location data for the lookahead symbol. */ -YYLTYPE yylloc = yyloc_default; - +YYLTYPE yylloc; /* Number of syntax errors so far. */ int yynerrs; @@ -1332,7 +1260,7 @@ YYLTYPE yylloc = yyloc_default; `yyvs': related to semantic values. `yyls': related to locations. - Refer to the stacks through separate pointers, to allow yyoverflow + Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1358,7 +1286,7 @@ YYLTYPE yylloc = yyloc_default; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1377,9 +1305,10 @@ YYLTYPE yylloc = yyloc_default; Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yylsp = yyls = yylsa; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yyls = yylsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1388,7 +1317,21 @@ YYLTYPE yylloc = yyloc_default; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - yylsp[0] = yylloc; + + /* 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 + goto yysetstate; /*------------------------------------------------------------. @@ -1534,9 +1477,7 @@ yybackup: yychar = YYEMPTY; yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; goto yynewstate; @@ -1574,38 +1515,65 @@ yyreduce: switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 105 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 108 "expr_bool.y" { result=(yyvsp[(1) - (1)].val_int); } break; case 3: -/* Line 1792 of yacc.c */ -#line 106 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 109 "expr_bool.y" { result=true; } break; case 4: -/* Line 1792 of yacc.c */ -#line 109 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 112 "expr_bool.y" { int val, rc; - rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); - (yyval.val_int) = (rc == 0 && val == (yyvsp[(3) - (3)].val_int));} + if ((yyvsp[(1) - (3)].val_str) == string("CURRENT_VMS")) + { + set vm_ids; + get_vm_ids(oxml, vm_ids); + + (yyval.val_int) = vm_ids.count((yyvsp[(3) - (3)].val_int)) > 0; + } + else + { + rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); + (yyval.val_int) = (rc == 0 && val == (yyvsp[(3) - (3)].val_int)); + } + } break; case 5: -/* Line 1792 of yacc.c */ -#line 114 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 128 "expr_bool.y" { int val, rc; - rc = get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val); - (yyval.val_int) = (rc == 0 && val != (yyvsp[(4) - (4)].val_int));} + if ((yyvsp[(1) - (4)].val_str) == string("CURRENT_VMS")) + { + set vm_ids; + get_vm_ids(oxml, vm_ids); + + (yyval.val_int) = vm_ids.count((yyvsp[(4) - (4)].val_int)) == 0; + } + else + { + rc = get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val); + (yyval.val_int) = (rc == 0 && val != (yyvsp[(4) - (4)].val_int)); + } + } break; case 6: -/* Line 1792 of yacc.c */ -#line 119 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 144 "expr_bool.y" { int val, rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); @@ -1613,8 +1581,9 @@ yyreduce: break; case 7: -/* Line 1792 of yacc.c */ -#line 124 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 149 "expr_bool.y" { int val, rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); @@ -1622,8 +1591,9 @@ yyreduce: break; case 8: -/* Line 1792 of yacc.c */ -#line 129 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 154 "expr_bool.y" { float val, rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); @@ -1631,8 +1601,9 @@ yyreduce: break; case 9: -/* Line 1792 of yacc.c */ -#line 134 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 159 "expr_bool.y" { float val, rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val); @@ -1640,8 +1611,9 @@ yyreduce: break; case 10: -/* Line 1792 of yacc.c */ -#line 139 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 164 "expr_bool.y" { float val, rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); @@ -1649,8 +1621,9 @@ yyreduce: break; case 11: -/* Line 1792 of yacc.c */ -#line 144 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 169 "expr_bool.y" { float val, rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); @@ -1658,8 +1631,9 @@ yyreduce: break; case 12: -/* Line 1792 of yacc.c */ -#line 149 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 174 "expr_bool.y" { string val; int rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val); @@ -1667,8 +1641,9 @@ yyreduce: break; case 13: -/* Line 1792 of yacc.c */ -#line 154 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 179 "expr_bool.y" { string val; int rc; rc = get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val); @@ -1676,32 +1651,37 @@ yyreduce: break; case 14: -/* Line 1792 of yacc.c */ -#line 159 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 184 "expr_bool.y" { (yyval.val_int) = (yyvsp[(1) - (3)].val_int) && (yyvsp[(3) - (3)].val_int); } break; case 15: -/* Line 1792 of yacc.c */ -#line 160 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 185 "expr_bool.y" { (yyval.val_int) = (yyvsp[(1) - (3)].val_int) || (yyvsp[(3) - (3)].val_int); } break; case 16: -/* Line 1792 of yacc.c */ -#line 161 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 186 "expr_bool.y" { (yyval.val_int) = ! (yyvsp[(2) - (2)].val_int); } break; case 17: -/* Line 1792 of yacc.c */ -#line 162 "expr_bool.y" + +/* Line 1806 of yacc.c */ +#line 187 "expr_bool.y" { (yyval.val_int) = (yyvsp[(2) - (3)].val_int); } break; -/* Line 1792 of yacc.c */ -#line 1705 "expr_bool.cc" + +/* Line 1806 of yacc.c */ +#line 1685 "expr_bool.cc" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1866,9 +1846,7 @@ 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 @@ -1897,7 +1875,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1939,8 +1917,9 @@ yyreturn: } -/* Line 2055 of yacc.c */ -#line 165 "expr_bool.y" + +/* Line 2067 of yacc.c */ +#line 190 "expr_bool.y" extern "C" void expr_bool__error( @@ -2055,4 +2034,26 @@ int get_xml_attribute(ObjectXML * oxml, const char* attr, string& val) } return -1; -} \ No newline at end of file +} + +void get_vm_ids(ObjectXML * oxml, set& vm_ids) +{ + istringstream iss; + vector results; + int id; + + get_xml_values(oxml, "/HOST/VMS/ID", results); + + for (vector::iterator it=results.begin(); it!=results.end(); it++) + { + iss.clear(); + iss.str(*it); + + iss >> id; + + if (!iss.fail()) + { + vm_ids.insert(id); + } + } +} diff --git a/src/xml/expr_bool.h b/src/xml/expr_bool.h index 5651b7c004..560458501c 100644 --- a/src/xml/expr_bool.h +++ b/src/xml/expr_bool.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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,15 +30,6 @@ 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 @@ -53,25 +44,30 @@ extern int expr_bool__debug; #endif + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 2058 of yacc.c */ -#line 85 "expr_bool.y" + +/* Line 2068 of yacc.c */ +#line 88 "expr_bool.y" char * val_str; int val_int; float val_float; -/* Line 2058 of yacc.c */ -#line 69 "expr_bool.hh" + +/* Line 2068 of yacc.c */ +#line 63 "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 { @@ -85,4 +81,5 @@ typedef struct YYLTYPE # define YYLTYPE_IS_TRIVIAL 1 #endif -#endif /* !YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED */ + + diff --git a/src/xml/expr_parser.c b/src/xml/expr_parser.c index 78c4442e14..904273b868 100644 --- a/src/xml/expr_parser.c +++ b/src/xml/expr_parser.c @@ -28,7 +28,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -161,7 +161,15 @@ 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. @@ -173,12 +181,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#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 int expr_leng; extern FILE *expr_in, *expr_out; @@ -217,6 +220,11 @@ 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 @@ -234,7 +242,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int 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 @@ -304,8 +312,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 yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t expr_leng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int expr_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -333,7 +341,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,yy_size_t len ); +YY_BUFFER_STATE expr__scan_bytes (yyconst char *bytes,int len ); void *expr_alloc (yy_size_t ); void *expr_realloc (void *,yy_size_t ); @@ -525,7 +533,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 529 "expr_parser.c" +#line 537 "expr_parser.c" #define INITIAL 0 @@ -564,7 +572,7 @@ FILE *expr_get_out (void ); void expr_set_out (FILE * out_str ); -yy_size_t expr_get_leng (void ); +int expr_get_leng (void ); char *expr_get_text (void ); @@ -604,7 +612,12 @@ 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. */ @@ -709,7 +722,7 @@ YY_DECL /* --- Tokens --- */ -#line 713 "expr_parser.c" +#line 726 "expr_parser.c" if ( !(yy_init) ) { @@ -852,7 +865,7 @@ YY_RULE_SETUP #line 68 "expr_parser.l" ECHO; YY_BREAK -#line 856 "expr_parser.c" +#line 869 "expr_parser.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1038,21 +1051,21 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int 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_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1083,7 +1096,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), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1178,7 +1191,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 @@ -1205,7 +1218,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1370,6 +1383,10 @@ 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. @@ -1482,7 +1499,7 @@ void expr_pop_buffer_state (void) */ static void expr_ensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -1579,7 +1596,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, yy_size_t _yybytes_len ) +YY_BUFFER_STATE expr__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -1666,7 +1683,7 @@ FILE *expr_get_out (void) /** Get the length of the current token. * */ -yy_size_t expr_get_leng (void) +int expr_get_leng (void) { return expr_leng; }