[BACK]Return to flex.skl CVS log [TXT][DIR] Up to [local] / src / usr.bin / lex

Diff for /src/usr.bin/lex/flex.skl between version 1.6 and 1.7

version 1.6, 2001/01/05 18:26:23 version 1.7, 2004/02/03 21:20:17
Line 28 
Line 28 
   
 #include <stdlib.h>  #include <stdlib.h>
 %+  %+
 class istream;  #include <iosfwd>
 %*  %*
 #include <unistd.h>  #include <unistd.h>
   
Line 156 
Line 156 
 %-  %-
         FILE *yy_input_file;          FILE *yy_input_file;
 %+  %+
         istream* yy_input_file;          std::istream* yy_input_file;
 %*  %*
   
         char *yy_ch_buf;                /* input buffer */          char *yy_ch_buf;                /* input buffer */
Line 472 
Line 472 
 %-  %-
                         yyin = stdin;                          yyin = stdin;
 %+  %+
                         yyin = &cin;                          yyin = &std::cin;
 %*  %*
   
                 if ( ! yyout )                  if ( ! yyout )
 %-  %-
                         yyout = stdout;                          yyout = stdout;
 %+  %+
                         yyout = &cout;                          yyout = &std::cout;
 %*  %*
   
                 if ( ! yy_current_buffer )                  if ( ! yy_current_buffer )
Line 649 
Line 649 
         } /* end of yylex */          } /* end of yylex */
   
 %+  %+
 yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )  yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
         {          {
         yyin = arg_yyin;          yyin = arg_yyin;
         yyout = arg_yyout;          yyout = arg_yyout;
Line 684 
Line 684 
         yy_delete_buffer( yy_current_buffer );          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 )          if ( new_in )
                 {                  {
Line 1058 
Line 1058 
 FILE *input_file;  FILE *input_file;
 #endif  #endif
 %+  %+
 void yyFlexLexer::yyrestart( istream* input_file )  void yyFlexLexer::yyrestart( std::istream* input_file )
 %*  %*
         {          {
         if ( ! yy_current_buffer )          if ( ! yy_current_buffer )
Line 1129 
Line 1129 
 int size;  int size;
 #endif  #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;          YY_BUFFER_STATE b;
Line 1182 
Line 1182 
 %-  %-
 #ifndef YY_ALWAYS_INTERACTIVE  #ifndef YY_ALWAYS_INTERACTIVE
 #ifndef YY_NEVER_INTERACTIVE  #ifndef YY_NEVER_INTERACTIVE
 extern int isatty YY_PROTO(( int ));  #include <unistd.h>
 #endif  #endif
 #endif  #endif
   
Line 1196 
Line 1196 
   
 %+  %+
 extern "C" int isatty YY_PROTO(( int ));  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 )
 %*  %*
   
         {          {
Line 1443 
Line 1443 
   
 void yyFlexLexer::LexerError( yyconst char msg[] )  void yyFlexLexer::LexerError( yyconst char msg[] )
         {          {
         cerr << msg << '\n';          std::cerr << msg << '\n';
         exit( YY_EXIT_FAILURE );          exit( YY_EXIT_FAILURE );
         }          }
 %*  %*

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7