aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/flexskel.h
blob: 69d0eeeb4d7fddac599849f11f5b54577dff7d80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
/*  This file is part of mhmake.
 *
 *  Copyright (C) 2001-2010 marha@sourceforge.net
 *
 *  Mhmake is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Mhmake is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Mhmake.  If not, see <http://www.gnu.org/licenses/>.
*/

/* $Rev$ */

/* 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 <stdio.h>




%% here is the declaration from section1 %header{

#ifdef YY_USE_CLASS
#ifdef YY_@_IOSTREAM
#include <iostream.h>
#define YY_@_IFILE  istream
#define YY_@_OFILE ostream
#define YY_@_ERRFILE cerr

#ifndef YY_@_IFILE_DEFAULT
#define YY_@_IFILE_DEFAULT &cin
#endif

#ifndef YY_@_OFILE_DEFAULT
#define YY_@_OFILE_DEFAULT &cout
#endif

#endif
#endif

#ifndef YY_@_IFILE
#define YY_@_IFILE FILE
#endif

#ifndef YY_@_OFILE
#define YY_@_OFILE FILE
#endif

#ifndef YY_@_ERRFILE
#define YY_@_ERRFILE stderr
#endif

#ifndef YY_@_IFILE_DEFAULT
#define YY_@_IFILE_DEFAULT stdin
#endif

#ifndef YY_@_OFILE_DEFAULT
#define YY_@_OFILE_DEFAULT stdout
#endif




#ifndef YY_@_TEXT
#define YY_@_TEXT yytext
#endif
#ifndef YY_@_LENG
#define YY_@_LENG yyleng
#endif
#ifndef YY_@_IN
#define YY_@_IN yyin
#endif
#ifndef YY_@_OUT
#define YY_@_OUT yyout
#endif

#ifndef YY_@_LEX_RETURN
#define YY_@_LEX_RETURN int
#else
#ifndef YY_@_LEX_DEFINED
#define YY_@_LEX_DEFINED
#endif
#endif

#ifndef YY_@_LEX
#define YY_@_LEX yylex
#else
#ifndef YY_@_LEX_DEFINED
#define YY_@_LEX_DEFINED
#endif
#endif

#ifndef YY_@_LEX_PARAM
#ifndef YY_USE_PROTOS
#define YY_@_LEX_PARAM
#else
#define YY_@_LEX_PARAM void
#endif
#else
#ifndef YY_@_LEX_DEFINED
#define YY_@_LEX_DEFINED
#endif
#endif

#ifndef YY_@_LEX_PARAM_DEF
#define YY_@_LEX_PARAM_DEF
#else
#ifndef YY_@_LEX_DEFINED
#define YY_@_LEX_DEFINED
#endif
#endif

#ifndef YY_@_RESTART
#define YY_@_RESTART yyrestart
#endif
#ifndef YY_@_SWITCH_TO_BUFFER
#define YY_@_SWITCH_TO_BUFFER yy_switch_to_buffer
#endif
#ifndef YY_@_LOAD_BUFFER_STATE
#define YY_@_LOAD_BUFFER_STATE yy_load_buffer_state
#endif

#ifndef YY_@_CREATE_BUFFER
#define YY_@_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_@_DELETE_BUFFER
#define YY_@_DELETE_BUFFER yy_delete_buffer
#endif
#ifndef YY_@_INIT_BUFFER
#define YY_@_INIT_BUFFER yy_init_buffer
#endif



#ifdef YY_@_FLEX_DEBUG
#ifndef YY_@_DEBUG
#define YY_@_DEBUG 1
#endif
#else
#ifndef YY_@_DEBUG
#define YY_@_DEBUG 0
#endif
#endif

#if YY_@_DEBUG != 0
#ifndef YY_@_DEBUG_FLAG
#define YY_@_DEBUG_FLAG yy_flex_debug
#endif
#ifndef YY_@_DEBUG_INIT
#define YY_@_DEBUG_INIT 1
#endif
#endif




#ifndef YY_USE_CLASS
#ifndef YY_@_CURRENT_BUFFER
#define YY_@_CURRENT_BUFFER yy_current_buffer
#endif
typedef struct yy_buffer_state *YY_BUFFER_STATE;

extern void YY_@_RESTART YY_PROTO(( YY_@_IFILE *input_file ));
extern void YY_@_SWITCH_TO_BUFFER YY_PROTO(( YY_BUFFER_STATE new_buffer ));
extern void YY_@_LOAD_BUFFER_STATE YY_PROTO(( void ));
extern YY_BUFFER_STATE YY_@_CREATE_BUFFER YY_PROTO(( YY_@_IFILE *file, int size ));
extern void YY_@_DELETE_BUFFER YY_PROTO(( YY_BUFFER_STATE b ));
extern void YY_@_INIT_BUFFER YY_PROTO(( YY_BUFFER_STATE b, YY_@_IFILE *file ));

#if YY_@_DEBUG != 0
extern int YY_@_DEBUG_FLAG ;
#endif
extern YY_@_CHAR  *YY_@_TEXT;
extern int YY_@_LENG;
extern YY_@_IFILE *YY_@_IN;
extern YY_@_OFILE *YY_@_OUT;
#ifdef YY_@_LEX_DEFINED
extern YY_@_LEX_RETURN YY_@_LEX ( YY_@_LEX_PARAM )
YY_@_LEX_PARAM_DEF
#else
#ifndef YY_DECL
extern YY_@_LEX_RETURN YY_@_LEX ( YY_@_LEX_PARAM )
YY_@_LEX_PARAM_DEF
#else
/* no declaration if oldstyle flex */
#endif
#endif
#else

