2001-03-22 Philip Blundell <philb@gnu.org>
[binutils.git] / binutils / deflex.c
blobfd9553c56fc7c024c87d2c64375cc009a5a12fa1
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>
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 #include <unistd.h>
27 /* Use prototypes in function declarations. */
28 #define YY_USE_PROTOS
30 /* The "const" storage-class-modifier is valid. */
31 #define YY_USE_CONST
33 #else /* ! __cplusplus */
35 #if __STDC__
37 #define YY_USE_PROTOS
38 #define YY_USE_CONST
40 #endif /* __STDC__ */
41 #endif /* ! __cplusplus */
43 #ifdef __TURBOC__
44 #pragma warn -rch
45 #pragma warn -use
46 #include <io.h>
47 #include <stdlib.h>
48 #define YY_USE_CONST
49 #define YY_USE_PROTOS
50 #endif
52 #ifdef YY_USE_CONST
53 #define yyconst const
54 #else
55 #define yyconst
56 #endif
59 #ifdef YY_USE_PROTOS
60 #define YY_PROTO(proto) proto
61 #else
62 #define YY_PROTO(proto) ()
63 #endif
65 /* Returned upon end-of-file. */
66 #define YY_NULL 0
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
71 * double cast.
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75 /* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
79 #define BEGIN yy_start = 1 + 2 *
81 /* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
83 * compatibility.
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
101 extern int yyleng;
102 extern FILE *yyin, *yyout;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
108 /* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
112 * if ( condition_holds )
113 * yyless( 5 );
114 * else
115 * do_something_else();
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
122 /* Return all but the first 'n' matched characters back to the input stream. */
124 #define yyless(n) \
125 do \
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 YY_RESTORE_YY_MORE_OFFSET \
130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
133 while ( 0 )
135 #define unput(c) yyunput( c, yytext_ptr )
137 /* The following is because we cannot portably get our hands on size_t
138 * (without autoconf's help, which isn't available because we want
139 * flex-generated scanners to compile on their own).
141 typedef unsigned int yy_size_t;
144 struct yy_buffer_state
146 FILE *yy_input_file;
148 char *yy_ch_buf; /* input buffer */
149 char *yy_buf_pos; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
152 * characters.
154 yy_size_t yy_buf_size;
156 /* Number of characters read into yy_ch_buf, not including EOB
157 * characters.
159 int yy_n_chars;
161 /* Whether we "own" the buffer - i.e., we know we created it,
162 * and can realloc() it to grow it, and should free() it to
163 * delete it.
165 int yy_is_our_buffer;
167 /* Whether this is an "interactive" input source; if so, and
168 * if we're using stdio for input, then we want to use getc()
169 * instead of fread(), to make sure we stop fetching input after
170 * each newline.
172 int yy_is_interactive;
174 /* Whether we're considered to be at the beginning of a line.
175 * If so, '^' rules will be active on the next match, otherwise
176 * not.
178 int yy_at_bol;
180 /* Whether to try to fill the input buffer when we reach the
181 * end of it.
183 int yy_fill_buffer;
185 int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188 /* When an EOF's been seen but there's still some text to process
189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190 * shouldn't try reading from the input source any more. We might
191 * still have a bunch of tokens to match, though, because of
192 * possible backing-up.
194 * When we actually see the EOF, we change the status to "new"
195 * (via yyrestart()), so that the user can continue scanning by
196 * just pointing yyin at a new input file.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer = 0;
203 /* We provide macros for accessing buffer states in case in the
204 * future we want to put the buffer states in a more general
205 * "scanner state".
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
213 static int yy_n_chars; /* number of characters read into yy_ch_buf */
216 int yyleng;
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1; /* whether we need to initialize */
221 static int yy_start = 0; /* start state number */
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224 * instead of setting up a fresh yyin. A bit of a hack ...
226 static int yy_did_buffer_switch_on_eof;
228 void yyrestart YY_PROTO(( FILE *input_file ));
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
250 if ( ! yy_current_buffer ) \
251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252 yy_current_buffer->yy_is_interactive = is_interactive; \
255 #define yy_set_bol(at_bol) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_at_bol = at_bol; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264 typedef unsigned char YY_CHAR;
265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
266 typedef int yy_state_type;
267 extern char *yytext;
268 #define yytext_ptr yytext
270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
272 static int yy_get_next_buffer YY_PROTO(( void ));
273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
275 /* Done after the current pattern has been matched and before the
276 * corresponding action - sets up yytext.
278 #define YY_DO_BEFORE_ACTION \
279 yytext_ptr = yy_bp; \
280 yyleng = (int) (yy_cp - yy_bp); \
281 yy_hold_char = *yy_cp; \
282 *yy_cp = '\0'; \
283 yy_c_buf_p = yy_cp;
285 #define YY_NUM_RULES 39
286 #define YY_END_OF_BUFFER 40
287 static yyconst short int yy_accept[189] =
288 { 0,
289 0, 0, 40, 39, 33, 34, 32, 39, 27, 39,
290 30, 38, 36, 26, 31, 35, 37, 27, 27, 27,
291 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
292 27, 0, 28, 27, 0, 29, 30, 26, 31, 27,
293 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
294 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
295 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
296 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
297 27, 12, 6, 27, 7, 27, 27, 27, 27, 27,
298 27, 27, 27, 1, 27, 27, 15, 27, 27, 27,
300 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
301 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
302 27, 27, 27, 16, 27, 27, 27, 27, 27, 27,
303 27, 27, 27, 27, 14, 27, 27, 18, 20, 27,
304 27, 27, 27, 27, 27, 17, 9, 27, 10, 27,
305 27, 2, 27, 27, 27, 27, 27, 27, 11, 13,
306 27, 5, 27, 27, 21, 27, 8, 27, 27, 27,
307 27, 27, 27, 19, 4, 27, 27, 27, 23, 27,
308 25, 27, 3, 27, 27, 22, 24, 0
311 static yyconst int yy_ec[256] =
312 { 0,
313 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 4, 1, 5, 1, 6, 1, 1, 7, 1,
317 1, 8, 1, 9, 6, 10, 11, 12, 12, 12,
318 12, 12, 12, 12, 12, 12, 12, 6, 13, 1,
319 14, 1, 6, 15, 16, 17, 18, 19, 20, 21,
320 22, 23, 24, 6, 25, 26, 27, 28, 29, 30,
321 6, 31, 32, 33, 34, 35, 36, 37, 38, 39,
322 1, 1, 1, 1, 6, 1, 21, 21, 21, 21,
324 21, 21, 6, 6, 6, 6, 6, 6, 6, 6,
325 6, 6, 6, 6, 6, 6, 6, 6, 6, 21,
326 6, 6, 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, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340 1, 1, 1, 1, 1
343 static yyconst int yy_meta[40] =
344 { 0,
345 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
346 3, 4, 1, 1, 3, 4, 4, 4, 4, 4,
347 4, 3, 3, 3, 3, 3, 3, 3, 3, 3,
348 3, 3, 3, 3, 3, 3, 3, 3, 3
351 static yyconst short int yy_base[195] =
352 { 0,
353 0, 0, 209, 210, 210, 210, 210, 203, 0, 200,
354 0, 210, 210, 0, 0, 210, 210, 190, 176, 24,
355 167, 183, 14, 178, 167, 27, 180, 25, 179, 178,
356 166, 191, 210, 0, 188, 210, 0, 0, 0, 162,
357 27, 160, 160, 27, 175, 160, 165, 171, 161, 159,
358 157, 168, 165, 166, 153, 164, 148, 147, 153, 156,
359 155, 142, 157, 154, 153, 141, 139, 139, 134, 135,
360 132, 144, 34, 144, 129, 130, 138, 141, 131, 125,
361 123, 0, 0, 122, 0, 123, 119, 121, 119, 119,
362 29, 133, 124, 0, 120, 123, 0, 121, 124, 117,
364 117, 30, 117, 120, 123, 114, 104, 103, 111, 101,
365 107, 104, 100, 100, 109, 112, 98, 107, 105, 92,
366 97, 94, 92, 0, 92, 89, 98, 85, 77, 83,
367 85, 81, 74, 85, 0, 79, 81, 0, 0, 84,
368 78, 74, 77, 71, 70, 0, 0, 82, 0, 84,
369 67, 0, 79, 78, 65, 57, 78, 61, 0, 0,
370 69, 0, 76, 75, 0, 71, 0, 69, 72, 71,
371 57, 59, 54, 0, 0, 52, 37, 36, 0, 45,
372 0, 44, 0, 41, 40, 0, 0, 210, 66, 68,
373 72, 76, 55, 80
377 static yyconst short int yy_def[195] =
378 { 0,
379 188, 1, 188, 188, 188, 188, 188, 189, 190, 191,
380 192, 188, 188, 193, 194, 188, 188, 190, 190, 190,
381 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
382 190, 189, 188, 190, 191, 188, 192, 193, 194, 190,
383 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
384 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
385 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
386 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
387 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
388 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
390 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
391 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
392 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
393 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
394 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
395 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
396 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
397 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
398 190, 190, 190, 190, 190, 190, 190, 0, 188, 188,
399 188, 188, 188, 188
403 static yyconst short int yy_nxt[250] =
404 { 0,
405 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
406 4, 14, 15, 16, 17, 9, 18, 19, 20, 21,
407 9, 9, 22, 23, 9, 24, 25, 26, 9, 9,
408 27, 28, 29, 9, 30, 31, 9, 9, 9, 42,
409 46, 47, 50, 43, 53, 61, 65, 54, 55, 95,
410 111, 121, 112, 122, 62, 51, 66, 56, 38, 187,
411 186, 185, 184, 183, 182, 96, 32, 32, 32, 32,
412 34, 34, 35, 35, 35, 35, 37, 181, 37, 37,
413 39, 180, 39, 39, 179, 178, 177, 176, 175, 174,
414 173, 172, 171, 170, 169, 168, 167, 166, 165, 164,
416 163, 162, 161, 160, 159, 158, 157, 156, 155, 154,
417 153, 152, 151, 150, 149, 148, 147, 146, 145, 144,
418 143, 142, 141, 140, 139, 138, 137, 136, 135, 134,
419 133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
420 123, 120, 119, 118, 117, 116, 115, 114, 113, 110,
421 109, 108, 107, 106, 105, 104, 103, 102, 101, 100,
422 99, 98, 97, 94, 93, 92, 91, 90, 89, 88,
423 87, 86, 85, 84, 83, 82, 81, 80, 79, 78,
424 77, 76, 75, 74, 73, 72, 71, 70, 69, 68,
425 67, 64, 63, 60, 36, 33, 59, 58, 57, 52,
427 49, 48, 45, 44, 41, 40, 36, 33, 188, 3,
428 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
429 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
430 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
431 188, 188, 188, 188, 188, 188, 188, 188, 188
434 static yyconst short int yy_chk[250] =
435 { 0,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 20,
440 23, 23, 26, 20, 28, 41, 44, 28, 28, 73,
441 91, 102, 91, 102, 41, 26, 44, 28, 193, 185,
442 184, 182, 180, 178, 177, 73, 189, 189, 189, 189,
443 190, 190, 191, 191, 191, 191, 192, 176, 192, 192,
444 194, 173, 194, 194, 172, 171, 170, 169, 168, 166,
445 164, 163, 161, 158, 157, 156, 155, 154, 153, 151,
447 150, 148, 145, 144, 143, 142, 141, 140, 137, 136,
448 134, 133, 132, 131, 130, 129, 128, 127, 126, 125,
449 123, 122, 121, 120, 119, 118, 117, 116, 115, 114,
450 113, 112, 111, 110, 109, 108, 107, 106, 105, 104,
451 103, 101, 100, 99, 98, 96, 95, 93, 92, 90,
452 89, 88, 87, 86, 84, 81, 80, 79, 78, 77,
453 76, 75, 74, 72, 71, 70, 69, 68, 67, 66,
454 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,
455 55, 54, 53, 52, 51, 50, 49, 48, 47, 46,
456 45, 43, 42, 40, 35, 32, 31, 30, 29, 27,
458 25, 24, 22, 21, 19, 18, 10, 8, 3, 188,
459 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
460 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
461 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
462 188, 188, 188, 188, 188, 188, 188, 188, 188
465 static yy_state_type yy_last_accepting_state;
466 static char *yy_last_accepting_cpos;
468 /* The intent behind this definition is that it'll catch
469 * any uses of REJECT which flex missed.
471 #define REJECT reject_used_but_not_detected
472 #define yymore() yymore_used_but_not_detected
473 #define YY_MORE_ADJ 0
474 #define YY_RESTORE_YY_MORE_OFFSET
475 char *yytext;
476 #line 1 "deflex.l"
477 #define INITIAL 0
478 #line 2 "deflex.l"
480 /* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
482 This file is part of GNU Binutils.
484 This program is free software; you can redistribute it and/or modify
485 it under the terms of the GNU General Public License as published by
486 the Free Software Foundation; either version 2 of the License, or
487 (at your option) any later version.
489 This program is distributed in the hope that it will be useful,
490 but WITHOUT ANY WARRANTY; without even the implied warranty of
491 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
492 GNU General Public License for more details.
494 You should have received a copy of the GNU General Public License
495 along with this program; if not, write to the Free Software
496 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
499 /* Contributed by Steve Chamberlain
500 sac@cygnus.com
503 #define DONTDECLARE_MALLOC
504 #include "libiberty.h"
505 #include "defparse.h"
506 #include "dlltool.h"
508 int linenumber;
510 #line 511 "lex.yy.c"
512 /* Macros after this point can all be overridden by user definitions in
513 * section 1.
516 #ifndef YY_SKIP_YYWRAP
517 #ifdef __cplusplus
518 extern "C" int yywrap YY_PROTO(( void ));
519 #else
520 extern int yywrap YY_PROTO(( void ));
521 #endif
522 #endif
524 #ifndef YY_NO_UNPUT
525 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
526 #endif
528 #ifndef yytext_ptr
529 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
530 #endif
532 #ifdef YY_NEED_STRLEN
533 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
534 #endif
536 #ifndef YY_NO_INPUT
537 #ifdef __cplusplus
538 static int yyinput YY_PROTO(( void ));
539 #else
540 static int input YY_PROTO(( void ));
541 #endif
542 #endif
544 #if YY_STACK_USED
545 static int yy_start_stack_ptr = 0;
546 static int yy_start_stack_depth = 0;
547 static int *yy_start_stack = 0;
548 #ifndef YY_NO_PUSH_STATE
549 static void yy_push_state YY_PROTO(( int new_state ));
550 #endif
551 #ifndef YY_NO_POP_STATE
552 static void yy_pop_state YY_PROTO(( void ));
553 #endif
554 #ifndef YY_NO_TOP_STATE
555 static int yy_top_state YY_PROTO(( void ));
556 #endif
558 #else
559 #define YY_NO_PUSH_STATE 1
560 #define YY_NO_POP_STATE 1
561 #define YY_NO_TOP_STATE 1
562 #endif
564 #ifdef YY_MALLOC_DECL
565 YY_MALLOC_DECL
566 #else
567 #if __STDC__
568 #ifndef __cplusplus
569 #include <stdlib.h>
570 #endif
571 #else
572 /* Just try to get by without declaring the routines. This will fail
573 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
574 * or sizeof(void*) != sizeof(int).
576 #endif
577 #endif
579 /* Amount of stuff to slurp up with each read. */
580 #ifndef YY_READ_BUF_SIZE
581 #define YY_READ_BUF_SIZE 8192
582 #endif
584 /* Copy whatever the last rule matched to the standard output. */
586 #ifndef ECHO
587 /* This used to be an fputs(), but since the string might contain NUL's,
588 * we now use fwrite().
590 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
591 #endif
593 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
594 * is returned in "result".
596 #ifndef YY_INPUT
597 #define YY_INPUT(buf,result,max_size) \
598 if ( yy_current_buffer->yy_is_interactive ) \
600 int c = '*', n; \
601 for ( n = 0; n < max_size && \
602 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
603 buf[n] = (char) c; \
604 if ( c == '\n' ) \
605 buf[n++] = (char) c; \
606 if ( c == EOF && ferror( yyin ) ) \
607 YY_FATAL_ERROR( "input in flex scanner failed" ); \
608 result = n; \
610 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
611 && ferror( yyin ) ) \
612 YY_FATAL_ERROR( "input in flex scanner failed" );
613 #endif
615 /* No semi-colon after return; correct usage is to write "yyterminate();" -
616 * we don't want an extra ';' after the "return" because that will cause
617 * some compilers to complain about unreachable statements.
619 #ifndef yyterminate
620 #define yyterminate() return YY_NULL
621 #endif
623 /* Number of entries by which start-condition stack grows. */
624 #ifndef YY_START_STACK_INCR
625 #define YY_START_STACK_INCR 25
626 #endif
628 /* Report a fatal error. */
629 #ifndef YY_FATAL_ERROR
630 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
631 #endif
633 /* Default declaration of generated scanner - a define so the user can
634 * easily add parameters.
636 #ifndef YY_DECL
637 #define YY_DECL int yylex YY_PROTO(( void ))
638 #endif
640 /* Code executed at the beginning of each rule, after yytext and yyleng
641 * have been set up.
643 #ifndef YY_USER_ACTION
644 #define YY_USER_ACTION
645 #endif
647 /* Code executed at the end of each rule. */
648 #ifndef YY_BREAK
649 #define YY_BREAK break;
650 #endif
652 #define YY_RULE_SETUP \
653 YY_USER_ACTION
655 YY_DECL
657 register yy_state_type yy_current_state;
658 register char *yy_cp, *yy_bp;
659 register int yy_act;
661 #line 34 "deflex.l"
663 #line 664 "lex.yy.c"
665 if ( yy_init )
667 yy_init = 0;
669 #ifdef YY_USER_INIT
670 YY_USER_INIT;
671 #endif
673 if ( ! yy_start )
674 yy_start = 1; /* first start state */
676 if ( ! yyin )
677 yyin = stdin;
679 if ( ! yyout )
680 yyout = stdout;
682 if ( ! yy_current_buffer )
683 yy_current_buffer =
684 yy_create_buffer( yyin, YY_BUF_SIZE );
686 yy_load_buffer_state();
689 while ( 1 ) /* loops until end-of-file is reached */
691 yy_cp = yy_c_buf_p;
693 /* Support of yytext. */
694 *yy_cp = yy_hold_char;
696 /* yy_bp points to the position in yy_ch_buf of the start of
697 * the current run.
699 yy_bp = yy_cp;
701 yy_current_state = yy_start;
702 yy_match:
705 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
706 if ( yy_accept[yy_current_state] )
708 yy_last_accepting_state = yy_current_state;
709 yy_last_accepting_cpos = yy_cp;
711 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
713 yy_current_state = (int) yy_def[yy_current_state];
714 if ( yy_current_state >= 189 )
715 yy_c = yy_meta[(unsigned int) yy_c];
717 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
718 ++yy_cp;
720 while ( yy_base[yy_current_state] != 210 );
722 yy_find_action:
723 yy_act = yy_accept[yy_current_state];
724 if ( yy_act == 0 )
725 { /* have to back up */
726 yy_cp = yy_last_accepting_cpos;
727 yy_current_state = yy_last_accepting_state;
728 yy_act = yy_accept[yy_current_state];
731 YY_DO_BEFORE_ACTION;
734 do_action: /* This label is used only to access EOF actions. */
737 switch ( yy_act )
738 { /* beginning of action switch */
739 case 0: /* must back up */
740 /* undo the effects of YY_DO_BEFORE_ACTION */
741 *yy_cp = yy_hold_char;
742 yy_cp = yy_last_accepting_cpos;
743 yy_current_state = yy_last_accepting_state;
744 goto yy_find_action;
746 case 1:
747 YY_RULE_SETUP
748 #line 35 "deflex.l"
749 { return NAME;}
750 YY_BREAK
751 case 2:
752 YY_RULE_SETUP
753 #line 36 "deflex.l"
754 { return LIBRARY;}
755 YY_BREAK
756 case 3:
757 YY_RULE_SETUP
758 #line 37 "deflex.l"
759 { return DESCRIPTION;}
760 YY_BREAK
761 case 4:
762 YY_RULE_SETUP
763 #line 38 "deflex.l"
764 { return STACKSIZE;}
765 YY_BREAK
766 case 5:
767 YY_RULE_SETUP
768 #line 39 "deflex.l"
769 { return HEAPSIZE;}
770 YY_BREAK
771 case 6:
772 YY_RULE_SETUP
773 #line 40 "deflex.l"
774 { return CODE;}
775 YY_BREAK
776 case 7:
777 YY_RULE_SETUP
778 #line 41 "deflex.l"
779 { return DATA;}
780 YY_BREAK
781 case 8:
782 YY_RULE_SETUP
783 #line 42 "deflex.l"
784 { return SECTIONS;}
785 YY_BREAK
786 case 9:
787 YY_RULE_SETUP
788 #line 43 "deflex.l"
789 { return EXPORTS;}
790 YY_BREAK
791 case 10:
792 YY_RULE_SETUP
793 #line 44 "deflex.l"
794 { return IMPORTS;}
795 YY_BREAK
796 case 11:
797 YY_RULE_SETUP
798 #line 45 "deflex.l"
799 { return VERSIONK;}
800 YY_BREAK
801 case 12:
802 YY_RULE_SETUP
803 #line 46 "deflex.l"
804 { return BASE;}
805 YY_BREAK
806 case 13:
807 YY_RULE_SETUP
808 #line 47 "deflex.l"
809 { return CONSTANT; }
810 YY_BREAK
811 case 14:
812 YY_RULE_SETUP
813 #line 48 "deflex.l"
814 { return NONAME; }
815 YY_BREAK
816 case 15:
817 YY_RULE_SETUP
818 #line 49 "deflex.l"
819 { return READ;}
820 YY_BREAK
821 case 16:
822 YY_RULE_SETUP
823 #line 50 "deflex.l"
824 { return WRITE;}
825 YY_BREAK
826 case 17:
827 YY_RULE_SETUP
828 #line 51 "deflex.l"
829 { return EXECUTE;}
830 YY_BREAK
831 case 18:
832 YY_RULE_SETUP
833 #line 52 "deflex.l"
834 { return SHARED;}
835 YY_BREAK
836 case 19:
837 YY_RULE_SETUP
838 #line 53 "deflex.l"
839 { return NONSHARED;}
840 YY_BREAK
841 case 20:
842 YY_RULE_SETUP
843 #line 54 "deflex.l"
844 { return SINGLE;}
845 YY_BREAK
846 case 21:
847 YY_RULE_SETUP
848 #line 55 "deflex.l"
849 { return MULTIPLE;}
850 YY_BREAK
851 case 22:
852 YY_RULE_SETUP
853 #line 56 "deflex.l"
854 { return INITINSTANCE;}
855 YY_BREAK
856 case 23:
857 YY_RULE_SETUP
858 #line 57 "deflex.l"
859 { return INITGLOBAL;}
860 YY_BREAK
861 case 24:
862 YY_RULE_SETUP
863 #line 58 "deflex.l"
864 { return TERMINSTANCE;}
865 YY_BREAK
866 case 25:
867 YY_RULE_SETUP
868 #line 59 "deflex.l"
869 { return TERMGLOBAL;}
870 YY_BREAK
871 case 26:
872 YY_RULE_SETUP
873 #line 61 "deflex.l"
874 { yylval.number = strtol (yytext,0,0);
875 return NUMBER; }
876 YY_BREAK
877 case 27:
878 YY_RULE_SETUP
879 #line 64 "deflex.l"
881 yylval.id = xstrdup (yytext);
882 return ID;
884 YY_BREAK
885 case 28:
886 YY_RULE_SETUP
887 #line 69 "deflex.l"
889 yylval.id = xstrdup (yytext+1);
890 yylval.id[yyleng-2] = 0;
891 return ID;
893 YY_BREAK
894 case 29:
895 YY_RULE_SETUP
896 #line 75 "deflex.l"
898 yylval.id = xstrdup (yytext+1);
899 yylval.id[yyleng-2] = 0;
900 return ID;
902 YY_BREAK
903 case 30:
904 YY_RULE_SETUP
905 #line 80 "deflex.l"
907 YY_BREAK
908 case 31:
909 YY_RULE_SETUP
910 #line 81 "deflex.l"
912 YY_BREAK
913 case 32:
914 YY_RULE_SETUP
915 #line 82 "deflex.l"
917 YY_BREAK
918 case 33:
919 YY_RULE_SETUP
920 #line 83 "deflex.l"
922 YY_BREAK
923 case 34:
924 YY_RULE_SETUP
925 #line 84 "deflex.l"
926 { linenumber ++ ;}
927 YY_BREAK
928 case 35:
929 YY_RULE_SETUP
930 #line 85 "deflex.l"
931 { return '=';}
932 YY_BREAK
933 case 36:
934 YY_RULE_SETUP
935 #line 86 "deflex.l"
936 { return '.';}
937 YY_BREAK
938 case 37:
939 YY_RULE_SETUP
940 #line 87 "deflex.l"
941 { return '@';}
942 YY_BREAK
943 case 38:
944 YY_RULE_SETUP
945 #line 88 "deflex.l"
946 { return ',';}
947 YY_BREAK
948 case 39:
949 YY_RULE_SETUP
950 #line 89 "deflex.l"
951 ECHO;
952 YY_BREAK
953 #line 954 "lex.yy.c"
954 case YY_STATE_EOF(INITIAL):
955 yyterminate();
957 case YY_END_OF_BUFFER:
959 /* Amount of text matched not including the EOB char. */
960 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
962 /* Undo the effects of YY_DO_BEFORE_ACTION. */
963 *yy_cp = yy_hold_char;
964 YY_RESTORE_YY_MORE_OFFSET
966 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
968 /* We're scanning a new file or input source. It's
969 * possible that this happened because the user
970 * just pointed yyin at a new source and called
971 * yylex(). If so, then we have to assure
972 * consistency between yy_current_buffer and our
973 * globals. Here is the right place to do so, because
974 * this is the first action (other than possibly a
975 * back-up) that will match for the new input source.
977 yy_n_chars = yy_current_buffer->yy_n_chars;
978 yy_current_buffer->yy_input_file = yyin;
979 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
982 /* Note that here we test for yy_c_buf_p "<=" to the position
983 * of the first EOB in the buffer, since yy_c_buf_p will
984 * already have been incremented past the NUL character
985 * (since all states make transitions on EOB to the
986 * end-of-buffer state). Contrast this with the test
987 * in input().
989 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
990 { /* This was really a NUL. */
991 yy_state_type yy_next_state;
993 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
995 yy_current_state = yy_get_previous_state();
997 /* Okay, we're now positioned to make the NUL
998 * transition. We couldn't have
999 * yy_get_previous_state() go ahead and do it
1000 * for us because it doesn't know how to deal
1001 * with the possibility of jamming (and we don't
1002 * want to build jamming into it because then it
1003 * will run more slowly).
1006 yy_next_state = yy_try_NUL_trans( yy_current_state );
1008 yy_bp = yytext_ptr + YY_MORE_ADJ;
1010 if ( yy_next_state )
1012 /* Consume the NUL. */
1013 yy_cp = ++yy_c_buf_p;
1014 yy_current_state = yy_next_state;
1015 goto yy_match;
1018 else
1020 yy_cp = yy_c_buf_p;
1021 goto yy_find_action;
1025 else switch ( yy_get_next_buffer() )
1027 case EOB_ACT_END_OF_FILE:
1029 yy_did_buffer_switch_on_eof = 0;
1031 if ( yywrap() )
1033 /* Note: because we've taken care in
1034 * yy_get_next_buffer() to have set up
1035 * yytext, we can now set up
1036 * yy_c_buf_p so that if some total
1037 * hoser (like flex itself) wants to
1038 * call the scanner after we return the
1039 * YY_NULL, it'll still work - another
1040 * YY_NULL will get returned.
1042 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1044 yy_act = YY_STATE_EOF(YY_START);
1045 goto do_action;
1048 else
1050 if ( ! yy_did_buffer_switch_on_eof )
1051 YY_NEW_FILE;
1053 break;
1056 case EOB_ACT_CONTINUE_SCAN:
1057 yy_c_buf_p =
1058 yytext_ptr + yy_amount_of_matched_text;
1060 yy_current_state = yy_get_previous_state();
1062 yy_cp = yy_c_buf_p;
1063 yy_bp = yytext_ptr + YY_MORE_ADJ;
1064 goto yy_match;
1066 case EOB_ACT_LAST_MATCH:
1067 yy_c_buf_p =
1068 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1070 yy_current_state = yy_get_previous_state();
1072 yy_cp = yy_c_buf_p;
1073 yy_bp = yytext_ptr + YY_MORE_ADJ;
1074 goto yy_find_action;
1076 break;
1079 default:
1080 YY_FATAL_ERROR(
1081 "fatal flex scanner internal error--no action found" );
1082 } /* end of action switch */
1083 } /* end of scanning one token */
1084 } /* end of yylex */
1087 /* yy_get_next_buffer - try to read in a new buffer
1089 * Returns a code representing an action:
1090 * EOB_ACT_LAST_MATCH -
1091 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1092 * EOB_ACT_END_OF_FILE - end of file
1095 static int yy_get_next_buffer()
1097 register char *dest = yy_current_buffer->yy_ch_buf;
1098 register char *source = yytext_ptr;
1099 register int number_to_move, i;
1100 int ret_val;
1102 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1103 YY_FATAL_ERROR(
1104 "fatal flex scanner internal error--end of buffer missed" );
1106 if ( yy_current_buffer->yy_fill_buffer == 0 )
1107 { /* Don't try to fill the buffer, so this is an EOF. */
1108 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1110 /* We matched a single character, the EOB, so
1111 * treat this as a final EOF.
1113 return EOB_ACT_END_OF_FILE;
1116 else
1118 /* We matched some text prior to the EOB, first
1119 * process it.
1121 return EOB_ACT_LAST_MATCH;
1125 /* Try to read more data. */
1127 /* First move last chars to start of buffer. */
1128 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1130 for ( i = 0; i < number_to_move; ++i )
1131 *(dest++) = *(source++);
1133 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1134 /* don't do the read, it's not guaranteed to return an EOF,
1135 * just force an EOF
1137 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1139 else
1141 int num_to_read =
1142 yy_current_buffer->yy_buf_size - number_to_move - 1;
1144 while ( num_to_read <= 0 )
1145 { /* Not enough room in the buffer - grow it. */
1146 #ifdef YY_USES_REJECT
1147 YY_FATAL_ERROR(
1148 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1149 #else
1151 /* just a shorter name for the current buffer */
1152 YY_BUFFER_STATE b = yy_current_buffer;
1154 int yy_c_buf_p_offset =
1155 (int) (yy_c_buf_p - b->yy_ch_buf);
1157 if ( b->yy_is_our_buffer )
1159 int new_size = b->yy_buf_size * 2;
1161 if ( new_size <= 0 )
1162 b->yy_buf_size += b->yy_buf_size / 8;
1163 else
1164 b->yy_buf_size *= 2;
1166 b->yy_ch_buf = (char *)
1167 /* Include room in for 2 EOB chars. */
1168 yy_flex_realloc( (void *) b->yy_ch_buf,
1169 b->yy_buf_size + 2 );
1171 else
1172 /* Can't grow it, we don't own it. */
1173 b->yy_ch_buf = 0;
1175 if ( ! b->yy_ch_buf )
1176 YY_FATAL_ERROR(
1177 "fatal error - scanner input buffer overflow" );
1179 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1181 num_to_read = yy_current_buffer->yy_buf_size -
1182 number_to_move - 1;
1183 #endif
1186 if ( num_to_read > YY_READ_BUF_SIZE )
1187 num_to_read = YY_READ_BUF_SIZE;
1189 /* Read in more data. */
1190 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1191 yy_n_chars, num_to_read );
1193 yy_current_buffer->yy_n_chars = yy_n_chars;
1196 if ( yy_n_chars == 0 )
1198 if ( number_to_move == YY_MORE_ADJ )
1200 ret_val = EOB_ACT_END_OF_FILE;
1201 yyrestart( yyin );
1204 else
1206 ret_val = EOB_ACT_LAST_MATCH;
1207 yy_current_buffer->yy_buffer_status =
1208 YY_BUFFER_EOF_PENDING;
1212 else
1213 ret_val = EOB_ACT_CONTINUE_SCAN;
1215 yy_n_chars += number_to_move;
1216 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1217 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1219 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1221 return ret_val;
1225 /* yy_get_previous_state - get the state just before the EOB char was reached */
1227 static yy_state_type yy_get_previous_state()
1229 register yy_state_type yy_current_state;
1230 register char *yy_cp;
1232 yy_current_state = yy_start;
1234 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1236 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1237 if ( yy_accept[yy_current_state] )
1239 yy_last_accepting_state = yy_current_state;
1240 yy_last_accepting_cpos = yy_cp;
1242 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1244 yy_current_state = (int) yy_def[yy_current_state];
1245 if ( yy_current_state >= 189 )
1246 yy_c = yy_meta[(unsigned int) yy_c];
1248 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1251 return yy_current_state;
1255 /* yy_try_NUL_trans - try to make a transition on the NUL character
1257 * synopsis
1258 * next_state = yy_try_NUL_trans( current_state );
1261 #ifdef YY_USE_PROTOS
1262 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1263 #else
1264 static yy_state_type yy_try_NUL_trans( yy_current_state )
1265 yy_state_type yy_current_state;
1266 #endif
1268 register int yy_is_jam;
1269 register char *yy_cp = yy_c_buf_p;
1271 register YY_CHAR yy_c = 1;
1272 if ( yy_accept[yy_current_state] )
1274 yy_last_accepting_state = yy_current_state;
1275 yy_last_accepting_cpos = yy_cp;
1277 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1279 yy_current_state = (int) yy_def[yy_current_state];
1280 if ( yy_current_state >= 189 )
1281 yy_c = yy_meta[(unsigned int) yy_c];
1283 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1284 yy_is_jam = (yy_current_state == 188);
1286 return yy_is_jam ? 0 : yy_current_state;
1290 #ifndef YY_NO_UNPUT
1291 #ifdef YY_USE_PROTOS
1292 static void yyunput( int c, register char *yy_bp )
1293 #else
1294 static void yyunput( c, yy_bp )
1295 int c;
1296 register char *yy_bp;
1297 #endif
1299 register char *yy_cp = yy_c_buf_p;
1301 /* undo effects of setting up yytext */
1302 *yy_cp = yy_hold_char;
1304 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1305 { /* need to shift things up to make room */
1306 /* +2 for EOB chars. */
1307 register int number_to_move = yy_n_chars + 2;
1308 register char *dest = &yy_current_buffer->yy_ch_buf[
1309 yy_current_buffer->yy_buf_size + 2];
1310 register char *source =
1311 &yy_current_buffer->yy_ch_buf[number_to_move];
1313 while ( source > yy_current_buffer->yy_ch_buf )
1314 *--dest = *--source;
1316 yy_cp += (int) (dest - source);
1317 yy_bp += (int) (dest - source);
1318 yy_current_buffer->yy_n_chars =
1319 yy_n_chars = yy_current_buffer->yy_buf_size;
1321 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1322 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1325 *--yy_cp = (char) c;
1328 yytext_ptr = yy_bp;
1329 yy_hold_char = *yy_cp;
1330 yy_c_buf_p = yy_cp;
1332 #endif /* ifndef YY_NO_UNPUT */
1335 #ifdef __cplusplus
1336 static int yyinput()
1337 #else
1338 static int input()
1339 #endif
1341 int c;
1343 *yy_c_buf_p = yy_hold_char;
1345 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1347 /* yy_c_buf_p now points to the character we want to return.
1348 * If this occurs *before* the EOB characters, then it's a
1349 * valid NUL; if not, then we've hit the end of the buffer.
1351 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1352 /* This was really a NUL. */
1353 *yy_c_buf_p = '\0';
1355 else
1356 { /* need more input */
1357 int offset = yy_c_buf_p - yytext_ptr;
1358 ++yy_c_buf_p;
1360 switch ( yy_get_next_buffer() )
1362 case EOB_ACT_LAST_MATCH:
1363 /* This happens because yy_g_n_b()
1364 * sees that we've accumulated a
1365 * token and flags that we need to
1366 * try matching the token before
1367 * proceeding. But for input(),
1368 * there's no matching to consider.
1369 * So convert the EOB_ACT_LAST_MATCH
1370 * to EOB_ACT_END_OF_FILE.
1373 /* Reset buffer status. */
1374 yyrestart( yyin );
1376 /* fall through */
1378 case EOB_ACT_END_OF_FILE:
1380 if ( yywrap() )
1381 return EOF;
1383 if ( ! yy_did_buffer_switch_on_eof )
1384 YY_NEW_FILE;
1385 #ifdef __cplusplus
1386 return yyinput();
1387 #else
1388 return input();
1389 #endif
1392 case EOB_ACT_CONTINUE_SCAN:
1393 yy_c_buf_p = yytext_ptr + offset;
1394 break;
1399 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1400 *yy_c_buf_p = '\0'; /* preserve yytext */
1401 yy_hold_char = *++yy_c_buf_p;
1404 return c;
1408 #ifdef YY_USE_PROTOS
1409 void yyrestart( FILE *input_file )
1410 #else
1411 void yyrestart( input_file )
1412 FILE *input_file;
1413 #endif
1415 if ( ! yy_current_buffer )
1416 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1418 yy_init_buffer( yy_current_buffer, input_file );
1419 yy_load_buffer_state();
1423 #ifdef YY_USE_PROTOS
1424 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1425 #else
1426 void yy_switch_to_buffer( new_buffer )
1427 YY_BUFFER_STATE new_buffer;
1428 #endif
1430 if ( yy_current_buffer == new_buffer )
1431 return;
1433 if ( yy_current_buffer )
1435 /* Flush out information for old buffer. */
1436 *yy_c_buf_p = yy_hold_char;
1437 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1438 yy_current_buffer->yy_n_chars = yy_n_chars;
1441 yy_current_buffer = new_buffer;
1442 yy_load_buffer_state();
1444 /* We don't actually know whether we did this switch during
1445 * EOF (yywrap()) processing, but the only time this flag
1446 * is looked at is after yywrap() is called, so it's safe
1447 * to go ahead and always set it.
1449 yy_did_buffer_switch_on_eof = 1;
1453 #ifdef YY_USE_PROTOS
1454 void yy_load_buffer_state( void )
1455 #else
1456 void yy_load_buffer_state()
1457 #endif
1459 yy_n_chars = yy_current_buffer->yy_n_chars;
1460 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1461 yyin = yy_current_buffer->yy_input_file;
1462 yy_hold_char = *yy_c_buf_p;
1466 #ifdef YY_USE_PROTOS
1467 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1468 #else
1469 YY_BUFFER_STATE yy_create_buffer( file, size )
1470 FILE *file;
1471 int size;
1472 #endif
1474 YY_BUFFER_STATE b;
1476 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1477 if ( ! b )
1478 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1480 b->yy_buf_size = size;
1482 /* yy_ch_buf has to be 2 characters longer than the size given because
1483 * we need to put in 2 end-of-buffer characters.
1485 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1486 if ( ! b->yy_ch_buf )
1487 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1489 b->yy_is_our_buffer = 1;
1491 yy_init_buffer( b, file );
1493 return b;
1497 #ifdef YY_USE_PROTOS
1498 void yy_delete_buffer( YY_BUFFER_STATE b )
1499 #else
1500 void yy_delete_buffer( b )
1501 YY_BUFFER_STATE b;
1502 #endif
1504 if ( ! b )
1505 return;
1507 if ( b == yy_current_buffer )
1508 yy_current_buffer = (YY_BUFFER_STATE) 0;
1510 if ( b->yy_is_our_buffer )
1511 yy_flex_free( (void *) b->yy_ch_buf );
1513 yy_flex_free( (void *) b );
1517 #ifndef YY_ALWAYS_INTERACTIVE
1518 #ifndef YY_NEVER_INTERACTIVE
1519 extern int isatty YY_PROTO(( int ));
1520 #endif
1521 #endif
1523 #ifdef YY_USE_PROTOS
1524 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1525 #else
1526 void yy_init_buffer( b, file )
1527 YY_BUFFER_STATE b;
1528 FILE *file;
1529 #endif
1533 yy_flush_buffer( b );
1535 b->yy_input_file = file;
1536 b->yy_fill_buffer = 1;
1538 #if YY_ALWAYS_INTERACTIVE
1539 b->yy_is_interactive = 1;
1540 #else
1541 #if YY_NEVER_INTERACTIVE
1542 b->yy_is_interactive = 0;
1543 #else
1544 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1545 #endif
1546 #endif
1550 #ifdef YY_USE_PROTOS
1551 void yy_flush_buffer( YY_BUFFER_STATE b )
1552 #else
1553 void yy_flush_buffer( b )
1554 YY_BUFFER_STATE b;
1555 #endif
1558 if ( ! b )
1559 return;
1561 b->yy_n_chars = 0;
1563 /* We always need two end-of-buffer characters. The first causes
1564 * a transition to the end-of-buffer state. The second causes
1565 * a jam in that state.
1567 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1568 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1570 b->yy_buf_pos = &b->yy_ch_buf[0];
1572 b->yy_at_bol = 1;
1573 b->yy_buffer_status = YY_BUFFER_NEW;
1575 if ( b == yy_current_buffer )
1576 yy_load_buffer_state();
1580 #ifndef YY_NO_SCAN_BUFFER
1581 #ifdef YY_USE_PROTOS
1582 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1583 #else
1584 YY_BUFFER_STATE yy_scan_buffer( base, size )
1585 char *base;
1586 yy_size_t size;
1587 #endif
1589 YY_BUFFER_STATE b;
1591 if ( size < 2 ||
1592 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1593 base[size-1] != YY_END_OF_BUFFER_CHAR )
1594 /* They forgot to leave room for the EOB's. */
1595 return 0;
1597 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1598 if ( ! b )
1599 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1601 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1602 b->yy_buf_pos = b->yy_ch_buf = base;
1603 b->yy_is_our_buffer = 0;
1604 b->yy_input_file = 0;
1605 b->yy_n_chars = b->yy_buf_size;
1606 b->yy_is_interactive = 0;
1607 b->yy_at_bol = 1;
1608 b->yy_fill_buffer = 0;
1609 b->yy_buffer_status = YY_BUFFER_NEW;
1611 yy_switch_to_buffer( b );
1613 return b;
1615 #endif
1618 #ifndef YY_NO_SCAN_STRING
1619 #ifdef YY_USE_PROTOS
1620 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1621 #else
1622 YY_BUFFER_STATE yy_scan_string( yy_str )
1623 yyconst char *yy_str;
1624 #endif
1626 int len;
1627 for ( len = 0; yy_str[len]; ++len )
1630 return yy_scan_bytes( yy_str, len );
1632 #endif
1635 #ifndef YY_NO_SCAN_BYTES
1636 #ifdef YY_USE_PROTOS
1637 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1638 #else
1639 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1640 yyconst char *bytes;
1641 int len;
1642 #endif
1644 YY_BUFFER_STATE b;
1645 char *buf;
1646 yy_size_t n;
1647 int i;
1649 /* Get memory for full buffer, including space for trailing EOB's. */
1650 n = len + 2;
1651 buf = (char *) yy_flex_alloc( n );
1652 if ( ! buf )
1653 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1655 for ( i = 0; i < len; ++i )
1656 buf[i] = bytes[i];
1658 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1660 b = yy_scan_buffer( buf, n );
1661 if ( ! b )
1662 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1664 /* It's okay to grow etc. this buffer, and we should throw it
1665 * away when we're done.
1667 b->yy_is_our_buffer = 1;
1669 return b;
1671 #endif
1674 #ifndef YY_NO_PUSH_STATE
1675 #ifdef YY_USE_PROTOS
1676 static void yy_push_state( int new_state )
1677 #else
1678 static void yy_push_state( new_state )
1679 int new_state;
1680 #endif
1682 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1684 yy_size_t new_size;
1686 yy_start_stack_depth += YY_START_STACK_INCR;
1687 new_size = yy_start_stack_depth * sizeof( int );
1689 if ( ! yy_start_stack )
1690 yy_start_stack = (int *) yy_flex_alloc( new_size );
1692 else
1693 yy_start_stack = (int *) yy_flex_realloc(
1694 (void *) yy_start_stack, new_size );
1696 if ( ! yy_start_stack )
1697 YY_FATAL_ERROR(
1698 "out of memory expanding start-condition stack" );
1701 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1703 BEGIN(new_state);
1705 #endif
1708 #ifndef YY_NO_POP_STATE
1709 static void yy_pop_state()
1711 if ( --yy_start_stack_ptr < 0 )
1712 YY_FATAL_ERROR( "start-condition stack underflow" );
1714 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1716 #endif
1719 #ifndef YY_NO_TOP_STATE
1720 static int yy_top_state()
1722 return yy_start_stack[yy_start_stack_ptr - 1];
1724 #endif
1726 #ifndef YY_EXIT_FAILURE
1727 #define YY_EXIT_FAILURE 2
1728 #endif
1730 #ifdef YY_USE_PROTOS
1731 static void yy_fatal_error( yyconst char msg[] )
1732 #else
1733 static void yy_fatal_error( msg )
1734 char msg[];
1735 #endif
1737 (void) fprintf( stderr, "%s\n", msg );
1738 exit( YY_EXIT_FAILURE );
1743 /* Redefine yyless() so it works in section 3 code. */
1745 #undef yyless
1746 #define yyless(n) \
1747 do \
1749 /* Undo effects of setting up yytext. */ \
1750 yytext[yyleng] = yy_hold_char; \
1751 yy_c_buf_p = yytext + n; \
1752 yy_hold_char = *yy_c_buf_p; \
1753 *yy_c_buf_p = '\0'; \
1754 yyleng = n; \
1756 while ( 0 )
1759 /* Internal utility routines. */
1761 #ifndef yytext_ptr
1762 #ifdef YY_USE_PROTOS
1763 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1764 #else
1765 static void yy_flex_strncpy( s1, s2, n )
1766 char *s1;
1767 yyconst char *s2;
1768 int n;
1769 #endif
1771 register int i;
1772 for ( i = 0; i < n; ++i )
1773 s1[i] = s2[i];
1775 #endif
1777 #ifdef YY_NEED_STRLEN
1778 #ifdef YY_USE_PROTOS
1779 static int yy_flex_strlen( yyconst char *s )
1780 #else
1781 static int yy_flex_strlen( s )
1782 yyconst char *s;
1783 #endif
1785 register int n;
1786 for ( n = 0; s[n]; ++n )
1789 return n;
1791 #endif
1794 #ifdef YY_USE_PROTOS
1795 static void *yy_flex_alloc( yy_size_t size )
1796 #else
1797 static void *yy_flex_alloc( size )
1798 yy_size_t size;
1799 #endif
1801 return (void *) malloc( size );
1804 #ifdef YY_USE_PROTOS
1805 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1806 #else
1807 static void *yy_flex_realloc( ptr, size )
1808 void *ptr;
1809 yy_size_t size;
1810 #endif
1812 /* The cast to (char *) in the following accommodates both
1813 * implementations that use char* generic pointers, and those
1814 * that use void* generic pointers. It works with the latter
1815 * because both ANSI C and C++ allow castless assignment from
1816 * any pointer type to void*, and deal with argument conversions
1817 * as though doing an assignment.
1819 return (void *) realloc( (char *) ptr, size );
1822 #ifdef YY_USE_PROTOS
1823 static void yy_flex_free( void *ptr )
1824 #else
1825 static void yy_flex_free( ptr )
1826 void *ptr;
1827 #endif
1829 free( ptr );
1832 #if YY_MAIN
1833 int main()
1835 yylex();
1836 return 0;
1838 #endif
1839 #line 89 "deflex.l"
1841 #ifndef yywrap
1842 /* Needed for lex, though not flex. */
1843 int yywrap() { return 1; }
1844 #endif