1 #line 4 "web2c-lexer.l"
2 /* web2c-lexer.l -- lexical analysis for Tangle output. Public domain. */
5 #include "web2c-parser.h"
9 #line 10 "web2c-lexer.c"
11 #define YY_INT_ALIGNED short int
13 /* A lexical scanner generated by flex */
16 #define YY_FLEX_MAJOR_VERSION 2
17 #define YY_FLEX_MINOR_VERSION 5
18 #define YY_FLEX_SUBMINOR_VERSION 39
19 #if YY_FLEX_SUBMINOR_VERSION > 0
23 /* First, we deal with platform-specific or compiler-specific issues. */
25 /* begin standard C headers. */
31 /* end standard C headers. */
33 /* flex integer type definitions */
38 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
40 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
42 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
43 * if you want the limit (max/min) macros for int types.
45 #ifndef __STDC_LIMIT_MACROS
46 #define __STDC_LIMIT_MACROS 1
50 typedef int8_t flex_int8_t
;
51 typedef uint8_t flex_uint8_t
;
52 typedef int16_t flex_int16_t
;
53 typedef uint16_t flex_uint16_t
;
54 typedef int32_t flex_int32_t
;
55 typedef uint32_t flex_uint32_t
;
57 typedef signed char flex_int8_t
;
58 typedef short int flex_int16_t
;
59 typedef int flex_int32_t
;
60 typedef unsigned char flex_uint8_t
;
61 typedef unsigned short int flex_uint16_t
;
62 typedef unsigned int flex_uint32_t
;
64 /* Limits of integral types. */
66 #define INT8_MIN (-128)
69 #define INT16_MIN (-32767-1)
72 #define INT32_MIN (-2147483647-1)
75 #define INT8_MAX (127)
78 #define INT16_MAX (32767)
81 #define INT32_MAX (2147483647)
84 #define UINT8_MAX (255U)
87 #define UINT16_MAX (65535U)
90 #define UINT32_MAX (4294967295U)
95 #endif /* ! FLEXINT_H */
99 /* The "const" storage-class-modifier is valid. */
102 #else /* ! __cplusplus */
104 /* C99 requires __STDC__ to be defined as 1. */
105 #if defined (__STDC__)
109 #endif /* defined (__STDC__) */
110 #endif /* ! __cplusplus */
113 #define yyconst const
118 /* Returned upon end-of-file. */
121 /* Promotes a possibly negative, possibly signed char to an unsigned
122 * integer for use as an array index. If the signed char is negative,
123 * we want to instead treat it as an 8-bit unsigned char, hence the
126 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
128 /* Enter a start condition. This macro really ought to take a parameter,
129 * but we do it the disgusting crufty way forced on us by the ()-less
130 * definition of BEGIN.
132 #define BEGIN (yy_start) = 1 + 2 *
134 /* Translate the current start state into a value that can be later handed
135 * to BEGIN to return to the state. The YYSTATE alias is for lex
138 #define YY_START (((yy_start) - 1) / 2)
139 #define YYSTATE YY_START
141 /* Action number for EOF rule of a given start state. */
142 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
144 /* Special action meaning "start processing a new file". */
145 #define YY_NEW_FILE yyrestart(yyin )
147 #define YY_END_OF_BUFFER_CHAR 0
149 /* Size of default input buffer. */
151 #define YY_BUF_SIZE 16384
154 /* The state buf must be large enough to hold one state per character in the main buffer.
156 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
158 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
159 #define YY_TYPEDEF_YY_BUFFER_STATE
160 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
163 #ifndef YY_TYPEDEF_YY_SIZE_T
164 #define YY_TYPEDEF_YY_SIZE_T
165 typedef size_t yy_size_t
;
168 extern yy_size_t yyleng
;
170 extern FILE *yyin
, *yyout
;
172 #define EOB_ACT_CONTINUE_SCAN 0
173 #define EOB_ACT_END_OF_FILE 1
174 #define EOB_ACT_LAST_MATCH 2
176 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
177 * access to the local variable yy_act. Since yyless() is a macro, it would break
178 * existing scanners that call yyless() from OUTSIDE yylex.
179 * One obvious solution it to make yy_act a global. I tried that, and saw
180 * a 5% performance hit in a non-yylineno scanner, because yy_act is
181 * normally declared as a register variable-- so it is not worth it.
183 #define YY_LESS_LINENO(n) \
186 for ( yyl = n; yyl < yyleng; ++yyl )\
187 if ( yytext[yyl] == '\n' )\
190 #define YY_LINENO_REWIND_TO(dst) \
193 for ( p = yy_cp-1; p >= (dst); --p)\
198 /* Return all but the first "n" matched characters back to the input stream. */
202 /* Undo effects of setting up yytext. */ \
203 int yyless_macro_arg = (n); \
204 YY_LESS_LINENO(yyless_macro_arg);\
205 *yy_cp = (yy_hold_char); \
206 YY_RESTORE_YY_MORE_OFFSET \
207 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
208 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
212 #define unput(c) yyunput( c, (yytext_ptr) )
214 #ifndef YY_STRUCT_YY_BUFFER_STATE
215 #define YY_STRUCT_YY_BUFFER_STATE
216 struct yy_buffer_state
220 char *yy_ch_buf
; /* input buffer */
221 char *yy_buf_pos
; /* current position in input buffer */
223 /* Size of input buffer in bytes, not including room for EOB
226 yy_size_t yy_buf_size
;
228 /* Number of characters read into yy_ch_buf, not including EOB
231 yy_size_t yy_n_chars
;
233 /* Whether we "own" the buffer - i.e., we know we created it,
234 * and can realloc() it to grow it, and should free() it to
237 int yy_is_our_buffer
;
239 /* Whether this is an "interactive" input source; if so, and
240 * if we're using stdio for input, then we want to use getc()
241 * instead of fread(), to make sure we stop fetching input after
244 int yy_is_interactive
;
246 /* Whether we're considered to be at the beginning of a line.
247 * If so, '^' rules will be active on the next match, otherwise
252 int yy_bs_lineno
; /**< The line count. */
253 int yy_bs_column
; /**< The column count. */
255 /* Whether to try to fill the input buffer when we reach the
260 int yy_buffer_status
;
262 #define YY_BUFFER_NEW 0
263 #define YY_BUFFER_NORMAL 1
264 /* When an EOF's been seen but there's still some text to process
265 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
266 * shouldn't try reading from the input source any more. We might
267 * still have a bunch of tokens to match, though, because of
268 * possible backing-up.
270 * When we actually see the EOF, we change the status to "new"
271 * (via yyrestart()), so that the user can continue scanning by
272 * just pointing yyin at a new input file.
274 #define YY_BUFFER_EOF_PENDING 2
277 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
279 /* Stack of input buffers. */
280 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
281 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
282 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
284 /* We provide macros for accessing buffer states in case in the
285 * future we want to put the buffer states in a more general
288 * Returns the top of the stack, or NULL.
290 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
291 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
294 /* Same as previous macro, but useful when we know that the buffer stack is not
295 * NULL or when we need an lvalue. For internal use only.
297 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
299 /* yy_hold_char holds the character lost when yytext is formed. */
300 static char yy_hold_char
;
301 static yy_size_t yy_n_chars
; /* number of characters read into yy_ch_buf */
304 /* Points to current character in buffer. */
305 static char *yy_c_buf_p
= (char *) 0;
306 static int yy_init
= 0; /* whether we need to initialize */
307 static int yy_start
= 0; /* start state number */
309 /* Flag which is used to allow yywrap()'s to do buffer switches
310 * instead of setting up a fresh yyin. A bit of a hack ...
312 static int yy_did_buffer_switch_on_eof
;
314 void yyrestart (FILE *input_file
);
315 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
);
316 YY_BUFFER_STATE
yy_create_buffer (FILE *file
,int size
);
317 void yy_delete_buffer (YY_BUFFER_STATE b
);
318 void yy_flush_buffer (YY_BUFFER_STATE b
);
319 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
);
320 void yypop_buffer_state (void );
322 static void yyensure_buffer_stack (void );
323 static void yy_load_buffer_state (void );
324 static void yy_init_buffer (YY_BUFFER_STATE b
,FILE *file
);
326 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
328 YY_BUFFER_STATE
yy_scan_buffer (char *base
,yy_size_t size
);
329 YY_BUFFER_STATE
yy_scan_string (yyconst
char *yy_str
);
330 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char *bytes
,yy_size_t len
);
332 void *yyalloc (yy_size_t
);
333 void *yyrealloc (void *,yy_size_t
);
334 void yyfree (void * );
336 #define yy_new_buffer yy_create_buffer
338 #define yy_set_interactive(is_interactive) \
340 if ( ! YY_CURRENT_BUFFER ){ \
341 yyensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 yy_create_buffer(yyin,YY_BUF_SIZE ); \
345 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
348 #define yy_set_bol(at_bol) \
350 if ( ! YY_CURRENT_BUFFER ){\
351 yyensure_buffer_stack (); \
352 YY_CURRENT_BUFFER_LVALUE = \
353 yy_create_buffer(yyin,YY_BUF_SIZE ); \
355 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
358 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
360 /* Begin user sect3 */
362 typedef unsigned char YY_CHAR
;
364 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
366 typedef int yy_state_type
;
368 #define YY_FLEX_LEX_COMPAT
373 extern char yytext
[];
375 static yy_state_type
yy_get_previous_state (void );
376 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
);
377 static int yy_get_next_buffer (void );
378 static void yy_fatal_error (yyconst
char msg
[] );
380 /* Done after the current pattern has been matched and before the
381 * corresponding action - sets up yytext.
383 #define YY_DO_BEFORE_ACTION \
384 (yytext_ptr) = yy_bp; \
385 yyleng = (size_t) (yy_cp - yy_bp); \
386 (yy_hold_char) = *yy_cp; \
388 if ( yyleng >= YYLMAX ) \
389 YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
390 yy_flex_strncpy( yytext, (yytext_ptr), yyleng + 1 ); \
391 (yy_c_buf_p) = yy_cp;
393 #define YY_NUM_RULES 74
394 #define YY_END_OF_BUFFER 75
395 /* This struct is not used in this scanner,
396 but its presence is necessary. */
399 flex_int32_t yy_verify
;
402 static yyconst flex_int16_t yy_accept
[278] =
404 0, 0, 75, 73, 1, 1, 3, 73, 61, 62,
405 53, 51, 68, 52, 67, 54, 48, 70, 69, 57,
406 55, 58, 73, 72, 63, 64, 71, 72, 72, 72,
407 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
408 72, 72, 72, 72, 72, 72, 2, 1, 0, 0,
409 50, 66, 0, 48, 0, 65, 59, 56, 60, 0,
410 0, 72, 72, 72, 72, 72, 72, 72, 72, 19,
411 72, 72, 72, 72, 72, 72, 72, 27, 72, 72,
412 72, 32, 33, 72, 72, 72, 72, 72, 41, 72,
413 72, 72, 72, 0, 0, 49, 47, 0, 47, 0,
415 0, 12, 72, 72, 72, 72, 72, 17, 72, 72,
416 22, 72, 24, 72, 72, 0, 0, 0, 72, 0,
417 72, 72, 72, 29, 72, 31, 72, 72, 72, 72,
418 72, 72, 72, 72, 44, 72, 0, 50, 0, 0,
419 0, 72, 72, 72, 15, 72, 72, 21, 72, 23,
420 72, 26, 0, 0, 0, 0, 0, 0, 0, 72,
421 0, 0, 72, 72, 72, 72, 72, 72, 72, 72,
422 72, 72, 40, 42, 72, 72, 0, 0, 47, 0,
423 0, 13, 14, 18, 16, 72, 72, 72, 0, 0,
424 0, 0, 38, 39, 0, 0, 0, 72, 72, 72,
426 28, 72, 72, 72, 72, 72, 72, 72, 43, 45,
427 0, 0, 11, 20, 5, 72, 72, 0, 0, 0,
428 0, 72, 4, 72, 72, 46, 72, 72, 72, 36,
429 37, 0, 10, 7, 72, 0, 0, 72, 6, 72,
430 1, 72, 35, 25, 0, 0, 72, 30, 72, 0,
431 0, 0, 34, 0, 0, 0, 0, 0, 0, 0,
432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
436 static yyconst flex_int32_t yy_ec
[256] =
438 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 4, 1, 1, 5, 1, 1, 1, 6, 7,
442 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
443 17, 17, 17, 17, 17, 17, 17, 18, 19, 20,
444 21, 22, 1, 23, 24, 24, 24, 24, 24, 24,
445 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
446 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
447 25, 1, 26, 27, 28, 1, 29, 30, 31, 32,
449 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
450 43, 44, 38, 45, 46, 47, 48, 49, 50, 38,
451 51, 38, 52, 1, 53, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 static yyconst flex_int32_t yy_meta
[54] =
470 1, 1, 1, 1, 1, 1, 2, 2, 1, 1,
471 2, 1, 1, 1, 3, 3, 3, 2, 1, 1,
472 1, 1, 1, 3, 1, 1, 1, 4, 4, 4,
473 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
474 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
478 static yyconst flex_int16_t yy_base
[287] =
480 0, 0, 403, 404, 52, 55, 404, 396, 404, 404,
481 404, 404, 404, 404, 388, 404, 47, 379, 404, 44,
482 404, 378, 35, 0, 404, 404, 404, 26, 28, 41,
483 35, 34, 38, 355, 361, 362, 366, 351, 350, 43,
484 50, 359, 46, 349, 361, 353, 404, 89, 359, 381,
485 380, 404, 85, 90, 98, 404, 404, 404, 404, 352,
486 347, 0, 351, 337, 346, 347, 333, 336, 328, 326,
487 329, 342, 333, 327, 329, 323, 114, 62, 339, 336,
488 38, 0, 0, 331, 335, 322, 67, 331, 0, 319,
489 315, 316, 323, 328, 352, 351, 109, 113, 119, 322,
491 322, 0, 325, 316, 323, 318, 304, 0, 307, 315,
492 310, 313, 0, 314, 301, 136, 334, 143, 313, 288,
493 307, 307, 305, 0, 304, 0, 303, 296, 106, 291,
494 300, 290, 298, 293, 0, 289, 289, 321, 144, 289,
495 285, 273, 281, 283, 0, 274, 273, 0, 285, 0,
496 271, 0, 288, 307, 160, 306, 104, 285, 260, 281,
497 258, 172, 276, 276, 268, 260, 261, 272, 271, 258,
498 257, 272, 0, 0, 260, 266, 265, 136, 153, 255,
499 264, 0, 0, 0, 0, 252, 80, 257, 262, 283,
500 283, 281, 404, 404, 258, 235, 179, 248, 279, 251,
502 0, 236, 237, 250, 249, 251, 247, 231, 0, 0,
503 245, 243, 404, 0, 404, 268, 230, 205, 234, 234,
504 202, 207, 404, 232, 193, 0, 232, 187, 193, 0,
505 0, 226, 404, 404, 187, 194, 193, 193, 404, 180,
506 189, 176, 0, 216, 187, 186, 213, 0, 178, 0,
507 206, 204, 199, 180, 0, 194, 175, 198, 146, 203,
508 139, 211, 135, 127, 127, 142, 115, 112, 126, 116,
509 99, 113, 99, 404, 93, 404, 404, 245, 247, 251,
510 255, 259, 263, 267, 270, 105
513 static yyconst flex_int16_t yy_def
[287] =
515 277, 1, 277, 277, 277, 277, 277, 278, 277, 277,
516 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
517 277, 277, 277, 279, 277, 277, 277, 279, 279, 279,
518 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
519 279, 279, 279, 279, 279, 279, 277, 277, 277, 280,
520 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
521 277, 279, 279, 279, 279, 279, 279, 279, 279, 279,
522 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
523 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
524 279, 279, 279, 277, 280, 277, 277, 277, 277, 277,
526 277, 279, 279, 279, 279, 279, 279, 279, 279, 279,
527 279, 279, 279, 279, 279, 277, 277, 277, 279, 281,
528 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
529 279, 279, 279, 279, 279, 279, 277, 277, 277, 277,
530 277, 279, 279, 279, 279, 279, 279, 279, 279, 279,
531 279, 279, 277, 282, 277, 277, 277, 277, 283, 279,
532 281, 277, 279, 279, 279, 279, 279, 279, 279, 279,
533 279, 279, 279, 279, 279, 279, 277, 277, 277, 277,
534 277, 279, 279, 279, 279, 279, 279, 279, 277, 282,
535 282, 284, 277, 277, 277, 283, 277, 279, 279, 279,
537 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
538 277, 277, 277, 279, 277, 279, 279, 277, 284, 284,
539 277, 279, 277, 279, 279, 279, 279, 279, 279, 279,
540 279, 277, 277, 277, 279, 277, 277, 279, 277, 279,
541 277, 279, 279, 279, 277, 277, 279, 279, 279, 285,
542 277, 277, 279, 285, 286, 277, 286, 277, 277, 277,
543 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
544 277, 277, 277, 277, 277, 277, 0, 277, 277, 277,
545 277, 277, 277, 277, 277, 277
548 static yyconst flex_int16_t yy_nxt
[458] =
550 4, 5, 6, 5, 7, 8, 9, 10, 11, 12,
551 13, 14, 15, 16, 17, 17, 17, 18, 19, 20,
552 21, 22, 23, 24, 25, 26, 27, 4, 28, 29,
553 30, 31, 32, 33, 34, 35, 36, 24, 24, 37,
554 38, 39, 40, 41, 42, 24, 43, 44, 45, 46,
555 24, 47, 4, 48, 48, 48, 48, 48, 48, 53,
556 65, 54, 54, 54, 57, 58, 60, 63, 61, 67,
557 64, 69, 66, 71, 73, 72, 82, 70, 85, 55,
558 74, 88, 125, 68, 126, 75, 215, 83, 89, 84,
559 48, 48, 48, 121, 86, 49, 90, 130, 49, 97,
561 97, 97, 53, 122, 54, 54, 54, 98, 257, 98,
562 131, 276, 99, 99, 99, 116, 116, 116, 193, 194,
563 117, 216, 55, 97, 97, 97, 118, 99, 99, 99,
564 275, 274, 49, 99, 99, 99, 169, 116, 116, 116,
565 170, 139, 117, 273, 155, 155, 155, 272, 118, 156,
566 179, 179, 179, 178, 271, 178, 270, 119, 179, 179,
567 179, 155, 155, 155, 269, 120, 156, 179, 179, 179,
568 268, 267, 157, 116, 116, 116, 266, 265, 117, 153,
569 155, 155, 155, 264, 118, 156, 158, 120, 261, 157,
570 48, 48, 48, 260, 159, 258, 258, 258, 256, 258,
572 258, 258, 255, 158, 262, 262, 262, 197, 157, 162,
573 253, 159, 262, 262, 262, 153, 162, 252, 251, 250,
574 249, 248, 158, 120, 247, 246, 245, 259, 244, 241,
575 159, 259, 49, 243, 242, 241, 263, 240, 239, 238,
576 237, 197, 220, 236, 263, 50, 50, 50, 50, 62,
577 62, 95, 95, 95, 95, 161, 161, 161, 161, 190,
578 190, 190, 190, 196, 196, 196, 196, 219, 219, 219,
579 219, 254, 235, 254, 234, 233, 232, 231, 230, 229,
580 228, 227, 226, 225, 224, 223, 222, 197, 221, 220,
581 162, 191, 218, 217, 214, 213, 212, 211, 210, 209,
583 208, 207, 206, 205, 204, 203, 202, 201, 200, 199,
584 162, 198, 197, 195, 192, 191, 189, 188, 187, 186,
585 185, 184, 183, 182, 181, 180, 95, 177, 176, 175,
586 174, 173, 172, 171, 168, 167, 166, 165, 164, 163,
587 162, 160, 154, 152, 151, 150, 149, 148, 147, 146,
588 145, 144, 143, 142, 141, 140, 95, 138, 137, 136,
589 135, 134, 133, 132, 129, 128, 127, 124, 123, 115,
590 114, 113, 112, 111, 110, 109, 108, 107, 106, 105,
591 104, 103, 102, 101, 100, 50, 96, 94, 93, 92,
592 91, 87, 81, 80, 79, 78, 77, 76, 59, 56,
594 52, 51, 277, 3, 277, 277, 277, 277, 277, 277,
595 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
596 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
597 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
598 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
599 277, 277, 277, 277, 277, 277, 277
602 static yyconst flex_int16_t yy_chk
[458] =
604 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
605 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
606 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
607 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
608 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
609 1, 1, 1, 5, 5, 5, 6, 6, 6, 17,
610 29, 17, 17, 17, 20, 20, 23, 28, 23, 30,
611 28, 31, 29, 32, 33, 32, 40, 31, 41, 17,
612 33, 43, 81, 30, 81, 33, 187, 40, 43, 40,
613 48, 48, 48, 78, 41, 5, 43, 87, 6, 53,
615 53, 53, 54, 78, 54, 54, 54, 55, 286, 55,
616 87, 275, 55, 55, 55, 77, 77, 77, 157, 157,
617 77, 187, 54, 97, 97, 97, 77, 98, 98, 98,
618 273, 272, 48, 99, 99, 99, 129, 116, 116, 116,
619 129, 97, 116, 271, 118, 118, 118, 270, 116, 118,
620 178, 178, 178, 139, 269, 139, 268, 77, 139, 139,
621 139, 155, 155, 155, 267, 77, 155, 179, 179, 179,
622 266, 265, 118, 162, 162, 162, 264, 263, 162, 116,
623 197, 197, 197, 261, 162, 197, 118, 116, 259, 155,
624 241, 241, 241, 257, 118, 256, 256, 256, 254, 258,
626 258, 258, 253, 155, 260, 260, 260, 252, 197, 251,
627 249, 155, 262, 262, 262, 162, 247, 246, 245, 244,
628 242, 240, 197, 162, 238, 237, 236, 256, 235, 232,
629 197, 258, 241, 229, 228, 227, 260, 225, 224, 222,
630 221, 220, 219, 218, 262, 278, 278, 278, 278, 279,
631 279, 280, 280, 280, 280, 281, 281, 281, 281, 282,
632 282, 282, 282, 283, 283, 283, 283, 284, 284, 284,
633 284, 285, 217, 285, 216, 212, 211, 208, 207, 206,
634 205, 204, 203, 202, 200, 199, 198, 196, 195, 192,
635 191, 190, 189, 188, 186, 181, 180, 177, 176, 175,
637 172, 171, 170, 169, 168, 167, 166, 165, 164, 163,
638 161, 160, 159, 158, 156, 154, 153, 151, 149, 147,
639 146, 144, 143, 142, 141, 140, 138, 137, 136, 134,
640 133, 132, 131, 130, 128, 127, 125, 123, 122, 121,
641 120, 119, 117, 115, 114, 112, 111, 110, 109, 107,
642 106, 105, 104, 103, 101, 100, 96, 95, 94, 93,
643 92, 91, 90, 88, 86, 85, 84, 80, 79, 76,
644 75, 74, 73, 72, 71, 70, 69, 68, 67, 66,
645 65, 64, 63, 61, 60, 51, 50, 49, 46, 45,
646 44, 42, 39, 38, 37, 36, 35, 34, 22, 18,
648 15, 8, 3, 277, 277, 277, 277, 277, 277, 277,
649 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
650 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
651 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
652 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
653 277, 277, 277, 277, 277, 277, 277
656 /* Table of booleans, true if rule could match eol. */
657 static yyconst flex_int32_t yy_rule_can_match_eol
[75] =
659 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
661 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
664 static yy_state_type yy_last_accepting_state
;
665 static char *yy_last_accepting_cpos
;
667 extern int yy_flex_debug
;
668 int yy_flex_debug
= 0;
670 /* The intent behind this definition is that it'll catch
671 * any uses of REJECT which flex missed.
673 #define REJECT reject_used_but_not_detected
674 #define yymore() yymore_used_but_not_detected
675 #define YY_MORE_ADJ 0
676 #define YY_RESTORE_YY_MORE_OFFSET
683 #line 1 "web2c-lexer.l"
685 #line 11 "web2c-lexer.l"
686 /* Hack to make it possible to compile the generated code with C++
687 Required if you use flex. */
689 #define webinput yyinput
691 #define webinput input
694 /* For some reason flex wants to do a system call, so we must lose our
695 definition of the Pascal read. */
698 char conditional
[20], negbuf
[2], temp
[20];
699 extern boolean doing_statements
;
702 /* We only read one input file. This is the default definition, but
703 giving it ourselves avoids the need to find -lfl or -ll at link time.
704 This is a good thing, since libfl.a is often installed somewhere that
705 the linker doesn't search by default. */
711 #define YY_SKIP_YYWRAP /* not that it matters */
712 #line 713 "web2c-lexer.c"
716 #ifndef YY_NO_UNISTD_H
717 /* Special case for "unistd.h", since it is non-ANSI. We include it way
718 * down here because we want the user's section 1 to have been scanned first.
719 * The user has a chance to override it with an option.
724 #ifndef YY_EXTRA_TYPE
725 #define YY_EXTRA_TYPE void *
728 static int yy_init_globals (void );
730 /* Accessor methods to globals.
731 These are made visible to non-reentrant scanners for convenience. */
733 int yylex_destroy (void );
735 int yyget_debug (void );
737 void yyset_debug (int debug_flag
);
739 YY_EXTRA_TYPE
yyget_extra (void );
741 void yyset_extra (YY_EXTRA_TYPE user_defined
);
743 FILE *yyget_in (void );
745 void yyset_in (FILE * in_str
);
747 FILE *yyget_out (void );
749 void yyset_out (FILE * out_str
);
751 yy_size_t
yyget_leng (void );
753 char *yyget_text (void );
755 int yyget_lineno (void );
757 void yyset_lineno (int line_number
);
759 /* Macros after this point can all be overridden by user definitions in
763 #ifndef YY_SKIP_YYWRAP
765 extern "C" int yywrap (void );
767 extern int yywrap (void );
771 static void yyunput (int c
,char *buf_ptr
);
774 static void yy_flex_strncpy (char *,yyconst
char *,int );
777 #ifdef YY_NEED_STRLEN
778 static int yy_flex_strlen (yyconst
char * );
784 static int yyinput (void );
786 static int input (void );
791 /* Amount of stuff to slurp up with each read. */
792 #ifndef YY_READ_BUF_SIZE
793 #define YY_READ_BUF_SIZE 8192
796 /* Copy whatever the last rule matched to the standard output. */
798 /* This used to be an fputs(), but since the string might contain NUL's,
799 * we now use fwrite().
801 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
804 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
805 * is returned in "result".
808 #define YY_INPUT(buf,result,max_size) \
809 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
813 for ( n = 0; n < max_size && \
814 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
817 buf[n++] = (char) c; \
818 if ( c == EOF && ferror( yyin ) ) \
819 YY_FATAL_ERROR( "input in flex scanner failed" ); \
825 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
827 if( errno != EINTR) \
829 YY_FATAL_ERROR( "input in flex scanner failed" ); \
840 /* No semi-colon after return; correct usage is to write "yyterminate();" -
841 * we don't want an extra ';' after the "return" because that will cause
842 * some compilers to complain about unreachable statements.
845 #define yyterminate() return YY_NULL
848 /* Number of entries by which start-condition stack grows. */
849 #ifndef YY_START_STACK_INCR
850 #define YY_START_STACK_INCR 25
853 /* Report a fatal error. */
854 #ifndef YY_FATAL_ERROR
855 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
858 /* end tables serialization structures and prototypes */
860 /* Default declaration of generated scanner - a define so the user can
861 * easily add parameters.
864 #define YY_DECL_IS_OURS 1
866 extern int yylex (void);
868 #define YY_DECL int yylex (void)
869 #endif /* !YY_DECL */
871 /* Code executed at the beginning of each rule, after yytext and yyleng
874 #ifndef YY_USER_ACTION
875 #define YY_USER_ACTION
878 /* Code executed at the end of each rule. */
880 #define YY_BREAK break;
883 #define YY_RULE_SETUP \
886 /** The main scanner function which does all the work.
890 register yy_state_type yy_current_state
;
891 register char *yy_cp
, *yy_bp
;
903 (yy_start
) = 1; /* first start state */
911 if ( ! YY_CURRENT_BUFFER
) {
912 yyensure_buffer_stack ();
913 YY_CURRENT_BUFFER_LVALUE
=
914 yy_create_buffer(yyin
,YY_BUF_SIZE
);
917 yy_load_buffer_state( );
921 #line 53 "web2c-lexer.l"
923 #line 924 "web2c-lexer.c"
925 while ( 1 ) /* loops until end-of-file is reached */
927 yy_cp
= (yy_c_buf_p
);
929 /* Support of yytext. */
930 *yy_cp
= (yy_hold_char
);
932 /* yy_bp points to the position in yy_ch_buf of the start of
937 yy_current_state
= (yy_start
);
941 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)] ;
942 if ( yy_accept
[yy_current_state
] )
944 (yy_last_accepting_state
) = yy_current_state
;
945 (yy_last_accepting_cpos
) = yy_cp
;
947 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
949 yy_current_state
= (int) yy_def
[yy_current_state
];
950 if ( yy_current_state
>= 278 )
951 yy_c
= yy_meta
[(unsigned int) yy_c
];
953 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
956 while ( yy_current_state
!= 277 );
957 yy_cp
= (yy_last_accepting_cpos
);
958 yy_current_state
= (yy_last_accepting_state
);
961 yy_act
= yy_accept
[yy_current_state
];
965 if ( yy_act
!= YY_END_OF_BUFFER
&& yy_rule_can_match_eol
[yy_act
] )
968 for ( yyl
= 0; yyl
< yyleng
; ++yyl
)
969 if ( yytext
[yyl
] == '\n' )
975 do_action
: /* This label is used only to access EOF actions. */
978 { /* beginning of action switch */
979 case 0: /* must back up */
980 /* undo the effects of YY_DO_BEFORE_ACTION */
981 *yy_cp
= (yy_hold_char
);
982 yy_cp
= (yy_last_accepting_cpos
);
983 yy_current_state
= (yy_last_accepting_state
);
987 /* rule 1 can match eol */
989 #line 54 "web2c-lexer.l"
994 #line 55 "web2c-lexer.l"
995 { while (webinput() != '}'); }
999 #line 57 "web2c-lexer.l"
1003 while ((c
= webinput()) && c
!= ';')
1010 #line 65 "web2c-lexer.l"
1012 register char *cp
=conditional
;
1014 while ((c
= webinput()) != '\'')
1016 while ((c
= webinput()) != '\'')
1020 if (doing_statements
) fputs("\t;\n", out
);
1021 fprintf(out
, "#ifdef %s\n", conditional
);
1026 #line 78 "web2c-lexer.l"
1029 fputs("#endif /* ", out
);
1030 while ((c
= webinput()) != '\'')
1032 while ((c
= webinput()) != '\'')
1033 (void) putc(c
, out
);
1035 conditional
[0] = '\0';
1036 fputs(" */\n", out
);
1041 #line 90 "web2c-lexer.l"
1043 register char *cp
=conditional
;
1045 while ((c
= webinput()) != '\'')
1047 while ((c
= webinput()) != '\'')
1051 if (doing_statements
) fputs("\t;\n", out
);
1052 fprintf(out
, "#ifndef %s\n", conditional
);
1057 #line 103 "web2c-lexer.l"
1060 fputs("#endif /* not ", out
);
1061 while ((c
= webinput()) != '\'')
1063 while ((c
= webinput()) != '\'')
1066 conditional
[0] = '\0';
1067 fputs(" */\n", out
);
1071 /* rule 8 can match eol */
1073 #line 116 "web2c-lexer.l"
1077 /* rule 9 can match eol */
1079 #line 118 "web2c-lexer.l"
1084 #line 120 "web2c-lexer.l"
1085 return last_tok
=define_tok
;
1089 #line 121 "web2c-lexer.l"
1090 return last_tok
=field_tok
;
1094 #line 122 "web2c-lexer.l"
1095 return last_tok
=and_tok
;
1099 #line 123 "web2c-lexer.l"
1100 return last_tok
=array_tok
;
1104 #line 124 "web2c-lexer.l"
1105 return last_tok
=begin_tok
;
1109 #line 125 "web2c-lexer.l"
1110 return last_tok
=case_tok
;
1114 #line 126 "web2c-lexer.l"
1115 return last_tok
=const_tok
;
1119 #line 127 "web2c-lexer.l"
1120 return last_tok
=div_tok
;
1124 #line 128 "web2c-lexer.l"
1125 return last_tok
=break_tok
;
1129 #line 129 "web2c-lexer.l"
1130 return last_tok
=do_tok
;
1134 #line 130 "web2c-lexer.l"
1135 return last_tok
=downto_tok
;
1139 #line 131 "web2c-lexer.l"
1140 return last_tok
=else_tok
;
1144 #line 132 "web2c-lexer.l"
1145 return last_tok
=end_tok
;
1149 #line 133 "web2c-lexer.l"
1150 return last_tok
=file_tok
;
1154 #line 134 "web2c-lexer.l"
1155 return last_tok
=for_tok
;
1159 #line 135 "web2c-lexer.l"
1160 return last_tok
=function_tok
;
1164 #line 136 "web2c-lexer.l"
1165 return last_tok
=goto_tok
;
1169 #line 137 "web2c-lexer.l"
1170 return last_tok
=if_tok
;
1174 #line 138 "web2c-lexer.l"
1175 return last_tok
=label_tok
;
1179 #line 139 "web2c-lexer.l"
1180 return last_tok
=mod_tok
;
1184 #line 140 "web2c-lexer.l"
1185 return last_tok
=noreturn_tok
;
1189 #line 141 "web2c-lexer.l"
1190 return last_tok
=not_tok
;
1194 #line 142 "web2c-lexer.l"
1195 return last_tok
=of_tok
;
1199 #line 143 "web2c-lexer.l"
1200 return last_tok
=or_tok
;
1204 #line 144 "web2c-lexer.l"
1205 return last_tok
=procedure_tok
;
1209 #line 145 "web2c-lexer.l"
1210 return last_tok
=program_tok
;
1214 #line 146 "web2c-lexer.l"
1215 return last_tok
=record_tok
;
1219 #line 147 "web2c-lexer.l"
1220 return last_tok
=repeat_tok
;
1223 /* rule 38 can match eol */
1225 #line 148 "web2c-lexer.l"
1226 return last_tok
=hhb0_tok
;
1229 /* rule 39 can match eol */
1231 #line 149 "web2c-lexer.l"
1232 return last_tok
=hhb1_tok
;
1236 #line 150 "web2c-lexer.l"
1237 return last_tok
=then_tok
;
1241 #line 151 "web2c-lexer.l"
1242 return last_tok
=to_tok
;
1246 #line 152 "web2c-lexer.l"
1247 return last_tok
=type_tok
;
1251 #line 153 "web2c-lexer.l"
1252 return last_tok
=until_tok
;
1256 #line 154 "web2c-lexer.l"
1257 return last_tok
=var_tok
;
1261 #line 155 "web2c-lexer.l"
1262 return last_tok
=while_tok
;
1266 #line 156 "web2c-lexer.l"
1267 return last_tok
=others_tok
;
1271 #line 158 "web2c-lexer.l"
1273 sprintf (temp
, "%s%s", negbuf
, yytext
);
1275 return last_tok
=r_num_tok
;
1280 #line 164 "web2c-lexer.l"
1282 sprintf (temp
, "%s%s", negbuf
, yytext
);
1284 return last_tok
=i_num_tok
;
1288 /* rule 49 can match eol */
1290 #line 170 "web2c-lexer.l"
1291 return last_tok
=single_char_tok
;
1294 /* rule 50 can match eol */
1296 #line 172 "web2c-lexer.l"
1297 return last_tok
=string_literal_tok
;
1301 #line 174 "web2c-lexer.l"
1302 { if ((last_tok
>=undef_id_tok
&&
1303 last_tok
<=field_id_tok
) ||
1304 last_tok
==i_num_tok
||
1305 last_tok
==r_num_tok
||
1308 return last_tok
='+';
1309 else return last_tok
=unary_plus_tok
; }
1313 #line 183 "web2c-lexer.l"
1314 { if ((last_tok
>=undef_id_tok
&&
1315 last_tok
<=field_id_tok
) ||
1316 last_tok
==i_num_tok
||
1317 last_tok
==r_num_tok
||
1320 return last_tok
='-';
1323 while ((c
= webinput()) == ' ' || c
== '\t')
1326 if (c
< '0' || c
> '9') {
1327 return last_tok
= unary_minus_tok
;
1334 #line 201 "web2c-lexer.l"
1335 return last_tok
='*';
1339 #line 202 "web2c-lexer.l"
1340 return last_tok
='/';
1344 #line 203 "web2c-lexer.l"
1345 return last_tok
='=';
1349 #line 204 "web2c-lexer.l"
1350 return last_tok
=not_eq_tok
;
1354 #line 205 "web2c-lexer.l"
1355 return last_tok
='<';
1359 #line 206 "web2c-lexer.l"
1360 return last_tok
='>';
1364 #line 207 "web2c-lexer.l"
1365 return last_tok
=less_eq_tok
;
1369 #line 208 "web2c-lexer.l"
1370 return last_tok
=great_eq_tok
;
1374 #line 209 "web2c-lexer.l"
1375 return last_tok
='(';
1379 #line 210 "web2c-lexer.l"
1380 return last_tok
=')';
1384 #line 211 "web2c-lexer.l"
1385 return last_tok
='[';
1389 #line 212 "web2c-lexer.l"
1390 return last_tok
=']';
1394 #line 213 "web2c-lexer.l"
1395 return last_tok
=assign_tok
;
1399 #line 214 "web2c-lexer.l"
1400 return last_tok
=two_dots_tok
;
1404 #line 215 "web2c-lexer.l"
1405 return last_tok
='.';
1409 #line 216 "web2c-lexer.l"
1410 return last_tok
=',';
1414 #line 217 "web2c-lexer.l"
1415 return last_tok
=';';
1419 #line 218 "web2c-lexer.l"
1420 return last_tok
=':';
1424 #line 219 "web2c-lexer.l"
1425 return last_tok
='^';
1429 #line 221 "web2c-lexer.l"
1430 { strcpy (last_id
, yytext
);
1431 l_s
= search_table (last_id
);
1433 last_tok
= (l_s
== -1 ? undef_id_tok
: sym_table
[l_s
].typ
);
1438 #line 228 "web2c-lexer.l"
1439 { /* Any bizarre token will do. */
1440 return last_tok
= two_dots_tok
; }
1444 #line 230 "web2c-lexer.l"
1447 #line 1448 "web2c-lexer.c"
1448 case YY_STATE_EOF(INITIAL
):
1451 case YY_END_OF_BUFFER
:
1453 /* Amount of text matched not including the EOB char. */
1454 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
1456 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1457 *yy_cp
= (yy_hold_char
);
1458 YY_RESTORE_YY_MORE_OFFSET
1460 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
1462 /* We're scanning a new file or input source. It's
1463 * possible that this happened because the user
1464 * just pointed yyin at a new source and called
1465 * yylex(). If so, then we have to assure
1466 * consistency between YY_CURRENT_BUFFER and our
1467 * globals. Here is the right place to do so, because
1468 * this is the first action (other than possibly a
1469 * back-up) that will match for the new input source.
1471 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1472 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
1473 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1476 /* Note that here we test for yy_c_buf_p "<=" to the position
1477 * of the first EOB in the buffer, since yy_c_buf_p will
1478 * already have been incremented past the NUL character
1479 * (since all states make transitions on EOB to the
1480 * end-of-buffer state). Contrast this with the test
1483 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1484 { /* This was really a NUL. */
1485 yy_state_type yy_next_state
;
1487 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
1489 yy_current_state
= yy_get_previous_state( );
1491 /* Okay, we're now positioned to make the NUL
1492 * transition. We couldn't have
1493 * yy_get_previous_state() go ahead and do it
1494 * for us because it doesn't know how to deal
1495 * with the possibility of jamming (and we don't
1496 * want to build jamming into it because then it
1497 * will run more slowly).
1500 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1502 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1504 if ( yy_next_state
)
1506 /* Consume the NUL. */
1507 yy_cp
= ++(yy_c_buf_p
);
1508 yy_current_state
= yy_next_state
;
1514 yy_cp
= (yy_last_accepting_cpos
);
1515 yy_current_state
= (yy_last_accepting_state
);
1516 goto yy_find_action
;
1520 else switch ( yy_get_next_buffer( ) )
1522 case EOB_ACT_END_OF_FILE
:
1524 (yy_did_buffer_switch_on_eof
) = 0;
1528 /* Note: because we've taken care in
1529 * yy_get_next_buffer() to have set up
1530 * yytext, we can now set up
1531 * yy_c_buf_p so that if some total
1532 * hoser (like flex itself) wants to
1533 * call the scanner after we return the
1534 * YY_NULL, it'll still work - another
1535 * YY_NULL will get returned.
1537 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
1539 yy_act
= YY_STATE_EOF(YY_START
);
1545 if ( ! (yy_did_buffer_switch_on_eof
) )
1551 case EOB_ACT_CONTINUE_SCAN
:
1553 (yytext_ptr
) + yy_amount_of_matched_text
;
1555 yy_current_state
= yy_get_previous_state( );
1557 yy_cp
= (yy_c_buf_p
);
1558 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1561 case EOB_ACT_LAST_MATCH
:
1563 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
1565 yy_current_state
= yy_get_previous_state( );
1567 yy_cp
= (yy_c_buf_p
);
1568 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1569 goto yy_find_action
;
1576 "fatal flex scanner internal error--no action found" );
1577 } /* end of action switch */
1578 } /* end of scanning one token */
1579 } /* end of user's declarations */
1580 } /* end of yylex */
1582 /* yy_get_next_buffer - try to read in a new buffer
1584 * Returns a code representing an action:
1585 * EOB_ACT_LAST_MATCH -
1586 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1587 * EOB_ACT_END_OF_FILE - end of file
1589 static int yy_get_next_buffer (void)
1591 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
1592 register char *source
= (yytext_ptr
);
1593 register int number_to_move
, i
;
1596 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
1598 "fatal flex scanner internal error--end of buffer missed" );
1600 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
1601 { /* Don't try to fill the buffer, so this is an EOF. */
1602 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
1604 /* We matched a single character, the EOB, so
1605 * treat this as a final EOF.
1607 return EOB_ACT_END_OF_FILE
;
1612 /* We matched some text prior to the EOB, first
1615 return EOB_ACT_LAST_MATCH
;
1619 /* Try to read more data. */
1621 /* First move last chars to start of buffer. */
1622 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
1624 for ( i
= 0; i
< number_to_move
; ++i
)
1625 *(dest
++) = *(source
++);
1627 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1628 /* don't do the read, it's not guaranteed to return an EOF,
1631 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
1635 yy_size_t num_to_read
=
1636 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
1638 while ( num_to_read
<= 0 )
1639 { /* Not enough room in the buffer - grow it. */
1641 /* just a shorter name for the current buffer */
1642 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER_LVALUE
;
1644 int yy_c_buf_p_offset
=
1645 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
1647 if ( b
->yy_is_our_buffer
)
1649 yy_size_t new_size
= b
->yy_buf_size
* 2;
1651 if ( new_size
<= 0 )
1652 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1654 b
->yy_buf_size
*= 2;
1656 b
->yy_ch_buf
= (char *)
1657 /* Include room in for 2 EOB chars. */
1658 yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
1661 /* Can't grow it, we don't own it. */
1664 if ( ! b
->yy_ch_buf
)
1666 "fatal error - scanner input buffer overflow" );
1668 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1670 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
1675 if ( num_to_read
> YY_READ_BUF_SIZE
)
1676 num_to_read
= YY_READ_BUF_SIZE
;
1678 /* Read in more data. */
1679 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
1680 (yy_n_chars
), num_to_read
);
1682 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1685 if ( (yy_n_chars
) == 0 )
1687 if ( number_to_move
== YY_MORE_ADJ
)
1689 ret_val
= EOB_ACT_END_OF_FILE
;
1695 ret_val
= EOB_ACT_LAST_MATCH
;
1696 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
1697 YY_BUFFER_EOF_PENDING
;
1702 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1704 if ((yy_size_t
) ((yy_n_chars
) + number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
1705 /* Extend the array by 50%, plus the number we really need. */
1706 yy_size_t new_size
= (yy_n_chars
) + number_to_move
+ ((yy_n_chars
) >> 1);
1707 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
);
1708 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1709 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1712 (yy_n_chars
) += number_to_move
;
1713 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
1714 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
1716 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
1721 /* yy_get_previous_state - get the state just before the EOB char was reached */
1723 static yy_state_type
yy_get_previous_state (void)
1725 register yy_state_type yy_current_state
;
1726 register char *yy_cp
;
1728 yy_current_state
= (yy_start
);
1730 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
1732 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1733 if ( yy_accept
[yy_current_state
] )
1735 (yy_last_accepting_state
) = yy_current_state
;
1736 (yy_last_accepting_cpos
) = yy_cp
;
1738 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1740 yy_current_state
= (int) yy_def
[yy_current_state
];
1741 if ( yy_current_state
>= 278 )
1742 yy_c
= yy_meta
[(unsigned int) yy_c
];
1744 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1747 return yy_current_state
;
1750 /* yy_try_NUL_trans - try to make a transition on the NUL character
1753 * next_state = yy_try_NUL_trans( current_state );
1755 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
1757 register int yy_is_jam
;
1758 register char *yy_cp
= (yy_c_buf_p
);
1760 register YY_CHAR yy_c
= 1;
1761 if ( yy_accept
[yy_current_state
] )
1763 (yy_last_accepting_state
) = yy_current_state
;
1764 (yy_last_accepting_cpos
) = yy_cp
;
1766 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1768 yy_current_state
= (int) yy_def
[yy_current_state
];
1769 if ( yy_current_state
>= 278 )
1770 yy_c
= yy_meta
[(unsigned int) yy_c
];
1772 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1773 yy_is_jam
= (yy_current_state
== 277);
1775 return yy_is_jam
? 0 : yy_current_state
;
1778 static void yyunput (int c
, register char * yy_bp
)
1780 register char *yy_cp
;
1782 yy_cp
= (yy_c_buf_p
);
1784 /* undo effects of setting up yytext */
1785 *yy_cp
= (yy_hold_char
);
1787 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
1788 { /* need to shift things up to make room */
1789 /* +2 for EOB chars. */
1790 register yy_size_t number_to_move
= (yy_n_chars
) + 2;
1791 register char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
1792 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
1793 register char *source
=
1794 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
1796 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1797 *--dest
= *--source
;
1799 yy_cp
+= (int) (dest
- source
);
1800 yy_bp
+= (int) (dest
- source
);
1801 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
1802 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
1804 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
1805 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1808 *--yy_cp
= (char) c
;
1814 (yytext_ptr
) = yy_bp
;
1815 (yy_hold_char
) = *yy_cp
;
1816 (yy_c_buf_p
) = yy_cp
;
1821 static int yyinput (void)
1823 static int input (void)
1829 *(yy_c_buf_p
) = (yy_hold_char
);
1831 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
1833 /* yy_c_buf_p now points to the character we want to return.
1834 * If this occurs *before* the EOB characters, then it's a
1835 * valid NUL; if not, then we've hit the end of the buffer.
1837 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1838 /* This was really a NUL. */
1839 *(yy_c_buf_p
) = '\0';
1842 { /* need more input */
1843 yy_size_t offset
= (yy_c_buf_p
) - (yytext_ptr
);
1846 switch ( yy_get_next_buffer( ) )
1848 case EOB_ACT_LAST_MATCH
:
1849 /* This happens because yy_g_n_b()
1850 * sees that we've accumulated a
1851 * token and flags that we need to
1852 * try matching the token before
1853 * proceeding. But for input(),
1854 * there's no matching to consider.
1855 * So convert the EOB_ACT_LAST_MATCH
1856 * to EOB_ACT_END_OF_FILE.
1859 /* Reset buffer status. */
1864 case EOB_ACT_END_OF_FILE
:
1869 if ( ! (yy_did_buffer_switch_on_eof
) )
1878 case EOB_ACT_CONTINUE_SCAN
:
1879 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
1885 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
1886 *(yy_c_buf_p
) = '\0'; /* preserve yytext */
1887 (yy_hold_char
) = *++(yy_c_buf_p
);
1896 #endif /* ifndef YY_NO_INPUT */
1898 /** Immediately switch to a different input stream.
1899 * @param input_file A readable stream.
1901 * @note This function does not reset the start condition to @c INITIAL .
1903 void yyrestart (FILE * input_file
)
1906 if ( ! YY_CURRENT_BUFFER
){
1907 yyensure_buffer_stack ();
1908 YY_CURRENT_BUFFER_LVALUE
=
1909 yy_create_buffer(yyin
,YY_BUF_SIZE
);
1912 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
);
1913 yy_load_buffer_state( );
1916 /** Switch to a different input buffer.
1917 * @param new_buffer The new input buffer.
1920 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
1923 /* TODO. We should be able to replace this entire function body
1925 * yypop_buffer_state();
1926 * yypush_buffer_state(new_buffer);
1928 yyensure_buffer_stack ();
1929 if ( YY_CURRENT_BUFFER
== new_buffer
)
1932 if ( YY_CURRENT_BUFFER
)
1934 /* Flush out information for old buffer. */
1935 *(yy_c_buf_p
) = (yy_hold_char
);
1936 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1937 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1940 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1941 yy_load_buffer_state( );
1943 /* We don't actually know whether we did this switch during
1944 * EOF (yywrap()) processing, but the only time this flag
1945 * is looked at is after yywrap() is called, so it's safe
1946 * to go ahead and always set it.
1948 (yy_did_buffer_switch_on_eof
) = 1;
1951 static void yy_load_buffer_state (void)
1953 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1954 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
1955 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
1956 (yy_hold_char
) = *(yy_c_buf_p
);
1959 /** Allocate and initialize an input buffer state.
1960 * @param file A readable stream.
1961 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1963 * @return the allocated buffer state.
1965 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
)
1969 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
1971 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1973 b
->yy_buf_size
= size
;
1975 /* yy_ch_buf has to be 2 characters longer than the size given because
1976 * we need to put in 2 end-of-buffer characters.
1978 b
->yy_ch_buf
= (char *) yyalloc(b
->yy_buf_size
+ 2 );
1979 if ( ! b
->yy_ch_buf
)
1980 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1982 b
->yy_is_our_buffer
= 1;
1984 yy_init_buffer(b
,file
);
1989 /** Destroy the buffer.
1990 * @param b a buffer created with yy_create_buffer()
1993 void yy_delete_buffer (YY_BUFFER_STATE b
)
1999 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2000 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2002 if ( b
->yy_is_our_buffer
)
2003 yyfree((void *) b
->yy_ch_buf
);
2005 yyfree((void *) b
);
2008 /* Initializes or reinitializes a buffer.
2009 * This function is sometimes called more than once on the same buffer,
2010 * such as during a yyrestart() or at EOF.
2012 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
2017 yy_flush_buffer(b
);
2019 b
->yy_input_file
= file
;
2020 b
->yy_fill_buffer
= 1;
2022 /* If b is the current buffer, then yy_init_buffer was _probably_
2023 * called from yyrestart() or through yy_get_next_buffer.
2024 * In that case, we don't want to reset the lineno or column.
2026 if (b
!= YY_CURRENT_BUFFER
){
2027 b
->yy_bs_lineno
= 1;
2028 b
->yy_bs_column
= 0;
2031 b
->yy_is_interactive
= 0;
2036 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2037 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2040 void yy_flush_buffer (YY_BUFFER_STATE b
)
2047 /* We always need two end-of-buffer characters. The first causes
2048 * a transition to the end-of-buffer state. The second causes
2049 * a jam in that state.
2051 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2052 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2054 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2057 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2059 if ( b
== YY_CURRENT_BUFFER
)
2060 yy_load_buffer_state( );
2063 /** Pushes the new state onto the stack. The new state becomes
2064 * the current state. This function will allocate the stack
2066 * @param new_buffer The new state.
2069 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
)
2071 if (new_buffer
== NULL
)
2074 yyensure_buffer_stack();
2076 /* This block is copied from yy_switch_to_buffer. */
2077 if ( YY_CURRENT_BUFFER
)
2079 /* Flush out information for old buffer. */
2080 *(yy_c_buf_p
) = (yy_hold_char
);
2081 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2082 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2085 /* Only push if top exists. Otherwise, replace top. */
2086 if (YY_CURRENT_BUFFER
)
2087 (yy_buffer_stack_top
)++;
2088 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2090 /* copied from yy_switch_to_buffer. */
2091 yy_load_buffer_state( );
2092 (yy_did_buffer_switch_on_eof
) = 1;
2095 /** Removes and deletes the top of the stack, if present.
2096 * The next element becomes the new top.
2099 void yypop_buffer_state (void)
2101 if (!YY_CURRENT_BUFFER
)
2104 yy_delete_buffer(YY_CURRENT_BUFFER
);
2105 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2106 if ((yy_buffer_stack_top
) > 0)
2107 --(yy_buffer_stack_top
);
2109 if (YY_CURRENT_BUFFER
) {
2110 yy_load_buffer_state( );
2111 (yy_did_buffer_switch_on_eof
) = 1;
2115 /* Allocates the stack if it does not exist.
2116 * Guarantees space for at least one push.
2118 static void yyensure_buffer_stack (void)
2120 yy_size_t num_to_alloc
;
2122 if (!(yy_buffer_stack
)) {
2124 /* First allocation is just for 2 elements, since we don't know if this
2125 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2126 * immediate realloc on the next call.
2129 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyalloc
2130 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
2132 if ( ! (yy_buffer_stack
) )
2133 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2135 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
2137 (yy_buffer_stack_max
) = num_to_alloc
;
2138 (yy_buffer_stack_top
) = 0;
2142 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
2144 /* Increase the buffer to prepare for a possible push. */
2145 int grow_size
= 8 /* arbitrary grow size */;
2147 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
2148 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyrealloc
2150 num_to_alloc
* sizeof(struct yy_buffer_state
*)
2152 if ( ! (yy_buffer_stack
) )
2153 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2155 /* zero only the new slots.*/
2156 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
2157 (yy_buffer_stack_max
) = num_to_alloc
;
2161 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2162 * @param base the character buffer
2163 * @param size the size in bytes of the character buffer
2165 * @return the newly allocated buffer state object.
2167 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
)
2172 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
2173 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
2174 /* They forgot to leave room for the EOB's. */
2177 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
2179 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2181 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
2182 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
2183 b
->yy_is_our_buffer
= 0;
2184 b
->yy_input_file
= 0;
2185 b
->yy_n_chars
= b
->yy_buf_size
;
2186 b
->yy_is_interactive
= 0;
2188 b
->yy_fill_buffer
= 0;
2189 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2191 yy_switch_to_buffer(b
);
2196 /** Setup the input buffer state to scan a string. The next call to yylex() will
2197 * scan from a @e copy of @a str.
2198 * @param yystr a NUL-terminated string to scan
2200 * @return the newly allocated buffer state object.
2201 * @note If you want to scan bytes that may contain NUL values, then use
2202 * yy_scan_bytes() instead.
2204 YY_BUFFER_STATE
yy_scan_string (yyconst
char * yystr
)
2207 return yy_scan_bytes(yystr
,strlen(yystr
) );
2210 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2211 * scan from a @e copy of @a bytes.
2212 * @param yybytes the byte buffer to scan
2213 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2215 * @return the newly allocated buffer state object.
2217 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char * yybytes
, yy_size_t _yybytes_len
)
2224 /* Get memory for full buffer, including space for trailing EOB's. */
2225 n
= _yybytes_len
+ 2;
2226 buf
= (char *) yyalloc(n
);
2228 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2230 for ( i
= 0; i
< _yybytes_len
; ++i
)
2231 buf
[i
] = yybytes
[i
];
2233 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
2235 b
= yy_scan_buffer(buf
,n
);
2237 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2239 /* It's okay to grow etc. this buffer, and we should throw it
2240 * away when we're done.
2242 b
->yy_is_our_buffer
= 1;
2247 #ifndef YY_EXIT_FAILURE
2248 #define YY_EXIT_FAILURE 2
2251 static void yy_fatal_error (yyconst
char* msg
)
2253 (void) fprintf( stderr
, "%s\n", msg
);
2254 exit( YY_EXIT_FAILURE
);
2257 /* Redefine yyless() so it works in section 3 code. */
2263 /* Undo effects of setting up yytext. */ \
2264 int yyless_macro_arg = (n); \
2265 YY_LESS_LINENO(yyless_macro_arg);\
2266 yytext[yyleng] = (yy_hold_char); \
2267 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2268 (yy_hold_char) = *(yy_c_buf_p); \
2269 *(yy_c_buf_p) = '\0'; \
2270 yyleng = yyless_macro_arg; \
2274 /* Accessor methods (get/set functions) to struct members. */
2276 /** Get the current line number.
2279 int yyget_lineno (void)
2285 /** Get the input stream.
2288 FILE *yyget_in (void)
2293 /** Get the output stream.
2296 FILE *yyget_out (void)
2301 /** Get the length of the current token.
2304 yy_size_t
yyget_leng (void)
2309 /** Get the current token.
2313 char *yyget_text (void)
2318 /** Set the current line number.
2319 * @param line_number
2322 void yyset_lineno (int line_number
)
2325 yylineno
= line_number
;
2328 /** Set the input stream. This does not discard the current
2330 * @param in_str A readable stream.
2332 * @see yy_switch_to_buffer
2334 void yyset_in (FILE * in_str
)
2339 void yyset_out (FILE * out_str
)
2344 int yyget_debug (void)
2346 return yy_flex_debug
;
2349 void yyset_debug (int bdebug
)
2351 yy_flex_debug
= bdebug
;
2354 static int yy_init_globals (void)
2356 /* Initialization is the same as for the non-reentrant scanner.
2357 * This function is called from yylex_destroy(), so don't allocate here.
2360 /* We do not touch yylineno unless the option is enabled. */
2363 (yy_buffer_stack
) = 0;
2364 (yy_buffer_stack_top
) = 0;
2365 (yy_buffer_stack_max
) = 0;
2366 (yy_c_buf_p
) = (char *) 0;
2370 /* Defined in main.c */
2379 /* For future reference: Set errno on error, since we are called by
2385 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2386 int yylex_destroy (void)
2389 /* Pop the buffer stack, destroying each element. */
2390 while(YY_CURRENT_BUFFER
){
2391 yy_delete_buffer(YY_CURRENT_BUFFER
);
2392 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2393 yypop_buffer_state();
2396 /* Destroy the stack itself. */
2397 yyfree((yy_buffer_stack
) );
2398 (yy_buffer_stack
) = NULL
;
2400 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2401 * yylex() is called, initialization will occur. */
2408 * Internal utility routines.
2412 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
2415 for ( i
= 0; i
< n
; ++i
)
2420 #ifdef YY_NEED_STRLEN
2421 static int yy_flex_strlen (yyconst
char * s
)
2424 for ( n
= 0; s
[n
]; ++n
)
2431 void *yyalloc (yy_size_t size
)
2433 return (void *) malloc( size
);
2436 void *yyrealloc (void * ptr
, yy_size_t size
)
2438 /* The cast to (char *) in the following accommodates both
2439 * implementations that use char* generic pointers, and those
2440 * that use void* generic pointers. It works with the latter
2441 * because both ANSI C and C++ allow castless assignment from
2442 * any pointer type to void*, and deal with argument conversions
2443 * as though doing an assignment.
2445 return (void *) realloc( (char *) ptr
, size
);
2448 void yyfree (void * ptr
)
2450 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
2453 #define YYTABLES_NAME "yytables"
2455 #line 230 "web2c-lexer.l"
2458 /* Some helper routines. Defining these here means we don't have references
2459 to yytext outside of this file. Which means we can omit one of the more
2460 troublesome autoconf tests. */
2462 get_string_literal (char *s
)
2467 for (i
=1; yytext
[i
-1] != 0; i
++) {
2468 if (yytext
[i
] == '\\' || yytext
[i
] == '"')
2470 else if (yytext
[i
] == '\'')
2479 get_single_char (char *s
)
2482 if (yytext
[1] == '\\' || yytext
[1] == '\'') {
2495 get_result_type (char *s
)
2501 /* Since a syntax error can never be recovered from, we exit here with
2505 yyerror (const_string s
)
2507 /* This is so the convert script can delete the output file on error. */
2511 fprintf (stderr
, ": Last token = %d (%c), ", last_tok
, last_tok
);
2512 fprintf (stderr
, "error buffer = `%s',\n\t", yytext
);
2513 fprintf (stderr
, "last id = `%s' (", last_id
);
2514 ii
= search_table (last_id
);
2516 fputs ("not in symbol table", stderr
);
2518 switch (sym_table
[ii
].typ
)
2521 fputs ("undefined", stderr
);
2524 fputs ("variable", stderr
);
2527 fputs ("constant", stderr
);
2530 fputs ("type", stderr
);
2533 fputs ("parameterless procedure", stderr
);
2535 case proc_param_tok
:
2536 fputs ("procedure with parameters", stderr
);
2539 fputs ("parameterless function", stderr
);
2542 fputs ("function with parameters", stderr
);
2545 fputs ("unknown!", stderr
);
2548 fputs (").\n", stderr
);
2551 /* Avoid silly warnings. */