#define YY_FLEX_MINOR_VERSION 5
/* First, we deal with platform-specific or compiler-specific issues. */
-
-%c-only
+
/* begin standard C headers. */
+%push
+%c-only
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
+%pop
+
%push
%tables-serialization-code-begin
#include <netinet/in.h>
%pop
/* end standard C headers. */
+
+%push
%c++-only
/* begin standard C++ headers. */
#include <iostream>
#include <cerrno>
#include <cstdlib>
/* end standard C++ headers. */
-%c-or-c++
+%pop
#ifdef __cplusplus
#ifdef YY_TRADITIONAL_FUNC_DEFS
#undef YY_TRADITIONAL_FUNC_DEFS
#endif
-%c++-only
-#define FLEX_STD std::
-%c-or-c++
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
extern size_t yyleng;
#endif
+%push
%c-only
#ifndef YY_REENTRANT
extern FILE *yyin, *yyout;
#endif
-%c-or-c++
+%pop
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
+%push
%c-only
FILE *yy_input_file;
+%pop
+
+%push
%c++-only
- FLEX_STD istream* yy_input_file;
-%c-or-c++
+ std::istream* yy_input_file;
+%pop
+
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+%push
%c-only Standard (non-C++) definition
%not-for-header
#ifndef YY_REENTRANT
static YY_BUFFER_STATE yy_current_buffer = 0;
#endif
%ok-for-header
-%c-or-c++
+%pop
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
*/
#define YY_CURRENT_BUFFER yy_current_buffer
-
+%push
%c-only Standard (non-C++) definition
#ifndef YY_REENTRANT
YY_BUFFER_STATE yy_scan_string YY_PARAMS(( yyconst char *yy_str YY_PROTO_LAST_ARG ));
YY_BUFFER_STATE yy_scan_bytes YY_PARAMS(( yyconst char *bytes, int len YY_PROTO_LAST_ARG ));
-%c-or-c++
+%pop
void *yyalloc YY_PARAMS(( yy_size_t YY_PROTO_LAST_ARG ));
%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
+%push
%c-only Standard (non-C++) definition
%not-for-header
static yy_state_type yy_get_previous_state YY_PARAMS(( YY_PROTO_ONLY_ARG ));
static int yy_get_next_buffer YY_PARAMS(( YY_PROTO_ONLY_ARG ));
static void yy_fatal_error YY_PARAMS(( yyconst char msg[] YY_PROTO_LAST_ARG ));
%ok-for-header
-%c-or-c++
+%pop
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
%% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \
YY_G(yy_c_buf_p) = yy_cp;
-%c-or-c++
-
%not-for-header
%% [4.0] data tables for the DFA and the user's section 1 definitions go here
%ok-for-header
* The user has a chance to override it with an option.
*/
#ifndef YY_NO_UNISTD_H
+%push
%c-only
#include <unistd.h>
+%pop
+%push
%c++-only
#ifdef HAVE_CUNISTD
#include <cunistd>
#endif
-%c-or-c++
+%pop
#endif /* !YY_NO_UNISTD_H */
-
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
+%push
%c-only Reentrant structure and macros (non-C++).
#ifdef YY_REENTRANT
#endif
#endif
-%c-only
%not-for-header
#ifndef YY_NO_UNPUT
static void yyunput YY_PARAMS(( int c, char *buf_ptr YY_PROTO_LAST_ARG));
#endif
%ok-for-header
-%c-or-c++
+%pop
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PARAMS(( char *, yyconst char *, int YY_PROTO_LAST_ARG));
#endif
#ifndef YY_NO_INPUT
+%push
%c-only Standard (non-C++) definition
%not-for-header
#ifdef __cplusplus
static int input YY_PARAMS(( YY_PROTO_ONLY_ARG ));
#endif
%ok-for-header
-%c-or-c++
+%pop
#endif
+
#if YY_STACK_USED
#ifndef YY_REENTRANT
%not-for-header
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
+%push
%c-only Standard (non-C++) definition
/* 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 )
%c++-only C++ definition
#define ECHO LexerOutput( yytext, yyleng )
-%c-or-c++
+%pop
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
+\
+%push\
%c++-only C++ definition \
if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
-%c-or-c++
+%pop
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
+%push
%c-only
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg YY_CALL_LAST_ARG)
%c++-only
#define YY_FATAL_ERROR(msg) LexerError( msg )
-%c-or-c++
+%pop
#endif
%push
uint32_t bread; /**< bytes read since beginning of current tableset */
};
-/* end tables serialization structures and prototypes */
%pop
+/* end tables serialization structures and prototypes */
+
%ok-for-header
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
+%push
%c-only Standard (non-C++) definition
/* If the bison pure parser is used, then bison will provide
#define YY_DECL int yylex YY_LEX_DECLARATION
%c++-only C++ definition
#define YY_DECL int yyFlexLexer::yylex()
-%c-or-c++
+%pop
#endif
+
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
YY_G(yy_start) = 1; /* first start state */
if ( ! yyin )
+%push
%c-only
yyin = stdin;
%c++-only
- yyin = & FLEX_STD cin;
-%c-or-c++
+ yyin = & std::cin;
+%pop
if ( ! yyout )
+%push
%c-only
yyout = stdout;
%c++-only
- yyout = & FLEX_STD cout;
-%c-or-c++
+ yyout = & std::cout;
+%pop
if ( ! YY_G(yy_current_buffer) )
YY_G(yy_current_buffer) =
} /* end of scanning one token */
} /* end of yylex */
%ok-for-header
+
+%push
%c++-only
%not-for-header
-yyFlexLexer::yyFlexLexer( FLEX_STD istream* arg_yyin, FLEX_STD ostream* arg_yyout )
+yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
{
yyin = arg_yyin;
yyout = arg_yyout;
yy_delete_buffer( yy_current_buffer YY_CALL_LAST_ARG);
}
-void yyFlexLexer::switch_streams( FLEX_STD istream* new_in, FLEX_STD ostream* new_out )
+void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
{
if ( new_in )
{
(void) yyout->write( buf, size );
}
%ok-for-header
-%c-or-c++
+%pop
/* yy_get_next_buffer - try to read in a new buffer
*
* EOB_ACT_END_OF_FILE - end of file
*/
+%push
%c-only
%not-for-header
static int yy_get_next_buffer YYFARGS0(void)
%c++-only
int yyFlexLexer::yy_get_next_buffer()
-%c-or-c++
+%pop
{
register char *dest = YY_G(yy_current_buffer)->yy_ch_buf;
register char *source = YY_G(yytext_ptr);
/* yy_get_previous_state - get the state just before the EOB char was reached */
+%push
%c-only
%not-for-header
-static yy_state_type yy_get_previous_state YYFARGS0(void)
+ static yy_state_type yy_get_previous_state YYFARGS0(void)
%c++-only
-yy_state_type yyFlexLexer::yy_get_previous_state()
-%c-or-c++
+ yy_state_type yyFlexLexer::yy_get_previous_state()
+%pop
{
register yy_state_type yy_current_state;
register char *yy_cp;
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-
+%push
%c-only
-static yy_state_type yy_try_NUL_trans YYFARGS1( yy_state_type, yy_current_state)
+ static yy_state_type yy_try_NUL_trans YYFARGS1( yy_state_type, yy_current_state)
%c++-only
-yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
-%c-or-c++
+ yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+%pop
{
register int yy_is_jam;
%% [17.0] code to find the next state, and perhaps do backing up, goes here
}
+%push
%c-only
#ifndef YY_NO_UNPUT
-static void yyunput YYFARGS2( int,c, register char *,yy_bp)
+ static void yyunput YYFARGS2( int,c, register char *,yy_bp)
%c++-only
-void yyFlexLexer::yyunput( int c, register char* yy_bp)
-%c-or-c++
+ void yyFlexLexer::yyunput( int c, register char* yy_bp)
+%pop
{
register char *yy_cp = YY_G(yy_c_buf_p);
YY_G(yy_hold_char) = *yy_cp;
YY_G(yy_c_buf_p) = yy_cp;
}
+%push
%c-only
#endif /* ifndef YY_NO_UNPUT */
-%c-or-c++
-
+%pop
+%push
%c-only
#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput YYFARGS0(void)
+ static int yyinput YYFARGS0(void)
#else
-static int input YYFARGS0(void)
+ static int input YYFARGS0(void)
#endif
+
%c++-only
-int yyFlexLexer::yyinput()
-%c-or-c++
+ int yyFlexLexer::yyinput()
+%pop
+
{
int c;
return c;
}
+%push
%c-only
#endif /* ifndef YY_NO_INPUT */
-%c-or-c++
+%pop
+%push
%c-only
-void yyrestart YYFARGS1( FILE *,input_file)
+ void yyrestart YYFARGS1( FILE *,input_file)
%c++-only
-void yyFlexLexer::yyrestart( FLEX_STD istream* input_file )
-%c-or-c++
+ void yyFlexLexer::yyrestart( std::istream* input_file )
+%pop
{
if ( ! YY_G(yy_current_buffer) )
YY_G(yy_current_buffer) =
yy_load_buffer_state( YY_CALL_ONLY_ARG );
}
-
+%push
%c-only
-void yy_switch_to_buffer YYFARGS1( YY_BUFFER_STATE ,new_buffer)
+ void yy_switch_to_buffer YYFARGS1( YY_BUFFER_STATE ,new_buffer)
%c++-only
-void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-%c-or-c++
+ void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+%pop
{
if ( YY_G(yy_current_buffer) == new_buffer )
return;
}
+%push
%c-only
-void yy_load_buffer_state YYFARGS0(void)
+ void yy_load_buffer_state YYFARGS0(void)
%c++-only
-void yyFlexLexer::yy_load_buffer_state()
-%c-or-c++
+ void yyFlexLexer::yy_load_buffer_state()
+%pop
{
YY_G(yy_n_chars) = YY_G(yy_current_buffer)->yy_n_chars;
YY_G(yytext_ptr) = YY_G(yy_c_buf_p) = YY_G(yy_current_buffer)->yy_buf_pos;
YY_G(yy_hold_char) = *YY_G(yy_c_buf_p);
}
-
+%push
%c-only
-YY_BUFFER_STATE yy_create_buffer YYFARGS2( FILE *,file, int ,size)
+ YY_BUFFER_STATE yy_create_buffer YYFARGS2( FILE *,file, int ,size)
%c++-only
-YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( FLEX_STD istream* file, int size )
-%c-or-c++
+ YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+%pop
{
YY_BUFFER_STATE b;
return b;
}
-
+%push
%c-only
-void yy_delete_buffer YYFARGS1( YY_BUFFER_STATE ,b)
+ void yy_delete_buffer YYFARGS1( YY_BUFFER_STATE ,b)
%c++-only
-void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
-%c-or-c++
+ void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
+%pop
{
if ( ! b )
return;
}
+%push
%c-only
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
#endif /* __cplusplus */
#endif /* !YY_NEVER_INTERACTIVE */
#endif /* !YY_ALWAYS_INTERACTIVE */
+%pop
-void yy_init_buffer YYFARGS2( YY_BUFFER_STATE ,b, FILE *,file)
+%push
+%c-only
+ void yy_init_buffer YYFARGS2( YY_BUFFER_STATE ,b, FILE *,file)
%c++-only
#ifndef YY_NEVER_INTERACTIVE
extern "C" int isatty YY_PARAMS(( int ));
#endif
-void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, FLEX_STD istream* file )
-%c-or-c++
+void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
+%pop
{
int oerrno = errno;
b->yy_input_file = file;
b->yy_fill_buffer = 1;
+%push
%c-only
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#endif
%c++-only
b->yy_is_interactive = 0;
-%c-or-c++
+%pop
errno = oerrno;
}
-
+%push
%c-only
-void yy_flush_buffer YYFARGS1( YY_BUFFER_STATE ,b)
+ void yy_flush_buffer YYFARGS1( YY_BUFFER_STATE ,b)
%c++-only
-void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
-%c-or-c++
+ void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
+%pop
{
if ( ! b )
return;
if ( b == YY_G(yy_current_buffer) )
yy_load_buffer_state( YY_CALL_ONLY_ARG );
}
-%c-or-c++
#ifndef YY_NO_SCAN_BUFFER
+%push
%c-only
YY_BUFFER_STATE yy_scan_buffer YYFARGS2( char *,base, yy_size_t ,size)
{
return b;
}
-%c-or-c++
+%pop
#endif
#ifndef YY_NO_SCAN_STRING
+%push
%c-only
YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,yy_str)
{
return yy_scan_bytes( yy_str, len YY_CALL_LAST_ARG);
}
-%c-or-c++
+%pop
#endif
#ifndef YY_NO_SCAN_BYTES
+%push
%c-only
YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,bytes, int ,len)
{
return b;
}
-%c-or-c++
+%pop
#endif
#ifndef YY_NO_PUSH_STATE
+%push
%c-only
-static void yy_push_state YYFARGS1( int ,new_state)
+ static void yy_push_state YYFARGS1( int ,new_state)
%c++-only
-void yyFlexLexer::yy_push_state( int new_state )
-%c-or-c++
+ void yyFlexLexer::yy_push_state( int new_state )
+%pop
{
if ( YY_G(yy_start_stack_ptr) >= YY_G(yy_start_stack_depth) )
{
#ifndef YY_NO_POP_STATE
+%push
%c-only
-static void yy_pop_state YYFARGS0(void)
+ static void yy_pop_state YYFARGS0(void)
%c++-only
-void yyFlexLexer::yy_pop_state()
-%c-or-c++
+ void yyFlexLexer::yy_pop_state()
+%pop
{
if ( --YY_G(yy_start_stack_ptr) < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
#ifndef YY_NO_TOP_STATE
+%push
%c-only
-static int yy_top_state YYFARGS0(void)
+ static int yy_top_state YYFARGS0(void)
%c++-only
-int yyFlexLexer::yy_top_state()
-%c-or-c++
+ int yyFlexLexer::yy_top_state()
+%pop
{
return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1];
}
#define YY_EXIT_FAILURE 2
#endif
+%push
%c-only
static void yy_fatal_error YYFARGS1(yyconst char*, msg)
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
-
%c++-only
-
void yyFlexLexer::LexerError( yyconst char msg[] )
{
- FLEX_STD cerr << msg << '\n';
+ std::cerr << msg << std::endl;
exit( YY_EXIT_FAILURE );
}
-%c-or-c++
+%pop
/* Redefine yyless() so it works in section 3 code. */
/* Accessor methods (get/set functions) to struct members. */
+%push
%c-only
#ifdef YY_REENTRANT
#ifndef YY_NO_GET_EXTRA
yy_flex_debug = bdebug ;
}
#endif /* !YY_NO_SET_DEBUG */
-%c-or-c++
+%pop
#ifdef YY_REENTRANT
/* Accessor methods for yylval and yylloc */
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy YYFARGS0(void)
{
+%push
%c-only SNIP! this currently causes conflicts with the c++ scanner
/* Destroy the current (main) buffer. */
yy_delete_buffer( YY_G(yy_current_buffer) YY_CALL_LAST_ARG );
/* Destroy the main struct (reentrant only). */
yyfree ( yyscanner YY_CALL_LAST_ARG );
#endif
-%c-or-c++
+%pop
return 0;
}