/* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 33 #define YY_END_OF_BUFFER 34 static yyconst short int yy_accept[320] = { 0, 0, 0, 34, 33, 1, 15, 13, 17, 18, 20, 19, 6, 33, 6, 2, 2, 2, 2, 11, 7, 9, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 16, 31, 31, 31, 31, 14, 1, 8, 0, 0, 0, 0, 6, 24, 0, 6, 6, 0, 0, 0, 2, 0, 2, 6, 2, 0, 12, 7, 10, 31, 31, 31, 31, 31, 31, 5, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 3, 3, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 5, 5, 5, 32, 6, 6, 6, 0, 32, 32, 32, 32, 32, 32, 2, 2, 2, 32, 32, 32, 32, 32, 6, 5, 5, 5, 2, 32, 32, 31, 3, 4, 26, 31, 31, 31, 31, 31, 31, 3, 5, 31, 31, 31, 0, 32, 32, 32, 32, 0, 32, 0, 6, 5, 6, 6, 6, 0, 6, 32, 32, 32, 0, 32, 2, 0, 2, 32, 32, 32, 6, 5, 32, 31, 31, 31, 31, 31, 31, 31, 23, 31, 31, 27, 31, 28, 31, 32, 32, 32, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 32, 0, 0, 5, 5, 5, 5, 32, 32, 0, 0, 31, 0, 31, 31, 29, 25, 22, 31, 0, 5, 0, 6, 5, 5, 0, 6, 32, 5, 5, 5, 5, 0, 0, 0, 5, 32, 32, 32, 5, 5, 5, 5, 32, 32, 32, 31, 4, 4, 4, 31, 31, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 0, 5, 32, 30, 21, 0, 0, 0, 0, 5, 5, 5, 0, 32, 32, 32, 0, 0, 0, 0, 0, 32, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 0, 0, 5, 3, 0, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 1, 5, 1, 6, 7, 8, 1, 9, 10, 1, 11, 12, 13, 14, 15, 16, 16, 17, 17, 18, 18, 19, 1, 20, 21, 22, 1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 40, 47, 48, 1, 1, 1, 49, 1, 1, 24, 25, 50, 27, 51, 29, 30, 31, 32, 33, 34, 35, 52, 37, 38, 39, 40, 41, 53, 54, 44, 45, 46, 40, 47, 48, 1, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[56] = { 0, 1, 1, 2, 1, 1, 1, 1, 3, 1, 4, 5, 6, 6, 6, 6, 6, 6, 6, 7, 1, 1, 1, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 9, 9, 9, 9, 9, 1 } ; static yyconst short int yy_base[337] = { 0, 0, 0, 850, 1792, 54, 828, 1792, 1792, 1792, 47, 1792, 59, 0, 68, 82, 43, 94, 103, 826, 810, 783, 96, 0, 92, 37, 97, 25, 103, 65, 764, 105, 101, 113, 153, 108, 1792, 111, 39, 134, 119, 1792, 60, 1792, 174, 190, 201, 212, 221, 782, 232, 243, 254, 266, 277, 288, 299, 310, 321, 333, 344, 356, 1792, 1792, 1792, 0, 738, 704, 708, 640, 641, 0, 617, 127, 619, 599, 592, 582, 568, 67, 113, 566, 522, 91, 527, 515, 118, 515, 128, 508, 363, 400, 346, 355, 373, 162, 499, 110, 171, 502, 379, 493, 407, 170, 438, 0, 0, 416, 452, 419, 417, 466, 445, 172, 482, 194, 494, 505, 418, 514, 526, 534, 545, 556, 564, 573, 582, 594, 603, 613, 623, 633, 186, 231, 643, 213, 659, 667, 680, 462, 692, 699, 0, 450, 224, 352, 366, 233, 235, 285, 281, 706, 650, 291, 717, 724, 740, 756, 0, 768, 0, 775, 782, 0, 0, 793, 800, 811, 820, 828, 391, 311, 840, 849, 857, 869, 878, 888, 897, 906, 0, 0, 916, 316, 926, 391, 433, 374, 933, 338, 0, 435, 463, 0, 338, 0, 940, 1792, 947, 957, 965, 674, 0, 1792, 972, 981, 990, 999, 1008, 1017, 1031, 1045, 1057, 1069, 1076, 1083, 1095, 1107, 1119, 1131, 1144, 1156, 1167, 235, 1174, 1183, 379, 0, 0, 0, 1188, 1195, 1202, 345, 1211, 1220, 1229, 1241, 0, 343, 1248, 731, 301, 291, 1256, 747, 289, 1264, 1276, 1290, 1300, 1308, 1320, 1332, 483, 419, 687, 0, 435, 1344, 230, 1792, 461, 254, 1351, 763, 1792, 1358, 1367, 1376, 1385, 460, 518, 0, 1392, 1400, 1407, 1412, 1424, 1436, 1448, 1455, 0, 0, 0, 714, 1467, 1475, 202, 1483, 1490, 1497, 1504, 1511, 1523, 1535, 1547, 1024, 1554, 1561, 1569, 1576, 1588, 1595, 1607, 1612, 1620, 164, 1628, 1636, 1644, 1652, 804, 125, 1660, 1667, 45, 1792, 1672, 1792, 1690, 1699, 1708, 1712, 1716, 1723, 1727, 1731, 1737, 1742, 1748, 1753, 1759, 1762, 1770, 1774, 1782 } ; static yyconst short int yy_def[337] = { 0, 319, 1, 319, 319, 319, 319, 319, 319, 319, 320, 319, 319, 321, 322, 322, 15, 15, 320, 319, 319, 319, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 324, 323, 319, 323, 323, 323, 323, 319, 319, 319, 319, 319, 319, 325, 319, 321, 319, 319, 18, 319, 325, 319, 18, 319, 18, 319, 18, 319, 319, 319, 319, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 326, 326, 91, 91, 323, 323, 323, 323, 323, 319, 319, 320, 320, 320, 320, 327, 321, 328, 319, 108, 329, 319, 111, 330, 320, 114, 114, 319, 331, 319, 119, 114, 114, 114, 114, 114, 114, 114, 18, 18, 18, 18, 332, 333, 319, 112, 18, 320, 320, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 325, 319, 320, 320, 327, 319, 109, 319, 319, 112, 135, 319, 114, 319, 114, 319, 109, 109, 319, 114, 114, 319, 114, 114, 114, 114, 135, 135, 114, 323, 323, 184, 323, 323, 184, 323, 323, 323, 323, 323, 323, 323, 323, 319, 114, 114, 334, 334, 334, 319, 319, 334, 334, 334, 319, 334, 334, 334, 319, 319, 319, 334, 334, 334, 319, 320, 320, 319, 319, 323, 319, 323, 323, 323, 323, 323, 323, 319, 319, 319, 319, 319, 319, 154, 236, 171, 334, 334, 334, 319, 319, 319, 319, 319, 319, 114, 114, 334, 334, 334, 171, 335, 254, 254, 323, 319, 319, 319, 323, 323, 319, 319, 319, 319, 319, 319, 319, 236, 271, 135, 319, 319, 319, 319, 319, 319, 319, 319, 254, 323, 323, 319, 336, 336, 336, 319, 319, 319, 319, 336, 336, 336, 319, 319, 319, 319, 319, 319, 154, 319, 319, 319, 319, 319, 319, 319, 319, 301, 311, 254, 319, 319, 319, 319, 319, 0, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319 } ; static yyconst short int yy_nxt[1848] = { 0, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 18, 4, 19, 20, 21, 4, 22, 23, 24, 25, 23, 26, 23, 23, 27, 28, 23, 23, 29, 30, 31, 32, 23, 23, 33, 34, 23, 23, 35, 23, 23, 36, 37, 38, 29, 39, 40, 41, 42, 42, 45, 58, 58, 58, 42, 42, 315, 73, 46, 87, 77, 48, 47, 48, 48, 48, 48, 48, 48, 48, 51, 77, 52, 52, 52, 52, 52, 52, 52, 53, 73, 80, 87, 54, 51, 55, 56, 56, 56, 56, 56, 56, 56, 57, 141, 81, 141, 54, 58, 58, 58, 58, 58, 58, 58, 59, 45, 60, 60, 60, 60, 60, 60, 60, 61, 66, 70, 74, 47, 78, 71, 75, 72, 83, 84, 67, 141, 68, 94, 86, 76, 85, 69, 87, 95, 70, 315, 141, 153, 79, 74, 72, 96, 97, 88, 141, 141, 83, 148, 89, 86, 94, 141, 95, 153, 98, 87, 65, 65, 65, 65, 65, 65, 65, 95, 88, 151, 151, 152, 141, 89, 148, 99, 45, 99, 315, 91, 92, 100, 100, 100, 100, 100, 100, 100, 47, 99, 154, 48, 93, 101, 95, 65, 65, 102, 102, 102, 102, 102, 102, 102, 103, 168, 168, 168, 102, 104, 104, 104, 104, 104, 104, 99, 300, 95, 48, 100, 100, 100, 100, 100, 100, 100, 48, 319, 48, 48, 48, 48, 48, 48, 48, 99, 48, 261, 261, 107, 107, 108, 109, 109, 109, 109, 99, 190, 48, 154, 110, 110, 111, 112, 112, 112, 112, 113, 194, 285, 44, 114, 114, 115, 116, 116, 116, 116, 117, 99, 190, 193, 258, 118, 118, 119, 120, 120, 109, 109, 99, 194, 193, 258, 107, 107, 108, 109, 109, 109, 109, 101, 151, 151, 152, 121, 121, 122, 123, 123, 123, 123, 113, 276, 195, 276, 124, 124, 125, 126, 126, 126, 126, 103, 195, 275, 214, 127, 128, 129, 130, 130, 131, 131, 113, 319, 132, 195, 124, 124, 125, 126, 126, 126, 126, 46, 99, 195, 48, 223, 133, 133, 134, 135, 135, 135, 135, 113, 267, 132, 267, 136, 136, 136, 136, 136, 136, 136, 46, 103, 229, 226, 223, 137, 138, 138, 138, 138, 104, 104, 65, 65, 65, 65, 65, 65, 65, 150, 149, 224, 151, 151, 152, 191, 226, 71, 155, 155, 155, 155, 155, 155, 155, 150, 71, 95, 213, 154, 192, 191, 262, 149, 187, 187, 187, 65, 65, 65, 65, 65, 65, 65, 65, 65, 156, 156, 156, 156, 156, 156, 156, 159, 162, 159, 262, 47, 155, 155, 155, 155, 161, 161, 161, 276, 154, 154, 154, 154, 224, 149, 187, 187, 65, 65, 45, 157, 157, 157, 157, 157, 157, 157, 164, 164, 164, 164, 47, 159, 227, 160, 160, 160, 160, 155, 155, 155, 161, 273, 273, 273, 154, 162, 283, 163, 163, 163, 163, 164, 164, 164, 161, 227, 189, 283, 154, 113, 228, 165, 319, 166, 166, 166, 166, 166, 166, 166, 167, 276, 183, 284, 47, 168, 168, 168, 168, 168, 168, 168, 99, 228, 284, 47, 169, 169, 169, 169, 169, 100, 100, 159, 154, 170, 170, 170, 170, 171, 171, 171, 161, 164, 164, 164, 154, 171, 171, 171, 171, 44, 95, 172, 95, 173, 173, 173, 173, 173, 173, 173, 44, 141, 172, 147, 173, 173, 173, 173, 156, 156, 156, 44, 146, 172, 141, 156, 156, 156, 156, 156, 156, 156, 45, 174, 174, 174, 174, 174, 174, 174, 175, 45, 174, 174, 174, 174, 176, 176, 176, 175, 45, 176, 176, 176, 176, 176, 176, 176, 175, 44, 95, 172, 141, 177, 177, 177, 177, 177, 177, 177, 172, 145, 178, 178, 178, 178, 178, 178, 178, 167, 172, 95, 178, 178, 178, 178, 179, 179, 179, 167, 172, 144, 179, 179, 179, 179, 179, 179, 179, 167, 172, 141, 157, 157, 157, 157, 157, 157, 157, 167, 48, 143, 181, 181, 181, 181, 164, 164, 164, 196, 196, 196, 196, 154, 113, 142, 132, 141, 176, 176, 176, 176, 176, 176, 176, 46, 182, 182, 182, 182, 182, 182, 182, 232, 232, 232, 232, 47, 45, 179, 179, 179, 179, 179, 179, 179, 282, 282, 282, 282, 47, 184, 184, 185, 186, 187, 187, 187, 188, 188, 188, 186, 187, 187, 187, 196, 196, 196, 196, 196, 196, 196, 197, 296, 296, 297, 319, 319, 319, 319, 319, 319, 319, 155, 155, 155, 155, 155, 155, 155, 274, 274, 274, 274, 154, 113, 141, 275, 140, 198, 198, 198, 198, 198, 198, 198, 246, 246, 246, 246, 47, 113, 139, 276, 45, 199, 199, 199, 199, 199, 199, 199, 266, 266, 266, 266, 47, 200, 200, 201, 202, 202, 202, 203, 204, 204, 204, 204, 204, 48, 106, 205, 205, 206, 207, 207, 207, 208, 99, 82, 48, 64, 209, 209, 210, 211, 211, 211, 135, 168, 168, 168, 168, 168, 168, 168, 99, 155, 155, 155, 212, 212, 212, 212, 212, 100, 100, 132, 63, 168, 168, 168, 168, 168, 168, 168, 44, 171, 171, 171, 171, 171, 171, 171, 62, 99, 43, 319, 154, 215, 215, 216, 217, 217, 217, 218, 172, 319, 198, 198, 198, 198, 198, 198, 198, 45, 176, 176, 176, 176, 176, 176, 176, 175, 103, 319, 319, 319, 219, 220, 220, 220, 220, 104, 104, 132, 45, 176, 176, 176, 176, 176, 176, 176, 46, 221, 319, 198, 198, 198, 198, 198, 198, 198, 221, 45, 199, 199, 199, 199, 199, 199, 199, 222, 45, 199, 199, 199, 199, 199, 199, 199, 44, 222, 319, 198, 198, 198, 198, 198, 198, 198, 44, 224, 319, 225, 225, 225, 225, 225, 225, 225, 187, 187, 187, 187, 187, 187, 187, 230, 230, 230, 230, 230, 44, 319, 198, 198, 198, 198, 198, 198, 198, 44, 44, 45, 199, 199, 199, 199, 199, 199, 199, 44, 232, 232, 232, 232, 232, 232, 232, 233, 233, 233, 233, 233, 233, 233, 234, 319, 235, 235, 235, 235, 235, 235, 235, 234, 319, 235, 235, 235, 235, 234, 234, 234, 234, 319, 234, 234, 234, 234, 234, 234, 234, 48, 319, 48, 48, 48, 48, 48, 48, 48, 234, 319, 236, 236, 236, 236, 236, 236, 236, 304, 304, 304, 304, 237, 234, 319, 236, 236, 236, 236, 238, 238, 238, 319, 319, 319, 319, 237, 234, 319, 238, 238, 238, 238, 238, 238, 238, 319, 319, 319, 319, 237, 239, 239, 239, 239, 239, 239, 239, 319, 319, 319, 319, 154, 240, 240, 241, 242, 242, 242, 243, 244, 244, 245, 246, 246, 246, 246, 247, 247, 247, 247, 247, 247, 247, 319, 319, 319, 319, 237, 247, 247, 247, 247, 248, 248, 248, 319, 319, 319, 319, 237, 248, 248, 248, 248, 248, 248, 248, 319, 319, 319, 319, 237, 155, 155, 155, 155, 155, 155, 155, 319, 319, 319, 319, 154, 249, 249, 249, 249, 249, 249, 249, 319, 319, 319, 319, 47, 45, 250, 250, 250, 250, 250, 250, 250, 319, 99, 319, 319, 47, 251, 251, 252, 253, 253, 253, 254, 99, 319, 319, 319, 255, 255, 256, 257, 257, 257, 257, 259, 259, 259, 260, 261, 261, 261, 224, 319, 230, 230, 230, 230, 230, 263, 263, 263, 263, 263, 263, 263, 264, 264, 265, 266, 266, 266, 266, 264, 264, 265, 266, 266, 266, 266, 48, 319, 268, 268, 269, 270, 270, 270, 270, 48, 319, 268, 268, 269, 270, 270, 270, 270, 48, 319, 271, 271, 272, 273, 273, 273, 273, 319, 319, 319, 319, 154, 264, 264, 265, 266, 266, 266, 266, 274, 274, 274, 274, 274, 274, 274, 275, 246, 246, 246, 246, 246, 246, 246, 276, 277, 277, 278, 279, 279, 279, 279, 319, 319, 319, 319, 154, 277, 277, 278, 279, 279, 279, 279, 319, 319, 319, 319, 154, 280, 319, 198, 198, 198, 198, 198, 198, 198, 44, 280, 45, 199, 199, 199, 199, 199, 199, 199, 44, 281, 281, 281, 281, 281, 281, 281, 275, 319, 319, 319, 237, 281, 281, 281, 281, 248, 248, 248, 275, 319, 319, 319, 237, 248, 248, 248, 248, 248, 248, 248, 275, 319, 319, 319, 237, 261, 261, 261, 261, 261, 261, 261, 266, 266, 266, 266, 266, 266, 266, 286, 286, 287, 288, 288, 288, 246, 48, 319, 270, 270, 270, 270, 270, 270, 270, 48, 319, 270, 270, 270, 270, 48, 48, 48, 48, 319, 48, 48, 48, 48, 48, 48, 48, 264, 264, 265, 266, 266, 266, 266, 276, 289, 289, 290, 291, 291, 266, 266, 292, 292, 292, 292, 292, 279, 279, 279, 279, 279, 279, 279, 319, 319, 319, 319, 154, 279, 279, 279, 279, 155, 155, 155, 319, 319, 319, 319, 154, 155, 155, 155, 155, 155, 155, 155, 319, 99, 319, 319, 154, 293, 293, 294, 295, 295, 295, 257, 277, 277, 278, 279, 279, 279, 279, 276, 319, 319, 319, 154, 299, 299, 299, 299, 299, 299, 299, 300, 299, 299, 299, 299, 319, 319, 319, 300, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 301, 301, 301, 301, 301, 301, 301, 300, 319, 319, 319, 302, 301, 301, 301, 301, 303, 303, 303, 300, 319, 319, 319, 302, 303, 303, 303, 303, 303, 303, 303, 300, 319, 319, 319, 302, 304, 304, 304, 304, 304, 304, 304, 305, 305, 306, 307, 307, 307, 307, 305, 305, 306, 307, 307, 307, 307, 276, 308, 308, 309, 310, 310, 307, 307, 311, 311, 312, 313, 313, 313, 313, 276, 319, 319, 319, 154, 305, 305, 306, 307, 307, 307, 307, 311, 311, 312, 313, 313, 313, 313, 319, 319, 319, 319, 154, 314, 314, 314, 314, 314, 307, 307, 307, 307, 307, 307, 307, 315, 307, 307, 307, 307, 319, 319, 319, 315, 316, 316, 316, 316, 316, 316, 316, 315, 316, 316, 316, 316, 203, 203, 203, 315, 203, 203, 203, 203, 203, 203, 203, 315, 313, 313, 313, 319, 319, 319, 319, 315, 317, 317, 317, 317, 317, 317, 317, 318, 318, 318, 318, 318, 203, 203, 203, 203, 203, 203, 203, 44, 319, 44, 44, 44, 44, 44, 44, 44, 49, 49, 49, 49, 319, 49, 49, 49, 49, 50, 319, 50, 50, 50, 50, 50, 50, 50, 65, 319, 319, 65, 90, 319, 319, 90, 105, 319, 319, 105, 319, 319, 105, 71, 319, 319, 71, 158, 319, 319, 158, 160, 319, 160, 160, 160, 163, 319, 163, 163, 163, 100, 319, 319, 100, 319, 100, 170, 319, 170, 170, 170, 180, 180, 319, 180, 181, 319, 181, 319, 181, 231, 319, 231, 231, 231, 231, 231, 231, 231, 282, 282, 282, 298, 319, 298, 298, 298, 298, 298, 298, 298, 3, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319 } ; static yyconst short int yy_chk[1848] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 10, 16, 16, 16, 42, 42, 316, 25, 10, 38, 27, 12, 10, 12, 12, 12, 12, 12, 12, 12, 14, 27, 14, 14, 14, 14, 14, 14, 14, 14, 25, 29, 38, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 79, 29, 79, 15, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 22, 24, 26, 18, 28, 24, 26, 24, 31, 32, 22, 83, 22, 35, 33, 26, 32, 22, 33, 35, 37, 313, 83, 97, 28, 26, 37, 40, 40, 33, 73, 80, 31, 88, 33, 39, 35, 80, 86, 97, 40, 33, 34, 34, 34, 34, 34, 34, 34, 86, 39, 95, 95, 95, 73, 39, 88, 113, 103, 44, 307, 34, 34, 44, 44, 44, 44, 44, 44, 44, 103, 132, 113, 132, 34, 45, 98, 34, 34, 45, 45, 45, 45, 45, 45, 45, 46, 115, 115, 115, 46, 46, 46, 46, 46, 46, 46, 47, 288, 98, 135, 47, 47, 47, 47, 47, 47, 47, 48, 135, 48, 48, 48, 48, 48, 48, 48, 50, 133, 260, 260, 50, 50, 50, 50, 50, 50, 50, 51, 144, 51, 133, 51, 51, 51, 51, 51, 51, 51, 52, 148, 263, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 144, 147, 223, 53, 53, 53, 53, 53, 53, 53, 54, 148, 147, 223, 54, 54, 54, 54, 54, 54, 54, 55, 149, 149, 149, 55, 55, 55, 55, 55, 55, 55, 56, 246, 150, 243, 56, 56, 56, 56, 56, 56, 56, 57, 153, 242, 171, 57, 57, 57, 57, 57, 57, 57, 58, 171, 58, 150, 58, 58, 58, 58, 58, 58, 58, 58, 59, 153, 59, 183, 59, 59, 59, 59, 59, 59, 59, 60, 239, 60, 233, 60, 60, 60, 60, 60, 60, 60, 60, 61, 194, 189, 183, 61, 61, 61, 61, 61, 61, 61, 90, 90, 90, 90, 90, 90, 90, 92, 93, 187, 94, 94, 94, 145, 189, 92, 100, 100, 100, 100, 100, 100, 100, 92, 93, 94, 170, 100, 146, 145, 226, 93, 185, 185, 185, 90, 90, 91, 91, 91, 91, 91, 91, 91, 102, 102, 102, 102, 102, 102, 102, 107, 110, 118, 226, 102, 109, 109, 109, 109, 107, 110, 118, 255, 107, 110, 118, 255, 186, 91, 186, 186, 91, 91, 104, 104, 104, 104, 104, 104, 104, 104, 112, 112, 112, 112, 104, 108, 191, 108, 108, 108, 108, 108, 108, 108, 108, 271, 271, 271, 108, 111, 258, 111, 111, 111, 111, 111, 111, 111, 111, 191, 143, 258, 111, 114, 192, 114, 254, 114, 114, 114, 114, 114, 114, 114, 114, 254, 139, 262, 114, 116, 116, 116, 116, 116, 116, 116, 117, 192, 262, 101, 117, 117, 117, 117, 117, 117, 117, 119, 99, 119, 119, 119, 119, 119, 119, 119, 119, 272, 272, 272, 119, 120, 120, 120, 120, 121, 96, 121, 89, 121, 121, 121, 121, 121, 121, 121, 122, 87, 122, 85, 122, 122, 122, 122, 122, 122, 122, 123, 84, 123, 82, 123, 123, 123, 123, 123, 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 81, 127, 78, 127, 127, 127, 127, 127, 127, 127, 128, 77, 128, 128, 128, 128, 128, 128, 128, 128, 129, 76, 129, 129, 129, 129, 129, 129, 129, 129, 130, 75, 130, 130, 130, 130, 130, 130, 130, 130, 131, 74, 131, 131, 131, 131, 131, 131, 131, 131, 134, 72, 134, 134, 134, 134, 134, 134, 134, 152, 152, 152, 152, 134, 136, 70, 136, 69, 136, 136, 136, 136, 136, 136, 136, 136, 137, 137, 137, 137, 137, 137, 137, 201, 201, 201, 201, 137, 138, 138, 138, 138, 138, 138, 138, 138, 256, 256, 256, 256, 138, 140, 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, 141, 141, 141, 151, 151, 151, 151, 151, 151, 151, 154, 285, 285, 285, 154, 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 155, 155, 241, 241, 241, 241, 155, 156, 68, 241, 67, 156, 156, 156, 156, 156, 156, 156, 245, 245, 245, 245, 156, 157, 66, 245, 157, 157, 157, 157, 157, 157, 157, 157, 265, 265, 265, 265, 157, 159, 159, 159, 159, 159, 159, 159, 161, 161, 161, 161, 161, 162, 49, 162, 162, 162, 162, 162, 162, 162, 165, 30, 165, 21, 165, 165, 165, 165, 165, 165, 165, 166, 166, 166, 166, 166, 166, 166, 167, 312, 312, 312, 167, 167, 167, 167, 167, 167, 167, 168, 20, 168, 168, 168, 168, 168, 168, 168, 168, 169, 169, 169, 169, 169, 169, 169, 19, 172, 6, 3, 169, 172, 172, 172, 172, 172, 172, 172, 173, 0, 173, 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, 174, 174, 174, 174, 174, 175, 0, 0, 0, 175, 175, 175, 175, 175, 175, 175, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 177, 0, 177, 177, 177, 177, 177, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178, 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 182, 0, 182, 182, 182, 182, 182, 182, 182, 182, 184, 0, 184, 184, 184, 184, 184, 184, 184, 188, 188, 188, 188, 188, 188, 188, 196, 196, 196, 196, 196, 198, 0, 198, 198, 198, 198, 198, 198, 198, 198, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 200, 200, 200, 200, 200, 200, 200, 204, 204, 204, 204, 204, 204, 204, 205, 0, 205, 205, 205, 205, 205, 205, 205, 206, 0, 206, 206, 206, 206, 206, 206, 206, 207, 0, 207, 207, 207, 207, 207, 207, 207, 208, 0, 208, 208, 208, 208, 208, 208, 208, 209, 0, 209, 209, 209, 209, 209, 209, 209, 297, 297, 297, 297, 209, 210, 0, 210, 210, 210, 210, 210, 210, 210, 0, 0, 0, 0, 210, 211, 0, 211, 211, 211, 211, 211, 211, 211, 0, 0, 0, 0, 211, 212, 212, 212, 212, 212, 212, 212, 0, 0, 0, 0, 212, 213, 213, 213, 213, 213, 213, 213, 214, 214, 214, 214, 214, 214, 214, 215, 215, 215, 215, 215, 215, 215, 0, 0, 0, 0, 215, 216, 216, 216, 216, 216, 216, 216, 0, 0, 0, 0, 216, 217, 217, 217, 217, 217, 217, 217, 0, 0, 0, 0, 217, 218, 218, 218, 218, 218, 218, 218, 0, 0, 0, 0, 218, 219, 219, 219, 219, 219, 219, 219, 0, 0, 0, 0, 219, 220, 220, 220, 220, 220, 220, 220, 220, 0, 221, 0, 0, 220, 221, 221, 221, 221, 221, 221, 221, 222, 0, 0, 0, 222, 222, 222, 222, 222, 222, 222, 224, 224, 224, 224, 224, 224, 224, 225, 0, 225, 225, 225, 225, 225, 230, 230, 230, 230, 230, 230, 230, 231, 231, 231, 231, 231, 231, 231, 232, 232, 232, 232, 232, 232, 232, 234, 0, 234, 234, 234, 234, 234, 234, 234, 235, 0, 235, 235, 235, 235, 235, 235, 235, 236, 0, 236, 236, 236, 236, 236, 236, 236, 0, 0, 0, 0, 236, 237, 237, 237, 237, 237, 237, 237, 240, 240, 240, 240, 240, 240, 240, 240, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247, 247, 247, 247, 0, 0, 0, 0, 247, 248, 248, 248, 248, 248, 248, 248, 0, 0, 0, 0, 248, 249, 0, 249, 249, 249, 249, 249, 249, 249, 249, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 251, 251, 251, 251, 251, 251, 251, 251, 0, 0, 0, 251, 252, 252, 252, 252, 252, 252, 252, 252, 0, 0, 0, 252, 253, 253, 253, 253, 253, 253, 253, 253, 0, 0, 0, 253, 259, 259, 259, 259, 259, 259, 259, 264, 264, 264, 264, 264, 264, 264, 267, 267, 267, 267, 267, 267, 267, 268, 0, 268, 268, 268, 268, 268, 268, 268, 269, 0, 269, 269, 269, 269, 269, 269, 269, 270, 0, 270, 270, 270, 270, 270, 270, 270, 274, 274, 274, 274, 274, 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 277, 277, 277, 277, 277, 277, 277, 0, 0, 0, 0, 277, 278, 278, 278, 278, 278, 278, 278, 0, 0, 0, 0, 278, 279, 279, 279, 279, 279, 279, 279, 0, 280, 0, 0, 279, 280, 280, 280, 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, 281, 281, 0, 0, 0, 281, 286, 286, 286, 286, 286, 286, 286, 286, 287, 287, 287, 287, 0, 0, 0, 287, 289, 289, 289, 289, 289, 289, 289, 290, 290, 290, 290, 290, 290, 290, 291, 291, 291, 291, 291, 291, 291, 292, 292, 292, 292, 292, 292, 292, 293, 293, 293, 293, 293, 293, 293, 293, 0, 0, 0, 293, 294, 294, 294, 294, 294, 294, 294, 294, 0, 0, 0, 294, 295, 295, 295, 295, 295, 295, 295, 295, 0, 0, 0, 295, 296, 296, 296, 296, 296, 296, 296, 298, 298, 298, 298, 298, 298, 298, 299, 299, 299, 299, 299, 299, 299, 299, 300, 300, 300, 300, 300, 300, 300, 301, 301, 301, 301, 301, 301, 301, 301, 0, 0, 0, 301, 302, 302, 302, 302, 302, 302, 302, 303, 303, 303, 303, 303, 303, 303, 0, 0, 0, 0, 303, 304, 304, 304, 304, 304, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 0, 0, 0, 306, 308, 308, 308, 308, 308, 308, 308, 308, 309, 309, 309, 309, 309, 309, 309, 309, 310, 310, 310, 310, 310, 310, 310, 310, 311, 311, 311, 0, 0, 0, 0, 311, 314, 314, 314, 314, 314, 314, 314, 315, 315, 315, 315, 315, 318, 318, 318, 318, 318, 318, 318, 320, 0, 320, 320, 320, 320, 320, 320, 320, 321, 321, 321, 321, 0, 321, 321, 321, 321, 322, 0, 322, 322, 322, 322, 322, 322, 322, 323, 0, 0, 323, 324, 0, 0, 324, 325, 0, 0, 325, 0, 0, 325, 326, 0, 0, 326, 327, 0, 0, 327, 328, 0, 328, 328, 328, 329, 0, 329, 329, 329, 330, 0, 0, 330, 0, 330, 331, 0, 331, 331, 331, 332, 332, 0, 332, 333, 0, 333, 0, 333, 334, 0, 334, 334, 334, 334, 334, 334, 334, 335, 335, 335, 336, 0, 336, 336, 336, 336, 336, 336, 336, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "flaglex.l" #define INITIAL 0 /********************************************************** * File: flaglex.l * Created at Thu Jul 15 16:14:46 1999 by pk // aaz@ruxy.org.ru * Base version of this file was taken from Eugene Crosser's ifcico * $Id: flaglex.l,v 1.7 2003/02/03 14:38:52 cyrilm Exp $ **********************************************************/ #line 9 "flaglex.l" char *yyPTR = NULL; int yyBUFL; #ifndef yywrap #define yywrap() 1 #endif #ifdef FLEX_SCANNER #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ((yyPTR == NULL) || (*yyPTR == '\0')) \ result=YY_NULL; \ else \ { \ yyBUFL=strlen(yyPTR); \ if (yyBUFL > max_size) yyBUFL=max_size; \ memcpy(buf,yyPTR,yyBUFL); \ yyPTR += yyBUFL; \ result=yyBUFL; \ } #else /* this is most probably native lex? */ #undef input #undef output #undef unput #define input() (((yyPTR == NULL) || (*yyPTR == '\0'))?NULL:*yyPTR++) #define output(c) #define unput(c) (*--yyPTR = (c)) #endif #include "flagexp.h" #include "headers.h" int flagfor(char *); int chkaddr(char*); int chktime(char*); int chkdate(char*); int chkgaps(char*); int yylval; #line 931 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 115 "flaglex.l" #line 1084 "lex.yy.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 320 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 1792 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 116 "flaglex.l" ; YY_BREAK case 2: YY_RULE_SETUP #line 117 "flaglex.l" {yylval=strtol(yytext,NULL,0);return(NUMBER);} YY_BREAK case 3: YY_RULE_SETUP #line 118 "flaglex.l" {yylval=chktime(yytext);return(TIMESTR);} YY_BREAK case 4: YY_RULE_SETUP #line 119 "flaglex.l" {yylval=chkdate(yytext);return(DATESTR);} YY_BREAK case 5: YY_RULE_SETUP #line 120 "flaglex.l" {yylval=chkgaps(yytext);return(GAPSTR);} YY_BREAK case 6: YY_RULE_SETUP #line 121 "flaglex.l" {yylval=PHSTR;return(PHSTR);} YY_BREAK case 7: YY_RULE_SETUP #line 122 "flaglex.l" {yylval=EQ;return(AROP);} YY_BREAK case 8: YY_RULE_SETUP #line 123 "flaglex.l" {yylval=NE;return(AROP);} YY_BREAK case 9: YY_RULE_SETUP #line 124 "flaglex.l" {yylval=GT;return(AROP);} YY_BREAK case 10: YY_RULE_SETUP #line 125 "flaglex.l" {yylval=GE;return(AROP);} YY_BREAK case 11: YY_RULE_SETUP #line 126 "flaglex.l" {yylval=LT;return(AROP);} YY_BREAK case 12: YY_RULE_SETUP #line 127 "flaglex.l" {yylval=LE;return(AROP);} YY_BREAK case 13: YY_RULE_SETUP #line 128 "flaglex.l" {yylval=AND;return(LOGOP);} YY_BREAK case 14: YY_RULE_SETUP #line 129 "flaglex.l" {yylval=OR;return(LOGOP);} YY_BREAK case 15: YY_RULE_SETUP #line 130 "flaglex.l" {yylval=NOT;return(NOT);} YY_BREAK case 16: YY_RULE_SETUP #line 131 "flaglex.l" {yylval=XOR;return(LOGOP);} YY_BREAK case 17: YY_RULE_SETUP #line 132 "flaglex.l" {yylval=LB;return(LB);} YY_BREAK case 18: YY_RULE_SETUP #line 133 "flaglex.l" {yylval=RB;return(RB);} YY_BREAK case 19: YY_RULE_SETUP #line 134 "flaglex.l" {yylval=COMMA;return(COMMA);} YY_BREAK case 20: YY_RULE_SETUP #line 135 "flaglex.l" {yylval=ASTERISK;return(ASTERISK);} YY_BREAK case 21: YY_RULE_SETUP #line 136 "flaglex.l" {yylval=CONNECT;return(CONNECT);} YY_BREAK case 22: YY_RULE_SETUP #line 137 "flaglex.l" {yylval=SPEED;return(SPEED);} YY_BREAK case 23: YY_RULE_SETUP #line 138 "flaglex.l" {yylval=FLFILE;return(FLFILE);} YY_BREAK case 24: YY_RULE_SETUP #line 139 "flaglex.l" {yylval=PATHSTR;return(PATHSTR);} YY_BREAK case 25: YY_RULE_SETUP #line 140 "flaglex.l" {yylval=PHONE;return(PHONE);} YY_BREAK case 26: YY_RULE_SETUP #line 141 "flaglex.l" {yylval=CID;return(CID);} YY_BREAK case 27: YY_RULE_SETUP #line 142 "flaglex.l" {yylval=PORT;return(PORT);} YY_BREAK case 28: YY_RULE_SETUP #line 143 "flaglex.l" {yylval=TIME;return(TIME);} YY_BREAK case 29: YY_RULE_SETUP #line 144 "flaglex.l" {yylval=ITIME;return(ITIME);} YY_BREAK case 30: YY_RULE_SETUP #line 145 "flaglex.l" {yylval=ADDRESS;return(ADDRESS);} YY_BREAK case 31: YY_RULE_SETUP #line 146 "flaglex.l" {yylval=flagfor(yytext);return(IDENT);} YY_BREAK case 32: YY_RULE_SETUP #line 147 "flaglex.l" {yylval=chkaddr(yytext);return(ADDRSTR);} YY_BREAK case 33: YY_RULE_SETUP #line 148 "flaglex.l" ECHO; YY_BREAK #line 1332 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 320 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 320 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 319); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 148 "flaglex.l" int flagfor(char *str) { char *p, *q; DEBUG(('Y',2,"flagfor: \"%s\"",str)); if(!rnode) return 0; if(!strncasecmp(str,"list",4)) { DEBUG(('Y',2,"flagfor: listed: %d",rnode->options&O_LST)); return rnode->options&O_LST; } if(!strncasecmp(str,"prot",4)) { DEBUG(('Y',2,"flagfor: protected: %d",rnode->options&O_PWD)); return rnode->options&O_PWD; } if(!strncasecmp(str,"in",2)) { DEBUG(('Y',2,"flagfor: inbound: %d",rnode->options&O_INB)); return rnode->options&O_INB; } if(!strncasecmp(str,"out",3)) { DEBUG(('Y',2,"flagfor: outbound: %d",!(rnode->options&O_INB))); return !(rnode->options&O_INB); } if(!strncasecmp(str,"tcp",3)) { DEBUG(('Y',2,"flagfor: tcp/ip: %d",rnode->options&O_TCP)); return rnode->options&O_TCP; } if(!strncasecmp(str,"bad",3)) { DEBUG(('Y',2,"flagfor: bad password: %d",rnode->options&O_BAD)); return rnode->options&O_BAD; } if(rnode->flags) { q=strdup(rnode->flags);p=strtok(q,","); while(p) { if(!strcasecmp(str,p)) { free(q); DEBUG(('Y',2,"flagfor: other: 1")); return 1; } p=strtok(NULL,","); } free(q); } DEBUG(('Y',2,"flagfor: other: 0")); return 0; } int chkaddr(char *str) { ftnaddr_t addr; falist_t *i; DEBUG(('Y',2,"chkaddr: \"%s\"",str)); if (!parseftnaddr(str, &addr, &DEFADDR, 1)) { DEBUG(('Y',1,"chkaddr: bad address")); return 0; } if(!rnode) return 0; for(i=rnode->addrs;i;i=i->next) { DEBUG(('Y',2,"chkaddr: check %d:%d/%d.%d",i->addr.z,i->addr.n,i->addr.f,i->addr.p)); if((addr.z<0 || i->addr.z==addr.z) && (addr.n<0 || i->addr.n==addr.n) && (addr.f<0 || i->addr.f==addr.f) && (addr.p<0 || i->addr.p==addr.p)) { DEBUG(('Y',2,"chkaddr: 1")); return 1; } } DEBUG(('Y',2,"chkaddr: 0")); return 0; } int chkgaps(char *str) { int r = checktimegaps(str); DEBUG(('Y',2,"chkgaps: \"%s\": %d",str,r)); return r; } int chktime(char *str) { int h1,h2,m1,m2,beg,end,cur,dayok,day,r; struct tm *now; time_t tt; time(&tt);now=localtime(&tt); if (strncasecmp(str,"Sun",3) == 0) day=0; else if (strncasecmp(str,"Mon",3) == 0) day=1; else if (strncasecmp(str,"Tue",3) == 0) day=2; else if (strncasecmp(str,"Wed",3) == 0) day=3; else if (strncasecmp(str,"Thu",3) == 0) day=4; else if (strncasecmp(str,"Fri",3) == 0) day=5; else if (strncasecmp(str,"Sat",3) == 0) day=6; else if (strncasecmp(str,"Any",3) == 0) day=-1; else if (strncasecmp(str,"Wk",2) == 0) day=-2; else if (strncasecmp(str,"We",2) == 0) day=-3; else day=-4; DEBUG(('Y',2,"chktime: \"%s\": day %d, now %d",str,day,now->tm_wday)); if (day >= 0) { dayok=(now->tm_wday == day); } else { switch (day) { case -3: dayok=((now->tm_wday == 0) || (now->tm_wday == 6)); break; case -2: dayok=((now->tm_wday != 0) && (now->tm_wday != 6)); break; case -1: dayok=1; break; default: DEBUG(('Y',1,"chktime: bad day %d",day)); dayok=0; break; } } if (dayok == 0) return 0; while (*str && ((*str < '0') || (*str > '9'))) str++; if (*str == '\0') { DEBUG(('Y',2,"chktime: nothing after day: 1")); return 1; } if (sscanf(str,"%02d%02d-%02d%02d",&h1,&m1,&h2,&m2) != 4) { DEBUG(('Y',1,"chktime: invalid time \"%s\"",str)); return 0; } cur=now->tm_hour*60+now->tm_min; beg=h1*60+m1; end=h2*60+m2; if (end > beg) r = ((cur >= beg) && (cur <= end)); else r = ((cur >= beg) || (cur <= end)); DEBUG(('Y',2,"chktime: %02d:%02d <= %02d:%02d <= %02d:%02d: %d",h1,m1,now->tm_hour,now->tm_min,h2,m2,r)); return r; } int chkdate(char *str) { int d1,d2,m; char *mnths[13]={"Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec","Any"}; char *p; struct tm *now; time_t tt; time(&tt);now=localtime(&tt); for(m=0;m<13;m++) if(!strncasecmp(str,mnths[m],3)) break; DEBUG(('Y',2,"chkdate: \"%s\": month is %d, now %d",str,m,now->tm_mon)); if(m>12 || (m!=12 && m!=now->tm_mon)) return 0; str+=3;while(*str==' '||*str=='\t') str++; if(!(p=strchr(str,'-'))) { if(sscanf(str,"%d", &d1)!=1) { DEBUG(('Y',1,"chkdate: no day: 0")); return 0; } d2=d1; } else if(sscanf(str,"%d-%d", &d1, &d2)!=1) { DEBUG(('Y',1,"chkdate: no two days: 0")); return 0; } DEBUG(('Y',2,"chkdate: days: %d-%d",d1,d2)); if(d1>d2) { DEBUG(('Y',1,"chkdate: %d > %d",d1,d2)); return 0; } DEBUG(('Y',2,"chkdate: %d",now->tm_yday>=d1 && now->tm_yday<=d2)); return now->tm_yday>=d1 && now->tm_yday<=d2; }