Commit fc9cd4b2 authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] regen lexers with last flex

parent 226f5217
......@@ -11,11 +11,17 @@
/* %if-not-reentrant */
#define yy_create_buffer agent__create_buffer
#define yy_delete_buffer agent__delete_buffer
#define yy_flex_debug agent__flex_debug
#define yy_scan_buffer agent__scan_buffer
#define yy_scan_string agent__scan_string
#define yy_scan_bytes agent__scan_bytes
#define yy_init_buffer agent__init_buffer
#define yy_flush_buffer agent__flush_buffer
#define yy_load_buffer_state agent__load_buffer_state
#define yy_switch_to_buffer agent__switch_to_buffer
#define yypush_buffer_state agent_push_buffer_state
#define yypop_buffer_state agent_pop_buffer_state
#define yyensure_buffer_stack agent_ensure_buffer_stack
#define yy_flex_debug agent__flex_debug
#define yyin agent_in
#define yyleng agent_leng
#define yylex agent_lex
......@@ -35,7 +41,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 3
#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
......@@ -44,87 +50,243 @@
/* %endif */
/* %if-c-only */
#define yy_create_buffer agent__create_buffer
#ifdef yy_create_buffer
#define agent__create_buffer_ALREADY_DEFINED
#else
#define yy_create_buffer agent__create_buffer
#endif
#define yy_delete_buffer agent__delete_buffer
#ifdef yy_delete_buffer
#define agent__delete_buffer_ALREADY_DEFINED
#else
#define yy_delete_buffer agent__delete_buffer
#endif
#define yy_scan_buffer agent__scan_buffer
#ifdef yy_scan_buffer
#define agent__scan_buffer_ALREADY_DEFINED
#else
#define yy_scan_buffer agent__scan_buffer
#endif
#define yy_scan_string agent__scan_string
#ifdef yy_scan_string
#define agent__scan_string_ALREADY_DEFINED
#else
#define yy_scan_string agent__scan_string
#endif
#define yy_scan_bytes agent__scan_bytes
#ifdef yy_scan_bytes
#define agent__scan_bytes_ALREADY_DEFINED
#else
#define yy_scan_bytes agent__scan_bytes
#endif
#define yy_init_buffer agent__init_buffer
#ifdef yy_init_buffer
#define agent__init_buffer_ALREADY_DEFINED
#else
#define yy_init_buffer agent__init_buffer
#endif
#define yy_flush_buffer agent__flush_buffer
#ifdef yy_flush_buffer
#define agent__flush_buffer_ALREADY_DEFINED
#else
#define yy_flush_buffer agent__flush_buffer
#endif
#define yy_load_buffer_state agent__load_buffer_state
#ifdef yy_load_buffer_state
#define agent__load_buffer_state_ALREADY_DEFINED
#else
#define yy_load_buffer_state agent__load_buffer_state
#endif
#define yy_switch_to_buffer agent__switch_to_buffer
#ifdef yy_switch_to_buffer
#define agent__switch_to_buffer_ALREADY_DEFINED
#else
#define yy_switch_to_buffer agent__switch_to_buffer
#endif
#define yypush_buffer_state agent_push_buffer_state
#ifdef yypush_buffer_state
#define agent_push_buffer_state_ALREADY_DEFINED
#else
#define yypush_buffer_state agent_push_buffer_state
#endif
#define yypop_buffer_state agent_pop_buffer_state
#ifdef yypop_buffer_state
#define agent_pop_buffer_state_ALREADY_DEFINED
#else
#define yypop_buffer_state agent_pop_buffer_state
#endif
#define yyensure_buffer_stack agent_ensure_buffer_stack
#ifdef yyensure_buffer_stack
#define agent_ensure_buffer_stack_ALREADY_DEFINED
#else
#define yyensure_buffer_stack agent_ensure_buffer_stack
#endif
#define yylex agent_lex
#ifdef yylex
#define agent_lex_ALREADY_DEFINED
#else
#define yylex agent_lex
#endif
#define yyrestart agent_restart
#ifdef yyrestart
#define agent_restart_ALREADY_DEFINED
#else
#define yyrestart agent_restart
#endif
#define yylex_init agent_lex_init
#ifdef yylex_init
#define agent_lex_init_ALREADY_DEFINED
#else
#define yylex_init agent_lex_init
#endif
#define yylex_init_extra agent_lex_init_extra
#ifdef yylex_init_extra
#define agent_lex_init_extra_ALREADY_DEFINED
#else
#define yylex_init_extra agent_lex_init_extra
#endif
#define yylex_destroy agent_lex_destroy
#ifdef yylex_destroy
#define agent_lex_destroy_ALREADY_DEFINED
#else
#define yylex_destroy agent_lex_destroy
#endif
#define yyget_debug agent_get_debug
#ifdef yyget_debug
#define agent_get_debug_ALREADY_DEFINED
#else
#define yyget_debug agent_get_debug
#endif
#define yyset_debug agent_set_debug
#ifdef yyset_debug
#define agent_set_debug_ALREADY_DEFINED
#else
#define yyset_debug agent_set_debug
#endif
#define yyget_extra agent_get_extra
#ifdef yyget_extra
#define agent_get_extra_ALREADY_DEFINED
#else
#define yyget_extra agent_get_extra
#endif
#define yyset_extra agent_set_extra
#ifdef yyset_extra
#define agent_set_extra_ALREADY_DEFINED
#else
#define yyset_extra agent_set_extra
#endif
#define yyget_in agent_get_in
#ifdef yyget_in
#define agent_get_in_ALREADY_DEFINED
#else
#define yyget_in agent_get_in
#endif
#define yyset_in agent_set_in
#ifdef yyset_in
#define agent_set_in_ALREADY_DEFINED
#else
#define yyset_in agent_set_in
#endif
#define yyget_out agent_get_out
#ifdef yyget_out
#define agent_get_out_ALREADY_DEFINED
#else
#define yyget_out agent_get_out
#endif
#define yyset_out agent_set_out
#ifdef yyset_out
#define agent_set_out_ALREADY_DEFINED
#else
#define yyset_out agent_set_out
#endif
#define yyget_leng agent_get_leng
#ifdef yyget_leng
#define agent_get_leng_ALREADY_DEFINED
#else
#define yyget_leng agent_get_leng
#endif
#define yyget_text agent_get_text
#ifdef yyget_text
#define agent_get_text_ALREADY_DEFINED
#else
#define yyget_text agent_get_text
#endif
#define yyget_lineno agent_get_lineno
#ifdef yyget_lineno
#define agent_get_lineno_ALREADY_DEFINED
#else
#define yyget_lineno agent_get_lineno
#endif
#define yyset_lineno agent_set_lineno
#ifdef yyset_lineno
#define agent_set_lineno_ALREADY_DEFINED
#else
#define yyset_lineno agent_set_lineno
#endif
#define yywrap agent_wrap
#ifdef yywrap
#define agent_wrap_ALREADY_DEFINED
#else
#define yywrap agent_wrap
#endif
/* %endif */
#define yyalloc agent_alloc
#ifdef yyalloc
#define agent_alloc_ALREADY_DEFINED
#else
#define yyalloc agent_alloc
#endif
#define yyrealloc agent_realloc
#ifdef yyrealloc
#define agent_realloc_ALREADY_DEFINED
#else
#define yyrealloc agent_realloc
#endif
#define yyfree agent_free
#ifdef yyfree
#define agent_free_ALREADY_DEFINED
#else
#define yyfree agent_free
#endif
/* %if-c-only */
#define yytext agent_text
#ifdef yytext
#define agent_text_ALREADY_DEFINED
#else
#define yytext agent_text
#endif
#define yyleng agent_leng
#ifdef yyleng
#define agent_leng_ALREADY_DEFINED
#else
#define yyleng agent_leng
#endif
#define yyin agent_in
#ifdef yyin
#define agent_in_ALREADY_DEFINED
#else
#define yyin agent_in
#endif
#define yyout agent_out
#ifdef yyout
#define agent_out_ALREADY_DEFINED
#else
#define yyout agent_out
#endif
#define yy_flex_debug agent__flex_debug
#ifdef yy_flex_debug
#define agent__flex_debug_ALREADY_DEFINED
#else
#define yy_flex_debug agent__flex_debug
#endif
#define yylineno agent_lineno
#ifdef yylineno
#define agent_lineno_ALREADY_DEFINED
#else
#define yylineno agent_lineno
#endif
/* %endif */
......@@ -203,12 +365,17 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
/* %endif */
/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */
......@@ -254,7 +421,7 @@ typedef unsigned int flex_uint32_t;
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE agent_restart(agent_in )
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
......@@ -285,12 +452,12 @@ typedef size_t yy_size_t;
#endif
/* %if-not-reentrant */
extern int agent_leng;
extern int yyleng;
/* %endif */
/* %if-c-only */
/* %if-not-reentrant */
extern FILE *agent_in, *agent_out;
extern FILE *yyin, *yyout;
/* %endif */
/* %endif */
......@@ -305,13 +472,13 @@ extern FILE *agent_in, *agent_out;
#define yyless(n) \
do \
{ \
/* Undo effects of setting up agent_text. */ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up agent_text again */ \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr) )
......@@ -378,8 +545,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via agent_restart()), so that the user can continue scanning by
* just pointing agent_in at a new input file.
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
......@@ -417,69 +584,69 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %if-not-reentrant */
/* %not-for-header */
/* yy_hold_char holds the character lost when agent_text is formed. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int agent_leng;
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow agent_wrap()'s to do buffer switches
* instead of setting up a fresh agent_in. A bit of a hack ...
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
/* %ok-for-header */
/* %endif */
void agent_restart ( FILE *input_file );
void agent__switch_to_buffer ( YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE agent__create_buffer ( FILE *file, int size );
void agent__delete_buffer ( YY_BUFFER_STATE b );
void agent__flush_buffer ( YY_BUFFER_STATE b );
void agent_push_buffer_state ( YY_BUFFER_STATE new_buffer );
void agent_pop_buffer_state ( void );
void yyrestart ( FILE *input_file );
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
void yy_delete_buffer ( YY_BUFFER_STATE b );
void yy_flush_buffer ( YY_BUFFER_STATE b );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
void yypop_buffer_state ( void );
static void agent_ensure_buffer_stack ( void );
static void agent__load_buffer_state ( void );
static void agent__init_buffer ( YY_BUFFER_STATE b, FILE *file );
#define YY_FLUSH_BUFFER agent__flush_buffer(YY_CURRENT_BUFFER )
static void yyensure_buffer_stack ( void );
static void yy_load_buffer_state ( void );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
YY_BUFFER_STATE agent__scan_buffer ( char *base, yy_size_t size );
YY_BUFFER_STATE agent__scan_string ( const char *yy_str );
YY_BUFFER_STATE agent__scan_bytes ( const char *bytes, int len );
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
/* %endif */
void *agent_alloc ( yy_size_t );
void *agent_realloc ( void *, yy_size_t );
void agent_free ( void * );
void *yyalloc ( yy_size_t );
void *yyrealloc ( void *, yy_size_t );
void yyfree ( void * );
#define yy_new_buffer agent__create_buffer
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
agent_ensure_buffer_stack (); \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
agent__create_buffer(agent_in,YY_BUF_SIZE ); \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
agent_ensure_buffer_stack (); \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
agent__create_buffer(agent_in,YY_BUF_SIZE ); \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* %% [1.0] agent_text/agent_in/agent_out/yy_state_type/agent_lineno etc. def's & init go here */
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
#define agent_wrap() (/*CONSTCOND*/1)
......@@ -488,18 +655,18 @@ void agent_free ( void * );
#define FLEX_DEBUG
typedef flex_uint8_t YY_CHAR;
FILE *agent_in = NULL, *agent_out = NULL;
FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
extern int agent_lineno;
int agent_lineno = 1;
extern int yylineno;
int yylineno = 1;
extern char *agent_text;
extern char *yytext;
#ifdef yytext_ptr
#undef yytext_ptr
#endif
#define yytext_ptr agent_text
#define yytext_ptr yytext
/* %% [1.5] DFA */
......@@ -513,15 +680,15 @@ static void yynoreturn yy_fatal_error ( const char* msg );
/* %endif */
/* Done after the current pattern has been matched and before the
* corresponding action - sets up agent_text.
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle agent_text and agent_leng for yymore() goes here \ */\
agent_leng = (int) (yy_cp - yy_bp); \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to agent_text[] goes here, if %array \ */\
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
(yy_c_buf_p) = yy_cp;
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 56
......@@ -1147,8 +1314,8 @@ static const flex_int16_t yy_chk[2018] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
extern int agent__flex_debug;
int agent__flex_debug = 1;
extern int yy_flex_debug;
int yy_flex_debug = 1;
static const flex_int16_t yy_rule_linenum[56] =
{ 0,
......@@ -1167,7 +1334,7 @@ static const flex_int16_t yy_rule_linenum[56] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *agent_text;
char *yytext;
#line 1 "agent_lexer.ll"
/* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
......@@ -1208,7 +1375,7 @@ using isc::agent::AgentParser;
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::agent::ParserContext::fatal(msg)
#line 1211 "agent_lexer.cc"
#line 1378 "agent_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
using yywrap requires linking with -lfl, which provides the default yywrap
......@@ -1234,8 +1401,8 @@ using isc::agent::AgentParser;
by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
#define YY_USER_ACTION driver.loc_.columns(yyleng);
#line 1237 "agent_lexer.cc"
#line 1238 "agent_lexer.cc"
#line 1404 "agent_lexer.cc"
#line 1405 "agent_lexer.cc"
#define INITIAL 0
#define COMMENT 1
......@@ -1273,31 +1440,31 @@ static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int agent_lex_destroy ( void );
int yylex_destroy ( void );
int agent_get_debug ( void );
int yyget_debug ( void );
void agent_set_debug ( int debug_flag );
void yyset_debug ( int debug_flag );
YY_EXTRA_TYPE agent_get_extra ( void );
YY_EXTRA_TYPE yyget_extra ( void );
void agent_set_extra ( YY_EXTRA_TYPE user_defined );
void yyset_extra ( YY_EXTRA_TYPE user_defined );
FILE *agent_get_in ( void );
FILE *yyget_in ( void );
void agent_set_in ( FILE * _in_str );
void yyset_in ( FILE * _in_str );
FILE *agent_get_out ( void );
FILE *yyget_out ( void );
void agent_set_out ( FILE * _out_str );
void yyset_out ( FILE * _out_str );
int agent_get_leng ( void );
int yyget_leng ( void );
char *agent_get_text ( void );
char *yyget_text ( void );
int agent_get_lineno ( void );
int yyget_lineno ( void );
void agent_set_lineno ( int _line_number );
void yyset_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
......@@ -1308,9 +1475,9 @@ void agent_set_lineno ( int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int agent_wrap ( void );
extern "C" int yywrap ( void );
#else
extern int agent_wrap ( void );
extern int yywrap ( void );
#endif
#endif
......@@ -1363,7 +1530,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 do { if (fwrite( agent_text, (size_t) agent_leng, 1, agent_out )) {} } while (0)
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
......@@ -1380,18 +1547,18 @@ static int input ( void );
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
(c = getc( agent_in )) != EOF && c != '\n'; ++n ) \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( agent_in ) ) \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, agent_in)) == 0 && ferror(agent_in)) \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
......@@ -1399,7 +1566,7 @@ static int input ( void );
break; \
} \
errno=0; \
clearerr(agent_in); \