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
12 #define yyleng stepleng
15 #define yyrestart steprestart
16 #define yytext steptext
17 #define yywrap stepwrap
19 /* A lexical scanner generated by flex */
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 $
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
38 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
51 /* Use prototypes in function declarations. */
54 /* The "const" storage-class-modifier is valid. */
57 #else /* ! __cplusplus */
65 #endif /* ! __cplusplus */
84 #define YY_PROTO(proto) proto
86 #define YY_PROTO(proto) ()
89 /* Returned upon end-of-file. */
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
97 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
103 #define BEGIN yy_start = 1 + 2 *
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
109 #define YY_START ((yy_start - 1) / 2)
110 #define YYSTATE YY_START
112 /* Action number for EOF rule of a given start state. */
113 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
115 /* Special action meaning "start processing a new file". */
116 #define YY_NEW_FILE yyrestart( yyin )
118 #define YY_END_OF_BUFFER_CHAR 0
120 /* Size of default input buffer. */
121 #define YY_BUF_SIZE 16384
123 typedef struct yy_buffer_state *YY_BUFFER_STATE;
126 extern FILE *yyin, *yyout;
128 #define EOB_ACT_CONTINUE_SCAN 0
129 #define EOB_ACT_END_OF_FILE 1
130 #define EOB_ACT_LAST_MATCH 2
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:
136 * if ( condition_holds )
139 * do_something_else();
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.
146 /* Return all but the first 'n' matched characters back to the input stream. */
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 */ \
159 #define unput(c) yyunput( c, yytext_ptr )
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).
165 typedef unsigned int yy_size_t;
168 struct yy_buffer_state
172 char *yy_ch_buf; /* input buffer */
173 char *yy_buf_pos; /* current position in input buffer */
175 /* Size of input buffer in bytes, not including room for EOB
178 yy_size_t yy_buf_size;
180 /* Number of characters read into yy_ch_buf, not including EOB
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
189 int yy_is_our_buffer;
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
196 int yy_is_interactive;
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
204 /* Whether to try to fill the input buffer when we reach the
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.
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.
222 #define YY_BUFFER_EOF_PENDING 2
225 static YY_BUFFER_STATE yy_current_buffer = 0;
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
231 #define YY_CURRENT_BUFFER yy_current_buffer
234 /* yy_hold_char holds the character lost when yytext is formed. */
235 static char yy_hold_char;
237 static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
250 static int yy_did_buffer_switch_on_eof;
252 void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
270 #define yy_new_buffer yy_create_buffer
272 #define yy_set_interactive(is_interactive) \
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; \
279 #define yy_set_bol(at_bol) \
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; \
286 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
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;
294 #define yytext_ptr yytext
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[] ));
301 /* Done after the current pattern has been matched and before the
302 * corresponding action - sets up yytext.
304 #define YY_DO_BEFORE_ACTION \
305 yytext_ptr = yy_bp; \
306 yyleng = (int) (yy_cp - yy_bp); \
307 yy_hold_char = *yy_cp; \
311 #define YY_NUM_RULES 37
312 #define YY_END_OF_BUFFER 38
313 static yyconst short int yy_acclist[146] =
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,
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,
333 static yyconst short int yy_accept[109] =
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,
346 139, 140, 140, 141, 143, 145, 146, 146
349 static yyconst int yy_ec[256] =
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,
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,
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,
381 static yyconst int yy_meta[40] =
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
389 static yyconst short int yy_base[114] =
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,
402 210, 148, 210, 71, 0, 0, 210, 166, 62, 172,
406 static yyconst short int yy_def[114] =
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,
419 107, 107, 107, 112, 113, 113, 0, 107, 107, 107,
423 static yyconst short int yy_nxt[250] =
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,
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,
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
454 static yyconst short int yy_chk[250] =
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,
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,
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
485 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
486 static char *yy_full_match;
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
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 */ \
503 #define yymore() yymore_used_but_not_detected
504 #define YY_MORE_ADJ 0
505 #define YY_RESTORE_YY_MORE_OFFSET
509 Copyright (c) 1999-2014 OPEN CASCADE SAS
511 This file is part of Open CASCADE Technology software library.
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.
519 Alternatively, this file may be used under the terms of Open CASCADE
520 commercial license or contractual agreement.
522 #include "step.tab.h"
523 #include "recfile.ph"
525 #include <StepFile_CallFailure.hxx>
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 )
531 /* abv 07.06.02: force inclusion of stdlib.h on WNT to avoid warnings */
535 void steperror ( FILE *input_file );
536 void steprestart ( FILE *input_file );
538 void rec_restext(char *newtext, int lentext);
539 void rec_typarg(int argtype);
541 int steplineno; /* Comptage de ligne (ben oui, fait tout faire) */
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); }
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)
556 #pragma warning(disable:4131 4244 4273 4267 4127)
559 // Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
560 #define YY_NO_UNISTD_H
564 // disable GCC warnings in flex code
566 #pragma GCC diagnostic ignored "-Wunused-function"
570 /* Macros after this point can all be overridden by user definitions in
574 #ifndef YY_SKIP_YYWRAP
576 extern "C" int yywrap YY_PROTO(( void ));
578 extern int yywrap YY_PROTO(( void ));
583 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
587 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
590 #ifdef YY_NEED_STRLEN
591 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
596 static int yyinput YY_PROTO(( void ));
598 static int input YY_PROTO(( void ));
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 ));
609 #ifndef YY_NO_POP_STATE
610 static void yy_pop_state YY_PROTO(( void ));
612 #ifndef YY_NO_TOP_STATE
613 static int yy_top_state YY_PROTO(( void ));
617 #define YY_NO_PUSH_STATE 1
618 #define YY_NO_POP_STATE 1
619 #define YY_NO_TOP_STATE 1
622 #ifdef YY_MALLOC_DECL
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).
637 /* Amount of stuff to slurp up with each read. */
638 #ifndef YY_READ_BUF_SIZE
639 #define YY_READ_BUF_SIZE 8192
642 /* Copy whatever the last rule matched to the standard output. */
645 /* This used to be an fputs(), but since the string might contain NUL's,
646 * we now use fwrite().
648 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
651 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
652 * is returned in "result".
655 #define YY_INPUT(buf,result,max_size) \
656 if ( yy_current_buffer->yy_is_interactive ) \
659 for ( n = 0; n < max_size && \
660 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
663 buf[n++] = (char) c; \
664 if ( c == EOF && ferror( yyin ) ) \
665 YY_FATAL_ERROR( "input in flex scanner failed" ); \
668 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
669 && ferror( yyin ) ) \
670 YY_FATAL_ERROR( "input in flex scanner failed" );
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.
678 #define yyterminate() return YY_NULL
681 /* Number of entries by which start-condition stack grows. */
682 #ifndef YY_START_STACK_INCR
683 #define YY_START_STACK_INCR 25
686 /* Report a fatal error. */
687 #ifndef YY_FATAL_ERROR
688 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
691 /* Default declaration of generated scanner - a define so the user can
692 * easily add parameters.
695 #define YY_DECL int yylex YY_PROTO(( void ))
698 /* Code executed at the beginning of each rule, after yytext and yyleng
701 #ifndef YY_USER_ACTION
702 #define YY_USER_ACTION
705 /* Code executed at the end of each rule. */
707 #define YY_BREAK break;
710 #define YY_RULE_SETUP \
715 register yy_state_type yy_current_state;
716 register char *yy_cp, *yy_bp;
730 yy_start = 1; /* first start state */
738 if ( ! yy_current_buffer )
740 yy_create_buffer( yyin, YY_BUF_SIZE );
742 yy_load_buffer_state();
745 while ( 1 ) /* loops until end-of-file is reached */
749 /* Support of yytext. */
750 *yy_cp = yy_hold_char;
752 /* yy_bp points to the position in yy_ch_buf of the start of
757 yy_current_state = yy_start;
758 yy_state_ptr = yy_state_buf;
759 *yy_state_ptr++ = yy_current_state;
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 )
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];
770 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
771 *yy_state_ptr++ = yy_current_state;
774 while ( yy_base[yy_current_state] != 210 );
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 */
782 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
784 yy_act = yy_acclist[yy_lp];
785 if ( yy_act & YY_TRAILING_HEAD_MASK ||
786 yy_looking_for_trail_begin )
788 if ( yy_act == yy_looking_for_trail_begin )
790 yy_looking_for_trail_begin = 0;
791 yy_act &= ~YY_TRAILING_HEAD_MASK;
795 else if ( yy_act & YY_TRAILING_MASK )
797 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
798 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
802 yy_full_match = yy_cp;
803 yy_full_state = yy_state_ptr;
811 yy_current_state = *--yy_state_ptr;
812 yy_lp = yy_accept[yy_current_state];
818 do_action: /* This label is used only to access EOF actions. */
822 { /* beginning of action switch */
837 {;} /* abv 30.06.00: for reading DOS files */
841 {;} /* fix from C21. for test load e3i file with line 15 with null symbols */
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 */
848 { resultat(); if (modcom == 0) return(ENTITY); }
852 { resultat(); if (modcom == 0) return(ENTITY); }
856 { resultat(); if (modcom == 0) return(IDENT); }
860 { resultat(); if (modcom == 0) { rec_typarg(rec_argInteger); return(QUID); } }
864 { resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
868 { resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
872 { resultat(); if (modcom == 0) { rec_typarg(rec_argText); return(QUID); } }
876 { resultat(); if (modcom == 0) { rec_typarg(rec_argHexa); return(QUID); } }
880 { resultat(); if (modcom == 0) { rec_typarg(rec_argEnum); return(QUID); } }
884 { if (modcom == 0) return ('('); }
888 { if (modcom == 0) return (')'); }
892 { if (modcom == 0) return (','); }
896 { resultat(); if (modcom == 0) { rec_typarg(rec_argNondef); return(QUID); } }
900 { if (modcom == 0) return ('='); }
904 { if (modcom == 0) return (';'); }
912 { if (modend == 0) modcom = 0; }
916 { if (modcom == 0) return(STEP); }
920 { if (modcom == 0) return(HEADER); }
924 { if (modcom == 0) return(ENDSEC); }
928 { if (modcom == 0) return(DATA); }
932 { if (modend == 0) {modcom = 0; return(ENDSTEP);} }
936 { if (modend == 0) {modcom = 0; return(ENDSTEP);} }
940 { modcom = 1; modend = 1; return(ENDSTEP); }
944 { if (modend == 0) {modcom = 0; return(STEP); } }
948 { if (modcom == 0) return ('/'); }
952 { if (modcom == 0) return(SCOPE); }
956 { if (modcom == 0) return(ENDSCOPE); }
960 { resultat(); if (modcom == 0) return(TYPE); }
964 { resultat(); if (modcom == 0) return(TYPE); }
968 { resultat(); if (modcom == 0) { rec_typarg(rec_argMisc); return(QUID); } }
974 case YY_STATE_EOF(INITIAL):
977 case YY_END_OF_BUFFER:
979 /* Amount of text matched not including the EOB char. */
980 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
982 /* Undo the effects of YY_DO_BEFORE_ACTION. */
983 *yy_cp = yy_hold_char;
984 YY_RESTORE_YY_MORE_OFFSET
986 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
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.
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;
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
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;
1013 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1015 yy_current_state = yy_get_previous_state();
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).
1026 yy_next_state = yy_try_NUL_trans( yy_current_state );
1028 yy_bp = yytext_ptr + YY_MORE_ADJ;
1030 if ( yy_next_state )
1032 /* Consume the NUL. */
1033 yy_cp = ++yy_c_buf_p;
1034 yy_current_state = yy_next_state;
1041 goto yy_find_action;
1045 else switch ( yy_get_next_buffer() )
1047 case EOB_ACT_END_OF_FILE:
1049 yy_did_buffer_switch_on_eof = 0;
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.
1062 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1064 yy_act = YY_STATE_EOF(YY_START);
1070 if ( ! yy_did_buffer_switch_on_eof )
1076 case EOB_ACT_CONTINUE_SCAN:
1078 yytext_ptr + yy_amount_of_matched_text;
1080 yy_current_state = yy_get_previous_state();
1083 yy_bp = yytext_ptr + YY_MORE_ADJ;
1086 case EOB_ACT_LAST_MATCH:
1088 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1090 yy_current_state = yy_get_previous_state();
1093 yy_bp = yytext_ptr + YY_MORE_ADJ;
1094 goto yy_find_action;
1101 "fatal flex scanner internal error--no action found" );
1102 } /* end of action switch */
1103 } /* end of scanning one token */
1104 } /* end of yylex */
1107 /* yy_get_next_buffer - try to read in a new buffer
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
1115 static int yy_get_next_buffer()
1117 register char *dest = yy_current_buffer->yy_ch_buf;
1118 register char *source = yytext_ptr;
1119 register int number_to_move, i;
1122 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1124 "fatal flex scanner internal error--end of buffer missed" );
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 )
1130 /* We matched a single character, the EOB, so
1131 * treat this as a final EOF.
1133 return EOB_ACT_END_OF_FILE;
1138 /* We matched some text prior to the EOB, first
1141 return EOB_ACT_LAST_MATCH;
1145 /* Try to read more data. */
1147 /* First move last chars to start of buffer. */
1148 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1150 for ( i = 0; i < number_to_move; ++i )
1151 *(dest++) = *(source++);
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,
1162 yy_current_buffer->yy_buf_size - number_to_move - 1;
1164 while ( num_to_read <= 0 )
1165 { /* Not enough room in the buffer - grow it. */
1166 #ifdef YY_USES_REJECT
1168 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1171 /* just a shorter name for the current buffer */
1172 YY_BUFFER_STATE b = yy_current_buffer;
1174 int yy_c_buf_p_offset =
1175 (int) (yy_c_buf_p - b->yy_ch_buf);
1177 if ( b->yy_is_our_buffer )
1179 int new_size = b->yy_buf_size * 2;
1181 if ( new_size <= 0 )
1182 b->yy_buf_size += b->yy_buf_size / 8;
1184 b->yy_buf_size *= 2;
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 );
1192 /* Can't grow it, we don't own it. */
1195 if ( ! b->yy_ch_buf )
1197 "fatal error - scanner input buffer overflow" );
1199 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1201 num_to_read = yy_current_buffer->yy_buf_size -
1206 if ( num_to_read > YY_READ_BUF_SIZE )
1207 num_to_read = YY_READ_BUF_SIZE;
1209 /* Read in more data. */
1210 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1211 yy_n_chars, num_to_read );
1214 if ( yy_n_chars == 0 )
1216 if ( number_to_move == YY_MORE_ADJ )
1218 ret_val = EOB_ACT_END_OF_FILE;
1224 ret_val = EOB_ACT_LAST_MATCH;
1225 yy_current_buffer->yy_buffer_status =
1226 YY_BUFFER_EOF_PENDING;
1231 ret_val = EOB_ACT_CONTINUE_SCAN;
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;
1237 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1243 /* yy_get_previous_state - get the state just before the EOB char was reached */
1245 static yy_state_type yy_get_previous_state()
1247 register yy_state_type yy_current_state;
1248 register char *yy_cp;
1250 yy_current_state = yy_start;
1251 yy_state_ptr = yy_state_buf;
1252 *yy_state_ptr++ = yy_current_state;
1254 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
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 )
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];
1263 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1264 *yy_state_ptr++ = yy_current_state;
1267 return yy_current_state;
1271 /* yy_try_NUL_trans - try to make a transition on the NUL character
1274 * next_state = yy_try_NUL_trans( current_state );
1277 #ifdef YY_USE_PROTOS
1278 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1280 static yy_state_type yy_try_NUL_trans( yy_current_state )
1281 yy_state_type yy_current_state;
1284 register int yy_is_jam;
1286 register YY_CHAR yy_c = 39;
1287 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1293 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1294 yy_is_jam = (yy_current_state == 107);
1296 *yy_state_ptr++ = yy_current_state;
1298 return yy_is_jam ? 0 : yy_current_state;
1303 #ifdef YY_USE_PROTOS
1304 static void yyunput( int c, register char *yy_bp )
1306 static void yyunput( c, yy_bp )
1308 register char *yy_bp;
1311 register char *yy_cp = yy_c_buf_p;
1313 /* undo effects of setting up yytext */
1314 *yy_cp = yy_hold_char;
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];
1325 while ( source > yy_current_buffer->yy_ch_buf )
1326 *--dest = *--source;
1328 yy_cp += (int) (dest - source);
1329 yy_bp += (int) (dest - source);
1330 yy_n_chars = yy_current_buffer->yy_buf_size;
1332 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1333 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1336 *--yy_cp = (char) c;
1340 yy_hold_char = *yy_cp;
1343 #endif /* ifndef YY_NO_UNPUT */
1347 static int yyinput()
1354 *yy_c_buf_p = yy_hold_char;
1356 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
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.
1362 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1363 /* This was really a NUL. */
1367 { /* need more input */
1368 int offset = yy_c_buf_p - yytext_ptr;
1371 switch ( yy_get_next_buffer() )
1373 case EOB_ACT_END_OF_FILE:
1377 yy_c_buf_p = yytext_ptr + offset;
1381 if ( ! yy_did_buffer_switch_on_eof )
1390 case EOB_ACT_CONTINUE_SCAN:
1391 yy_c_buf_p = yytext_ptr + offset;
1394 case EOB_ACT_LAST_MATCH:
1397 "unexpected last match in yyinput()" );
1400 "unexpected last match in input()" );
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;
1415 #ifdef YY_USE_PROTOS
1416 void yyrestart( FILE *input_file )
1418 void yyrestart( input_file )
1422 if ( ! yy_current_buffer )
1423 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1425 yy_init_buffer( yy_current_buffer, input_file );
1426 yy_load_buffer_state();
1430 #ifdef YY_USE_PROTOS
1431 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1433 void yy_switch_to_buffer( new_buffer )
1434 YY_BUFFER_STATE new_buffer;
1437 if ( yy_current_buffer == new_buffer )
1440 if ( yy_current_buffer )
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;
1448 yy_current_buffer = new_buffer;
1449 yy_load_buffer_state();
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.
1456 yy_did_buffer_switch_on_eof = 1;
1460 #ifdef YY_USE_PROTOS
1461 void yy_load_buffer_state( void )
1463 void yy_load_buffer_state()
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;
1473 #ifdef YY_USE_PROTOS
1474 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1476 YY_BUFFER_STATE yy_create_buffer( file, size )
1483 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1485 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1487 b->yy_buf_size = size;
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.
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()" );
1496 b->yy_is_our_buffer = 1;
1498 yy_init_buffer( b, file );
1504 #ifdef YY_USE_PROTOS
1505 void yy_delete_buffer( YY_BUFFER_STATE b )
1507 void yy_delete_buffer( b )
1514 if ( b == yy_current_buffer )
1515 yy_current_buffer = (YY_BUFFER_STATE) 0;
1517 if ( b->yy_is_our_buffer )
1518 yy_flex_free( (void *) b->yy_ch_buf );
1520 yy_flex_free( (void *) b );
1524 #ifndef YY_ALWAYS_INTERACTIVE
1525 #ifndef YY_NEVER_INTERACTIVE
1526 extern int isatty YY_PROTO(( int ));
1530 #ifdef YY_USE_PROTOS
1531 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1533 void yy_init_buffer( b, file )
1540 yy_flush_buffer( b );
1542 b->yy_input_file = file;
1543 b->yy_fill_buffer = 1;
1545 #if YY_ALWAYS_INTERACTIVE
1546 b->yy_is_interactive = 1;
1548 #if YY_NEVER_INTERACTIVE
1549 b->yy_is_interactive = 0;
1551 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1557 #ifdef YY_USE_PROTOS
1558 void yy_flush_buffer( YY_BUFFER_STATE b )
1560 void yy_flush_buffer( b )
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.
1571 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1572 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1574 b->yy_buf_pos = &b->yy_ch_buf[0];
1577 b->yy_buffer_status = YY_BUFFER_NEW;
1579 if ( b == yy_current_buffer )
1580 yy_load_buffer_state();
1584 #ifndef YY_NO_SCAN_BUFFER
1585 #ifdef YY_USE_PROTOS
1586 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1588 YY_BUFFER_STATE yy_scan_buffer( base, size )
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. */
1601 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1603 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
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;
1612 b->yy_fill_buffer = 0;
1613 b->yy_buffer_status = YY_BUFFER_NEW;
1615 yy_switch_to_buffer( b );
1622 #ifndef YY_NO_SCAN_STRING
1623 #ifdef YY_USE_PROTOS
1624 YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1626 YY_BUFFER_STATE yy_scan_string( str )
1631 for ( len = 0; str[len]; ++len )
1634 return yy_scan_bytes( str, len );
1639 #ifndef YY_NO_SCAN_BYTES
1640 #ifdef YY_USE_PROTOS
1641 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1643 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1644 yyconst char *bytes;
1653 /* Get memory for full buffer, including space for trailing EOB's. */
1655 buf = (char *) yy_flex_alloc( n );
1657 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1659 for ( i = 0; i < len; ++i )
1662 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1664 b = yy_scan_buffer( buf, n );
1666 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1668 /* It's okay to grow etc. this buffer, and we should throw it
1669 * away when we're done.
1671 b->yy_is_our_buffer = 1;
1678 #ifndef YY_NO_PUSH_STATE
1679 #ifdef YY_USE_PROTOS
1680 static void yy_push_state( int new_state )
1682 static void yy_push_state( new_state )
1686 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1690 yy_start_stack_depth += YY_START_STACK_INCR;
1691 new_size = yy_start_stack_depth * sizeof( int );
1693 if ( ! yy_start_stack )
1694 yy_start_stack = (int *) yy_flex_alloc( new_size );
1697 yy_start_stack = (int *) yy_flex_realloc(
1698 (void *) yy_start_stack, new_size );
1700 if ( ! yy_start_stack )
1702 "out of memory expanding start-condition stack" );
1705 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1712 #ifndef YY_NO_POP_STATE
1713 static void yy_pop_state()
1715 if ( --yy_start_stack_ptr < 0 )
1716 YY_FATAL_ERROR( "start-condition stack underflow" );
1718 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1723 #ifndef YY_NO_TOP_STATE
1724 static int yy_top_state()
1726 return yy_start_stack[yy_start_stack_ptr - 1];
1730 #ifndef YY_EXIT_FAILURE
1731 #define YY_EXIT_FAILURE 2
1734 #ifdef YY_USE_PROTOS
1735 static void yy_fatal_error( yyconst char msg[] )
1737 static void yy_fatal_error( msg )
1741 (void) fprintf( stderr, "%s\n", msg );
1742 exit( YY_EXIT_FAILURE );
1747 /* Redefine yyless() so it works in section 3 code. */
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'; \
1763 /* Internal utility routines. */
1766 #ifdef YY_USE_PROTOS
1767 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1769 static void yy_flex_strncpy( s1, s2, n )
1776 for ( i = 0; i < n; ++i )
1781 #ifdef YY_NEED_STRLEN
1782 #ifdef YY_USE_PROTOS
1783 static int yy_flex_strlen( yyconst char *s )
1785 static int yy_flex_strlen( s )
1790 for ( n = 0; s[n]; ++n )
1798 #ifdef YY_USE_PROTOS
1799 static void *yy_flex_alloc( yy_size_t size )
1801 static void *yy_flex_alloc( size )
1805 return (void *) malloc( size );
1808 #ifdef YY_USE_PROTOS
1809 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1811 static void *yy_flex_realloc( ptr, size )
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.
1823 return (void *) realloc( (char *) ptr, size );
1826 #ifdef YY_USE_PROTOS
1827 static void yy_flex_free( void *ptr )
1829 static void yy_flex_free( ptr )