diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1994-12-17 18:40:26 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1994-12-17 18:40:26 +0000 |
commit | afd99a7dfc68e72f16609af5e203d5c65a57b84a (patch) | |
tree | 0b98747fe32ac7a138c591498d0547342c865584 /flex.skl | |
parent | a0ea6d2dada970923f205a6fc01fdfba457ad9dd (diff) |
YY_SKIP_YYWRAP
yyFlexLexer constructor, destructor
Diffstat (limited to 'flex.skl')
-rw-r--r-- | flex.skl | 34 |
1 files changed, 33 insertions, 1 deletions
@@ -274,7 +274,7 @@ static void yy_flex_free YY_PROTO(( void * )); %% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here -#ifndef yywrap +#ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else @@ -635,6 +635,38 @@ do_action: /* This label is used only to access EOF actions. */ } /* end of yylex */ %+ +yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout ) + { + yyin = arg_yyin; + yyout = arg_yyout; + yy_c_buf_p = 0; + yy_init = 1; + yy_start = 0; + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = 0; + + yy_current_buffer = 0; + +#ifdef YY_USES_REJECT + yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2]; +#else + yy_state_buf = 0; +#endif + } + +yyFlexLexer::~yyFlexLexer() + { + delete yy_state_buf; + yy_delete_buffer( yy_current_buffer ); + } + #ifdef YY_INTERACTIVE int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) #else |