Commit 8682819d authored by Cyril Deguet's avatar Cyril Deguet

- Use the C flex interface instead of the C++ interface, so we

  don't need the STL any more !
  Use 'make lexer' to rebuild lexer.cpp
parent 8fcbb067
......@@ -2,7 +2,7 @@
# vls (VideoLAN Server) main Makefile
#-------------------------------------------------------------------------------
# (c)1999-2001 VideoLAN
# $Id: Makefile,v 1.88 2002/03/24 15:56:07 asmax Exp $
# $Id: Makefile,v 1.89 2002/03/25 01:57:43 asmax Exp $
################################################################################
......@@ -166,6 +166,10 @@ uninstall:
rm -f $(DESTDIR)$(libdir)/videolan/vls/*.so
rm -f $(DESTDIR)$(sysconfdir)/videolan/vls/*.cfg
# Build lexer.cpp with flex
lexer:
flex -i -osrc/core/lexer.cpp src/core/lexer.lex
dep: Makefile.opts $(DEP)
vls: Makefile.opts $(OBJ) $(BUILTINS)
......
// $Header: /var/lib/cvs/videolan-reinjected/vls/src/core/Attic/FlexLexer.h,v 1.1 2002/03/24 15:56:08 asmax Exp $
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
// Copyright (c) 1993 The Regents of the University of California.
// All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Kent Williams and Tom Epperly.
//
// Redistribution and use in source and binary forms with or without
// modification are permitted provided that: (1) source distributions retain
// this entire copyright notice and comment, and (2) distributions including
// binaries display the following acknowledgement: ``This product includes
// software developed by the University of California, Berkeley and its
// contributors'' in the documentation or other materials provided with the
// distribution and in all advertising materials mentioning features or use
// of this software. Neither the name of the University nor the names of
// its contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// This file defines FlexLexer, an abstract class which specifies the
// external interface provided to flex C++ lexer objects, and yyFlexLexer,
// which defines a particular lexer class.
//
// If you want to create multiple lexer classes, you use the -P flag
// to rename each yyFlexLexer to some other xxFlexLexer. You then
// include <FlexLexer.h> in your other sources once per lexer class:
//
// #undef yyFlexLexer
// #define yyFlexLexer xxFlexLexer
// #include <FlexLexer.h>
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// ...
#ifndef __FLEX_LEXER_H
// Never included before - need to define base class.
#define __FLEX_LEXER_H
#include <iostream.h>
extern "C++" {
struct yy_buffer_state;
typedef int yy_state_type;
class FlexLexer {
public:
virtual ~FlexLexer() { }
const char* YYText() { return yytext; }
int YYLeng() { return yyleng; }
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;
virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
virtual void yyrestart( istream* s ) = 0;
virtual int yylex() = 0;
// Call yylex with new input/output sources.
int yylex( istream* new_in, ostream* new_out = 0 )
{
switch_streams( new_in, new_out );
return yylex();
}
// 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;
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
int yy_flex_debug; // only has effect with -d or "%option debug"
};
}
#endif
#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
// Either this is the first time through (yyFlexLexerOnce not defined),
// or this is a repeated include to define a different flavor of
// yyFlexLexer, as discussed in the flex man page.
#define yyFlexLexerOnce
class yyFlexLexer : public FlexLexer {
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 );
virtual ~yyFlexLexer();
void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
struct yy_buffer_state* yy_create_buffer( istream* s, int size );
void yy_delete_buffer( struct yy_buffer_state* b );
void yyrestart( istream* s );
virtual int yylex();
virtual void switch_streams( istream* new_in, ostream* new_out );
protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
void yy_init_buffer( struct yy_buffer_state* b, istream* s );
void yy_flush_buffer( struct yy_buffer_state* b );
int yy_start_stack_ptr;
int yy_start_stack_depth;
int* yy_start_stack;
void yy_push_state( int new_state );
void yy_pop_state();
int yy_top_state();
yy_state_type yy_get_previous_state();
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
struct yy_buffer_state* yy_current_buffer;
// yy_hold_char holds the character lost when yytext is formed.
char yy_hold_char;
// Number of characters read into yy_ch_buf.
int yy_n_chars;
// Points to current character in buffer.
char* yy_c_buf_p;
int yy_init; // whether we need to initialize
int yy_start; // start state number
// Flag which is used to allow yywrap()'s to do buffer switches
// instead of setting up a fresh yyin. A bit of a hack ...
int yy_did_buffer_switch_on_eof;
// The following are not always needed, but may be depending
// on use of certain flex features (like REJECT or yymore()).
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
char* yy_full_match;
int* yy_full_state;
int yy_full_lp;
int yy_lp;
int yy_looking_for_trail_begin;
int yy_more_flag;
int yy_more_len;
int yy_more_offset;
int yy_prev_more_offset;
};
#endif
......@@ -2,7 +2,7 @@
* file.cpp: File management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: file.cpp,v 1.2 2001/11/27 15:33:57 bozo Exp $
* $Id: file.cpp,v 1.3 2002/03/25 01:57:43 asmax Exp $
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -277,6 +277,17 @@ C_String C_File::GetInfo() const
}
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
// Returns the file handle
//------------------------------------------------------------------------------
FILE* C_File::GetHandle() const
{
return m_hFd;
}
/*******************************************************************************
* C_LinkedFile
********************************************************************************
......
......@@ -2,7 +2,7 @@
* File.h: File class definition
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: file.h,v 1.2 2001/11/27 15:33:57 bozo Exp $
* $Id: file.h,v 1.3 2002/03/25 01:57:43 asmax Exp $
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -83,6 +83,7 @@ public:
C_String GetName() const;
C_String GetInfo() const;
FILE* GetHandle() const;
private:
C_String m_strPath;
......
#line 2 "lexer.cpp"
#line 2 "src/core/lexer.cpp"
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /var/lib/cvs/videolan-reinjected/vls/src/core/lexer.cpp,v 1.1 2002/03/24 15:56:08 asmax Exp $
* $Header: /var/lib/cvs/videolan-reinjected/vls/src/core/lexer.cpp,v 1.2 2002/03/25 01:57:43 asmax Exp $
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
#include <errno.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
......@@ -21,9 +23,6 @@
#ifdef __cplusplus
#include <stdlib.h>
#include <fstream>
using std::istream;
using std::ostream;
#ifndef _WIN32
#include <unistd.h>
#else
......@@ -109,6 +108,7 @@ extern int isatty YY_PROTO(( int ));
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
......@@ -152,7 +152,7 @@ typedef unsigned int yy_size_t;
struct yy_buffer_state
{
istream* yy_input_file;
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
......@@ -207,6 +207,7 @@ struct yy_buffer_state
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
......@@ -215,6 +216,37 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
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 ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
......@@ -239,11 +271,15 @@ static void yy_flex_free YY_PROTO(( void * ));
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
#define YY_INTERACTIVE
#include "src/core/FlexLexer.h"
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
......@@ -332,6 +368,9 @@ static yyconst short int yy_chk[40] =
22, 22, 22, 22, 22, 22, 22, 22, 22
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
......@@ -339,13 +378,14 @@ static yyconst short int yy_chk[40] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "lexer.lex"
char *yytext;
#line 1 "src/core/lexer.lex"
#define INITIAL 0
/*******************************************************************************
* lexer.lex: Lexical analyzer for configuration files
*-------------------------------------------------------------------------------
* (c)1999-2002 VideoLAN
* $Id: lexer.cpp,v 1.1 2002/03/24 15:56:08 asmax Exp $
* $Id: lexer.cpp,v 1.2 2002/03/25 01:57:43 asmax Exp $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
......@@ -365,12 +405,12 @@ static yyconst short int yy_chk[40] =
*
*-------------------------------------------------------------------------------
*
* To build lexer.cpp, run: flex -+ -i -olexer.cpp lexer.lex
* To build lexer.cpp, run "make lexer"
*
*******************************************************************************/
#line 30 "lexer.lex"
#include "src/core/lexer.h"
#line 374 "lexer.cpp"
#line 30 "src/core/lexer.lex"
#include "lexer.h"
#line 414 "src/core/lexer.cpp"
/* Macros after this point can all be overridden by user definitions in
* section 1.
......@@ -384,6 +424,9 @@ extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
......@@ -394,6 +437,11 @@ static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
......@@ -439,7 +487,10 @@ YY_MALLOC_DECL
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
#define ECHO LexerOutput( yytext, yyleng )
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
......@@ -447,8 +498,32 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
......@@ -466,14 +541,14 @@ YY_MALLOC_DECL
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) LexerError( msg )
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yyFlexLexer::yylex()
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
......@@ -497,10 +572,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
#line 38 "lexer.lex"
#line 38 "src/core/lexer.lex"
#line 504 "lexer.cpp"
#line 579 "src/core/lexer.cpp"
if ( yy_init )
{
......@@ -514,10 +589,10 @@ YY_DECL
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = &cin;
yyin = stdin;
if ( ! yyout )
yyout = &cout;
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
......@@ -585,50 +660,50 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 40 "lexer.lex"
#line 40 "src/core/lexer.lex"
return TOK_BEGIN;
YY_BREAK
case 2:
YY_RULE_SETUP
#line 41 "lexer.lex"
#line 41 "src/core/lexer.lex"
return TOK_END;
YY_BREAK
case 3:
YY_RULE_SETUP
#line 42 "lexer.lex"
#line 42 "src/core/lexer.lex"
return TOK_VAR;
YY_BREAK
case 4:
YY_RULE_SETUP
#line 43 "lexer.lex"
#line 43 "src/core/lexer.lex"
return TOK_EQUAL;
YY_BREAK
case 5:
YY_RULE_SETUP
#line 44 "lexer.lex"
#line 44 "src/core/lexer.lex"
return TOK_VALUE;
YY_BREAK
case 6:
YY_RULE_SETUP
#line 45 "lexer.lex"
#line 45 "src/core/lexer.lex"
YY_BREAK
case 7:
YY_RULE_SETUP
#line 46 "lexer.lex"
#line 46 "src/core/lexer.lex"
YY_BREAK
case 8:
YY_RULE_SETUP
#line 47 "lexer.lex"
#line 47 "src/core/lexer.lex"
return TOK_NEWLINE;
YY_BREAK
case 9:
YY_RULE_SETUP
#line 49 "lexer.lex"
#line 49 "src/core/lexer.lex"
ECHO;
YY_BREAK
#line 632 "lexer.cpp"
#line 707 "src/core/lexer.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
......@@ -761,87 +836,6 @@ case YY_STATE_EOF(INITIAL):
} /* end of scanning one token */
} /* 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_flex_debug = 0;
yylineno = 1; // this will only get updated if %option yylineno
yy_did_buffer_switch_on_eof = 0;
yy_looking_for_trail_begin = 0;
yy_more_flag = 0;
yy_more_len = 0;
yy_more_offset = yy_prev_more_offset = 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 );
}
void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
{
if ( new_in )
{
yy_delete_buffer( yy_current_buffer );
yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
}
if ( new_out )
yyout = new_out;
}
#ifdef YY_INTERACTIVE
int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
#else
int yyFlexLexer::LexerInput( char* buf, int max_size )
#endif
{
if ( yyin->eof() || yyin->fail() )
return 0;
#ifdef YY_INTERACTIVE
yyin->get( buf[0] );
if ( yyin->eof() )
return 0;
if ( yyin->bad() )
return -1;
return 1;
#else
(void) yyin->read( buf, max_size );
if ( yyin->bad() )
return -1;
else
return yyin->gcount();
#endif
}
void yyFlexLexer::LexerOutput( const char* buf, int size )
{
(void) yyout->write( buf, size );
}
/* yy_get_next_buffer - try to read in a new buffer
*
......@@ -851,7 +845,7 @@ void yyFlexLexer::LexerOutput( const char* buf, int size )
* EOB_ACT_END_OF_FILE - end of file
*/
int yyFlexLexer::yy_get_next_buffer()
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
......@@ -983,7 +977,7 @@ int yyFlexLexer::yy_get_next_buffer()
/* yy_get_previous_state - get the state just before the EOB char was reached */
yy_state_type yyFlexLexer::yy_get_previous_state()
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
......@@ -1017,7 +1011,12 @@ yy_state_type yyFlexLexer::yy_get_previous_state()
* next_state = yy_try_NUL_trans( current_state );
*/
yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
......@@ -1041,7 +1040,14 @@ yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
}
void yyFlexLexer::yyunput( int c, register char* yy_bp )
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
......@@ -1076,9 +1082,14 @@ void yyFlexLexer::yyunput( int c, register char* yy_bp )
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
int yyFlexLexer::yyinput()
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
......@@ -1147,7 +1158,12 @@ int yyFlexLexer::yyinput()
}
void yyFlexLexer::yyrestart( istream* input_file )
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
......@@ -1157,7 +1173,12 @@ void yyFlexLexer::yyrestart( istream* input_file )
}
void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
......@@ -1182,7 +1203,11 @@ void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
}
void yyFlexLexer::yy_load_buffer_state()
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
......@@ -1191,7 +1216,13 @@ void yyFlexLexer::yy_load_buffer_state()
}
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
......@@ -1216,7 +1247,12 @@ YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
}