4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 35
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 typedef uint64_t flex_uint64_t;
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
59 /* Limits of integral types. */
61 #define INT8_MIN (-128)
64 #define INT16_MIN (-32767-1)
67 #define INT32_MIN (-2147483647-1)
70 #define INT8_MAX (127)
73 #define INT16_MAX (32767)
76 #define INT32_MAX (2147483647)
79 #define UINT8_MAX (255U)
82 #define UINT16_MAX (65535U)
85 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
92 /* The "const" storage-class-modifier is valid. */
95 #else /* ! __cplusplus */
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
106 #define yyconst const
111 /* Returned upon end-of-file. */
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115 * integer for use as an array index. If the signed char is negative,
116 * we want to instead treat it as an 8-bit unsigned char, hence the
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121 /* Enter a start condition. This macro really ought to take a parameter,
122 * but we do it the disgusting crufty way forced on us by the ()-less
123 * definition of BEGIN.
125 #define BEGIN (yy_start) = 1 + 2 *
127 /* Translate the current start state into a value that can be later handed
128 * to BEGIN to return to the state. The YYSTATE alias is for lex
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin )
140 #define YY_END_OF_BUFFER_CHAR 0
142 /* Size of default input buffer. */
144 #define YY_BUF_SIZE 16384
147 /* The state buf must be large enough to hold one state per character in the main buffer.
149 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152 #define YY_TYPEDEF_YY_BUFFER_STATE
153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
156 #ifndef YY_TYPEDEF_YY_SIZE_T
157 #define YY_TYPEDEF_YY_SIZE_T
158 typedef size_t yy_size_t;
161 extern yy_size_t yyleng;
163 extern FILE *yyin, *yyout;
165 #define EOB_ACT_CONTINUE_SCAN 0
166 #define EOB_ACT_END_OF_FILE 1
167 #define EOB_ACT_LAST_MATCH 2
169 #define YY_LESS_LINENO(n)
171 /* Return all but the first "n" matched characters back to the input stream. */
175 /* Undo effects of setting up yytext. */ \
176 int yyless_macro_arg = (n); \
177 YY_LESS_LINENO(yyless_macro_arg);\
178 *yy_cp = (yy_hold_char); \
179 YY_RESTORE_YY_MORE_OFFSET \
180 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
181 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
185 #define unput(c) yyunput( c, (yytext_ptr) )
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
188 #define YY_STRUCT_YY_BUFFER_STATE
189 struct yy_buffer_state
193 char *yy_ch_buf; /* input buffer */
194 char *yy_buf_pos; /* current position in input buffer */
196 /* Size of input buffer in bytes, not including room for EOB
199 yy_size_t yy_buf_size;
201 /* Number of characters read into yy_ch_buf, not including EOB
204 yy_size_t yy_n_chars;
206 /* Whether we "own" the buffer - i.e., we know we created it,
207 * and can realloc() it to grow it, and should free() it to
210 int yy_is_our_buffer;
212 /* Whether this is an "interactive" input source; if so, and
213 * if we're using stdio for input, then we want to use getc()
214 * instead of fread(), to make sure we stop fetching input after
217 int yy_is_interactive;
219 /* Whether we're considered to be at the beginning of a line.
220 * If so, '^' rules will be active on the next match, otherwise
225 int yy_bs_lineno; /**< The line count. */
226 int yy_bs_column; /**< The column count. */
228 /* Whether to try to fill the input buffer when we reach the
233 int yy_buffer_status;
235 #define YY_BUFFER_NEW 0
236 #define YY_BUFFER_NORMAL 1
237 /* When an EOF's been seen but there's still some text to process
238 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
239 * shouldn't try reading from the input source any more. We might
240 * still have a bunch of tokens to match, though, because of
241 * possible backing-up.
243 * When we actually see the EOF, we change the status to "new"
244 * (via yyrestart()), so that the user can continue scanning by
245 * just pointing yyin at a new input file.
247 #define YY_BUFFER_EOF_PENDING 2
250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
252 /* Stack of input buffers. */
253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
257 /* We provide macros for accessing buffer states in case in the
258 * future we want to put the buffer states in a more general
261 * Returns the top of the stack, or NULL.
263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
264 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
267 /* Same as previous macro, but useful when we know that the buffer stack is not
268 * NULL or when we need an lvalue. For internal use only.
270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
272 /* yy_hold_char holds the character lost when yytext is formed. */
273 static char yy_hold_char;
274 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
277 /* Points to current character in buffer. */
278 static char *yy_c_buf_p = (char *) 0;
279 static int yy_init = 0; /* whether we need to initialize */
280 static int yy_start = 0; /* start state number */
282 /* Flag which is used to allow yywrap()'s to do buffer switches
283 * instead of setting up a fresh yyin. A bit of a hack ...
285 static int yy_did_buffer_switch_on_eof;
287 void yyrestart (FILE *input_file );
288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
290 void yy_delete_buffer (YY_BUFFER_STATE b );
291 void yy_flush_buffer (YY_BUFFER_STATE b );
292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
293 void yypop_buffer_state (void );
295 static void yyensure_buffer_stack (void );
296 static void yy_load_buffer_state (void );
297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
305 void *yyalloc (yy_size_t );
306 void *yyrealloc (void *,yy_size_t );
307 void yyfree (void * );
309 #define yy_new_buffer yy_create_buffer
311 #define yy_set_interactive(is_interactive) \
313 if ( ! YY_CURRENT_BUFFER ){ \
314 yyensure_buffer_stack (); \
315 YY_CURRENT_BUFFER_LVALUE = \
316 yy_create_buffer(yyin,YY_BUF_SIZE ); \
318 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
321 #define yy_set_bol(at_bol) \
323 if ( ! YY_CURRENT_BUFFER ){\
324 yyensure_buffer_stack (); \
325 YY_CURRENT_BUFFER_LVALUE = \
326 yy_create_buffer(yyin,YY_BUF_SIZE ); \
328 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
333 typedef unsigned char YY_CHAR;
335 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
337 typedef int yy_state_type;
344 #define yytext_ptr yytext
346 static yy_state_type yy_get_previous_state (void );
347 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
348 static int yy_get_next_buffer (void );
349 static void yy_fatal_error (yyconst char msg[] );
351 /* Done after the current pattern has been matched and before the
352 * corresponding action - sets up yytext.
354 #define YY_DO_BEFORE_ACTION \
355 (yytext_ptr) = yy_bp; \
356 yyleng = (yy_size_t) (yy_cp - yy_bp); \
357 (yy_hold_char) = *yy_cp; \
359 (yy_c_buf_p) = yy_cp;
361 #define YY_NUM_RULES 25
362 #define YY_END_OF_BUFFER 26
363 /* This struct is not used in this scanner,
364 but its presence is necessary. */
367 flex_int32_t yy_verify;
370 static yyconst flex_int16_t yy_accept[81] =
372 0, 0, 26, 25, 7, 8, 5, 25, 1, 2,
373 11, 11, 6, 3, 4, 25, 25, 25, 25, 25,
374 25, 25, 0, 9, 11, 0, 6, 0, 0, 0,
375 0, 0, 0, 0, 0, 0, 0, 10, 0, 0,
376 13, 0, 0, 0, 0, 16, 0, 0, 0, 0,
377 0, 12, 15, 0, 23, 0, 0, 0, 0, 0,
378 0, 14, 18, 0, 0, 0, 0, 0, 17, 0,
379 24, 0, 0, 0, 20, 22, 0, 21, 19, 0
382 static yyconst flex_int32_t yy_ec[256] =
384 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 4, 1, 5, 1, 1, 1, 1, 1, 6,
388 7, 1, 1, 1, 1, 1, 1, 8, 9, 9,
389 9, 9, 9, 9, 9, 9, 9, 1, 10, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 11, 1, 12, 1, 1, 1, 13, 14, 15, 16,
395 17, 18, 19, 20, 21, 1, 1, 22, 1, 23,
396 24, 25, 1, 26, 27, 28, 29, 30, 1, 31,
397 32, 33, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 static yyconst flex_int32_t yy_meta[34] =
416 1, 1, 2, 1, 1, 1, 1, 3, 3, 1,
417 1, 1, 3, 3, 3, 3, 3, 3, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 static yyconst flex_int16_t yy_base[84] =
424 0, 0, 100, 101, 101, 101, 101, 94, 101, 101,
425 26, 28, 0, 101, 101, 82, 26, 18, 74, 79,
426 78, 81, 88, 101, 32, 0, 0, 76, 65, 62,
427 61, 75, 20, 59, 61, 66, 58, 0, 57, 56,
428 54, 63, 53, 62, 54, 101, 59, 48, 53, 46,
429 59, 101, 44, 43, 101, 41, 55, 46, 53, 44,
430 31, 101, 101, 39, 27, 21, 39, 19, 101, 35,
431 101, 33, 26, 29, 101, 101, 28, 101, 101, 101,
435 static yyconst flex_int16_t yy_def[84] =
437 80, 1, 80, 80, 80, 80, 80, 81, 80, 80,
438 80, 80, 82, 80, 80, 80, 80, 80, 80, 80,
439 80, 80, 81, 80, 80, 83, 82, 80, 80, 80,
440 80, 80, 80, 80, 80, 80, 80, 83, 80, 80,
441 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
442 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
443 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
444 80, 80, 80, 80, 80, 80, 80, 80, 80, 0,
448 static yyconst flex_int16_t yy_nxt[135] =
450 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
451 14, 15, 16, 17, 18, 4, 4, 4, 4, 4,
452 19, 4, 4, 4, 4, 20, 21, 4, 4, 22,
453 4, 4, 4, 25, 25, 25, 25, 32, 29, 25,
454 25, 33, 44, 38, 79, 78, 30, 77, 45, 76,
455 75, 74, 73, 72, 71, 70, 26, 31, 23, 23,
456 23, 27, 69, 27, 68, 67, 66, 65, 64, 63,
457 62, 61, 60, 59, 58, 57, 56, 55, 54, 53,
458 52, 51, 50, 49, 48, 47, 46, 43, 42, 41,
459 40, 39, 24, 37, 36, 35, 34, 28, 24, 80,
461 3, 80, 80, 80, 80, 80, 80, 80, 80, 80,
462 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
463 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
467 static yyconst flex_int16_t yy_chk[135] =
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 11, 11, 12, 12, 18, 17, 25,
473 25, 18, 33, 83, 77, 74, 17, 73, 33, 72,
474 70, 68, 67, 66, 65, 64, 11, 17, 81, 81,
475 81, 82, 61, 82, 60, 59, 58, 57, 56, 54,
476 53, 51, 50, 49, 48, 47, 45, 44, 43, 42,
477 41, 40, 39, 37, 36, 35, 34, 32, 31, 30,
478 29, 28, 23, 22, 21, 20, 19, 16, 8, 3,
480 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
481 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
482 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
486 static yy_state_type yy_last_accepting_state;
487 static char *yy_last_accepting_cpos;
489 extern int yy_flex_debug;
490 int yy_flex_debug = 0;
492 /* The intent behind this definition is that it'll catch
493 * any uses of REJECT which flex missed.
495 #define REJECT reject_used_but_not_detected
496 #define yymore() yymore_used_but_not_detected
497 #define YY_MORE_ADJ 0
498 #define YY_RESTORE_YY_MORE_OFFSET
501 #define YY_NO_INPUT 1
503 /* Copyright (C) 2001-2014 Free Software Foundation, Inc.
505 This file is part of GNU Binutils.
507 This program is free software; you can redistribute it and/or modify
508 it under the terms of the GNU General Public License as published by
509 the Free Software Foundation; either version 3, or (at your option)
512 This program is distributed in the hope that it will be useful,
513 but WITHOUT ANY WARRANTY; without even the implied warranty of
514 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
515 GNU General Public License for more details.
517 You should have received a copy of the GNU General Public License
518 along with GLD; see the file COPYING. If not, write to the Free
519 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
522 /* Note: config.h is #included via syslex_wrap.c. */
527 #ifdef HAVE_STRINGS_H
539 static int yywrap (void) { return 1; }
542 extern int yylex (void);
547 #ifndef YY_NO_UNISTD_H
548 /* Special case for "unistd.h", since it is non-ANSI. We include it way
549 * down here because we want the user's section 1 to have been scanned first.
550 * The user has a chance to override it with an option.
555 #ifndef YY_EXTRA_TYPE
556 #define YY_EXTRA_TYPE void *
559 static int yy_init_globals (void );
561 /* Accessor methods to globals.
562 These are made visible to non-reentrant scanners for convenience. */
564 int yylex_destroy (void );
566 int yyget_debug (void );
568 void yyset_debug (int debug_flag );
570 YY_EXTRA_TYPE yyget_extra (void );
572 void yyset_extra (YY_EXTRA_TYPE user_defined );
574 FILE *yyget_in (void );
576 void yyset_in (FILE * in_str );
578 FILE *yyget_out (void );
580 void yyset_out (FILE * out_str );
582 yy_size_t yyget_leng (void );
584 char *yyget_text (void );
586 int yyget_lineno (void );
588 void yyset_lineno (int line_number );
590 /* Macros after this point can all be overridden by user definitions in
594 #ifndef YY_SKIP_YYWRAP
596 extern "C" int yywrap (void );
598 extern int yywrap (void );
603 static void yy_flex_strncpy (char *,yyconst char *,int );
606 #ifdef YY_NEED_STRLEN
607 static int yy_flex_strlen (yyconst char * );
613 static int yyinput (void );
615 static int input (void );
620 /* Amount of stuff to slurp up with each read. */
621 #ifndef YY_READ_BUF_SIZE
622 #define YY_READ_BUF_SIZE 8192
625 /* Copy whatever the last rule matched to the standard output. */
627 /* This used to be an fputs(), but since the string might contain NUL's,
628 * we now use fwrite().
630 #define ECHO fwrite( yytext, yyleng, 1, yyout )
633 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
634 * is returned in "result".
637 #define YY_INPUT(buf,result,max_size) \
638 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
642 for ( n = 0; n < max_size && \
643 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
646 buf[n++] = (char) c; \
647 if ( c == EOF && ferror( yyin ) ) \
648 YY_FATAL_ERROR( "input in flex scanner failed" ); \
654 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
656 if( errno != EINTR) \
658 YY_FATAL_ERROR( "input in flex scanner failed" ); \
669 /* No semi-colon after return; correct usage is to write "yyterminate();" -
670 * we don't want an extra ';' after the "return" because that will cause
671 * some compilers to complain about unreachable statements.
674 #define yyterminate() return YY_NULL
677 /* Number of entries by which start-condition stack grows. */
678 #ifndef YY_START_STACK_INCR
679 #define YY_START_STACK_INCR 25
682 /* Report a fatal error. */
683 #ifndef YY_FATAL_ERROR
684 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
687 /* end tables serialization structures and prototypes */
689 /* Default declaration of generated scanner - a define so the user can
690 * easily add parameters.
693 #define YY_DECL_IS_OURS 1
695 extern int yylex (void);
697 #define YY_DECL int yylex (void)
698 #endif /* !YY_DECL */
700 /* Code executed at the beginning of each rule, after yytext and yyleng
703 #ifndef YY_USER_ACTION
704 #define YY_USER_ACTION
707 /* Code executed at the end of each rule. */
709 #define YY_BREAK break;
712 #define YY_RULE_SETUP \
715 /** The main scanner function which does all the work.
719 register yy_state_type yy_current_state;
720 register char *yy_cp, *yy_bp;
736 (yy_start) = 1; /* first start state */
744 if ( ! YY_CURRENT_BUFFER ) {
745 yyensure_buffer_stack ();
746 YY_CURRENT_BUFFER_LVALUE =
747 yy_create_buffer(yyin,YY_BUF_SIZE );
750 yy_load_buffer_state( );
753 while ( 1 ) /* loops until end-of-file is reached */
755 yy_cp = (yy_c_buf_p);
757 /* Support of yytext. */
758 *yy_cp = (yy_hold_char);
760 /* yy_bp points to the position in yy_ch_buf of the start of
765 yy_current_state = (yy_start);
769 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
770 if ( yy_accept[yy_current_state] )
772 (yy_last_accepting_state) = yy_current_state;
773 (yy_last_accepting_cpos) = yy_cp;
775 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
777 yy_current_state = (int) yy_def[yy_current_state];
778 if ( yy_current_state >= 81 )
779 yy_c = yy_meta[(unsigned int) yy_c];
781 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
784 while ( yy_base[yy_current_state] != 101 );
787 yy_act = yy_accept[yy_current_state];
789 { /* have to back up */
790 yy_cp = (yy_last_accepting_cpos);
791 yy_current_state = (yy_last_accepting_state);
792 yy_act = yy_accept[yy_current_state];
797 do_action: /* This label is used only to access EOF actions. */
800 { /* beginning of action switch */
801 case 0: /* must back up */
802 /* undo the effects of YY_DO_BEFORE_ACTION */
803 *yy_cp = (yy_hold_char);
804 yy_cp = (yy_last_accepting_cpos);
805 yy_current_state = (yy_last_accepting_state);
844 /* rule 8 can match eol */
850 /* rule 9 can match eol */
854 yylval.s = malloc (yyleng - 1);
855 memcpy (yylval.s, yytext + 1, yyleng - 2);
856 yylval.s[yyleng - 2] = '\0';
864 yylval.i = strtol(yytext,0,16);
872 yylval.i = atoi(yytext);
879 { yylval.i =1 ;return UNIT;}
884 { yylval.i = 1; return UNIT;}
889 { yylval.i= 8; return UNIT;}
894 { yylval.i = 8; return UNIT;}
899 { yylval.s = "INT"; return TYPE;}
904 { yylval.s = "BARRAY"; return TYPE;}
909 { yylval.s = "CHARS"; return TYPE;}
914 { yylval.i = 0; return NUMBER;}
919 { yylval.i = -4; return NUMBER;}
924 { yylval.i = -2; return NUMBER; }
929 { yylval.i = -1; return NUMBER; }
947 case YY_STATE_EOF(INITIAL):
950 case YY_END_OF_BUFFER:
952 /* Amount of text matched not including the EOB char. */
953 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
955 /* Undo the effects of YY_DO_BEFORE_ACTION. */
956 *yy_cp = (yy_hold_char);
957 YY_RESTORE_YY_MORE_OFFSET
959 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
961 /* We're scanning a new file or input source. It's
962 * possible that this happened because the user
963 * just pointed yyin at a new source and called
964 * yylex(). If so, then we have to assure
965 * consistency between YY_CURRENT_BUFFER and our
966 * globals. Here is the right place to do so, because
967 * this is the first action (other than possibly a
968 * back-up) that will match for the new input source.
970 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
971 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
972 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
975 /* Note that here we test for yy_c_buf_p "<=" to the position
976 * of the first EOB in the buffer, since yy_c_buf_p will
977 * already have been incremented past the NUL character
978 * (since all states make transitions on EOB to the
979 * end-of-buffer state). Contrast this with the test
982 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
983 { /* This was really a NUL. */
984 yy_state_type yy_next_state;
986 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
988 yy_current_state = yy_get_previous_state( );
990 /* Okay, we're now positioned to make the NUL
991 * transition. We couldn't have
992 * yy_get_previous_state() go ahead and do it
993 * for us because it doesn't know how to deal
994 * with the possibility of jamming (and we don't
995 * want to build jamming into it because then it
996 * will run more slowly).
999 yy_next_state = yy_try_NUL_trans( yy_current_state );
1001 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1003 if ( yy_next_state )
1005 /* Consume the NUL. */
1006 yy_cp = ++(yy_c_buf_p);
1007 yy_current_state = yy_next_state;
1013 yy_cp = (yy_c_buf_p);
1014 goto yy_find_action;
1018 else switch ( yy_get_next_buffer( ) )
1020 case EOB_ACT_END_OF_FILE:
1022 (yy_did_buffer_switch_on_eof) = 0;
1026 /* Note: because we've taken care in
1027 * yy_get_next_buffer() to have set up
1028 * yytext, we can now set up
1029 * yy_c_buf_p so that if some total
1030 * hoser (like flex itself) wants to
1031 * call the scanner after we return the
1032 * YY_NULL, it'll still work - another
1033 * YY_NULL will get returned.
1035 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1037 yy_act = YY_STATE_EOF(YY_START);
1043 if ( ! (yy_did_buffer_switch_on_eof) )
1049 case EOB_ACT_CONTINUE_SCAN:
1051 (yytext_ptr) + yy_amount_of_matched_text;
1053 yy_current_state = yy_get_previous_state( );
1055 yy_cp = (yy_c_buf_p);
1056 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1059 case EOB_ACT_LAST_MATCH:
1061 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1063 yy_current_state = yy_get_previous_state( );
1065 yy_cp = (yy_c_buf_p);
1066 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1067 goto yy_find_action;
1074 "fatal flex scanner internal error--no action found" );
1075 } /* end of action switch */
1076 } /* end of scanning one token */
1077 } /* end of yylex */
1079 /* yy_get_next_buffer - try to read in a new buffer
1081 * Returns a code representing an action:
1082 * EOB_ACT_LAST_MATCH -
1083 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1084 * EOB_ACT_END_OF_FILE - end of file
1086 static int yy_get_next_buffer (void)
1088 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1089 register char *source = (yytext_ptr);
1090 register int number_to_move, i;
1093 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1095 "fatal flex scanner internal error--end of buffer missed" );
1097 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1098 { /* Don't try to fill the buffer, so this is an EOF. */
1099 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1101 /* We matched a single character, the EOB, so
1102 * treat this as a final EOF.
1104 return EOB_ACT_END_OF_FILE;
1109 /* We matched some text prior to the EOB, first
1112 return EOB_ACT_LAST_MATCH;
1116 /* Try to read more data. */
1118 /* First move last chars to start of buffer. */
1119 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1121 for ( i = 0; i < number_to_move; ++i )
1122 *(dest++) = *(source++);
1124 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1125 /* don't do the read, it's not guaranteed to return an EOF,
1128 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1132 yy_size_t num_to_read =
1133 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1135 while ( num_to_read <= 0 )
1136 { /* Not enough room in the buffer - grow it. */
1138 /* just a shorter name for the current buffer */
1139 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1141 int yy_c_buf_p_offset =
1142 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1144 if ( b->yy_is_our_buffer )
1146 yy_size_t new_size = b->yy_buf_size * 2;
1148 if ( new_size <= 0 )
1149 b->yy_buf_size += b->yy_buf_size / 8;
1151 b->yy_buf_size *= 2;
1153 b->yy_ch_buf = (char *)
1154 /* Include room in for 2 EOB chars. */
1155 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1158 /* Can't grow it, we don't own it. */
1161 if ( ! b->yy_ch_buf )
1163 "fatal error - scanner input buffer overflow" );
1165 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1167 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1172 if ( num_to_read > YY_READ_BUF_SIZE )
1173 num_to_read = YY_READ_BUF_SIZE;
1175 /* Read in more data. */
1176 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1177 (yy_n_chars), num_to_read );
1179 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1182 if ( (yy_n_chars) == 0 )
1184 if ( number_to_move == YY_MORE_ADJ )
1186 ret_val = EOB_ACT_END_OF_FILE;
1192 ret_val = EOB_ACT_LAST_MATCH;
1193 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1194 YY_BUFFER_EOF_PENDING;
1199 ret_val = EOB_ACT_CONTINUE_SCAN;
1201 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1202 /* Extend the array by 50%, plus the number we really need. */
1203 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1204 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1205 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1206 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1209 (yy_n_chars) += number_to_move;
1210 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1211 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1213 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1218 /* yy_get_previous_state - get the state just before the EOB char was reached */
1220 static yy_state_type yy_get_previous_state (void)
1222 register yy_state_type yy_current_state;
1223 register char *yy_cp;
1225 yy_current_state = (yy_start);
1227 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1229 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1230 if ( yy_accept[yy_current_state] )
1232 (yy_last_accepting_state) = yy_current_state;
1233 (yy_last_accepting_cpos) = yy_cp;
1235 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1237 yy_current_state = (int) yy_def[yy_current_state];
1238 if ( yy_current_state >= 81 )
1239 yy_c = yy_meta[(unsigned int) yy_c];
1241 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1244 return yy_current_state;
1247 /* yy_try_NUL_trans - try to make a transition on the NUL character
1250 * next_state = yy_try_NUL_trans( current_state );
1252 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1254 register int yy_is_jam;
1255 register char *yy_cp = (yy_c_buf_p);
1257 register YY_CHAR yy_c = 1;
1258 if ( yy_accept[yy_current_state] )
1260 (yy_last_accepting_state) = yy_current_state;
1261 (yy_last_accepting_cpos) = yy_cp;
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 >= 81 )
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_is_jam = (yy_current_state == 80);
1272 return yy_is_jam ? 0 : yy_current_state;
1277 static int yyinput (void)
1279 static int input (void)
1285 *(yy_c_buf_p) = (yy_hold_char);
1287 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1289 /* yy_c_buf_p now points to the character we want to return.
1290 * If this occurs *before* the EOB characters, then it's a
1291 * valid NUL; if not, then we've hit the end of the buffer.
1293 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1294 /* This was really a NUL. */
1295 *(yy_c_buf_p) = '\0';
1298 { /* need more input */
1299 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1302 switch ( yy_get_next_buffer( ) )
1304 case EOB_ACT_LAST_MATCH:
1305 /* This happens because yy_g_n_b()
1306 * sees that we've accumulated a
1307 * token and flags that we need to
1308 * try matching the token before
1309 * proceeding. But for input(),
1310 * there's no matching to consider.
1311 * So convert the EOB_ACT_LAST_MATCH
1312 * to EOB_ACT_END_OF_FILE.
1315 /* Reset buffer status. */
1320 case EOB_ACT_END_OF_FILE:
1325 if ( ! (yy_did_buffer_switch_on_eof) )
1334 case EOB_ACT_CONTINUE_SCAN:
1335 (yy_c_buf_p) = (yytext_ptr) + offset;
1341 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1342 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1343 (yy_hold_char) = *++(yy_c_buf_p);
1347 #endif /* ifndef YY_NO_INPUT */
1349 /** Immediately switch to a different input stream.
1350 * @param input_file A readable stream.
1352 * @note This function does not reset the start condition to @c INITIAL .
1354 void yyrestart (FILE * input_file )
1357 if ( ! YY_CURRENT_BUFFER ){
1358 yyensure_buffer_stack ();
1359 YY_CURRENT_BUFFER_LVALUE =
1360 yy_create_buffer(yyin,YY_BUF_SIZE );
1363 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1364 yy_load_buffer_state( );
1367 /** Switch to a different input buffer.
1368 * @param new_buffer The new input buffer.
1371 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1374 /* TODO. We should be able to replace this entire function body
1376 * yypop_buffer_state();
1377 * yypush_buffer_state(new_buffer);
1379 yyensure_buffer_stack ();
1380 if ( YY_CURRENT_BUFFER == new_buffer )
1383 if ( YY_CURRENT_BUFFER )
1385 /* Flush out information for old buffer. */
1386 *(yy_c_buf_p) = (yy_hold_char);
1387 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1388 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1391 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1392 yy_load_buffer_state( );
1394 /* We don't actually know whether we did this switch during
1395 * EOF (yywrap()) processing, but the only time this flag
1396 * is looked at is after yywrap() is called, so it's safe
1397 * to go ahead and always set it.
1399 (yy_did_buffer_switch_on_eof) = 1;
1402 static void yy_load_buffer_state (void)
1404 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1405 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1406 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1407 (yy_hold_char) = *(yy_c_buf_p);
1410 /** Allocate and initialize an input buffer state.
1411 * @param file A readable stream.
1412 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1414 * @return the allocated buffer state.
1416 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1420 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1422 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1424 b->yy_buf_size = size;
1426 /* yy_ch_buf has to be 2 characters longer than the size given because
1427 * we need to put in 2 end-of-buffer characters.
1429 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1430 if ( ! b->yy_ch_buf )
1431 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1433 b->yy_is_our_buffer = 1;
1435 yy_init_buffer(b,file );
1440 /** Destroy the buffer.
1441 * @param b a buffer created with yy_create_buffer()
1444 void yy_delete_buffer (YY_BUFFER_STATE b )
1450 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1451 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1453 if ( b->yy_is_our_buffer )
1454 yyfree((void *) b->yy_ch_buf );
1456 yyfree((void *) b );
1460 extern int isatty (int );
1461 #endif /* __cplusplus */
1463 /* Initializes or reinitializes a buffer.
1464 * This function is sometimes called more than once on the same buffer,
1465 * such as during a yyrestart() or at EOF.
1467 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1472 yy_flush_buffer(b );
1474 b->yy_input_file = file;
1475 b->yy_fill_buffer = 1;
1477 /* If b is the current buffer, then yy_init_buffer was _probably_
1478 * called from yyrestart() or through yy_get_next_buffer.
1479 * In that case, we don't want to reset the lineno or column.
1481 if (b != YY_CURRENT_BUFFER){
1482 b->yy_bs_lineno = 1;
1483 b->yy_bs_column = 0;
1486 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1491 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1492 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1495 void yy_flush_buffer (YY_BUFFER_STATE b )
1502 /* We always need two end-of-buffer characters. The first causes
1503 * a transition to the end-of-buffer state. The second causes
1504 * a jam in that state.
1506 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1507 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1509 b->yy_buf_pos = &b->yy_ch_buf[0];
1512 b->yy_buffer_status = YY_BUFFER_NEW;
1514 if ( b == YY_CURRENT_BUFFER )
1515 yy_load_buffer_state( );
1518 /** Pushes the new state onto the stack. The new state becomes
1519 * the current state. This function will allocate the stack
1521 * @param new_buffer The new state.
1524 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1526 if (new_buffer == NULL)
1529 yyensure_buffer_stack();
1531 /* This block is copied from yy_switch_to_buffer. */
1532 if ( YY_CURRENT_BUFFER )
1534 /* Flush out information for old buffer. */
1535 *(yy_c_buf_p) = (yy_hold_char);
1536 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1537 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1540 /* Only push if top exists. Otherwise, replace top. */
1541 if (YY_CURRENT_BUFFER)
1542 (yy_buffer_stack_top)++;
1543 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1545 /* copied from yy_switch_to_buffer. */
1546 yy_load_buffer_state( );
1547 (yy_did_buffer_switch_on_eof) = 1;
1550 /** Removes and deletes the top of the stack, if present.
1551 * The next element becomes the new top.
1554 void yypop_buffer_state (void)
1556 if (!YY_CURRENT_BUFFER)
1559 yy_delete_buffer(YY_CURRENT_BUFFER );
1560 YY_CURRENT_BUFFER_LVALUE = NULL;
1561 if ((yy_buffer_stack_top) > 0)
1562 --(yy_buffer_stack_top);
1564 if (YY_CURRENT_BUFFER) {
1565 yy_load_buffer_state( );
1566 (yy_did_buffer_switch_on_eof) = 1;
1570 /* Allocates the stack if it does not exist.
1571 * Guarantees space for at least one push.
1573 static void yyensure_buffer_stack (void)
1575 yy_size_t num_to_alloc;
1577 if (!(yy_buffer_stack)) {
1579 /* First allocation is just for 2 elements, since we don't know if this
1580 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1581 * immediate realloc on the next call.
1584 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1585 (num_to_alloc * sizeof(struct yy_buffer_state*)
1587 if ( ! (yy_buffer_stack) )
1588 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1590 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1592 (yy_buffer_stack_max) = num_to_alloc;
1593 (yy_buffer_stack_top) = 0;
1597 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1599 /* Increase the buffer to prepare for a possible push. */
1600 int grow_size = 8 /* arbitrary grow size */;
1602 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1603 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1605 num_to_alloc * sizeof(struct yy_buffer_state*)
1607 if ( ! (yy_buffer_stack) )
1608 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1610 /* zero only the new slots.*/
1611 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1612 (yy_buffer_stack_max) = num_to_alloc;
1616 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1617 * @param base the character buffer
1618 * @param size the size in bytes of the character buffer
1620 * @return the newly allocated buffer state object.
1622 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1627 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1628 base[size-1] != YY_END_OF_BUFFER_CHAR )
1629 /* They forgot to leave room for the EOB's. */
1632 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1634 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1636 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1637 b->yy_buf_pos = b->yy_ch_buf = base;
1638 b->yy_is_our_buffer = 0;
1639 b->yy_input_file = 0;
1640 b->yy_n_chars = b->yy_buf_size;
1641 b->yy_is_interactive = 0;
1643 b->yy_fill_buffer = 0;
1644 b->yy_buffer_status = YY_BUFFER_NEW;
1646 yy_switch_to_buffer(b );
1651 /** Setup the input buffer state to scan a string. The next call to yylex() will
1652 * scan from a @e copy of @a str.
1653 * @param yystr a NUL-terminated string to scan
1655 * @return the newly allocated buffer state object.
1656 * @note If you want to scan bytes that may contain NUL values, then use
1657 * yy_scan_bytes() instead.
1659 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1662 return yy_scan_bytes(yystr,strlen(yystr) );
1665 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1666 * scan from a @e copy of @a bytes.
1667 * @param bytes the byte buffer to scan
1668 * @param len the number of bytes in the buffer pointed to by @a bytes.
1670 * @return the newly allocated buffer state object.
1672 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1678 /* Get memory for full buffer, including space for trailing EOB's. */
1679 n = _yybytes_len + 2;
1680 buf = (char *) yyalloc(n );
1682 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1684 for ( i = 0; i < _yybytes_len; ++i )
1685 buf[i] = yybytes[i];
1687 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1689 b = yy_scan_buffer(buf,n );
1691 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1693 /* It's okay to grow etc. this buffer, and we should throw it
1694 * away when we're done.
1696 b->yy_is_our_buffer = 1;
1701 #ifndef YY_EXIT_FAILURE
1702 #define YY_EXIT_FAILURE 2
1705 static void yy_fatal_error (yyconst char* msg )
1707 (void) fprintf( stderr, "%s\n", msg );
1708 exit( YY_EXIT_FAILURE );
1711 /* Redefine yyless() so it works in section 3 code. */
1717 /* Undo effects of setting up yytext. */ \
1718 int yyless_macro_arg = (n); \
1719 YY_LESS_LINENO(yyless_macro_arg);\
1720 yytext[yyleng] = (yy_hold_char); \
1721 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1722 (yy_hold_char) = *(yy_c_buf_p); \
1723 *(yy_c_buf_p) = '\0'; \
1724 yyleng = yyless_macro_arg; \
1728 /* Accessor methods (get/set functions) to struct members. */
1730 /** Get the current line number.
1733 int yyget_lineno (void)
1739 /** Get the input stream.
1742 FILE *yyget_in (void)
1747 /** Get the output stream.
1750 FILE *yyget_out (void)
1755 /** Get the length of the current token.
1758 yy_size_t yyget_leng (void)
1763 /** Get the current token.
1767 char *yyget_text (void)
1772 /** Set the current line number.
1773 * @param line_number
1776 void yyset_lineno (int line_number )
1779 yylineno = line_number;
1782 /** Set the input stream. This does not discard the current
1784 * @param in_str A readable stream.
1786 * @see yy_switch_to_buffer
1788 void yyset_in (FILE * in_str )
1793 void yyset_out (FILE * out_str )
1798 int yyget_debug (void)
1800 return yy_flex_debug;
1803 void yyset_debug (int bdebug )
1805 yy_flex_debug = bdebug ;
1808 static int yy_init_globals (void)
1810 /* Initialization is the same as for the non-reentrant scanner.
1811 * This function is called from yylex_destroy(), so don't allocate here.
1814 (yy_buffer_stack) = 0;
1815 (yy_buffer_stack_top) = 0;
1816 (yy_buffer_stack_max) = 0;
1817 (yy_c_buf_p) = (char *) 0;
1821 /* Defined in main.c */
1830 /* For future reference: Set errno on error, since we are called by
1836 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1837 int yylex_destroy (void)
1840 /* Pop the buffer stack, destroying each element. */
1841 while(YY_CURRENT_BUFFER){
1842 yy_delete_buffer(YY_CURRENT_BUFFER );
1843 YY_CURRENT_BUFFER_LVALUE = NULL;
1844 yypop_buffer_state();
1847 /* Destroy the stack itself. */
1848 yyfree((yy_buffer_stack) );
1849 (yy_buffer_stack) = NULL;
1851 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1852 * yylex() is called, initialization will occur. */
1859 * Internal utility routines.
1863 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1866 for ( i = 0; i < n; ++i )
1871 #ifdef YY_NEED_STRLEN
1872 static int yy_flex_strlen (yyconst char * s )
1875 for ( n = 0; s[n]; ++n )
1882 void *yyalloc (yy_size_t size )
1884 return (void *) malloc( size );
1887 void *yyrealloc (void * ptr, yy_size_t size )
1889 /* The cast to (char *) in the following accommodates both
1890 * implementations that use char* generic pointers, and those
1891 * that use void* generic pointers. It works with the latter
1892 * because both ANSI C and C++ allow castless assignment from
1893 * any pointer type to void*, and deal with argument conversions
1894 * as though doing an assignment.
1896 return (void *) realloc( (char *) ptr, size );
1899 void yyfree (void * ptr )
1901 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1904 #define YYTABLES_NAME "yytables"