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 */
533 // add includes for flex 2.91 (Linux version)
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
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"
551 #pragma warning(disable:4131 4244 4273 4127 4267)
557 void steperror ( FILE *input_file );
558 void steprestart ( FILE *input_file );
560 void rec_restext(char *newtext, int lentext);
561 void rec_typarg(int argtype);
563 int steplineno; /* Comptage de ligne (ben oui, fait tout faire) */
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); }
570 // disable GCC warnings in flex code
572 #pragma GCC diagnostic ignored "-Wunused-function"
576 /* Macros after this point can all be overridden by user definitions in
580 #ifndef YY_SKIP_YYWRAP
582 extern "C" int yywrap YY_PROTO(( void ));
584 extern int yywrap YY_PROTO(( void ));
589 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
593 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
596 #ifdef YY_NEED_STRLEN
597 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
602 static int yyinput YY_PROTO(( void ));
604 static int input YY_PROTO(( void ));
609 static int yy_start_stack_ptr = 0;
610 static int yy_start_stack_depth = 0;
611 static int *yy_start_stack = 0;
612 #ifndef YY_NO_PUSH_STATE
613 static void yy_push_state YY_PROTO(( int new_state ));
615 #ifndef YY_NO_POP_STATE
616 static void yy_pop_state YY_PROTO(( void ));
618 #ifndef YY_NO_TOP_STATE
619 static int yy_top_state YY_PROTO(( void ));
623 #define YY_NO_PUSH_STATE 1
624 #define YY_NO_POP_STATE 1
625 #define YY_NO_TOP_STATE 1
628 #ifdef YY_MALLOC_DECL
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).
643 /* Amount of stuff to slurp up with each read. */
644 #ifndef YY_READ_BUF_SIZE
645 #define YY_READ_BUF_SIZE 8192
648 /* Copy whatever the last rule matched to the standard output. */
651 /* This used to be an fputs(), but since the string might contain NUL's,
652 * we now use fwrite().
654 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
657 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
658 * is returned in "result".
661 #define YY_INPUT(buf,result,max_size) \
662 if ( yy_current_buffer->yy_is_interactive ) \
665 for ( n = 0; n < max_size && \
666 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
669 buf[n++] = (char) c; \
670 if ( c == EOF && ferror( yyin ) ) \
671 YY_FATAL_ERROR( "input in flex scanner failed" ); \
674 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
675 && ferror( yyin ) ) \
676 YY_FATAL_ERROR( "input in flex scanner failed" );
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.
684 #define yyterminate() return YY_NULL
687 /* Number of entries by which start-condition stack grows. */
688 #ifndef YY_START_STACK_INCR
689 #define YY_START_STACK_INCR 25
692 /* Report a fatal error. */
693 #ifndef YY_FATAL_ERROR
694 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
697 /* Default declaration of generated scanner - a define so the user can
698 * easily add parameters.
701 #define YY_DECL int yylex YY_PROTO(( void ))
704 /* Code executed at the beginning of each rule, after yytext and yyleng
707 #ifndef YY_USER_ACTION
708 #define YY_USER_ACTION
711 /* Code executed at the end of each rule. */
713 #define YY_BREAK break;
716 #define YY_RULE_SETUP \
721 register yy_state_type yy_current_state;
722 register char *yy_cp, *yy_bp;
736 yy_start = 1; /* first start state */
744 if ( ! yy_current_buffer )
746 yy_create_buffer( yyin, YY_BUF_SIZE );
748 yy_load_buffer_state();
751 while ( 1 ) /* loops until end-of-file is reached */
755 /* Support of yytext. */
756 *yy_cp = yy_hold_char;
758 /* yy_bp points to the position in yy_ch_buf of the start of
763 yy_current_state = yy_start;
764 yy_state_ptr = yy_state_buf;
765 *yy_state_ptr++ = yy_current_state;
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 )
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];
776 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
777 *yy_state_ptr++ = yy_current_state;
780 while ( yy_base[yy_current_state] != 210 );
783 yy_current_state = *--yy_state_ptr;
784 yy_lp = yy_accept[yy_current_state];
785 find_rule: /* we branch to this label when backing up */
786 for ( ; ; ) /* until we find what rule we matched */
788 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
790 yy_act = yy_acclist[yy_lp];
791 if ( yy_act & YY_TRAILING_HEAD_MASK ||
792 yy_looking_for_trail_begin )
794 if ( yy_act == yy_looking_for_trail_begin )
796 yy_looking_for_trail_begin = 0;
797 yy_act &= ~YY_TRAILING_HEAD_MASK;
801 else if ( yy_act & YY_TRAILING_MASK )
803 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
804 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
808 yy_full_match = yy_cp;
809 yy_full_state = yy_state_ptr;
817 yy_current_state = *--yy_state_ptr;
818 yy_lp = yy_accept[yy_current_state];
824 do_action: /* This label is used only to access EOF actions. */
828 { /* beginning of action switch */
843 {;} /* abv 30.06.00: for reading DOS files */
847 {;} /* fix from C21. for test load e3i file with line 15 with null symbols */
850 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
851 yy_c_buf_p = yy_cp -= 1;
852 YY_DO_BEFORE_ACTION; /* set up yytext again */
854 { resultat(); if (modcom == 0) return(ENTITY); }
858 { resultat(); if (modcom == 0) return(ENTITY); }
862 { resultat(); if (modcom == 0) return(IDENT); }
866 { resultat(); if (modcom == 0) { rec_typarg(rec_argInteger); return(QUID); } }
870 { resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
874 { resultat(); if (modcom == 0) { rec_typarg(rec_argFloat); return(QUID); } }
878 { resultat(); if (modcom == 0) { rec_typarg(rec_argText); return(QUID); } }
882 { resultat(); if (modcom == 0) { rec_typarg(rec_argHexa); return(QUID); } }
886 { resultat(); if (modcom == 0) { rec_typarg(rec_argEnum); return(QUID); } }
890 { if (modcom == 0) return ('('); }
894 { if (modcom == 0) return (')'); }
898 { if (modcom == 0) return (','); }
902 { resultat(); if (modcom == 0) { rec_typarg(rec_argNondef); return(QUID); } }
906 { if (modcom == 0) return ('='); }
910 { if (modcom == 0) return (';'); }
918 { if (modend == 0) modcom = 0; }
922 { if (modcom == 0) return(STEP); }
926 { if (modcom == 0) return(HEADER); }
930 { if (modcom == 0) return(ENDSEC); }
934 { if (modcom == 0) return(DATA); }
938 { if (modend == 0) {modcom = 0; return(ENDSTEP);} }
942 { if (modend == 0) {modcom = 0; return(ENDSTEP);} }
946 { modcom = 1; modend = 1; return(ENDSTEP); }
950 { if (modend == 0) {modcom = 0; return(STEP); } }
954 { if (modcom == 0) return ('/'); }
958 { if (modcom == 0) return(SCOPE); }
962 { if (modcom == 0) return(ENDSCOPE); }
966 { resultat(); if (modcom == 0) return(TYPE); }
970 { resultat(); if (modcom == 0) return(TYPE); }
974 { resultat(); if (modcom == 0) { rec_typarg(rec_argMisc); return(QUID); } }
980 case YY_STATE_EOF(INITIAL):
983 case YY_END_OF_BUFFER:
985 /* Amount of text matched not including the EOB char. */
986 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
988 /* Undo the effects of YY_DO_BEFORE_ACTION. */
989 *yy_cp = yy_hold_char;
990 YY_RESTORE_YY_MORE_OFFSET
992 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
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.
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;
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
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;
1019 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1021 yy_current_state = yy_get_previous_state();
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).
1032 yy_next_state = yy_try_NUL_trans( yy_current_state );
1034 yy_bp = yytext_ptr + YY_MORE_ADJ;
1036 if ( yy_next_state )
1038 /* Consume the NUL. */
1039 yy_cp = ++yy_c_buf_p;
1040 yy_current_state = yy_next_state;
1047 goto yy_find_action;
1051 else switch ( yy_get_next_buffer() )
1053 case EOB_ACT_END_OF_FILE:
1055 yy_did_buffer_switch_on_eof = 0;
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.
1068 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1070 yy_act = YY_STATE_EOF(YY_START);
1076 if ( ! yy_did_buffer_switch_on_eof )
1082 case EOB_ACT_CONTINUE_SCAN:
1084 yytext_ptr + yy_amount_of_matched_text;
1086 yy_current_state = yy_get_previous_state();
1089 yy_bp = yytext_ptr + YY_MORE_ADJ;
1092 case EOB_ACT_LAST_MATCH:
1094 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1096 yy_current_state = yy_get_previous_state();
1099 yy_bp = yytext_ptr + YY_MORE_ADJ;
1100 goto yy_find_action;
1107 "fatal flex scanner internal error--no action found" );
1108 } /* end of action switch */
1109 } /* end of scanning one token */
1110 } /* end of yylex */
1113 /* yy_get_next_buffer - try to read in a new buffer
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
1121 static int yy_get_next_buffer()
1123 register char *dest = yy_current_buffer->yy_ch_buf;
1124 register char *source = yytext_ptr;
1125 register int number_to_move, i;
1128 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1130 "fatal flex scanner internal error--end of buffer missed" );
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 )
1136 /* We matched a single character, the EOB, so
1137 * treat this as a final EOF.
1139 return EOB_ACT_END_OF_FILE;
1144 /* We matched some text prior to the EOB, first
1147 return EOB_ACT_LAST_MATCH;
1151 /* Try to read more data. */
1153 /* First move last chars to start of buffer. */
1154 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1156 for ( i = 0; i < number_to_move; ++i )
1157 *(dest++) = *(source++);
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,
1168 yy_current_buffer->yy_buf_size - number_to_move - 1;
1170 while ( num_to_read <= 0 )
1171 { /* Not enough room in the buffer - grow it. */
1172 #ifdef YY_USES_REJECT
1174 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1177 /* just a shorter name for the current buffer */
1178 YY_BUFFER_STATE b = yy_current_buffer;
1180 int yy_c_buf_p_offset =
1181 (int) (yy_c_buf_p - b->yy_ch_buf);
1183 if ( b->yy_is_our_buffer )
1185 int new_size = b->yy_buf_size * 2;
1187 if ( new_size <= 0 )
1188 b->yy_buf_size += b->yy_buf_size / 8;
1190 b->yy_buf_size *= 2;
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 );
1198 /* Can't grow it, we don't own it. */
1201 if ( ! b->yy_ch_buf )
1203 "fatal error - scanner input buffer overflow" );
1205 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1207 num_to_read = yy_current_buffer->yy_buf_size -
1212 if ( num_to_read > YY_READ_BUF_SIZE )
1213 num_to_read = YY_READ_BUF_SIZE;
1215 /* Read in more data. */
1216 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1217 yy_n_chars, num_to_read );
1220 if ( yy_n_chars == 0 )
1222 if ( number_to_move == YY_MORE_ADJ )
1224 ret_val = EOB_ACT_END_OF_FILE;
1230 ret_val = EOB_ACT_LAST_MATCH;
1231 yy_current_buffer->yy_buffer_status =
1232 YY_BUFFER_EOF_PENDING;
1237 ret_val = EOB_ACT_CONTINUE_SCAN;
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;
1243 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1249 /* yy_get_previous_state - get the state just before the EOB char was reached */
1251 static yy_state_type yy_get_previous_state()
1253 register yy_state_type yy_current_state;
1254 register char *yy_cp;
1256 yy_current_state = yy_start;
1257 yy_state_ptr = yy_state_buf;
1258 *yy_state_ptr++ = yy_current_state;
1260 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
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 )
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];
1269 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1270 *yy_state_ptr++ = yy_current_state;
1273 return yy_current_state;
1277 /* yy_try_NUL_trans - try to make a transition on the NUL character
1280 * next_state = yy_try_NUL_trans( current_state );
1283 #ifdef YY_USE_PROTOS
1284 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1286 static yy_state_type yy_try_NUL_trans( yy_current_state )
1287 yy_state_type yy_current_state;
1290 register int yy_is_jam;
1292 register YY_CHAR yy_c = 39;
1293 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1299 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1300 yy_is_jam = (yy_current_state == 107);
1302 *yy_state_ptr++ = yy_current_state;
1304 return yy_is_jam ? 0 : yy_current_state;
1309 #ifdef YY_USE_PROTOS
1310 static void yyunput( int c, register char *yy_bp )
1312 static void yyunput( c, yy_bp )
1314 register char *yy_bp;
1317 register char *yy_cp = yy_c_buf_p;
1319 /* undo effects of setting up yytext */
1320 *yy_cp = yy_hold_char;
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];
1331 while ( source > yy_current_buffer->yy_ch_buf )
1332 *--dest = *--source;
1334 yy_cp += (int) (dest - source);
1335 yy_bp += (int) (dest - source);
1336 yy_n_chars = yy_current_buffer->yy_buf_size;
1338 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1339 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1342 *--yy_cp = (char) c;
1346 yy_hold_char = *yy_cp;
1349 #endif /* ifndef YY_NO_UNPUT */
1353 static int yyinput()
1360 *yy_c_buf_p = yy_hold_char;
1362 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
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.
1368 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1369 /* This was really a NUL. */
1373 { /* need more input */
1374 int offset = yy_c_buf_p - yytext_ptr;
1377 switch ( yy_get_next_buffer() )
1379 case EOB_ACT_END_OF_FILE:
1383 yy_c_buf_p = yytext_ptr + offset;
1387 if ( ! yy_did_buffer_switch_on_eof )
1396 case EOB_ACT_CONTINUE_SCAN:
1397 yy_c_buf_p = yytext_ptr + offset;
1400 case EOB_ACT_LAST_MATCH:
1403 "unexpected last match in yyinput()" );
1406 "unexpected last match in input()" );
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;
1421 #ifdef YY_USE_PROTOS
1422 void yyrestart( FILE *input_file )
1424 void yyrestart( input_file )
1428 if ( ! yy_current_buffer )
1429 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1431 yy_init_buffer( yy_current_buffer, input_file );
1432 yy_load_buffer_state();
1436 #ifdef YY_USE_PROTOS
1437 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1439 void yy_switch_to_buffer( new_buffer )
1440 YY_BUFFER_STATE new_buffer;
1443 if ( yy_current_buffer == new_buffer )
1446 if ( yy_current_buffer )
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;
1454 yy_current_buffer = new_buffer;
1455 yy_load_buffer_state();
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.
1462 yy_did_buffer_switch_on_eof = 1;
1466 #ifdef YY_USE_PROTOS
1467 void yy_load_buffer_state( void )
1469 void yy_load_buffer_state()
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;
1479 #ifdef YY_USE_PROTOS
1480 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1482 YY_BUFFER_STATE yy_create_buffer( file, size )
1489 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1491 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1493 b->yy_buf_size = size;
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.
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()" );
1502 b->yy_is_our_buffer = 1;
1504 yy_init_buffer( b, file );
1510 #ifdef YY_USE_PROTOS
1511 void yy_delete_buffer( YY_BUFFER_STATE b )
1513 void yy_delete_buffer( b )
1520 if ( b == yy_current_buffer )
1521 yy_current_buffer = (YY_BUFFER_STATE) 0;
1523 if ( b->yy_is_our_buffer )
1524 yy_flex_free( (void *) b->yy_ch_buf );
1526 yy_flex_free( (void *) b );
1530 #ifndef YY_ALWAYS_INTERACTIVE
1531 #ifndef YY_NEVER_INTERACTIVE
1532 extern int isatty YY_PROTO(( int ));
1536 #ifdef YY_USE_PROTOS
1537 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1539 void yy_init_buffer( b, file )
1546 yy_flush_buffer( b );
1548 b->yy_input_file = file;
1549 b->yy_fill_buffer = 1;
1551 #if YY_ALWAYS_INTERACTIVE
1552 b->yy_is_interactive = 1;
1554 #if YY_NEVER_INTERACTIVE
1555 b->yy_is_interactive = 0;
1557 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1563 #ifdef YY_USE_PROTOS
1564 void yy_flush_buffer( YY_BUFFER_STATE b )
1566 void yy_flush_buffer( b )
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.
1577 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1578 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1580 b->yy_buf_pos = &b->yy_ch_buf[0];
1583 b->yy_buffer_status = YY_BUFFER_NEW;
1585 if ( b == yy_current_buffer )
1586 yy_load_buffer_state();
1590 #ifndef YY_NO_SCAN_BUFFER
1591 #ifdef YY_USE_PROTOS
1592 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1594 YY_BUFFER_STATE yy_scan_buffer( base, size )
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. */
1607 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1609 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
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;
1618 b->yy_fill_buffer = 0;
1619 b->yy_buffer_status = YY_BUFFER_NEW;
1621 yy_switch_to_buffer( b );
1628 #ifndef YY_NO_SCAN_STRING
1629 #ifdef YY_USE_PROTOS
1630 YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1632 YY_BUFFER_STATE yy_scan_string( str )
1637 for ( len = 0; str[len]; ++len )
1640 return yy_scan_bytes( str, len );
1645 #ifndef YY_NO_SCAN_BYTES
1646 #ifdef YY_USE_PROTOS
1647 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1649 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1650 yyconst char *bytes;
1659 /* Get memory for full buffer, including space for trailing EOB's. */
1661 buf = (char *) yy_flex_alloc( n );
1663 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1665 for ( i = 0; i < len; ++i )
1668 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1670 b = yy_scan_buffer( buf, n );
1672 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1674 /* It's okay to grow etc. this buffer, and we should throw it
1675 * away when we're done.
1677 b->yy_is_our_buffer = 1;
1684 #ifndef YY_NO_PUSH_STATE
1685 #ifdef YY_USE_PROTOS
1686 static void yy_push_state( int new_state )
1688 static void yy_push_state( new_state )
1692 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1696 yy_start_stack_depth += YY_START_STACK_INCR;
1697 new_size = yy_start_stack_depth * sizeof( int );
1699 if ( ! yy_start_stack )
1700 yy_start_stack = (int *) yy_flex_alloc( new_size );
1703 yy_start_stack = (int *) yy_flex_realloc(
1704 (void *) yy_start_stack, new_size );
1706 if ( ! yy_start_stack )
1708 "out of memory expanding start-condition stack" );
1711 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1718 #ifndef YY_NO_POP_STATE
1719 static void yy_pop_state()
1721 if ( --yy_start_stack_ptr < 0 )
1722 YY_FATAL_ERROR( "start-condition stack underflow" );
1724 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1729 #ifndef YY_NO_TOP_STATE
1730 static int yy_top_state()
1732 return yy_start_stack[yy_start_stack_ptr - 1];
1736 #ifndef YY_EXIT_FAILURE
1737 #define YY_EXIT_FAILURE 2
1740 #ifdef YY_USE_PROTOS
1741 static void yy_fatal_error( yyconst char msg[] )
1743 static void yy_fatal_error( msg )
1747 (void) fprintf( stderr, "%s\n", msg );
1748 exit( YY_EXIT_FAILURE );
1753 /* Redefine yyless() so it works in section 3 code. */
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'; \
1769 /* Internal utility routines. */
1772 #ifdef YY_USE_PROTOS
1773 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1775 static void yy_flex_strncpy( s1, s2, n )
1782 for ( i = 0; i < n; ++i )
1787 #ifdef YY_NEED_STRLEN
1788 #ifdef YY_USE_PROTOS
1789 static int yy_flex_strlen( yyconst char *s )
1791 static int yy_flex_strlen( s )
1796 for ( n = 0; s[n]; ++n )
1804 #ifdef YY_USE_PROTOS
1805 static void *yy_flex_alloc( yy_size_t size )
1807 static void *yy_flex_alloc( size )
1811 return (void *) malloc( size );
1814 #ifdef YY_USE_PROTOS
1815 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1817 static void *yy_flex_realloc( ptr, size )
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.
1829 return (void *) realloc( (char *) ptr, size );
1832 #ifdef YY_USE_PROTOS
1833 static void yy_flex_free( void *ptr )
1835 static void yy_flex_free( ptr )