File flex-2.5.4a.diff of Package flex-old

--- FlexLexer.h
+++ FlexLexer.h	2002/01/08 21:14:24
@@ -44,7 +44,7 @@
 #ifndef __FLEX_LEXER_H
 // Never included before - need to define base class.
 #define __FLEX_LEXER_H
-#include <iostream.h>
+#include <iostream>
 
 extern "C++" {
 
@@ -61,14 +61,14 @@
 	virtual void
 		yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
 	virtual struct yy_buffer_state*
-		yy_create_buffer( istream* s, int size ) = 0;
+		yy_create_buffer( std::istream* s, int size ) = 0;
 	virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
-	virtual void yyrestart( istream* s ) = 0;
+	virtual void yyrestart( std::istream* s ) = 0;
 
 	virtual int yylex() = 0;
 
 	// Call yylex with new input/output sources.
-	int yylex( istream* new_in, ostream* new_out = 0 )
+	int yylex( std::istream* new_in, std::ostream* new_out = 0 )
 		{
 		switch_streams( new_in, new_out );
 		return yylex();
@@ -76,8 +76,8 @@
 
 	// Switch to new input/output streams.  A nil stream pointer
 	// indicates "keep the current one".
-	virtual void switch_streams( istream* new_in = 0,
-					ostream* new_out = 0 ) = 0;
+	virtual void switch_streams( std::istream* new_in = 0,
+					std::ostream* new_out = 0 ) = 0;
 
 	int lineno() const		{ return yylineno; }
 
@@ -104,17 +104,17 @@
 public:
 	// arg_yyin and arg_yyout default to the cin and cout, but we
 	// only make that assignment when initializing in yylex().
-	yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
+	yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
 
 	virtual ~yyFlexLexer();
 
 	void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
-	struct yy_buffer_state* yy_create_buffer( istream* s, int size );
+	struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
 	void yy_delete_buffer( struct yy_buffer_state* b );
-	void yyrestart( istream* s );
+	void yyrestart( std::istream* s );
 
 	virtual int yylex();
-	virtual void switch_streams( istream* new_in, ostream* new_out );
+	virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
 
 protected:
 	virtual int LexerInput( char* buf, int max_size );
@@ -125,7 +125,7 @@
 	int yyinput();
 
 	void yy_load_buffer_state();
-	void yy_init_buffer( struct yy_buffer_state* b, istream* s );
+	void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
 	void yy_flush_buffer( struct yy_buffer_state* b );
 
 	int yy_start_stack_ptr;
@@ -140,8 +140,8 @@
 	yy_state_type yy_try_NUL_trans( yy_state_type current_state );
 	int yy_get_next_buffer();
 
-	istream* yyin;	// input source for default LexerInput
-	ostream* yyout;	// output sink for default LexerOutput
+	std::istream* yyin;	// input source for default LexerInput
+	std::ostream* yyout;	// output sink for default LexerOutput
 
 	struct yy_buffer_state* yy_current_buffer;
 
--- lex
+++ lex	2002/01/08 21:11:56
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/flex -l "$@"
--- flex.skl	1996-09-11 01:58:54.000000000 +0200
+++ flex.skl	2003-09-15 12:11:21.000000000 +0200
@@ -25,7 +25,7 @@
 
 #include <stdlib.h>
 %+
-class istream;
+#include <iostream>
 %*
 #include <unistd.h>
 
@@ -153,7 +153,7 @@
 %-
 	FILE *yy_input_file;
 %+
-	istream* yy_input_file;
+	std::istream* yy_input_file;
 %*
 
 	char *yy_ch_buf;		/* input buffer */
@@ -469,14 +469,14 @@
 %-
 			yyin = stdin;
 %+
-			yyin = &cin;
+			yyin = &std::cin;
 %*
 
 		if ( ! yyout )
 %-
 			yyout = stdout;
 %+
-			yyout = &cout;
+			yyout = &std::cout;
 %*
 
 		if ( ! yy_current_buffer )
@@ -646,7 +646,7 @@
 	} /* 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 @@
 	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 )
 		{
@@ -1055,7 +1055,7 @@
 FILE *input_file;
 #endif
 %+
-void yyFlexLexer::yyrestart( istream* input_file )
+void yyFlexLexer::yyrestart( std::istream* input_file )
 %*
 	{
 	if ( ! yy_current_buffer )
@@ -1126,7 +1126,7 @@
 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;
@@ -1193,7 +1193,7 @@
 
 %+
 extern "C" int isatty YY_PROTO(( int ));
-void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
+void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
 %*
 
 	{
@@ -1437,7 +1437,7 @@
 
 void yyFlexLexer::LexerError( yyconst char msg[] )
 	{
-	cerr << msg << '\n';
+	std::cerr << msg << '\n';
 	exit( YY_EXIT_FAILURE );
 	}
 %*