* configure.in: Version 2.13.2 released, set is_release.
[binutils.git] / gas / itbl-lex.c
blob707d830a02a03a9a73e21284be00b5491d04d3ae
1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 * $Header$
5 */
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
11 #include <stdio.h>
12 #include <errno.h>
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15 #ifdef c_plusplus
16 #ifndef __cplusplus
17 #define __cplusplus
18 #endif
19 #endif
22 #ifdef __cplusplus
24 #include <stdlib.h>
25 #ifndef _WIN32
26 #include <unistd.h>
27 #endif
29 /* Use prototypes in function declarations. */
30 #define YY_USE_PROTOS
32 /* The "const" storage-class-modifier is valid. */
33 #define YY_USE_CONST
35 #else /* ! __cplusplus */
37 #if __STDC__
39 #define YY_USE_PROTOS
40 #define YY_USE_CONST
42 #endif /* __STDC__ */
43 #endif /* ! __cplusplus */
45 #ifdef __TURBOC__
46 #pragma warn -rch
47 #pragma warn -use
48 #include <io.h>
49 #include <stdlib.h>
50 #define YY_USE_CONST
51 #define YY_USE_PROTOS
52 #endif
54 #ifdef YY_USE_CONST
55 #define yyconst const
56 #else
57 #define yyconst
58 #endif
61 #ifdef YY_USE_PROTOS
62 #define YY_PROTO(proto) proto
63 #else
64 #define YY_PROTO(proto) ()
65 #endif
67 /* Returned upon end-of-file. */
68 #define YY_NULL 0
70 /* Promotes a possibly negative, possibly signed char to an unsigned
71 * integer for use as an array index. If the signed char is negative,
72 * we want to instead treat it as an 8-bit unsigned char, hence the
73 * double cast.
75 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
77 /* Enter a start condition. This macro really ought to take a parameter,
78 * but we do it the disgusting crufty way forced on us by the ()-less
79 * definition of BEGIN.
81 #define BEGIN yy_start = 1 + 2 *
83 /* Translate the current start state into a value that can be later handed
84 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 * compatibility.
87 #define YY_START ((yy_start - 1) / 2)
88 #define YYSTATE YY_START
90 /* Action number for EOF rule of a given start state. */
91 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
93 /* Special action meaning "start processing a new file". */
94 #define YY_NEW_FILE yyrestart( yyin )
96 #define YY_END_OF_BUFFER_CHAR 0
98 /* Size of default input buffer. */
99 #define YY_BUF_SIZE 16384
101 typedef struct yy_buffer_state *YY_BUFFER_STATE;
103 extern int yyleng;
104 extern FILE *yyin, *yyout;
106 #define EOB_ACT_CONTINUE_SCAN 0
107 #define EOB_ACT_END_OF_FILE 1
108 #define EOB_ACT_LAST_MATCH 2
110 /* The funky do-while in the following #define is used to turn the definition
111 * int a single C statement (which needs a semi-colon terminator). This
112 * avoids problems with code like:
114 * if ( condition_holds )
115 * yyless( 5 );
116 * else
117 * do_something_else();
119 * Prior to using the do-while the compiler would get upset at the
120 * "else" because it interpreted the "if" statement as being all
121 * done when it reached the ';' after the yyless() call.
124 /* Return all but the first 'n' matched characters back to the input stream. */
126 #define yyless(n) \
127 do \
129 /* Undo effects of setting up yytext. */ \
130 *yy_cp = yy_hold_char; \
131 YY_RESTORE_YY_MORE_OFFSET \
132 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
133 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 while ( 0 )
137 #define unput(c) yyunput( c, yytext_ptr )
139 /* The following is because we cannot portably get our hands on size_t
140 * (without autoconf's help, which isn't available because we want
141 * flex-generated scanners to compile on their own).
143 typedef unsigned int yy_size_t;
146 struct yy_buffer_state
148 FILE *yy_input_file;
150 char *yy_ch_buf; /* input buffer */
151 char *yy_buf_pos; /* current position in input buffer */
153 /* Size of input buffer in bytes, not including room for EOB
154 * characters.
156 yy_size_t yy_buf_size;
158 /* Number of characters read into yy_ch_buf, not including EOB
159 * characters.
161 int yy_n_chars;
163 /* Whether we "own" the buffer - i.e., we know we created it,
164 * and can realloc() it to grow it, and should free() it to
165 * delete it.
167 int yy_is_our_buffer;
169 /* Whether this is an "interactive" input source; if so, and
170 * if we're using stdio for input, then we want to use getc()
171 * instead of fread(), to make sure we stop fetching input after
172 * each newline.
174 int yy_is_interactive;
176 /* Whether we're considered to be at the beginning of a line.
177 * If so, '^' rules will be active on the next match, otherwise
178 * not.
180 int yy_at_bol;
182 /* Whether to try to fill the input buffer when we reach the
183 * end of it.
185 int yy_fill_buffer;
187 int yy_buffer_status;
188 #define YY_BUFFER_NEW 0
189 #define YY_BUFFER_NORMAL 1
190 /* When an EOF's been seen but there's still some text to process
191 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
192 * shouldn't try reading from the input source any more. We might
193 * still have a bunch of tokens to match, though, because of
194 * possible backing-up.
196 * When we actually see the EOF, we change the status to "new"
197 * (via yyrestart()), so that the user can continue scanning by
198 * just pointing yyin at a new input file.
200 #define YY_BUFFER_EOF_PENDING 2
203 static YY_BUFFER_STATE yy_current_buffer = 0;
205 /* We provide macros for accessing buffer states in case in the
206 * future we want to put the buffer states in a more general
207 * "scanner state".
209 #define YY_CURRENT_BUFFER yy_current_buffer
212 /* yy_hold_char holds the character lost when yytext is formed. */
213 static char yy_hold_char;
215 static int yy_n_chars; /* number of characters read into yy_ch_buf */
218 int yyleng;
220 /* Points to current character in buffer. */
221 static char *yy_c_buf_p = (char *) 0;
222 static int yy_init = 1; /* whether we need to initialize */
223 static int yy_start = 0; /* start state number */
225 /* Flag which is used to allow yywrap()'s to do buffer switches
226 * instead of setting up a fresh yyin. A bit of a hack ...
228 static int yy_did_buffer_switch_on_eof;
230 void yyrestart YY_PROTO(( FILE *input_file ));
232 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
233 void yy_load_buffer_state YY_PROTO(( void ));
234 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
235 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
237 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
238 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
240 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
241 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
242 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
244 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
245 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
246 static void yy_flex_free YY_PROTO(( void * ));
248 #define yy_new_buffer yy_create_buffer
250 #define yy_set_interactive(is_interactive) \
252 if ( ! yy_current_buffer ) \
253 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
254 yy_current_buffer->yy_is_interactive = is_interactive; \
257 #define yy_set_bol(at_bol) \
259 if ( ! yy_current_buffer ) \
260 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261 yy_current_buffer->yy_at_bol = at_bol; \
264 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266 typedef unsigned char YY_CHAR;
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268 typedef int yy_state_type;
269 extern char *yytext;
270 #define yytext_ptr yytext
272 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
274 static int yy_get_next_buffer YY_PROTO(( void ));
275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
277 /* Done after the current pattern has been matched and before the
278 * corresponding action - sets up yytext.
280 #define YY_DO_BEFORE_ACTION \
281 yytext_ptr = yy_bp; \
282 yyleng = (int) (yy_cp - yy_bp); \
283 yy_hold_char = *yy_cp; \
284 *yy_cp = '\0'; \
285 yy_c_buf_p = yy_cp;
287 #define YY_NUM_RULES 15
288 #define YY_END_OF_BUFFER 16
289 static yyconst short int yy_accept[60] =
290 { 0,
291 0, 0, 16, 14, 13, 12, 11, 8, 8, 10,
292 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
293 10, 8, 0, 10, 10, 10, 10, 10, 10, 10,
294 10, 10, 10, 10, 10, 10, 7, 9, 10, 10,
295 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
296 5, 1, 2, 3, 10, 6, 10, 4, 0
299 static yyconst int yy_ec[256] =
300 { 0,
301 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
302 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 1, 4, 1, 1, 5, 1, 1, 1, 1, 1,
305 1, 1, 1, 1, 1, 1, 1, 6, 7, 7,
306 7, 7, 7, 7, 7, 7, 7, 1, 8, 1,
307 1, 1, 1, 1, 9, 10, 11, 12, 13, 10,
308 14, 15, 16, 15, 15, 15, 17, 18, 15, 15,
309 15, 19, 20, 15, 15, 15, 15, 15, 15, 15,
310 1, 1, 1, 1, 15, 1, 21, 10, 22, 23,
312 24, 10, 25, 15, 26, 15, 15, 15, 27, 28,
313 15, 29, 15, 30, 31, 15, 15, 15, 15, 32,
314 15, 15, 1, 1, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1
331 static yyconst int yy_meta[33] =
332 { 0,
333 1, 1, 1, 1, 1, 2, 2, 1, 2, 2,
334 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
335 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
336 3, 3
339 static yyconst short int yy_base[62] =
340 { 0,
341 0, 0, 83, 84, 84, 84, 84, 27, 29, 70,
342 0, 62, 61, 60, 20, 55, 47, 46, 45, 12,
343 35, 37, 0, 0, 62, 60, 59, 58, 53, 49,
344 45, 43, 42, 41, 37, 32, 0, 0, 43, 44,
345 43, 42, 42, 36, 23, 27, 26, 25, 25, 20,
346 0, 0, 0, 0, 35, 0, 23, 0, 84, 58,
350 static yyconst short int yy_def[62] =
351 { 0,
352 59, 1, 59, 59, 59, 59, 59, 59, 59, 60,
353 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
354 60, 59, 61, 60, 60, 60, 60, 60, 60, 60,
355 60, 60, 60, 60, 60, 60, 60, 61, 60, 60,
356 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
357 60, 60, 60, 60, 60, 60, 60, 60, 0, 59,
361 static yyconst short int yy_nxt[117] =
362 { 0,
363 4, 5, 6, 5, 7, 8, 9, 7, 10, 11,
364 12, 13, 11, 14, 11, 15, 11, 11, 11, 11,
365 16, 17, 18, 11, 19, 20, 11, 11, 21, 11,
366 11, 11, 22, 22, 22, 22, 29, 30, 35, 36,
367 37, 37, 22, 22, 38, 58, 58, 56, 57, 54,
368 53, 52, 51, 56, 55, 54, 53, 52, 23, 24,
369 24, 51, 50, 49, 48, 47, 46, 45, 44, 43,
370 42, 41, 40, 39, 34, 33, 32, 31, 28, 27,
371 26, 25, 59, 3, 59, 59, 59, 59, 59, 59,
372 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
374 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
375 59, 59, 59, 59, 59, 59
378 static yyconst short int yy_chk[117] =
379 { 0,
380 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 8, 8, 9, 9, 15, 15, 20, 20,
384 21, 21, 22, 22, 61, 57, 55, 50, 49, 48,
385 47, 46, 45, 44, 43, 42, 41, 40, 8, 60,
386 60, 39, 36, 35, 34, 33, 32, 31, 30, 29,
387 28, 27, 26, 25, 19, 18, 17, 16, 14, 13,
388 12, 10, 3, 59, 59, 59, 59, 59, 59, 59,
389 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
391 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
392 59, 59, 59, 59, 59, 59
395 static yy_state_type yy_last_accepting_state;
396 static char *yy_last_accepting_cpos;
398 /* The intent behind this definition is that it'll catch
399 * any uses of REJECT which flex missed.
401 #define REJECT reject_used_but_not_detected
402 #define yymore() yymore_used_but_not_detected
403 #define YY_MORE_ADJ 0
404 #define YY_RESTORE_YY_MORE_OFFSET
405 char *yytext;
406 #line 1 "itbl-lex.l"
407 #define INITIAL 0
408 /* itbl-lex.l
409 Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
411 This file is part of GAS, the GNU Assembler.
413 GAS is free software; you can redistribute it and/or modify
414 it under the terms of the GNU General Public License as published by
415 the Free Software Foundation; either version 2, or (at your option)
416 any later version.
418 GAS is distributed in the hope that it will be useful,
419 but WITHOUT ANY WARRANTY; without even the implied warranty of
420 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
421 GNU General Public License for more details.
423 You should have received a copy of the GNU General Public License
424 along with GAS; see the file COPYING. If not, write to the Free
425 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
426 02111-1307, USA. */
427 #line 22 "itbl-lex.l"
428 #include <stdio.h>
429 #include <string.h>
430 #include <stdlib.h>
432 #include <itbl-parse.h>
434 #ifdef DEBUG
435 #define DBG(x) printf x
436 #define MDBG(x) printf x
437 #else
438 #define DBG(x)
439 #define MDBG(x)
440 #endif
442 int insntbl_line = 1;
443 #line 444 "lex.yy.c"
445 /* Macros after this point can all be overridden by user definitions in
446 * section 1.
449 #ifndef YY_SKIP_YYWRAP
450 #ifdef __cplusplus
451 extern "C" int yywrap YY_PROTO(( void ));
452 #else
453 extern int yywrap YY_PROTO(( void ));
454 #endif
455 #endif
457 #ifndef YY_NO_UNPUT
458 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
459 #endif
461 #ifndef yytext_ptr
462 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
463 #endif
465 #ifdef YY_NEED_STRLEN
466 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
467 #endif
469 #ifndef YY_NO_INPUT
470 #ifdef __cplusplus
471 static int yyinput YY_PROTO(( void ));
472 #else
473 static int input YY_PROTO(( void ));
474 #endif
475 #endif
477 #if YY_STACK_USED
478 static int yy_start_stack_ptr = 0;
479 static int yy_start_stack_depth = 0;
480 static int *yy_start_stack = 0;
481 #ifndef YY_NO_PUSH_STATE
482 static void yy_push_state YY_PROTO(( int new_state ));
483 #endif
484 #ifndef YY_NO_POP_STATE
485 static void yy_pop_state YY_PROTO(( void ));
486 #endif
487 #ifndef YY_NO_TOP_STATE
488 static int yy_top_state YY_PROTO(( void ));
489 #endif
491 #else
492 #define YY_NO_PUSH_STATE 1
493 #define YY_NO_POP_STATE 1
494 #define YY_NO_TOP_STATE 1
495 #endif
497 #ifdef YY_MALLOC_DECL
498 YY_MALLOC_DECL
499 #else
500 #if __STDC__
501 #ifndef __cplusplus
502 #include <stdlib.h>
503 #endif
504 #else
505 /* Just try to get by without declaring the routines. This will fail
506 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
507 * or sizeof(void*) != sizeof(int).
509 #endif
510 #endif
512 /* Amount of stuff to slurp up with each read. */
513 #ifndef YY_READ_BUF_SIZE
514 #define YY_READ_BUF_SIZE 8192
515 #endif
517 /* Copy whatever the last rule matched to the standard output. */
519 #ifndef ECHO
520 /* This used to be an fputs(), but since the string might contain NUL's,
521 * we now use fwrite().
523 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
524 #endif
526 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
527 * is returned in "result".
529 #ifndef YY_INPUT
530 #define YY_INPUT(buf,result,max_size) \
531 if ( yy_current_buffer->yy_is_interactive ) \
533 int c = '*', n; \
534 for ( n = 0; n < max_size && \
535 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
536 buf[n] = (char) c; \
537 if ( c == '\n' ) \
538 buf[n++] = (char) c; \
539 if ( c == EOF && ferror( yyin ) ) \
540 YY_FATAL_ERROR( "input in flex scanner failed" ); \
541 result = n; \
543 else \
545 errno=0; \
546 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
548 if( errno != EINTR) \
550 YY_FATAL_ERROR( "input in flex scanner failed" ); \
551 break; \
553 errno=0; \
554 clearerr(yyin); \
557 #endif
559 /* No semi-colon after return; correct usage is to write "yyterminate();" -
560 * we don't want an extra ';' after the "return" because that will cause
561 * some compilers to complain about unreachable statements.
563 #ifndef yyterminate
564 #define yyterminate() return YY_NULL
565 #endif
567 /* Number of entries by which start-condition stack grows. */
568 #ifndef YY_START_STACK_INCR
569 #define YY_START_STACK_INCR 25
570 #endif
572 /* Report a fatal error. */
573 #ifndef YY_FATAL_ERROR
574 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
575 #endif
577 /* Default declaration of generated scanner - a define so the user can
578 * easily add parameters.
580 #ifndef YY_DECL
581 #define YY_DECL int yylex YY_PROTO(( void ))
582 #endif
584 /* Code executed at the beginning of each rule, after yytext and yyleng
585 * have been set up.
587 #ifndef YY_USER_ACTION
588 #define YY_USER_ACTION
589 #endif
591 /* Code executed at the end of each rule. */
592 #ifndef YY_BREAK
593 #define YY_BREAK break;
594 #endif
596 #define YY_RULE_SETUP \
597 YY_USER_ACTION
599 YY_DECL
601 register yy_state_type yy_current_state;
602 register char *yy_cp, *yy_bp;
603 register int yy_act;
605 #line 44 "itbl-lex.l"
608 #line 609 "lex.yy.c"
610 if ( yy_init )
612 yy_init = 0;
614 #ifdef YY_USER_INIT
615 YY_USER_INIT;
616 #endif
618 if ( ! yy_start )
619 yy_start = 1; /* first start state */
621 if ( ! yyin )
622 yyin = stdin;
624 if ( ! yyout )
625 yyout = stdout;
627 if ( ! yy_current_buffer )
628 yy_current_buffer =
629 yy_create_buffer( yyin, YY_BUF_SIZE );
631 yy_load_buffer_state();
634 while ( 1 ) /* loops until end-of-file is reached */
636 yy_cp = yy_c_buf_p;
638 /* Support of yytext. */
639 *yy_cp = yy_hold_char;
641 /* yy_bp points to the position in yy_ch_buf of the start of
642 * the current run.
644 yy_bp = yy_cp;
646 yy_current_state = yy_start;
647 yy_match:
650 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
651 if ( yy_accept[yy_current_state] )
653 yy_last_accepting_state = yy_current_state;
654 yy_last_accepting_cpos = yy_cp;
656 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
658 yy_current_state = (int) yy_def[yy_current_state];
659 if ( yy_current_state >= 60 )
660 yy_c = yy_meta[(unsigned int) yy_c];
662 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
663 ++yy_cp;
665 while ( yy_base[yy_current_state] != 84 );
667 yy_find_action:
668 yy_act = yy_accept[yy_current_state];
669 if ( yy_act == 0 )
670 { /* have to back up */
671 yy_cp = yy_last_accepting_cpos;
672 yy_current_state = yy_last_accepting_state;
673 yy_act = yy_accept[yy_current_state];
676 YY_DO_BEFORE_ACTION;
679 do_action: /* This label is used only to access EOF actions. */
682 switch ( yy_act )
683 { /* beginning of action switch */
684 case 0: /* must back up */
685 /* undo the effects of YY_DO_BEFORE_ACTION */
686 *yy_cp = yy_hold_char;
687 yy_cp = yy_last_accepting_cpos;
688 yy_current_state = yy_last_accepting_state;
689 goto yy_find_action;
691 case 1:
692 YY_RULE_SETUP
693 #line 46 "itbl-lex.l"
695 return CREG;
697 YY_BREAK
698 case 2:
699 YY_RULE_SETUP
700 #line 49 "itbl-lex.l"
702 return DREG;
704 YY_BREAK
705 case 3:
706 YY_RULE_SETUP
707 #line 52 "itbl-lex.l"
709 return GREG;
711 YY_BREAK
712 case 4:
713 YY_RULE_SETUP
714 #line 55 "itbl-lex.l"
716 return IMMED;
718 YY_BREAK
719 case 5:
720 YY_RULE_SETUP
721 #line 58 "itbl-lex.l"
723 return ADDR;
725 YY_BREAK
726 case 6:
727 YY_RULE_SETUP
728 #line 61 "itbl-lex.l"
730 return INSN;
732 YY_BREAK
733 case 7:
734 YY_RULE_SETUP
735 #line 64 "itbl-lex.l"
737 yytext[yyleng] = 0;
738 yylval.processor = strtoul (yytext+1, 0, 0);
739 return PNUM;
741 YY_BREAK
742 case 8:
743 YY_RULE_SETUP
744 #line 69 "itbl-lex.l"
746 yytext[yyleng] = 0;
747 yylval.num = strtoul (yytext, 0, 0);
748 return NUM;
750 YY_BREAK
751 case 9:
752 YY_RULE_SETUP
753 #line 74 "itbl-lex.l"
755 yytext[yyleng] = 0;
756 yylval.num = strtoul (yytext, 0, 0);
757 return NUM;
759 YY_BREAK
760 case 10:
761 YY_RULE_SETUP
762 #line 79 "itbl-lex.l"
764 yytext[yyleng] = 0;
765 yylval.str = strdup (yytext);
766 return ID;
768 YY_BREAK
769 case 11:
770 YY_RULE_SETUP
771 #line 84 "itbl-lex.l"
773 int c;
774 while ((c = input ()) != EOF)
776 if (c == '\n')
778 unput (c);
779 break;
783 YY_BREAK
784 case 12:
785 YY_RULE_SETUP
786 #line 95 "itbl-lex.l"
788 insntbl_line++;
789 MDBG (("in lex, NL = %d (x%x)\n", NL, NL));
790 return NL;
792 YY_BREAK
793 case 13:
794 YY_RULE_SETUP
795 #line 100 "itbl-lex.l"
798 YY_BREAK
799 case 14:
800 YY_RULE_SETUP
801 #line 102 "itbl-lex.l"
803 MDBG (("char = %x, %d\n", yytext[0], yytext[0]));
804 return yytext[0];
806 YY_BREAK
807 case 15:
808 YY_RULE_SETUP
809 #line 106 "itbl-lex.l"
810 ECHO;
811 YY_BREAK
812 #line 813 "lex.yy.c"
813 case YY_STATE_EOF(INITIAL):
814 yyterminate();
816 case YY_END_OF_BUFFER:
818 /* Amount of text matched not including the EOB char. */
819 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
821 /* Undo the effects of YY_DO_BEFORE_ACTION. */
822 *yy_cp = yy_hold_char;
823 YY_RESTORE_YY_MORE_OFFSET
825 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
827 /* We're scanning a new file or input source. It's
828 * possible that this happened because the user
829 * just pointed yyin at a new source and called
830 * yylex(). If so, then we have to assure
831 * consistency between yy_current_buffer and our
832 * globals. Here is the right place to do so, because
833 * this is the first action (other than possibly a
834 * back-up) that will match for the new input source.
836 yy_n_chars = yy_current_buffer->yy_n_chars;
837 yy_current_buffer->yy_input_file = yyin;
838 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
841 /* Note that here we test for yy_c_buf_p "<=" to the position
842 * of the first EOB in the buffer, since yy_c_buf_p will
843 * already have been incremented past the NUL character
844 * (since all states make transitions on EOB to the
845 * end-of-buffer state). Contrast this with the test
846 * in input().
848 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
849 { /* This was really a NUL. */
850 yy_state_type yy_next_state;
852 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
854 yy_current_state = yy_get_previous_state();
856 /* Okay, we're now positioned to make the NUL
857 * transition. We couldn't have
858 * yy_get_previous_state() go ahead and do it
859 * for us because it doesn't know how to deal
860 * with the possibility of jamming (and we don't
861 * want to build jamming into it because then it
862 * will run more slowly).
865 yy_next_state = yy_try_NUL_trans( yy_current_state );
867 yy_bp = yytext_ptr + YY_MORE_ADJ;
869 if ( yy_next_state )
871 /* Consume the NUL. */
872 yy_cp = ++yy_c_buf_p;
873 yy_current_state = yy_next_state;
874 goto yy_match;
877 else
879 yy_cp = yy_c_buf_p;
880 goto yy_find_action;
884 else switch ( yy_get_next_buffer() )
886 case EOB_ACT_END_OF_FILE:
888 yy_did_buffer_switch_on_eof = 0;
890 if ( yywrap() )
892 /* Note: because we've taken care in
893 * yy_get_next_buffer() to have set up
894 * yytext, we can now set up
895 * yy_c_buf_p so that if some total
896 * hoser (like flex itself) wants to
897 * call the scanner after we return the
898 * YY_NULL, it'll still work - another
899 * YY_NULL will get returned.
901 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
903 yy_act = YY_STATE_EOF(YY_START);
904 goto do_action;
907 else
909 if ( ! yy_did_buffer_switch_on_eof )
910 YY_NEW_FILE;
912 break;
915 case EOB_ACT_CONTINUE_SCAN:
916 yy_c_buf_p =
917 yytext_ptr + yy_amount_of_matched_text;
919 yy_current_state = yy_get_previous_state();
921 yy_cp = yy_c_buf_p;
922 yy_bp = yytext_ptr + YY_MORE_ADJ;
923 goto yy_match;
925 case EOB_ACT_LAST_MATCH:
926 yy_c_buf_p =
927 &yy_current_buffer->yy_ch_buf[yy_n_chars];
929 yy_current_state = yy_get_previous_state();
931 yy_cp = yy_c_buf_p;
932 yy_bp = yytext_ptr + YY_MORE_ADJ;
933 goto yy_find_action;
935 break;
938 default:
939 YY_FATAL_ERROR(
940 "fatal flex scanner internal error--no action found" );
941 } /* end of action switch */
942 } /* end of scanning one token */
943 } /* end of yylex */
946 /* yy_get_next_buffer - try to read in a new buffer
948 * Returns a code representing an action:
949 * EOB_ACT_LAST_MATCH -
950 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
951 * EOB_ACT_END_OF_FILE - end of file
954 static int yy_get_next_buffer()
956 register char *dest = yy_current_buffer->yy_ch_buf;
957 register char *source = yytext_ptr;
958 register int number_to_move, i;
959 int ret_val;
961 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
962 YY_FATAL_ERROR(
963 "fatal flex scanner internal error--end of buffer missed" );
965 if ( yy_current_buffer->yy_fill_buffer == 0 )
966 { /* Don't try to fill the buffer, so this is an EOF. */
967 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
969 /* We matched a single character, the EOB, so
970 * treat this as a final EOF.
972 return EOB_ACT_END_OF_FILE;
975 else
977 /* We matched some text prior to the EOB, first
978 * process it.
980 return EOB_ACT_LAST_MATCH;
984 /* Try to read more data. */
986 /* First move last chars to start of buffer. */
987 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
989 for ( i = 0; i < number_to_move; ++i )
990 *(dest++) = *(source++);
992 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
993 /* don't do the read, it's not guaranteed to return an EOF,
994 * just force an EOF
996 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
998 else
1000 int num_to_read =
1001 yy_current_buffer->yy_buf_size - number_to_move - 1;
1003 while ( num_to_read <= 0 )
1004 { /* Not enough room in the buffer - grow it. */
1005 #ifdef YY_USES_REJECT
1006 YY_FATAL_ERROR(
1007 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1008 #else
1010 /* just a shorter name for the current buffer */
1011 YY_BUFFER_STATE b = yy_current_buffer;
1013 int yy_c_buf_p_offset =
1014 (int) (yy_c_buf_p - b->yy_ch_buf);
1016 if ( b->yy_is_our_buffer )
1018 int new_size = b->yy_buf_size * 2;
1020 if ( new_size <= 0 )
1021 b->yy_buf_size += b->yy_buf_size / 8;
1022 else
1023 b->yy_buf_size *= 2;
1025 b->yy_ch_buf = (char *)
1026 /* Include room in for 2 EOB chars. */
1027 yy_flex_realloc( (void *) b->yy_ch_buf,
1028 b->yy_buf_size + 2 );
1030 else
1031 /* Can't grow it, we don't own it. */
1032 b->yy_ch_buf = 0;
1034 if ( ! b->yy_ch_buf )
1035 YY_FATAL_ERROR(
1036 "fatal error - scanner input buffer overflow" );
1038 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1040 num_to_read = yy_current_buffer->yy_buf_size -
1041 number_to_move - 1;
1042 #endif
1045 if ( num_to_read > YY_READ_BUF_SIZE )
1046 num_to_read = YY_READ_BUF_SIZE;
1048 /* Read in more data. */
1049 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1050 yy_n_chars, num_to_read );
1052 yy_current_buffer->yy_n_chars = yy_n_chars;
1055 if ( yy_n_chars == 0 )
1057 if ( number_to_move == YY_MORE_ADJ )
1059 ret_val = EOB_ACT_END_OF_FILE;
1060 yyrestart( yyin );
1063 else
1065 ret_val = EOB_ACT_LAST_MATCH;
1066 yy_current_buffer->yy_buffer_status =
1067 YY_BUFFER_EOF_PENDING;
1071 else
1072 ret_val = EOB_ACT_CONTINUE_SCAN;
1074 yy_n_chars += number_to_move;
1075 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1076 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1078 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1080 return ret_val;
1084 /* yy_get_previous_state - get the state just before the EOB char was reached */
1086 static yy_state_type yy_get_previous_state()
1088 register yy_state_type yy_current_state;
1089 register char *yy_cp;
1091 yy_current_state = yy_start;
1093 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1095 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1096 if ( yy_accept[yy_current_state] )
1098 yy_last_accepting_state = yy_current_state;
1099 yy_last_accepting_cpos = yy_cp;
1101 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1103 yy_current_state = (int) yy_def[yy_current_state];
1104 if ( yy_current_state >= 60 )
1105 yy_c = yy_meta[(unsigned int) yy_c];
1107 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1110 return yy_current_state;
1114 /* yy_try_NUL_trans - try to make a transition on the NUL character
1116 * synopsis
1117 * next_state = yy_try_NUL_trans( current_state );
1120 #ifdef YY_USE_PROTOS
1121 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1122 #else
1123 static yy_state_type yy_try_NUL_trans( yy_current_state )
1124 yy_state_type yy_current_state;
1125 #endif
1127 register int yy_is_jam;
1128 register char *yy_cp = yy_c_buf_p;
1130 register YY_CHAR yy_c = 1;
1131 if ( yy_accept[yy_current_state] )
1133 yy_last_accepting_state = yy_current_state;
1134 yy_last_accepting_cpos = yy_cp;
1136 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1138 yy_current_state = (int) yy_def[yy_current_state];
1139 if ( yy_current_state >= 60 )
1140 yy_c = yy_meta[(unsigned int) yy_c];
1142 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1143 yy_is_jam = (yy_current_state == 59);
1145 return yy_is_jam ? 0 : yy_current_state;
1149 #ifndef YY_NO_UNPUT
1150 #ifdef YY_USE_PROTOS
1151 static void yyunput( int c, register char *yy_bp )
1152 #else
1153 static void yyunput( c, yy_bp )
1154 int c;
1155 register char *yy_bp;
1156 #endif
1158 register char *yy_cp = yy_c_buf_p;
1160 /* undo effects of setting up yytext */
1161 *yy_cp = yy_hold_char;
1163 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1164 { /* need to shift things up to make room */
1165 /* +2 for EOB chars. */
1166 register int number_to_move = yy_n_chars + 2;
1167 register char *dest = &yy_current_buffer->yy_ch_buf[
1168 yy_current_buffer->yy_buf_size + 2];
1169 register char *source =
1170 &yy_current_buffer->yy_ch_buf[number_to_move];
1172 while ( source > yy_current_buffer->yy_ch_buf )
1173 *--dest = *--source;
1175 yy_cp += (int) (dest - source);
1176 yy_bp += (int) (dest - source);
1177 yy_current_buffer->yy_n_chars =
1178 yy_n_chars = yy_current_buffer->yy_buf_size;
1180 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1181 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1184 *--yy_cp = (char) c;
1187 yytext_ptr = yy_bp;
1188 yy_hold_char = *yy_cp;
1189 yy_c_buf_p = yy_cp;
1191 #endif /* ifndef YY_NO_UNPUT */
1194 #ifdef __cplusplus
1195 static int yyinput()
1196 #else
1197 static int input()
1198 #endif
1200 int c;
1202 *yy_c_buf_p = yy_hold_char;
1204 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1206 /* yy_c_buf_p now points to the character we want to return.
1207 * If this occurs *before* the EOB characters, then it's a
1208 * valid NUL; if not, then we've hit the end of the buffer.
1210 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1211 /* This was really a NUL. */
1212 *yy_c_buf_p = '\0';
1214 else
1215 { /* need more input */
1216 int offset = yy_c_buf_p - yytext_ptr;
1217 ++yy_c_buf_p;
1219 switch ( yy_get_next_buffer() )
1221 case EOB_ACT_LAST_MATCH:
1222 /* This happens because yy_g_n_b()
1223 * sees that we've accumulated a
1224 * token and flags that we need to
1225 * try matching the token before
1226 * proceeding. But for input(),
1227 * there's no matching to consider.
1228 * So convert the EOB_ACT_LAST_MATCH
1229 * to EOB_ACT_END_OF_FILE.
1232 /* Reset buffer status. */
1233 yyrestart( yyin );
1235 /* fall through */
1237 case EOB_ACT_END_OF_FILE:
1239 if ( yywrap() )
1240 return EOF;
1242 if ( ! yy_did_buffer_switch_on_eof )
1243 YY_NEW_FILE;
1244 #ifdef __cplusplus
1245 return yyinput();
1246 #else
1247 return input();
1248 #endif
1251 case EOB_ACT_CONTINUE_SCAN:
1252 yy_c_buf_p = yytext_ptr + offset;
1253 break;
1258 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1259 *yy_c_buf_p = '\0'; /* preserve yytext */
1260 yy_hold_char = *++yy_c_buf_p;
1263 return c;
1267 #ifdef YY_USE_PROTOS
1268 void yyrestart( FILE *input_file )
1269 #else
1270 void yyrestart( input_file )
1271 FILE *input_file;
1272 #endif
1274 if ( ! yy_current_buffer )
1275 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1277 yy_init_buffer( yy_current_buffer, input_file );
1278 yy_load_buffer_state();
1282 #ifdef YY_USE_PROTOS
1283 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1284 #else
1285 void yy_switch_to_buffer( new_buffer )
1286 YY_BUFFER_STATE new_buffer;
1287 #endif
1289 if ( yy_current_buffer == new_buffer )
1290 return;
1292 if ( yy_current_buffer )
1294 /* Flush out information for old buffer. */
1295 *yy_c_buf_p = yy_hold_char;
1296 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1297 yy_current_buffer->yy_n_chars = yy_n_chars;
1300 yy_current_buffer = new_buffer;
1301 yy_load_buffer_state();
1303 /* We don't actually know whether we did this switch during
1304 * EOF (yywrap()) processing, but the only time this flag
1305 * is looked at is after yywrap() is called, so it's safe
1306 * to go ahead and always set it.
1308 yy_did_buffer_switch_on_eof = 1;
1312 #ifdef YY_USE_PROTOS
1313 void yy_load_buffer_state( void )
1314 #else
1315 void yy_load_buffer_state()
1316 #endif
1318 yy_n_chars = yy_current_buffer->yy_n_chars;
1319 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1320 yyin = yy_current_buffer->yy_input_file;
1321 yy_hold_char = *yy_c_buf_p;
1325 #ifdef YY_USE_PROTOS
1326 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1327 #else
1328 YY_BUFFER_STATE yy_create_buffer( file, size )
1329 FILE *file;
1330 int size;
1331 #endif
1333 YY_BUFFER_STATE b;
1335 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1336 if ( ! b )
1337 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1339 b->yy_buf_size = size;
1341 /* yy_ch_buf has to be 2 characters longer than the size given because
1342 * we need to put in 2 end-of-buffer characters.
1344 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1345 if ( ! b->yy_ch_buf )
1346 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1348 b->yy_is_our_buffer = 1;
1350 yy_init_buffer( b, file );
1352 return b;
1356 #ifdef YY_USE_PROTOS
1357 void yy_delete_buffer( YY_BUFFER_STATE b )
1358 #else
1359 void yy_delete_buffer( b )
1360 YY_BUFFER_STATE b;
1361 #endif
1363 if ( ! b )
1364 return;
1366 if ( b == yy_current_buffer )
1367 yy_current_buffer = (YY_BUFFER_STATE) 0;
1369 if ( b->yy_is_our_buffer )
1370 yy_flex_free( (void *) b->yy_ch_buf );
1372 yy_flex_free( (void *) b );
1376 #ifndef _WIN32
1377 #include <unistd.h>
1378 #else
1379 #ifndef YY_ALWAYS_INTERACTIVE
1380 #ifndef YY_NEVER_INTERACTIVE
1381 extern int isatty YY_PROTO(( int ));
1382 #endif
1383 #endif
1384 #endif
1386 #ifdef YY_USE_PROTOS
1387 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1388 #else
1389 void yy_init_buffer( b, file )
1390 YY_BUFFER_STATE b;
1391 FILE *file;
1392 #endif
1396 yy_flush_buffer( b );
1398 b->yy_input_file = file;
1399 b->yy_fill_buffer = 1;
1401 #if YY_ALWAYS_INTERACTIVE
1402 b->yy_is_interactive = 1;
1403 #else
1404 #if YY_NEVER_INTERACTIVE
1405 b->yy_is_interactive = 0;
1406 #else
1407 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1408 #endif
1409 #endif
1413 #ifdef YY_USE_PROTOS
1414 void yy_flush_buffer( YY_BUFFER_STATE b )
1415 #else
1416 void yy_flush_buffer( b )
1417 YY_BUFFER_STATE b;
1418 #endif
1421 if ( ! b )
1422 return;
1424 b->yy_n_chars = 0;
1426 /* We always need two end-of-buffer characters. The first causes
1427 * a transition to the end-of-buffer state. The second causes
1428 * a jam in that state.
1430 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1431 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1433 b->yy_buf_pos = &b->yy_ch_buf[0];
1435 b->yy_at_bol = 1;
1436 b->yy_buffer_status = YY_BUFFER_NEW;
1438 if ( b == yy_current_buffer )
1439 yy_load_buffer_state();
1443 #ifndef YY_NO_SCAN_BUFFER
1444 #ifdef YY_USE_PROTOS
1445 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1446 #else
1447 YY_BUFFER_STATE yy_scan_buffer( base, size )
1448 char *base;
1449 yy_size_t size;
1450 #endif
1452 YY_BUFFER_STATE b;
1454 if ( size < 2 ||
1455 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1456 base[size-1] != YY_END_OF_BUFFER_CHAR )
1457 /* They forgot to leave room for the EOB's. */
1458 return 0;
1460 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1461 if ( ! b )
1462 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1464 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1465 b->yy_buf_pos = b->yy_ch_buf = base;
1466 b->yy_is_our_buffer = 0;
1467 b->yy_input_file = 0;
1468 b->yy_n_chars = b->yy_buf_size;
1469 b->yy_is_interactive = 0;
1470 b->yy_at_bol = 1;
1471 b->yy_fill_buffer = 0;
1472 b->yy_buffer_status = YY_BUFFER_NEW;
1474 yy_switch_to_buffer( b );
1476 return b;
1478 #endif
1481 #ifndef YY_NO_SCAN_STRING
1482 #ifdef YY_USE_PROTOS
1483 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1484 #else
1485 YY_BUFFER_STATE yy_scan_string( yy_str )
1486 yyconst char *yy_str;
1487 #endif
1489 int len;
1490 for ( len = 0; yy_str[len]; ++len )
1493 return yy_scan_bytes( yy_str, len );
1495 #endif
1498 #ifndef YY_NO_SCAN_BYTES
1499 #ifdef YY_USE_PROTOS
1500 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1501 #else
1502 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1503 yyconst char *bytes;
1504 int len;
1505 #endif
1507 YY_BUFFER_STATE b;
1508 char *buf;
1509 yy_size_t n;
1510 int i;
1512 /* Get memory for full buffer, including space for trailing EOB's. */
1513 n = len + 2;
1514 buf = (char *) yy_flex_alloc( n );
1515 if ( ! buf )
1516 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1518 for ( i = 0; i < len; ++i )
1519 buf[i] = bytes[i];
1521 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1523 b = yy_scan_buffer( buf, n );
1524 if ( ! b )
1525 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1527 /* It's okay to grow etc. this buffer, and we should throw it
1528 * away when we're done.
1530 b->yy_is_our_buffer = 1;
1532 return b;
1534 #endif
1537 #ifndef YY_NO_PUSH_STATE
1538 #ifdef YY_USE_PROTOS
1539 static void yy_push_state( int new_state )
1540 #else
1541 static void yy_push_state( new_state )
1542 int new_state;
1543 #endif
1545 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1547 yy_size_t new_size;
1549 yy_start_stack_depth += YY_START_STACK_INCR;
1550 new_size = yy_start_stack_depth * sizeof( int );
1552 if ( ! yy_start_stack )
1553 yy_start_stack = (int *) yy_flex_alloc( new_size );
1555 else
1556 yy_start_stack = (int *) yy_flex_realloc(
1557 (void *) yy_start_stack, new_size );
1559 if ( ! yy_start_stack )
1560 YY_FATAL_ERROR(
1561 "out of memory expanding start-condition stack" );
1564 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1566 BEGIN(new_state);
1568 #endif
1571 #ifndef YY_NO_POP_STATE
1572 static void yy_pop_state()
1574 if ( --yy_start_stack_ptr < 0 )
1575 YY_FATAL_ERROR( "start-condition stack underflow" );
1577 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1579 #endif
1582 #ifndef YY_NO_TOP_STATE
1583 static int yy_top_state()
1585 return yy_start_stack[yy_start_stack_ptr - 1];
1587 #endif
1589 #ifndef YY_EXIT_FAILURE
1590 #define YY_EXIT_FAILURE 2
1591 #endif
1593 #ifdef YY_USE_PROTOS
1594 static void yy_fatal_error( yyconst char msg[] )
1595 #else
1596 static void yy_fatal_error( msg )
1597 char msg[];
1598 #endif
1600 (void) fprintf( stderr, "%s\n", msg );
1601 exit( YY_EXIT_FAILURE );
1606 /* Redefine yyless() so it works in section 3 code. */
1608 #undef yyless
1609 #define yyless(n) \
1610 do \
1612 /* Undo effects of setting up yytext. */ \
1613 yytext[yyleng] = yy_hold_char; \
1614 yy_c_buf_p = yytext + n; \
1615 yy_hold_char = *yy_c_buf_p; \
1616 *yy_c_buf_p = '\0'; \
1617 yyleng = n; \
1619 while ( 0 )
1622 /* Internal utility routines. */
1624 #ifndef yytext_ptr
1625 #ifdef YY_USE_PROTOS
1626 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1627 #else
1628 static void yy_flex_strncpy( s1, s2, n )
1629 char *s1;
1630 yyconst char *s2;
1631 int n;
1632 #endif
1634 register int i;
1635 for ( i = 0; i < n; ++i )
1636 s1[i] = s2[i];
1638 #endif
1640 #ifdef YY_NEED_STRLEN
1641 #ifdef YY_USE_PROTOS
1642 static int yy_flex_strlen( yyconst char *s )
1643 #else
1644 static int yy_flex_strlen( s )
1645 yyconst char *s;
1646 #endif
1648 register int n;
1649 for ( n = 0; s[n]; ++n )
1652 return n;
1654 #endif
1657 #ifdef YY_USE_PROTOS
1658 static void *yy_flex_alloc( yy_size_t size )
1659 #else
1660 static void *yy_flex_alloc( size )
1661 yy_size_t size;
1662 #endif
1664 return (void *) malloc( size );
1667 #ifdef YY_USE_PROTOS
1668 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1669 #else
1670 static void *yy_flex_realloc( ptr, size )
1671 void *ptr;
1672 yy_size_t size;
1673 #endif
1675 /* The cast to (char *) in the following accommodates both
1676 * implementations that use char* generic pointers, and those
1677 * that use void* generic pointers. It works with the latter
1678 * because both ANSI C and C++ allow castless assignment from
1679 * any pointer type to void*, and deal with argument conversions
1680 * as though doing an assignment.
1682 return (void *) realloc( (char *) ptr, size );
1685 #ifdef YY_USE_PROTOS
1686 static void yy_flex_free( void *ptr )
1687 #else
1688 static void yy_flex_free( ptr )
1689 void *ptr;
1690 #endif
1692 free( ptr );
1695 #if YY_MAIN
1696 int main()
1698 yylex();
1699 return 0;
1701 #endif
1702 #line 106 "itbl-lex.l"
1705 #ifndef yywrap
1706 int
1707 yywrap ()
1709 return 1;
1711 #endif