5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 31
13 #if YY_FLEX_SUBMINOR_VERSION > 0
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
25 /* end standard C headers. */
27 /* flex integer type definitions */
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
36 typedef int8_t flex_int8_t;
37 typedef uint8_t flex_uint8_t;
38 typedef int16_t flex_int16_t;
39 typedef uint16_t flex_uint16_t;
40 typedef int32_t flex_int32_t;
41 typedef uint32_t flex_uint32_t;
43 typedef signed char flex_int8_t;
44 typedef short int flex_int16_t;
45 typedef int flex_int32_t;
46 typedef unsigned char flex_uint8_t;
47 typedef unsigned short int flex_uint16_t;
48 typedef unsigned int flex_uint32_t;
51 /* Limits of integral types. */
53 #define INT8_MIN (-128)
56 #define INT16_MIN (-32767-1)
59 #define INT32_MIN (-2147483647-1)
62 #define INT8_MAX (127)
65 #define INT16_MAX (32767)
68 #define INT32_MAX (2147483647)
71 #define UINT8_MAX (255U)
74 #define UINT16_MAX (65535U)
77 #define UINT32_MAX (4294967295U)
80 #endif /* ! FLEXINT_H */
84 /* The "const" storage-class-modifier is valid. */
87 #else /* ! __cplusplus */
94 #endif /* ! __cplusplus */
102 /* Returned upon end-of-file. */
105 /* Promotes a possibly negative, possibly signed char to an unsigned
106 * integer for use as an array index. If the signed char is negative,
107 * we want to instead treat it as an 8-bit unsigned char, hence the
110 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
112 /* Enter a start condition. This macro really ought to take a parameter,
113 * but we do it the disgusting crufty way forced on us by the ()-less
114 * definition of BEGIN.
116 #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
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
125 /* Action number for EOF rule of a given start state. */
126 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
128 /* Special action meaning "start processing a new file". */
129 #define YY_NEW_FILE yyrestart(yyin )
131 #define YY_END_OF_BUFFER_CHAR 0
133 /* Size of default input buffer. */
135 #define YY_BUF_SIZE 16384
138 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
139 #define YY_TYPEDEF_YY_BUFFER_STATE
140 typedef struct yy_buffer_state *YY_BUFFER_STATE;
145 extern FILE *yyin, *yyout;
147 #define EOB_ACT_CONTINUE_SCAN 0
148 #define EOB_ACT_END_OF_FILE 1
149 #define EOB_ACT_LAST_MATCH 2
151 #define YY_LESS_LINENO(n)
153 /* Return all but the first "n" matched characters back to the input stream. */
157 /* Undo effects of setting up yytext. */ \
158 int yyless_macro_arg = (n); \
159 YY_LESS_LINENO(yyless_macro_arg);\
160 *yy_cp = (yy_hold_char); \
161 YY_RESTORE_YY_MORE_OFFSET \
162 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
163 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
167 #define unput(c) yyunput( c, (yytext_ptr) )
169 /* The following is because we cannot portably get our hands on size_t
170 * (without autoconf's help, which isn't available because we want
171 * flex-generated scanners to compile on their own).
174 #ifndef YY_TYPEDEF_YY_SIZE_T
175 #define YY_TYPEDEF_YY_SIZE_T
176 typedef unsigned int yy_size_t;
179 #ifndef YY_STRUCT_YY_BUFFER_STATE
180 #define YY_STRUCT_YY_BUFFER_STATE
181 struct yy_buffer_state
185 char *yy_ch_buf; /* input buffer */
186 char *yy_buf_pos; /* current position in input buffer */
188 /* Size of input buffer in bytes, not including room for EOB
191 yy_size_t yy_buf_size;
193 /* Number of characters read into yy_ch_buf, not including EOB
198 /* Whether we "own" the buffer - i.e., we know we created it,
199 * and can realloc() it to grow it, and should free() it to
202 int yy_is_our_buffer;
204 /* Whether this is an "interactive" input source; if so, and
205 * if we're using stdio for input, then we want to use getc()
206 * instead of fread(), to make sure we stop fetching input after
209 int yy_is_interactive;
211 /* Whether we're considered to be at the beginning of a line.
212 * If so, '^' rules will be active on the next match, otherwise
217 int yy_bs_lineno; /**< The line count. */
218 int yy_bs_column; /**< The column count. */
220 /* Whether to try to fill the input buffer when we reach the
225 int yy_buffer_status;
227 #define YY_BUFFER_NEW 0
228 #define YY_BUFFER_NORMAL 1
229 /* When an EOF's been seen but there's still some text to process
230 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
231 * shouldn't try reading from the input source any more. We might
232 * still have a bunch of tokens to match, though, because of
233 * possible backing-up.
235 * When we actually see the EOF, we change the status to "new"
236 * (via yyrestart()), so that the user can continue scanning by
237 * just pointing yyin at a new input file.
239 #define YY_BUFFER_EOF_PENDING 2
242 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
244 /* Stack of input buffers. */
245 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
246 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
247 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
249 /* We provide macros for accessing buffer states in case in the
250 * future we want to put the buffer states in a more general
253 * Returns the top of the stack, or NULL.
255 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
256 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
259 /* Same as previous macro, but useful when we know that the buffer stack is not
260 * NULL or when we need an lvalue. For internal use only.
262 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
264 /* yy_hold_char holds the character lost when yytext is formed. */
265 static char yy_hold_char;
266 static int yy_n_chars; /* number of characters read into yy_ch_buf */
269 /* Points to current character in buffer. */
270 static char *yy_c_buf_p = (char *) 0;
271 static int yy_init = 1; /* whether we need to initialize */
272 static int yy_start = 0; /* start state number */
274 /* Flag which is used to allow yywrap()'s to do buffer switches
275 * instead of setting up a fresh yyin. A bit of a hack ...
277 static int yy_did_buffer_switch_on_eof;
279 void yyrestart (FILE *input_file );
280 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
281 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
282 void yy_delete_buffer (YY_BUFFER_STATE b );
283 void yy_flush_buffer (YY_BUFFER_STATE b );
284 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
285 void yypop_buffer_state (void );
287 static void yyensure_buffer_stack (void );
288 static void yy_load_buffer_state (void );
289 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
291 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
293 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
294 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
295 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
297 void *yyalloc (yy_size_t );
298 void *yyrealloc (void *,yy_size_t );
299 void yyfree (void * );
301 #define yy_new_buffer yy_create_buffer
303 #define yy_set_interactive(is_interactive) \
305 if ( ! YY_CURRENT_BUFFER ){ \
306 yyensure_buffer_stack (); \
307 YY_CURRENT_BUFFER_LVALUE = \
308 yy_create_buffer(yyin,YY_BUF_SIZE ); \
310 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
313 #define yy_set_bol(at_bol) \
315 if ( ! YY_CURRENT_BUFFER ){\
316 yyensure_buffer_stack (); \
317 YY_CURRENT_BUFFER_LVALUE = \
318 yy_create_buffer(yyin,YY_BUF_SIZE ); \
320 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
323 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
325 /* Begin user sect3 */
328 #define YY_SKIP_YYWRAP
330 typedef unsigned char YY_CHAR;
332 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
334 typedef int yy_state_type;
341 #define yytext_ptr yytext
343 static yy_state_type yy_get_previous_state (void );
344 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
345 static int yy_get_next_buffer (void );
346 static void yy_fatal_error (yyconst char msg[] );
348 /* Done after the current pattern has been matched and before the
349 * corresponding action - sets up yytext.
351 #define YY_DO_BEFORE_ACTION \
352 (yytext_ptr) = yy_bp; \
353 yyleng = (size_t) (yy_cp - yy_bp); \
354 (yy_hold_char) = *yy_cp; \
356 (yy_c_buf_p) = yy_cp;
358 #define YY_NUM_RULES 49
359 #define YY_END_OF_BUFFER 50
360 /* This struct is not used in this scanner,
361 but its presence is necessary. */
364 flex_int32_t yy_verify;
367 static yyconst flex_int16_t yy_accept[501] =
369 0, 0, 50, 48, 47, 46, 48, 48, 48, 10,
370 10, 48, 4, 48, 48, 48, 48, 48, 48, 48,
371 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
372 2, 3, 46, 0, 5, 0, 1, 0, 10, 0,
373 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
375 0, 0, 0, 11, 0, 0, 0, 0, 7, 10,
376 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
377 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
378 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
380 0, 0, 7, 10, 0, 0, 0, 9, 0, 0,
381 0, 0, 15, 16, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383 0, 0, 0, 0, 0, 0, 0, 0, 10, 0,
384 0, 0, 7, 0, 10, 0, 0, 9, 9, 0,
385 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
387 0, 0, 21, 0, 0, 0, 0, 0, 0, 0,
388 0, 0, 0, 7, 0, 0, 0, 9, 9, 9,
389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
391 0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
392 0, 0, 0, 0, 0, 0, 0, 0, 12, 0,
393 8, 0, 0, 0, 9, 9, 0, 9, 9, 0,
394 0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
395 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
396 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,
397 0, 0, 9, 9, 9, 9, 9, 0, 0, 0,
398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
399 0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
400 23, 0, 0, 0, 8, 0, 0, 9, 9, 0,
402 9, 9, 0, 9, 9, 0, 0, 0, 0, 0,
403 0, 0, 0, 0, 0, 20, 0, 0, 0, 14,
404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
405 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
406 9, 22, 13, 0, 0, 0, 0, 0, 0, 29,
407 0, 0, 0, 25, 17, 0, 0, 0, 40, 0,
408 0, 0, 0, 0, 0, 9, 9, 0, 9, 9,
409 0, 9, 9, 0, 9, 9, 0, 0, 0, 44,
410 0, 27, 28, 0, 35, 0, 42, 0, 32, 0,
411 0, 0, 24, 0, 0, 0, 9, 9, 9, 9,
413 9, 9, 9, 9, 9, 0, 0, 0, 34, 0,
414 0, 31, 0, 0, 0, 0, 9, 9, 0, 9,
415 9, 0, 9, 9, 0, 9, 9, 0, 9, 9,
416 0, 38, 0, 0, 0, 0, 0, 0, 26, 0,
417 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
418 9, 9, 9, 0, 0, 0, 0, 0, 41, 0,
419 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
420 9, 9, 0, 45, 0, 0, 43, 0, 9, 9,
421 9, 9, 9, 9, 9, 0, 0, 36, 9, 9,
422 9, 9, 9, 9, 9, 39, 0, 9, 37, 0
426 static yyconst flex_int32_t yy_ec[256] =
428 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
429 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 5, 1, 6, 7, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 8, 9, 1, 10, 11, 11,
433 11, 12, 11, 13, 11, 11, 11, 14, 15, 1,
434 1, 1, 1, 1, 16, 17, 18, 19, 20, 20,
435 21, 22, 23, 1, 1, 24, 25, 26, 1, 27,
436 1, 28, 29, 30, 31, 32, 33, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 34, 35, 36, 37,
439 38, 39, 40, 41, 42, 1, 1, 43, 44, 45,
440 46, 47, 1, 48, 49, 50, 51, 52, 53, 54,
441 55, 1, 56, 1, 57, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 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,
458 static yyconst flex_int32_t yy_meta[58] =
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
461 2, 2, 2, 3, 1, 2, 2, 2, 2, 2,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 2, 2, 2, 2, 2, 2, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 static yyconst flex_int16_t yy_base[615] =
470 0, 0, 803, 804, 804, 804, 799, 795, 797, 49,
471 745, 784, 804, 61, 754, 37, 44, 51, 750, 34,
472 48, 757, 56, 745, 751, 50, 749, 745, 70, 752,
473 804, 804, 804, 783, 804, 785, 804, 95, 111, 773,
474 123, 103, 804, 743, 750, 741, 749, 733, 752, 730,
475 131, 745, 741, 729, 52, 733, 725, 86, 725, 735,
476 729, 721, 724, 804, 766, 718, 103, 718, 144, 159,
477 149, 752, 0, 164, 719, 713, 720, 176, 712, 723,
478 722, 742, 101, 720, 739, 719, 142, 737, 720, 719,
479 709, 700, 705, 711, 714, 715, 724, 702, 698, 708,
481 704, 190, 200, 205, 727, 726, 725, 724, 194, 684,
482 696, 689, 804, 804, 689, 699, 156, 682, 683, 682,
483 692, 677, 679, 680, 698, 679, 689, 676, 677, 672,
484 671, 671, 667, 679, 672, 680, 658, 670, 804, 677,
485 702, 211, 216, 220, 225, 695, 694, 0, 693, 0,
486 205, 680, 681, 222, 654, 660, 666, 660, 649, 660,
487 652, 660, 653, 646, 649, 650, 642, 648, 638, 651,
488 654, 653, 804, 648, 634, 642, 640, 633, 636, 637,
489 636, 236, 246, 240, 664, 663, 662, 661, 660, 659,
490 626, 633, 625, 635, 630, 625, 632, 617, 617, 629,
492 628, 613, 610, 617, 613, 606, 618, 613, 616, 804,
493 609, 602, 603, 605, 612, 597, 597, 606, 804, 599,
494 250, 635, 629, 628, 0, 627, 0, 626, 625, 0,
495 615, 585, 586, 592, 586, 596, 589, 73, 804, 595,
496 593, 599, 586, 581, 588, 585, 576, 586, 574, 804,
497 583, 568, 582, 576, 579, 578, 570, 578, 254, 599,
498 598, 597, 596, 595, 594, 593, 592, 560, 566, 565,
499 560, 549, 558, 557, 556, 551, 558, 559, 539, 557,
500 547, 555, 548, 537, 546, 553, 804, 552, 551, 534,
501 804, 535, 544, 547, 804, 566, 565, 0, 564, 0,
503 563, 562, 0, 561, 560, 0, 523, 529, 523, 533,
504 535, 518, 522, 526, 512, 804, 530, 516, 528, 804,
505 511, 515, 525, 508, 517, 513, 510, 499, 515, 503,
506 508, 536, 535, 534, 533, 532, 531, 530, 529, 528,
507 527, 804, 804, 488, 497, 495, 482, 496, 494, 804,
508 485, 495, 483, 804, 804, 488, 475, 491, 804, 492,
509 497, 477, 476, 510, 509, 0, 508, 0, 507, 506,
510 0, 505, 504, 0, 503, 502, 0, 481, 464, 804,
511 483, 804, 804, 462, 804, 461, 804, 480, 804, 454,
512 466, 465, 804, 492, 491, 490, 489, 488, 487, 486,
514 485, 484, 483, 482, 481, 451, 438, 450, 804, 247,
515 449, 804, 446, 440, 474, 473, 0, 472, 0, 471,
516 470, 0, 469, 468, 0, 467, 466, 0, 465, 464,
517 0, 804, 447, 432, 432, 432, 429, 434, 804, 457,
518 456, 455, 0, 454, 0, 453, 0, 452, 0, 451,
519 0, 450, 0, 421, 424, 415, 410, 421, 804, 444,
520 0, 0, 443, 0, 442, 0, 441, 0, 440, 0,
521 439, 0, 408, 804, 416, 412, 804, 435, 0, 0,
522 0, 0, 0, 0, 0, 410, 413, 804, 0, 804,
523 804, 804, 804, 804, 804, 804, 403, 804, 804, 804,
525 276, 279, 281, 283, 443, 285, 287, 289, 291, 293,
526 442, 295, 441, 297, 299, 301, 303, 305, 307, 309,
527 440, 311, 439, 313, 438, 315, 317, 319, 321, 323,
528 325, 327, 329, 331, 437, 333, 436, 335, 435, 337,
529 434, 339, 341, 343, 345, 347, 349, 351, 353, 355,
530 357, 359, 433, 361, 432, 363, 431, 365, 430, 367,
531 429, 369, 371, 373, 375, 377, 379, 381, 383, 385,
532 387, 389, 391, 393, 428, 395, 427, 397, 426, 399,
533 425, 401, 424, 403, 423, 405, 407, 422, 409, 421,
534 411, 273, 413, 272, 415, 271, 417, 270, 419, 269,
536 268, 267, 190, 189, 188, 185, 164, 162, 149, 114,
540 static yyconst flex_int16_t yy_def[615] =
542 500, 1, 500, 500, 500, 500, 500, 501, 502, 500,
543 10, 500, 500, 10, 14, 14, 500, 500, 500, 500,
544 500, 500, 500, 500, 500, 14, 500, 500, 500, 500,
545 500, 500, 500, 501, 500, 502, 500, 500, 500, 503,
546 39, 500, 500, 500, 41, 500, 500, 500, 500, 500,
547 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
548 500, 500, 500, 500, 502, 500, 500, 500, 500, 500,
549 70, 504, 505, 500, 500, 71, 500, 500, 500, 500,
550 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
551 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
553 500, 500, 500, 500, 500, 506, 507, 508, 500, 500,
554 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
555 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
556 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
557 500, 500, 500, 500, 500, 509, 510, 511, 512, 513,
558 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
559 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
560 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
561 500, 500, 500, 500, 500, 514, 515, 516, 517, 518,
562 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
564 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
565 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
566 500, 500, 519, 520, 521, 522, 523, 500, 524, 525,
567 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
568 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
569 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
570 526, 527, 528, 529, 530, 531, 532, 500, 500, 500,
571 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
572 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
573 500, 500, 500, 500, 500, 533, 534, 535, 536, 537,
575 500, 538, 539, 500, 540, 541, 500, 500, 500, 500,
576 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
577 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
578 500, 500, 542, 543, 544, 545, 546, 547, 548, 549,
579 550, 500, 500, 500, 500, 500, 500, 500, 500, 500,
580 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
581 500, 500, 500, 551, 552, 553, 554, 555, 500, 556,
582 557, 500, 558, 559, 500, 560, 561, 500, 500, 500,
583 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
584 500, 500, 500, 500, 562, 563, 564, 565, 566, 567,
586 568, 569, 570, 571, 572, 500, 500, 500, 500, 500,
587 500, 500, 500, 500, 573, 574, 575, 576, 577, 500,
588 578, 579, 500, 580, 581, 500, 582, 583, 500, 584,
589 585, 500, 500, 500, 500, 500, 500, 500, 500, 500,
590 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
591 596, 597, 598, 500, 500, 500, 500, 500, 500, 599,
592 600, 601, 500, 602, 500, 603, 500, 604, 500, 605,
593 500, 606, 500, 500, 500, 500, 500, 500, 607, 608,
594 609, 610, 611, 612, 613, 500, 500, 500, 614, 500,
595 500, 500, 500, 500, 500, 500, 500, 500, 500, 0,
597 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
598 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
599 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
600 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
601 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
602 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
603 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
604 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
605 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
606 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
608 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
612 static yyconst flex_int16_t yy_nxt[862] =
614 4, 5, 6, 7, 5, 8, 9, 4, 4, 10,
615 11, 11, 11, 12, 13, 14, 15, 15, 16, 15,
616 4, 17, 18, 19, 20, 4, 21, 4, 22, 23,
617 24, 4, 25, 26, 15, 15, 15, 15, 15, 27,
618 4, 4, 4, 4, 28, 4, 4, 4, 29, 4,
619 4, 4, 4, 4, 30, 31, 32, 38, 39, 39,
620 39, 39, 40, 498, 41, 41, 41, 41, 41, 500,
621 41, 41, 41, 41, 45, 53, 65, 89, 90, 500,
622 54, 46, 41, 41, 41, 41, 41, 41, 47, 49,
623 55, 58, 500, 56, 275, 50, 276, 51, 48, 495,
625 62, 59, 42, 44, 69, 69, 69, 69, 93, 65,
626 494, 66, 493, 94, 500, 492, 121, 95, 67, 38,
627 70, 70, 70, 70, 40, 122, 71, 71, 71, 71,
628 71, 500, 71, 71, 71, 71, 74, 74, 74, 74,
629 74, 74, 82, 83, 71, 71, 71, 71, 71, 71,
630 491, 67, 102, 103, 103, 103, 103, 500, 105, 105,
631 105, 105, 84, 490, 126, 489, 85, 38, 104, 104,
632 104, 104, 40, 127, 105, 105, 105, 105, 105, 109,
633 109, 109, 109, 109, 157, 158, 485, 113, 114, 484,
634 483, 482, 105, 105, 105, 105, 105, 105, 115, 142,
636 142, 142, 142, 151, 151, 151, 151, 116, 102, 143,
637 143, 143, 143, 144, 145, 145, 145, 145, 40, 182,
638 183, 183, 183, 183, 102, 184, 184, 184, 184, 184,
639 184, 184, 184, 144, 145, 145, 145, 145, 74, 74,
640 74, 74, 74, 74, 193, 221, 221, 221, 221, 184,
641 184, 184, 184, 194, 182, 222, 222, 222, 222, 259,
642 259, 259, 259, 295, 295, 295, 295, 435, 481, 480,
643 479, 472, 470, 468, 466, 436, 34, 34, 34, 36,
644 36, 36, 72, 72, 106, 106, 146, 146, 147, 147,
645 149, 149, 185, 185, 186, 186, 189, 189, 223, 223,
647 224, 224, 226, 226, 228, 228, 229, 229, 260, 260,
648 261, 261, 264, 264, 266, 266, 296, 296, 297, 297,
649 299, 299, 301, 301, 302, 302, 304, 304, 305, 305,
650 332, 332, 333, 333, 336, 336, 338, 338, 340, 340,
651 364, 364, 365, 365, 367, 367, 369, 369, 370, 370,
652 372, 372, 373, 373, 375, 375, 376, 376, 394, 394,
653 395, 395, 398, 398, 400, 400, 402, 402, 404, 404,
654 415, 415, 416, 416, 418, 418, 420, 420, 421, 421,
655 423, 423, 424, 424, 426, 426, 427, 427, 429, 429,
656 430, 430, 440, 440, 441, 441, 444, 444, 446, 446,
658 448, 448, 450, 450, 452, 452, 460, 460, 461, 461,
659 463, 463, 465, 465, 467, 467, 469, 469, 471, 471,
660 478, 478, 464, 462, 453, 451, 449, 447, 445, 443,
661 405, 403, 401, 399, 397, 341, 339, 337, 335, 267,
662 265, 263, 190, 188, 108, 499, 497, 496, 442, 488,
663 487, 486, 431, 428, 425, 422, 419, 442, 477, 476,
664 475, 474, 473, 431, 428, 425, 422, 419, 43, 442,
665 396, 459, 458, 457, 456, 455, 454, 431, 377, 428,
666 374, 425, 371, 422, 368, 419, 442, 396, 439, 438,
667 437, 434, 433, 432, 431, 377, 428, 374, 425, 371,
669 422, 368, 419, 417, 396, 334, 414, 413, 412, 411,
670 410, 409, 408, 407, 406, 377, 306, 374, 303, 371,
671 300, 368, 396, 334, 393, 392, 391, 390, 389, 388,
672 387, 386, 385, 384, 383, 382, 381, 380, 379, 378,
673 377, 306, 374, 303, 371, 300, 368, 366, 334, 262,
674 219, 363, 362, 361, 360, 359, 358, 357, 356, 355,
675 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
676 344, 343, 342, 306, 230, 303, 227, 300, 334, 262,
677 331, 330, 329, 328, 327, 326, 325, 324, 323, 322,
678 321, 320, 319, 318, 317, 316, 315, 314, 313, 312,
680 311, 310, 309, 308, 307, 306, 230, 303, 227, 300,
681 298, 262, 187, 294, 293, 292, 291, 290, 289, 288,
682 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
683 277, 274, 273, 272, 271, 270, 269, 268, 230, 150,
684 227, 262, 187, 182, 258, 257, 256, 255, 254, 253,
685 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
686 242, 241, 240, 239, 238, 237, 236, 235, 234, 233,
687 232, 231, 230, 150, 227, 225, 187, 107, 220, 219,
688 218, 217, 216, 215, 214, 213, 212, 211, 210, 209,
689 208, 207, 206, 205, 204, 203, 202, 201, 200, 199,
691 198, 197, 196, 195, 192, 191, 150, 187, 107, 181,
692 180, 179, 178, 177, 176, 175, 174, 173, 172, 171,
693 170, 169, 168, 167, 166, 165, 164, 163, 162, 161,
694 160, 159, 156, 155, 154, 153, 152, 150, 148, 107,
695 40, 141, 140, 139, 138, 137, 136, 135, 134, 133,
696 132, 131, 130, 129, 128, 125, 124, 123, 120, 119,
697 118, 117, 112, 111, 110, 107, 64, 101, 37, 100,
698 99, 98, 97, 96, 92, 91, 88, 87, 86, 81,
699 80, 79, 78, 77, 76, 75, 73, 37, 35, 68,
700 64, 63, 61, 60, 57, 52, 500, 43, 500, 37,
702 35, 33, 500, 3, 500, 500, 500, 500, 500, 500,
703 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
704 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
705 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
706 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
707 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
711 static yyconst flex_int16_t yy_chk[862] =
713 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
714 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
715 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
716 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
717 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
718 1, 1, 1, 1, 1, 1, 1, 10, 10, 10,
719 10, 10, 10, 614, 10, 10, 10, 10, 10, 14,
720 14, 14, 14, 14, 16, 20, 29, 55, 55, 16,
721 20, 17, 10, 10, 10, 10, 10, 10, 17, 18,
722 21, 23, 26, 21, 238, 18, 238, 18, 17, 613,
724 26, 23, 10, 14, 38, 38, 38, 38, 58, 67,
725 612, 29, 611, 58, 14, 610, 83, 58, 29, 39,
726 39, 39, 39, 39, 39, 83, 39, 39, 39, 39,
727 39, 41, 41, 41, 41, 41, 42, 42, 42, 42,
728 42, 42, 51, 51, 39, 39, 39, 39, 39, 39,
729 609, 67, 69, 69, 69, 69, 69, 71, 71, 71,
730 71, 71, 51, 608, 87, 607, 51, 70, 70, 70,
731 70, 70, 70, 87, 70, 70, 70, 70, 70, 74,
732 74, 74, 74, 74, 117, 117, 606, 78, 78, 605,
733 604, 603, 70, 70, 70, 70, 70, 70, 78, 102,
735 102, 102, 102, 109, 109, 109, 109, 78, 103, 103,
736 103, 103, 103, 104, 104, 104, 104, 104, 104, 142,
737 142, 142, 142, 142, 143, 143, 143, 143, 143, 144,
738 144, 144, 144, 145, 145, 145, 145, 145, 151, 151,
739 151, 151, 151, 151, 154, 182, 182, 182, 182, 184,
740 184, 184, 184, 154, 183, 183, 183, 183, 183, 221,
741 221, 221, 221, 259, 259, 259, 259, 410, 602, 601,
742 600, 598, 596, 594, 592, 410, 501, 501, 501, 502,
743 502, 502, 503, 503, 504, 504, 506, 506, 507, 507,
744 508, 508, 509, 509, 510, 510, 512, 512, 514, 514,
746 515, 515, 516, 516, 517, 517, 518, 518, 519, 519,
747 520, 520, 522, 522, 524, 524, 526, 526, 527, 527,
748 528, 528, 529, 529, 530, 530, 531, 531, 532, 532,
749 533, 533, 534, 534, 536, 536, 538, 538, 540, 540,
750 542, 542, 543, 543, 544, 544, 545, 545, 546, 546,
751 547, 547, 548, 548, 549, 549, 550, 550, 551, 551,
752 552, 552, 554, 554, 556, 556, 558, 558, 560, 560,
753 562, 562, 563, 563, 564, 564, 565, 565, 566, 566,
754 567, 567, 568, 568, 569, 569, 570, 570, 571, 571,
755 572, 572, 573, 573, 574, 574, 576, 576, 578, 578,
757 580, 580, 582, 582, 584, 584, 586, 586, 587, 587,
758 589, 589, 591, 591, 593, 593, 595, 595, 597, 597,
759 599, 599, 590, 588, 585, 583, 581, 579, 577, 575,
760 561, 559, 557, 555, 553, 541, 539, 537, 535, 525,
761 523, 521, 513, 511, 505, 497, 487, 486, 478, 476,
762 475, 473, 471, 469, 467, 465, 463, 460, 458, 457,
763 456, 455, 454, 452, 450, 448, 446, 444, 442, 441,
764 440, 438, 437, 436, 435, 434, 433, 430, 429, 427,
765 426, 424, 423, 421, 420, 418, 416, 415, 414, 413,
766 411, 408, 407, 406, 405, 404, 403, 402, 401, 400,
768 399, 398, 397, 396, 395, 394, 392, 391, 390, 388,
769 386, 384, 381, 379, 378, 376, 375, 373, 372, 370,
770 369, 367, 365, 364, 363, 362, 361, 360, 358, 357,
771 356, 353, 352, 351, 349, 348, 347, 346, 345, 344,
772 341, 340, 339, 338, 337, 336, 335, 334, 333, 332,
773 331, 330, 329, 328, 327, 326, 325, 324, 323, 322,
774 321, 319, 318, 317, 315, 314, 313, 312, 311, 310,
775 309, 308, 307, 305, 304, 302, 301, 299, 297, 296,
776 294, 293, 292, 290, 289, 288, 286, 285, 284, 283,
777 282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
779 272, 271, 270, 269, 268, 267, 266, 265, 264, 263,
780 262, 261, 260, 258, 257, 256, 255, 254, 253, 252,
781 251, 249, 248, 247, 246, 245, 244, 243, 242, 241,
782 240, 237, 236, 235, 234, 233, 232, 231, 229, 228,
783 226, 224, 223, 222, 220, 218, 217, 216, 215, 214,
784 213, 212, 211, 209, 208, 207, 206, 205, 204, 203,
785 202, 201, 200, 199, 198, 197, 196, 195, 194, 193,
786 192, 191, 190, 189, 188, 187, 186, 185, 181, 180,
787 179, 178, 177, 176, 175, 174, 172, 171, 170, 169,
788 168, 167, 166, 165, 164, 163, 162, 161, 160, 159,
790 158, 157, 156, 155, 153, 152, 149, 147, 146, 141,
791 140, 138, 137, 136, 135, 134, 133, 132, 131, 130,
792 129, 128, 127, 126, 125, 124, 123, 122, 121, 120,
793 119, 118, 116, 115, 112, 111, 110, 108, 107, 106,
794 105, 101, 100, 99, 98, 97, 96, 95, 94, 93,
795 92, 91, 90, 89, 88, 86, 85, 84, 82, 81,
796 80, 79, 77, 76, 75, 72, 68, 66, 65, 63,
797 62, 61, 60, 59, 57, 56, 54, 53, 52, 50,
798 49, 48, 47, 46, 45, 44, 40, 36, 34, 30,
799 28, 27, 25, 24, 22, 19, 15, 12, 11, 9,
801 8, 7, 3, 500, 500, 500, 500, 500, 500, 500,
802 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
803 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
804 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
805 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
806 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
810 static yy_state_type yy_last_accepting_state;
811 static char *yy_last_accepting_cpos;
813 extern int yy_flex_debug;
814 int yy_flex_debug = 0;
816 /* The intent behind this definition is that it'll catch
817 * any uses of REJECT which flex missed.
819 #define REJECT reject_used_but_not_detected
820 #define yymore() yymore_used_but_not_detected
821 #define YY_MORE_ADJ 0
822 #define YY_RESTORE_YY_MORE_OFFSET
828 * OLSR ad-hoc routing table management protocol config parser
829 * Copyright (C) 2004 Andreas Tønnesen (andreto@olsr.org)
831 * This file is part of the olsr.org OLSR daemon.
833 * olsr.org is free software; you can redistribute it and/or modify
834 * it under the terms of the GNU General Public License as published by
835 * the Free Software Foundation; either version 2 of the License, or
836 * (at your option) any later version.
838 * olsr.org is distributed in the hope that it will be useful,
839 * but WITHOUT ANY WARRANTY; without even the implied warranty of
840 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
841 * GNU General Public License for more details.
843 * You should have received a copy of the GNU General Public License
844 * along with olsr.org; if not, write to the Free Software
845 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
848 * $Id: oscan.c,v 1.5 2004/10/18 13:13:38 kattemat Exp $
853 #define YYSTYPE struct conf_token *
857 #include <sys/types.h>
858 #include <sys/socket.h>
859 #include <arpa/inet.h>
861 #include "olsrd_conf.h"
866 int yyget_lineno(void);
867 FILE * yyget_in(void);
868 FILE* yyget_out(void);
869 int yyget_leng(void);
870 char *yyget_text(void);
871 void yyset_lineno(int);
872 void yyset_in(FILE *);
873 void yyset_out(FILE *);
874 int yyget_debug(void);
875 void yyset_debug(int);
876 int yylex_destroy(void);
879 get_conf_token(void);
884 struct conf_token *t = malloc(sizeof(struct conf_token));
888 fprintf(stderr, "Cannot allocate %d bytes for an configuration token.\n",
889 sizeof (struct conf_token));
893 memset(t, 0, sizeof(struct conf_token));
904 #ifndef YY_NO_UNISTD_H
905 /* Special case for "unistd.h", since it is non-ANSI. We include it way
906 * down here because we want the user's section 1 to have been scanned first.
907 * The user has a chance to override it with an option.
912 #ifndef YY_EXTRA_TYPE
913 #define YY_EXTRA_TYPE void *
916 /* Macros after this point can all be overridden by user definitions in
920 #ifndef YY_SKIP_YYWRAP
922 extern "C" int yywrap (void );
924 extern int yywrap (void );
928 static void yyunput (int c,char *buf_ptr );
931 static void yy_flex_strncpy (char *,yyconst char *,int );
934 #ifdef YY_NEED_STRLEN
935 static int yy_flex_strlen (yyconst char * );
941 static int yyinput (void );
943 static int input (void );
948 /* Amount of stuff to slurp up with each read. */
949 #ifndef YY_READ_BUF_SIZE
950 #define YY_READ_BUF_SIZE 8192
953 /* Copy whatever the last rule matched to the standard output. */
955 /* This used to be an fputs(), but since the string might contain NUL's,
956 * we now use fwrite().
958 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
961 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
962 * is returned in "result".
965 #define YY_INPUT(buf,result,max_size) \
966 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
970 for ( n = 0; n < max_size && \
971 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
974 buf[n++] = (char) c; \
975 if ( c == EOF && ferror( yyin ) ) \
976 YY_FATAL_ERROR( "input in flex scanner failed" ); \
982 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
984 if( errno != EINTR) \
986 YY_FATAL_ERROR( "input in flex scanner failed" ); \
997 /* No semi-colon after return; correct usage is to write "yyterminate();" -
998 * we don't want an extra ';' after the "return" because that will cause
999 * some compilers to complain about unreachable statements.
1002 #define yyterminate() return YY_NULL
1005 /* Number of entries by which start-condition stack grows. */
1006 #ifndef YY_START_STACK_INCR
1007 #define YY_START_STACK_INCR 25
1010 /* Report a fatal error. */
1011 #ifndef YY_FATAL_ERROR
1012 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1015 /* end tables serialization structures and prototypes */
1017 /* Default declaration of generated scanner - a define so the user can
1018 * easily add parameters.
1021 #define YY_DECL_IS_OURS 1
1023 extern int yylex (void);
1025 #define YY_DECL int yylex (void)
1026 #endif /* !YY_DECL */
1028 /* Code executed at the beginning of each rule, after yytext and yyleng
1031 #ifndef YY_USER_ACTION
1032 #define YY_USER_ACTION
1035 /* Code executed at the end of each rule. */
1037 #define YY_BREAK break;
1040 #define YY_RULE_SETUP \
1043 /** The main scanner function which does all the work.
1047 register yy_state_type yy_current_state;
1048 register char *yy_cp, *yy_bp;
1049 register int yy_act;
1051 #line 101 "oscan.lex"
1054 #line 1055 "oscan.c"
1065 (yy_start) = 1; /* first start state */
1073 if ( ! YY_CURRENT_BUFFER ) {
1074 yyensure_buffer_stack ();
1075 YY_CURRENT_BUFFER_LVALUE =
1076 yy_create_buffer(yyin,YY_BUF_SIZE );
1079 yy_load_buffer_state( );
1082 while ( 1 ) /* loops until end-of-file is reached */
1084 yy_cp = (yy_c_buf_p);
1086 /* Support of yytext. */
1087 *yy_cp = (yy_hold_char);
1089 /* yy_bp points to the position in yy_ch_buf of the start of
1094 yy_current_state = (yy_start);
1098 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1099 if ( yy_accept[yy_current_state] )
1101 (yy_last_accepting_state) = yy_current_state;
1102 (yy_last_accepting_cpos) = yy_cp;
1104 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1106 yy_current_state = (int) yy_def[yy_current_state];
1107 if ( yy_current_state >= 501 )
1108 yy_c = yy_meta[(unsigned int) yy_c];
1110 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1113 while ( yy_base[yy_current_state] != 804 );
1116 yy_act = yy_accept[yy_current_state];
1118 { /* have to back up */
1119 yy_cp = (yy_last_accepting_cpos);
1120 yy_current_state = (yy_last_accepting_state);
1121 yy_act = yy_accept[yy_current_state];
1124 YY_DO_BEFORE_ACTION;
1126 do_action: /* This label is used only to access EOF actions. */
1129 { /* beginning of action switch */
1130 case 0: /* must back up */
1131 /* undo the effects of YY_DO_BEFORE_ACTION */
1132 *yy_cp = (yy_hold_char);
1133 yy_cp = (yy_last_accepting_cpos);
1134 yy_current_state = (yy_last_accepting_state);
1135 goto yy_find_action;
1138 /* rule 1 can match eol */
1140 #line 103 "oscan.lex"
1149 #line 109 "oscan.lex"
1157 #line 114 "oscan.lex"
1165 #line 119 "oscan.lex"
1172 /* rule 5 can match eol */
1174 #line 124 "oscan.lex"
1176 yylval = get_conf_token();
1178 yylval->string = malloc(yyleng - 1);
1180 if (yylval->string == NULL)
1183 "Cannot allocate %d bytes for string token data.\n", yyleng - 1);
1187 strncpy(yylval->string, yytext + 1, yyleng - 2);
1188 yylval->string[yyleng - 2] = 0;
1195 #line 142 "oscan.lex"
1197 yylval = get_conf_token();
1199 yylval->integer = strtol(yytext, NULL, 0);
1206 #line 150 "oscan.lex"
1208 yylval = get_conf_token();
1210 sscanf(yytext, "%f", &yylval->floating);
1216 #line 157 "oscan.lex"
1218 yylval = get_conf_token();
1220 yylval->string = malloc(yyleng + 1);
1222 if (yylval->string == NULL)
1225 "Cannot allocate %d bytes for string token data.\n", yyleng + 1);
1229 strncpy(yylval->string, yytext, yyleng+1);
1231 return TOK_IP4_ADDR;
1236 #line 176 "oscan.lex"
1239 yylval = get_conf_token();
1241 yylval->string = malloc(yyleng+1);
1243 if (yylval->string == NULL)
1246 "Cannot allocate %d bytes for string token data.\n", yyleng + 1);
1250 strncpy(yylval->string, yytext, yyleng+1);
1252 return TOK_IP6_ADDR;
1257 #line 195 "oscan.lex"
1260 yylval = get_conf_token();
1262 if (strncmp(yytext, "auto", 4) == 0)
1264 yylval->boolean = 1;
1268 yylval->boolean = 0;
1269 yylval->integer = atoi(yytext);
1278 #line 214 "oscan.lex"
1280 yylval = get_conf_token();
1282 if (strncmp(yytext, "yes", 3) == 0)
1283 yylval->boolean = 1;
1286 yylval->boolean = 0;
1293 #line 228 "oscan.lex"
1295 yylval = get_conf_token();
1297 if (strncmp(yytext, "site-local", 10) == 0)
1298 yylval->boolean = 1;
1301 yylval->boolean = 0;
1308 #line 241 "oscan.lex"
1311 return TOK_DEBUGLEVEL;
1316 #line 246 "oscan.lex"
1319 return TOK_IPVERSION;
1324 #line 251 "oscan.lex"
1332 #line 256 "oscan.lex"
1340 #line 261 "oscan.lex"
1348 #line 266 "oscan.lex"
1356 #line 271 "oscan.lex"
1364 #line 276 "oscan.lex"
1367 return TOK_INTERFACE;
1372 #line 281 "oscan.lex"
1375 return TOK_IFSETTING;
1380 #line 286 "oscan.lex"
1388 #line 291 "oscan.lex"
1396 #line 296 "oscan.lex"
1399 return TOK_WILLINGNESS;
1404 #line 301 "oscan.lex"
1412 #line 306 "oscan.lex"
1420 #line 311 "oscan.lex"
1423 return TOK_HYSTSCALE;
1428 #line 316 "oscan.lex"
1431 return TOK_HYSTUPPER;
1436 #line 321 "oscan.lex"
1439 return TOK_HYSTLOWER;
1444 #line 326 "oscan.lex"
1447 return TOK_POLLRATE;
1452 #line 332 "oscan.lex"
1455 return TOK_TCREDUNDANCY;
1460 #line 337 "oscan.lex"
1463 return TOK_MPRCOVERAGE;
1468 #line 343 "oscan.lex"
1476 #line 349 "oscan.lex"
1479 return TOK_IP4BROADCAST;
1484 #line 353 "oscan.lex"
1487 return TOK_IP6ADDRTYPE;
1492 #line 357 "oscan.lex"
1495 return TOK_IP6MULTISITE;
1500 #line 361 "oscan.lex"
1503 return TOK_IP6MULTIGLOBAL;
1508 #line 365 "oscan.lex"
1511 return TOK_HELLOINT;
1516 #line 369 "oscan.lex"
1519 return TOK_HELLOVAL;
1524 #line 373 "oscan.lex"
1532 #line 377 "oscan.lex"
1540 #line 381 "oscan.lex"
1548 #line 385 "oscan.lex"
1556 #line 389 "oscan.lex"
1564 #line 393 "oscan.lex"
1571 /* rule 46 can match eol */
1573 #line 400 "oscan.lex"
1580 #line 404 "oscan.lex"
1585 #line 406 "oscan.lex"
1588 //fprintf(stderr, "Failed to parse line %d of configuration file.\n",
1591 //yy_fatal_error("Parsing failed.\n");
1593 /* To avoid compiler warning (stupid...) */
1600 #line 418 "oscan.lex"
1603 #line 1604 "oscan.c"
1604 case YY_STATE_EOF(INITIAL):
1607 case YY_END_OF_BUFFER:
1609 /* Amount of text matched not including the EOB char. */
1610 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1612 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1613 *yy_cp = (yy_hold_char);
1614 YY_RESTORE_YY_MORE_OFFSET
1616 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1618 /* We're scanning a new file or input source. It's
1619 * possible that this happened because the user
1620 * just pointed yyin at a new source and called
1621 * yylex(). If so, then we have to assure
1622 * consistency between YY_CURRENT_BUFFER and our
1623 * globals. Here is the right place to do so, because
1624 * this is the first action (other than possibly a
1625 * back-up) that will match for the new input source.
1627 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1628 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1629 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1632 /* Note that here we test for yy_c_buf_p "<=" to the position
1633 * of the first EOB in the buffer, since yy_c_buf_p will
1634 * already have been incremented past the NUL character
1635 * (since all states make transitions on EOB to the
1636 * end-of-buffer state). Contrast this with the test
1639 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1640 { /* This was really a NUL. */
1641 yy_state_type yy_next_state;
1643 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1645 yy_current_state = yy_get_previous_state( );
1647 /* Okay, we're now positioned to make the NUL
1648 * transition. We couldn't have
1649 * yy_get_previous_state() go ahead and do it
1650 * for us because it doesn't know how to deal
1651 * with the possibility of jamming (and we don't
1652 * want to build jamming into it because then it
1653 * will run more slowly).
1656 yy_next_state = yy_try_NUL_trans( yy_current_state );
1658 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1660 if ( yy_next_state )
1662 /* Consume the NUL. */
1663 yy_cp = ++(yy_c_buf_p);
1664 yy_current_state = yy_next_state;
1670 yy_cp = (yy_c_buf_p);
1671 goto yy_find_action;
1675 else switch ( yy_get_next_buffer( ) )
1677 case EOB_ACT_END_OF_FILE:
1679 (yy_did_buffer_switch_on_eof) = 0;
1683 /* Note: because we've taken care in
1684 * yy_get_next_buffer() to have set up
1685 * yytext, we can now set up
1686 * yy_c_buf_p so that if some total
1687 * hoser (like flex itself) wants to
1688 * call the scanner after we return the
1689 * YY_NULL, it'll still work - another
1690 * YY_NULL will get returned.
1692 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1694 yy_act = YY_STATE_EOF(YY_START);
1700 if ( ! (yy_did_buffer_switch_on_eof) )
1706 case EOB_ACT_CONTINUE_SCAN:
1708 (yytext_ptr) + yy_amount_of_matched_text;
1710 yy_current_state = yy_get_previous_state( );
1712 yy_cp = (yy_c_buf_p);
1713 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1716 case EOB_ACT_LAST_MATCH:
1718 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1720 yy_current_state = yy_get_previous_state( );
1722 yy_cp = (yy_c_buf_p);
1723 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1724 goto yy_find_action;
1731 "fatal flex scanner internal error--no action found" );
1732 } /* end of action switch */
1733 } /* end of scanning one token */
1734 } /* end of yylex */
1736 /* yy_get_next_buffer - try to read in a new buffer
1738 * Returns a code representing an action:
1739 * EOB_ACT_LAST_MATCH -
1740 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1741 * EOB_ACT_END_OF_FILE - end of file
1743 static int yy_get_next_buffer (void)
1745 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1746 register char *source = (yytext_ptr);
1747 register int number_to_move, i;
1750 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1752 "fatal flex scanner internal error--end of buffer missed" );
1754 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1755 { /* Don't try to fill the buffer, so this is an EOF. */
1756 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1758 /* We matched a single character, the EOB, so
1759 * treat this as a final EOF.
1761 return EOB_ACT_END_OF_FILE;
1766 /* We matched some text prior to the EOB, first
1769 return EOB_ACT_LAST_MATCH;
1773 /* Try to read more data. */
1775 /* First move last chars to start of buffer. */
1776 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1778 for ( i = 0; i < number_to_move; ++i )
1779 *(dest++) = *(source++);
1781 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1782 /* don't do the read, it's not guaranteed to return an EOF,
1785 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1789 size_t num_to_read =
1790 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1792 while ( num_to_read <= 0 )
1793 { /* Not enough room in the buffer - grow it. */
1795 /* just a shorter name for the current buffer */
1796 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1798 int yy_c_buf_p_offset =
1799 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1801 if ( b->yy_is_our_buffer )
1803 int new_size = b->yy_buf_size * 2;
1805 if ( new_size <= 0 )
1806 b->yy_buf_size += b->yy_buf_size / 8;
1808 b->yy_buf_size *= 2;
1810 b->yy_ch_buf = (char *)
1811 /* Include room in for 2 EOB chars. */
1812 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1815 /* Can't grow it, we don't own it. */
1818 if ( ! b->yy_ch_buf )
1820 "fatal error - scanner input buffer overflow" );
1822 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1824 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1829 if ( num_to_read > YY_READ_BUF_SIZE )
1830 num_to_read = YY_READ_BUF_SIZE;
1832 /* Read in more data. */
1833 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1834 (yy_n_chars), num_to_read );
1836 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1839 if ( (yy_n_chars) == 0 )
1841 if ( number_to_move == YY_MORE_ADJ )
1843 ret_val = EOB_ACT_END_OF_FILE;
1849 ret_val = EOB_ACT_LAST_MATCH;
1850 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1851 YY_BUFFER_EOF_PENDING;
1856 ret_val = EOB_ACT_CONTINUE_SCAN;
1858 (yy_n_chars) += number_to_move;
1859 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1860 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1862 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1867 /* yy_get_previous_state - get the state just before the EOB char was reached */
1869 static yy_state_type yy_get_previous_state (void)
1871 register yy_state_type yy_current_state;
1872 register char *yy_cp;
1874 yy_current_state = (yy_start);
1876 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1878 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1879 if ( yy_accept[yy_current_state] )
1881 (yy_last_accepting_state) = yy_current_state;
1882 (yy_last_accepting_cpos) = yy_cp;
1884 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1886 yy_current_state = (int) yy_def[yy_current_state];
1887 if ( yy_current_state >= 501 )
1888 yy_c = yy_meta[(unsigned int) yy_c];
1890 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1893 return yy_current_state;
1896 /* yy_try_NUL_trans - try to make a transition on the NUL character
1899 * next_state = yy_try_NUL_trans( current_state );
1901 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1903 register int yy_is_jam;
1904 register char *yy_cp = (yy_c_buf_p);
1906 register YY_CHAR yy_c = 1;
1907 if ( yy_accept[yy_current_state] )
1909 (yy_last_accepting_state) = yy_current_state;
1910 (yy_last_accepting_cpos) = yy_cp;
1912 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1914 yy_current_state = (int) yy_def[yy_current_state];
1915 if ( yy_current_state >= 501 )
1916 yy_c = yy_meta[(unsigned int) yy_c];
1918 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1919 yy_is_jam = (yy_current_state == 500);
1921 return yy_is_jam ? 0 : yy_current_state;
1924 static void yyunput (int c, register char * yy_bp )
1926 register char *yy_cp;
1928 yy_cp = (yy_c_buf_p);
1930 /* undo effects of setting up yytext */
1931 *yy_cp = (yy_hold_char);
1933 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1934 { /* need to shift things up to make room */
1935 /* +2 for EOB chars. */
1936 register int number_to_move = (yy_n_chars) + 2;
1937 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1938 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1939 register char *source =
1940 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1942 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1943 *--dest = *--source;
1945 yy_cp += (int) (dest - source);
1946 yy_bp += (int) (dest - source);
1947 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1948 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1950 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1951 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1954 *--yy_cp = (char) c;
1956 (yytext_ptr) = yy_bp;
1957 (yy_hold_char) = *yy_cp;
1958 (yy_c_buf_p) = yy_cp;
1963 static int yyinput (void)
1965 static int input (void)
1971 *(yy_c_buf_p) = (yy_hold_char);
1973 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1975 /* yy_c_buf_p now points to the character we want to return.
1976 * If this occurs *before* the EOB characters, then it's a
1977 * valid NUL; if not, then we've hit the end of the buffer.
1979 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1980 /* This was really a NUL. */
1981 *(yy_c_buf_p) = '\0';
1984 { /* need more input */
1985 int offset = (yy_c_buf_p) - (yytext_ptr);
1988 switch ( yy_get_next_buffer( ) )
1990 case EOB_ACT_LAST_MATCH:
1991 /* This happens because yy_g_n_b()
1992 * sees that we've accumulated a
1993 * token and flags that we need to
1994 * try matching the token before
1995 * proceeding. But for input(),
1996 * there's no matching to consider.
1997 * So convert the EOB_ACT_LAST_MATCH
1998 * to EOB_ACT_END_OF_FILE.
2001 /* Reset buffer status. */
2006 case EOB_ACT_END_OF_FILE:
2011 if ( ! (yy_did_buffer_switch_on_eof) )
2020 case EOB_ACT_CONTINUE_SCAN:
2021 (yy_c_buf_p) = (yytext_ptr) + offset;
2027 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2028 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2029 (yy_hold_char) = *++(yy_c_buf_p);
2033 #endif /* ifndef YY_NO_INPUT */
2035 /** Immediately switch to a different input stream.
2036 * @param input_file A readable stream.
2038 * @note This function does not reset the start condition to @c INITIAL .
2040 void yyrestart (FILE * input_file )
2043 if ( ! YY_CURRENT_BUFFER ){
2044 yyensure_buffer_stack ();
2045 YY_CURRENT_BUFFER_LVALUE =
2046 yy_create_buffer(yyin,YY_BUF_SIZE );
2049 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2050 yy_load_buffer_state( );
2053 /** Switch to a different input buffer.
2054 * @param new_buffer The new input buffer.
2057 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2060 /* TODO. We should be able to replace this entire function body
2062 * yypop_buffer_state();
2063 * yypush_buffer_state(new_buffer);
2065 yyensure_buffer_stack ();
2066 if ( YY_CURRENT_BUFFER == new_buffer )
2069 if ( YY_CURRENT_BUFFER )
2071 /* Flush out information for old buffer. */
2072 *(yy_c_buf_p) = (yy_hold_char);
2073 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2074 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2077 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2078 yy_load_buffer_state( );
2080 /* We don't actually know whether we did this switch during
2081 * EOF (yywrap()) processing, but the only time this flag
2082 * is looked at is after yywrap() is called, so it's safe
2083 * to go ahead and always set it.
2085 (yy_did_buffer_switch_on_eof) = 1;
2088 static void yy_load_buffer_state (void)
2090 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2091 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2092 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2093 (yy_hold_char) = *(yy_c_buf_p);
2096 /** Allocate and initialize an input buffer state.
2097 * @param file A readable stream.
2098 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2100 * @return the allocated buffer state.
2102 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2106 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2108 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2110 b->yy_buf_size = size;
2112 /* yy_ch_buf has to be 2 characters longer than the size given because
2113 * we need to put in 2 end-of-buffer characters.
2115 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2116 if ( ! b->yy_ch_buf )
2117 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2119 b->yy_is_our_buffer = 1;
2121 yy_init_buffer(b,file );
2126 /** Destroy the buffer.
2127 * @param b a buffer created with yy_create_buffer()
2130 void yy_delete_buffer (YY_BUFFER_STATE b )
2136 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2137 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2139 if ( b->yy_is_our_buffer )
2140 yyfree((void *) b->yy_ch_buf );
2142 yyfree((void *) b );
2146 extern int isatty (int );
2147 #endif /* __cplusplus */
2149 /* Initializes or reinitializes a buffer.
2150 * This function is sometimes called more than once on the same buffer,
2151 * such as during a yyrestart() or at EOF.
2153 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2158 yy_flush_buffer(b );
2160 b->yy_input_file = file;
2161 b->yy_fill_buffer = 1;
2163 /* If b is the current buffer, then yy_init_buffer was _probably_
2164 * called from yyrestart() or through yy_get_next_buffer.
2165 * In that case, we don't want to reset the lineno or column.
2167 if (b != YY_CURRENT_BUFFER){
2168 b->yy_bs_lineno = 1;
2169 b->yy_bs_column = 0;
2172 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2177 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2178 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2181 void yy_flush_buffer (YY_BUFFER_STATE b )
2188 /* We always need two end-of-buffer characters. The first causes
2189 * a transition to the end-of-buffer state. The second causes
2190 * a jam in that state.
2192 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2193 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2195 b->yy_buf_pos = &b->yy_ch_buf[0];
2198 b->yy_buffer_status = YY_BUFFER_NEW;
2200 if ( b == YY_CURRENT_BUFFER )
2201 yy_load_buffer_state( );
2204 /** Pushes the new state onto the stack. The new state becomes
2205 * the current state. This function will allocate the stack
2207 * @param new_buffer The new state.
2210 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2212 if (new_buffer == NULL)
2215 yyensure_buffer_stack();
2217 /* This block is copied from yy_switch_to_buffer. */
2218 if ( YY_CURRENT_BUFFER )
2220 /* Flush out information for old buffer. */
2221 *(yy_c_buf_p) = (yy_hold_char);
2222 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2223 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2226 /* Only push if top exists. Otherwise, replace top. */
2227 if (YY_CURRENT_BUFFER)
2228 (yy_buffer_stack_top)++;
2229 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2231 /* copied from yy_switch_to_buffer. */
2232 yy_load_buffer_state( );
2233 (yy_did_buffer_switch_on_eof) = 1;
2236 /** Removes and deletes the top of the stack, if present.
2237 * The next element becomes the new top.
2240 void yypop_buffer_state (void)
2242 if (!YY_CURRENT_BUFFER)
2245 yy_delete_buffer(YY_CURRENT_BUFFER );
2246 YY_CURRENT_BUFFER_LVALUE = NULL;
2247 if ((yy_buffer_stack_top) > 0)
2248 --(yy_buffer_stack_top);
2250 if (YY_CURRENT_BUFFER) {
2251 yy_load_buffer_state( );
2252 (yy_did_buffer_switch_on_eof) = 1;
2256 /* Allocates the stack if it does not exist.
2257 * Guarantees space for at least one push.
2259 static void yyensure_buffer_stack (void)
2263 if (!(yy_buffer_stack)) {
2265 /* First allocation is just for 2 elements, since we don't know if this
2266 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2267 * immediate realloc on the next call.
2270 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2271 (num_to_alloc * sizeof(struct yy_buffer_state*)
2274 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2276 (yy_buffer_stack_max) = num_to_alloc;
2277 (yy_buffer_stack_top) = 0;
2281 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2283 /* Increase the buffer to prepare for a possible push. */
2284 int grow_size = 8 /* arbitrary grow size */;
2286 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2287 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2289 num_to_alloc * sizeof(struct yy_buffer_state*)
2292 /* zero only the new slots.*/
2293 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2294 (yy_buffer_stack_max) = num_to_alloc;
2298 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2299 * @param base the character buffer
2300 * @param size the size in bytes of the character buffer
2302 * @return the newly allocated buffer state object.
2304 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2309 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2310 base[size-1] != YY_END_OF_BUFFER_CHAR )
2311 /* They forgot to leave room for the EOB's. */
2314 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2316 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2318 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2319 b->yy_buf_pos = b->yy_ch_buf = base;
2320 b->yy_is_our_buffer = 0;
2321 b->yy_input_file = 0;
2322 b->yy_n_chars = b->yy_buf_size;
2323 b->yy_is_interactive = 0;
2325 b->yy_fill_buffer = 0;
2326 b->yy_buffer_status = YY_BUFFER_NEW;
2328 yy_switch_to_buffer(b );
2333 /** Setup the input buffer state to scan a string. The next call to yylex() will
2334 * scan from a @e copy of @a str.
2335 * @param str a NUL-terminated string to scan
2337 * @return the newly allocated buffer state object.
2338 * @note If you want to scan bytes that may contain NUL values, then use
2339 * yy_scan_bytes() instead.
2341 YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
2344 return yy_scan_bytes(yy_str,strlen(yy_str) );
2347 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2348 * scan from a @e copy of @a bytes.
2349 * @param bytes the byte buffer to scan
2350 * @param len the number of bytes in the buffer pointed to by @a bytes.
2352 * @return the newly allocated buffer state object.
2354 YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
2361 /* Get memory for full buffer, including space for trailing EOB's. */
2363 buf = (char *) yyalloc(n );
2365 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2367 for ( i = 0; i < len; ++i )
2370 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2372 b = yy_scan_buffer(buf,n );
2374 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2376 /* It's okay to grow etc. this buffer, and we should throw it
2377 * away when we're done.
2379 b->yy_is_our_buffer = 1;
2384 #ifndef YY_EXIT_FAILURE
2385 #define YY_EXIT_FAILURE 2
2388 static void yy_fatal_error (yyconst char* msg )
2390 (void) fprintf( stderr, "%s\n", msg );
2391 exit( YY_EXIT_FAILURE );
2394 /* Redefine yyless() so it works in section 3 code. */
2400 /* Undo effects of setting up yytext. */ \
2401 int yyless_macro_arg = (n); \
2402 YY_LESS_LINENO(yyless_macro_arg);\
2403 yytext[yyleng] = (yy_hold_char); \
2404 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2405 (yy_hold_char) = *(yy_c_buf_p); \
2406 *(yy_c_buf_p) = '\0'; \
2407 yyleng = yyless_macro_arg; \
2411 /* Accessor methods (get/set functions) to struct members. */
2413 /** Get the current line number.
2416 int yyget_lineno (void)
2422 /** Get the input stream.
2425 FILE *yyget_in (void)
2430 /** Get the output stream.
2433 FILE *yyget_out (void)
2438 /** Get the length of the current token.
2441 int yyget_leng (void)
2446 /** Get the current token.
2450 char *yyget_text (void)
2455 /** Set the current line number.
2456 * @param line_number
2459 void yyset_lineno (int line_number )
2462 yylineno = line_number;
2465 /** Set the input stream. This does not discard the current
2467 * @param in_str A readable stream.
2469 * @see yy_switch_to_buffer
2471 void yyset_in (FILE * in_str )
2476 void yyset_out (FILE * out_str )
2481 int yyget_debug (void)
2483 return yy_flex_debug;
2486 void yyset_debug (int bdebug )
2488 yy_flex_debug = bdebug ;
2491 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2492 int yylex_destroy (void)
2495 /* Pop the buffer stack, destroying each element. */
2496 while(YY_CURRENT_BUFFER){
2497 yy_delete_buffer(YY_CURRENT_BUFFER );
2498 YY_CURRENT_BUFFER_LVALUE = NULL;
2499 yypop_buffer_state();
2502 /* Destroy the stack itself. */
2503 yyfree((yy_buffer_stack) );
2504 (yy_buffer_stack) = NULL;
2510 * Internal utility routines.
2514 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2517 for ( i = 0; i < n; ++i )
2522 #ifdef YY_NEED_STRLEN
2523 static int yy_flex_strlen (yyconst char * s )
2526 for ( n = 0; s[n]; ++n )
2533 void *yyalloc (yy_size_t size )
2535 return (void *) malloc( size );
2538 void *yyrealloc (void * ptr, yy_size_t size )
2540 /* The cast to (char *) in the following accommodates both
2541 * implementations that use char* generic pointers, and those
2542 * that use void* generic pointers. It works with the latter
2543 * because both ANSI C and C++ allow castless assignment from
2544 * any pointer type to void*, and deal with argument conversions
2545 * as though doing an assignment.
2547 return (void *) realloc( (char *) ptr, size );
2550 void yyfree (void * ptr )
2552 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2555 #define YYTABLES_NAME "yytables"
2558 #undef YY_FLUSH_BUFFER
2560 #undef yy_new_buffer
2561 #undef yy_set_interactive
2563 #undef YY_DO_BEFORE_ACTION
2565 #ifdef YY_DECL_IS_OURS
2566 #undef YY_DECL_IS_OURS
2569 #line 418 "oscan.lex"