0022972: Eliminate macro definitions that has compiler-provided analogs (WNT and...
[occt.git] / src / StepFile / lex.step.c
1 #define yy_create_buffer step_create_buffer
2 #define yy_delete_buffer step_delete_buffer
3 #define yy_scan_buffer step_scan_buffer
4 #define yy_scan_string step_scan_string
5 #define yy_scan_bytes step_scan_bytes
6 #define yy_flex_debug step_flex_debug
7 #define yy_init_buffer step_init_buffer
8 #define yy_flush_buffer step_flush_buffer
9 #define yy_load_buffer_state step_load_buffer_state
10 #define yy_switch_to_buffer step_switch_to_buffer
11 #define yyin stepin
12 #define yyleng stepleng
13 #define yylex steplex
14 #define yyout stepout
15 #define yyrestart steprestart
16 #define yytext steptext
17 #define yywrap stepwrap
18
19 /* A lexical scanner generated by flex */
20
21 /* Scanner skeleton version:
22  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.89 96/05/25 21:02:21 vern Exp $
23  */
24
25 #define FLEX_SCANNER
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
28
29 #include <stdio.h>
30
31 #ifdef _MSC_VER
32 # include <stdlib.h>
33 # include <io.h>
34 #endif  /* _MSC_VER */
35
36
37
38 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
39 #ifdef c_plusplus
40 #ifndef __cplusplus
41 #define __cplusplus
42 #endif
43 #endif
44
45
46 #ifdef __cplusplus
47
48 #include <stdlib.h>
49 #include <unistd.h>
50
51 /* Use prototypes in function declarations. */
52 #define YY_USE_PROTOS
53
54 /* The "const" storage-class-modifier is valid. */
55 #define YY_USE_CONST
56
57 #else   /* ! __cplusplus */
58
59 #if __STDC__
60
61 #define YY_USE_PROTOS
62 #define YY_USE_CONST
63
64 #endif  /* __STDC__ */
65 #endif  /* ! __cplusplus */
66
67 #ifdef __TURBOC__
68  #pragma warn -rch
69  #pragma warn -use
70 #include <io.h>
71 #include <stdlib.h>
72 #define YY_USE_CONST
73 #define YY_USE_PROTOS
74 #endif
75
76 #ifdef YY_USE_CONST
77 #define yyconst const
78 #else
79 #define yyconst
80 #endif
81
82
83 #ifdef YY_USE_PROTOS
84 #define YY_PROTO(proto) proto
85 #else
86 #define YY_PROTO(proto) ()
87 #endif
88
89 /* Returned upon end-of-file. */
90 #define YY_NULL 0
91
92 /* Promotes a possibly negative, possibly signed char to an unsigned
93  * integer for use as an array index.  If the signed char is negative,
94  * we want to instead treat it as an 8-bit unsigned char, hence the
95  * double cast.
96  */
97 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
98
99 /* Enter a start condition.  This macro really ought to take a parameter,
100  * but we do it the disgusting crufty way forced on us by the ()-less
101  * definition of BEGIN.
102  */
103 #define BEGIN yy_start = 1 + 2 *
104
105 /* Translate the current start state into a value that can be later handed
106  * to BEGIN to return to the state.  The YYSTATE alias is for lex
107  * compatibility.
108  */
109 #define YY_START ((yy_start - 1) / 2)
110 #define YYSTATE YY_START
111
112 /* Action number for EOF rule of a given start state. */
113 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
114
115 /* Special action meaning "start processing a new file". */
116 #define YY_NEW_FILE yyrestart( yyin )
117
118 #define YY_END_OF_BUFFER_CHAR 0
119
120 /* Size of default input buffer. */
121 #define YY_BUF_SIZE 16384
122
123 typedef struct yy_buffer_state *YY_BUFFER_STATE;
124
125 extern int yyleng;
126 extern FILE *yyin, *yyout;
127
128 #define EOB_ACT_CONTINUE_SCAN 0
129 #define EOB_ACT_END_OF_FILE 1
130 #define EOB_ACT_LAST_MATCH 2
131
132 /* The funky do-while in the following #define is used to turn the definition
133  * int a single C statement (which needs a semi-colon terminator).  This
134  * avoids problems with code like:
135  *
136  *      if ( condition_holds )
137  *              yyless( 5 );
138  *      else
139  *              do_something_else();
140  *
141  * Prior to using the do-while the compiler would get upset at the
142  * "else" because it interpreted the "if" statement as being all
143  * done when it reached the ';' after the yyless() call.
144  */
145
146 /* Return all but the first 'n' matched characters back to the input stream. */
147
148 #define yyless(n) \
149         do \
150                 { \
151                 /* Undo effects of setting up yytext. */ \
152                 *yy_cp = yy_hold_char; \
153                 YY_RESTORE_YY_MORE_OFFSET \
154                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
155                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
156                 } \
157         while ( 0 )
158
159 #define unput(c) yyunput( c, yytext_ptr )
160
161 /* The following is because we cannot portably get our hands on size_t
162  * (without autoconf's help, which isn't available because we want
163  * flex-generated scanners to compile on their own).
164  */
165 typedef unsigned int yy_size_t;
166
167
168 struct yy_buffer_state
169         {
170         FILE *yy_input_file;
171
172         char *yy_ch_buf;                /* input buffer */
173         char *yy_buf_pos;               /* current position in input buffer */
174
175         /* Size of input buffer in bytes, not including room for EOB
176          * characters.
177          */
178         yy_size_t yy_buf_size;
179
180         /* Number of characters read into yy_ch_buf, not including EOB
181          * characters.
182          */
183         int yy_n_chars;
184
185         /* Whether we "own" the buffer - i.e., we know we created it,
186          * and can realloc() it to grow it, and should free() it to
187          * delete it.
188          */
189         int yy_is_our_buffer;
190
191         /* Whether this is an "interactive" input source; if so, and
192          * if we're using stdio for input, then we want to use getc()
193          * instead of fread(), to make sure we stop fetching input after
194          * each newline.
195          */
196         int yy_is_interactive;
197
198         /* Whether we're considered to be at the beginning of a line.
199          * If so, '^' rules will be active on the next match, otherwise
200          * not.
201          */
202         int yy_at_bol;
203
204         /* Whether to try to fill the input buffer when we reach the
205          * end of it.
206          */
207         int yy_fill_buffer;
208
209         int yy_buffer_status;
210 #define YY_BUFFER_NEW 0
211 #define YY_BUFFER_NORMAL 1
212         /* When an EOF's been seen but there's still some text to process
213          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
214          * shouldn't try reading from the input source any more.  We might
215          * still have a bunch of tokens to match, though, because of
216          * possible backing-up.
217          *
218          * When we actually see the EOF, we change the status to "new"
219          * (via yyrestart()), so that the user can continue scanning by
220          * just pointing yyin at a new input file.
221          */
222 #define YY_BUFFER_EOF_PENDING 2
223         };
224
225 static YY_BUFFER_STATE yy_current_buffer = 0;
226
227 /* We provide macros for accessing buffer states in case in the
228  * future we want to put the buffer states in a more general
229  * "scanner state".
230  */
231 #define YY_CURRENT_BUFFER yy_current_buffer
232
233
234 /* yy_hold_char holds the character lost when yytext is formed. */
235 static char yy_hold_char;
236
237 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
238
239
240 int yyleng;
241
242 /* Points to current character in buffer. */
243 static char *yy_c_buf_p = (char *) 0;
244 static int yy_init = 1;         /* whether we need to initialize */
245 static int yy_start = 0;        /* start state number */
246
247 /* Flag which is used to allow yywrap()'s to do buffer switches
248  * instead of setting up a fresh yyin.  A bit of a hack ...
249  */
250 static int yy_did_buffer_switch_on_eof;
251
252 void yyrestart YY_PROTO(( FILE *input_file ));
253
254 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
255 void yy_load_buffer_state YY_PROTO(( void ));
256 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
257 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
258 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
259 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
260 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
261
262 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
263 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
264 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
265
266 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
267 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
268 static void yy_flex_free YY_PROTO(( void * ));
269
270 #define yy_new_buffer yy_create_buffer
271
272 #define yy_set_interactive(is_interactive) \
273         { \
274         if ( ! yy_current_buffer ) \
275                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
276         yy_current_buffer->yy_is_interactive = is_interactive; \
277         }
278
279 #define yy_set_bol(at_bol) \
280         { \
281         if ( ! yy_current_buffer ) \
282                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
283         yy_current_buffer->yy_at_bol = at_bol; \
284         }
285
286 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
287
288
289 #define YY_USES_REJECT
290 typedef unsigned char YY_CHAR;
291 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
292 typedef int yy_state_type;
293 extern char *yytext;
294 #define yytext_ptr yytext
295
296 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
297 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
298 static int yy_get_next_buffer YY_PROTO(( void ));
299 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
300
301 /* Done after the current pattern has been matched and before the
302  * corresponding action - sets up yytext.
303  */
304 #define YY_DO_BEFORE_ACTION \
305         yytext_ptr = yy_bp; \
306         yyleng = (int) (yy_cp - yy_bp); \
307         yy_hold_char = *yy_cp; \
308         *yy_cp = '\0'; \
309         yy_c_buf_p = yy_cp;
310
311 #define YY_NUM_RULES 37
312 #define YY_END_OF_BUFFER 38
313 static yyconst short int yy_acclist[146] =
314     {   0,
315        38,   36,   37,    1,   36,   37,    3,   36,   37,    4,
316        36,   37,    2,   36,   37,   36,   37,   36,   37,   36,
317        37,   18,   36,   37,   36,   37,   36,   37,   15,   36,
318        37,   16,   37,   36,   37,    9,   36,   37,   17,   36,
319        37,   36,   37,   31,   36,   37,    9,   34,   36,   37,
320        20,   36,   37,   19,   36,   37,   34,   36,   37,   34,
321        36,   37,   34,   36,   37,   34,   36,   37,   34,   36,
322        37,   34,   36,   37,    5,   36,   37,   35,    8,16391,
323        12,   22,   10,    9,   10,   10,   21,    9,   10,   34,
324        34,   34,   34,   34,   34,   34,    5,   13,    6, 8199,
325
326        10,   14,   14,   34,   34,   34,   34,   34,   34, 8199,
327        11,   11,   11,   34,   34,   34,   34,   34,   30,   34,
328        11,   11,   11,   34,   26,   34,   34,   34,   34,   23,
329        32,   34,   34,   34,   34,   34,   25,   34,   24,   29,
330        33,   34,   27,   28,   28
331     } ;
332
333 static yyconst short int yy_accept[109] =
334     {   0,
335         1,    1,    1,    2,    4,    7,   10,   13,   16,   18,
336        20,   22,   25,   27,   29,   32,   34,   36,   39,   42,
337        44,   47,   51,   54,   57,   60,   63,   66,   69,   72,
338        75,   78,   79,   79,   81,   81,   81,   81,   82,   83,
339        84,   86,   87,   87,   88,   91,   92,   93,   94,   95,
340        96,   97,   98,   99,   99,  101,  101,  101,  103,  103,
341       104,  105,  106,  107,  108,  109,  110,  111,  111,  112,
342       113,  115,  116,  116,  117,  118,  118,  119,  120,  121,
343       121,  122,  123,  125,  126,  126,  127,  128,  129,  130,
344       131,  132,  132,  133,  134,  135,  136,  136,  137,  138,
345
346       139,  140,  140,  141,  143,  145,  146,  146
347     } ;
348
349 static yyconst int yy_ec[256] =
350     {   0,
351         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
352         4,    4,    5,    4,    4,    4,    4,    4,    4,    4,
353         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
354         4,    6,    7,    8,    9,   10,    4,   11,   12,   13,
355        14,   15,   16,   17,   18,   19,   20,   21,   21,   21,
356        21,   21,   21,   21,   21,   21,   21,    4,   22,    4,
357        23,    4,    4,    4,   24,   25,   26,   27,   28,   25,
358        29,   30,   31,   29,   29,   29,   29,   32,   33,   34,
359        29,   35,   36,   37,   29,   29,   29,   29,   29,   29,
360         4,    4,    4,    4,   29,    4,   38,   38,   38,   38,
361
362        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
363        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
364        38,   38,    4,    4,    4,    4,    1,    1,    4,    4,
365         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
366         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
367         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
368         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
369         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
370         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
371         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
372
373         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
374         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
375         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
376         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
377         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
378         4,    4,    4,    4,    4
379     } ;
380
381 static yyconst int yy_meta[40] =
382     {   0,
383         1,    2,    3,    2,    2,    2,    2,    2,    2,    2,
384         2,    2,    2,    2,    2,    2,    2,    2,    4,    2,
385         5,    2,    2,    5,    5,    5,    5,    5,    6,    6,
386         6,    6,    6,    6,    6,    6,    6,    7,    2
387     } ;
388
389 static yyconst short int yy_base[114] =
390     {   0,
391         0,    0,  209,  210,  210,  210,  210,  210,    0,    0,
392       187,  210,  171,   37,  210,  210,  186,   22,  210,   23,
393       190,   26,  210,  210,  185,   27,   29,   31,   33,   34,
394       164,    0,  194,   52,  175,   52,   53,  188,  210,   49,
395        53,   57,  180,  210,   61,  179,   47,   60,   38,   64,
396        67,  158,  210,   86,  210,  163,   75,   79,   83,  210,
397        87,   91,   93,   94,   98,   99,  210,  161,  173,  103,
398       104,   41,  158,  108,  107,  110,    0,  210,  118,  139,
399       144,  120,  123,  210,  125,  119,  124,  127,   95,  210,
400       210,   61,  128,  129,  130,  134,  136,  140,  210,  141,
401
402       210,  148,  210,   71,    0,    0,  210,  166,   62,  172,
403       176,  179,  186
404     } ;
405
406 static yyconst short int yy_def[114] =
407     {   0,
408       107,    1,  107,  107,  107,  107,  107,  107,  108,  109,
409       107,  107,  107,  110,  107,  107,  107,  107,  107,  111,
410       107,  112,  107,  107,  112,  112,  112,  112,  112,  112,
411       107,  108,  109,  107,  107,  110,  110,  107,  107,  107,
412       107,  111,  111,  107,  112,  112,  112,  112,  112,  112,
413       112,  107,  107,  107,  107,  107,  107,  107,  111,  107,
414       112,  112,  112,  112,  112,  112,  107,  107,  107,  111,
415       112,  112,  107,  112,  112,  107,   65,  107,  112,  107,
416       107,  111,  112,  107,  107,  112,  112,  112,  112,  107,
417       107,  107,  112,  112,  112,  112,  107,  112,  107,  112,
418
419       107,  107,  107,  112,  113,  113,    0,  107,  107,  107,
420       107,  107,  107
421     } ;
422
423 static yyconst short int yy_nxt[250] =
424     {   0,
425         4,    5,    6,    4,    7,    8,    9,   10,   11,   12,
426        13,   14,   15,   16,   17,   18,   19,   18,   20,   21,
427        22,   23,   24,   25,   25,   25,   26,   27,   25,   28,
428        29,   25,   25,   25,   25,   30,   25,   25,   31,   37,
429        40,   40,   41,   42,   40,  107,   45,  107,   38,  107,
430        47,  107,  107,   54,   37,   37,  107,   54,   49,  107,
431        48,   64,   84,   38,   38,  107,   33,   40,   50,   40,
432        51,   40,   34,   41,   55,   58,   57,   42,  107,   40,
433        57,   45,  107,   62,   59,  107,   63,   54,   61,  107,
434        69,   54,   69,   97,   66,   69,   65,   40,   69,   40,
435
436        69,   60,   69,   70,   69,  107,   57,   71,   67,  107,
437        73,  107,  107,  107,   72,   76,  107,  107,   77,   78,
438        75,   60,  107,   82,   83,  107,  107,   76,   74,   96,
439        76,   78,   79,   86,   89,   87,  107,  107,   60,   90,
440        82,  107,  107,   83,   88,  107,  107,  107,  107,   94,
441        99,   93,  107,  102,   95,  101,  102,  103,  107,  107,
442        92,   98,  105,  100,   81,  102,   91,  104,  102,  103,
443        32,   32,   32,   36,   36,   36,   36,   36,   36,   43,
444        43,   43,   46,   46,   46,   46,  106,  106,   85,  106,
445       106,  106,  106,   81,   80,   68,   52,  107,   60,   36,
446
447        56,   53,   52,  107,   44,   39,   35,   34,  107,    3,
448       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
449       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
450       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
451       107,  107,  107,  107,  107,  107,  107,  107,  107
452     } ;
453
454 static yyconst short int yy_chk[250] =
455     {   0,
456         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
457         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
458         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
459         1,    1,    1,    1,    1,    1,    1,    1,    1,   14,
460        18,   20,   18,   20,   22,   26,   22,   27,   14,   28,
461        26,   29,   30,   34,   36,   37,   49,   34,   28,   72,
462        27,   49,   72,   36,   37,   47,  109,   40,   29,   40,
463        30,   41,   34,   41,   34,   42,   40,   42,   48,   45,
464        41,   45,   50,   47,   42,   51,   48,   54,   45,  104,
465        57,   54,   57,   92,   51,   57,   50,   58,   59,   58,
466
467        59,   59,   61,   59,   61,   61,   58,   61,   54,   62,
468        63,   63,   64,   89,   62,   65,   65,   66,   65,   65,
469        64,   70,   71,   70,   71,   75,   74,   76,   63,   89,
470        76,   76,   66,   74,   75,   74,   79,   86,   82,   79,
471        82,   83,   87,   83,   74,   88,   93,   94,   95,   87,
472        94,   86,   96,   97,   88,   96,   97,   97,   98,  100,
473        85,   93,  100,   95,   81,  102,   80,   98,  102,  102,
474       108,  108,  108,  110,  110,  110,  110,  110,  110,  111,
475       111,  111,  112,  112,  112,  112,  113,  113,   73,  113,
476       113,  113,  113,   69,   68,   56,   52,   46,   43,   38,
477
478        35,   33,   31,   25,   21,   17,   13,   11,    3,  107,
479       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
480       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
481       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
482       107,  107,  107,  107,  107,  107,  107,  107,  107
483     } ;
484
485 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
486 static char *yy_full_match;
487 static int yy_lp;
488 static int yy_looking_for_trail_begin = 0;
489 static int yy_full_lp;
490 static int *yy_full_state;
491 #define YY_TRAILING_MASK 0x2000
492 #define YY_TRAILING_HEAD_MASK 0x4000
493 #define REJECT \
494 { \
495 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
496 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
497 yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
498 yy_state_ptr = yy_full_state; /* restore orig. state */ \
499 yy_current_state = *yy_state_ptr; /* restore curr. state */ \
500 ++yy_lp; \
501 goto find_rule; \
502 }
503 #define yymore() yymore_used_but_not_detected
504 #define YY_MORE_ADJ 0
505 #define YY_RESTORE_YY_MORE_OFFSET
506 char *yytext;
507 #define INITIAL 0
508 /* 
509  Copyright (c) 1999-2014 OPEN CASCADE SAS
510
511  This file is part of Open CASCADE Technology software library.
512
513  This library is free software; you can redistribute it and/or modify it under
514  the terms of the GNU Lesser General Public License version 2.1 as published
515  by the Free Software Foundation, with special exception defined in the file
516  OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
517  distribution for complete text of the license and disclaimer of any warranty.
518
519  Alternatively, this file may be used under the terms of Open CASCADE
520  commercial license or contractual agreement.
521 */ 
522 #include "step.tab.h"
523 #include "recfile.ph"
524 #include "stdio.h"
525 #include <StepFile_CallFailure.hxx>
526
527 /* skl 31.01.2002 for OCC133(OCC96,97) - uncorrect
528 long string in files Henri.stp and 401.stp*/
529 #define YY_FATAL_ERROR(msg) StepFile_CallFailure( msg )
530
531 /* abv 07.06.02: force inclusion of stdlib.h on WNT to avoid warnings */
532 #include <stdlib.h>
533
534 /*
535 void steperror ( FILE *input_file );
536 void steprestart ( FILE *input_file );
537 */
538 void rec_restext(char *newtext, int lentext);
539 void rec_typarg(int argtype);
540  
541   int  steplineno;      /* Comptage de ligne (ben oui, fait tout faire)  */
542
543   int  modcom = 0;      /* Commentaires type C */
544   int  modend = 0;      /* Flag for finishing of the STEP file */
545   void resultat ()           /* Resultat alloue dynamiquement, "jete" une fois lu */
546       { if (modcom == 0) rec_restext(yytext,yyleng); }
547
548 // MSVC specifics
549 #ifdef _MSC_VER
550
551 // disable MSVC warnings in flex code
552 // Note that Intel compiler also defines _MSC_VER but has different warning ids
553 #if defined(__INTEL_COMPILER)
554 #pragma warning(disable:177 1786 1736)
555 #else
556 #pragma warning(disable:4131 4244 4273 4267 4127)
557 #endif
558
559 // Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
560 #define YY_NO_UNISTD_H
561
562 #endif
563
564 // disable GCC warnings in flex code
565 #ifdef __GNUC__
566 #pragma GCC diagnostic ignored "-Wunused-function"
567 #endif
568
569
570 /* Macros after this point can all be overridden by user definitions in
571  * section 1.
572  */
573
574 #ifndef YY_SKIP_YYWRAP
575 #ifdef __cplusplus
576 extern "C" int yywrap YY_PROTO(( void ));
577 #else
578 extern int yywrap YY_PROTO(( void ));
579 #endif
580 #endif
581
582 #ifndef YY_NO_UNPUT
583 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
584 #endif
585
586 #ifndef yytext_ptr
587 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
588 #endif
589
590 #ifdef YY_NEED_STRLEN
591 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
592 #endif
593
594 #ifndef YY_NO_INPUT
595 #ifdef __cplusplus
596 static int yyinput YY_PROTO(( void ));
597 #else
598 static int input YY_PROTO(( void ));
599 #endif
600 #endif
601
602 #if YY_STACK_USED
603 static int yy_start_stack_ptr = 0;
604 static int yy_start_stack_depth = 0;
605 static int *yy_start_stack = 0;
606 #ifndef YY_NO_PUSH_STATE
607 static void yy_push_state YY_PROTO(( int new_state ));
608 #endif
609 #ifndef YY_NO_POP_STATE
610 static void yy_pop_state YY_PROTO(( void ));
611 #endif
612 #ifndef YY_NO_TOP_STATE
613 static int yy_top_state YY_PROTO(( void ));
614 #endif
615
616 #else
617 #define YY_NO_PUSH_STATE 1
618 #define YY_NO_POP_STATE 1
619 #define YY_NO_TOP_STATE 1
620 #endif
621
622 #ifdef YY_MALLOC_DECL
623 YY_MALLOC_DECL
624 #else
625 #if __STDC__
626 #ifndef __cplusplus
627 #include <stdlib.h>
628 #endif
629 #else
630 /* Just try to get by without declaring the routines.  This will fail
631  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
632  * or sizeof(void*) != sizeof(int).
633  */
634 #endif
635 #endif
636
637 /* Amount of stuff to slurp up with each read. */
638 #ifndef YY_READ_BUF_SIZE
639 #define YY_READ_BUF_SIZE 8192
640 #endif
641
642 /* Copy whatever the last rule matched to the standard output. */
643
644 #ifndef ECHO
645 /* This used to be an fputs(), but since the string might contain NUL's,
646  * we now use fwrite().
647  */
648 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
649 #endif
650
651 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
652  * is returned in "result".
653  */
654 #ifndef YY_INPUT
655 #define YY_INPUT(buf,result,max_size) \
656         if ( yy_current_buffer->yy_is_interactive ) \
657                 { \
658                 int c = '*', n; \
659                 for ( n = 0; n < max_size && \
660                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
661                         buf[n] = (char) c; \
662                 if ( c == '\n' ) \
663                         buf[n++] = (char) c; \
664                 if ( c == EOF && ferror( yyin ) ) \
665                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
666                 result = n; \
667                 } \
668         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
669                   && ferror( yyin ) ) \
670                 YY_FATAL_ERROR( "input in flex scanner failed" );
671 #endif
672
673 /* No semi-colon after return; correct usage is to write "yyterminate();" -
674  * we don't want an extra ';' after the "return" because that will cause
675  * some compilers to complain about unreachable statements.
676  */
677 #ifndef yyterminate
678 #define yyterminate() return YY_NULL
679 #endif
680
681 /* Number of entries by which start-condition stack grows. */
682 #ifndef YY_START_STACK_INCR
683 #define YY_START_STACK_INCR 25
684 #endif
685
686 /* Report a fatal error. */
687 #ifndef YY_FATAL_ERROR
688 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
689 #endif
690
691 /* Default declaration of generated scanner - a define so the user can
692  * easily add parameters.
693  */
694 #ifndef YY_DECL
695 #define YY_DECL int yylex YY_PROTO(( void ))
696 #endif
697
698 /* Code executed at the beginning of each rule, after yytext and yyleng
699  * have been set up.
700  */
701 #ifndef YY_USER_ACTION
702 #define YY_USER_ACTION
703 #endif
704
705 /* Code executed at the end of each rule. */
706 #ifndef YY_BREAK
707 #define YY_BREAK break;
708 #endif
709
710 #define YY_RULE_SETUP \
711         YY_USER_ACTION
712
713 YY_DECL
714         {
715         register yy_state_type yy_current_state;
716         register char *yy_cp, *yy_bp;
717         register int yy_act;
718
719
720
721         if ( yy_init )
722                 {
723                 yy_init = 0;
724
725 #ifdef YY_USER_INIT
726                 YY_USER_INIT;
727 #endif
728
729                 if ( ! yy_start )
730                         yy_start = 1;   /* first start state */
731
732                 if ( ! yyin )
733                         yyin = stdin;
734
735                 if ( ! yyout )
736                         yyout = stdout;
737
738                 if ( ! yy_current_buffer )
739                         yy_current_buffer =
740                                 yy_create_buffer( yyin, YY_BUF_SIZE );
741
742                 yy_load_buffer_state();
743                 }
744
745         while ( 1 )             /* loops until end-of-file is reached */
746                 {
747                 yy_cp = yy_c_buf_p;
748
749                 /* Support of yytext. */
750                 *yy_cp = yy_hold_char;
751
752                 /* yy_bp points to the position in yy_ch_buf of the start of
753                  * the current run.
754                  */
755                 yy_bp = yy_cp;
756
757                 yy_current_state = yy_start;
758                 yy_state_ptr = yy_state_buf;
759                 *yy_state_ptr++ = yy_current_state;
760 yy_match:
761                 do
762                         {
763                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
764                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
765                                 {
766                                 yy_current_state = (int) yy_def[yy_current_state];
767                                 if ( yy_current_state >= 108 )
768                                         yy_c = yy_meta[(unsigned int) yy_c];
769                                 }
770                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
771                         *yy_state_ptr++ = yy_current_state;
772                         ++yy_cp;
773                         }
774                 while ( yy_base[yy_current_state] != 210 );
775
776 yy_find_action:
777                 yy_current_state = *--yy_state_ptr;
778                 yy_lp = yy_accept[yy_current_state];
779 find_rule: /* we branch to this label when backing up */
780                 for ( ; ; ) /* until we find what rule we matched */
781                         {
782                         if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
783                                 {
784                                 yy_act = yy_acclist[yy_lp];
785                                 if ( yy_act & YY_TRAILING_HEAD_MASK ||
786                                      yy_looking_for_trail_begin )
787                                         {
788                                         if ( yy_act == yy_looking_for_trail_begin )
789                                                 {
790                                                 yy_looking_for_trail_begin = 0;
791                                                 yy_act &= ~YY_TRAILING_HEAD_MASK;
792                                                 break;
793                                                 }
794                                         }
795                                 else if ( yy_act & YY_TRAILING_MASK )
796                                         {
797                                         yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
798                                         yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
799                                         }
800                                 else
801                                         {
802                                         yy_full_match = yy_cp;
803                                         yy_full_state = yy_state_ptr;
804                                         yy_full_lp = yy_lp;
805                                         break;
806                                         }
807                                 ++yy_lp;
808                                 goto find_rule;
809                                 }
810                         --yy_cp;
811                         yy_current_state = *--yy_state_ptr;
812                         yy_lp = yy_accept[yy_current_state];
813                         }
814
815                 YY_DO_BEFORE_ACTION;
816
817
818 do_action:      /* This label is used only to access EOF actions. */
819
820
821                 switch ( yy_act )
822         { /* beginning of action switch */
823 case 1:
824 YY_RULE_SETUP
825 {;}
826         YY_BREAK
827 case 2:
828 YY_RULE_SETUP
829 {;}
830         YY_BREAK
831 case 3:
832 YY_RULE_SETUP
833 { steplineno ++; }
834         YY_BREAK
835 case 4:
836 YY_RULE_SETUP
837 {;} /* abv 30.06.00: for reading DOS files */
838         YY_BREAK
839 case 5:
840 YY_RULE_SETUP
841 {;} /* fix from C21. for test load e3i file with line 15 with null symbols */
842         YY_BREAK
843 case 6:
844 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
845 yy_c_buf_p = yy_cp -= 1;
846 YY_DO_BEFORE_ACTION; /* set up yytext again */
847 YY_RULE_SETUP
848 { resultat();  if (modcom == 0) return(ENTITY); }
849         YY_BREAK
850 case 7:
851 YY_RULE_SETUP
852 { resultat();  if (modcom == 0) return(ENTITY); }
853         YY_BREAK
854 case 8:
855 YY_RULE_SETUP
856 { resultat();  if (modcom == 0) return(IDENT); }
857         YY_BREAK
858 case 9:
859 YY_RULE_SETUP
860 { resultat();  if (modcom == 0) { rec_typarg(rec_argInteger); return(QUID); } }
861         YY_BREAK
862 case 10:
863 YY_RULE_SETUP
864 { resultat();  if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
865         YY_BREAK
866 case 11:
867 YY_RULE_SETUP
868 { resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
869         YY_BREAK
870 case 12:
871 YY_RULE_SETUP
872 { resultat(); if (modcom == 0) { rec_typarg(rec_argText); return(QUID); } }
873         YY_BREAK
874 case 13:
875 YY_RULE_SETUP
876 { resultat();  if (modcom == 0) { rec_typarg(rec_argHexa); return(QUID); } }
877         YY_BREAK
878 case 14:
879 YY_RULE_SETUP
880 { resultat();  if (modcom == 0) { rec_typarg(rec_argEnum); return(QUID); } }
881         YY_BREAK
882 case 15:
883 YY_RULE_SETUP
884 { if (modcom == 0) return ('('); }
885         YY_BREAK
886 case 16:
887 YY_RULE_SETUP
888 { if (modcom == 0) return (')'); }
889         YY_BREAK
890 case 17:
891 YY_RULE_SETUP
892 { if (modcom == 0) return (','); }
893         YY_BREAK
894 case 18:
895 YY_RULE_SETUP
896 { resultat();  if (modcom == 0) { rec_typarg(rec_argNondef); return(QUID); } }
897         YY_BREAK
898 case 19:
899 YY_RULE_SETUP
900 { if (modcom == 0) return ('='); }
901         YY_BREAK
902 case 20:
903 YY_RULE_SETUP
904 { if (modcom == 0) return (';'); }
905         YY_BREAK
906 case 21:
907 YY_RULE_SETUP
908 { modcom = 1;  }
909         YY_BREAK
910 case 22:
911 YY_RULE_SETUP
912 { if (modend == 0) modcom = 0;  }
913         YY_BREAK
914 case 23:
915 YY_RULE_SETUP
916 { if (modcom == 0) return(STEP); }
917         YY_BREAK
918 case 24:
919 YY_RULE_SETUP
920 { if (modcom == 0) return(HEADER); }
921         YY_BREAK
922 case 25:
923 YY_RULE_SETUP
924 { if (modcom == 0) return(ENDSEC); }
925         YY_BREAK
926 case 26:
927 YY_RULE_SETUP
928 { if (modcom == 0) return(DATA); }
929         YY_BREAK
930 case 27:
931 YY_RULE_SETUP
932 { if (modend == 0) {modcom = 0;  return(ENDSTEP);} }
933         YY_BREAK
934 case 28:
935 YY_RULE_SETUP
936 { if (modend == 0) {modcom = 0;  return(ENDSTEP);} }
937         YY_BREAK
938 case 29:
939 YY_RULE_SETUP
940 { modcom = 1; modend = 1; return(ENDSTEP); }
941         YY_BREAK
942 case 30:
943 YY_RULE_SETUP
944 { if (modend == 0) {modcom = 0;  return(STEP); } }
945         YY_BREAK
946 case 31:
947 YY_RULE_SETUP
948 { if (modcom == 0) return ('/'); }
949         YY_BREAK
950 case 32:
951 YY_RULE_SETUP
952 { if (modcom == 0) return(SCOPE); }
953         YY_BREAK
954 case 33:
955 YY_RULE_SETUP
956 { if (modcom == 0) return(ENDSCOPE); }
957         YY_BREAK
958 case 34:
959 YY_RULE_SETUP
960 { resultat();  if (modcom == 0) return(TYPE); }
961         YY_BREAK
962 case 35:
963 YY_RULE_SETUP
964 { resultat();  if (modcom == 0) return(TYPE); }
965         YY_BREAK
966 case 36:
967 YY_RULE_SETUP
968 { resultat();  if (modcom == 0) { rec_typarg(rec_argMisc); return(QUID); } }
969         YY_BREAK
970 case 37:
971 YY_RULE_SETUP
972 ECHO;
973         YY_BREAK
974                         case YY_STATE_EOF(INITIAL):
975                                 yyterminate();
976
977         case YY_END_OF_BUFFER:
978                 {
979                 /* Amount of text matched not including the EOB char. */
980                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
981
982                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
983                 *yy_cp = yy_hold_char;
984                 YY_RESTORE_YY_MORE_OFFSET
985
986                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
987                         {
988                         /* We're scanning a new file or input source.  It's
989                          * possible that this happened because the user
990                          * just pointed yyin at a new source and called
991                          * yylex().  If so, then we have to assure
992                          * consistency between yy_current_buffer and our
993                          * globals.  Here is the right place to do so, because
994                          * this is the first action (other than possibly a
995                          * back-up) that will match for the new input source.
996                          */
997                         yy_n_chars = yy_current_buffer->yy_n_chars;
998                         yy_current_buffer->yy_input_file = yyin;
999                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1000                         }
1001
1002                 /* Note that here we test for yy_c_buf_p "<=" to the position
1003                  * of the first EOB in the buffer, since yy_c_buf_p will
1004                  * already have been incremented past the NUL character
1005                  * (since all states make transitions on EOB to the
1006                  * end-of-buffer state).  Contrast this with the test
1007                  * in input().
1008                  */
1009                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1010                         { /* This was really a NUL. */
1011                         yy_state_type yy_next_state;
1012
1013                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1014
1015                         yy_current_state = yy_get_previous_state();
1016
1017                         /* Okay, we're now positioned to make the NUL
1018                          * transition.  We couldn't have
1019                          * yy_get_previous_state() go ahead and do it
1020                          * for us because it doesn't know how to deal
1021                          * with the possibility of jamming (and we don't
1022                          * want to build jamming into it because then it
1023                          * will run more slowly).
1024                          */
1025
1026                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1027
1028                         yy_bp = yytext_ptr + YY_MORE_ADJ;
1029
1030                         if ( yy_next_state )
1031                                 {
1032                                 /* Consume the NUL. */
1033                                 yy_cp = ++yy_c_buf_p;
1034                                 yy_current_state = yy_next_state;
1035                                 goto yy_match;
1036                                 }
1037
1038                         else
1039                                 {
1040                                 yy_cp = yy_c_buf_p;
1041                                 goto yy_find_action;
1042                                 }
1043                         }
1044
1045                 else switch ( yy_get_next_buffer() )
1046                         {
1047                         case EOB_ACT_END_OF_FILE:
1048                                 {
1049                                 yy_did_buffer_switch_on_eof = 0;
1050
1051                                 if ( yywrap() )
1052                                         {
1053                                         /* Note: because we've taken care in
1054                                          * yy_get_next_buffer() to have set up
1055                                          * yytext, we can now set up
1056                                          * yy_c_buf_p so that if some total
1057                                          * hoser (like flex itself) wants to
1058                                          * call the scanner after we return the
1059                                          * YY_NULL, it'll still work - another
1060                                          * YY_NULL will get returned.
1061                                          */
1062                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1063
1064                                         yy_act = YY_STATE_EOF(YY_START);
1065                                         goto do_action;
1066                                         }
1067
1068                                 else
1069                                         {
1070                                         if ( ! yy_did_buffer_switch_on_eof )
1071                                                 YY_NEW_FILE;
1072                                         }
1073                                 break;
1074                                 }
1075
1076                         case EOB_ACT_CONTINUE_SCAN:
1077                                 yy_c_buf_p =
1078                                         yytext_ptr + yy_amount_of_matched_text;
1079
1080                                 yy_current_state = yy_get_previous_state();
1081
1082                                 yy_cp = yy_c_buf_p;
1083                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1084                                 goto yy_match;
1085
1086                         case EOB_ACT_LAST_MATCH:
1087                                 yy_c_buf_p =
1088                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1089
1090                                 yy_current_state = yy_get_previous_state();
1091
1092                                 yy_cp = yy_c_buf_p;
1093                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1094                                 goto yy_find_action;
1095                         }
1096                 break;
1097                 }
1098
1099         default:
1100                 YY_FATAL_ERROR(
1101                         "fatal flex scanner internal error--no action found" );
1102         } /* end of action switch */
1103                 } /* end of scanning one token */
1104         } /* end of yylex */
1105
1106
1107 /* yy_get_next_buffer - try to read in a new buffer
1108  *
1109  * Returns a code representing an action:
1110  *      EOB_ACT_LAST_MATCH -
1111  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1112  *      EOB_ACT_END_OF_FILE - end of file
1113  */
1114
1115 static int yy_get_next_buffer()
1116         {
1117         register char *dest = yy_current_buffer->yy_ch_buf;
1118         register char *source = yytext_ptr;
1119         register int number_to_move, i;
1120         int ret_val;
1121
1122         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1123                 YY_FATAL_ERROR(
1124                 "fatal flex scanner internal error--end of buffer missed" );
1125
1126         if ( yy_current_buffer->yy_fill_buffer == 0 )
1127                 { /* Don't try to fill the buffer, so this is an EOF. */
1128                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1129                         {
1130                         /* We matched a single character, the EOB, so
1131                          * treat this as a final EOF.
1132                          */
1133                         return EOB_ACT_END_OF_FILE;
1134                         }
1135
1136                 else
1137                         {
1138                         /* We matched some text prior to the EOB, first
1139                          * process it.
1140                          */
1141                         return EOB_ACT_LAST_MATCH;
1142                         }
1143                 }
1144
1145         /* Try to read more data. */
1146
1147         /* First move last chars to start of buffer. */
1148         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1149
1150         for ( i = 0; i < number_to_move; ++i )
1151                 *(dest++) = *(source++);
1152
1153         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1154                 /* don't do the read, it's not guaranteed to return an EOF,
1155                  * just force an EOF
1156                  */
1157                 yy_n_chars = 0;
1158
1159         else
1160                 {
1161                 int num_to_read =
1162                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1163
1164                 while ( num_to_read <= 0 )
1165                         { /* Not enough room in the buffer - grow it. */
1166 #ifdef YY_USES_REJECT
1167                         YY_FATAL_ERROR(
1168 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1169 #else
1170
1171                         /* just a shorter name for the current buffer */
1172                         YY_BUFFER_STATE b = yy_current_buffer;
1173
1174                         int yy_c_buf_p_offset =
1175                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1176
1177                         if ( b->yy_is_our_buffer )
1178                                 {
1179                                 int new_size = b->yy_buf_size * 2;
1180
1181                                 if ( new_size <= 0 )
1182                                         b->yy_buf_size += b->yy_buf_size / 8;
1183                                 else
1184                                         b->yy_buf_size *= 2;
1185
1186                                 b->yy_ch_buf = (char *)
1187                                         /* Include room in for 2 EOB chars. */
1188                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1189                                                          b->yy_buf_size + 2 );
1190                                 }
1191                         else
1192                                 /* Can't grow it, we don't own it. */
1193                                 b->yy_ch_buf = 0;
1194
1195                         if ( ! b->yy_ch_buf )
1196                                 YY_FATAL_ERROR(
1197                                 "fatal error - scanner input buffer overflow" );
1198
1199                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1200
1201                         num_to_read = yy_current_buffer->yy_buf_size -
1202                                                 number_to_move - 1;
1203 #endif
1204                         }
1205
1206                 if ( num_to_read > YY_READ_BUF_SIZE )
1207                         num_to_read = YY_READ_BUF_SIZE;
1208
1209                 /* Read in more data. */
1210                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1211                         yy_n_chars, num_to_read );
1212                 }
1213
1214         if ( yy_n_chars == 0 )
1215                 {
1216                 if ( number_to_move == YY_MORE_ADJ )
1217                         {
1218                         ret_val = EOB_ACT_END_OF_FILE;
1219                         yyrestart( yyin );
1220                         }
1221
1222                 else
1223                         {
1224                         ret_val = EOB_ACT_LAST_MATCH;
1225                         yy_current_buffer->yy_buffer_status =
1226                                 YY_BUFFER_EOF_PENDING;
1227                         }
1228                 }
1229
1230         else
1231                 ret_val = EOB_ACT_CONTINUE_SCAN;
1232
1233         yy_n_chars += number_to_move;
1234         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1235         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1236
1237         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1238
1239         return ret_val;
1240         }
1241
1242
1243 /* yy_get_previous_state - get the state just before the EOB char was reached */
1244
1245 static yy_state_type yy_get_previous_state()
1246         {
1247         register yy_state_type yy_current_state;
1248         register char *yy_cp;
1249
1250         yy_current_state = yy_start;
1251         yy_state_ptr = yy_state_buf;
1252         *yy_state_ptr++ = yy_current_state;
1253
1254         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1255                 {
1256                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 39);
1257                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1258                         {
1259                         yy_current_state = (int) yy_def[yy_current_state];
1260                         if ( yy_current_state >= 108 )
1261                                 yy_c = yy_meta[(unsigned int) yy_c];
1262                         }
1263                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1264                 *yy_state_ptr++ = yy_current_state;
1265                 }
1266
1267         return yy_current_state;
1268         }
1269
1270
1271 /* yy_try_NUL_trans - try to make a transition on the NUL character
1272  *
1273  * synopsis
1274  *      next_state = yy_try_NUL_trans( current_state );
1275  */
1276
1277 #ifdef YY_USE_PROTOS
1278 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1279 #else
1280 static yy_state_type yy_try_NUL_trans( yy_current_state )
1281 yy_state_type yy_current_state;
1282 #endif
1283         {
1284         register int yy_is_jam;
1285
1286         register YY_CHAR yy_c = 39;
1287         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1288                 {
1289                 yy_current_state = (int) yy_def[yy_current_state];
1290                 if ( yy_current_state >= 108 )
1291                         yy_c = yy_meta[(unsigned int) yy_c];
1292                 }
1293         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1294         yy_is_jam = (yy_current_state == 107);
1295         if ( ! yy_is_jam )
1296                 *yy_state_ptr++ = yy_current_state;
1297
1298         return yy_is_jam ? 0 : yy_current_state;
1299         }
1300
1301
1302 #ifndef YY_NO_UNPUT
1303 #ifdef YY_USE_PROTOS
1304 static void yyunput( int c, register char *yy_bp )
1305 #else
1306 static void yyunput( c, yy_bp )
1307 int c;
1308 register char *yy_bp;
1309 #endif
1310         {
1311         register char *yy_cp = yy_c_buf_p;
1312
1313         /* undo effects of setting up yytext */
1314         *yy_cp = yy_hold_char;
1315
1316         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1317                 { /* need to shift things up to make room */
1318                 /* +2 for EOB chars. */
1319                 register int number_to_move = yy_n_chars + 2;
1320                 register char *dest = &yy_current_buffer->yy_ch_buf[
1321                                         yy_current_buffer->yy_buf_size + 2];
1322                 register char *source =
1323                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1324
1325                 while ( source > yy_current_buffer->yy_ch_buf )
1326                         *--dest = *--source;
1327
1328                 yy_cp += (int) (dest - source);
1329                 yy_bp += (int) (dest - source);
1330                 yy_n_chars = yy_current_buffer->yy_buf_size;
1331
1332                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1333                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1334                 }
1335
1336         *--yy_cp = (char) c;
1337
1338
1339         yytext_ptr = yy_bp;
1340         yy_hold_char = *yy_cp;
1341         yy_c_buf_p = yy_cp;
1342         }
1343 #endif  /* ifndef YY_NO_UNPUT */
1344
1345
1346 #ifdef __cplusplus
1347 static int yyinput()
1348 #else
1349 static int input()
1350 #endif
1351         {
1352         int c;
1353
1354         *yy_c_buf_p = yy_hold_char;
1355
1356         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1357                 {
1358                 /* yy_c_buf_p now points to the character we want to return.
1359                  * If this occurs *before* the EOB characters, then it's a
1360                  * valid NUL; if not, then we've hit the end of the buffer.
1361                  */
1362                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1363                         /* This was really a NUL. */
1364                         *yy_c_buf_p = '\0';
1365
1366                 else
1367                         { /* need more input */
1368                         int offset = yy_c_buf_p - yytext_ptr;
1369                         ++yy_c_buf_p;
1370
1371                         switch ( yy_get_next_buffer() )
1372                                 {
1373                                 case EOB_ACT_END_OF_FILE:
1374                                         {
1375                                         if ( yywrap() )
1376                                                 {
1377                                                 yy_c_buf_p = yytext_ptr + offset;
1378                                                 return EOF;
1379                                                 }
1380
1381                                         if ( ! yy_did_buffer_switch_on_eof )
1382                                                 YY_NEW_FILE;
1383 #ifdef __cplusplus
1384                                         return yyinput();
1385 #else
1386                                         return input();
1387 #endif
1388                                         }
1389
1390                                 case EOB_ACT_CONTINUE_SCAN:
1391                                         yy_c_buf_p = yytext_ptr + offset;
1392                                         break;
1393
1394                                 case EOB_ACT_LAST_MATCH:
1395 #ifdef __cplusplus
1396                                         YY_FATAL_ERROR(
1397                                         "unexpected last match in yyinput()" );
1398 #else
1399                                         YY_FATAL_ERROR(
1400                                         "unexpected last match in input()" );
1401 #endif
1402                                 }
1403                         }
1404                 }
1405
1406         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1407         *yy_c_buf_p = '\0';     /* preserve yytext */
1408         yy_hold_char = *++yy_c_buf_p;
1409
1410
1411         return c;
1412         }
1413
1414
1415 #ifdef YY_USE_PROTOS
1416 void yyrestart( FILE *input_file )
1417 #else
1418 void yyrestart( input_file )
1419 FILE *input_file;
1420 #endif
1421         {
1422         if ( ! yy_current_buffer )
1423                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1424
1425         yy_init_buffer( yy_current_buffer, input_file );
1426         yy_load_buffer_state();
1427         }
1428
1429
1430 #ifdef YY_USE_PROTOS
1431 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1432 #else
1433 void yy_switch_to_buffer( new_buffer )
1434 YY_BUFFER_STATE new_buffer;
1435 #endif
1436         {
1437         if ( yy_current_buffer == new_buffer )
1438                 return;
1439
1440         if ( yy_current_buffer )
1441                 {
1442                 /* Flush out information for old buffer. */
1443                 *yy_c_buf_p = yy_hold_char;
1444                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1445                 yy_current_buffer->yy_n_chars = yy_n_chars;
1446                 }
1447
1448         yy_current_buffer = new_buffer;
1449         yy_load_buffer_state();
1450
1451         /* We don't actually know whether we did this switch during
1452          * EOF (yywrap()) processing, but the only time this flag
1453          * is looked at is after yywrap() is called, so it's safe
1454          * to go ahead and always set it.
1455          */
1456         yy_did_buffer_switch_on_eof = 1;
1457         }
1458
1459
1460 #ifdef YY_USE_PROTOS
1461 void yy_load_buffer_state( void )
1462 #else
1463 void yy_load_buffer_state()
1464 #endif
1465         {
1466         yy_n_chars = yy_current_buffer->yy_n_chars;
1467         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1468         yyin = yy_current_buffer->yy_input_file;
1469         yy_hold_char = *yy_c_buf_p;
1470         }
1471
1472
1473 #ifdef YY_USE_PROTOS
1474 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1475 #else
1476 YY_BUFFER_STATE yy_create_buffer( file, size )
1477 FILE *file;
1478 int size;
1479 #endif
1480         {
1481         YY_BUFFER_STATE b;
1482
1483         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1484         if ( ! b )
1485                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1486
1487         b->yy_buf_size = size;
1488
1489         /* yy_ch_buf has to be 2 characters longer than the size given because
1490          * we need to put in 2 end-of-buffer characters.
1491          */
1492         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1493         if ( ! b->yy_ch_buf )
1494                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1495
1496         b->yy_is_our_buffer = 1;
1497
1498         yy_init_buffer( b, file );
1499
1500         return b;
1501         }
1502
1503
1504 #ifdef YY_USE_PROTOS
1505 void yy_delete_buffer( YY_BUFFER_STATE b )
1506 #else
1507 void yy_delete_buffer( b )
1508 YY_BUFFER_STATE b;
1509 #endif
1510         {
1511         if ( ! b )
1512                 return;
1513
1514         if ( b == yy_current_buffer )
1515                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1516
1517         if ( b->yy_is_our_buffer )
1518                 yy_flex_free( (void *) b->yy_ch_buf );
1519
1520         yy_flex_free( (void *) b );
1521         }
1522
1523
1524 #ifndef YY_ALWAYS_INTERACTIVE
1525 #ifndef YY_NEVER_INTERACTIVE
1526 extern int isatty YY_PROTO(( int ));
1527 #endif
1528 #endif
1529
1530 #ifdef YY_USE_PROTOS
1531 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1532 #else
1533 void yy_init_buffer( b, file )
1534 YY_BUFFER_STATE b;
1535 FILE *file;
1536 #endif
1537
1538
1539         {
1540         yy_flush_buffer( b );
1541
1542         b->yy_input_file = file;
1543         b->yy_fill_buffer = 1;
1544
1545 #if YY_ALWAYS_INTERACTIVE
1546         b->yy_is_interactive = 1;
1547 #else
1548 #if YY_NEVER_INTERACTIVE
1549         b->yy_is_interactive = 0;
1550 #else
1551         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1552 #endif
1553 #endif
1554         }
1555
1556
1557 #ifdef YY_USE_PROTOS
1558 void yy_flush_buffer( YY_BUFFER_STATE b )
1559 #else
1560 void yy_flush_buffer( b )
1561 YY_BUFFER_STATE b;
1562 #endif
1563
1564         {
1565         b->yy_n_chars = 0;
1566
1567         /* We always need two end-of-buffer characters.  The first causes
1568          * a transition to the end-of-buffer state.  The second causes
1569          * a jam in that state.
1570          */
1571         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1572         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1573
1574         b->yy_buf_pos = &b->yy_ch_buf[0];
1575
1576         b->yy_at_bol = 1;
1577         b->yy_buffer_status = YY_BUFFER_NEW;
1578
1579         if ( b == yy_current_buffer )
1580                 yy_load_buffer_state();
1581         }
1582
1583
1584 #ifndef YY_NO_SCAN_BUFFER
1585 #ifdef YY_USE_PROTOS
1586 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1587 #else
1588 YY_BUFFER_STATE yy_scan_buffer( base, size )
1589 char *base;
1590 yy_size_t size;
1591 #endif
1592         {
1593         YY_BUFFER_STATE b;
1594
1595         if ( size < 2 ||
1596              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1597              base[size-1] != YY_END_OF_BUFFER_CHAR )
1598                 /* They forgot to leave room for the EOB's. */
1599                 return 0;
1600
1601         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1602         if ( ! b )
1603                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1604
1605         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1606         b->yy_buf_pos = b->yy_ch_buf = base;
1607         b->yy_is_our_buffer = 0;
1608         b->yy_input_file = 0;
1609         b->yy_n_chars = b->yy_buf_size;
1610         b->yy_is_interactive = 0;
1611         b->yy_at_bol = 1;
1612         b->yy_fill_buffer = 0;
1613         b->yy_buffer_status = YY_BUFFER_NEW;
1614
1615         yy_switch_to_buffer( b );
1616
1617         return b;
1618         }
1619 #endif
1620
1621
1622 #ifndef YY_NO_SCAN_STRING
1623 #ifdef YY_USE_PROTOS
1624 YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1625 #else
1626 YY_BUFFER_STATE yy_scan_string( str )
1627 yyconst char *str;
1628 #endif
1629         {
1630         int len;
1631         for ( len = 0; str[len]; ++len )
1632                 ;
1633
1634         return yy_scan_bytes( str, len );
1635         }
1636 #endif
1637
1638
1639 #ifndef YY_NO_SCAN_BYTES
1640 #ifdef YY_USE_PROTOS
1641 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1642 #else
1643 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1644 yyconst char *bytes;
1645 int len;
1646 #endif
1647         {
1648         YY_BUFFER_STATE b;
1649         char *buf;
1650         yy_size_t n;
1651         int i;
1652
1653         /* Get memory for full buffer, including space for trailing EOB's. */
1654         n = len + 2;
1655         buf = (char *) yy_flex_alloc( n );
1656         if ( ! buf )
1657                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1658
1659         for ( i = 0; i < len; ++i )
1660                 buf[i] = bytes[i];
1661
1662         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1663
1664         b = yy_scan_buffer( buf, n );
1665         if ( ! b )
1666                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1667
1668         /* It's okay to grow etc. this buffer, and we should throw it
1669          * away when we're done.
1670          */
1671         b->yy_is_our_buffer = 1;
1672
1673         return b;
1674         }
1675 #endif
1676
1677
1678 #ifndef YY_NO_PUSH_STATE
1679 #ifdef YY_USE_PROTOS
1680 static void yy_push_state( int new_state )
1681 #else
1682 static void yy_push_state( new_state )
1683 int new_state;
1684 #endif
1685         {
1686         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1687                 {
1688                 yy_size_t new_size;
1689
1690                 yy_start_stack_depth += YY_START_STACK_INCR;
1691                 new_size = yy_start_stack_depth * sizeof( int );
1692
1693                 if ( ! yy_start_stack )
1694                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1695
1696                 else
1697                         yy_start_stack = (int *) yy_flex_realloc(
1698                                         (void *) yy_start_stack, new_size );
1699
1700                 if ( ! yy_start_stack )
1701                         YY_FATAL_ERROR(
1702                         "out of memory expanding start-condition stack" );
1703                 }
1704
1705         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1706
1707         BEGIN(new_state);
1708         }
1709 #endif
1710
1711
1712 #ifndef YY_NO_POP_STATE
1713 static void yy_pop_state()
1714         {
1715         if ( --yy_start_stack_ptr < 0 )
1716                 YY_FATAL_ERROR( "start-condition stack underflow" );
1717
1718         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1719         }
1720 #endif
1721
1722
1723 #ifndef YY_NO_TOP_STATE
1724 static int yy_top_state()
1725         {
1726         return yy_start_stack[yy_start_stack_ptr - 1];
1727         }
1728 #endif
1729
1730 #ifndef YY_EXIT_FAILURE
1731 #define YY_EXIT_FAILURE 2
1732 #endif
1733
1734 #ifdef YY_USE_PROTOS
1735 static void yy_fatal_error( yyconst char msg[] )
1736 #else
1737 static void yy_fatal_error( msg )
1738 char msg[];
1739 #endif
1740         {
1741         (void) fprintf( stderr, "%s\n", msg );
1742         exit( YY_EXIT_FAILURE );
1743         }
1744
1745
1746
1747 /* Redefine yyless() so it works in section 3 code. */
1748
1749 #undef yyless
1750 #define yyless(n) \
1751         do \
1752                 { \
1753                 /* Undo effects of setting up yytext. */ \
1754                 yytext[yyleng] = yy_hold_char; \
1755                 yy_c_buf_p = yytext + n; \
1756                 yy_hold_char = *yy_c_buf_p; \
1757                 *yy_c_buf_p = '\0'; \
1758                 yyleng = n; \
1759                 } \
1760         while ( 0 )
1761
1762
1763 /* Internal utility routines. */
1764
1765 #ifndef yytext_ptr
1766 #ifdef YY_USE_PROTOS
1767 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1768 #else
1769 static void yy_flex_strncpy( s1, s2, n )
1770 char *s1;
1771 yyconst char *s2;
1772 int n;
1773 #endif
1774         {
1775         register int i;
1776         for ( i = 0; i < n; ++i )
1777                 s1[i] = s2[i];
1778         }
1779 #endif
1780
1781 #ifdef YY_NEED_STRLEN
1782 #ifdef YY_USE_PROTOS
1783 static int yy_flex_strlen( yyconst char *s )
1784 #else
1785 static int yy_flex_strlen( s )
1786 yyconst char *s;
1787 #endif
1788         {
1789         register int n;
1790         for ( n = 0; s[n]; ++n )
1791                 ;
1792
1793         return n;
1794         }
1795 #endif
1796
1797
1798 #ifdef YY_USE_PROTOS
1799 static void *yy_flex_alloc( yy_size_t size )
1800 #else
1801 static void *yy_flex_alloc( size )
1802 yy_size_t size;
1803 #endif
1804         {
1805         return (void *) malloc( size );
1806         }
1807
1808 #ifdef YY_USE_PROTOS
1809 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1810 #else
1811 static void *yy_flex_realloc( ptr, size )
1812 void *ptr;
1813 yy_size_t size;
1814 #endif
1815         {
1816         /* The cast to (char *) in the following accommodates both
1817          * implementations that use char* generic pointers, and those
1818          * that use void* generic pointers.  It works with the latter
1819          * because both ANSI C and C++ allow castless assignment from
1820          * any pointer type to void*, and deal with argument conversions
1821          * as though doing an assignment.
1822          */
1823         return (void *) realloc( (char *) ptr, size );
1824         }
1825
1826 #ifdef YY_USE_PROTOS
1827 static void yy_flex_free( void *ptr )
1828 #else
1829 static void yy_flex_free( ptr )
1830 void *ptr;
1831 #endif
1832         {
1833         free( ptr );
1834         }
1835
1836 #if YY_MAIN
1837 int main()
1838         {
1839         yylex();
1840         return 0;
1841         }
1842 #endif