00001 #ifndef CLEX_H
00002 #define CLEX_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <stdio.h>
00013 #include <assert.h>
00014
00015
00016 #include <yytdefs.h>
00017
00018
00019 #if defined(YYTUDEFS) || defined(YYUDEFS)
00020 #include <yytudefs.h>
00021 #endif
00022
00023 #define YY_ALEX
00024
00025
00026 #ifndef YYCDECL
00027 #define YYCDECL
00028 #endif
00029 #ifndef YYDCDECL
00030 #define YYDCDECL
00031 #endif
00032 #ifndef YYNEAR
00033 #define YYNEAR
00034 #endif
00035 #ifndef YYFAR
00036 #define YYFAR
00037 #endif
00038 #ifndef YYNEARFAR
00039 #define YYNEARFAR
00040 #endif
00041 #ifndef YYBASED_CODE
00042 #define YYBASED_CODE
00043 #endif
00044
00045
00046 class YYFAR yyparser;
00047
00048
00049 #define YYEOF 0 // end of file
00050
00051 #ifndef YYSTATE_T
00052 #define YYSTATE_T
00053 typedef struct yystate {
00054 short def;
00055 short base;
00056 short match;
00057 } yystate_t;
00058 #endif
00059
00060 #ifndef YYTRANSITION_T
00061 #define YYTRANSITION_T
00062 typedef struct yytransition {
00063 short next;
00064 short check;
00065 } yytransition_t;
00066 #endif
00067
00068 #ifndef YYCTRANSITION_T
00069 #define YYCTRANSITION_T
00070 typedef struct yyctransition {
00071 unsigned char first;
00072 unsigned char last;
00073 short next;
00074 } yyctransition_t;
00075 #endif
00076
00077 typedef short yymatch_t;
00078 typedef unsigned char yybackup_t;
00079
00080 class YYFAR yylexer {
00081 public:
00082 yylexer();
00083 virtual ~yylexer();
00084
00085
00086 protected:
00087
00088 int yystart;
00089 unsigned char yyeol;
00090 unsigned char yyoldeol;
00091
00092
00093 int YYFAR* yystatebuf;
00094 int YYFAR* yysstatebuf;
00095 char YYFAR* yystext;
00096 int yytext_size;
00097 int yystext_size;
00098
00099
00100 int YYFAR* yyunputbufptr;
00101 int YYFAR* yysunputbufptr;
00102 int yyunput_size;
00103 int yysunput_size;
00104 int yyunputindex;
00105
00106
00107 unsigned char yymoreflg;
00108 unsigned char yyrejectflg;
00109 unsigned char yyreturnflg;
00110 public:
00111 yyparser YYFAR* yyparserptr;
00112
00113
00114 unsigned char yytextgrow;
00115 unsigned char yyunputgrow;
00116
00117
00118 FILE YYFAR* yyin;
00119 FILE YYFAR* yyout;
00120 FILE YYFAR* yyerr;
00121
00122
00123 char YYFAR* yytext;
00124 int yyleng;
00125 int yylineno;
00126
00127
00128 protected:
00129
00130 int yyback(const yymatch_t YYNEARFAR* p, int action) const;
00131 public:
00132
00133 int yycreate(yyparser YYFAR* parserptr = NULL);
00134 void yydestroy();
00135
00136
00137 void yycleanup();
00138 virtual int yylex() = 0;
00139 void yyreset();
00140 int yysettextsize(int size);
00141 int yysetunputsize(int size);
00142
00143
00144 virtual int yyinput();
00145 virtual void yyoutput(int ch);
00146 virtual void yyunput(int ch);
00147 virtual int yywrap();
00148 virtual int yygetchar();
00149 virtual void yytextoverflow();
00150 virtual void yyunputoverflow();
00151 virtual int yyaction(int action) = 0;
00152
00153
00154 void yyecho();
00155 void yyless(int length);
00156 void yybegin(int state) { yystart = state; }
00157 void yymore() { yymoreflg = 1; }
00158 void yynewline(int newline) { newline ? yyeol = 1 : (yyeol = 0); }
00159 void yyreject() { yyrejectflg = 1; }
00160 int yyunputcount() const { return yyunputindex; }
00161
00162
00163 int yyclex() { return yylex(); }
00164 void yylexcleanup() { yycleanup(); }
00165 void yylexinit() { }
00166 #define BEGIN yystart =
00167 #define ECHO yyecho()
00168 #define REJECT yyreject()
00169 #define YYSTATE yystart
00170 #define YY_START yystart
00171
00172
00173 protected:
00174 const yymatch_t YYNEARFAR* yymatch;
00175 const yystate_t YYNEARFAR* yystate;
00176 const yybackup_t YYNEARFAR* yybackup;
00177
00178
00179 #ifdef YYDEBUG
00180 public:
00181 int yydebug;
00182 int yydebugflush;
00183 FILE YYFAR* yydebugout;
00184 protected:
00185 void yydebugoutput(int ch) const;
00186 void yydmatch(int expr) const;
00187 void yydebugoutput(const char* string) const;
00188 #endif
00189 };
00190
00191 class YYFAR yyflexer : public yylexer {
00192 public:
00193 yyflexer() { }
00194
00195
00196 public:
00197 virtual int yylex();
00198
00199
00200 protected:
00201 const yytransition_t YYNEARFAR* yytransition;
00202 int yytransitionmax;
00203 };
00204
00205 class YYFAR yyclexer : public yylexer {
00206 public:
00207 yyclexer() { }
00208
00209
00210 public:
00211 virtual int yylex();
00212
00213
00214 protected:
00215 const yyctransition_t YYNEARFAR* yyctransition;
00216 };
00217
00218
00219 #ifndef yyassert
00220 #define yyassert(expr) assert(expr)
00221 #endif
00222
00223
00224 #ifdef YYDEBUG
00225 extern "C" int YYNEAR YYDCDECL yydebug;
00226 extern "C" int YYNEAR YYDCDECL yydebugflush;
00227 #endif
00228
00229
00230 #if defined(YYBUDEFS) || defined(YYUDEFS)
00231 #include <yybudefs.h>
00232 #endif
00233
00234
00235 #include <yybdefs.h>
00236
00237 #endif
00238