#ifndef YY_@_CURRENT_BUFFER
#define YY_@_CURRENT_BUFFER YY_CURRENT_BUFFER
#endif
#ifndef YY_@_CLASS
#define YY_@_CLASS @
#endif
#ifndef YY_@_ECHO
#define YY_@_ECHO yy_echo
#endif
#ifdef YY_@_ECHO_PURE
#define YY_@_ECHO_NOCODE
#endif

#ifndef YY_@_ECHO_CODE
#ifndef YY_@_IOSTREAM
#define YY_@_ECHO_CODE fwrite( (char *) YY_@_TEXT, YY_@_LENG, 1, YY_@_OUT );
#else
#define YY_@_ECHO_CODE (YY_@_OUT->write( (char *) YY_@_TEXT, YY_@_LENG));
#endif
#endif

#ifndef YY_@_INPUT
#define YY_@_INPUT yy_input
#endif
#ifdef YY_@_INPUT_PURE
#define YY_@_INPUT_NOCODE
#endif

#ifndef YY_@_INPUT_CODE
#ifndef YY_@_IOSTREAM
#define YY_@_INPUT_CODE return result= ::fread(  buffer, 1,max_size,YY_@_IN );
#else
#define YY_@_INPUT_CODE if(YY_@_IN->eof())  result=0;else {YY_@_IN->read(buffer,max_size);result=YY_@_IN->gcount();YY_@_IN->clear(YY_@_IN->rdstate()&(~ios::failbit));if(YY_@_IN->bad()) result= -1;} return result;
#endif
#endif

#ifdef YY_@_FATAL_ERROR_PURE
#define YY_@_FATAL_ERRO_NOCODE
#endif
#ifndef YY_@_FATAL_ERROR
#define YY_@_FATAL_ERROR yy_fatal_error
#endif

#ifndef YY_@_FATAL_ERROR_CODE
#ifndef YY_@_IOSTREAM
#define YY_@_FATAL_ERROR_CODE fputs( msg, YY_@_ERRFILE );putc( '\n', YY_@_ERRFILE );exit( 1 );
#else
#define YY_@_FATAL_ERROR_CODE YY_@_ERRFILE<< msg <<endl;exit( 1 );
#endif
#endif

#ifndef YY_@_WRAP
#define YY_@_WRAP yy_wrap
#endif
#ifdef YY_@_WRAP_PURE
#define YY_@_WRAP_NOCODE
#endif
#ifndef YY_@_WRAP_CODE
#define YY_@_WRAP_CODE return 1;
#endif


#ifndef YY_@_INHERIT
#define YY_@_INHERIT
#endif
#ifndef YY_@_MEMBERS
#define YY_@_MEMBERS
#endif
#ifndef YY_@_CONSTRUCTOR_PARAM
#define YY_@_CONSTRUCTOR_PARAM
#endif
#ifndef YY_@_CONSTRUCTOR_CODE
#define YY_@_CONSTRUCTOR_CODE
#endif
#ifndef YY_@_CONSTRUCTOR_INIT
#define YY_@_CONSTRUCTOR_INIT
#endif
#ifndef YY_@_DESTRUCTOR_CODE
#define YY_@_DESTRUCTOR_CODE
#endif
typedef struct yy_buffer_state *YY_BUFFER_STATE;

class YY_@_CLASS YY_@_INHERIT
{
private:/* data */
  YY_@_CHAR  *yy_c_buf_p;
  YY_@_CHAR  yy_hold_char;
  size_t 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_@_CHAR  c, YY_@_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_@_RESTART ( YY_@_IFILE *input_file );
  void YY_@_SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer );
  void YY_@_LOAD_BUFFER_STATE( void );
  YY_BUFFER_STATE YY_@_CREATE_BUFFER( YY_@_IFILE *file, int size );
  void YY_@_DELETE_BUFFER( YY_BUFFER_STATE b );
  void YY_@_INIT_BUFFER( YY_BUFFER_STATE b, YY_@_IFILE *file );
  protected: /* virtual */
  virtual void YY_@_ECHO()
#ifdef YY_@_ECHO_PURE
  =0
#endif
  ;
  virtual size_t  YY_@_INPUT(char  *buf,size_t &result,size_t max_size)
#ifdef YY_@_INPUT_PURE
   =0
#endif
  ;
  virtual void  YY_@_FATAL_ERROR(const char *msg)
#ifdef YY_@_FATAL_ERROR_PURE
  =0
#endif
  ;
  virtual int  YY_@_WRAP()
#ifdef YY_@_WRAP_PURE
  =0
#endif
  ;
public:
  YY_@_CHAR  *YY_@_TEXT;
  size_t YY_@_LENG;
  YY_@_IFILE *YY_@_IN;
  YY_@_OFILE *YY_@_OUT;
  YY_@_LEX_RETURN YY_@_LEX ( YY_@_LEX_PARAM);
  YY_@_CLASS(YY_@_CONSTRUCTOR_PARAM) ;
  virtual ~YY_@_CLASS() ;
#if YY_@_DEBUG != 0
  int YY_@_DEBUG_FLAG;
#endif
public: /* added members */
  YY_@_MEMBERS
};
#endif

/* declaration of externs for public use of yylex scanner */

%% here is the declaration from section2 %header{

/* end of generated header */