From: Vern Paxson Date: Wed, 12 Oct 1994 21:13:30 +0000 (+0000) Subject: made stack code conditional on "stack" option X-Git-Tag: flex-2-5-5b~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47715d0862f55aaecdd11b26a4ca099451378a8b;p=flex made stack code conditional on "stack" option --- diff --git a/flex.skl b/flex.skl index e11a86f..5b5ab5b 100644 --- a/flex.skl +++ b/flex.skl @@ -230,13 +230,6 @@ void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); - -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -static void yy_push_state YY_PROTO(( int new_state )); -static void yy_pop_state YY_PROTO(( void )); -static int yy_top_state YY_PROTO(( void )); %* static void *yy_flex_alloc YY_PROTO(( unsigned int )); @@ -283,6 +276,15 @@ static void yy_fatal_error YY_PROTO(( const char msg[] )); * section 1. */ +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +static void yy_push_state YY_PROTO(( int new_state )); +static void yy_pop_state YY_PROTO(( void )); +static int yy_top_state YY_PROTO(( void )); +#endif + #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else @@ -1077,6 +1079,7 @@ void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file ) } +#if YY_STACK_USED %- #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) @@ -1134,6 +1137,7 @@ int yyFlexLexer::yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } +#endif %-