0031740: Configuration - recover support of Yacc and Lex generation
[occt.git] / src / StepFile / lex.step.c
CommitLineData
42cf5bc1 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
fba34cf8 31#ifdef WNT
42cf5bc1 32# include <stdlib.h>
33# include <io.h>
fba34cf8 34#endif /* WNT */
42cf5bc1 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
123typedef struct yy_buffer_state *YY_BUFFER_STATE;
124
125extern int yyleng;
126extern 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 */
165typedef unsigned int yy_size_t;
166
167
168struct 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
225static 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. */
235static char yy_hold_char;
236
237static int yy_n_chars; /* number of characters read into yy_ch_buf */
238
239
240int yyleng;
241
242/* Points to current character in buffer. */
243static char *yy_c_buf_p = (char *) 0;
244static int yy_init = 1; /* whether we need to initialize */
245static 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 */
250static int yy_did_buffer_switch_on_eof;
251
252void yyrestart YY_PROTO(( FILE *input_file ));
253
254void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
255void yy_load_buffer_state YY_PROTO(( void ));
256YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
257void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
258void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
259void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
260#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
261
262YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
263YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
264YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
265
266static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
267static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
268static 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
290typedef unsigned char YY_CHAR;
291FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
292typedef int yy_state_type;
293extern char *yytext;
294#define yytext_ptr yytext
295
296static yy_state_type yy_get_previous_state YY_PROTO(( void ));
297static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
298static int yy_get_next_buffer YY_PROTO(( void ));
299static 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
313static 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
333static 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
349static 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
381static 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
389static 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
406static 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
423static 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
454static 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
485static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
486static char *yy_full_match;
487static int yy_lp;
488static int yy_looking_for_trail_begin = 0;
489static int yy_full_lp;
490static 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 */ \
496yy_cp = yy_full_match; /* restore poss. backed-over text */ \
497yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
498yy_state_ptr = yy_full_state; /* restore orig. state */ \
499yy_current_state = *yy_state_ptr; /* restore curr. state */ \
500++yy_lp; \
501goto find_rule; \
502}
503#define yymore() yymore_used_but_not_detected
504#define YY_MORE_ADJ 0
505#define YY_RESTORE_YY_MORE_OFFSET
506char *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
528long 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 */
fba34cf8 532#ifdef _MSC_VER
533// add includes for flex 2.91 (Linux version)
42cf5bc1 534#include <stdlib.h>
fba34cf8 535#include <io.h>
536
537// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
538#ifndef YY_NO_UNISTD_H
539#define YY_NO_UNISTD_H
540#endif
541
542// disable MSVC warnings in flex 2.89 and 2.5.35 code
543// Note that Intel compiler also defines _MSC_VER but has different warning ids
544#if defined(__INTEL_COMPILER)
545#pragma warning(disable:177 1786 1736)
546#elif defined(__clang__)
547#pragma GCC diagnostic ignored "-Wunused-function"
548#pragma GCC diagnostic ignored "-Winconsistent-dllimport"
549#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
550#else
551#pragma warning(disable:4131 4244 4273 4127 4267)
552#endif
553
554#endif /* MSC_VER */
42cf5bc1 555
556/*
557void steperror ( FILE *input_file );
558void steprestart ( FILE *input_file );
559*/
560void rec_restext(char *newtext, int lentext);
561void rec_typarg(int argtype);
562
563 int steplineno; /* Comptage de ligne (ben oui, fait tout faire) */
564
565 int modcom = 0; /* Commentaires type C */
566 int modend = 0; /* Flag for finishing of the STEP file */
567 void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
568 { if (modcom == 0) rec_restext(yytext,yyleng); }
569
42cf5bc1 570// disable GCC warnings in flex code
571#ifdef __GNUC__
572#pragma GCC diagnostic ignored "-Wunused-function"
573#endif
574
575
576/* Macros after this point can all be overridden by user definitions in
577 * section 1.
578 */
579
580#ifndef YY_SKIP_YYWRAP
581#ifdef __cplusplus
582extern "C" int yywrap YY_PROTO(( void ));
583#else
584extern int yywrap YY_PROTO(( void ));
585#endif
586#endif
587
588#ifndef YY_NO_UNPUT
589static void yyunput YY_PROTO(( int c, char *buf_ptr ));
590#endif
591
592#ifndef yytext_ptr
593static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
594#endif
595
596#ifdef YY_NEED_STRLEN
597static int yy_flex_strlen YY_PROTO(( yyconst char * ));
598#endif
599
600#ifndef YY_NO_INPUT
601#ifdef __cplusplus
602static int yyinput YY_PROTO(( void ));
603#else
604static int input YY_PROTO(( void ));
605#endif
606#endif
607
608#if YY_STACK_USED
609static int yy_start_stack_ptr = 0;
610static int yy_start_stack_depth = 0;
611static int *yy_start_stack = 0;
612#ifndef YY_NO_PUSH_STATE
613static void yy_push_state YY_PROTO(( int new_state ));
614#endif
615#ifndef YY_NO_POP_STATE
616static void yy_pop_state YY_PROTO(( void ));
617#endif
618#ifndef YY_NO_TOP_STATE
619static int yy_top_state YY_PROTO(( void ));
620#endif
621
622#else
623#define YY_NO_PUSH_STATE 1
624#define YY_NO_POP_STATE 1
625#define YY_NO_TOP_STATE 1
626#endif
627
628#ifdef YY_MALLOC_DECL
629YY_MALLOC_DECL
630#else
631#if __STDC__
632#ifndef __cplusplus
633#include <stdlib.h>
634#endif
635#else
636/* Just try to get by without declaring the routines. This will fail
637 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
638 * or sizeof(void*) != sizeof(int).
639 */
640#endif
641#endif
642
643/* Amount of stuff to slurp up with each read. */
644#ifndef YY_READ_BUF_SIZE
645#define YY_READ_BUF_SIZE 8192
646#endif
647
648/* Copy whatever the last rule matched to the standard output. */
649
650#ifndef ECHO
651/* This used to be an fputs(), but since the string might contain NUL's,
652 * we now use fwrite().
653 */
654#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
655#endif
656
657/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
658 * is returned in "result".
659 */
660#ifndef YY_INPUT
661#define YY_INPUT(buf,result,max_size) \
662 if ( yy_current_buffer->yy_is_interactive ) \
663 { \
664 int c = '*', n; \
665 for ( n = 0; n < max_size && \
666 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
667 buf[n] = (char) c; \
668 if ( c == '\n' ) \
669 buf[n++] = (char) c; \
670 if ( c == EOF && ferror( yyin ) ) \
671 YY_FATAL_ERROR( "input in flex scanner failed" ); \
672 result = n; \
673 } \
674 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
675 && ferror( yyin ) ) \
676 YY_FATAL_ERROR( "input in flex scanner failed" );
677#endif
678
679/* No semi-colon after return; correct usage is to write "yyterminate();" -
680 * we don't want an extra ';' after the "return" because that will cause
681 * some compilers to complain about unreachable statements.
682 */
683#ifndef yyterminate
684#define yyterminate() return YY_NULL
685#endif
686
687/* Number of entries by which start-condition stack grows. */
688#ifndef YY_START_STACK_INCR
689#define YY_START_STACK_INCR 25
690#endif
691
692/* Report a fatal error. */
693#ifndef YY_FATAL_ERROR
694#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
695#endif
696
697/* Default declaration of generated scanner - a define so the user can
698 * easily add parameters.
699 */
700#ifndef YY_DECL
701#define YY_DECL int yylex YY_PROTO(( void ))
702#endif
703
704/* Code executed at the beginning of each rule, after yytext and yyleng
705 * have been set up.
706 */
707#ifndef YY_USER_ACTION
708#define YY_USER_ACTION
709#endif
710
711/* Code executed at the end of each rule. */
712#ifndef YY_BREAK
713#define YY_BREAK break;
714#endif
715
716#define YY_RULE_SETUP \
717 YY_USER_ACTION
718
719YY_DECL
720 {
721 register yy_state_type yy_current_state;
722 register char *yy_cp, *yy_bp;
723 register int yy_act;
724
725
726
727 if ( yy_init )
728 {
729 yy_init = 0;
730
731#ifdef YY_USER_INIT
732 YY_USER_INIT;
733#endif
734
735 if ( ! yy_start )
736 yy_start = 1; /* first start state */
737
738 if ( ! yyin )
739 yyin = stdin;
740
741 if ( ! yyout )
742 yyout = stdout;
743
744 if ( ! yy_current_buffer )
745 yy_current_buffer =
746 yy_create_buffer( yyin, YY_BUF_SIZE );
747
748 yy_load_buffer_state();
749 }
750
751 while ( 1 ) /* loops until end-of-file is reached */
752 {
753 yy_cp = yy_c_buf_p;
754
755 /* Support of yytext. */
756 *yy_cp = yy_hold_char;
757
758 /* yy_bp points to the position in yy_ch_buf of the start of
759 * the current run.
760 */
761 yy_bp = yy_cp;
762
763 yy_current_state = yy_start;
764 yy_state_ptr = yy_state_buf;
765 *yy_state_ptr++ = yy_current_state;
766yy_match:
767 do
768 {
769 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
770 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
771 {
772 yy_current_state = (int) yy_def[yy_current_state];
773 if ( yy_current_state >= 108 )
774 yy_c = yy_meta[(unsigned int) yy_c];
775 }
776 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
777 *yy_state_ptr++ = yy_current_state;
778 ++yy_cp;
779 }
780 while ( yy_base[yy_current_state] != 210 );
781
782yy_find_action:
783 yy_current_state = *--yy_state_ptr;
784 yy_lp = yy_accept[yy_current_state];
785find_rule: /* we branch to this label when backing up */
786 for ( ; ; ) /* until we find what rule we matched */
787 {
788 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
789 {
790 yy_act = yy_acclist[yy_lp];
791 if ( yy_act & YY_TRAILING_HEAD_MASK ||
792 yy_looking_for_trail_begin )
793 {
794 if ( yy_act == yy_looking_for_trail_begin )
795 {
796 yy_looking_for_trail_begin = 0;
797 yy_act &= ~YY_TRAILING_HEAD_MASK;
798 break;
799 }
800 }
801 else if ( yy_act & YY_TRAILING_MASK )
802 {
803 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
804 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
805 }
806 else
807 {
808 yy_full_match = yy_cp;
809 yy_full_state = yy_state_ptr;
810 yy_full_lp = yy_lp;
811 break;
812 }
813 ++yy_lp;
814 goto find_rule;
815 }
816 --yy_cp;
817 yy_current_state = *--yy_state_ptr;
818 yy_lp = yy_accept[yy_current_state];
819 }
820
821 YY_DO_BEFORE_ACTION;
822
823
824do_action: /* This label is used only to access EOF actions. */
825
826
827 switch ( yy_act )
828 { /* beginning of action switch */
829case 1:
830YY_RULE_SETUP
831{;}
832 YY_BREAK
833case 2:
834YY_RULE_SETUP
835{;}
836 YY_BREAK
837case 3:
838YY_RULE_SETUP
839{ steplineno ++; }
840 YY_BREAK
841case 4:
842YY_RULE_SETUP
843{;} /* abv 30.06.00: for reading DOS files */
844 YY_BREAK
845case 5:
846YY_RULE_SETUP
847{;} /* fix from C21. for test load e3i file with line 15 with null symbols */
848 YY_BREAK
849case 6:
850*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
851yy_c_buf_p = yy_cp -= 1;
852YY_DO_BEFORE_ACTION; /* set up yytext again */
853YY_RULE_SETUP
854{ resultat(); if (modcom == 0) return(ENTITY); }
855 YY_BREAK
856case 7:
857YY_RULE_SETUP
858{ resultat(); if (modcom == 0) return(ENTITY); }
859 YY_BREAK
860case 8:
861YY_RULE_SETUP
862{ resultat(); if (modcom == 0) return(IDENT); }
863 YY_BREAK
864case 9:
865YY_RULE_SETUP
866{ resultat(); if (modcom == 0) { rec_typarg(rec_argInteger); return(QUID); } }
867 YY_BREAK
868case 10:
869YY_RULE_SETUP
870{ resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
871 YY_BREAK
872case 11:
873YY_RULE_SETUP
874{ resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
875 YY_BREAK
876case 12:
877YY_RULE_SETUP
878{ resultat(); if (modcom == 0) { rec_typarg(rec_argText); return(QUID); } }
879 YY_BREAK
880case 13:
881YY_RULE_SETUP
882{ resultat(); if (modcom == 0) { rec_typarg(rec_argHexa); return(QUID); } }
883 YY_BREAK
884case 14:
885YY_RULE_SETUP
886{ resultat(); if (modcom == 0) { rec_typarg(rec_argEnum); return(QUID); } }
887 YY_BREAK
888case 15:
889YY_RULE_SETUP
890{ if (modcom == 0) return ('('); }
891 YY_BREAK
892case 16:
893YY_RULE_SETUP
894{ if (modcom == 0) return (')'); }
895 YY_BREAK
896case 17:
897YY_RULE_SETUP
898{ if (modcom == 0) return (','); }
899 YY_BREAK
900case 18:
901YY_RULE_SETUP
902{ resultat(); if (modcom == 0) { rec_typarg(rec_argNondef); return(QUID); } }
903 YY_BREAK
904case 19:
905YY_RULE_SETUP
906{ if (modcom == 0) return ('='); }
907 YY_BREAK
908case 20:
909YY_RULE_SETUP
910{ if (modcom == 0) return (';'); }
911 YY_BREAK
912case 21:
913YY_RULE_SETUP
914{ modcom = 1; }
915 YY_BREAK
916case 22:
917YY_RULE_SETUP
918{ if (modend == 0) modcom = 0; }
919 YY_BREAK
920case 23:
921YY_RULE_SETUP
922{ if (modcom == 0) return(STEP); }
923 YY_BREAK
924case 24:
925YY_RULE_SETUP
926{ if (modcom == 0) return(HEADER); }
927 YY_BREAK
928case 25:
929YY_RULE_SETUP
930{ if (modcom == 0) return(ENDSEC); }
931 YY_BREAK
932case 26:
933YY_RULE_SETUP
934{ if (modcom == 0) return(DATA); }
935 YY_BREAK
936case 27:
937YY_RULE_SETUP
938{ if (modend == 0) {modcom = 0; return(ENDSTEP);} }
939 YY_BREAK
940case 28:
941YY_RULE_SETUP
942{ if (modend == 0) {modcom = 0; return(ENDSTEP);} }
943 YY_BREAK
944case 29:
945YY_RULE_SETUP
946{ modcom = 1; modend = 1; return(ENDSTEP); }
947 YY_BREAK
948case 30:
949YY_RULE_SETUP
950{ if (modend == 0) {modcom = 0; return(STEP); } }
951 YY_BREAK
952case 31:
953YY_RULE_SETUP
954{ if (modcom == 0) return ('/'); }
955 YY_BREAK
956case 32:
957YY_RULE_SETUP
958{ if (modcom == 0) return(SCOPE); }
959 YY_BREAK
960case 33:
961YY_RULE_SETUP
962{ if (modcom == 0) return(ENDSCOPE); }
963 YY_BREAK
964case 34:
965YY_RULE_SETUP
966{ resultat(); if (modcom == 0) return(TYPE); }
967 YY_BREAK
968case 35:
969YY_RULE_SETUP
970{ resultat(); if (modcom == 0) return(TYPE); }
971 YY_BREAK
972case 36:
973YY_RULE_SETUP
974{ resultat(); if (modcom == 0) { rec_typarg(rec_argMisc); return(QUID); } }
975 YY_BREAK
976case 37:
977YY_RULE_SETUP
978ECHO;
979 YY_BREAK
980 case YY_STATE_EOF(INITIAL):
981 yyterminate();
982
983 case YY_END_OF_BUFFER:
984 {
985 /* Amount of text matched not including the EOB char. */
986 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
987
988 /* Undo the effects of YY_DO_BEFORE_ACTION. */
989 *yy_cp = yy_hold_char;
990 YY_RESTORE_YY_MORE_OFFSET
991
992 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
993 {
994 /* We're scanning a new file or input source. It's
995 * possible that this happened because the user
996 * just pointed yyin at a new source and called
997 * yylex(). If so, then we have to assure
998 * consistency between yy_current_buffer and our
999 * globals. Here is the right place to do so, because
1000 * this is the first action (other than possibly a
1001 * back-up) that will match for the new input source.
1002 */
1003 yy_n_chars = yy_current_buffer->yy_n_chars;
1004 yy_current_buffer->yy_input_file = yyin;
1005 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1006 }
1007
1008 /* Note that here we test for yy_c_buf_p "<=" to the position
1009 * of the first EOB in the buffer, since yy_c_buf_p will
1010 * already have been incremented past the NUL character
1011 * (since all states make transitions on EOB to the
1012 * end-of-buffer state). Contrast this with the test
1013 * in input().
1014 */
1015 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1016 { /* This was really a NUL. */
1017 yy_state_type yy_next_state;
1018
1019 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1020
1021 yy_current_state = yy_get_previous_state();
1022
1023 /* Okay, we're now positioned to make the NUL
1024 * transition. We couldn't have
1025 * yy_get_previous_state() go ahead and do it
1026 * for us because it doesn't know how to deal
1027 * with the possibility of jamming (and we don't
1028 * want to build jamming into it because then it
1029 * will run more slowly).
1030 */
1031
1032 yy_next_state = yy_try_NUL_trans( yy_current_state );
1033
1034 yy_bp = yytext_ptr + YY_MORE_ADJ;
1035
1036 if ( yy_next_state )
1037 {
1038 /* Consume the NUL. */
1039 yy_cp = ++yy_c_buf_p;
1040 yy_current_state = yy_next_state;
1041 goto yy_match;
1042 }
1043
1044 else
1045 {
1046 yy_cp = yy_c_buf_p;
1047 goto yy_find_action;
1048 }
1049 }
1050
1051 else switch ( yy_get_next_buffer() )
1052 {
1053 case EOB_ACT_END_OF_FILE:
1054 {
1055 yy_did_buffer_switch_on_eof = 0;
1056
1057 if ( yywrap() )
1058 {
1059 /* Note: because we've taken care in
1060 * yy_get_next_buffer() to have set up
1061 * yytext, we can now set up
1062 * yy_c_buf_p so that if some total
1063 * hoser (like flex itself) wants to
1064 * call the scanner after we return the
1065 * YY_NULL, it'll still work - another
1066 * YY_NULL will get returned.
1067 */
1068 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1069
1070 yy_act = YY_STATE_EOF(YY_START);
1071 goto do_action;
1072 }
1073
1074 else
1075 {
1076 if ( ! yy_did_buffer_switch_on_eof )
1077 YY_NEW_FILE;
1078 }
1079 break;
1080 }
1081
1082 case EOB_ACT_CONTINUE_SCAN:
1083 yy_c_buf_p =
1084 yytext_ptr + yy_amount_of_matched_text;
1085
1086 yy_current_state = yy_get_previous_state();
1087
1088 yy_cp = yy_c_buf_p;
1089 yy_bp = yytext_ptr + YY_MORE_ADJ;
1090 goto yy_match;
1091
1092 case EOB_ACT_LAST_MATCH:
1093 yy_c_buf_p =
1094 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1095
1096 yy_current_state = yy_get_previous_state();
1097
1098 yy_cp = yy_c_buf_p;
1099 yy_bp = yytext_ptr + YY_MORE_ADJ;
1100 goto yy_find_action;
1101 }
1102 break;
1103 }
1104
1105 default:
1106 YY_FATAL_ERROR(
1107 "fatal flex scanner internal error--no action found" );
1108 } /* end of action switch */
1109 } /* end of scanning one token */
1110 } /* end of yylex */
1111
1112
1113/* yy_get_next_buffer - try to read in a new buffer
1114 *
1115 * Returns a code representing an action:
1116 * EOB_ACT_LAST_MATCH -
1117 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1118 * EOB_ACT_END_OF_FILE - end of file
1119 */
1120
1121static int yy_get_next_buffer()
1122 {
1123 register char *dest = yy_current_buffer->yy_ch_buf;
1124 register char *source = yytext_ptr;
1125 register int number_to_move, i;
1126 int ret_val;
1127
1128 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1129 YY_FATAL_ERROR(
1130 "fatal flex scanner internal error--end of buffer missed" );
1131
1132 if ( yy_current_buffer->yy_fill_buffer == 0 )
1133 { /* Don't try to fill the buffer, so this is an EOF. */
1134 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1135 {
1136 /* We matched a single character, the EOB, so
1137 * treat this as a final EOF.
1138 */
1139 return EOB_ACT_END_OF_FILE;
1140 }
1141
1142 else
1143 {
1144 /* We matched some text prior to the EOB, first
1145 * process it.
1146 */
1147 return EOB_ACT_LAST_MATCH;
1148 }
1149 }
1150
1151 /* Try to read more data. */
1152
1153 /* First move last chars to start of buffer. */
1154 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1155
1156 for ( i = 0; i < number_to_move; ++i )
1157 *(dest++) = *(source++);
1158
1159 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1160 /* don't do the read, it's not guaranteed to return an EOF,
1161 * just force an EOF
1162 */
1163 yy_n_chars = 0;
1164
1165 else
1166 {
1167 int num_to_read =
1168 yy_current_buffer->yy_buf_size - number_to_move - 1;
1169
1170 while ( num_to_read <= 0 )
1171 { /* Not enough room in the buffer - grow it. */
1172#ifdef YY_USES_REJECT
1173 YY_FATAL_ERROR(
1174"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1175#else
1176
1177 /* just a shorter name for the current buffer */
1178 YY_BUFFER_STATE b = yy_current_buffer;
1179
1180 int yy_c_buf_p_offset =
1181 (int) (yy_c_buf_p - b->yy_ch_buf);
1182
1183 if ( b->yy_is_our_buffer )
1184 {
1185 int new_size = b->yy_buf_size * 2;
1186
1187 if ( new_size <= 0 )
1188 b->yy_buf_size += b->yy_buf_size / 8;
1189 else
1190 b->yy_buf_size *= 2;
1191
1192 b->yy_ch_buf = (char *)
1193 /* Include room in for 2 EOB chars. */
1194 yy_flex_realloc( (void *) b->yy_ch_buf,
1195 b->yy_buf_size + 2 );
1196 }
1197 else
1198 /* Can't grow it, we don't own it. */
1199 b->yy_ch_buf = 0;
1200
1201 if ( ! b->yy_ch_buf )
1202 YY_FATAL_ERROR(
1203 "fatal error - scanner input buffer overflow" );
1204
1205 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1206
1207 num_to_read = yy_current_buffer->yy_buf_size -
1208 number_to_move - 1;
1209#endif
1210 }
1211
1212 if ( num_to_read > YY_READ_BUF_SIZE )
1213 num_to_read = YY_READ_BUF_SIZE;
1214
1215 /* Read in more data. */
1216 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1217 yy_n_chars, num_to_read );
1218 }
1219
1220 if ( yy_n_chars == 0 )
1221 {
1222 if ( number_to_move == YY_MORE_ADJ )
1223 {
1224 ret_val = EOB_ACT_END_OF_FILE;
1225 yyrestart( yyin );
1226 }
1227
1228 else
1229 {
1230 ret_val = EOB_ACT_LAST_MATCH;
1231 yy_current_buffer->yy_buffer_status =
1232 YY_BUFFER_EOF_PENDING;
1233 }
1234 }
1235
1236 else
1237 ret_val = EOB_ACT_CONTINUE_SCAN;
1238
1239 yy_n_chars += number_to_move;
1240 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1241 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1242
1243 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1244
1245 return ret_val;
1246 }
1247
1248
1249/* yy_get_previous_state - get the state just before the EOB char was reached */
1250
1251static yy_state_type yy_get_previous_state()
1252 {
1253 register yy_state_type yy_current_state;
1254 register char *yy_cp;
1255
1256 yy_current_state = yy_start;
1257 yy_state_ptr = yy_state_buf;
1258 *yy_state_ptr++ = yy_current_state;
1259
1260 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1261 {
1262 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 39);
1263 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1264 {
1265 yy_current_state = (int) yy_def[yy_current_state];
1266 if ( yy_current_state >= 108 )
1267 yy_c = yy_meta[(unsigned int) yy_c];
1268 }
1269 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1270 *yy_state_ptr++ = yy_current_state;
1271 }
1272
1273 return yy_current_state;
1274 }
1275
1276
1277/* yy_try_NUL_trans - try to make a transition on the NUL character
1278 *
1279 * synopsis
1280 * next_state = yy_try_NUL_trans( current_state );
1281 */
1282
1283#ifdef YY_USE_PROTOS
1284static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1285#else
1286static yy_state_type yy_try_NUL_trans( yy_current_state )
1287yy_state_type yy_current_state;
1288#endif
1289 {
1290 register int yy_is_jam;
1291
1292 register YY_CHAR yy_c = 39;
1293 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1294 {
1295 yy_current_state = (int) yy_def[yy_current_state];
1296 if ( yy_current_state >= 108 )
1297 yy_c = yy_meta[(unsigned int) yy_c];
1298 }
1299 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1300 yy_is_jam = (yy_current_state == 107);
1301 if ( ! yy_is_jam )
1302 *yy_state_ptr++ = yy_current_state;
1303
1304 return yy_is_jam ? 0 : yy_current_state;
1305 }
1306
1307
1308#ifndef YY_NO_UNPUT
1309#ifdef YY_USE_PROTOS
1310static void yyunput( int c, register char *yy_bp )
1311#else
1312static void yyunput( c, yy_bp )
1313int c;
1314register char *yy_bp;
1315#endif
1316 {
1317 register char *yy_cp = yy_c_buf_p;
1318
1319 /* undo effects of setting up yytext */
1320 *yy_cp = yy_hold_char;
1321
1322 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1323 { /* need to shift things up to make room */
1324 /* +2 for EOB chars. */
1325 register int number_to_move = yy_n_chars + 2;
1326 register char *dest = &yy_current_buffer->yy_ch_buf[
1327 yy_current_buffer->yy_buf_size + 2];
1328 register char *source =
1329 &yy_current_buffer->yy_ch_buf[number_to_move];
1330
1331 while ( source > yy_current_buffer->yy_ch_buf )
1332 *--dest = *--source;
1333
1334 yy_cp += (int) (dest - source);
1335 yy_bp += (int) (dest - source);
1336 yy_n_chars = yy_current_buffer->yy_buf_size;
1337
1338 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1339 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1340 }
1341
1342 *--yy_cp = (char) c;
1343
1344
1345 yytext_ptr = yy_bp;
1346 yy_hold_char = *yy_cp;
1347 yy_c_buf_p = yy_cp;
1348 }
1349#endif /* ifndef YY_NO_UNPUT */
1350
1351
1352#ifdef __cplusplus
1353static int yyinput()
1354#else
1355static int input()
1356#endif
1357 {
1358 int c;
1359
1360 *yy_c_buf_p = yy_hold_char;
1361
1362 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1363 {
1364 /* yy_c_buf_p now points to the character we want to return.
1365 * If this occurs *before* the EOB characters, then it's a
1366 * valid NUL; if not, then we've hit the end of the buffer.
1367 */
1368 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1369 /* This was really a NUL. */
1370 *yy_c_buf_p = '\0';
1371
1372 else
1373 { /* need more input */
1374 int offset = yy_c_buf_p - yytext_ptr;
1375 ++yy_c_buf_p;
1376
1377 switch ( yy_get_next_buffer() )
1378 {
1379 case EOB_ACT_END_OF_FILE:
1380 {
1381 if ( yywrap() )
1382 {
1383 yy_c_buf_p = yytext_ptr + offset;
1384 return EOF;
1385 }
1386
1387 if ( ! yy_did_buffer_switch_on_eof )
1388 YY_NEW_FILE;
1389#ifdef __cplusplus
1390 return yyinput();
1391#else
1392 return input();
1393#endif
1394 }
1395
1396 case EOB_ACT_CONTINUE_SCAN:
1397 yy_c_buf_p = yytext_ptr + offset;
1398 break;
1399
1400 case EOB_ACT_LAST_MATCH:
1401#ifdef __cplusplus
1402 YY_FATAL_ERROR(
1403 "unexpected last match in yyinput()" );
1404#else
1405 YY_FATAL_ERROR(
1406 "unexpected last match in input()" );
1407#endif
1408 }
1409 }
1410 }
1411
1412 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1413 *yy_c_buf_p = '\0'; /* preserve yytext */
1414 yy_hold_char = *++yy_c_buf_p;
1415
1416
1417 return c;
1418 }
1419
1420
1421#ifdef YY_USE_PROTOS
1422void yyrestart( FILE *input_file )
1423#else
1424void yyrestart( input_file )
1425FILE *input_file;
1426#endif
1427 {
1428 if ( ! yy_current_buffer )
1429 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1430
1431 yy_init_buffer( yy_current_buffer, input_file );
1432 yy_load_buffer_state();
1433 }
1434
1435
1436#ifdef YY_USE_PROTOS
1437void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1438#else
1439void yy_switch_to_buffer( new_buffer )
1440YY_BUFFER_STATE new_buffer;
1441#endif
1442 {
1443 if ( yy_current_buffer == new_buffer )
1444 return;
1445
1446 if ( yy_current_buffer )
1447 {
1448 /* Flush out information for old buffer. */
1449 *yy_c_buf_p = yy_hold_char;
1450 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1451 yy_current_buffer->yy_n_chars = yy_n_chars;
1452 }
1453
1454 yy_current_buffer = new_buffer;
1455 yy_load_buffer_state();
1456
1457 /* We don't actually know whether we did this switch during
1458 * EOF (yywrap()) processing, but the only time this flag
1459 * is looked at is after yywrap() is called, so it's safe
1460 * to go ahead and always set it.
1461 */
1462 yy_did_buffer_switch_on_eof = 1;
1463 }
1464
1465
1466#ifdef YY_USE_PROTOS
1467void yy_load_buffer_state( void )
1468#else
1469void yy_load_buffer_state()
1470#endif
1471 {
1472 yy_n_chars = yy_current_buffer->yy_n_chars;
1473 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1474 yyin = yy_current_buffer->yy_input_file;
1475 yy_hold_char = *yy_c_buf_p;
1476 }
1477
1478
1479#ifdef YY_USE_PROTOS
1480YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1481#else
1482YY_BUFFER_STATE yy_create_buffer( file, size )
1483FILE *file;
1484int size;
1485#endif
1486 {
1487 YY_BUFFER_STATE b;
1488
1489 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1490 if ( ! b )
1491 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1492
1493 b->yy_buf_size = size;
1494
1495 /* yy_ch_buf has to be 2 characters longer than the size given because
1496 * we need to put in 2 end-of-buffer characters.
1497 */
1498 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1499 if ( ! b->yy_ch_buf )
1500 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1501
1502 b->yy_is_our_buffer = 1;
1503
1504 yy_init_buffer( b, file );
1505
1506 return b;
1507 }
1508
1509
1510#ifdef YY_USE_PROTOS
1511void yy_delete_buffer( YY_BUFFER_STATE b )
1512#else
1513void yy_delete_buffer( b )
1514YY_BUFFER_STATE b;
1515#endif
1516 {
1517 if ( ! b )
1518 return;
1519
1520 if ( b == yy_current_buffer )
1521 yy_current_buffer = (YY_BUFFER_STATE) 0;
1522
1523 if ( b->yy_is_our_buffer )
1524 yy_flex_free( (void *) b->yy_ch_buf );
1525
1526 yy_flex_free( (void *) b );
1527 }
1528
1529
1530#ifndef YY_ALWAYS_INTERACTIVE
1531#ifndef YY_NEVER_INTERACTIVE
1532extern int isatty YY_PROTO(( int ));
1533#endif
1534#endif
1535
1536#ifdef YY_USE_PROTOS
1537void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1538#else
1539void yy_init_buffer( b, file )
1540YY_BUFFER_STATE b;
1541FILE *file;
1542#endif
1543
1544
1545 {
1546 yy_flush_buffer( b );
1547
1548 b->yy_input_file = file;
1549 b->yy_fill_buffer = 1;
1550
1551#if YY_ALWAYS_INTERACTIVE
1552 b->yy_is_interactive = 1;
1553#else
1554#if YY_NEVER_INTERACTIVE
1555 b->yy_is_interactive = 0;
1556#else
1557 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1558#endif
1559#endif
1560 }
1561
1562
1563#ifdef YY_USE_PROTOS
1564void yy_flush_buffer( YY_BUFFER_STATE b )
1565#else
1566void yy_flush_buffer( b )
1567YY_BUFFER_STATE b;
1568#endif
1569
1570 {
1571 b->yy_n_chars = 0;
1572
1573 /* We always need two end-of-buffer characters. The first causes
1574 * a transition to the end-of-buffer state. The second causes
1575 * a jam in that state.
1576 */
1577 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1578 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1579
1580 b->yy_buf_pos = &b->yy_ch_buf[0];
1581
1582 b->yy_at_bol = 1;
1583 b->yy_buffer_status = YY_BUFFER_NEW;
1584
1585 if ( b == yy_current_buffer )
1586 yy_load_buffer_state();
1587 }
1588
1589
1590#ifndef YY_NO_SCAN_BUFFER
1591#ifdef YY_USE_PROTOS
1592YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1593#else
1594YY_BUFFER_STATE yy_scan_buffer( base, size )
1595char *base;
1596yy_size_t size;
1597#endif
1598 {
1599 YY_BUFFER_STATE b;
1600
1601 if ( size < 2 ||
1602 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1603 base[size-1] != YY_END_OF_BUFFER_CHAR )
1604 /* They forgot to leave room for the EOB's. */
1605 return 0;
1606
1607 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1608 if ( ! b )
1609 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1610
1611 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1612 b->yy_buf_pos = b->yy_ch_buf = base;
1613 b->yy_is_our_buffer = 0;
1614 b->yy_input_file = 0;
1615 b->yy_n_chars = b->yy_buf_size;
1616 b->yy_is_interactive = 0;
1617 b->yy_at_bol = 1;
1618 b->yy_fill_buffer = 0;
1619 b->yy_buffer_status = YY_BUFFER_NEW;
1620
1621 yy_switch_to_buffer( b );
1622
1623 return b;
1624 }
1625#endif
1626
1627
1628#ifndef YY_NO_SCAN_STRING
1629#ifdef YY_USE_PROTOS
1630YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1631#else
1632YY_BUFFER_STATE yy_scan_string( str )
1633yyconst char *str;
1634#endif
1635 {
1636 int len;
1637 for ( len = 0; str[len]; ++len )
1638 ;
1639
1640 return yy_scan_bytes( str, len );
1641 }
1642#endif
1643
1644
1645#ifndef YY_NO_SCAN_BYTES
1646#ifdef YY_USE_PROTOS
1647YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1648#else
1649YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1650yyconst char *bytes;
1651int len;
1652#endif
1653 {
1654 YY_BUFFER_STATE b;
1655 char *buf;
1656 yy_size_t n;
1657 int i;
1658
1659 /* Get memory for full buffer, including space for trailing EOB's. */
1660 n = len + 2;
1661 buf = (char *) yy_flex_alloc( n );
1662 if ( ! buf )
1663 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1664
1665 for ( i = 0; i < len; ++i )
1666 buf[i] = bytes[i];
1667
1668 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1669
1670 b = yy_scan_buffer( buf, n );
1671 if ( ! b )
1672 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1673
1674 /* It's okay to grow etc. this buffer, and we should throw it
1675 * away when we're done.
1676 */
1677 b->yy_is_our_buffer = 1;
1678
1679 return b;
1680 }
1681#endif
1682
1683
1684#ifndef YY_NO_PUSH_STATE
1685#ifdef YY_USE_PROTOS
1686static void yy_push_state( int new_state )
1687#else
1688static void yy_push_state( new_state )
1689int new_state;
1690#endif
1691 {
1692 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1693 {
1694 yy_size_t new_size;
1695
1696 yy_start_stack_depth += YY_START_STACK_INCR;
1697 new_size = yy_start_stack_depth * sizeof( int );
1698
1699 if ( ! yy_start_stack )
1700 yy_start_stack = (int *) yy_flex_alloc( new_size );
1701
1702 else
1703 yy_start_stack = (int *) yy_flex_realloc(
1704 (void *) yy_start_stack, new_size );
1705
1706 if ( ! yy_start_stack )
1707 YY_FATAL_ERROR(
1708 "out of memory expanding start-condition stack" );
1709 }
1710
1711 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1712
1713 BEGIN(new_state);
1714 }
1715#endif
1716
1717
1718#ifndef YY_NO_POP_STATE
1719static void yy_pop_state()
1720 {
1721 if ( --yy_start_stack_ptr < 0 )
1722 YY_FATAL_ERROR( "start-condition stack underflow" );
1723
1724 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1725 }
1726#endif
1727
1728
1729#ifndef YY_NO_TOP_STATE
1730static int yy_top_state()
1731 {
1732 return yy_start_stack[yy_start_stack_ptr - 1];
1733 }
1734#endif
1735
1736#ifndef YY_EXIT_FAILURE
1737#define YY_EXIT_FAILURE 2
1738#endif
1739
1740#ifdef YY_USE_PROTOS
1741static void yy_fatal_error( yyconst char msg[] )
1742#else
1743static void yy_fatal_error( msg )
1744char msg[];
1745#endif
1746 {
1747 (void) fprintf( stderr, "%s\n", msg );
1748 exit( YY_EXIT_FAILURE );
1749 }
1750
1751
1752
1753/* Redefine yyless() so it works in section 3 code. */
1754
1755#undef yyless
1756#define yyless(n) \
1757 do \
1758 { \
1759 /* Undo effects of setting up yytext. */ \
1760 yytext[yyleng] = yy_hold_char; \
1761 yy_c_buf_p = yytext + n; \
1762 yy_hold_char = *yy_c_buf_p; \
1763 *yy_c_buf_p = '\0'; \
1764 yyleng = n; \
1765 } \
1766 while ( 0 )
1767
1768
1769/* Internal utility routines. */
1770
1771#ifndef yytext_ptr
1772#ifdef YY_USE_PROTOS
1773static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1774#else
1775static void yy_flex_strncpy( s1, s2, n )
1776char *s1;
1777yyconst char *s2;
1778int n;
1779#endif
1780 {
1781 register int i;
1782 for ( i = 0; i < n; ++i )
1783 s1[i] = s2[i];
1784 }
1785#endif
1786
1787#ifdef YY_NEED_STRLEN
1788#ifdef YY_USE_PROTOS
1789static int yy_flex_strlen( yyconst char *s )
1790#else
1791static int yy_flex_strlen( s )
1792yyconst char *s;
1793#endif
1794 {
1795 register int n;
1796 for ( n = 0; s[n]; ++n )
1797 ;
1798
1799 return n;
1800 }
1801#endif
1802
1803
1804#ifdef YY_USE_PROTOS
1805static void *yy_flex_alloc( yy_size_t size )
1806#else
1807static void *yy_flex_alloc( size )
1808yy_size_t size;
1809#endif
1810 {
1811 return (void *) malloc( size );
1812 }
1813
1814#ifdef YY_USE_PROTOS
1815static void *yy_flex_realloc( void *ptr, yy_size_t size )
1816#else
1817static void *yy_flex_realloc( ptr, size )
1818void *ptr;
1819yy_size_t size;
1820#endif
1821 {
1822 /* The cast to (char *) in the following accommodates both
1823 * implementations that use char* generic pointers, and those
1824 * that use void* generic pointers. It works with the latter
1825 * because both ANSI C and C++ allow castless assignment from
1826 * any pointer type to void*, and deal with argument conversions
1827 * as though doing an assignment.
1828 */
1829 return (void *) realloc( (char *) ptr, size );
1830 }
1831
1832#ifdef YY_USE_PROTOS
1833static void yy_flex_free( void *ptr )
1834#else
1835static void yy_flex_free( ptr )
1836void *ptr;
1837#endif
1838 {
1839 free( ptr );
1840 }
1841
1842#if YY_MAIN
1843int main()
1844 {
1845 yylex();
1846 return 0;
1847 }
1848#endif