From: Wouter Wijngaards Date: Thu, 22 May 2008 10:41:13 +0000 (+0000) Subject: no lexer warnings. X-Git-Tag: release-1.0.1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9074eb440e8494cad3182d8a67613c94ad2db47;p=thirdparty%2Funbound.git no lexer warnings. git-svn-id: file:///svn/unbound/trunk@1091 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 3e29ea211..da6be7968 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - contrib unbound.spec from Patrick Vande Walle. - fixup bug#175: call tzset before chroot to have correct timestamps in system log. + - do not generate lex input and lex unput functions. 19 May 2008: Wouter - fedora 9, check in6_pktinfo define in configure. diff --git a/util/configlexer.c b/util/configlexer.c index 819212a28..a399587a9 100644 --- a/util/configlexer.c +++ b/util/configlexer.c @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -31,7 +31,7 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. @@ -94,11 +94,12 @@ typedef unsigned int flex_uint32_t; #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST @@ -178,14 +179,9 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; +typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE @@ -1181,8 +1177,9 @@ static void config_end_include(void) } #endif +#define YY_NO_INPUT 1 -#line 1185 "" +#line 1182 "" #define INITIAL 0 #define quotedstring 1 @@ -1204,6 +1201,35 @@ static void config_end_include(void) static int yy_init_globals (void ); +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +int yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -1244,7 +1270,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1255,7 +1281,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1337,9 +1363,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 99 "util/configlexer.lex" +#line 101 "util/configlexer.lex" -#line 1342 "" +#line 1368 "" if ( !(yy_init) ) { @@ -1430,383 +1456,383 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 100 "util/configlexer.lex" +#line 102 "util/configlexer.lex" { LEXOUT(("SP ")); /* ignore */ } YY_BREAK case 2: YY_RULE_SETUP -#line 101 "util/configlexer.lex" +#line 103 "util/configlexer.lex" { LEXOUT(("comment(%s) ", yytext)); /* ignore */ } YY_BREAK case 3: YY_RULE_SETUP -#line 102 "util/configlexer.lex" +#line 104 "util/configlexer.lex" { YDOUT; return VAR_SERVER;} YY_BREAK case 4: YY_RULE_SETUP -#line 103 "util/configlexer.lex" +#line 105 "util/configlexer.lex" { YDOUT; return VAR_NUM_THREADS;} YY_BREAK case 5: YY_RULE_SETUP -#line 104 "util/configlexer.lex" +#line 106 "util/configlexer.lex" { YDOUT; return VAR_VERBOSITY;} YY_BREAK case 6: YY_RULE_SETUP -#line 105 "util/configlexer.lex" +#line 107 "util/configlexer.lex" { YDOUT; return VAR_PORT;} YY_BREAK case 7: YY_RULE_SETUP -#line 106 "util/configlexer.lex" +#line 108 "util/configlexer.lex" { YDOUT; return VAR_OUTGOING_RANGE;} YY_BREAK case 8: YY_RULE_SETUP -#line 107 "util/configlexer.lex" +#line 109 "util/configlexer.lex" { YDOUT; return VAR_OUTGOING_PORT_PERMIT;} YY_BREAK case 9: YY_RULE_SETUP -#line 108 "util/configlexer.lex" +#line 110 "util/configlexer.lex" { YDOUT; return VAR_OUTGOING_PORT_AVOID;} YY_BREAK case 10: YY_RULE_SETUP -#line 109 "util/configlexer.lex" +#line 111 "util/configlexer.lex" { YDOUT; return VAR_OUTGOING_NUM_TCP;} YY_BREAK case 11: YY_RULE_SETUP -#line 110 "util/configlexer.lex" +#line 112 "util/configlexer.lex" { YDOUT; return VAR_INCOMING_NUM_TCP;} YY_BREAK case 12: YY_RULE_SETUP -#line 111 "util/configlexer.lex" +#line 113 "util/configlexer.lex" { YDOUT; return VAR_DO_IP4;} YY_BREAK case 13: YY_RULE_SETUP -#line 112 "util/configlexer.lex" +#line 114 "util/configlexer.lex" { YDOUT; return VAR_DO_IP6;} YY_BREAK case 14: YY_RULE_SETUP -#line 113 "util/configlexer.lex" +#line 115 "util/configlexer.lex" { YDOUT; return VAR_DO_UDP;} YY_BREAK case 15: YY_RULE_SETUP -#line 114 "util/configlexer.lex" +#line 116 "util/configlexer.lex" { YDOUT; return VAR_DO_TCP;} YY_BREAK case 16: YY_RULE_SETUP -#line 115 "util/configlexer.lex" +#line 117 "util/configlexer.lex" { YDOUT; return VAR_DO_DAEMONIZE;} YY_BREAK case 17: YY_RULE_SETUP -#line 116 "util/configlexer.lex" +#line 118 "util/configlexer.lex" { YDOUT; return VAR_INTERFACE;} YY_BREAK case 18: YY_RULE_SETUP -#line 117 "util/configlexer.lex" +#line 119 "util/configlexer.lex" { YDOUT; return VAR_OUTGOING_INTERFACE;} YY_BREAK case 19: YY_RULE_SETUP -#line 118 "util/configlexer.lex" +#line 120 "util/configlexer.lex" { YDOUT; return VAR_INTERFACE_AUTOMATIC;} YY_BREAK case 20: YY_RULE_SETUP -#line 119 "util/configlexer.lex" +#line 121 "util/configlexer.lex" { YDOUT; return VAR_CHROOT;} YY_BREAK case 21: YY_RULE_SETUP -#line 120 "util/configlexer.lex" +#line 122 "util/configlexer.lex" { YDOUT; return VAR_USERNAME;} YY_BREAK case 22: YY_RULE_SETUP -#line 121 "util/configlexer.lex" +#line 123 "util/configlexer.lex" { YDOUT; return VAR_DIRECTORY;} YY_BREAK case 23: YY_RULE_SETUP -#line 122 "util/configlexer.lex" +#line 124 "util/configlexer.lex" { YDOUT; return VAR_LOGFILE;} YY_BREAK case 24: YY_RULE_SETUP -#line 123 "util/configlexer.lex" +#line 125 "util/configlexer.lex" { YDOUT; return VAR_PIDFILE;} YY_BREAK case 25: YY_RULE_SETUP -#line 124 "util/configlexer.lex" +#line 126 "util/configlexer.lex" { YDOUT; return VAR_ROOT_HINTS;} YY_BREAK case 26: YY_RULE_SETUP -#line 125 "util/configlexer.lex" +#line 127 "util/configlexer.lex" { YDOUT; return VAR_MSG_BUFFER_SIZE;} YY_BREAK case 27: YY_RULE_SETUP -#line 126 "util/configlexer.lex" +#line 128 "util/configlexer.lex" { YDOUT; return VAR_MSG_CACHE_SIZE;} YY_BREAK case 28: YY_RULE_SETUP -#line 127 "util/configlexer.lex" +#line 129 "util/configlexer.lex" { YDOUT; return VAR_MSG_CACHE_SLABS;} YY_BREAK case 29: YY_RULE_SETUP -#line 128 "util/configlexer.lex" +#line 130 "util/configlexer.lex" { YDOUT; return VAR_RRSET_CACHE_SIZE;} YY_BREAK case 30: YY_RULE_SETUP -#line 129 "util/configlexer.lex" +#line 131 "util/configlexer.lex" { YDOUT; return VAR_RRSET_CACHE_SLABS;} YY_BREAK case 31: YY_RULE_SETUP -#line 130 "util/configlexer.lex" +#line 132 "util/configlexer.lex" { YDOUT; return VAR_CACHE_MAX_TTL;} YY_BREAK case 32: YY_RULE_SETUP -#line 131 "util/configlexer.lex" +#line 133 "util/configlexer.lex" { YDOUT; return VAR_INFRA_HOST_TTL;} YY_BREAK case 33: YY_RULE_SETUP -#line 132 "util/configlexer.lex" +#line 134 "util/configlexer.lex" { YDOUT; return VAR_INFRA_LAME_TTL;} YY_BREAK case 34: YY_RULE_SETUP -#line 133 "util/configlexer.lex" +#line 135 "util/configlexer.lex" { YDOUT; return VAR_INFRA_CACHE_SLABS;} YY_BREAK case 35: YY_RULE_SETUP -#line 134 "util/configlexer.lex" +#line 136 "util/configlexer.lex" { YDOUT; return VAR_INFRA_CACHE_NUMHOSTS;} YY_BREAK case 36: YY_RULE_SETUP -#line 135 "util/configlexer.lex" +#line 137 "util/configlexer.lex" { YDOUT; return VAR_INFRA_CACHE_LAME_SIZE;} YY_BREAK case 37: YY_RULE_SETUP -#line 136 "util/configlexer.lex" +#line 138 "util/configlexer.lex" { YDOUT; return VAR_NUM_QUERIES_PER_THREAD;} YY_BREAK case 38: YY_RULE_SETUP -#line 137 "util/configlexer.lex" +#line 139 "util/configlexer.lex" { YDOUT; return VAR_TARGET_FETCH_POLICY;} YY_BREAK case 39: YY_RULE_SETUP -#line 138 "util/configlexer.lex" +#line 140 "util/configlexer.lex" { YDOUT; return VAR_HARDEN_SHORT_BUFSIZE;} YY_BREAK case 40: YY_RULE_SETUP -#line 139 "util/configlexer.lex" +#line 141 "util/configlexer.lex" { YDOUT; return VAR_HARDEN_LARGE_QUERIES;} YY_BREAK case 41: YY_RULE_SETUP -#line 140 "util/configlexer.lex" +#line 142 "util/configlexer.lex" { YDOUT; return VAR_HARDEN_GLUE;} YY_BREAK case 42: YY_RULE_SETUP -#line 141 "util/configlexer.lex" +#line 143 "util/configlexer.lex" { YDOUT; return VAR_HARDEN_DNNSEC_STRIPPED;} YY_BREAK case 43: YY_RULE_SETUP -#line 142 "util/configlexer.lex" +#line 144 "util/configlexer.lex" { YDOUT; return VAR_USE_CAPS_FOR_ID;} YY_BREAK case 44: YY_RULE_SETUP -#line 143 "util/configlexer.lex" +#line 145 "util/configlexer.lex" { YDOUT; return VAR_STUB_ZONE;} YY_BREAK case 45: YY_RULE_SETUP -#line 144 "util/configlexer.lex" +#line 146 "util/configlexer.lex" { YDOUT; return VAR_NAME;} YY_BREAK case 46: YY_RULE_SETUP -#line 145 "util/configlexer.lex" +#line 147 "util/configlexer.lex" { YDOUT; return VAR_STUB_ADDR;} YY_BREAK case 47: YY_RULE_SETUP -#line 146 "util/configlexer.lex" +#line 148 "util/configlexer.lex" { YDOUT; return VAR_STUB_HOST;} YY_BREAK case 48: YY_RULE_SETUP -#line 147 "util/configlexer.lex" +#line 149 "util/configlexer.lex" { YDOUT; return VAR_FORWARD_ZONE;} YY_BREAK case 49: YY_RULE_SETUP -#line 148 "util/configlexer.lex" +#line 150 "util/configlexer.lex" { YDOUT; return VAR_FORWARD_ADDR;} YY_BREAK case 50: YY_RULE_SETUP -#line 149 "util/configlexer.lex" +#line 151 "util/configlexer.lex" { YDOUT; return VAR_FORWARD_HOST;} YY_BREAK case 51: YY_RULE_SETUP -#line 150 "util/configlexer.lex" +#line 152 "util/configlexer.lex" { YDOUT; return VAR_DO_NOT_QUERY_ADDRESS;} YY_BREAK case 52: YY_RULE_SETUP -#line 151 "util/configlexer.lex" +#line 153 "util/configlexer.lex" { YDOUT; return VAR_DO_NOT_QUERY_LOCALHOST;} YY_BREAK case 53: YY_RULE_SETUP -#line 152 "util/configlexer.lex" +#line 154 "util/configlexer.lex" { YDOUT; return VAR_ACCESS_CONTROL;} YY_BREAK case 54: YY_RULE_SETUP -#line 153 "util/configlexer.lex" +#line 155 "util/configlexer.lex" { YDOUT; return VAR_HIDE_IDENTITY;} YY_BREAK case 55: YY_RULE_SETUP -#line 154 "util/configlexer.lex" +#line 156 "util/configlexer.lex" { YDOUT; return VAR_HIDE_VERSION;} YY_BREAK case 56: YY_RULE_SETUP -#line 155 "util/configlexer.lex" +#line 157 "util/configlexer.lex" { YDOUT; return VAR_IDENTITY;} YY_BREAK case 57: YY_RULE_SETUP -#line 156 "util/configlexer.lex" +#line 158 "util/configlexer.lex" { YDOUT; return VAR_VERSION;} YY_BREAK case 58: YY_RULE_SETUP -#line 157 "util/configlexer.lex" +#line 159 "util/configlexer.lex" { YDOUT; return VAR_MODULE_CONF;} YY_BREAK case 59: YY_RULE_SETUP -#line 158 "util/configlexer.lex" +#line 160 "util/configlexer.lex" { YDOUT; return VAR_TRUST_ANCHOR_FILE;} YY_BREAK case 60: YY_RULE_SETUP -#line 159 "util/configlexer.lex" +#line 161 "util/configlexer.lex" { YDOUT; return VAR_TRUSTED_KEYS_FILE;} YY_BREAK case 61: YY_RULE_SETUP -#line 160 "util/configlexer.lex" +#line 162 "util/configlexer.lex" { YDOUT; return VAR_TRUST_ANCHOR;} YY_BREAK case 62: YY_RULE_SETUP -#line 161 "util/configlexer.lex" +#line 163 "util/configlexer.lex" { YDOUT; return VAR_VAL_OVERRIDE_DATE;} YY_BREAK case 63: YY_RULE_SETUP -#line 162 "util/configlexer.lex" +#line 164 "util/configlexer.lex" { YDOUT; return VAR_BOGUS_TTL;} YY_BREAK case 64: YY_RULE_SETUP -#line 163 "util/configlexer.lex" +#line 165 "util/configlexer.lex" { YDOUT; return VAR_VAL_CLEAN_ADDITIONAL;} YY_BREAK case 65: YY_RULE_SETUP -#line 164 "util/configlexer.lex" +#line 166 "util/configlexer.lex" { YDOUT; return VAR_VAL_PERMISSIVE_MODE;} YY_BREAK case 66: YY_RULE_SETUP -#line 165 "util/configlexer.lex" +#line 167 "util/configlexer.lex" { YDOUT; return VAR_KEY_CACHE_SIZE;} YY_BREAK case 67: YY_RULE_SETUP -#line 166 "util/configlexer.lex" +#line 168 "util/configlexer.lex" { YDOUT; return VAR_KEY_CACHE_SLABS;} YY_BREAK case 68: YY_RULE_SETUP -#line 167 "util/configlexer.lex" +#line 169 "util/configlexer.lex" { YDOUT; return VAR_VAL_NSEC3_KEYSIZE_ITERATIONS;} YY_BREAK case 69: YY_RULE_SETUP -#line 168 "util/configlexer.lex" +#line 170 "util/configlexer.lex" { YDOUT; return VAR_USE_SYSLOG;} YY_BREAK case 70: YY_RULE_SETUP -#line 169 "util/configlexer.lex" +#line 171 "util/configlexer.lex" { YDOUT; return VAR_LOCAL_ZONE;} YY_BREAK case 71: YY_RULE_SETUP -#line 170 "util/configlexer.lex" +#line 172 "util/configlexer.lex" { YDOUT; return VAR_LOCAL_DATA;} YY_BREAK case 72: YY_RULE_SETUP -#line 171 "util/configlexer.lex" +#line 173 "util/configlexer.lex" { YDOUT; return VAR_STATISTICS_INTERVAL;} YY_BREAK case 73: YY_RULE_SETUP -#line 172 "util/configlexer.lex" +#line 174 "util/configlexer.lex" { YDOUT; return VAR_STATISTICS_CUMULATIVE;} YY_BREAK case 74: /* rule 74 can match eol */ YY_RULE_SETUP -#line 173 "util/configlexer.lex" +#line 175 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++;} YY_BREAK /* Quoted strings. Strip leading and ending quotes */ case 75: YY_RULE_SETUP -#line 176 "util/configlexer.lex" +#line 178 "util/configlexer.lex" { BEGIN(quotedstring); LEXOUT(("QS ")); } YY_BREAK case YY_STATE_EOF(quotedstring): -#line 177 "util/configlexer.lex" +#line 179 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(INITIAL); @@ -1814,18 +1840,18 @@ case YY_STATE_EOF(quotedstring): YY_BREAK case 76: YY_RULE_SETUP -#line 181 "util/configlexer.lex" +#line 183 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK case 77: /* rule 77 can match eol */ YY_RULE_SETUP -#line 182 "util/configlexer.lex" +#line 184 "util/configlexer.lex" { cfg_parser->line++; yymore(); } YY_BREAK case 78: YY_RULE_SETUP -#line 183 "util/configlexer.lex" +#line 185 "util/configlexer.lex" { LEXOUT(("QE ")); BEGIN(INITIAL); @@ -1839,11 +1865,11 @@ YY_RULE_SETUP /* Single Quoted strings. Strip leading and ending quotes */ case 79: YY_RULE_SETUP -#line 194 "util/configlexer.lex" +#line 196 "util/configlexer.lex" { BEGIN(singlequotedstr); LEXOUT(("SQS ")); } YY_BREAK case YY_STATE_EOF(singlequotedstr): -#line 195 "util/configlexer.lex" +#line 197 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(INITIAL); @@ -1851,18 +1877,18 @@ case YY_STATE_EOF(singlequotedstr): YY_BREAK case 80: YY_RULE_SETUP -#line 199 "util/configlexer.lex" +#line 201 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK case 81: /* rule 81 can match eol */ YY_RULE_SETUP -#line 200 "util/configlexer.lex" +#line 202 "util/configlexer.lex" { cfg_parser->line++; yymore(); } YY_BREAK case 82: YY_RULE_SETUP -#line 201 "util/configlexer.lex" +#line 203 "util/configlexer.lex" { LEXOUT(("SQE ")); BEGIN(INITIAL); @@ -1876,11 +1902,11 @@ YY_RULE_SETUP /* include: directive */ case 83: YY_RULE_SETUP -#line 212 "util/configlexer.lex" +#line 214 "util/configlexer.lex" { LEXOUT(("v(%s) ", yytext)); BEGIN(include); } YY_BREAK case YY_STATE_EOF(include): -#line 213 "util/configlexer.lex" +#line 215 "util/configlexer.lex" { yyerror("EOF inside include directive"); BEGIN(INITIAL); @@ -1888,23 +1914,23 @@ case YY_STATE_EOF(include): YY_BREAK case 84: YY_RULE_SETUP -#line 217 "util/configlexer.lex" +#line 219 "util/configlexer.lex" { LEXOUT(("ISP ")); /* ignore */ } YY_BREAK case 85: /* rule 85 can match eol */ YY_RULE_SETUP -#line 218 "util/configlexer.lex" +#line 220 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++;} YY_BREAK case 86: YY_RULE_SETUP -#line 219 "util/configlexer.lex" +#line 221 "util/configlexer.lex" { LEXOUT(("IQS ")); BEGIN(include_quoted); } YY_BREAK case 87: YY_RULE_SETUP -#line 220 "util/configlexer.lex" +#line 222 "util/configlexer.lex" { LEXOUT(("Iunquotedstr(%s) ", yytext)); config_start_include(yytext); @@ -1912,7 +1938,7 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(include_quoted): -#line 225 "util/configlexer.lex" +#line 227 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(INITIAL); @@ -1920,18 +1946,18 @@ case YY_STATE_EOF(include_quoted): YY_BREAK case 88: YY_RULE_SETUP -#line 229 "util/configlexer.lex" +#line 231 "util/configlexer.lex" { LEXOUT(("ISTR(%s) ", yytext)); yymore(); } YY_BREAK case 89: /* rule 89 can match eol */ YY_RULE_SETUP -#line 230 "util/configlexer.lex" +#line 232 "util/configlexer.lex" { cfg_parser->line++; yymore(); } YY_BREAK case 90: YY_RULE_SETUP -#line 231 "util/configlexer.lex" +#line 233 "util/configlexer.lex" { LEXOUT(("IQE ")); yytext[yyleng - 1] = '\0'; @@ -1940,7 +1966,7 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 237 "util/configlexer.lex" +#line 239 "util/configlexer.lex" { yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ if (config_include_stack_ptr == 0) { @@ -1953,16 +1979,16 @@ case YY_STATE_EOF(INITIAL): YY_BREAK case 91: YY_RULE_SETUP -#line 247 "util/configlexer.lex" +#line 249 "util/configlexer.lex" { LEXOUT(("unquotedstr(%s) ", yytext)); yylval.str = strdup(yytext); return STRING; } YY_BREAK case 92: YY_RULE_SETUP -#line 250 "util/configlexer.lex" +#line 252 "util/configlexer.lex" ECHO; YY_BREAK -#line 1965 "" +#line 1991 "" case YY_END_OF_BUFFER: { @@ -2191,7 +2217,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); } @@ -2215,6 +2241,14 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; @@ -2593,7 +2627,9 @@ static void yyensure_buffer_stack (void) (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); - + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; @@ -2611,6 +2647,8 @@ static void yyensure_buffer_stack (void) ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -2655,7 +2693,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan + * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use @@ -2909,7 +2947,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 250 "util/configlexer.lex" +#line 252 "util/configlexer.lex" diff --git a/util/configlexer.lex b/util/configlexer.lex index 7b4823eed..d94869c15 100644 --- a/util/configlexer.lex +++ b/util/configlexer.lex @@ -84,6 +84,8 @@ static void config_end_include(void) #endif %} +%option noinput +%option nounput SPACE [ \t] LETTER [a-zA-Z]