]> granicus.if.org Git - flex/commitdiff
made stack code conditional on "stack" option
authorVern Paxson <vern@ee.lbl.gov>
Wed, 12 Oct 1994 21:13:30 +0000 (21:13 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Wed, 12 Oct 1994 21:13:30 +0000 (21:13 +0000)
flex.skl

index e11a86f01eec7de4c796fc94f109afacfcc4b52e..5b5ab5bbc62b80cd0f6d34d9a730ad7c6d16d3a6 100644 (file)
--- 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
 
 
 %-