1 2#line 3 "lex.sfyy.c" 3 4#define YY_INT_ALIGNED short int 5 6/* A lexical scanner generated by flex */ 7 8#define yy_create_buffer sfyy_create_buffer 9#define yy_delete_buffer sfyy_delete_buffer 10#define yy_flex_debug sfyy_flex_debug 11#define yy_init_buffer sfyy_init_buffer 12#define yy_flush_buffer sfyy_flush_buffer 13#define yy_load_buffer_state sfyy_load_buffer_state 14#define yy_switch_to_buffer sfyy_switch_to_buffer 15#define yyin sfyyin 16#define yyleng sfyyleng 17#define yylex sfyylex 18#define yylineno sfyylineno 19#define yyout sfyyout 20#define yyrestart sfyyrestart 21#define yytext sfyytext 22#define yywrap sfyywrap 23#define yyalloc sfyyalloc 24#define yyrealloc sfyyrealloc 25#define yyfree sfyyfree 26 27#define FLEX_SCANNER 28#define YY_FLEX_MAJOR_VERSION 2 29#define YY_FLEX_MINOR_VERSION 5 30#define YY_FLEX_SUBMINOR_VERSION 35 31#if YY_FLEX_SUBMINOR_VERSION > 0 32#define FLEX_BETA 33#endif 34 35/* First, we deal with platform-specific or compiler-specific issues. */ 36 37/* begin standard C headers. */ 38#include <stdio.h> 39#include <string.h> 40#include <errno.h> 41#include <stdlib.h> 42 43/* end standard C headers. */ 44 45/* flex integer type definitions */ 46 47#ifndef FLEXINT_H 48#define FLEXINT_H 49 50/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 51 52#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 53 54/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 55 * if you want the limit (max/min) macros for int types. 56 */ 57#ifndef __STDC_LIMIT_MACROS 58#define __STDC_LIMIT_MACROS 1 59#endif 60 61#include <inttypes.h> 62typedef int8_t flex_int8_t; 63typedef uint8_t flex_uint8_t; 64typedef int16_t flex_int16_t; 65typedef uint16_t flex_uint16_t; 66typedef int32_t flex_int32_t; 67typedef uint32_t flex_uint32_t; 68#else 69typedef signed char flex_int8_t; 70typedef short int flex_int16_t; 71typedef int flex_int32_t; 72typedef unsigned char flex_uint8_t; 73typedef unsigned short int flex_uint16_t; 74typedef unsigned int flex_uint32_t; 75#endif /* ! C99 */ 76 77/* Limits of integral types. */ 78#ifndef INT8_MIN 79#define INT8_MIN (-128) 80#endif 81#ifndef INT16_MIN 82#define INT16_MIN (-32767-1) 83#endif 84#ifndef INT32_MIN 85#define INT32_MIN (-2147483647-1) 86#endif 87#ifndef INT8_MAX 88#define INT8_MAX (127) 89#endif 90#ifndef INT16_MAX 91#define INT16_MAX (32767) 92#endif 93#ifndef INT32_MAX 94#define INT32_MAX (2147483647) 95#endif 96#ifndef UINT8_MAX 97#define UINT8_MAX (255U) 98#endif 99#ifndef UINT16_MAX 100#define UINT16_MAX (65535U) 101#endif 102#ifndef UINT32_MAX 103#define UINT32_MAX (4294967295U) 104#endif 105 106#endif /* ! FLEXINT_H */ 107 108#ifdef __cplusplus 109 110/* The "const" storage-class-modifier is valid. */ 111#define YY_USE_CONST 112 113#else /* ! __cplusplus */ 114 115/* C99 requires __STDC__ to be defined as 1. */ 116#if defined (__STDC__) 117 118#define YY_USE_CONST 119 120#endif /* defined (__STDC__) */ 121#endif /* ! __cplusplus */ 122 123#ifdef YY_USE_CONST 124#define yyconst const 125#else 126#define yyconst 127#endif 128 129/* Returned upon end-of-file. */ 130#define YY_NULL 0 131 132/* Promotes a possibly negative, possibly signed char to an unsigned 133 * integer for use as an array index. If the signed char is negative, 134 * we want to instead treat it as an 8-bit unsigned char, hence the 135 * double cast. 136 */ 137#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 138 139/* Enter a start condition. This macro really ought to take a parameter, 140 * but we do it the disgusting crufty way forced on us by the ()-less 141 * definition of BEGIN. 142 */ 143#define BEGIN (yy_start) = 1 + 2 * 144 145/* Translate the current start state into a value that can be later handed 146 * to BEGIN to return to the state. The YYSTATE alias is for lex 147 * compatibility. 148 */ 149#define YY_START (((yy_start) - 1) / 2) 150#define YYSTATE YY_START 151 152/* Action number for EOF rule of a given start state. */ 153#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 154 155/* Special action meaning "start processing a new file". */ 156#define YY_NEW_FILE sfyyrestart(sfyyin ) 157 158#define YY_END_OF_BUFFER_CHAR 0 159 160/* Size of default input buffer. */ 161#ifndef YY_BUF_SIZE 162#define YY_BUF_SIZE 16384 163#endif 164 165/* The state buf must be large enough to hold one state per character in the main buffer. 166 */ 167#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 168 169#ifndef YY_TYPEDEF_YY_BUFFER_STATE 170#define YY_TYPEDEF_YY_BUFFER_STATE 171typedef struct yy_buffer_state *YY_BUFFER_STATE; 172#endif 173 174extern int sfyyleng; 175 176extern FILE *sfyyin, *sfyyout; 177 178#define EOB_ACT_CONTINUE_SCAN 0 179#define EOB_ACT_END_OF_FILE 1 180#define EOB_ACT_LAST_MATCH 2 181 182 #define YY_LESS_LINENO(n) 183 184/* Return all but the first "n" matched characters back to the input stream. */ 185#define yyless(n) \ 186 do \ 187 { \ 188 /* Undo effects of setting up sfyytext. */ \ 189 int yyless_macro_arg = (n); \ 190 YY_LESS_LINENO(yyless_macro_arg);\ 191 *yy_cp = (yy_hold_char); \ 192 YY_RESTORE_YY_MORE_OFFSET \ 193 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 194 YY_DO_BEFORE_ACTION; /* set up sfyytext again */ \ 195 } \ 196 while ( 0 ) 197 198#define unput(c) yyunput( c, (yytext_ptr) ) 199 200#ifndef YY_TYPEDEF_YY_SIZE_T 201#define YY_TYPEDEF_YY_SIZE_T 202typedef size_t yy_size_t; 203#endif 204 205#ifndef YY_STRUCT_YY_BUFFER_STATE 206#define YY_STRUCT_YY_BUFFER_STATE 207struct yy_buffer_state 208 { 209 FILE *yy_input_file; 210 211 char *yy_ch_buf; /* input buffer */ 212 char *yy_buf_pos; /* current position in input buffer */ 213 214 /* Size of input buffer in bytes, not including room for EOB 215 * characters. 216 */ 217 yy_size_t yy_buf_size; 218 219 /* Number of characters read into yy_ch_buf, not including EOB 220 * characters. 221 */ 222 int yy_n_chars; 223 224 /* Whether we "own" the buffer - i.e., we know we created it, 225 * and can realloc() it to grow it, and should free() it to 226 * delete it. 227 */ 228 int yy_is_our_buffer; 229 230 /* Whether this is an "interactive" input source; if so, and 231 * if we're using stdio for input, then we want to use getc() 232 * instead of fread(), to make sure we stop fetching input after 233 * each newline. 234 */ 235 int yy_is_interactive; 236 237 /* Whether we're considered to be at the beginning of a line. 238 * If so, '^' rules will be active on the next match, otherwise 239 * not. 240 */ 241 int yy_at_bol; 242 243 int yy_bs_lineno; /**< The line count. */ 244 int yy_bs_column; /**< The column count. */ 245 246 /* Whether to try to fill the input buffer when we reach the 247 * end of it. 248 */ 249 int yy_fill_buffer; 250 251 int yy_buffer_status; 252 253#define YY_BUFFER_NEW 0 254#define YY_BUFFER_NORMAL 1 255 /* When an EOF's been seen but there's still some text to process 256 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 257 * shouldn't try reading from the input source any more. We might 258 * still have a bunch of tokens to match, though, because of 259 * possible backing-up. 260 * 261 * When we actually see the EOF, we change the status to "new" 262 * (via sfyyrestart()), so that the user can continue scanning by 263 * just pointing sfyyin at a new input file. 264 */ 265#define YY_BUFFER_EOF_PENDING 2 266 267 }; 268#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 269 270/* Stack of input buffers. */ 271static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 272static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 273static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 274 275/* We provide macros for accessing buffer states in case in the 276 * future we want to put the buffer states in a more general 277 * "scanner state". 278 * 279 * Returns the top of the stack, or NULL. 280 */ 281#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 282 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 283 : NULL) 284 285/* Same as previous macro, but useful when we know that the buffer stack is not 286 * NULL or when we need an lvalue. For internal use only. 287 */ 288#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 289 290/* yy_hold_char holds the character lost when sfyytext is formed. */ 291static char yy_hold_char; 292static int yy_n_chars; /* number of characters read into yy_ch_buf */ 293int sfyyleng; 294 295/* Points to current character in buffer. */ 296static char *yy_c_buf_p = (char *) 0; 297static int yy_init = 0; /* whether we need to initialize */ 298static int yy_start = 0; /* start state number */ 299 300/* Flag which is used to allow sfyywrap()'s to do buffer switches 301 * instead of setting up a fresh sfyyin. A bit of a hack ... 302 */ 303static int yy_did_buffer_switch_on_eof; 304 305void sfyyrestart (FILE *input_file ); 306void sfyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 307YY_BUFFER_STATE sfyy_create_buffer (FILE *file,int size ); 308void sfyy_delete_buffer (YY_BUFFER_STATE b ); 309void sfyy_flush_buffer (YY_BUFFER_STATE b ); 310void sfyypush_buffer_state (YY_BUFFER_STATE new_buffer ); 311void sfyypop_buffer_state (void ); 312 313static void sfyyensure_buffer_stack (void ); 314static void sfyy_load_buffer_state (void ); 315static void sfyy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 316 317#define YY_FLUSH_BUFFER sfyy_flush_buffer(YY_CURRENT_BUFFER ) 318 319YY_BUFFER_STATE sfyy_scan_buffer (char *base,yy_size_t size ); 320YY_BUFFER_STATE sfyy_scan_string (yyconst char *yy_str ); 321YY_BUFFER_STATE sfyy_scan_bytes (yyconst char *bytes,int len ); 322 323void *sfyyalloc (yy_size_t ); 324void *sfyyrealloc (void *,yy_size_t ); 325void sfyyfree (void * ); 326 327#define yy_new_buffer sfyy_create_buffer 328 329#define yy_set_interactive(is_interactive) \ 330 { \ 331 if ( ! YY_CURRENT_BUFFER ){ \ 332 sfyyensure_buffer_stack (); \ 333 YY_CURRENT_BUFFER_LVALUE = \ 334 sfyy_create_buffer(sfyyin,YY_BUF_SIZE ); \ 335 } \ 336 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 337 } 338 339#define yy_set_bol(at_bol) \ 340 { \ 341 if ( ! YY_CURRENT_BUFFER ){\ 342 sfyyensure_buffer_stack (); \ 343 YY_CURRENT_BUFFER_LVALUE = \ 344 sfyy_create_buffer(sfyyin,YY_BUF_SIZE ); \ 345 } \ 346 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 347 } 348 349#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 350 351/* Begin user sect3 */ 352 353#define sfyywrap(n) 1 354#define YY_SKIP_YYWRAP 355 356typedef unsigned char YY_CHAR; 357 358FILE *sfyyin = (FILE *) 0, *sfyyout = (FILE *) 0; 359 360typedef int yy_state_type; 361 362extern int sfyylineno; 363 364int sfyylineno = 1; 365 366extern char *sfyytext; 367#define yytext_ptr sfyytext 368 369static yy_state_type yy_get_previous_state (void ); 370static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 371static int yy_get_next_buffer (void ); 372static void yy_fatal_error (yyconst char msg[] ); 373 374/* Done after the current pattern has been matched and before the 375 * corresponding action - sets up sfyytext. 376 */ 377#define YY_DO_BEFORE_ACTION \ 378 (yytext_ptr) = yy_bp; \ 379 sfyyleng = (size_t) (yy_cp - yy_bp); \ 380 (yy_hold_char) = *yy_cp; \ 381 *yy_cp = '\0'; \ 382 (yy_c_buf_p) = yy_cp; 383 384#define YY_NUM_RULES 42 385#define YY_END_OF_BUFFER 43 386/* This struct is not used in this scanner, 387 but its presence is necessary. */ 388struct yy_trans_info 389 { 390 flex_int32_t yy_verify; 391 flex_int32_t yy_nxt; 392 }; 393static yyconst flex_int16_t yy_accept[398] = 394 { 0, 395 0, 0, 0, 0, 0, 0, 0, 0, 43, 41, 396 34, 33, 41, 39, 39, 40, 36, 39, 39, 39, 397 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 398 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 399 39, 39, 39, 39, 39, 36, 39, 39, 39, 39, 400 39, 39, 39, 39, 39, 39, 34, 0, 32, 39, 401 37, 39, 36, 35, 39, 35, 39, 39, 39, 39, 402 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 403 30, 39, 3, 39, 39, 3, 39, 39, 39, 39, 404 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 405 406 30, 39, 12, 12, 12, 39, 39, 39, 39, 39, 407 39, 39, 38, 36, 39, 35, 35, 39, 39, 39, 408 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 409 39, 39, 39, 39, 39, 39, 3, 39, 39, 39, 410 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 411 39, 39, 39, 39, 39, 39, 39, 35, 39, 39, 412 39, 39, 39, 39, 39, 36, 39, 39, 35, 35, 413 35, 39, 39, 11, 39, 6, 9, 39, 39, 4, 414 39, 7, 39, 39, 39, 39, 39, 16, 39, 39, 415 3, 39, 39, 39, 11, 39, 6, 9, 39, 39, 416 417 4, 39, 7, 39, 39, 39, 39, 39, 16, 39, 418 39, 35, 35, 39, 39, 39, 39, 39, 39, 39, 419 36, 39, 35, 35, 35, 39, 15, 1, 39, 39, 420 39, 39, 39, 39, 8, 39, 5, 39, 39, 39, 421 39, 15, 1, 39, 39, 39, 39, 39, 39, 8, 422 39, 5, 39, 39, 39, 12, 12, 39, 39, 39, 423 39, 39, 39, 39, 39, 39, 35, 39, 39, 39, 424 39, 17, 39, 13, 39, 39, 39, 39, 39, 39, 425 39, 39, 17, 39, 13, 39, 39, 35, 39, 39, 426 39, 39, 39, 39, 39, 39, 39, 14, 39, 39, 427 428 39, 39, 39, 39, 39, 39, 14, 39, 39, 39, 429 39, 39, 39, 39, 39, 39, 18, 39, 39, 10, 430 31, 39, 39, 39, 39, 39, 39, 10, 31, 39, 431 39, 39, 39, 39, 39, 39, 35, 39, 2, 39, 432 39, 39, 39, 39, 2, 39, 39, 39, 39, 39, 433 39, 35, 39, 39, 25, 39, 39, 39, 39, 39, 434 39, 39, 39, 35, 39, 26, 39, 39, 22, 39, 435 24, 39, 23, 39, 39, 39, 39, 39, 19, 20, 436 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 437 27, 39, 28, 39, 21, 29, 0 438 439 } ; 440 441static yyconst flex_int32_t yy_ec[256] = 442 { 0, 443 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 446 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 447 1, 1, 1, 1, 5, 6, 7, 8, 8, 8, 448 8, 8, 8, 8, 8, 8, 8, 9, 10, 1, 449 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 450 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 451 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 452 1, 1, 1, 1, 13, 1, 14, 15, 16, 17, 453 454 18, 19, 20, 21, 22, 12, 23, 24, 25, 26, 455 27, 28, 12, 29, 30, 31, 32, 33, 34, 35, 456 36, 12, 37, 1, 38, 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, 459 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 465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 470 1, 1, 1, 1, 1 471 } ; 472 473static yyconst flex_int32_t yy_meta[39] = 474 { 0, 475 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 478 2, 2, 2, 2, 2, 2, 1, 1 479 } ; 480 481static yyconst flex_int16_t yy_base[401] = 482 { 0, 483 0, 0, 38, 0, 69, 0, 72, 88, 716, 717, 484 713, 717, 711, 705, 0, 717, 115, 703, 73, 89, 485 84, 682, 683, 82, 687, 680, 64, 64, 689, 679, 486 691, 130, 145, 154, 83, 174, 82, 111, 135, 99, 487 147, 163, 137, 157, 161, 196, 183, 192, 187, 191, 488 180, 673, 138, 183, 200, 677, 700, 698, 717, 0, 489 692, 691, 220, 232, 214, 689, 236, 673, 674, 668, 490 664, 671, 177, 666, 660, 663, 671, 662, 206, 159, 491 0, 663, 218, 246, 657, 677, 667, 242, 223, 229, 492 238, 247, 253, 248, 244, 251, 261, 257, 270, 262, 493 494 654, 263, 673, 289, 294, 651, 262, 652, 278, 651, 495 653, 655, 668, 304, 299, 318, 302, 322, 648, 657, 496 641, 641, 654, 648, 651, 645, 645, 642, 646, 644, 497 641, 648, 643, 643, 626, 636, 308, 344, 628, 311, 498 272, 310, 312, 296, 324, 327, 321, 325, 340, 93, 499 328, 343, 352, 349, 351, 196, 348, 374, 643, 349, 500 642, 632, 640, 624, 635, 378, 641, 641, 386, 639, 501 367, 629, 612, 0, 617, 0, 622, 617, 613, 0, 502 614, 0, 237, 622, 613, 602, 603, 0, 618, 618, 503 387, 370, 380, 377, 605, 379, 604, 388, 386, 603, 504 505 602, 387, 601, 400, 395, 394, 390, 396, 600, 403, 506 410, 432, 425, 598, 598, 596, 608, 594, 618, 608, 507 428, 429, 444, 615, 611, 589, 0, 0, 592, 595, 508 597, 589, 585, 578, 0, 595, 0, 606, 581, 604, 509 412, 579, 578, 427, 416, 425, 438, 577, 436, 576, 510 440, 575, 461, 574, 463, 593, 464, 583, 575, 581, 511 593, 579, 582, 565, 586, 468, 584, 562, 572, 559, 512 575, 0, 583, 0, 582, 555, 580, 560, 448, 456, 513 450, 466, 554, 477, 553, 478, 479, 572, 551, 565, 514 549, 561, 547, 558, 543, 480, 567, 0, 545, 535, 515 516 554, 545, 537, 545, 538, 543, 535, 460, 462, 480, 517 530, 531, 528, 533, 526, 541, 0, 549, 491, 0, 518 0, 538, 533, 532, 528, 523, 532, 521, 520, 475, 519 530, 525, 528, 520, 526, 514, 534, 535, 0, 521, 520 514, 520, 519, 518, 506, 505, 506, 503, 506, 501, 521 511, 520, 509, 508, 0, 506, 519, 493, 496, 491, 522 498, 489, 488, 0, 512, 0, 498, 484, 0, 509, 523 0, 482, 0, 482, 474, 474, 480, 474, 0, 0, 524 478, 476, 403, 357, 349, 323, 313, 293, 291, 217, 525 0, 166, 0, 143, 0, 0, 717, 509, 140, 97 526 527 } ; 528 529static yyconst flex_int16_t yy_def[401] = 530 { 0, 531 397, 1, 397, 3, 1, 5, 1, 1, 397, 397, 532 397, 397, 398, 399, 399, 397, 399, 399, 17, 17, 533 17, 399, 399, 399, 399, 399, 399, 399, 399, 399, 534 399, 400, 400, 400, 34, 400, 36, 36, 36, 36, 535 36, 36, 36, 36, 36, 17, 46, 46, 46, 17, 536 399, 399, 399, 399, 399, 399, 397, 398, 397, 399, 537 399, 399, 17, 399, 63, 64, 63, 399, 399, 399, 538 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 539 399, 399, 63, 34, 36, 399, 84, 36, 36, 36, 540 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 541 542 36, 36, 63, 63, 63, 399, 399, 399, 399, 399, 543 399, 399, 399, 63, 114, 114, 116, 114, 399, 399, 544 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 545 399, 399, 399, 399, 399, 399, 114, 84, 138, 36, 546 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 547 36, 36, 36, 36, 36, 36, 36, 64, 399, 399, 548 399, 399, 399, 399, 399, 399, 399, 399, 116, 64, 549 169, 399, 399, 399, 399, 399, 399, 399, 399, 399, 550 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 551 399, 36, 36, 36, 36, 36, 36, 36, 36, 36, 552 553 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 554 36, 169, 212, 399, 399, 399, 399, 399, 399, 399, 555 399, 399, 212, 223, 64, 399, 399, 399, 399, 399, 556 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 557 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 558 36, 36, 36, 36, 36, 169, 169, 399, 399, 399, 559 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 560 399, 399, 399, 399, 399, 399, 399, 399, 36, 36, 561 36, 36, 36, 36, 36, 36, 36, 158, 399, 399, 562 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 563 564 399, 399, 399, 399, 399, 399, 36, 36, 36, 36, 565 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 566 399, 399, 399, 399, 399, 399, 399, 36, 36, 36, 567 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 568 399, 399, 399, 399, 36, 399, 399, 399, 399, 399, 569 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 570 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 571 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 572 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 573 399, 399, 399, 399, 399, 399, 0, 397, 397, 397 574 575 } ; 576 577static yyconst flex_int16_t yy_nxt[756] = 578 { 0, 579 10, 11, 12, 13, 14, 15, 16, 17, 18, 16, 580 19, 15, 15, 20, 19, 19, 21, 19, 19, 22, 581 23, 24, 15, 25, 15, 15, 26, 27, 28, 29, 582 30, 15, 31, 15, 15, 15, 16, 16, 10, 11, 583 12, 13, 14, 15, 16, 17, 18, 16, 32, 33, 584 15, 34, 32, 32, 35, 32, 32, 36, 37, 38, 585 33, 39, 33, 33, 40, 41, 42, 43, 44, 33, 586 45, 33, 33, 33, 16, 16, 46, 78, 60, 47, 587 65, 79, 48, 47, 47, 49, 47, 47, 50, 60, 588 76, 65, 77, 51, 60, 72, 65, 52, 85, 84, 589 590 53, 54, 55, 56, 50, 67, 85, 73, 91, 51, 591 85, 204, 68, 52, 89, 69, 53, 54, 55, 56, 592 62, 85, 63, 64, 92, 65, 95, 85, 65, 65, 593 65, 65, 65, 65, 60, 60, 93, 83, 64, 85, 594 84, 60, 60, 84, 84, 84, 84, 84, 84, 60, 595 60, 109, 86, 60, 100, 79, 94, 60, 60, 60, 596 396, 83, 64, 85, 84, 85, 60, 84, 84, 84, 597 87, 84, 84, 96, 102, 97, 98, 88, 60, 60, 598 99, 86, 60, 101, 134, 85, 60, 135, 60, 85, 599 104, 85, 60, 72, 104, 124, 60, 60, 65, 104, 600 601 80, 395, 90, 103, 110, 107, 104, 125, 105, 104, 602 104, 104, 104, 104, 104, 68, 106, 111, 69, 60, 603 131, 115, 69, 60, 85, 137, 81, 114, 210, 132, 604 115, 133, 394, 115, 115, 115, 115, 115, 115, 116, 605 66, 60, 117, 115, 141, 117, 117, 117, 117, 117, 606 117, 85, 118, 137, 233, 142, 138, 85, 234, 138, 607 138, 138, 138, 138, 138, 140, 85, 143, 144, 85, 608 85, 145, 85, 147, 148, 85, 85, 149, 150, 85, 609 160, 85, 151, 146, 152, 85, 157, 155, 195, 85, 610 156, 85, 125, 153, 60, 154, 115, 158, 85, 60, 611 612 85, 115, 158, 130, 60, 162, 167, 60, 393, 171, 613 118, 166, 198, 60, 167, 191, 392, 167, 167, 167, 614 167, 167, 167, 168, 85, 169, 170, 60, 171, 167, 615 391, 171, 171, 171, 171, 171, 171, 194, 85, 85, 616 85, 196, 197, 201, 200, 199, 202, 205, 390, 85, 617 172, 191, 85, 85, 192, 85, 85, 192, 192, 192, 618 192, 192, 192, 203, 206, 207, 208, 209, 85, 211, 619 178, 85, 60, 389, 224, 215, 85, 85, 64, 85, 620 85, 212, 388, 62, 213, 221, 64, 213, 213, 213, 621 213, 213, 213, 223, 86, 64, 224, 241, 85, 224, 622 623 224, 224, 224, 224, 224, 85, 243, 85, 85, 244, 624 242, 245, 250, 247, 85, 85, 85, 248, 85, 251, 625 254, 249, 85, 85, 85, 252, 255, 387, 85, 253, 626 60, 85, 257, 62, 265, 221, 266, 281, 85, 256, 627 85, 279, 257, 282, 85, 257, 257, 257, 257, 257, 628 257, 267, 280, 85, 267, 85, 286, 267, 267, 267, 629 267, 267, 267, 283, 85, 276, 85, 278, 85, 60, 630 285, 224, 288, 265, 308, 297, 85, 307, 85, 310, 631 309, 302, 303, 305, 85, 318, 328, 319, 85, 85, 632 85, 85, 345, 386, 85, 330, 318, 329, 338, 385, 633 634 384, 383, 382, 85, 381, 85, 85, 85, 85, 58, 635 58, 380, 379, 378, 377, 376, 375, 374, 373, 372, 636 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 637 361, 360, 359, 358, 85, 357, 356, 355, 354, 353, 638 318, 352, 351, 350, 349, 348, 347, 346, 85, 85, 639 344, 343, 342, 341, 340, 339, 337, 336, 335, 334, 640 333, 332, 331, 85, 327, 326, 325, 324, 323, 322, 641 321, 320, 265, 317, 316, 315, 314, 313, 312, 311, 642 225, 85, 85, 306, 305, 304, 303, 302, 301, 300, 643 299, 298, 170, 296, 295, 294, 293, 292, 291, 290, 644 645 289, 288, 287, 85, 85, 284, 85, 85, 278, 277, 646 276, 275, 274, 273, 272, 271, 270, 269, 268, 60, 647 60, 264, 263, 262, 261, 260, 259, 258, 85, 85, 648 85, 246, 85, 85, 240, 239, 238, 237, 236, 235, 649 232, 231, 230, 229, 228, 227, 226, 225, 222, 64, 650 220, 219, 218, 217, 216, 214, 193, 190, 189, 188, 651 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 652 177, 176, 175, 174, 173, 113, 165, 164, 163, 161, 653 159, 158, 85, 139, 86, 85, 136, 130, 129, 128, 654 127, 126, 123, 122, 121, 120, 119, 60, 113, 61, 655 656 59, 57, 112, 108, 82, 81, 80, 75, 74, 71, 657 70, 66, 61, 59, 57, 397, 9, 397, 397, 397, 658 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 659 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 660 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 661 397, 397, 397, 397, 397 662 } ; 663 664static yyconst flex_int16_t yy_chk[756] = 665 { 0, 666 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 667 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 668 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 669 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 670 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 671 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 672 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 673 3, 3, 3, 3, 3, 3, 5, 28, 19, 5, 674 19, 28, 5, 5, 5, 5, 5, 5, 7, 21, 675 27, 21, 27, 7, 20, 24, 20, 7, 400, 35, 676 677 7, 7, 7, 7, 8, 20, 35, 24, 37, 8, 678 37, 150, 20, 8, 35, 21, 8, 8, 8, 8, 679 17, 150, 17, 17, 38, 17, 40, 40, 17, 17, 680 17, 17, 17, 17, 32, 32, 38, 32, 32, 38, 681 32, 399, 32, 32, 32, 32, 32, 32, 32, 33, 682 33, 53, 33, 33, 43, 53, 39, 33, 34, 34, 683 394, 34, 34, 39, 34, 43, 34, 34, 34, 34, 684 34, 34, 34, 41, 45, 41, 42, 34, 36, 36, 685 42, 36, 36, 44, 80, 44, 36, 80, 47, 45, 686 47, 42, 49, 51, 49, 73, 50, 48, 50, 48, 687 688 54, 392, 36, 46, 54, 51, 46, 73, 48, 46, 689 46, 46, 46, 46, 46, 48, 50, 55, 49, 65, 690 79, 65, 50, 83, 156, 83, 55, 63, 156, 79, 691 63, 79, 390, 63, 63, 63, 63, 63, 63, 64, 692 64, 67, 64, 67, 89, 64, 64, 64, 64, 64, 693 64, 89, 67, 84, 183, 90, 84, 90, 183, 84, 694 84, 84, 84, 84, 84, 88, 91, 91, 92, 84, 695 88, 93, 95, 94, 95, 92, 94, 96, 97, 96, 696 107, 93, 98, 93, 99, 98, 102, 100, 141, 97, 697 100, 102, 107, 99, 104, 99, 104, 104, 99, 105, 698 699 141, 105, 105, 109, 115, 109, 115, 117, 389, 117, 700 105, 114, 144, 137, 114, 137, 388, 114, 114, 114, 701 114, 114, 114, 116, 144, 116, 116, 118, 116, 118, 702 387, 116, 116, 116, 116, 116, 116, 140, 142, 140, 703 143, 142, 143, 147, 146, 145, 148, 151, 386, 147, 704 118, 138, 145, 148, 138, 146, 151, 138, 138, 138, 705 138, 138, 138, 149, 152, 153, 154, 155, 149, 157, 706 160, 152, 171, 385, 171, 160, 157, 154, 192, 155, 707 153, 158, 384, 166, 158, 166, 166, 158, 158, 158, 708 158, 158, 158, 169, 191, 191, 169, 193, 192, 169, 709 710 169, 169, 169, 169, 169, 194, 196, 196, 193, 198, 711 194, 199, 205, 202, 199, 202, 198, 204, 207, 206, 712 210, 204, 206, 205, 208, 207, 211, 383, 204, 208, 713 213, 210, 213, 221, 222, 221, 222, 245, 211, 212, 714 241, 241, 212, 246, 245, 212, 212, 212, 212, 212, 715 212, 223, 244, 246, 223, 244, 251, 223, 223, 223, 716 223, 223, 223, 247, 249, 253, 247, 255, 251, 257, 717 249, 257, 257, 266, 280, 266, 279, 279, 281, 282, 718 281, 284, 286, 287, 280, 296, 308, 296, 308, 253, 719 309, 255, 330, 382, 282, 310, 319, 309, 319, 381, 720 721 378, 377, 376, 330, 375, 284, 286, 287, 310, 398, 722 398, 374, 372, 370, 368, 367, 365, 363, 362, 361, 723 360, 359, 358, 357, 356, 354, 353, 352, 351, 350, 724 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 725 338, 337, 336, 335, 334, 333, 332, 331, 329, 328, 726 327, 326, 325, 324, 323, 322, 318, 316, 315, 314, 727 313, 312, 311, 307, 306, 305, 304, 303, 302, 301, 728 300, 299, 297, 295, 294, 293, 292, 291, 290, 289, 729 288, 285, 283, 278, 277, 276, 275, 273, 271, 270, 730 269, 268, 267, 265, 264, 263, 262, 261, 260, 259, 731 732 258, 256, 254, 252, 250, 248, 243, 242, 240, 239, 733 238, 236, 234, 233, 232, 231, 230, 229, 226, 225, 734 224, 220, 219, 218, 217, 216, 215, 214, 209, 203, 735 201, 200, 197, 195, 190, 189, 187, 186, 185, 184, 736 181, 179, 178, 177, 175, 173, 172, 170, 168, 167, 737 165, 164, 163, 162, 161, 159, 139, 136, 135, 134, 738 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 739 123, 122, 121, 120, 119, 113, 112, 111, 110, 108, 740 106, 103, 101, 87, 86, 85, 82, 78, 77, 76, 741 75, 74, 72, 71, 70, 69, 68, 66, 62, 61, 742 743 58, 57, 56, 52, 31, 30, 29, 26, 25, 23, 744 22, 18, 14, 13, 11, 9, 397, 397, 397, 397, 745 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 746 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 747 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 748 397, 397, 397, 397, 397 749 } ; 750 751static yy_state_type yy_last_accepting_state; 752static char *yy_last_accepting_cpos; 753 754extern int sfyy_flex_debug; 755int sfyy_flex_debug = 0; 756 757/* The intent behind this definition is that it'll catch 758 * any uses of REJECT which flex missed. 759 */ 760#define REJECT reject_used_but_not_detected 761#define yymore() yymore_used_but_not_detected 762#define YY_MORE_ADJ 0 763#define YY_RESTORE_YY_MORE_OFFSET 764char *sfyytext; 765#line 1 "server6_token.l" 766/* $Id: server6_token.l,v 1.1.1.1 2006/12/04 00:45:34 Exp $ */ 767/* 768 * Copyright (C) International Business Machines Corp., 2003 769 * All rights reserved. 770 * 771 * Redistribution and use in source and binary forms, with or without 772 * modification, are permitted provided that the following conditions 773 * are met: 774 * 1. Redistributions of source code must retain the above copyright 775 * notice, this list of conditions and the following disclaimer. 776 * 2. Redistributions in binary form must reproduce the above copyright 777 * notice, this list of conditions and the following disclaimer in the 778 * documentation and/or other materials provided with the distribution. 779 * 3. Neither the name of the project nor the names of its contributors 780 * may be used to endorse or promote products derived from this software 781 * without specific prior written permission. 782 * 783 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 784 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 785 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 786 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 787 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 788 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 789 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 790 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 791 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 792 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 793 * SUCH DAMAGE. 794 */ 795/* Author: Shirley Ma, xma@us.ibm.com */ 796#line 37 "server6_token.l" 797#include <stdio.h> 798#include <string.h> 799#include <syslog.h> 800#include <errno.h> 801#include <sys/types.h> 802#include <sys/socket.h> 803#include <arpa/inet.h> 804#include <net/if.h> 805 806#include "queue.h" 807#include "dhcp6.h" 808#include "config.h" 809#include "common.h" 810#include <server6_conf.h> 811#include "sf.tab.h" 812 813int num_lines = 1; 814int sfyyerrorcount = 0; 815int sfparse(char *filename); 816extern void sfyyerror(char *msg); 817extern struct rootgroup *globalgroup; 818 819extern int sfyyparse(void); 820 821 822 823 824#line 825 "lex.sfyy.c" 825 826#define INITIAL 0 827#define S_IFACE 1 828#define S_DUID 2 829#define S_OPTION 3 830 831#ifndef YY_NO_UNISTD_H 832/* Special case for "unistd.h", since it is non-ANSI. We include it way 833 * down here because we want the user's section 1 to have been scanned first. 834 * The user has a chance to override it with an option. 835 */ 836#include <unistd.h> 837#endif 838 839#ifndef YY_EXTRA_TYPE 840#define YY_EXTRA_TYPE void * 841#endif 842 843static int yy_init_globals (void ); 844 845/* Accessor methods to globals. 846 These are made visible to non-reentrant scanners for convenience. */ 847 848int sfyylex_destroy (void ); 849 850int sfyyget_debug (void ); 851 852void sfyyset_debug (int debug_flag ); 853 854YY_EXTRA_TYPE sfyyget_extra (void ); 855 856void sfyyset_extra (YY_EXTRA_TYPE user_defined ); 857 858FILE *sfyyget_in (void ); 859 860void sfyyset_in (FILE * in_str ); 861 862FILE *sfyyget_out (void ); 863 864void sfyyset_out (FILE * out_str ); 865 866int sfyyget_leng (void ); 867 868char *sfyyget_text (void ); 869 870int sfyyget_lineno (void ); 871 872void sfyyset_lineno (int line_number ); 873 874/* Macros after this point can all be overridden by user definitions in 875 * section 1. 876 */ 877 878#ifndef YY_SKIP_YYWRAP 879#ifdef __cplusplus 880extern "C" int sfyywrap (void ); 881#else 882extern int sfyywrap (void ); 883#endif 884#endif 885 886 static void yyunput (int c,char *buf_ptr ); 887 888#ifndef yytext_ptr 889static void yy_flex_strncpy (char *,yyconst char *,int ); 890#endif 891 892#ifdef YY_NEED_STRLEN 893static int yy_flex_strlen (yyconst char * ); 894#endif 895 896#ifndef YY_NO_INPUT 897 898#ifdef __cplusplus 899static int yyinput (void ); 900#else 901static int input (void ); 902#endif 903 904#endif 905 906/* Amount of stuff to slurp up with each read. */ 907#ifndef YY_READ_BUF_SIZE 908#define YY_READ_BUF_SIZE 8192 909#endif 910 911/* Copy whatever the last rule matched to the standard output. */ 912#ifndef ECHO 913/* This used to be an fputs(), but since the string might contain NUL's, 914 * we now use fwrite(). 915 */ 916#define ECHO fwrite( sfyytext, sfyyleng, 1, sfyyout ) 917#endif 918 919/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 920 * is returned in "result". 921 */ 922#ifndef YY_INPUT 923#define YY_INPUT(buf,result,max_size) \ 924 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 925 { \ 926 int c = '*'; \ 927 unsigned n; \ 928 for ( n = 0; n < max_size && \ 929 (c = getc( sfyyin )) != EOF && c != '\n'; ++n ) \ 930 buf[n] = (char) c; \ 931 if ( c == '\n' ) \ 932 buf[n++] = (char) c; \ 933 if ( c == EOF && ferror( sfyyin ) ) \ 934 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 935 result = n; \ 936 } \ 937 else \ 938 { \ 939 errno=0; \ 940 while ( (result = fread(buf, 1, max_size, sfyyin))==0 && ferror(sfyyin)) \ 941 { \ 942 if( errno != EINTR) \ 943 { \ 944 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 945 break; \ 946 } \ 947 errno=0; \ 948 clearerr(sfyyin); \ 949 } \ 950 }\ 951\ 952 953#endif 954 955/* No semi-colon after return; correct usage is to write "yyterminate();" - 956 * we don't want an extra ';' after the "return" because that will cause 957 * some compilers to complain about unreachable statements. 958 */ 959#ifndef yyterminate 960#define yyterminate() return YY_NULL 961#endif 962 963/* Number of entries by which start-condition stack grows. */ 964#ifndef YY_START_STACK_INCR 965#define YY_START_STACK_INCR 25 966#endif 967 968/* Report a fatal error. */ 969#ifndef YY_FATAL_ERROR 970#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 971#endif 972 973/* end tables serialization structures and prototypes */ 974 975/* Default declaration of generated scanner - a define so the user can 976 * easily add parameters. 977 */ 978#ifndef YY_DECL 979#define YY_DECL_IS_OURS 1 980 981extern int sfyylex (void); 982 983#define YY_DECL int sfyylex (void) 984#endif /* !YY_DECL */ 985 986/* Code executed at the beginning of each rule, after sfyytext and sfyyleng 987 * have been set up. 988 */ 989#ifndef YY_USER_ACTION 990#define YY_USER_ACTION 991#endif 992 993/* Code executed at the end of each rule. */ 994#ifndef YY_BREAK 995#define YY_BREAK break; 996#endif 997 998#define YY_RULE_SETUP \ 999 YY_USER_ACTION 1000 1001/** The main scanner function which does all the work. 1002 */ 1003YY_DECL 1004{ 1005 register yy_state_type yy_current_state; 1006 register char *yy_cp, *yy_bp; 1007 register int yy_act; 1008 1009#line 83 "server6_token.l" 1010 1011 1012#line 1013 "lex.sfyy.c" 1013 1014 if ( !(yy_init) ) 1015 { 1016 (yy_init) = 1; 1017 1018#ifdef YY_USER_INIT 1019 YY_USER_INIT; 1020#endif 1021 1022 if ( ! (yy_start) ) 1023 (yy_start) = 1; /* first start state */ 1024 1025 if ( ! sfyyin ) 1026 sfyyin = stdin; 1027 1028 if ( ! sfyyout ) 1029 sfyyout = stdout; 1030 1031 if ( ! YY_CURRENT_BUFFER ) { 1032 sfyyensure_buffer_stack (); 1033 YY_CURRENT_BUFFER_LVALUE = 1034 sfyy_create_buffer(sfyyin,YY_BUF_SIZE ); 1035 } 1036 1037 sfyy_load_buffer_state( ); 1038 } 1039 1040 while ( 1 ) /* loops until end-of-file is reached */ 1041 { 1042 yy_cp = (yy_c_buf_p); 1043 1044 /* Support of sfyytext. */ 1045 *yy_cp = (yy_hold_char); 1046 1047 /* yy_bp points to the position in yy_ch_buf of the start of 1048 * the current run. 1049 */ 1050 yy_bp = yy_cp; 1051 1052 yy_current_state = (yy_start); 1053yy_match: 1054 do 1055 { 1056 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 1057 if ( yy_accept[yy_current_state] ) 1058 { 1059 (yy_last_accepting_state) = yy_current_state; 1060 (yy_last_accepting_cpos) = yy_cp; 1061 } 1062 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1063 { 1064 yy_current_state = (int) yy_def[yy_current_state]; 1065 if ( yy_current_state >= 398 ) 1066 yy_c = yy_meta[(unsigned int) yy_c]; 1067 } 1068 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1069 ++yy_cp; 1070 } 1071 while ( yy_base[yy_current_state] != 717 ); 1072 1073yy_find_action: 1074 yy_act = yy_accept[yy_current_state]; 1075 if ( yy_act == 0 ) 1076 { /* have to back up */ 1077 yy_cp = (yy_last_accepting_cpos); 1078 yy_current_state = (yy_last_accepting_state); 1079 yy_act = yy_accept[yy_current_state]; 1080 } 1081 1082 YY_DO_BEFORE_ACTION; 1083 1084do_action: /* This label is used only to access EOF actions. */ 1085 1086 switch ( yy_act ) 1087 { /* beginning of action switch */ 1088 case 0: /* must back up */ 1089 /* undo the effects of YY_DO_BEFORE_ACTION */ 1090 *yy_cp = (yy_hold_char); 1091 yy_cp = (yy_last_accepting_cpos); 1092 yy_current_state = (yy_last_accepting_state); 1093 goto yy_find_action; 1094 1095case 1: 1096YY_RULE_SETUP 1097#line 85 "server6_token.l" 1098{ return GROUP; } 1099 YY_BREAK 1100case 2: 1101YY_RULE_SETUP 1102#line 87 "server6_token.l" 1103{ BEGIN S_IFACE; return INTERFACE; } 1104 YY_BREAK 1105case 3: 1106YY_RULE_SETUP 1107#line 88 "server6_token.l" 1108{ BEGIN INITIAL; sfyylval.str = strdup(sfyytext); return IFNAME;} 1109 YY_BREAK 1110case 4: 1111YY_RULE_SETUP 1112#line 90 "server6_token.l" 1113{ return LINK; } 1114 YY_BREAK 1115case 5: 1116YY_RULE_SETUP 1117#line 91 "server6_token.l" 1118{ return RELAY; } 1119 YY_BREAK 1120case 6: 1121YY_RULE_SETUP 1122#line 92 "server6_token.l" 1123{ return HOST; } 1124 YY_BREAK 1125case 7: 1126YY_RULE_SETUP 1127#line 94 "server6_token.l" 1128{ return POOL; } 1129 YY_BREAK 1130case 8: 1131YY_RULE_SETUP 1132#line 95 "server6_token.l" 1133{ return RANGE; } 1134 YY_BREAK 1135case 9: 1136YY_RULE_SETUP 1137#line 97 "server6_token.l" 1138{ return IAID; } 1139 YY_BREAK 1140case 10: 1141YY_RULE_SETUP 1142#line 98 "server6_token.l" 1143{ return IAIDINFO; } 1144 YY_BREAK 1145case 11: 1146YY_RULE_SETUP 1147#line 100 "server6_token.l" 1148{ BEGIN S_DUID; return DUID; } 1149 YY_BREAK 1150case 12: 1151YY_RULE_SETUP 1152#line 101 "server6_token.l" 1153{ BEGIN INITIAL; sfyylval.str = strdup(sfyytext); return DUID_ID; } 1154 YY_BREAK 1155case 13: 1156YY_RULE_SETUP 1157#line 103 "server6_token.l" 1158{ return PREFIX; } 1159 YY_BREAK 1160case 14: 1161YY_RULE_SETUP 1162#line 104 "server6_token.l" 1163{ return ADDRESS;} 1164 YY_BREAK 1165case 15: 1166YY_RULE_SETUP 1167#line 106 "server6_token.l" 1168{ BEGIN S_OPTION; return ALLOW; } 1169 YY_BREAK 1170case 16: 1171YY_RULE_SETUP 1172#line 107 "server6_token.l" 1173{ BEGIN S_OPTION; return SEND; } 1174 YY_BREAK 1175case 17: 1176YY_RULE_SETUP 1177#line 108 "server6_token.l" 1178{ BEGIN S_OPTION; return OPTION; } 1179 YY_BREAK 1180case 18: 1181YY_RULE_SETUP 1182#line 110 "server6_token.l" 1183{ BEGIN INITIAL; return UNICAST; } 1184 YY_BREAK 1185case 19: 1186YY_RULE_SETUP 1187#line 111 "server6_token.l" 1188{ BEGIN INITIAL; return RAPIDCOMMIT; } 1189 YY_BREAK 1190case 20: 1191YY_RULE_SETUP 1192#line 112 "server6_token.l" 1193{ BEGIN INITIAL; return TEMPIPV6ADDR; } 1194 YY_BREAK 1195case 21: 1196YY_RULE_SETUP 1197#line 113 "server6_token.l" 1198{ BEGIN INITIAL; return INFO_ONLY; } 1199 YY_BREAK 1200case 22: 1201YY_RULE_SETUP 1202#line 114 "server6_token.l" 1203{ BEGIN INITIAL; return DNS_SERVERS;} 1204 YY_BREAK 1205case 23: 1206YY_RULE_SETUP 1207#line 115 "server6_token.l" 1208{ BEGIN INITIAL; return SIP_SERVERS;} 1209 YY_BREAK 1210case 24: 1211YY_RULE_SETUP 1212#line 116 "server6_token.l" 1213{ BEGIN INITIAL; return NTP_SERVERS;} 1214 YY_BREAK 1215case 25: 1216YY_RULE_SETUP 1217#line 118 "server6_token.l" 1218{ return RENEWTIME; } 1219 YY_BREAK 1220case 26: 1221YY_RULE_SETUP 1222#line 119 "server6_token.l" 1223{ return REBINDTIME; } 1224 YY_BREAK 1225case 27: 1226YY_RULE_SETUP 1227#line 120 "server6_token.l" 1228{ return VALIDLIFETIME; } 1229 YY_BREAK 1230case 28: 1231YY_RULE_SETUP 1232#line 121 "server6_token.l" 1233{ return PREFERLIFETIME; } 1234 YY_BREAK 1235case 29: 1236YY_RULE_SETUP 1237#line 122 "server6_token.l" 1238{ return PREFERENCE; } 1239 YY_BREAK 1240case 30: 1241YY_RULE_SETUP 1242#line 124 "server6_token.l" 1243{ return TO; } 1244 YY_BREAK 1245case 31: 1246YY_RULE_SETUP 1247#line 125 "server6_token.l" 1248{ return INFINITY; } 1249 YY_BREAK 1250case 32: 1251*yy_cp = (yy_hold_char); /* undo effects of setting up sfyytext */ 1252(yy_c_buf_p) = yy_cp -= 1; 1253YY_DO_BEFORE_ACTION; /* set up sfyytext again */ 1254YY_RULE_SETUP 1255#line 127 "server6_token.l" 1256{/* ignore comments */} 1257 YY_BREAK 1258case 33: 1259/* rule 33 can match eol */ 1260YY_RULE_SETUP 1261#line 128 "server6_token.l" 1262{num_lines++;} 1263 YY_BREAK 1264case 34: 1265YY_RULE_SETUP 1266#line 129 "server6_token.l" 1267{} 1268 YY_BREAK 1269case 35: 1270YY_RULE_SETUP 1271#line 130 "server6_token.l" 1272{ 1273 struct in6_addr addr; 1274 int i; 1275 1276 i = inet_pton(AF_INET6, sfyytext, &addr); 1277 if (i < 1) { 1278 dprintf(LOG_ERR, "invalid address in line %d", num_lines); 1279 return BAD_TOKEN; 1280 } 1281 1282 sfyylval.addr = addr; 1283 return IPV6ADDR; 1284 } 1285 YY_BREAK 1286case 36: 1287YY_RULE_SETUP 1288#line 144 "server6_token.l" 1289{ sfyylval.num = strtoll(sfyytext, NULL, 10); return NUMBER; } 1290 YY_BREAK 1291case 37: 1292YY_RULE_SETUP 1293#line 145 "server6_token.l" 1294{ sfyylval.snum = strtoll(sfyytext, NULL, 10); return SIGNEDNUMBER; } 1295 YY_BREAK 1296case 38: 1297YY_RULE_SETUP 1298#line 146 "server6_token.l" 1299{ sfyylval.dec = atof(sfyytext); return DECIMAL; } 1300 YY_BREAK 1301case 39: 1302YY_RULE_SETUP 1303#line 147 "server6_token.l" 1304{ 1305 static char name[MAXDNAME]; 1306 strncpy(name, sfyytext, MAXDNAME-1); 1307 name[MAXDNAME-1] = '\0'; 1308 sfyylval.str = name; 1309 return STRING; 1310 } 1311 YY_BREAK 1312case 40: 1313YY_RULE_SETUP 1314#line 154 "server6_token.l" 1315{ return *sfyytext; } 1316 YY_BREAK 1317case 41: 1318YY_RULE_SETUP 1319#line 155 "server6_token.l" 1320{ return BAD_TOKEN; } 1321 YY_BREAK 1322case 42: 1323YY_RULE_SETUP 1324#line 157 "server6_token.l" 1325ECHO; 1326 YY_BREAK 1327#line 1328 "lex.sfyy.c" 1328case YY_STATE_EOF(INITIAL): 1329case YY_STATE_EOF(S_IFACE): 1330case YY_STATE_EOF(S_DUID): 1331case YY_STATE_EOF(S_OPTION): 1332 yyterminate(); 1333 1334 case YY_END_OF_BUFFER: 1335 { 1336 /* Amount of text matched not including the EOB char. */ 1337 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 1338 1339 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1340 *yy_cp = (yy_hold_char); 1341 YY_RESTORE_YY_MORE_OFFSET 1342 1343 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 1344 { 1345 /* We're scanning a new file or input source. It's 1346 * possible that this happened because the user 1347 * just pointed sfyyin at a new source and called 1348 * sfyylex(). If so, then we have to assure 1349 * consistency between YY_CURRENT_BUFFER and our 1350 * globals. Here is the right place to do so, because 1351 * this is the first action (other than possibly a 1352 * back-up) that will match for the new input source. 1353 */ 1354 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1355 YY_CURRENT_BUFFER_LVALUE->yy_input_file = sfyyin; 1356 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 1357 } 1358 1359 /* Note that here we test for yy_c_buf_p "<=" to the position 1360 * of the first EOB in the buffer, since yy_c_buf_p will 1361 * already have been incremented past the NUL character 1362 * (since all states make transitions on EOB to the 1363 * end-of-buffer state). Contrast this with the test 1364 * in input(). 1365 */ 1366 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1367 { /* This was really a NUL. */ 1368 yy_state_type yy_next_state; 1369 1370 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 1371 1372 yy_current_state = yy_get_previous_state( ); 1373 1374 /* Okay, we're now positioned to make the NUL 1375 * transition. We couldn't have 1376 * yy_get_previous_state() go ahead and do it 1377 * for us because it doesn't know how to deal 1378 * with the possibility of jamming (and we don't 1379 * want to build jamming into it because then it 1380 * will run more slowly). 1381 */ 1382 1383 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1384 1385 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1386 1387 if ( yy_next_state ) 1388 { 1389 /* Consume the NUL. */ 1390 yy_cp = ++(yy_c_buf_p); 1391 yy_current_state = yy_next_state; 1392 goto yy_match; 1393 } 1394 1395 else 1396 { 1397 yy_cp = (yy_c_buf_p); 1398 goto yy_find_action; 1399 } 1400 } 1401 1402 else switch ( yy_get_next_buffer( ) ) 1403 { 1404 case EOB_ACT_END_OF_FILE: 1405 { 1406 (yy_did_buffer_switch_on_eof) = 0; 1407 1408 if ( sfyywrap( ) ) 1409 { 1410 /* Note: because we've taken care in 1411 * yy_get_next_buffer() to have set up 1412 * sfyytext, we can now set up 1413 * yy_c_buf_p so that if some total 1414 * hoser (like flex itself) wants to 1415 * call the scanner after we return the 1416 * YY_NULL, it'll still work - another 1417 * YY_NULL will get returned. 1418 */ 1419 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 1420 1421 yy_act = YY_STATE_EOF(YY_START); 1422 goto do_action; 1423 } 1424 1425 else 1426 { 1427 if ( ! (yy_did_buffer_switch_on_eof) ) 1428 YY_NEW_FILE; 1429 } 1430 break; 1431 } 1432 1433 case EOB_ACT_CONTINUE_SCAN: 1434 (yy_c_buf_p) = 1435 (yytext_ptr) + yy_amount_of_matched_text; 1436 1437 yy_current_state = yy_get_previous_state( ); 1438 1439 yy_cp = (yy_c_buf_p); 1440 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1441 goto yy_match; 1442 1443 case EOB_ACT_LAST_MATCH: 1444 (yy_c_buf_p) = 1445 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 1446 1447 yy_current_state = yy_get_previous_state( ); 1448 1449 yy_cp = (yy_c_buf_p); 1450 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1451 goto yy_find_action; 1452 } 1453 break; 1454 } 1455 1456 default: 1457 YY_FATAL_ERROR( 1458 "fatal flex scanner internal error--no action found" ); 1459 } /* end of action switch */ 1460 } /* end of scanning one token */ 1461} /* end of sfyylex */ 1462 1463/* yy_get_next_buffer - try to read in a new buffer 1464 * 1465 * Returns a code representing an action: 1466 * EOB_ACT_LAST_MATCH - 1467 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1468 * EOB_ACT_END_OF_FILE - end of file 1469 */ 1470static int yy_get_next_buffer (void) 1471{ 1472 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1473 register char *source = (yytext_ptr); 1474 register int number_to_move, i; 1475 int ret_val; 1476 1477 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 1478 YY_FATAL_ERROR( 1479 "fatal flex scanner internal error--end of buffer missed" ); 1480 1481 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 1482 { /* Don't try to fill the buffer, so this is an EOF. */ 1483 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 1484 { 1485 /* We matched a single character, the EOB, so 1486 * treat this as a final EOF. 1487 */ 1488 return EOB_ACT_END_OF_FILE; 1489 } 1490 1491 else 1492 { 1493 /* We matched some text prior to the EOB, first 1494 * process it. 1495 */ 1496 return EOB_ACT_LAST_MATCH; 1497 } 1498 } 1499 1500 /* Try to read more data. */ 1501 1502 /* First move last chars to start of buffer. */ 1503 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 1504 1505 for ( i = 0; i < number_to_move; ++i ) 1506 *(dest++) = *(source++); 1507 1508 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1509 /* don't do the read, it's not guaranteed to return an EOF, 1510 * just force an EOF 1511 */ 1512 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 1513 1514 else 1515 { 1516 int num_to_read = 1517 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1518 1519 while ( num_to_read <= 0 ) 1520 { /* Not enough room in the buffer - grow it. */ 1521 1522 /* just a shorter name for the current buffer */ 1523 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 1524 1525 int yy_c_buf_p_offset = 1526 (int) ((yy_c_buf_p) - b->yy_ch_buf); 1527 1528 if ( b->yy_is_our_buffer ) 1529 { 1530 int new_size = b->yy_buf_size * 2; 1531 1532 if ( new_size <= 0 ) 1533 b->yy_buf_size += b->yy_buf_size / 8; 1534 else 1535 b->yy_buf_size *= 2; 1536 1537 b->yy_ch_buf = (char *) 1538 /* Include room in for 2 EOB chars. */ 1539 sfyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 1540 } 1541 else 1542 /* Can't grow it, we don't own it. */ 1543 b->yy_ch_buf = 0; 1544 1545 if ( ! b->yy_ch_buf ) 1546 YY_FATAL_ERROR( 1547 "fatal error - scanner input buffer overflow" ); 1548 1549 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 1550 1551 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 1552 number_to_move - 1; 1553 1554 } 1555 1556 if ( num_to_read > YY_READ_BUF_SIZE ) 1557 num_to_read = YY_READ_BUF_SIZE; 1558 1559 /* Read in more data. */ 1560 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 1561 (yy_n_chars), (size_t) num_to_read ); 1562 1563 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1564 } 1565 1566 if ( (yy_n_chars) == 0 ) 1567 { 1568 if ( number_to_move == YY_MORE_ADJ ) 1569 { 1570 ret_val = EOB_ACT_END_OF_FILE; 1571 sfyyrestart(sfyyin ); 1572 } 1573 1574 else 1575 { 1576 ret_val = EOB_ACT_LAST_MATCH; 1577 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 1578 YY_BUFFER_EOF_PENDING; 1579 } 1580 } 1581 1582 else 1583 ret_val = EOB_ACT_CONTINUE_SCAN; 1584 1585 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 1586 /* Extend the array by 50%, plus the number we really need. */ 1587 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 1588 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) sfyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 1589 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1590 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 1591 } 1592 1593 (yy_n_chars) += number_to_move; 1594 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1595 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1596 1597 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 1598 1599 return ret_val; 1600} 1601 1602/* yy_get_previous_state - get the state just before the EOB char was reached */ 1603 1604 static yy_state_type yy_get_previous_state (void) 1605{ 1606 register yy_state_type yy_current_state; 1607 register char *yy_cp; 1608 1609 yy_current_state = (yy_start); 1610 1611 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 1612 { 1613 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1614 if ( yy_accept[yy_current_state] ) 1615 { 1616 (yy_last_accepting_state) = yy_current_state; 1617 (yy_last_accepting_cpos) = yy_cp; 1618 } 1619 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1620 { 1621 yy_current_state = (int) yy_def[yy_current_state]; 1622 if ( yy_current_state >= 398 ) 1623 yy_c = yy_meta[(unsigned int) yy_c]; 1624 } 1625 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1626 } 1627 1628 return yy_current_state; 1629} 1630 1631/* yy_try_NUL_trans - try to make a transition on the NUL character 1632 * 1633 * synopsis 1634 * next_state = yy_try_NUL_trans( current_state ); 1635 */ 1636 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1637{ 1638 register int yy_is_jam; 1639 register char *yy_cp = (yy_c_buf_p); 1640 1641 register YY_CHAR yy_c = 1; 1642 if ( yy_accept[yy_current_state] ) 1643 { 1644 (yy_last_accepting_state) = yy_current_state; 1645 (yy_last_accepting_cpos) = yy_cp; 1646 } 1647 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1648 { 1649 yy_current_state = (int) yy_def[yy_current_state]; 1650 if ( yy_current_state >= 398 ) 1651 yy_c = yy_meta[(unsigned int) yy_c]; 1652 } 1653 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1654 yy_is_jam = (yy_current_state == 397); 1655 1656 return yy_is_jam ? 0 : yy_current_state; 1657} 1658 1659 static void yyunput (int c, register char * yy_bp ) 1660{ 1661 register char *yy_cp; 1662 1663 yy_cp = (yy_c_buf_p); 1664 1665 /* undo effects of setting up sfyytext */ 1666 *yy_cp = (yy_hold_char); 1667 1668 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1669 { /* need to shift things up to make room */ 1670 /* +2 for EOB chars. */ 1671 register int number_to_move = (yy_n_chars) + 2; 1672 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 1673 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 1674 register char *source = 1675 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 1676 1677 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1678 *--dest = *--source; 1679 1680 yy_cp += (int) (dest - source); 1681 yy_bp += (int) (dest - source); 1682 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 1683 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 1684 1685 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1686 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1687 } 1688 1689 *--yy_cp = (char) c; 1690 1691 (yytext_ptr) = yy_bp; 1692 (yy_hold_char) = *yy_cp; 1693 (yy_c_buf_p) = yy_cp; 1694} 1695 1696#ifndef YY_NO_INPUT 1697#ifdef __cplusplus 1698 static int yyinput (void) 1699#else 1700 static int input (void) 1701#endif 1702 1703{ 1704 int c; 1705 1706 *(yy_c_buf_p) = (yy_hold_char); 1707 1708 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 1709 { 1710 /* yy_c_buf_p now points to the character we want to return. 1711 * If this occurs *before* the EOB characters, then it's a 1712 * valid NUL; if not, then we've hit the end of the buffer. 1713 */ 1714 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1715 /* This was really a NUL. */ 1716 *(yy_c_buf_p) = '\0'; 1717 1718 else 1719 { /* need more input */ 1720 int offset = (yy_c_buf_p) - (yytext_ptr); 1721 ++(yy_c_buf_p); 1722 1723 switch ( yy_get_next_buffer( ) ) 1724 { 1725 case EOB_ACT_LAST_MATCH: 1726 /* This happens because yy_g_n_b() 1727 * sees that we've accumulated a 1728 * token and flags that we need to 1729 * try matching the token before 1730 * proceeding. But for input(), 1731 * there's no matching to consider. 1732 * So convert the EOB_ACT_LAST_MATCH 1733 * to EOB_ACT_END_OF_FILE. 1734 */ 1735 1736 /* Reset buffer status. */ 1737 sfyyrestart(sfyyin ); 1738 1739 /*FALLTHROUGH*/ 1740 1741 case EOB_ACT_END_OF_FILE: 1742 { 1743 if ( sfyywrap( ) ) 1744 return EOF; 1745 1746 if ( ! (yy_did_buffer_switch_on_eof) ) 1747 YY_NEW_FILE; 1748#ifdef __cplusplus 1749 return yyinput(); 1750#else 1751 return input(); 1752#endif 1753 } 1754 1755 case EOB_ACT_CONTINUE_SCAN: 1756 (yy_c_buf_p) = (yytext_ptr) + offset; 1757 break; 1758 } 1759 } 1760 } 1761 1762 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1763 *(yy_c_buf_p) = '\0'; /* preserve sfyytext */ 1764 (yy_hold_char) = *++(yy_c_buf_p); 1765 1766 return c; 1767} 1768#endif /* ifndef YY_NO_INPUT */ 1769 1770/** Immediately switch to a different input stream. 1771 * @param input_file A readable stream. 1772 * 1773 * @note This function does not reset the start condition to @c INITIAL . 1774 */ 1775 void sfyyrestart (FILE * input_file ) 1776{ 1777 1778 if ( ! YY_CURRENT_BUFFER ){ 1779 sfyyensure_buffer_stack (); 1780 YY_CURRENT_BUFFER_LVALUE = 1781 sfyy_create_buffer(sfyyin,YY_BUF_SIZE ); 1782 } 1783 1784 sfyy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1785 sfyy_load_buffer_state( ); 1786} 1787 1788/** Switch to a different input buffer. 1789 * @param new_buffer The new input buffer. 1790 * 1791 */ 1792 void sfyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1793{ 1794 1795 /* TODO. We should be able to replace this entire function body 1796 * with 1797 * sfyypop_buffer_state(); 1798 * sfyypush_buffer_state(new_buffer); 1799 */ 1800 sfyyensure_buffer_stack (); 1801 if ( YY_CURRENT_BUFFER == new_buffer ) 1802 return; 1803 1804 if ( YY_CURRENT_BUFFER ) 1805 { 1806 /* Flush out information for old buffer. */ 1807 *(yy_c_buf_p) = (yy_hold_char); 1808 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1809 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1810 } 1811 1812 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1813 sfyy_load_buffer_state( ); 1814 1815 /* We don't actually know whether we did this switch during 1816 * EOF (sfyywrap()) processing, but the only time this flag 1817 * is looked at is after sfyywrap() is called, so it's safe 1818 * to go ahead and always set it. 1819 */ 1820 (yy_did_buffer_switch_on_eof) = 1; 1821} 1822 1823static void sfyy_load_buffer_state (void) 1824{ 1825 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1826 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1827 sfyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1828 (yy_hold_char) = *(yy_c_buf_p); 1829} 1830 1831/** Allocate and initialize an input buffer state. 1832 * @param file A readable stream. 1833 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1834 * 1835 * @return the allocated buffer state. 1836 */ 1837 YY_BUFFER_STATE sfyy_create_buffer (FILE * file, int size ) 1838{ 1839 YY_BUFFER_STATE b; 1840 1841 b = (YY_BUFFER_STATE) sfyyalloc(sizeof( struct yy_buffer_state ) ); 1842 if ( ! b ) 1843 YY_FATAL_ERROR( "out of dynamic memory in sfyy_create_buffer()" ); 1844 1845 b->yy_buf_size = size; 1846 1847 /* yy_ch_buf has to be 2 characters longer than the size given because 1848 * we need to put in 2 end-of-buffer characters. 1849 */ 1850 b->yy_ch_buf = (char *) sfyyalloc(b->yy_buf_size + 2 ); 1851 if ( ! b->yy_ch_buf ) 1852 YY_FATAL_ERROR( "out of dynamic memory in sfyy_create_buffer()" ); 1853 1854 b->yy_is_our_buffer = 1; 1855 1856 sfyy_init_buffer(b,file ); 1857 1858 return b; 1859} 1860 1861/** Destroy the buffer. 1862 * @param b a buffer created with sfyy_create_buffer() 1863 * 1864 */ 1865 void sfyy_delete_buffer (YY_BUFFER_STATE b ) 1866{ 1867 1868 if ( ! b ) 1869 return; 1870 1871 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 1872 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 1873 1874 if ( b->yy_is_our_buffer ) 1875 sfyyfree((void *) b->yy_ch_buf ); 1876 1877 sfyyfree((void *) b ); 1878} 1879 1880#ifndef __cplusplus 1881extern int isatty (int ); 1882#endif /* __cplusplus */ 1883 1884/* Initializes or reinitializes a buffer. 1885 * This function is sometimes called more than once on the same buffer, 1886 * such as during a sfyyrestart() or at EOF. 1887 */ 1888 static void sfyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1889 1890{ 1891 int oerrno = errno; 1892 1893 sfyy_flush_buffer(b ); 1894 1895 b->yy_input_file = file; 1896 b->yy_fill_buffer = 1; 1897 1898 /* If b is the current buffer, then sfyy_init_buffer was _probably_ 1899 * called from sfyyrestart() or through yy_get_next_buffer. 1900 * In that case, we don't want to reset the lineno or column. 1901 */ 1902 if (b != YY_CURRENT_BUFFER){ 1903 b->yy_bs_lineno = 1; 1904 b->yy_bs_column = 0; 1905 } 1906 1907 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1908 1909 errno = oerrno; 1910} 1911 1912/** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1913 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1914 * 1915 */ 1916 void sfyy_flush_buffer (YY_BUFFER_STATE b ) 1917{ 1918 if ( ! b ) 1919 return; 1920 1921 b->yy_n_chars = 0; 1922 1923 /* We always need two end-of-buffer characters. The first causes 1924 * a transition to the end-of-buffer state. The second causes 1925 * a jam in that state. 1926 */ 1927 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 1928 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 1929 1930 b->yy_buf_pos = &b->yy_ch_buf[0]; 1931 1932 b->yy_at_bol = 1; 1933 b->yy_buffer_status = YY_BUFFER_NEW; 1934 1935 if ( b == YY_CURRENT_BUFFER ) 1936 sfyy_load_buffer_state( ); 1937} 1938 1939/** Pushes the new state onto the stack. The new state becomes 1940 * the current state. This function will allocate the stack 1941 * if necessary. 1942 * @param new_buffer The new state. 1943 * 1944 */ 1945void sfyypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1946{ 1947 if (new_buffer == NULL) 1948 return; 1949 1950 sfyyensure_buffer_stack(); 1951 1952 /* This block is copied from sfyy_switch_to_buffer. */ 1953 if ( YY_CURRENT_BUFFER ) 1954 { 1955 /* Flush out information for old buffer. */ 1956 *(yy_c_buf_p) = (yy_hold_char); 1957 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1958 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1959 } 1960 1961 /* Only push if top exists. Otherwise, replace top. */ 1962 if (YY_CURRENT_BUFFER) 1963 (yy_buffer_stack_top)++; 1964 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1965 1966 /* copied from sfyy_switch_to_buffer. */ 1967 sfyy_load_buffer_state( ); 1968 (yy_did_buffer_switch_on_eof) = 1; 1969} 1970 1971/** Removes and deletes the top of the stack, if present. 1972 * The next element becomes the new top. 1973 * 1974 */ 1975void sfyypop_buffer_state (void) 1976{ 1977 if (!YY_CURRENT_BUFFER) 1978 return; 1979 1980 sfyy_delete_buffer(YY_CURRENT_BUFFER ); 1981 YY_CURRENT_BUFFER_LVALUE = NULL; 1982 if ((yy_buffer_stack_top) > 0) 1983 --(yy_buffer_stack_top); 1984 1985 if (YY_CURRENT_BUFFER) { 1986 sfyy_load_buffer_state( ); 1987 (yy_did_buffer_switch_on_eof) = 1; 1988 } 1989} 1990 1991/* Allocates the stack if it does not exist. 1992 * Guarantees space for at least one push. 1993 */ 1994static void sfyyensure_buffer_stack (void) 1995{ 1996 int num_to_alloc; 1997 1998 if (!(yy_buffer_stack)) { 1999 2000 /* First allocation is just for 2 elements, since we don't know if this 2001 * scanner will even need a stack. We use 2 instead of 1 to avoid an 2002 * immediate realloc on the next call. 2003 */ 2004 num_to_alloc = 1; 2005 (yy_buffer_stack) = (struct yy_buffer_state**)sfyyalloc 2006 (num_to_alloc * sizeof(struct yy_buffer_state*) 2007 ); 2008 if ( ! (yy_buffer_stack) ) 2009 YY_FATAL_ERROR( "out of dynamic memory in sfyyensure_buffer_stack()" ); 2010 2011 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 2012 2013 (yy_buffer_stack_max) = num_to_alloc; 2014 (yy_buffer_stack_top) = 0; 2015 return; 2016 } 2017 2018 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 2019 2020 /* Increase the buffer to prepare for a possible push. */ 2021 int grow_size = 8 /* arbitrary grow size */; 2022 2023 num_to_alloc = (yy_buffer_stack_max) + grow_size; 2024 (yy_buffer_stack) = (struct yy_buffer_state**)sfyyrealloc 2025 ((yy_buffer_stack), 2026 num_to_alloc * sizeof(struct yy_buffer_state*) 2027 ); 2028 if ( ! (yy_buffer_stack) ) 2029 YY_FATAL_ERROR( "out of dynamic memory in sfyyensure_buffer_stack()" ); 2030 2031 /* zero only the new slots.*/ 2032 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 2033 (yy_buffer_stack_max) = num_to_alloc; 2034 } 2035} 2036 2037/** Setup the input buffer state to scan directly from a user-specified character buffer. 2038 * @param base the character buffer 2039 * @param size the size in bytes of the character buffer 2040 * 2041 * @return the newly allocated buffer state object. 2042 */ 2043YY_BUFFER_STATE sfyy_scan_buffer (char * base, yy_size_t size ) 2044{ 2045 YY_BUFFER_STATE b; 2046 2047 if ( size < 2 || 2048 base[size-2] != YY_END_OF_BUFFER_CHAR || 2049 base[size-1] != YY_END_OF_BUFFER_CHAR ) 2050 /* They forgot to leave room for the EOB's. */ 2051 return 0; 2052 2053 b = (YY_BUFFER_STATE) sfyyalloc(sizeof( struct yy_buffer_state ) ); 2054 if ( ! b ) 2055 YY_FATAL_ERROR( "out of dynamic memory in sfyy_scan_buffer()" ); 2056 2057 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 2058 b->yy_buf_pos = b->yy_ch_buf = base; 2059 b->yy_is_our_buffer = 0; 2060 b->yy_input_file = 0; 2061 b->yy_n_chars = b->yy_buf_size; 2062 b->yy_is_interactive = 0; 2063 b->yy_at_bol = 1; 2064 b->yy_fill_buffer = 0; 2065 b->yy_buffer_status = YY_BUFFER_NEW; 2066 2067 sfyy_switch_to_buffer(b ); 2068 2069 return b; 2070} 2071 2072/** Setup the input buffer state to scan a string. The next call to sfyylex() will 2073 * scan from a @e copy of @a str. 2074 * @param yystr a NUL-terminated string to scan 2075 * 2076 * @return the newly allocated buffer state object. 2077 * @note If you want to scan bytes that may contain NUL values, then use 2078 * sfyy_scan_bytes() instead. 2079 */ 2080YY_BUFFER_STATE sfyy_scan_string (yyconst char * yystr ) 2081{ 2082 2083 return sfyy_scan_bytes(yystr,strlen(yystr) ); 2084} 2085 2086/** Setup the input buffer state to scan the given bytes. The next call to sfyylex() will 2087 * scan from a @e copy of @a bytes. 2088 * @param bytes the byte buffer to scan 2089 * @param len the number of bytes in the buffer pointed to by @a bytes. 2090 * 2091 * @return the newly allocated buffer state object. 2092 */ 2093YY_BUFFER_STATE sfyy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 2094{ 2095 YY_BUFFER_STATE b; 2096 char *buf; 2097 yy_size_t n; 2098 int i; 2099 2100 /* Get memory for full buffer, including space for trailing EOB's. */ 2101 n = _yybytes_len + 2; 2102 buf = (char *) sfyyalloc(n ); 2103 if ( ! buf ) 2104 YY_FATAL_ERROR( "out of dynamic memory in sfyy_scan_bytes()" ); 2105 2106 for ( i = 0; i < _yybytes_len; ++i ) 2107 buf[i] = yybytes[i]; 2108 2109 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 2110 2111 b = sfyy_scan_buffer(buf,n ); 2112 if ( ! b ) 2113 YY_FATAL_ERROR( "bad buffer in sfyy_scan_bytes()" ); 2114 2115 /* It's okay to grow etc. this buffer, and we should throw it 2116 * away when we're done. 2117 */ 2118 b->yy_is_our_buffer = 1; 2119 2120 return b; 2121} 2122 2123#ifndef YY_EXIT_FAILURE 2124#define YY_EXIT_FAILURE 2 2125#endif 2126 2127static void yy_fatal_error (yyconst char* msg ) 2128{ 2129 (void) fprintf( stderr, "%s\n", msg ); 2130 exit( YY_EXIT_FAILURE ); 2131} 2132 2133/* Redefine yyless() so it works in section 3 code. */ 2134 2135#undef yyless 2136#define yyless(n) \ 2137 do \ 2138 { \ 2139 /* Undo effects of setting up sfyytext. */ \ 2140 int yyless_macro_arg = (n); \ 2141 YY_LESS_LINENO(yyless_macro_arg);\ 2142 sfyytext[sfyyleng] = (yy_hold_char); \ 2143 (yy_c_buf_p) = sfyytext + yyless_macro_arg; \ 2144 (yy_hold_char) = *(yy_c_buf_p); \ 2145 *(yy_c_buf_p) = '\0'; \ 2146 sfyyleng = yyless_macro_arg; \ 2147 } \ 2148 while ( 0 ) 2149 2150/* Accessor methods (get/set functions) to struct members. */ 2151 2152/** Get the current line number. 2153 * 2154 */ 2155int sfyyget_lineno (void) 2156{ 2157 2158 return sfyylineno; 2159} 2160 2161/** Get the input stream. 2162 * 2163 */ 2164FILE *sfyyget_in (void) 2165{ 2166 return sfyyin; 2167} 2168 2169/** Get the output stream. 2170 * 2171 */ 2172FILE *sfyyget_out (void) 2173{ 2174 return sfyyout; 2175} 2176 2177/** Get the length of the current token. 2178 * 2179 */ 2180int sfyyget_leng (void) 2181{ 2182 return sfyyleng; 2183} 2184 2185/** Get the current token. 2186 * 2187 */ 2188 2189char *sfyyget_text (void) 2190{ 2191 return sfyytext; 2192} 2193 2194/** Set the current line number. 2195 * @param line_number 2196 * 2197 */ 2198void sfyyset_lineno (int line_number ) 2199{ 2200 2201 sfyylineno = line_number; 2202} 2203 2204/** Set the input stream. This does not discard the current 2205 * input buffer. 2206 * @param in_str A readable stream. 2207 * 2208 * @see sfyy_switch_to_buffer 2209 */ 2210void sfyyset_in (FILE * in_str ) 2211{ 2212 sfyyin = in_str ; 2213} 2214 2215void sfyyset_out (FILE * out_str ) 2216{ 2217 sfyyout = out_str ; 2218} 2219 2220int sfyyget_debug (void) 2221{ 2222 return sfyy_flex_debug; 2223} 2224 2225void sfyyset_debug (int bdebug ) 2226{ 2227 sfyy_flex_debug = bdebug ; 2228} 2229 2230static int yy_init_globals (void) 2231{ 2232 /* Initialization is the same as for the non-reentrant scanner. 2233 * This function is called from sfyylex_destroy(), so don't allocate here. 2234 */ 2235 2236 (yy_buffer_stack) = 0; 2237 (yy_buffer_stack_top) = 0; 2238 (yy_buffer_stack_max) = 0; 2239 (yy_c_buf_p) = (char *) 0; 2240 (yy_init) = 0; 2241 (yy_start) = 0; 2242 2243/* Defined in main.c */ 2244#ifdef YY_STDINIT 2245 sfyyin = stdin; 2246 sfyyout = stdout; 2247#else 2248 sfyyin = (FILE *) 0; 2249 sfyyout = (FILE *) 0; 2250#endif 2251 2252 /* For future reference: Set errno on error, since we are called by 2253 * sfyylex_init() 2254 */ 2255 return 0; 2256} 2257 2258/* sfyylex_destroy is for both reentrant and non-reentrant scanners. */ 2259int sfyylex_destroy (void) 2260{ 2261 2262 /* Pop the buffer stack, destroying each element. */ 2263 while(YY_CURRENT_BUFFER){ 2264 sfyy_delete_buffer(YY_CURRENT_BUFFER ); 2265 YY_CURRENT_BUFFER_LVALUE = NULL; 2266 sfyypop_buffer_state(); 2267 } 2268 2269 /* Destroy the stack itself. */ 2270 sfyyfree((yy_buffer_stack) ); 2271 (yy_buffer_stack) = NULL; 2272 2273 /* Reset the globals. This is important in a non-reentrant scanner so the next time 2274 * sfyylex() is called, initialization will occur. */ 2275 yy_init_globals( ); 2276 2277 return 0; 2278} 2279 2280/* 2281 * Internal utility routines. 2282 */ 2283 2284#ifndef yytext_ptr 2285static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 2286{ 2287 register int i; 2288 for ( i = 0; i < n; ++i ) 2289 s1[i] = s2[i]; 2290} 2291#endif 2292 2293#ifdef YY_NEED_STRLEN 2294static int yy_flex_strlen (yyconst char * s ) 2295{ 2296 register int n; 2297 for ( n = 0; s[n]; ++n ) 2298 ; 2299 2300 return n; 2301} 2302#endif 2303 2304void *sfyyalloc (yy_size_t size ) 2305{ 2306 return (void *) malloc( size ); 2307} 2308 2309void *sfyyrealloc (void * ptr, yy_size_t size ) 2310{ 2311 /* The cast to (char *) in the following accommodates both 2312 * implementations that use char* generic pointers, and those 2313 * that use void* generic pointers. It works with the latter 2314 * because both ANSI C and C++ allow castless assignment from 2315 * any pointer type to void*, and deal with argument conversions 2316 * as though doing an assignment. 2317 */ 2318 return (void *) realloc( (char *) ptr, size ); 2319} 2320 2321void sfyyfree (void * ptr ) 2322{ 2323 free( (char *) ptr ); /* see sfyyrealloc() for (char *) cast */ 2324} 2325 2326#define YYTABLES_NAME "yytables" 2327 2328#line 157 "server6_token.l" 2329 2330 2331 2332int 2333sfparse(conf) 2334 char *conf; 2335{ 2336 if ((sfyyin = fopen(conf, "r")) == NULL) { 2337 if (errno == ENOENT) 2338 return(0); 2339 dprintf(LOG_ERR, "sfparse: fopen(%s): %s", 2340 conf, strerror(errno)); 2341 printf("open error\n"); 2342 return(-1); 2343 } 2344 2345 if (sfyyparse() || sfyyerrorcount) { 2346 sfyyerror("fatal parse failure: exiting"); 2347 return(-1); 2348 } 2349 post_config(globalgroup); 2350 2351 return (0); 2352} 2353 2354