1
2 #line 2 "syslex.c"
3
4 #define YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include <inttypes.h>
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 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX (4294967295U)
84 #endif
85
86 #ifndef SIZE_MAX
87 #define SIZE_MAX (~(size_t)0)
88 #endif
89
90 #endif /* ! C99 */
91
92 #endif /* ! FLEXINT_H */
93
94 /* begin standard C++ headers. */
95
96 /* TODO: this is always defined, so inline it */
97 #define yyconst const
98
99 #if defined(__GNUC__) && __GNUC__ >= 3
100 #define yynoreturn __attribute__((__noreturn__))
101 #else
102 #define yynoreturn
103 #endif
104
105 /* Returned upon end-of-file. */
106 #define YY_NULL 0
107
108 /* Promotes a possibly negative, possibly signed char to an
109 * integer in range [0..255] for use as an array index.
110 */
111 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
112
113 /* Enter a start condition. This macro really ought to take a parameter,
114 * but we do it the disgusting crufty way forced on us by the ()-less
115 * definition of BEGIN.
116 */
117 #define BEGIN (yy_start) = 1 + 2 *
118 /* Translate the current start state into a value that can be later handed
119 * to BEGIN to return to the state. The YYSTATE alias is for lex
120 * compatibility.
121 */
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
126 /* Special action meaning "start processing a new file". */
127 #define YY_NEW_FILE yyrestart( yyin )
128 #define YY_END_OF_BUFFER_CHAR 0
129
130 /* Size of default input buffer. */
131 #ifndef YY_BUF_SIZE
132 #ifdef __ia64__
133 /* On IA-64, the buffer size is 16k, not 8k.
134 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
135 * Ditto for the __ia64__ case accordingly.
136 */
137 #define YY_BUF_SIZE 32768
138 #else
139 #define YY_BUF_SIZE 16384
140 #endif /* __ia64__ */
141 #endif
142
143 /* The state buf must be large enough to hold one state per character in the main buffer.
144 */
145 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
146
147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
148 #define YY_TYPEDEF_YY_BUFFER_STATE
149 typedef struct yy_buffer_state *YY_BUFFER_STATE;
150 #endif
151
152 #ifndef YY_TYPEDEF_YY_SIZE_T
153 #define YY_TYPEDEF_YY_SIZE_T
154 typedef size_t yy_size_t;
155 #endif
156
157 extern int yyleng;
158
159 extern FILE *yyin, *yyout;
160
161 #define EOB_ACT_CONTINUE_SCAN 0
162 #define EOB_ACT_END_OF_FILE 1
163 #define EOB_ACT_LAST_MATCH 2
164
165 #define YY_LESS_LINENO(n)
166 #define YY_LINENO_REWIND_TO(ptr)
167
168 /* Return all but the first "n" matched characters back to the input stream. */
169 #define yyless(n) \
170 do \
171 { \
172 /* Undo effects of setting up yytext. */ \
173 int yyless_macro_arg = (n); \
174 YY_LESS_LINENO(yyless_macro_arg);\
175 *yy_cp = (yy_hold_char); \
176 YY_RESTORE_YY_MORE_OFFSET \
177 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
178 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
179 } \
180 while ( 0 )
181 #define unput(c) yyunput( c, (yytext_ptr) )
182
183 #ifndef YY_STRUCT_YY_BUFFER_STATE
184 #define YY_STRUCT_YY_BUFFER_STATE
185 struct yy_buffer_state
186 {
187 FILE *yy_input_file;
188
189 char *yy_ch_buf; /* input buffer */
190 char *yy_buf_pos; /* current position in input buffer */
191
192 /* Size of input buffer in bytes, not including room for EOB
193 * characters.
194 */
195 int yy_buf_size;
196
197 /* Number of characters read into yy_ch_buf, not including EOB
198 * characters.
199 */
200 int yy_n_chars;
201
202 /* Whether we "own" the buffer - i.e., we know we created it,
203 * and can realloc() it to grow it, and should free() it to
204 * delete it.
205 */
206 int yy_is_our_buffer;
207
208 /* Whether this is an "interactive" input source; if so, and
209 * if we're using stdio for input, then we want to use getc()
210 * instead of fread(), to make sure we stop fetching input after
211 * each newline.
212 */
213 int yy_is_interactive;
214
215 /* Whether we're considered to be at the beginning of a line.
216 * If so, '^' rules will be active on the next match, otherwise
217 * not.
218 */
219 int yy_at_bol;
220
221 int yy_bs_lineno; /**< The line count. */
222 int yy_bs_column; /**< The column count. */
223
224 /* Whether to try to fill the input buffer when we reach the
225 * end of it.
226 */
227 int yy_fill_buffer;
228
229 int yy_buffer_status;
230
231 #define YY_BUFFER_NEW 0
232 #define YY_BUFFER_NORMAL 1
233 /* When an EOF's been seen but there's still some text to process
234 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
235 * shouldn't try reading from the input source any more. We might
236 * still have a bunch of tokens to match, though, because of
237 * possible backing-up.
238 *
239 * When we actually see the EOF, we change the status to "new"
240 * (via yyrestart()), so that the user can continue scanning by
241 * just pointing yyin at a new input file.
242 */
243 #define YY_BUFFER_EOF_PENDING 2
244
245 };
246 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
247
248 /* Stack of input buffers. */
249 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
250 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
251 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
252
253 /* We provide macros for accessing buffer states in case in the
254 * future we want to put the buffer states in a more general
255 * "scanner state".
256 *
257 * Returns the top of the stack, or NULL.
258 */
259 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
260 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
261 : NULL)
262 /* Same as previous macro, but useful when we know that the buffer stack is not
263 * NULL or when we need an lvalue. For internal use only.
264 */
265 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
266
267 /* yy_hold_char holds the character lost when yytext is formed. */
268 static char yy_hold_char;
269 static int yy_n_chars; /* number of characters read into yy_ch_buf */
270 int yyleng;
271
272 /* Points to current character in buffer. */
273 static char *yy_c_buf_p = NULL;
274 static int yy_init = 0; /* whether we need to initialize */
275 static int yy_start = 0; /* start state number */
276
277 /* Flag which is used to allow yywrap()'s to do buffer switches
278 * instead of setting up a fresh yyin. A bit of a hack ...
279 */
280 static int yy_did_buffer_switch_on_eof;
281
282 void yyrestart ( FILE *input_file );
283 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
284 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
285 void yy_delete_buffer ( YY_BUFFER_STATE b );
286 void yy_flush_buffer ( YY_BUFFER_STATE b );
287 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
288 void yypop_buffer_state ( void );
289
290 static void yyensure_buffer_stack ( void );
291 static void yy_load_buffer_state ( void );
292 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
293 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
294
295 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
296 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
297 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
298
299 void *yyalloc ( yy_size_t );
300 void *yyrealloc ( void *, yy_size_t );
301 void yyfree ( void * );
302
303 #define yy_new_buffer yy_create_buffer
304 #define yy_set_interactive(is_interactive) \
305 { \
306 if ( ! YY_CURRENT_BUFFER ){ \
307 yyensure_buffer_stack (); \
308 YY_CURRENT_BUFFER_LVALUE = \
309 yy_create_buffer( yyin, YY_BUF_SIZE ); \
310 } \
311 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
312 }
313 #define yy_set_bol(at_bol) \
314 { \
315 if ( ! YY_CURRENT_BUFFER ){\
316 yyensure_buffer_stack (); \
317 YY_CURRENT_BUFFER_LVALUE = \
318 yy_create_buffer( yyin, YY_BUF_SIZE ); \
319 } \
320 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
321 }
322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
323
324 #define yywrap() (/*CONSTCOND*/1)
325 #define YY_SKIP_YYWRAP
326 typedef flex_uint8_t YY_CHAR;
327
328 FILE *yyin = NULL, *yyout = NULL;
329
330 typedef int yy_state_type;
331
332 extern int yylineno;
333 int yylineno = 1;
334
335 extern char *yytext;
336 #ifdef yytext_ptr
337 #undef yytext_ptr
338 #endif
339 #define yytext_ptr yytext
340
341 static yy_state_type yy_get_previous_state ( void );
342 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
343 static int yy_get_next_buffer ( void );
344 static void yynoreturn yy_fatal_error ( const char* msg );
345
346 /* Done after the current pattern has been matched and before the
347 * corresponding action - sets up yytext.
348 */
349 #define YY_DO_BEFORE_ACTION \
350 (yytext_ptr) = yy_bp; \
351 yyleng = (int) (yy_cp - yy_bp); \
352 (yy_hold_char) = *yy_cp; \
353 *yy_cp = '\0'; \
354 (yy_c_buf_p) = yy_cp;
355 #define YY_NUM_RULES 25
356 #define YY_END_OF_BUFFER 26
357 /* This struct is not used in this scanner,
358 but its presence is necessary. */
359 struct yy_trans_info
360 {
361 flex_int32_t yy_verify;
362 flex_int32_t yy_nxt;
363 };
364 static const flex_int16_t yy_accept[81] =
365 { 0,
366 0, 0, 26, 25, 7, 8, 5, 25, 1, 2,
367 11, 11, 6, 3, 4, 25, 25, 25, 25, 25,
368 25, 25, 0, 9, 11, 0, 6, 0, 0, 0,
369 0, 0, 0, 0, 0, 0, 0, 10, 0, 0,
370 13, 0, 0, 0, 0, 16, 0, 0, 0, 0,
371 0, 12, 15, 0, 23, 0, 0, 0, 0, 0,
372 0, 14, 18, 0, 0, 0, 0, 0, 17, 0,
373 24, 0, 0, 0, 20, 22, 0, 21, 19, 0
374 } ;
375
376 static const YY_CHAR yy_ec[256] =
377 { 0,
378 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 4, 1, 5, 1, 1, 1, 1, 1, 6,
382 7, 1, 1, 1, 1, 1, 1, 8, 9, 9,
383 9, 9, 9, 9, 9, 9, 9, 1, 10, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 11, 1, 12, 1, 1, 1, 13, 14, 15, 16,
388
389 17, 18, 19, 20, 21, 1, 1, 22, 1, 23,
390 24, 25, 1, 26, 27, 28, 29, 30, 1, 31,
391 32, 33, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399
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,
405 1, 1, 1, 1, 1
406 } ;
407
408 static const YY_CHAR yy_meta[34] =
409 { 0,
410 1, 1, 2, 1, 1, 1, 1, 3, 3, 1,
411 1, 1, 3, 3, 3, 3, 3, 3, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1
414 } ;
415
416 static const flex_int16_t yy_base[84] =
417 { 0,
418 0, 0, 100, 101, 101, 101, 101, 94, 101, 101,
419 26, 28, 0, 101, 101, 82, 26, 18, 74, 79,
420 78, 81, 88, 101, 32, 0, 0, 76, 65, 62,
421 61, 75, 20, 59, 61, 66, 58, 0, 57, 56,
422 54, 63, 53, 62, 54, 101, 59, 48, 53, 46,
423 59, 101, 44, 43, 101, 41, 55, 46, 53, 44,
424 31, 101, 101, 39, 27, 21, 39, 19, 101, 35,
425 101, 33, 26, 29, 101, 101, 28, 101, 101, 101,
426 58, 61, 41
427 } ;
428
429 static const flex_int16_t yy_def[84] =
430 { 0,
431 80, 1, 80, 80, 80, 80, 80, 81, 80, 80,
432 80, 80, 82, 80, 80, 80, 80, 80, 80, 80,
433 80, 80, 81, 80, 80, 83, 82, 80, 80, 80,
434 80, 80, 80, 80, 80, 80, 80, 83, 80, 80,
435 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
436 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
437 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
438 80, 80, 80, 80, 80, 80, 80, 80, 80, 0,
439 80, 80, 80
440 } ;
441
442 static const flex_int16_t yy_nxt[135] =
443 { 0,
444 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
445 14, 15, 16, 17, 18, 4, 4, 4, 4, 4,
446 19, 4, 4, 4, 4, 20, 21, 4, 4, 22,
447 4, 4, 4, 25, 25, 25, 25, 32, 29, 25,
448 25, 33, 44, 38, 79, 78, 30, 77, 45, 76,
449 75, 74, 73, 72, 71, 70, 26, 31, 23, 23,
450 23, 27, 69, 27, 68, 67, 66, 65, 64, 63,
451 62, 61, 60, 59, 58, 57, 56, 55, 54, 53,
452 52, 51, 50, 49, 48, 47, 46, 43, 42, 41,
453 40, 39, 24, 37, 36, 35, 34, 28, 24, 80,
454
455 3, 80, 80, 80, 80, 80, 80, 80, 80, 80,
456 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
457 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
458 80, 80, 80, 80
459 } ;
460
461 static const flex_int16_t yy_chk[135] =
462 { 0,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 11, 11, 12, 12, 18, 17, 25,
467 25, 18, 33, 83, 77, 74, 17, 73, 33, 72,
468 70, 68, 67, 66, 65, 64, 11, 17, 81, 81,
469 81, 82, 61, 82, 60, 59, 58, 57, 56, 54,
470 53, 51, 50, 49, 48, 47, 45, 44, 43, 42,
471 41, 40, 39, 37, 36, 35, 34, 32, 31, 30,
472 29, 28, 23, 22, 21, 20, 19, 16, 8, 3,
473
474 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
475 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
476 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
477 80, 80, 80, 80
478 } ;
479
480 static yy_state_type yy_last_accepting_state;
481 static char *yy_last_accepting_cpos;
482
483 extern int yy_flex_debug;
484 int yy_flex_debug = 0;
485
486 /* The intent behind this definition is that it'll catch
487 * any uses of REJECT which flex missed.
488 */
489 #define REJECT reject_used_but_not_detected
490 #define yymore() yymore_used_but_not_detected
491 #define YY_MORE_ADJ 0
492 #define YY_RESTORE_YY_MORE_OFFSET
493 char *yytext;
494 #line 1 "syslex.l"
495 #define YY_NO_INPUT 1
496 #line 4 "syslex.l"
497 /* Copyright (C) 2001-2021 Free Software Foundation, Inc.
498
499 This file is part of GNU Binutils.
500
501 This program is free software; you can redistribute it and/or modify
502 it under the terms of the GNU General Public License as published by
503 the Free Software Foundation; either version 3, or (at your option)
504 any later version.
505
506 This program is distributed in the hope that it will be useful,
507 but WITHOUT ANY WARRANTY; without even the implied warranty of
508 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
509 GNU General Public License for more details.
510
511 You should have received a copy of the GNU General Public License
512 along with GLD; see the file COPYING. If not, write to the Free
513 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
514 02110-1301, USA. */
515
516 /* Note: config.h is #included via syslex_wrap.c. */
517
518 #include <string.h>
519 #include "sysinfo.h"
520
521 #ifndef YY_NO_UNPUT
522 #define YY_NO_UNPUT
523 #endif
524
525 extern int yylex (void);
526 #line 526 "syslex.c"
527 #line 527 "syslex.c"
528
529 #define INITIAL 0
530
531 #ifndef YY_NO_UNISTD_H
532 /* Special case for "unistd.h", since it is non-ANSI. We include it way
533 * down here because we want the user's section 1 to have been scanned first.
534 * The user has a chance to override it with an option.
535 */
536 #include <unistd.h>
537 #endif
538
539 #ifndef YY_EXTRA_TYPE
540 #define YY_EXTRA_TYPE void *
541 #endif
542
543 static int yy_init_globals ( void );
544
545 /* Accessor methods to globals.
546 These are made visible to non-reentrant scanners for convenience. */
547
548 int yylex_destroy ( void );
549
550 int yyget_debug ( void );
551
552 void yyset_debug ( int debug_flag );
553
554 YY_EXTRA_TYPE yyget_extra ( void );
555
556 void yyset_extra ( YY_EXTRA_TYPE user_defined );
557
558 FILE *yyget_in ( void );
559
560 void yyset_in ( FILE * _in_str );
561
562 FILE *yyget_out ( void );
563
564 void yyset_out ( FILE * _out_str );
565
566 int yyget_leng ( void );
567
568 char *yyget_text ( void );
569
570 int yyget_lineno ( void );
571
572 void yyset_lineno ( int _line_number );
573
574 /* Macros after this point can all be overridden by user definitions in
575 * section 1.
576 */
577
578 #ifndef YY_SKIP_YYWRAP
579 #ifdef __cplusplus
580 extern "C" int yywrap ( void );
581 #else
582 extern int yywrap ( void );
583 #endif
584 #endif
585
586 #ifndef YY_NO_UNPUT
587
588 #endif
589
590 #ifndef yytext_ptr
591 static void yy_flex_strncpy ( char *, const char *, int );
592 #endif
593
594 #ifdef YY_NEED_STRLEN
595 static int yy_flex_strlen ( const char * );
596 #endif
597
598 #ifndef YY_NO_INPUT
599 #ifdef __cplusplus
600 static int yyinput ( void );
601 #else
602 static int input ( void );
603 #endif
604
605 #endif
606
607 /* Amount of stuff to slurp up with each read. */
608 #ifndef YY_READ_BUF_SIZE
609 #ifdef __ia64__
610 /* On IA-64, the buffer size is 16k, not 8k */
611 #define YY_READ_BUF_SIZE 16384
612 #else
613 #define YY_READ_BUF_SIZE 8192
614 #endif /* __ia64__ */
615 #endif
616
617 /* Copy whatever the last rule matched to the standard output. */
618 #ifndef ECHO
619 /* This used to be an fputs(), but since the string might contain NUL's,
620 * we now use fwrite().
621 */
622 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
623 #endif
624
625 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
626 * is returned in "result".
627 */
628 #ifndef YY_INPUT
629 #define YY_INPUT(buf,result,max_size) \
630 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
631 { \
632 int c = '*'; \
633 int n; \
634 for ( n = 0; n < max_size && \
635 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
636 buf[n] = (char) c; \
637 if ( c == '\n' ) \
638 buf[n++] = (char) c; \
639 if ( c == EOF && ferror( yyin ) ) \
640 YY_FATAL_ERROR( "input in flex scanner failed" ); \
641 result = n; \
642 } \
643 else \
644 { \
645 errno=0; \
646 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
647 { \
648 if( errno != EINTR) \
649 { \
650 YY_FATAL_ERROR( "input in flex scanner failed" ); \
651 break; \
652 } \
653 errno=0; \
654 clearerr(yyin); \
655 } \
656 }\
657 \
658
659 #endif
660
661 /* No semi-colon after return; correct usage is to write "yyterminate();" -
662 * we don't want an extra ';' after the "return" because that will cause
663 * some compilers to complain about unreachable statements.
664 */
665 #ifndef yyterminate
666 #define yyterminate() return YY_NULL
667 #endif
668
669 /* Number of entries by which start-condition stack grows. */
670 #ifndef YY_START_STACK_INCR
671 #define YY_START_STACK_INCR 25
672 #endif
673
674 /* Report a fatal error. */
675 #ifndef YY_FATAL_ERROR
676 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
677 #endif
678
679 /* end tables serialization structures and prototypes */
680
681 /* Default declaration of generated scanner - a define so the user can
682 * easily add parameters.
683 */
684 #ifndef YY_DECL
685 #define YY_DECL_IS_OURS 1
686
687 extern int yylex (void);
688
689 #define YY_DECL int yylex (void)
690 #endif /* !YY_DECL */
691
692 /* Code executed at the beginning of each rule, after yytext and yyleng
693 * have been set up.
694 */
695 #ifndef YY_USER_ACTION
696 #define YY_USER_ACTION
697 #endif
698
699 /* Code executed at the end of each rule. */
700 #ifndef YY_BREAK
701 #define YY_BREAK /*LINTED*/break;
702 #endif
703
704 #define YY_RULE_SETUP \
705 YY_USER_ACTION
706
707 /** The main scanner function which does all the work.
708 */
709 YY_DECL
710 {
711 yy_state_type yy_current_state;
712 char *yy_cp, *yy_bp;
713 int yy_act;
714
715 if ( !(yy_init) )
716 {
717 (yy_init) = 1;
718
719 #ifdef YY_USER_INIT
720 YY_USER_INIT;
721 #endif
722
723 if ( ! (yy_start) )
724 (yy_start) = 1; /* first start state */
725
726 if ( ! yyin )
727 yyin = stdin;
728
729 if ( ! yyout )
730 yyout = stdout;
731
732 if ( ! YY_CURRENT_BUFFER ) {
733 yyensure_buffer_stack ();
734 YY_CURRENT_BUFFER_LVALUE =
735 yy_create_buffer( yyin, YY_BUF_SIZE );
736 }
737
738 yy_load_buffer_state( );
739 }
740
741 {
742 #line 34 "syslex.l"
743
744 #line 744 "syslex.c"
745
746 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
747 {
748 yy_cp = (yy_c_buf_p);
749
750 /* Support of yytext. */
751 *yy_cp = (yy_hold_char);
752
753 /* yy_bp points to the position in yy_ch_buf of the start of
754 * the current run.
755 */
756 yy_bp = yy_cp;
757
758 yy_current_state = (yy_start);
759 yy_match:
760 do
761 {
762 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
763 if ( yy_accept[yy_current_state] )
764 {
765 (yy_last_accepting_state) = yy_current_state;
766 (yy_last_accepting_cpos) = yy_cp;
767 }
768 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
769 {
770 yy_current_state = (int) yy_def[yy_current_state];
771 if ( yy_current_state >= 81 )
772 yy_c = yy_meta[yy_c];
773 }
774 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
775 ++yy_cp;
776 }
777 while ( yy_base[yy_current_state] != 101 );
778
779 yy_find_action:
780 yy_act = yy_accept[yy_current_state];
781 if ( yy_act == 0 )
782 { /* have to back up */
783 yy_cp = (yy_last_accepting_cpos);
784 yy_current_state = (yy_last_accepting_state);
785 yy_act = yy_accept[yy_current_state];
786 }
787
788 YY_DO_BEFORE_ACTION;
789
790 do_action: /* This label is used only to access EOF actions. */
791
792 switch ( yy_act )
793 { /* beginning of action switch */
794 case 0: /* must back up */
795 /* undo the effects of YY_DO_BEFORE_ACTION */
796 *yy_cp = (yy_hold_char);
797 yy_cp = (yy_last_accepting_cpos);
798 yy_current_state = (yy_last_accepting_state);
799 goto yy_find_action;
800
801 case 1:
802 YY_RULE_SETUP
803 #line 35 "syslex.l"
804 { return '(';}
805 YY_BREAK
806 case 2:
807 YY_RULE_SETUP
808 #line 36 "syslex.l"
809 { return ')';}
810 YY_BREAK
811 case 3:
812 YY_RULE_SETUP
813 #line 37 "syslex.l"
814 { return '[';}
815 YY_BREAK
816 case 4:
817 YY_RULE_SETUP
818 #line 38 "syslex.l"
819 { return ']';}
820 YY_BREAK
821 case 5:
822 YY_RULE_SETUP
823 #line 39 "syslex.l"
824 { ; }
825 YY_BREAK
826 case 6:
827 YY_RULE_SETUP
828 #line 40 "syslex.l"
829 { ; }
830 YY_BREAK
831 case 7:
832 YY_RULE_SETUP
833 #line 41 "syslex.l"
834 { ; }
835 YY_BREAK
836 case 8:
837 /* rule 8 can match eol */
838 YY_RULE_SETUP
839 #line 42 "syslex.l"
840 { ; }
841 YY_BREAK
842 case 9:
843 /* rule 9 can match eol */
844 YY_RULE_SETUP
845 #line 43 "syslex.l"
846 {
847 yylval.s = malloc (yyleng - 1);
848 memcpy (yylval.s, yytext + 1, yyleng - 2);
849 yylval.s[yyleng - 2] = '\0';
850 return NAME;
851 }
852 YY_BREAK
853 case 10:
854 YY_RULE_SETUP
855 #line 50 "syslex.l"
856 {
857 yylval.i = strtol(yytext,0,16);
858 return NUMBER;
859 }
860 YY_BREAK
861 case 11:
862 YY_RULE_SETUP
863 #line 55 "syslex.l"
864 {
865 yylval.i = atoi(yytext);
866 return NUMBER;
867 }
868 YY_BREAK
869 case 12:
870 YY_RULE_SETUP
871 #line 61 "syslex.l"
872 { yylval.i =1 ;return UNIT;}
873 YY_BREAK
874 case 13:
875 YY_RULE_SETUP
876 #line 62 "syslex.l"
877 { yylval.i = 1; return UNIT;}
878 YY_BREAK
879 case 14:
880 YY_RULE_SETUP
881 #line 63 "syslex.l"
882 { yylval.i= 8; return UNIT;}
883 YY_BREAK
884 case 15:
885 YY_RULE_SETUP
886 #line 64 "syslex.l"
887 { yylval.i = 8; return UNIT;}
888 YY_BREAK
889 case 16:
890 YY_RULE_SETUP
891 #line 66 "syslex.l"
892 { yylval.s = "INT"; return TYPE;}
893 YY_BREAK
894 case 17:
895 YY_RULE_SETUP
896 #line 67 "syslex.l"
897 { yylval.s = "BARRAY"; return TYPE;}
898 YY_BREAK
899 case 18:
900 YY_RULE_SETUP
901 #line 68 "syslex.l"
902 { yylval.s = "CHARS"; return TYPE;}
903 YY_BREAK
904 case 19:
905 YY_RULE_SETUP
906 #line 69 "syslex.l"
907 { yylval.i = 0; return NUMBER;}
908 YY_BREAK
909 case 20:
910 YY_RULE_SETUP
911 #line 70 "syslex.l"
912 { yylval.i = -4; return NUMBER;}
913 YY_BREAK
914 case 21:
915 YY_RULE_SETUP
916 #line 71 "syslex.l"
917 { yylval.i = -2; return NUMBER; }
918 YY_BREAK
919 case 22:
920 YY_RULE_SETUP
921 #line 72 "syslex.l"
922 { yylval.i = -1; return NUMBER; }
923 YY_BREAK
924 case 23:
925 YY_RULE_SETUP
926 #line 73 "syslex.l"
927 { return COND;}
928 YY_BREAK
929 case 24:
930 YY_RULE_SETUP
931 #line 74 "syslex.l"
932 { return REPEAT;}
933 YY_BREAK
934 case 25:
935 YY_RULE_SETUP
936 #line 75 "syslex.l"
937 ECHO;
938 YY_BREAK
939 #line 939 "syslex.c"
940 case YY_STATE_EOF(INITIAL):
941 yyterminate();
942
943 case YY_END_OF_BUFFER:
944 {
945 /* Amount of text matched not including the EOB char. */
946 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
947
948 /* Undo the effects of YY_DO_BEFORE_ACTION. */
949 *yy_cp = (yy_hold_char);
950 YY_RESTORE_YY_MORE_OFFSET
951
952 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
953 {
954 /* We're scanning a new file or input source. It's
955 * possible that this happened because the user
956 * just pointed yyin at a new source and called
957 * yylex(). If so, then we have to assure
958 * consistency between YY_CURRENT_BUFFER and our
959 * globals. Here is the right place to do so, because
960 * this is the first action (other than possibly a
961 * back-up) that will match for the new input source.
962 */
963 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
964 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
965 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
966 }
967
968 /* Note that here we test for yy_c_buf_p "<=" to the position
969 * of the first EOB in the buffer, since yy_c_buf_p will
970 * already have been incremented past the NUL character
971 * (since all states make transitions on EOB to the
972 * end-of-buffer state). Contrast this with the test
973 * in input().
974 */
975 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
976 { /* This was really a NUL. */
977 yy_state_type yy_next_state;
978
979 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
980
981 yy_current_state = yy_get_previous_state( );
982
983 /* Okay, we're now positioned to make the NUL
984 * transition. We couldn't have
985 * yy_get_previous_state() go ahead and do it
986 * for us because it doesn't know how to deal
987 * with the possibility of jamming (and we don't
988 * want to build jamming into it because then it
989 * will run more slowly).
990 */
991
992 yy_next_state = yy_try_NUL_trans( yy_current_state );
993
994 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
995
996 if ( yy_next_state )
997 {
998 /* Consume the NUL. */
999 yy_cp = ++(yy_c_buf_p);
1000 yy_current_state = yy_next_state;
1001 goto yy_match;
1002 }
1003
1004 else
1005 {
1006 yy_cp = (yy_c_buf_p);
1007 goto yy_find_action;
1008 }
1009 }
1010
1011 else switch ( yy_get_next_buffer( ) )
1012 {
1013 case EOB_ACT_END_OF_FILE:
1014 {
1015 (yy_did_buffer_switch_on_eof) = 0;
1016
1017 if ( yywrap( ) )
1018 {
1019 /* Note: because we've taken care in
1020 * yy_get_next_buffer() to have set up
1021 * yytext, we can now set up
1022 * yy_c_buf_p so that if some total
1023 * hoser (like flex itself) wants to
1024 * call the scanner after we return the
1025 * YY_NULL, it'll still work - another
1026 * YY_NULL will get returned.
1027 */
1028 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1029
1030 yy_act = YY_STATE_EOF(YY_START);
1031 goto do_action;
1032 }
1033
1034 else
1035 {
1036 if ( ! (yy_did_buffer_switch_on_eof) )
1037 YY_NEW_FILE;
1038 }
1039 break;
1040 }
1041
1042 case EOB_ACT_CONTINUE_SCAN:
1043 (yy_c_buf_p) =
1044 (yytext_ptr) + yy_amount_of_matched_text;
1045
1046 yy_current_state = yy_get_previous_state( );
1047
1048 yy_cp = (yy_c_buf_p);
1049 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1050 goto yy_match;
1051
1052 case EOB_ACT_LAST_MATCH:
1053 (yy_c_buf_p) =
1054 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1055
1056 yy_current_state = yy_get_previous_state( );
1057
1058 yy_cp = (yy_c_buf_p);
1059 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1060 goto yy_find_action;
1061 }
1062 break;
1063 }
1064
1065 default:
1066 YY_FATAL_ERROR(
1067 "fatal flex scanner internal error--no action found" );
1068 } /* end of action switch */
1069 } /* end of scanning one token */
1070 } /* end of user's declarations */
1071 } /* end of yylex */
1072
1073 /* yy_get_next_buffer - try to read in a new buffer
1074 *
1075 * Returns a code representing an action:
1076 * EOB_ACT_LAST_MATCH -
1077 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1078 * EOB_ACT_END_OF_FILE - end of file
1079 */
yy_get_next_buffer(void)1080 static int yy_get_next_buffer (void)
1081 {
1082 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1083 char *source = (yytext_ptr);
1084 int number_to_move, i;
1085 int ret_val;
1086
1087 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1088 YY_FATAL_ERROR(
1089 "fatal flex scanner internal error--end of buffer missed" );
1090
1091 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1092 { /* Don't try to fill the buffer, so this is an EOF. */
1093 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1094 {
1095 /* We matched a single character, the EOB, so
1096 * treat this as a final EOF.
1097 */
1098 return EOB_ACT_END_OF_FILE;
1099 }
1100
1101 else
1102 {
1103 /* We matched some text prior to the EOB, first
1104 * process it.
1105 */
1106 return EOB_ACT_LAST_MATCH;
1107 }
1108 }
1109
1110 /* Try to read more data. */
1111
1112 /* First move last chars to start of buffer. */
1113 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1114
1115 for ( i = 0; i < number_to_move; ++i )
1116 *(dest++) = *(source++);
1117
1118 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1119 /* don't do the read, it's not guaranteed to return an EOF,
1120 * just force an EOF
1121 */
1122 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1123
1124 else
1125 {
1126 int num_to_read =
1127 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1128
1129 while ( num_to_read <= 0 )
1130 { /* Not enough room in the buffer - grow it. */
1131
1132 /* just a shorter name for the current buffer */
1133 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1134
1135 int yy_c_buf_p_offset =
1136 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1137
1138 if ( b->yy_is_our_buffer )
1139 {
1140 int new_size = b->yy_buf_size * 2;
1141
1142 if ( new_size <= 0 )
1143 b->yy_buf_size += b->yy_buf_size / 8;
1144 else
1145 b->yy_buf_size *= 2;
1146
1147 b->yy_ch_buf = (char *)
1148 /* Include room in for 2 EOB chars. */
1149 yyrealloc( (void *) b->yy_ch_buf,
1150 (yy_size_t) (b->yy_buf_size + 2) );
1151 }
1152 else
1153 /* Can't grow it, we don't own it. */
1154 b->yy_ch_buf = NULL;
1155
1156 if ( ! b->yy_ch_buf )
1157 YY_FATAL_ERROR(
1158 "fatal error - scanner input buffer overflow" );
1159
1160 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1161
1162 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1163 number_to_move - 1;
1164
1165 }
1166
1167 if ( num_to_read > YY_READ_BUF_SIZE )
1168 num_to_read = YY_READ_BUF_SIZE;
1169
1170 /* Read in more data. */
1171 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1172 (yy_n_chars), num_to_read );
1173
1174 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1175 }
1176
1177 if ( (yy_n_chars) == 0 )
1178 {
1179 if ( number_to_move == YY_MORE_ADJ )
1180 {
1181 ret_val = EOB_ACT_END_OF_FILE;
1182 yyrestart( yyin );
1183 }
1184
1185 else
1186 {
1187 ret_val = EOB_ACT_LAST_MATCH;
1188 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1189 YY_BUFFER_EOF_PENDING;
1190 }
1191 }
1192
1193 else
1194 ret_val = EOB_ACT_CONTINUE_SCAN;
1195
1196 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1197 /* Extend the array by 50%, plus the number we really need. */
1198 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1199 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1200 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1201 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1202 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1203 /* "- 2" to take care of EOB's */
1204 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1205 }
1206
1207 (yy_n_chars) += number_to_move;
1208 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1209 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1210
1211 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1212
1213 return ret_val;
1214 }
1215
1216 /* yy_get_previous_state - get the state just before the EOB char was reached */
1217
yy_get_previous_state(void)1218 static yy_state_type yy_get_previous_state (void)
1219 {
1220 yy_state_type yy_current_state;
1221 char *yy_cp;
1222
1223 yy_current_state = (yy_start);
1224
1225 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1226 {
1227 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1228 if ( yy_accept[yy_current_state] )
1229 {
1230 (yy_last_accepting_state) = yy_current_state;
1231 (yy_last_accepting_cpos) = yy_cp;
1232 }
1233 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1234 {
1235 yy_current_state = (int) yy_def[yy_current_state];
1236 if ( yy_current_state >= 81 )
1237 yy_c = yy_meta[yy_c];
1238 }
1239 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1240 }
1241
1242 return yy_current_state;
1243 }
1244
1245 /* yy_try_NUL_trans - try to make a transition on the NUL character
1246 *
1247 * synopsis
1248 * next_state = yy_try_NUL_trans( current_state );
1249 */
yy_try_NUL_trans(yy_state_type yy_current_state)1250 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1251 {
1252 int yy_is_jam;
1253 char *yy_cp = (yy_c_buf_p);
1254
1255 YY_CHAR yy_c = 1;
1256 if ( yy_accept[yy_current_state] )
1257 {
1258 (yy_last_accepting_state) = yy_current_state;
1259 (yy_last_accepting_cpos) = yy_cp;
1260 }
1261 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1262 {
1263 yy_current_state = (int) yy_def[yy_current_state];
1264 if ( yy_current_state >= 81 )
1265 yy_c = yy_meta[yy_c];
1266 }
1267 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1268 yy_is_jam = (yy_current_state == 80);
1269
1270 return yy_is_jam ? 0 : yy_current_state;
1271 }
1272
1273 #ifndef YY_NO_UNPUT
1274
1275 #endif
1276
1277 #ifndef YY_NO_INPUT
1278 #ifdef __cplusplus
yyinput(void)1279 static int yyinput (void)
1280 #else
1281 static int input (void)
1282 #endif
1283
1284 {
1285 int c;
1286
1287 *(yy_c_buf_p) = (yy_hold_char);
1288
1289 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1290 {
1291 /* yy_c_buf_p now points to the character we want to return.
1292 * If this occurs *before* the EOB characters, then it's a
1293 * valid NUL; if not, then we've hit the end of the buffer.
1294 */
1295 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1296 /* This was really a NUL. */
1297 *(yy_c_buf_p) = '\0';
1298
1299 else
1300 { /* need more input */
1301 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1302 ++(yy_c_buf_p);
1303
1304 switch ( yy_get_next_buffer( ) )
1305 {
1306 case EOB_ACT_LAST_MATCH:
1307 /* This happens because yy_g_n_b()
1308 * sees that we've accumulated a
1309 * token and flags that we need to
1310 * try matching the token before
1311 * proceeding. But for input(),
1312 * there's no matching to consider.
1313 * So convert the EOB_ACT_LAST_MATCH
1314 * to EOB_ACT_END_OF_FILE.
1315 */
1316
1317 /* Reset buffer status. */
1318 yyrestart( yyin );
1319
1320 /*FALLTHROUGH*/
1321
1322 case EOB_ACT_END_OF_FILE:
1323 {
1324 if ( yywrap( ) )
1325 return 0;
1326
1327 if ( ! (yy_did_buffer_switch_on_eof) )
1328 YY_NEW_FILE;
1329 #ifdef __cplusplus
1330 return yyinput();
1331 #else
1332 return input();
1333 #endif
1334 }
1335
1336 case EOB_ACT_CONTINUE_SCAN:
1337 (yy_c_buf_p) = (yytext_ptr) + offset;
1338 break;
1339 }
1340 }
1341 }
1342
1343 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1344 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1345 (yy_hold_char) = *++(yy_c_buf_p);
1346
1347 return c;
1348 }
1349 #endif /* ifndef YY_NO_INPUT */
1350
1351 /** Immediately switch to a different input stream.
1352 * @param input_file A readable stream.
1353 *
1354 * @note This function does not reset the start condition to @c INITIAL .
1355 */
yyrestart(FILE * input_file)1356 void yyrestart (FILE * input_file )
1357 {
1358
1359 if ( ! YY_CURRENT_BUFFER ){
1360 yyensure_buffer_stack ();
1361 YY_CURRENT_BUFFER_LVALUE =
1362 yy_create_buffer( yyin, YY_BUF_SIZE );
1363 }
1364
1365 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1366 yy_load_buffer_state( );
1367 }
1368
1369 /** Switch to a different input buffer.
1370 * @param new_buffer The new input buffer.
1371 *
1372 */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1373 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1374 {
1375
1376 /* TODO. We should be able to replace this entire function body
1377 * with
1378 * yypop_buffer_state();
1379 * yypush_buffer_state(new_buffer);
1380 */
1381 yyensure_buffer_stack ();
1382 if ( YY_CURRENT_BUFFER == new_buffer )
1383 return;
1384
1385 if ( YY_CURRENT_BUFFER )
1386 {
1387 /* Flush out information for old buffer. */
1388 *(yy_c_buf_p) = (yy_hold_char);
1389 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1390 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1391 }
1392
1393 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1394 yy_load_buffer_state( );
1395
1396 /* We don't actually know whether we did this switch during
1397 * EOF (yywrap()) processing, but the only time this flag
1398 * is looked at is after yywrap() is called, so it's safe
1399 * to go ahead and always set it.
1400 */
1401 (yy_did_buffer_switch_on_eof) = 1;
1402 }
1403
yy_load_buffer_state(void)1404 static void yy_load_buffer_state (void)
1405 {
1406 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1407 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1408 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1409 (yy_hold_char) = *(yy_c_buf_p);
1410 }
1411
1412 /** Allocate and initialize an input buffer state.
1413 * @param file A readable stream.
1414 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1415 *
1416 * @return the allocated buffer state.
1417 */
yy_create_buffer(FILE * file,int size)1418 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1419 {
1420 YY_BUFFER_STATE b;
1421
1422 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1423 if ( ! b )
1424 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1425
1426 b->yy_buf_size = size;
1427
1428 /* yy_ch_buf has to be 2 characters longer than the size given because
1429 * we need to put in 2 end-of-buffer characters.
1430 */
1431 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1432 if ( ! b->yy_ch_buf )
1433 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1434
1435 b->yy_is_our_buffer = 1;
1436
1437 yy_init_buffer( b, file );
1438
1439 return b;
1440 }
1441
1442 /** Destroy the buffer.
1443 * @param b a buffer created with yy_create_buffer()
1444 *
1445 */
yy_delete_buffer(YY_BUFFER_STATE b)1446 void yy_delete_buffer (YY_BUFFER_STATE b )
1447 {
1448
1449 if ( ! b )
1450 return;
1451
1452 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1453 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1454
1455 if ( b->yy_is_our_buffer )
1456 yyfree( (void *) b->yy_ch_buf );
1457
1458 yyfree( (void *) b );
1459 }
1460
1461 /* Initializes or reinitializes a buffer.
1462 * This function is sometimes called more than once on the same buffer,
1463 * such as during a yyrestart() or at EOF.
1464 */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1465 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1466
1467 {
1468 int oerrno = errno;
1469
1470 yy_flush_buffer( b );
1471
1472 b->yy_input_file = file;
1473 b->yy_fill_buffer = 1;
1474
1475 /* If b is the current buffer, then yy_init_buffer was _probably_
1476 * called from yyrestart() or through yy_get_next_buffer.
1477 * In that case, we don't want to reset the lineno or column.
1478 */
1479 if (b != YY_CURRENT_BUFFER){
1480 b->yy_bs_lineno = 1;
1481 b->yy_bs_column = 0;
1482 }
1483
1484 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1485
1486 errno = oerrno;
1487 }
1488
1489 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1490 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1491 *
1492 */
yy_flush_buffer(YY_BUFFER_STATE b)1493 void yy_flush_buffer (YY_BUFFER_STATE b )
1494 {
1495 if ( ! b )
1496 return;
1497
1498 b->yy_n_chars = 0;
1499
1500 /* We always need two end-of-buffer characters. The first causes
1501 * a transition to the end-of-buffer state. The second causes
1502 * a jam in that state.
1503 */
1504 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1505 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1506
1507 b->yy_buf_pos = &b->yy_ch_buf[0];
1508
1509 b->yy_at_bol = 1;
1510 b->yy_buffer_status = YY_BUFFER_NEW;
1511
1512 if ( b == YY_CURRENT_BUFFER )
1513 yy_load_buffer_state( );
1514 }
1515
1516 /** Pushes the new state onto the stack. The new state becomes
1517 * the current state. This function will allocate the stack
1518 * if necessary.
1519 * @param new_buffer The new state.
1520 *
1521 */
yypush_buffer_state(YY_BUFFER_STATE new_buffer)1522 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1523 {
1524 if (new_buffer == NULL)
1525 return;
1526
1527 yyensure_buffer_stack();
1528
1529 /* This block is copied from yy_switch_to_buffer. */
1530 if ( YY_CURRENT_BUFFER )
1531 {
1532 /* Flush out information for old buffer. */
1533 *(yy_c_buf_p) = (yy_hold_char);
1534 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1535 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1536 }
1537
1538 /* Only push if top exists. Otherwise, replace top. */
1539 if (YY_CURRENT_BUFFER)
1540 (yy_buffer_stack_top)++;
1541 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1542
1543 /* copied from yy_switch_to_buffer. */
1544 yy_load_buffer_state( );
1545 (yy_did_buffer_switch_on_eof) = 1;
1546 }
1547
1548 /** Removes and deletes the top of the stack, if present.
1549 * The next element becomes the new top.
1550 *
1551 */
yypop_buffer_state(void)1552 void yypop_buffer_state (void)
1553 {
1554 if (!YY_CURRENT_BUFFER)
1555 return;
1556
1557 yy_delete_buffer(YY_CURRENT_BUFFER );
1558 YY_CURRENT_BUFFER_LVALUE = NULL;
1559 if ((yy_buffer_stack_top) > 0)
1560 --(yy_buffer_stack_top);
1561
1562 if (YY_CURRENT_BUFFER) {
1563 yy_load_buffer_state( );
1564 (yy_did_buffer_switch_on_eof) = 1;
1565 }
1566 }
1567
1568 /* Allocates the stack if it does not exist.
1569 * Guarantees space for at least one push.
1570 */
yyensure_buffer_stack(void)1571 static void yyensure_buffer_stack (void)
1572 {
1573 yy_size_t num_to_alloc;
1574
1575 if (!(yy_buffer_stack)) {
1576
1577 /* First allocation is just for 2 elements, since we don't know if this
1578 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1579 * immediate realloc on the next call.
1580 */
1581 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1582 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1583 (num_to_alloc * sizeof(struct yy_buffer_state*)
1584 );
1585 if ( ! (yy_buffer_stack) )
1586 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1587
1588 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1589
1590 (yy_buffer_stack_max) = num_to_alloc;
1591 (yy_buffer_stack_top) = 0;
1592 return;
1593 }
1594
1595 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1596
1597 /* Increase the buffer to prepare for a possible push. */
1598 yy_size_t grow_size = 8 /* arbitrary grow size */;
1599
1600 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1601 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1602 ((yy_buffer_stack),
1603 num_to_alloc * sizeof(struct yy_buffer_state*)
1604 );
1605 if ( ! (yy_buffer_stack) )
1606 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1607
1608 /* zero only the new slots.*/
1609 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1610 (yy_buffer_stack_max) = num_to_alloc;
1611 }
1612 }
1613
1614 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1615 * @param base the character buffer
1616 * @param size the size in bytes of the character buffer
1617 *
1618 * @return the newly allocated buffer state object.
1619 */
yy_scan_buffer(char * base,yy_size_t size)1620 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1621 {
1622 YY_BUFFER_STATE b;
1623
1624 if ( size < 2 ||
1625 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1626 base[size-1] != YY_END_OF_BUFFER_CHAR )
1627 /* They forgot to leave room for the EOB's. */
1628 return NULL;
1629
1630 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
1631 if ( ! b )
1632 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1633
1634 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
1635 b->yy_buf_pos = b->yy_ch_buf = base;
1636 b->yy_is_our_buffer = 0;
1637 b->yy_input_file = NULL;
1638 b->yy_n_chars = b->yy_buf_size;
1639 b->yy_is_interactive = 0;
1640 b->yy_at_bol = 1;
1641 b->yy_fill_buffer = 0;
1642 b->yy_buffer_status = YY_BUFFER_NEW;
1643
1644 yy_switch_to_buffer( b );
1645
1646 return b;
1647 }
1648
1649 /** Setup the input buffer state to scan a string. The next call to yylex() will
1650 * scan from a @e copy of @a str.
1651 * @param yystr a NUL-terminated string to scan
1652 *
1653 * @return the newly allocated buffer state object.
1654 * @note If you want to scan bytes that may contain NUL values, then use
1655 * yy_scan_bytes() instead.
1656 */
yy_scan_string(const char * yystr)1657 YY_BUFFER_STATE yy_scan_string (const char * yystr )
1658 {
1659
1660 return yy_scan_bytes( yystr, (int) strlen(yystr) );
1661 }
1662
1663 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1664 * scan from a @e copy of @a bytes.
1665 * @param yybytes the byte buffer to scan
1666 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1667 *
1668 * @return the newly allocated buffer state object.
1669 */
yy_scan_bytes(const char * yybytes,int _yybytes_len)1670 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
1671 {
1672 YY_BUFFER_STATE b;
1673 char *buf;
1674 yy_size_t n;
1675 int i;
1676
1677 /* Get memory for full buffer, including space for trailing EOB's. */
1678 n = (yy_size_t) (_yybytes_len + 2);
1679 buf = (char *) yyalloc( n );
1680 if ( ! buf )
1681 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1682
1683 for ( i = 0; i < _yybytes_len; ++i )
1684 buf[i] = yybytes[i];
1685
1686 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1687
1688 b = yy_scan_buffer( buf, n );
1689 if ( ! b )
1690 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1691
1692 /* It's okay to grow etc. this buffer, and we should throw it
1693 * away when we're done.
1694 */
1695 b->yy_is_our_buffer = 1;
1696
1697 return b;
1698 }
1699
1700 #ifndef YY_EXIT_FAILURE
1701 #define YY_EXIT_FAILURE 2
1702 #endif
1703
yy_fatal_error(const char * msg)1704 static void yynoreturn yy_fatal_error (const char* msg )
1705 {
1706 fprintf( stderr, "%s\n", msg );
1707 exit( YY_EXIT_FAILURE );
1708 }
1709
1710 /* Redefine yyless() so it works in section 3 code. */
1711
1712 #undef yyless
1713 #define yyless(n) \
1714 do \
1715 { \
1716 /* Undo effects of setting up yytext. */ \
1717 int yyless_macro_arg = (n); \
1718 YY_LESS_LINENO(yyless_macro_arg);\
1719 yytext[yyleng] = (yy_hold_char); \
1720 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1721 (yy_hold_char) = *(yy_c_buf_p); \
1722 *(yy_c_buf_p) = '\0'; \
1723 yyleng = yyless_macro_arg; \
1724 } \
1725 while ( 0 )
1726
1727 /* Accessor methods (get/set functions) to struct members. */
1728
1729 /** Get the current line number.
1730 *
1731 */
yyget_lineno(void)1732 int yyget_lineno (void)
1733 {
1734
1735 return yylineno;
1736 }
1737
1738 /** Get the input stream.
1739 *
1740 */
yyget_in(void)1741 FILE *yyget_in (void)
1742 {
1743 return yyin;
1744 }
1745
1746 /** Get the output stream.
1747 *
1748 */
yyget_out(void)1749 FILE *yyget_out (void)
1750 {
1751 return yyout;
1752 }
1753
1754 /** Get the length of the current token.
1755 *
1756 */
yyget_leng(void)1757 int yyget_leng (void)
1758 {
1759 return yyleng;
1760 }
1761
1762 /** Get the current token.
1763 *
1764 */
1765
yyget_text(void)1766 char *yyget_text (void)
1767 {
1768 return yytext;
1769 }
1770
1771 /** Set the current line number.
1772 * @param _line_number line number
1773 *
1774 */
yyset_lineno(int _line_number)1775 void yyset_lineno (int _line_number )
1776 {
1777
1778 yylineno = _line_number;
1779 }
1780
1781 /** Set the input stream. This does not discard the current
1782 * input buffer.
1783 * @param _in_str A readable stream.
1784 *
1785 * @see yy_switch_to_buffer
1786 */
yyset_in(FILE * _in_str)1787 void yyset_in (FILE * _in_str )
1788 {
1789 yyin = _in_str ;
1790 }
1791
yyset_out(FILE * _out_str)1792 void yyset_out (FILE * _out_str )
1793 {
1794 yyout = _out_str ;
1795 }
1796
yyget_debug(void)1797 int yyget_debug (void)
1798 {
1799 return yy_flex_debug;
1800 }
1801
yyset_debug(int _bdebug)1802 void yyset_debug (int _bdebug )
1803 {
1804 yy_flex_debug = _bdebug ;
1805 }
1806
yy_init_globals(void)1807 static int yy_init_globals (void)
1808 {
1809 /* Initialization is the same as for the non-reentrant scanner.
1810 * This function is called from yylex_destroy(), so don't allocate here.
1811 */
1812
1813 (yy_buffer_stack) = NULL;
1814 (yy_buffer_stack_top) = 0;
1815 (yy_buffer_stack_max) = 0;
1816 (yy_c_buf_p) = NULL;
1817 (yy_init) = 0;
1818 (yy_start) = 0;
1819
1820 /* Defined in main.c */
1821 #ifdef YY_STDINIT
1822 yyin = stdin;
1823 yyout = stdout;
1824 #else
1825 yyin = NULL;
1826 yyout = NULL;
1827 #endif
1828
1829 /* For future reference: Set errno on error, since we are called by
1830 * yylex_init()
1831 */
1832 return 0;
1833 }
1834
1835 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(void)1836 int yylex_destroy (void)
1837 {
1838
1839 /* Pop the buffer stack, destroying each element. */
1840 while(YY_CURRENT_BUFFER){
1841 yy_delete_buffer( YY_CURRENT_BUFFER );
1842 YY_CURRENT_BUFFER_LVALUE = NULL;
1843 yypop_buffer_state();
1844 }
1845
1846 /* Destroy the stack itself. */
1847 yyfree((yy_buffer_stack) );
1848 (yy_buffer_stack) = NULL;
1849
1850 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1851 * yylex() is called, initialization will occur. */
1852 yy_init_globals( );
1853
1854 return 0;
1855 }
1856
1857 /*
1858 * Internal utility routines.
1859 */
1860
1861 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n)1862 static void yy_flex_strncpy (char* s1, const char * s2, int n )
1863 {
1864
1865 int i;
1866 for ( i = 0; i < n; ++i )
1867 s1[i] = s2[i];
1868 }
1869 #endif
1870
1871 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s)1872 static int yy_flex_strlen (const char * s )
1873 {
1874 int n;
1875 for ( n = 0; s[n]; ++n )
1876 ;
1877
1878 return n;
1879 }
1880 #endif
1881
yyalloc(yy_size_t size)1882 void *yyalloc (yy_size_t size )
1883 {
1884 return malloc(size);
1885 }
1886
yyrealloc(void * ptr,yy_size_t size)1887 void *yyrealloc (void * ptr, yy_size_t size )
1888 {
1889
1890 /* The cast to (char *) in the following accommodates both
1891 * implementations that use char* generic pointers, and those
1892 * that use void* generic pointers. It works with the latter
1893 * because both ANSI C and C++ allow castless assignment from
1894 * any pointer type to void*, and deal with argument conversions
1895 * as though doing an assignment.
1896 */
1897 return realloc(ptr, size);
1898 }
1899
yyfree(void * ptr)1900 void yyfree (void * ptr )
1901 {
1902 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1903 }
1904
1905 #define YYTABLES_NAME "yytables"
1906
1907 #line 75 "syslex.l"
1908