88#define FLEX_SCANNER
99#define YY_FLEX_MAJOR_VERSION 2
1010#define YY_FLEX_MINOR_VERSION 5
11- #define YY_FLEX_SUBMINOR_VERSION 31
11+ #define YY_FLEX_SUBMINOR_VERSION 33
1212#if YY_FLEX_SUBMINOR_VERSION > 0
1313#define FLEX_BETA
1414#endif
3030
3131/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
3232
33- #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
33+ #if __STDC_VERSION__ >= 199901L
34+
35+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36+ * if you want the limit (max/min) macros for int types.
37+ */
38+ #ifndef __STDC_LIMIT_MACROS
39+ #define __STDC_LIMIT_MACROS 1
40+ #endif
41+
3442#include <inttypes.h>
3543typedef int8_t flex_int8_t;
3644typedef uint8_t flex_uint8_t;
@@ -134,6 +142,10 @@ typedef unsigned int flex_uint32_t;
134142#define YY_BUF_SIZE 16384
135143#endif
136144
145+ /* The state buf must be large enough to hold one state per character in the main buffer.
146+ */
147+ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
148+
137149#ifndef YY_TYPEDEF_YY_BUFFER_STATE
138150#define YY_TYPEDEF_YY_BUFFER_STATE
139151typedef struct yy_buffer_state *YY_BUFFER_STATE;
@@ -267,7 +279,7 @@ int zconfleng;
267279
268280/* Points to current character in buffer. */
269281static char *yy_c_buf_p = (char *) 0;
270- static int yy_init = 1 ; /* whether we need to initialize */
282+ static int yy_init = 0 ; /* whether we need to initialize */
271283static int yy_start = 0; /* start state number */
272284
273285/* Flag which is used to allow zconfwrap()'s to do buffer switches
@@ -820,6 +832,8 @@ void alloc_string(const char *str, int size)
820832#define YY_EXTRA_TYPE void *
821833#endif
822834
835+ static int yy_init_globals (void );
836+
823837/* Macros after this point can all be overridden by user definitions in
824838 * section 1.
825839 */
@@ -942,9 +956,9 @@ YY_DECL
942956 int str = 0;
943957 int ts, i;
944958
945- if ( (yy_init) )
959+ if ( ! (yy_init) )
946960 {
947- (yy_init) = 0 ;
961+ (yy_init) = 1 ;
948962
949963#ifdef YY_USER_INIT
950964 YY_USER_INIT;
@@ -1452,7 +1466,7 @@ static int yy_get_next_buffer (void)
14521466
14531467 else
14541468 {
1455- size_t num_to_read =
1469+ int num_to_read =
14561470 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
14571471
14581472 while ( num_to_read <= 0 )
@@ -1969,16 +1983,16 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
19691983
19701984/** Setup the input buffer state to scan a string. The next call to zconflex() will
19711985 * scan from a @e copy of @a str.
1972- * @param yy_str a NUL-terminated string to scan
1986+ * @param yystr a NUL-terminated string to scan
19731987 *
19741988 * @return the newly allocated buffer state object.
19751989 * @note If you want to scan bytes that may contain NUL values, then use
19761990 * zconf_scan_bytes() instead.
19771991 */
1978- YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str )
1992+ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
19791993{
19801994
1981- return zconf_scan_bytes(yy_str ,strlen(yy_str ) );
1995+ return zconf_scan_bytes(yystr ,strlen(yystr ) );
19821996}
19831997
19841998/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
@@ -1988,23 +2002,23 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str )
19882002 *
19892003 * @return the newly allocated buffer state object.
19902004 */
1991- YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes , int len )
2005+ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes , int _yybytes_len )
19922006{
19932007 YY_BUFFER_STATE b;
19942008 char *buf;
19952009 yy_size_t n;
19962010 int i;
19972011
19982012 /* Get memory for full buffer, including space for trailing EOB's. */
1999- n = len + 2;
2013+ n = _yybytes_len + 2;
20002014 buf = (char *) zconfalloc(n );
20012015 if ( ! buf )
20022016 YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
20032017
2004- for ( i = 0; i < len ; ++i )
2005- buf[i] = bytes [i];
2018+ for ( i = 0; i < _yybytes_len ; ++i )
2019+ buf[i] = yybytes [i];
20062020
2007- buf[len ] = buf[len +1] = YY_END_OF_BUFFER_CHAR;
2021+ buf[_yybytes_len ] = buf[_yybytes_len +1] = YY_END_OF_BUFFER_CHAR;
20082022
20092023 b = zconf_scan_buffer(buf,n );
20102024 if ( ! b )
@@ -2125,6 +2139,34 @@ void zconfset_debug (int bdebug )
21252139 zconf_flex_debug = bdebug ;
21262140}
21272141
2142+ static int yy_init_globals (void)
2143+ {
2144+ /* Initialization is the same as for the non-reentrant scanner.
2145+ * This function is called from zconflex_destroy(), so don't allocate here.
2146+ */
2147+
2148+ (yy_buffer_stack) = 0;
2149+ (yy_buffer_stack_top) = 0;
2150+ (yy_buffer_stack_max) = 0;
2151+ (yy_c_buf_p) = (char *) 0;
2152+ (yy_init) = 0;
2153+ (yy_start) = 0;
2154+
2155+ /* Defined in main.c */
2156+ #ifdef YY_STDINIT
2157+ zconfin = stdin;
2158+ zconfout = stdout;
2159+ #else
2160+ zconfin = (FILE *) 0;
2161+ zconfout = (FILE *) 0;
2162+ #endif
2163+
2164+ /* For future reference: Set errno on error, since we are called by
2165+ * zconflex_init()
2166+ */
2167+ return 0;
2168+ }
2169+
21282170/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
21292171int zconflex_destroy (void)
21302172{
@@ -2140,6 +2182,10 @@ int zconflex_destroy (void)
21402182 zconffree((yy_buffer_stack) );
21412183 (yy_buffer_stack) = NULL;
21422184
2185+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2186+ * zconflex() is called, initialization will occur. */
2187+ yy_init_globals( );
2188+
21432189 return 0;
21442190}
21452191
@@ -2151,7 +2197,7 @@ int zconflex_destroy (void)
21512197static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
21522198{
21532199 register int i;
2154- for ( i = 0; i < n; ++i )
2200+ for ( i = 0; i < n; ++i )
21552201 s1[i] = s2[i];
21562202}
21572203#endif
@@ -2160,7 +2206,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
21602206static int yy_flex_strlen (yyconst char * s )
21612207{
21622208 register int n;
2163- for ( n = 0; s[n]; ++n )
2209+ for ( n = 0; s[n]; ++n )
21642210 ;
21652211
21662212 return n;
@@ -2191,19 +2237,6 @@ void zconffree (void * ptr )
21912237
21922238#define YYTABLES_NAME "yytables"
21932239
2194- #undef YY_NEW_FILE
2195- #undef YY_FLUSH_BUFFER
2196- #undef yy_set_bol
2197- #undef yy_new_buffer
2198- #undef yy_set_interactive
2199- #undef yytext_ptr
2200- #undef YY_DO_BEFORE_ACTION
2201-
2202- #ifdef YY_DECL_IS_OURS
2203- #undef YY_DECL_IS_OURS
2204- #undef YY_DECL
2205- #endif
2206-
22072240void zconf_starthelp(void)
22082241{
22092242 new_string();
0 commit comments