mootNgramsLexer.h
Go to the documentation of this file.
1 #ifndef FLEX_HEADER_mootNgramsLexer_h
2 #define FLEX_HEADER_mootNgramsLexer_h
3 #define YY_mootNgramsLexer_CHAR unsigned char
4 #line 1 "./flexskel.h"
5 /* A lexical scanner header generated by flex */
6 /* MODIFIED FOR C++ CLASS BY Alain Coetmeur: coetmeur(at)icdc.fr */
7 /* Note that (at) mean the 'at' symbol that I cannot write */
8 /* because it is expanded to the class name */
9 /* made at Informatique-CDC, Research&development department */
10 /* company from the Caisse Des Depots et Consignations */
11 
12 
13 /*********************************************/
14 /* SYSTEM dependent declaration, includes... */
15 /*********************************************/
16 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
17 #ifdef c_plusplus
18 #ifndef __cplusplus
19 #define __cplusplus
20 #endif
21 #endif
22 #ifdef __cplusplus
23 #ifndef YY_USE_PROTOS
24 #define YY_USE_PROTOS
25 #endif
26 #ifndef YY_USE_CLASS
27 #define YY_USE_CLASS
28 #endif
29 #else /* ! __cplusplus */
30 #ifdef __STDC__
31 #ifdef __GNUC__
32 #else
33 #endif /* __GNUC__ */
34 #ifndef YY_USE_PROTOS
35 #define YY_USE_PROTOS
36 #endif
37 #endif /* __STDC__ */
38 #endif /* ! __cplusplus */
39 /*********************************************/
40 /* COMPILER DEPENDENT MACROS */
41 /*********************************************/
42 /* use prototypes in function declarations */
43 #ifndef YY_PROTO
44 #ifdef YY_USE_PROTOS
45 #define YY_PROTO(proto) proto
46 #else
47 #define YY_PROTO(proto) ()
48 #endif
49 #endif
50 #include <stdio.h>
51 
52 
53 
54 
55 /* % here is the declaration from section1 %header{ */
56 #line 33 "mootNgramsLexer.ll"
57 
58 /*============================================================================
59  * Doxygen docs
60  *============================================================================*/
73 #include <mootNgramsParser.h>
74 #include <mootGenericLexer.h>
75 
76 using namespace moot;
77 #line 55 "mootNgramsLexer.ll"
78 #define YY_mootNgramsLexer_LEX_PARAM \
79  YY_mootNgramsParser_STYPE *yylval, YY_mootNgramsParser_LTYPE *yylloc
80 #line 58 "mootNgramsLexer.ll"
81 #define YY_mootNgramsLexer_CLASS mootNgramsLexer
82 #line 60 "mootNgramsLexer.ll"
83 #define YY_mootNgramsLexer_INHERIT \
84  : public GenericLexer
85 #line 63 "mootNgramsLexer.ll"
86 #define YY_mootNgramsLexer_INPUT_CODE \
87  return moot::GenericLexer::yyinput(buffer,result,max_size);
88 #line 66 "mootNgramsLexer.ll"
89 #define YY_mootNgramsLexer_MEMBERS \
90  public: \
91 \
92  virtual ~mootNgramsLexer(void) {}; \
93  /*----- BEGIN moot::GenericLexer helpers -----*/ \
94  virtual void *mgl_yy_current_buffer_p(void) \
95  {return reinterpret_cast<void*>(&yy_current_buffer);};\
96  virtual void *mgl_yy_create_buffer(int size, FILE *unused=stdin) \
97  {return reinterpret_cast<void*>(yy_create_buffer(unused,size));};\
98  virtual void mgl_yy_init_buffer(void *buf, FILE *unused=stdin) \
99  {yy_init_buffer(reinterpret_cast<YY_BUFFER_STATE>(buf),unused);};\
100  virtual void mgl_yy_delete_buffer(void *buf) \
101  {yy_delete_buffer(reinterpret_cast<YY_BUFFER_STATE>(buf));};\
102  virtual void mgl_yy_switch_to_buffer(void *buf) \
103  {yy_switch_to_buffer(reinterpret_cast<YY_BUFFER_STATE>(buf));};\
104  virtual void mgl_begin(int stateno); \
105  /*----- END moot::GenericLexer helpers -----*/ \
106 
107 #line 85 "mootNgramsLexer.ll"
108 #define YY_mootNgramsLexer_CONSTRUCTOR_INIT :\
109  GenericLexer("mootNgramsLexer")
110 #line 101 "mootNgramsLexer.ll"
111 #line 52 "./flexskel.h"
113 
114 
115 #ifndef YY_mootNgramsLexer_TEXT
116 #define YY_mootNgramsLexer_TEXT yytext
117 #endif
118 #ifndef YY_mootNgramsLexer_LENG
119 #define YY_mootNgramsLexer_LENG yyleng
120 #endif
121 #ifndef YY_mootNgramsLexer_IN
122 #define YY_mootNgramsLexer_IN yyin
123 #endif
124 #ifndef YY_mootNgramsLexer_OUT
125 #define YY_mootNgramsLexer_OUT yyout
126 #endif
127 #ifndef YY_mootNgramsLexer_LEX_RETURN
128 #define YY_mootNgramsLexer_LEX_RETURN int
129 #else
130 #ifndef YY_mootNgramsLexer_LEX_DEFINED
131 #define YY_mootNgramsLexer_LEX_DEFINED
132 #endif
133 #endif
134 
135 #ifndef YY_mootNgramsLexer_LEX
136 #define YY_mootNgramsLexer_LEX yylex
137 #else
138 #ifndef YY_mootNgramsLexer_LEX_DEFINED
139 #define YY_mootNgramsLexer_LEX_DEFINED
140 #endif
141 #endif
142 
143 #ifndef YY_mootNgramsLexer_LEX_PARAM
144 #ifndef YY_USE_PROTOS
145 #define YY_mootNgramsLexer_LEX_PARAM
146 #else
147 #define YY_mootNgramsLexer_LEX_PARAM void
148 #endif
149 #else
150 #ifndef YY_mootNgramsLexer_LEX_DEFINED
151 #define YY_mootNgramsLexer_LEX_DEFINED
152 #endif
153 #endif
154 
155 #ifndef YY_mootNgramsLexer_LEX_PARAM_DEF
156 #define YY_mootNgramsLexer_LEX_PARAM_DEF
157 #else
158 #ifndef YY_mootNgramsLexer_LEX_DEFINED
159 #define YY_mootNgramsLexer_LEX_DEFINED
160 #endif
161 #endif
162 
163 #ifndef YY_mootNgramsLexer_RESTART
164 #define YY_mootNgramsLexer_RESTART yyrestart
165 #endif
166 #ifndef YY_mootNgramsLexer_SWITCH_TO_BUFFER
167 #define YY_mootNgramsLexer_SWITCH_TO_BUFFER yy_switch_to_buffer
168 #endif
169 #ifndef YY_mootNgramsLexer_LOAD_BUFFER_STATE
170 #define YY_mootNgramsLexer_LOAD_BUFFER_STATE yy_load_buffer_state
171 #endif
172 
173 #ifndef YY_mootNgramsLexer_CREATE_BUFFER
174 #define YY_mootNgramsLexer_CREATE_BUFFER yy_create_buffer
175 #ifndef YY_USE_CLASS
176 #ifndef yy_new_buffer
177 #define yy_new_buffer yy_create_buffer
178 #endif
179 #endif
180 #endif
181 #ifndef YY_mootNgramsLexer_DELETE_BUFFER
182 #define YY_mootNgramsLexer_DELETE_BUFFER yy_delete_buffer
183 #endif
184 #ifndef YY_mootNgramsLexer_INIT_BUFFER
185 #define YY_mootNgramsLexer_INIT_BUFFER yy_init_buffer
186 #endif
187 #ifdef YY_mootNgramsLexer_FLEX_DEBUG
188 #ifndef YY_mootNgramsLexer_DEBUG
189 #define YY_mootNgramsLexer_DEBUG 1
190 #endif
191 #else
192 #ifndef YY_mootNgramsLexer_DEBUG
193 #define YY_mootNgramsLexer_DEBUG 0
194 #endif
195 #endif
196 
197 #if YY_mootNgramsLexer_DEBUG != 0
198 #ifndef YY_mootNgramsLexer_DEBUG_FLAG
199 #define YY_mootNgramsLexer_DEBUG_FLAG yy_flex_debug
200 #endif
201 #ifndef YY_mootNgramsLexer_DEBUG_INIT
202 #define YY_mootNgramsLexer_DEBUG_INIT 1
203 #endif
204 #endif
205 
206 
207 
208 
209 #ifndef YY_USE_CLASS
210 typedef struct yy_buffer_state *YY_BUFFER_STATE;
211 
212 extern void YY_mootNgramsLexer_RESTART YY_PROTO(( FILE *input_file ));
213 extern void YY_mootNgramsLexer_SWITCH_TO_BUFFER YY_PROTO(( YY_BUFFER_STATE new_buffer ));
214 extern void YY_mootNgramsLexer_LOAD_BUFFER_STATE YY_PROTO(( void ));
215 extern YY_BUFFER_STATE YY_mootNgramsLexer_CREATE_BUFFER YY_PROTO(( FILE *file, int size ));
216 extern void YY_mootNgramsLexer_DELETE_BUFFER YY_PROTO(( YY_BUFFER_STATE b ));
217 extern void YY_mootNgramsLexer_INIT_BUFFER YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
218 
219 #if YY_mootNgramsLexer_DEBUG != 0
220 extern int YY_mootNgramsLexer_DEBUG_FLAG ;
221 #endif
222 extern YY_mootNgramsLexer_CHAR *YY_mootNgramsLexer_TEXT;
223 extern int YY_mootNgramsLexer_LENG;
224 extern FILE *YY_mootNgramsLexer_IN, *YY_mootNgramsLexer_OUT;
225 #ifdef YY_mootNgramsLexer_LEX_DEFINED
226 extern YY_mootNgramsLexer_LEX_RETURN YY_mootNgramsLexer_LEX ( YY_mootNgramsLexer_LEX_PARAM )
227 YY_mootNgramsLexer_LEX_PARAM_DEF
228 #else
229 #ifndef YY_DECL
230 extern YY_mootNgramsLexer_LEX_RETURN YY_mootNgramsLexer_LEX ( YY_mootNgramsLexer_LEX_PARAM )
231 YY_mootNgramsLexer_LEX_PARAM_DEF
232 #else
233 /* no declaration if oldstyle flex */
234 #endif
235 #endif
236 #else
237 
238 #ifndef YY_mootNgramsLexer_CLASS
239 #define YY_mootNgramsLexer_CLASS mootNgramsLexer
240 #endif
241 #ifndef YY_mootNgramsLexer_ECHO
242 #define YY_mootNgramsLexer_ECHO yy_echo
243 #endif
244 #ifdef YY_mootNgramsLexer_ECHO_PURE
245 #define YY_mootNgramsLexer_ECHO_NOCODE
246 #endif
247 #ifndef YY_mootNgramsLexer_ECHO_CODE
248 #define YY_mootNgramsLexer_ECHO_CODE fwrite( (char *) YY_mootNgramsLexer_TEXT, YY_mootNgramsLexer_LENG, 1, YY_mootNgramsLexer_OUT );
249 #endif
250 #ifndef YY_mootNgramsLexer_INPUT
251 #define YY_mootNgramsLexer_INPUT yy_input
252 #endif
253 #ifdef YY_mootNgramsLexer_INPUT_PURE
254 #define YY_mootNgramsLexer_INPUT_NOCODE
255 #endif
256 #ifndef YY_mootNgramsLexer_INPUT_CODE
257 #define YY_mootNgramsLexer_INPUT_CODE return result= fread( buffer, 1,max_size,YY_mootNgramsLexer_IN );
258 #endif
259 #ifdef YY_mootNgramsLexer_FATAL_ERROR_PURE
260 #define YY_mootNgramsLexer_FATAL_ERRO_NOCODE
261 #endif
262 #ifndef YY_mootNgramsLexer_FATAL_ERROR
263 #define YY_mootNgramsLexer_FATAL_ERROR yy_fatal_error
264 #endif
265 #ifndef YY_mootNgramsLexer_FATAL_ERROR_CODE
266 #define YY_mootNgramsLexer_FATAL_ERROR_CODE fputs( msg, stderr );putc( '\n', stderr );exit( 1 );
267 #endif
268 #ifndef YY_mootNgramsLexer_WRAP
269 #define YY_mootNgramsLexer_WRAP yy_wrap
270 #endif
271 #ifdef YY_mootNgramsLexer_WRAP_PURE
272 #define YY_mootNgramsLexer_WRAP_NOCODE
273 #endif
274 #ifndef YY_mootNgramsLexer_WRAP_CODE
275 #define YY_mootNgramsLexer_WRAP_CODE return 1;
276 #endif
277 
278 
279 #ifndef YY_mootNgramsLexer_INHERIT
280 #define YY_mootNgramsLexer_INHERIT
281 #endif
282 #ifndef YY_mootNgramsLexer_MEMBERS
283 #define YY_mootNgramsLexer_MEMBERS
284 #endif
285 #ifndef YY_mootNgramsLexer_CONSTRUCTOR_PARAM
286 #define YY_mootNgramsLexer_CONSTRUCTOR_PARAM
287 #endif
288 #ifndef YY_mootNgramsLexer_CONSTRUCTOR_CODE
289 #define YY_mootNgramsLexer_CONSTRUCTOR_CODE
290 #endif
291 #ifndef YY_mootNgramsLexer_CONSTRUCTOR_INIT
292 #define YY_mootNgramsLexer_CONSTRUCTOR_INIT
293 #endif
294 typedef struct yy_buffer_state *YY_BUFFER_STATE;
295 
296 class YY_mootNgramsLexer_CLASS YY_mootNgramsLexer_INHERIT
297 {
298  private:/* data */
299  YY_mootNgramsLexer_CHAR *yy_c_buf_p;
300  YY_mootNgramsLexer_CHAR yy_hold_char;
301  int yy_n_chars;
302  int yy_init;
303  int yy_start;
304  int yy_did_buffer_switch_on_eof;
305  private: /* functions */
306  void yy_initialize();
307  int input();
308  int yyinput() {return input();};
309  int yy_get_next_buffer();
310  void yyunput( YY_mootNgramsLexer_CHAR c, YY_mootNgramsLexer_CHAR *buf_ptr );
311  /* use long instead of yy_state_type because it is undef */
312  long yy_get_previous_state_ ( void );
313  long yy_try_NUL_trans_ ( long current_state_ );
314  protected:/* non virtual */
315  YY_BUFFER_STATE yy_current_buffer;
316  void YY_mootNgramsLexer_RESTART ( FILE *input_file );
317  void YY_mootNgramsLexer_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer );
318  void YY_mootNgramsLexer_LOAD_BUFFER_STATE( void );
319  YY_BUFFER_STATE YY_mootNgramsLexer_CREATE_BUFFER( FILE *file, int size );
320  void YY_mootNgramsLexer_DELETE_BUFFER( YY_BUFFER_STATE b );
321  void YY_mootNgramsLexer_INIT_BUFFER( YY_BUFFER_STATE b, FILE *file );
322  protected: /* virtual */
323  virtual void YY_mootNgramsLexer_ECHO()
324 #ifdef YY_mootNgramsLexer_ECHO_PURE
325  =0
326 #endif
327  ;
328  virtual int YY_mootNgramsLexer_INPUT(char *buf,int &result,int max_size)
329 #ifdef YY_mootNgramsLexer_INPUT_PURE
330  =0
331 #endif
332  ;
333  virtual void YY_mootNgramsLexer_FATAL_ERROR(const char *msg)
334 #ifdef YY_mootNgramsLexer_FATAL_ERROR_PURE
335  =0
336 #endif
337  ;
338  virtual int YY_mootNgramsLexer_WRAP()
339 #ifdef YY_mootNgramsLexer_WRAP_PURE
340  =0
341 #endif
342  ;
343  public:
344  YY_mootNgramsLexer_CHAR *YY_mootNgramsLexer_TEXT;
345  int YY_mootNgramsLexer_LENG;
346  FILE *YY_mootNgramsLexer_IN, *YY_mootNgramsLexer_OUT;
347  YY_mootNgramsLexer_LEX_RETURN YY_mootNgramsLexer_LEX ( YY_mootNgramsLexer_LEX_PARAM);
348  YY_mootNgramsLexer_CLASS(YY_mootNgramsLexer_CONSTRUCTOR_PARAM) ;
349 #if YY_mootNgramsLexer_DEBUG != 0
350  int YY_mootNgramsLexer_DEBUG_FLAG;
351 #endif
352  public: /* added members */
353  YY_mootNgramsLexer_MEMBERS
354 };
355 #endif
356 
357 
358 
359 /* declaration of externs for public use of yylex scanner */
360 
361 /* % here is the declaration from section2 %header{ */
362 #line 151 "mootNgramsLexer.ll"
363 #endif
364 #line 302 "./flexskel.h"
365 
366 /* end of generated header */
Definition: mootAssocVector.h:39
struct yy_buffer_state * YY_BUFFER_STATE
Definition: mootNgramsLexer.h:49
common utilities for flex++ lexers
struct yy_buffer_state * YY_BUFFER_STATE
Definition: mootClassfreqsLexer.h:49
bison++ n-gram frequency parameter file parser: autogenerated header