#ifndef FLEX_HEADER_EdIRflx_hpp #define FLEX_HEADER_EdIRflx_hpp //BEGIN ROMTEAM Cristi Petrescu 98-04- #include "stdafx.h" #include typedef enum {begin_french, begin_english, begin_dsgvar} tdeBegin; // I made this a class just for using CList to build stacks. class CPA_EdIR_DefineContext { public: char *m_pcIndex; struct yy_buffer_state *m_bufLexContext; }; class CPA_EdIR_DefineContextStack : public CList { public: void m_fn_vDestroyAndRemoveAllEntries (void); }; //END ROMTEAM Cristi Petrescu 98-04- #define YY_CLex_CHAR char /* A lexical scanner header generated by flex */ /* MODIFIED FOR C++ CLASS BY Alain Coetmeur: coetmeur(at)icdc.fr */ /* Note that (at) mean the 'at' symbol that I cannot write */ /* because it is expanded to the class name */ /* made at Informatique-CDC, Research&development department */ /* company from the Caisse Des Depots et Consignations */ /*********************************************/ /* SYSTEM dependent declaration, includes... */ /*********************************************/ /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #ifndef YY_USE_PROTOS #define YY_USE_PROTOS #endif #ifndef YY_USE_CLASS #define YY_USE_CLASS #endif #else /* ! __cplusplus */ #ifdef __STDC__ #ifdef __GNUC__ #else #endif /* __GNUC__ */ #ifndef YY_USE_PROTOS #define YY_USE_PROTOS #endif #endif /* __STDC__ */ #endif /* ! __cplusplus */ /*********************************************/ /* COMPILER DEPENDENT MACROS */ /*********************************************/ /* use prototypes in function declarations */ #ifndef YY_PROTO #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif #endif #include /* % here is the declaration from section1 %header{ */ #define YY_CLex_MEMBERS ~CLex(); \ void yyinit(char *,enum tdeTypeText_); \ long m_lOldIndex; \ long m_lIndexWithoutSpaceAndTab; \ long m_lIndex; \ long m_lOldMacroIndex; \ BOOL m_bIsInMacro; \ BOOL m_bIsInDefine; \ char *m_pcIndex; \ enum tdeTypeText_ m_eTypeText; \ tdeBegin m_eBegin; \ CString m_csDefineName; \ CMapStringToString m_clDefineList; \ CPA_EdIR_DefineContextStack m_clDefineContextStack; \ void m_fn_vEnterContext (char *szStringToParse); \ void m_fn_vExitContext (void); #define YY_CLex_INPUT_CODE { \ if(*m_pcIndex==0) \ result=YY_NULL; \ else \ { \ result=min((size_t)max_size,strlen(m_pcIndex)); \ strncpy(buffer,m_pcIndex,result); \ m_pcIndex+=result; \ } \ return result; \ } #define YY_CLex_WRAP_CODE { \ if (m_clDefineContextStack . IsEmpty ()) \ { \ return 1; \ } \ else \ { \ m_fn_vExitContext (); \ if (m_clDefineContextStack . IsEmpty ()) \ m_bIsInDefine = FALSE; \ return 0; \ } \ } #endif #ifndef YY_CLex_TEXT #define YY_CLex_TEXT yytext #endif #ifndef YY_CLex_LENG #define YY_CLex_LENG yyleng #endif #ifndef YY_CLex_IN #define YY_CLex_IN yyin #endif #ifndef YY_CLex_OUT #define YY_CLex_OUT yyout #endif #ifndef YY_CLex_LEX_RETURN #define YY_CLex_LEX_RETURN int #else #ifndef YY_CLex_LEX_DEFINED #define YY_CLex_LEX_DEFINED #endif #endif #ifndef YY_CLex_LEX #define YY_CLex_LEX yylex #else #ifndef YY_CLex_LEX_DEFINED #define YY_CLex_LEX_DEFINED #endif #endif #ifndef YY_CLex_LEX_PARAM #ifndef YY_USE_PROTOS #define YY_CLex_LEX_PARAM #else #define YY_CLex_LEX_PARAM void #endif #else #ifndef YY_CLex_LEX_DEFINED #define YY_CLex_LEX_DEFINED #endif #endif #ifndef YY_CLex_LEX_PARAM_DEF #define YY_CLex_LEX_PARAM_DEF #else #ifndef YY_CLex_LEX_DEFINED #define YY_CLex_LEX_DEFINED #endif #endif #ifndef YY_CLex_RESTART #define YY_CLex_RESTART yyrestart #endif #ifndef YY_CLex_SWITCH_TO_BUFFER #define YY_CLex_SWITCH_TO_BUFFER yy_switch_to_buffer #endif #ifndef YY_CLex_LOAD_BUFFER_STATE #define YY_CLex_LOAD_BUFFER_STATE yy_load_buffer_state #endif #ifndef YY_CLex_CREATE_BUFFER #define YY_CLex_CREATE_BUFFER yy_create_buffer #ifndef YY_USE_CLASS #ifndef yy_new_buffer #define yy_new_buffer yy_create_buffer #endif #endif #endif #ifndef YY_CLex_DELETE_BUFFER #define YY_CLex_DELETE_BUFFER yy_delete_buffer #endif #ifndef YY_CLex_INIT_BUFFER #define YY_CLex_INIT_BUFFER yy_init_buffer #endif #ifdef YY_CLex_FLEX_DEBUG #ifndef YY_CLex_DEBUG #define YY_CLex_DEBUG 1 #endif #else #ifndef YY_CLex_DEBUG #define YY_CLex_DEBUG 0 #endif #endif #if YY_CLex_DEBUG != 0 #ifndef YY_CLex_DEBUG_FLAG #define YY_CLex_DEBUG_FLAG yy_flex_debug #endif #ifndef YY_CLex_DEBUG_INIT #define YY_CLex_DEBUG_INIT 1 #endif #endif #ifndef YY_USE_CLASS typedef struct yy_buffer_state *YY_BUFFER_STATE; extern void YY_CLex_RESTART YY_PROTO(( FILE *input_file )); extern void YY_CLex_SWITCH_TO_BUFFER YY_PROTO(( YY_BUFFER_STATE new_buffer )); extern void YY_CLex_LOAD_BUFFER_STATE YY_PROTO(( void )); extern YY_BUFFER_STATE YY_CLex_CREATE_BUFFER YY_PROTO(( FILE *file, int size )); extern void YY_CLex_DELETE_BUFFER YY_PROTO(( YY_BUFFER_STATE b )); extern void YY_CLex_INIT_BUFFER YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); #if YY_CLex_DEBUG != 0 extern int YY_CLex_DEBUG_FLAG ; #endif extern YY_CLex_CHAR *YY_CLex_TEXT; extern int YY_CLex_LENG; extern FILE *YY_CLex_IN, *YY_CLex_OUT; #ifdef YY_CLex_LEX_DEFINED extern YY_CLex_LEX_RETURN YY_CLex_LEX ( YY_CLex_LEX_PARAM ) YY_CLex_LEX_PARAM_DEF #else #ifndef YY_DECL extern YY_CLex_LEX_RETURN YY_CLex_LEX ( YY_CLex_LEX_PARAM ) YY_CLex_LEX_PARAM_DEF #else /* no declaration if oldstyle flex */ #endif #endif #else #ifndef YY_CLex_CLASS #define YY_CLex_CLASS CLex #endif #ifndef YY_CLex_ECHO #define YY_CLex_ECHO yy_echo #endif #ifdef YY_CLex_ECHO_PURE #define YY_CLex_ECHO_NOCODE #endif #ifndef YY_CLex_ECHO_CODE #define YY_CLex_ECHO_CODE fwrite( (char *) YY_CLex_TEXT, YY_CLex_LENG, 1, YY_CLex_OUT ); #endif #ifndef YY_CLex_INPUT #define YY_CLex_INPUT yy_input #endif #ifdef YY_CLex_INPUT_PURE #define YY_CLex_INPUT_NOCODE #endif #ifndef YY_CLex_INPUT_CODE #define YY_CLex_INPUT_CODE return result= fread( buffer, 1,max_size,YY_CLex_IN ); #endif #ifdef YY_CLex_FATAL_ERROR_PURE #define YY_CLex_FATAL_ERRO_NOCODE #endif #ifndef YY_CLex_FATAL_ERROR #define YY_CLex_FATAL_ERROR yy_fatal_error #endif #ifndef YY_CLex_FATAL_ERROR_CODE #define YY_CLex_FATAL_ERROR_CODE fputs( msg, stderr );putc( '\n', stderr );exit( 1 ); #endif #ifndef YY_CLex_WRAP #define YY_CLex_WRAP yy_wrap #endif #ifdef YY_CLex_WRAP_PURE #define YY_CLex_WRAP_NOCODE #endif #ifndef YY_CLex_WRAP_CODE #define YY_CLex_WRAP_CODE return 1; #endif #ifndef YY_CLex_INHERIT #define YY_CLex_INHERIT #endif #ifndef YY_CLex_MEMBERS #define YY_CLex_MEMBERS #endif #ifndef YY_CLex_CONSTRUCTOR_PARAM #define YY_CLex_CONSTRUCTOR_PARAM #endif #ifndef YY_CLex_CONSTRUCTOR_CODE #define YY_CLex_CONSTRUCTOR_CODE #endif #ifndef YY_CLex_CONSTRUCTOR_INIT #define YY_CLex_CONSTRUCTOR_INIT #endif typedef struct yy_buffer_state *YY_BUFFER_STATE; class YY_CLex_CLASS YY_CLex_INHERIT { private:/* data */ YY_CLex_CHAR *yy_c_buf_p; YY_CLex_CHAR yy_hold_char; int yy_n_chars; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; private: /* functions */ void yy_initialize(); int input(); int yyinput() {return input();}; int yy_get_next_buffer(); void yyunput( YY_CLex_CHAR c, YY_CLex_CHAR *buf_ptr ); /* use long instead of yy_state_type because it is undef */ long yy_get_previous_state_ ( void ); long yy_try_NUL_trans_ ( long current_state_ ); protected:/* non virtual */ YY_BUFFER_STATE yy_current_buffer; void YY_CLex_RESTART ( FILE *input_file ); void YY_CLex_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer ); void YY_CLex_LOAD_BUFFER_STATE( void ); YY_BUFFER_STATE YY_CLex_CREATE_BUFFER( FILE *file, int size ); void YY_CLex_DELETE_BUFFER( YY_BUFFER_STATE b ); void YY_CLex_INIT_BUFFER( YY_BUFFER_STATE b, FILE *file ); protected: /* virtual */ virtual void YY_CLex_ECHO() #ifdef YY_CLex_ECHO_PURE =0 #endif ; virtual int YY_CLex_INPUT(char *buf,int &result,int max_size) #ifdef YY_CLex_INPUT_PURE =0 #endif ; virtual void YY_CLex_FATAL_ERROR(char *msg) #ifdef YY_CLex_FATAL_ERROR_PURE =0 #endif ; virtual int YY_CLex_WRAP() #ifdef YY_CLex_WRAP_PURE =0 #endif ; public: YY_CLex_CHAR *YY_CLex_TEXT; int YY_CLex_LENG; FILE *YY_CLex_IN, *YY_CLex_OUT; YY_CLex_LEX_RETURN YY_CLex_LEX ( YY_CLex_LEX_PARAM); YY_CLex_CLASS(YY_CLex_CONSTRUCTOR_PARAM) ; #if YY_CLex_DEBUG != 0 int YY_CLex_DEBUG_FLAG; #endif public: /* added members */ YY_CLex_MEMBERS }; #endif /* declaration of externs for public use of yylex scanner */ /* % here is the declaration from section2 %header{ */