Main Page | Directories | File List

mootPPLexer.h

Go to the documentation of this file.
00001 #ifndef FLEX_HEADER_mootPPLexer_h
00002 #define FLEX_HEADER_mootPPLexer_h
00003 #define YY_mootPPLexer_CHAR unsigned char
00004 #line 1 "C:/msys/1.0/local/share/flex++bison++/flexskel.h"
00005 /* A lexical scanner header generated by flex */
00006 /* MODIFIED FOR C++ CLASS BY Alain Coetmeur: coetmeur(at)icdc.fr */
00007 /* Note that (at) mean the 'at' symbol that I cannot write */
00008 /* because it is expanded to the class name */
00009 /* made at Informatique-CDC, Research&development department */
00010 /* company from the Caisse Des Depots et Consignations */
00011 
00012 
00013 /*********************************************/
00014 /* SYSTEM dependent declaration, includes... */
00015 /*********************************************/
00016 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00017 #ifdef c_plusplus
00018 #ifndef __cplusplus
00019 #define __cplusplus
00020 #endif
00021 #endif
00022 #ifdef __cplusplus
00023 #ifndef YY_USE_PROTOS
00024 #define YY_USE_PROTOS
00025 #endif
00026 #ifndef YY_USE_CLASS
00027 #define YY_USE_CLASS
00028 #endif
00029 #else   /* ! __cplusplus */
00030 #ifdef __STDC__
00031 #ifdef __GNUC__
00032 #else
00033 #endif  /* __GNUC__ */
00034 #ifndef YY_USE_PROTOS
00035 #define YY_USE_PROTOS
00036 #endif
00037 #endif  /* __STDC__ */
00038 #endif  /* ! __cplusplus */
00039 /*********************************************/
00040 /* COMPILER DEPENDENT   MACROS               */
00041 /*********************************************/
00042 /* use prototypes in function declarations */
00043 #ifndef YY_PROTO
00044 #ifdef YY_USE_PROTOS
00045 #define YY_PROTO(proto) proto
00046 #else
00047 #define YY_PROTO(proto) ()
00048 #endif
00049 #endif
00050 #include <stdio.h>
00051 
00052 
00053 
00054 
00055 /* % here is the declaration from section1 %header{  */ 
00056 #line 33 "mootPPLexer.ll"
00057 /*============================================================================
00058  * Doxygen docs
00059  *============================================================================*/
00067 #include <string>
00068 #include <mootGenericLexer.h>
00069 using namespace moot;
00070 #line 48 "mootPPLexer.ll"
00071 #define YY_mootPPLexer_CLASS  mootPPLexer
00072 #line 50 "mootPPLexer.ll"
00073 #define YY_mootPPLexer_INHERIT  \
00074   : public GenericLexer
00075 #line 53 "mootPPLexer.ll"
00076 #define YY_mootPPLexer_INPUT_CODE  \
00077   return moot::GenericLexer::yyinput(buffer,result,max_size);
00078 #line 56 "mootPPLexer.ll"
00079 #define YY_mootPPLexer_MEMBERS  \
00080   public: \
00081   /* -- public typedefs */\
00082 \
00083   typedef enum { \
00084     PPEOF, \
00085     UNKNOWN, \
00086     EOS, \
00087     XML_START_TAG, \
00088     XML_END_TAG, \
00089     XML_ENTITY, \
00090     WORD, \
00091     INTEGER, \
00092     FLOAT, \
00093     PUNCT, \
00094   } TokenType; \
00095   \
00096   public: \
00097     /* -- public local data */ \
00098 \
00099     bool verbose; \
00100 \
00101     unsigned int ntokens; \
00102  \
00103     std::string output_sentence_separator; \
00104  \
00105     std::string output_token_separator; \
00106     \
00107 \
00108     virtual ~mootPPLexer(void) {}; \
00109     \
00110  \
00111   virtual void **mgl_yy_current_buffer_p(void) \
00112                  {return (void**)(&yy_current_buffer);};\
00113   virtual void  *mgl_yy_create_buffer(int size, FILE *unused=stdin) \
00114                  {return (void*)(yy_create_buffer(unused,size));};\
00115   virtual void   mgl_yy_init_buffer(void *buf, FILE *unused=stdin) \
00116                  {yy_init_buffer((YY_BUFFER_STATE)buf,unused);};\
00117   virtual void   mgl_yy_delete_buffer(void *buf) \
00118                  {yy_delete_buffer((YY_BUFFER_STATE)buf);};\
00119   virtual void   mgl_yy_switch_to_buffer(void *buf) \
00120                  {yy_switch_to_buffer((YY_BUFFER_STATE)buf);};\
00121   virtual void   mgl_begin(int stateno);
00122 #line 100 "mootPPLexer.ll"
00123 #define YY_mootPPLexer_CONSTRUCTOR_INIT  : \
00124   GenericLexer("mootPPLexer"), \
00125   ntokens(0), \
00126   output_sentence_separator("\n\n"), \
00127   output_token_separator("\n")
00128 #line 125 "mootPPLexer.ll"
00129 #line 52 "C:/msys/1.0/local/share/flex++bison++/flexskel.h"
00130 
00131 
00132 
00133 #ifndef YY_mootPPLexer_TEXT
00134 #define YY_mootPPLexer_TEXT yytext
00135 #endif
00136 #ifndef YY_mootPPLexer_LENG
00137 #define YY_mootPPLexer_LENG yyleng
00138 #endif
00139 #ifndef YY_mootPPLexer_IN
00140 #define YY_mootPPLexer_IN yyin
00141 #endif
00142 #ifndef YY_mootPPLexer_OUT
00143 #define YY_mootPPLexer_OUT yyout
00144 #endif
00145 #ifndef YY_mootPPLexer_LEX_RETURN
00146 #define YY_mootPPLexer_LEX_RETURN int
00147 #else
00148 #ifndef YY_mootPPLexer_LEX_DEFINED
00149 #define YY_mootPPLexer_LEX_DEFINED 
00150 #endif
00151 #endif
00152 
00153 #ifndef YY_mootPPLexer_LEX
00154 #define YY_mootPPLexer_LEX yylex
00155 #else
00156 #ifndef YY_mootPPLexer_LEX_DEFINED
00157 #define YY_mootPPLexer_LEX_DEFINED 
00158 #endif
00159 #endif
00160 
00161 #ifndef YY_mootPPLexer_LEX_PARAM
00162 #ifndef YY_USE_PROTOS
00163 #define YY_mootPPLexer_LEX_PARAM 
00164 #else
00165 #define YY_mootPPLexer_LEX_PARAM void
00166 #endif
00167 #else
00168 #ifndef YY_mootPPLexer_LEX_DEFINED
00169 #define YY_mootPPLexer_LEX_DEFINED 
00170 #endif
00171 #endif
00172 
00173 #ifndef YY_mootPPLexer_LEX_PARAM_DEF
00174 #define YY_mootPPLexer_LEX_PARAM_DEF
00175 #else
00176 #ifndef YY_mootPPLexer_LEX_DEFINED
00177 #define YY_mootPPLexer_LEX_DEFINED 
00178 #endif
00179 #endif
00180 
00181 #ifndef YY_mootPPLexer_RESTART
00182 #define YY_mootPPLexer_RESTART yyrestart
00183 #endif
00184 #ifndef YY_mootPPLexer_SWITCH_TO_BUFFER
00185 #define YY_mootPPLexer_SWITCH_TO_BUFFER yy_switch_to_buffer
00186 #endif
00187 #ifndef YY_mootPPLexer_LOAD_BUFFER_STATE
00188 #define YY_mootPPLexer_LOAD_BUFFER_STATE yy_load_buffer_state
00189 #endif
00190 
00191 #ifndef YY_mootPPLexer_CREATE_BUFFER
00192 #define YY_mootPPLexer_CREATE_BUFFER yy_create_buffer
00193 #ifndef YY_USE_CLASS
00194 #ifndef yy_new_buffer
00195 #define yy_new_buffer yy_create_buffer
00196 #endif
00197 #endif
00198 #endif
00199 #ifndef YY_mootPPLexer_DELETE_BUFFER
00200 #define YY_mootPPLexer_DELETE_BUFFER yy_delete_buffer
00201 #endif
00202 #ifndef YY_mootPPLexer_INIT_BUFFER
00203 #define YY_mootPPLexer_INIT_BUFFER yy_init_buffer
00204 #endif
00205 #ifdef YY_mootPPLexer_FLEX_DEBUG
00206 #ifndef YY_mootPPLexer_DEBUG
00207 #define YY_mootPPLexer_DEBUG 1
00208 #endif
00209 #else
00210 #ifndef YY_mootPPLexer_DEBUG
00211 #define YY_mootPPLexer_DEBUG 0
00212 #endif
00213 #endif
00214 
00215 #if YY_mootPPLexer_DEBUG != 0
00216 #ifndef YY_mootPPLexer_DEBUG_FLAG
00217 #define YY_mootPPLexer_DEBUG_FLAG yy_flex_debug
00218 #endif
00219 #ifndef YY_mootPPLexer_DEBUG_INIT
00220 #define YY_mootPPLexer_DEBUG_INIT 1
00221 #endif
00222 #endif
00223 
00224 
00225 
00226 
00227 #ifndef YY_USE_CLASS
00228 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00229 
00230 extern void YY_mootPPLexer_RESTART YY_PROTO(( FILE *input_file ));
00231 extern void YY_mootPPLexer_SWITCH_TO_BUFFER YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00232 extern void YY_mootPPLexer_LOAD_BUFFER_STATE YY_PROTO(( void ));
00233 extern YY_BUFFER_STATE YY_mootPPLexer_CREATE_BUFFER YY_PROTO(( FILE *file, int size ));
00234 extern void YY_mootPPLexer_DELETE_BUFFER YY_PROTO(( YY_BUFFER_STATE b ));
00235 extern void YY_mootPPLexer_INIT_BUFFER YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00236 
00237 #if YY_mootPPLexer_DEBUG != 0
00238 extern int YY_mootPPLexer_DEBUG_FLAG ;
00239 #endif
00240 extern YY_mootPPLexer_CHAR  *YY_mootPPLexer_TEXT;
00241 extern int YY_mootPPLexer_LENG;
00242 extern FILE *YY_mootPPLexer_IN, *YY_mootPPLexer_OUT;
00243 #ifdef YY_mootPPLexer_LEX_DEFINED
00244 extern YY_mootPPLexer_LEX_RETURN YY_mootPPLexer_LEX ( YY_mootPPLexer_LEX_PARAM )
00245 YY_mootPPLexer_LEX_PARAM_DEF
00246 #else
00247 #ifndef YY_DECL
00248 extern YY_mootPPLexer_LEX_RETURN YY_mootPPLexer_LEX ( YY_mootPPLexer_LEX_PARAM )
00249 YY_mootPPLexer_LEX_PARAM_DEF
00250 #else
00251 /* no declaration if oldstyle flex */
00252 #endif
00253 #endif
00254 #else
00255 
00256 #ifndef YY_mootPPLexer_CLASS
00257 #define YY_mootPPLexer_CLASS mootPPLexer
00258 #endif
00259 #ifndef YY_mootPPLexer_ECHO
00260 #define YY_mootPPLexer_ECHO yy_echo
00261 #endif
00262 #ifdef YY_mootPPLexer_ECHO_PURE
00263 #define YY_mootPPLexer_ECHO_NOCODE
00264 #endif
00265 #ifndef YY_mootPPLexer_ECHO_CODE
00266 #define YY_mootPPLexer_ECHO_CODE fwrite( (char *) YY_mootPPLexer_TEXT, YY_mootPPLexer_LENG, 1, YY_mootPPLexer_OUT );
00267 #endif
00268 #ifndef YY_mootPPLexer_INPUT
00269 #define YY_mootPPLexer_INPUT yy_input
00270 #endif
00271 #ifdef YY_mootPPLexer_INPUT_PURE
00272 #define YY_mootPPLexer_INPUT_NOCODE
00273 #endif
00274 #ifndef YY_mootPPLexer_INPUT_CODE
00275 #define YY_mootPPLexer_INPUT_CODE return result= fread(  buffer, 1,max_size,YY_mootPPLexer_IN );
00276 #endif
00277 #ifdef YY_mootPPLexer_FATAL_ERROR_PURE
00278 #define YY_mootPPLexer_FATAL_ERRO_NOCODE
00279 #endif
00280 #ifndef YY_mootPPLexer_FATAL_ERROR
00281 #define YY_mootPPLexer_FATAL_ERROR yy_fatal_error
00282 #endif
00283 #ifndef YY_mootPPLexer_FATAL_ERROR_CODE
00284 #define YY_mootPPLexer_FATAL_ERROR_CODE fputs( msg, stderr );putc( '\n', stderr );exit( 1 );
00285 #endif
00286 #ifndef YY_mootPPLexer_WRAP
00287 #define YY_mootPPLexer_WRAP yy_wrap
00288 #endif
00289 #ifdef YY_mootPPLexer_WRAP_PURE
00290 #define YY_mootPPLexer_WRAP_NOCODE
00291 #endif
00292 #ifndef YY_mootPPLexer_WRAP_CODE
00293 #define YY_mootPPLexer_WRAP_CODE return 1;
00294 #endif
00295 
00296 
00297 #ifndef YY_mootPPLexer_INHERIT
00298 #define YY_mootPPLexer_INHERIT
00299 #endif
00300 #ifndef YY_mootPPLexer_MEMBERS
00301 #define YY_mootPPLexer_MEMBERS 
00302 #endif
00303 #ifndef YY_mootPPLexer_CONSTRUCTOR_PARAM
00304 #define YY_mootPPLexer_CONSTRUCTOR_PARAM
00305 #endif
00306 #ifndef YY_mootPPLexer_CONSTRUCTOR_CODE
00307 #define YY_mootPPLexer_CONSTRUCTOR_CODE
00308 #endif
00309 #ifndef YY_mootPPLexer_CONSTRUCTOR_INIT
00310 #define YY_mootPPLexer_CONSTRUCTOR_INIT
00311 #endif
00312 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00313 
00314 class YY_mootPPLexer_CLASS YY_mootPPLexer_INHERIT
00315 {
00316  private:/* data */
00317  YY_mootPPLexer_CHAR  *yy_c_buf_p;
00318  YY_mootPPLexer_CHAR  yy_hold_char;
00319  int yy_n_chars;
00320  int yy_init;
00321  int yy_start;
00322  int yy_did_buffer_switch_on_eof;
00323  private: /* functions */
00324  void yy_initialize();
00325  int input();
00326  int yyinput() {return input();};
00327  int yy_get_next_buffer();
00328  void yyunput( YY_mootPPLexer_CHAR  c, YY_mootPPLexer_CHAR  *buf_ptr );
00329  /* use long instead of yy_state_type because it is undef */
00330  long yy_get_previous_state_ ( void );
00331  long yy_try_NUL_trans_  ( long current_state_ );
00332  protected:/* non virtual */
00333  YY_BUFFER_STATE yy_current_buffer;
00334  void YY_mootPPLexer_RESTART ( FILE *input_file );
00335  void YY_mootPPLexer_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer );
00336  void YY_mootPPLexer_LOAD_BUFFER_STATE( void );
00337  YY_BUFFER_STATE YY_mootPPLexer_CREATE_BUFFER( FILE *file, int size );
00338  void YY_mootPPLexer_DELETE_BUFFER( YY_BUFFER_STATE b );
00339  void YY_mootPPLexer_INIT_BUFFER( YY_BUFFER_STATE b, FILE *file );
00340  protected: /* virtual */
00341  virtual void YY_mootPPLexer_ECHO()
00342 #ifdef YY_mootPPLexer_ECHO_PURE
00343   =0
00344 #endif
00345   ;
00346  virtual int  YY_mootPPLexer_INPUT(char  *buf,int &result,int max_size)
00347 #ifdef YY_mootPPLexer_INPUT_PURE
00348   =0
00349 #endif
00350   ;
00351  virtual void  YY_mootPPLexer_FATAL_ERROR(char *msg)
00352 #ifdef YY_mootPPLexer_FATAL_ERROR_PURE
00353   =0
00354 #endif
00355   ;
00356  virtual int  YY_mootPPLexer_WRAP()
00357 #ifdef YY_mootPPLexer_WRAP_PURE
00358   =0
00359 #endif
00360   ;
00361  public:
00362  YY_mootPPLexer_CHAR  *YY_mootPPLexer_TEXT;
00363  int YY_mootPPLexer_LENG;
00364  FILE *YY_mootPPLexer_IN, *YY_mootPPLexer_OUT;
00365  YY_mootPPLexer_LEX_RETURN YY_mootPPLexer_LEX ( YY_mootPPLexer_LEX_PARAM);
00366  YY_mootPPLexer_CLASS(YY_mootPPLexer_CONSTRUCTOR_PARAM) ;
00367 #if YY_mootPPLexer_DEBUG != 0
00368  int YY_mootPPLexer_DEBUG_FLAG;
00369 #endif
00370  public: /* added members */
00371  YY_mootPPLexer_MEMBERS 
00372 };
00373 #endif
00374 
00375 
00376 
00377 /* declaration of externs for public use of yylex scanner */
00378 
00379 /* % here is the declaration from section2 %header{ */ 
00380 #line 180 "mootPPLexer.ll"
00381 #endif
00382 #line 302 "C:/msys/1.0/local/share/flex++bison++/flexskel.h"
00383 
00384 /* end of generated header */

Generated on Sat Sep 17 01:20:33 2005 for libmoot by  doxygen 1.4.4