diff -Burp flex-2.5.4/flex.skl flex-2.5.4-new/flex.skl --- flex-2.5.4/flex.skl 2006-01-13 16:16:52.000000000 +0100 +++ flex-2.5.4-new/flex.skl 2006-01-13 16:57:50.000000000 +0100 @@ -1,4 +1,4 @@ -/* A lexical scanner generated by flex */ +/* A lexical scanner generated by flex*/ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ @@ -26,7 +26,7 @@ #include %+ -class istream; +#include %* /* Use prototypes in function declarations. */ @@ -153,7 +153,7 @@ struct yy_buffer_state %- FILE *yy_input_file; %+ - istream* yy_input_file; + std::istream* yy_input_file; %* char *yy_ch_buf; /* input buffer */ @@ -276,7 +276,7 @@ static void yy_flex_free YY_PROTO(( void #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) -%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here +%% yytext/yyin/yyout/yy_state_type/yylineno etc. def\'s & init go here %- Standard (non-C++) definition static yy_state_type yy_get_previous_state YY_PROTO(( void )); @@ -296,7 +296,7 @@ static void yy_fatal_error YY_PROTO(( yy %% code to copy yytext_ptr to yytext[] goes here, if %array yy_c_buf_p = yy_cp; -%% data tables for the DFA and the user's section 1 definitions go here +%% data tables for the DFA and the user\'s section 1 definitions go here /* Macros after this point can all be overridden by user definitions in * section 1. @@ -449,10 +449,10 @@ YY_MALLOC_DECL YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; + register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -%% user's declarations go here +%% user\'s declarations go here if ( yy_init ) { @@ -469,14 +469,14 @@ YY_DECL %- yyin = stdin; %+ - yyin = &cin; + yyin = &std::cin; %* if ( ! yyout ) %- yyout = stdout; %+ - yyout = &cout; + yyout = &std::cout; %* if ( ! yy_current_buffer ) @@ -646,7 +646,7 @@ do_action: /* This label is used only to } /* end of yylex */ %+ -yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout ) +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ) { yyin = arg_yyin; yyout = arg_yyout; @@ -681,7 +681,7 @@ yyFlexLexer::~yyFlexLexer() yy_delete_buffer( yy_current_buffer ); } -void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out ) +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) { if ( new_in ) { @@ -1058,7 +1058,7 @@ void yyrestart( input_file ) FILE *input_file; #endif %+ -void yyFlexLexer::yyrestart( istream* input_file ) +void yyFlexLexer::yyrestart( std::istream* input_file ) %* { if ( ! yy_current_buffer ) @@ -1129,7 +1129,7 @@ FILE *file; int size; #endif %+ -YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size ) +YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) %* { YY_BUFFER_STATE b; @@ -1190,7 +1190,7 @@ FILE *file; #endif %+ -void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file ) +void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file ) %* { @@ -1434,7 +1434,7 @@ char msg[]; void yyFlexLexer::LexerError( yyconst char msg[] ) { - cerr << msg << '\n'; + std::cerr << msg << '\n'; exit( YY_EXIT_FAILURE ); } %* diff -Burp flex-2.5.4/skel.c flex-2.5.4-new/skel.c --- flex-2.5.4/skel.c 2006-01-13 16:16:52.000000000 +0100 +++ flex-2.5.4-new/skel.c 2006-01-13 16:58:53.000000000 +0100 @@ -3,7 +3,7 @@ #include "flexdef.h" const char *skel[] = { - "/* A lexical scanner generated by flex */", + "/* A lexical scanner generated by flex*/", "", "/* Scanner skeleton version:", " * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $", @@ -32,7 +32,6 @@ const char *skel[] = { "#include ", "%+", "#include ", - "using namespace std;", "%*", "", "/* Use prototypes in function declarations. */", @@ -159,7 +158,7 @@ const char *skel[] = { "%-", " FILE *yy_input_file;", "%+", - " istream* yy_input_file;", + " std::istream* yy_input_file;", "%*", "", " char *yy_ch_buf; /* input buffer */", @@ -282,7 +281,7 @@ const char *skel[] = { "", "#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)", "", - "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here", + "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def\\'s & init go here", "", "%- Standard (non-C++) definition", "static yy_state_type yy_get_previous_state YY_PROTO(( void ));", @@ -302,7 +301,7 @@ const char *skel[] = { "%% code to copy yytext_ptr to yytext[] goes here, if %array", " yy_c_buf_p = yy_cp;", "", - "%% data tables for the DFA and the user's section 1 definitions go here", + "%% data tables for the DFA and the user\\'s section 1 definitions go here", "", "/* Macros after this point can all be overridden by user definitions in", " * section 1.", @@ -458,7 +457,7 @@ const char *skel[] = { " register char *yy_cp = NULL, *yy_bp = NULL;", " register int yy_act;", "", - "%% user's declarations go here", + "%% user\\'s declarations go here", "", " if ( yy_init )", " {", @@ -475,14 +474,14 @@ const char *skel[] = { "%-", " yyin = stdin;", "%+", - " yyin = &cin;", + " yyin = &std::cin;", "%*", "", " if ( ! yyout )", "%-", " yyout = stdout;", "%+", - " yyout = &cout;", + " yyout = &std::cout;", "%*", "", " if ( ! yy_current_buffer )", @@ -652,7 +651,7 @@ const char *skel[] = { " } /* end of yylex */", "", "%+", - "yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )", + "yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )", " {", " yyin = arg_yyin;", " yyout = arg_yyout;", @@ -687,7 +686,7 @@ const char *skel[] = { " yy_delete_buffer( yy_current_buffer );", " }", "", - "void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )", + "void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )", " {", " if ( new_in )", " {", @@ -1064,7 +1063,7 @@ const char *skel[] = { "FILE *input_file;", "#endif", "%+", - "void yyFlexLexer::yyrestart( istream* input_file )", + "void yyFlexLexer::yyrestart( std::istream* input_file )", "%*", " {", " if ( ! yy_current_buffer )", @@ -1135,7 +1134,7 @@ const char *skel[] = { "int size;", "#endif", "%+", - "YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )", + "YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )", "%*", " {", " YY_BUFFER_STATE b;", @@ -1196,7 +1195,7 @@ const char *skel[] = { "#endif", "", "%+", - "void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )", + "void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )", "%*", "", " {", @@ -1440,7 +1439,7 @@ const char *skel[] = { "", "void yyFlexLexer::LexerError( yyconst char msg[] )", " {", - " cerr << msg << '\\n';", + " std::cerr << msg << '\\n';", " exit( YY_EXIT_FAILURE );", " }", "%*",