/* 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 $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #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; \ yytext_ptr -= yy_more_len; \ yyleng = (int) (yy_cp - yytext_ptr); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 95 #define YY_END_OF_BUFFER 96 static yyconst short int yy_accept[431] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 94, 92, 91, 91, 94, 94, 10, 94, 94, 94, 94, 83, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 47, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 78, 78, 78, 77, 76, 82, 81, 81, 81, 80, 82, 79, 81, 84, 84, 84, 88, 85, 85, 89, 85, 85, 94, 92, 3, 91, 2, 0, 0, 7, 9, 8, 0, 46, 0, 0, 45, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 82, 84, 84, 84, 86, 85, 85, 87, 85, 85, 0, 1, 0, 93, 0, 4, 0, 93, 0, 0, 0, 15, 0, 20, 0, 0, 18, 19, 0, 24, 25, 26, 27, 28, 29, 0, 30, 0, 0, 0, 34, 0, 36, 0, 0, 0, 0, 0, 0, 44, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 84, 85, 85, 0, 6, 0, 5, 0, 0, 0, 0, 0, 17, 21, 0, 0, 0, 32, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 82, 84, 85, 0, 0, 12, 0, 14, 0, 22, 23, 31, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 49, 0, 0, 0, 0, 0, 48, 0, 71, 0, 55, 0, 64, 0, 0, 0, 82, 84, 85, 0, 0, 0, 0, 33, 0, 0, 0, 0, 43, 0, 0, 0, 52, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 68, 66, 0, 56, 82, 84, 85, 0, 0, 0, 16, 37, 0, 41, 0, 0, 0, 53, 63, 0, 59, 60, 73, 0, 54, 0, 0, 0, 61, 82, 84, 85, 90, 90, 0, 0, 0, 90, 0, 67, 0, 0, 57, 0, 82, 84, 85, 0, 0, 42, 0, 0, 70, 69, 0, 39, 50, 65, 13, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 6, 7, 1, 1, 8, 9, 1, 1, 1, 1, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 1, 21, 22, 23, 24, 25, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 11, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 1, 1, 1, 1, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 11, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 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, 1, 1 } ; static yyconst int yy_meta[52] = { 0, 1, 2, 3, 3, 1, 4, 1, 1, 5, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 2, 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 short int yy_base[445] = { 0, 0, 3, 25, 0, 76, 0, 127, 178, 138, 151, 11, 161, 189, 202, 164, 210, 213, 222, 233, 236, 481, 1794, 467, 13, 20, 446, 395, 133, 244, 247, 253, 304, 1794, 355, 405, 256, 446, 259, 489, 263, 290, 272, 329, 346, 315, 369, 318, 381, 387, 394, 533, 1794, 584, 242, 302, 384, 236, 406, 308, 385, 424, 254, 397, 261, 1794, 412, 341, 1794, 1794, 0, 384, 173, 224, 1794, 374, 324, 0, 0, 350, 339, 435, 0, 338, 398, 330, 240, 278, 282, 1794, 249, 1794, 254, 260, 275, 1794, 1794, 453, 1794, 459, 470, 1794, 485, 1794, 508, 520, 496, 493, 524, 570, 573, 576, 579, 614, 619, 622, 625, 628, 637, 651, 655, 660, 663, 666, 669, 692, 699, 702, 708, 1794, 715, 718, 711, 725, 741, 751, 754, 1794, 757, 760, 1794, 287, 524, 655, 525, 338, 535, 315, 394, 574, 431, 606, 649, 702, 359, 448, 608, 743, 407, 493, 609, 650, 652, 646, 746, 759, 0, 224, 0, 231, 201, 1794, 0, 207, 1794, 188, 187, 789, 1794, 178, 1794, 179, 1794, 794, 797, 800, 803, 812, 1794, 830, 1794, 835, 838, 1794, 1794, 841, 1794, 1794, 1794, 1794, 1794, 1794, 844, 1794, 847, 853, 877, 1794, 882, 1794, 885, 889, 892, 896, 900, 926, 1794, 929, 932, 781, 697, 879, 935, 824, 784, 882, 839, 889, 912, 921, 918, 830, 836, 932, 936, 937, 869, 947, 950, 985, 954, 963, 956, 969, 966, 158, 155, 145, 0, 1012, 1794, 396, 1794, 1015, 1020, 1023, 1026, 1029, 1794, 1794, 1038, 1052, 1061, 1794, 1064, 1067, 1070, 1075, 1794, 1078, 1093, 1101, 1118, 1009, 1010, 1062, 1794, 970, 976, 1015, 1112, 1056, 1126, 933, 1047, 1082, 1116, 1098, 1143, 1125, 1154, 1065, 1161, 1794, 1132, 1170, 1171, 1147, 1159, 445, 482, 495, 0, 1206, 1794, 1209, 1794, 1212, 1794, 1794, 1794, 1225, 1794, 1235, 1238, 1241, 1244, 1253, 1285, 1160, 1225, 1288, 1224, 1239, 1291, 1794, 1236, 1794, 1248, 1290, 1243, 1293, 1295, 1794, 1304, 1794, 1300, 1794, 1335, 1794, 1344, 1313, 1350, 1374, 1382, 1390, 0, 1398, 1417, 1353, 1794, 1358, 1420, 1423, 1427, 1794, 1450, 1348, 1450, 1794, 1456, 1404, 1794, 1473, 1479, 1496, 1406, 1502, 1289, 1407, 1457, 1794, 1794, 1519, 1794, 1543, 1551, 1559, 135, 1487, 1510, 1794, 1794, 1578, 1794, 1581, 1585, 1499, 1794, 1794, 1588, 1794, 1794, 1794, 1306, 1794, 1503, 1591, 1420, 1794, 122, 116, 0, 1794, 1594, 1597, 1626, 1629, 1632, 1589, 1794, 1508, 1640, 1794, 1643, 0, 0, 0, 1656, 1670, 1794, 1679, 1685, 1794, 1794, 1688, 1794, 1794, 1794, 1794, 1794, 1721, 1727, 1733, 1739, 1745, 1751, 1757, 1763, 1769, 1775, 1781, 1787, 12, 4 } ; static yyconst short int yy_def[445] = { 0, 431, 431, 430, 3, 430, 5, 432, 432, 433, 433, 434, 434, 435, 435, 431, 431, 431, 431, 431, 431, 430, 430, 430, 430, 430, 430, 430, 430, 436, 436, 436, 437, 430, 437, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 438, 438, 438, 439, 430, 439, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 430, 430, 430, 430, 430, 440, 430, 430, 430, 430, 440, 430, 440, 441, 441, 441, 430, 442, 442, 430, 442, 442, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 436, 430, 436, 436, 430, 34, 430, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 430, 34, 34, 34, 34, 34, 34, 438, 430, 438, 438, 430, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 440, 440, 441, 441, 441, 430, 442, 442, 430, 442, 442, 430, 430, 430, 430, 430, 430, 436, 436, 34, 34, 34, 430, 34, 430, 34, 34, 430, 430, 34, 430, 430, 430, 430, 430, 430, 34, 430, 34, 34, 34, 430, 34, 430, 34, 34, 34, 34, 34, 34, 430, 438, 438, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 440, 441, 442, 442, 430, 430, 430, 430, 436, 34, 34, 34, 34, 430, 430, 34, 34, 34, 430, 34, 34, 34, 34, 430, 34, 34, 34, 438, 53, 53, 53, 430, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 430, 53, 53, 53, 53, 53, 440, 441, 442, 443, 436, 430, 34, 430, 34, 430, 430, 430, 34, 430, 34, 34, 34, 34, 34, 438, 53, 53, 53, 53, 53, 53, 430, 53, 430, 53, 53, 53, 53, 53, 430, 53, 430, 53, 430, 53, 430, 53, 53, 53, 440, 441, 442, 444, 303, 34, 34, 430, 34, 34, 34, 34, 430, 318, 53, 53, 430, 53, 53, 430, 53, 53, 53, 53, 53, 53, 53, 53, 430, 430, 53, 430, 440, 441, 442, 430, 436, 34, 430, 430, 34, 430, 34, 438, 53, 430, 430, 53, 430, 430, 430, 53, 430, 53, 53, 53, 430, 440, 441, 442, 430, 436, 34, 34, 34, 438, 53, 430, 53, 53, 430, 53, 440, 441, 442, 34, 34, 430, 53, 53, 430, 430, 34, 430, 430, 430, 430, 0, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430 } ; static yyconst short int yy_nxt[1846] = { 0, 430, 23, 24, 25, 23, 24, 25, 26, 27, 378, 26, 27, 79, 24, 25, 89, 89, 346, 80, 81, 417, 28, 90, 91, 28, 29, 23, 24, 25, 29, 29, 29, 30, 31, 32, 32, 29, 32, 32, 32, 32, 32, 32, 32, 32, 29, 29, 29, 33, 29, 34, 35, 36, 37, 32, 38, 32, 39, 40, 32, 41, 42, 32, 43, 44, 32, 32, 45, 46, 47, 32, 32, 32, 32, 32, 29, 48, 23, 24, 25, 48, 48, 48, 49, 50, 51, 51, 48, 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 52, 33, 48, 53, 54, 55, 51, 51, 51, 51, 56, 57, 51, 51, 58, 59, 51, 51, 51, 60, 61, 62, 51, 63, 64, 51, 51, 51, 48, 65, 23, 24, 25, 65, 65, 65, 66, 67, 416, 94, 65, 71, 72, 73, 415, 74, 95, 75, 76, 65, 65, 69, 33, 65, 71, 72, 73, 403, 74, 96, 75, 76, 301, 77, 79, 24, 25, 23, 24, 25, 80, 81, 300, 26, 27, 299, 77, 89, 89, 65, 65, 23, 24, 25, 65, 65, 65, 66, 67, 33, 252, 65, 83, 24, 25, 251, 84, 248, 85, 86, 65, 65, 69, 33, 65, 83, 24, 25, 247, 84, 173, 85, 86, 23, 24, 25, 23, 24, 25, 26, 27, 246, 26, 27, 87, 23, 24, 25, 90, 91, 65, 26, 27, 87, 169, 33, 23, 24, 25, 23, 24, 25, 26, 27, 245, 26, 27, 98, 98, 98, 98, 98, 98, 178, 178, 99, 98, 98, 98, 101, 101, 101, 101, 101, 101, 141, 101, 101, 101, 98, 180, 141, 98, 141, 179, 101, 101, 101, 98, 141, 151, 101, 144, 141, 101, 88, 181, 108, 101, 177, 141, 141, 176, 101, 101, 101, 165, 101, 141, 113, 182, 123, 124, 126, 162, 100, 97, 101, 101, 101, 97, 97, 97, 97, 97, 101, 141, 97, 101, 101, 101, 101, 101, 101, 141, 125, 97, 97, 97, 101, 97, 141, 101, 101, 101, 155, 145, 141, 175, 146, 101, 173, 147, 101, 141, 141, 132, 170, 156, 129, 129, 129, 226, 169, 101, 135, 97, 97, 103, 103, 103, 97, 97, 97, 97, 97, 127, 141, 97, 224, 128, 129, 101, 101, 101, 141, 93, 97, 97, 97, 103, 97, 167, 130, 137, 137, 137, 88, 141, 131, 137, 137, 137, 93, 101, 138, 233, 137, 137, 137, 133, 174, 174, 174, 134, 137, 137, 97, 101, 101, 101, 137, 137, 141, 141, 148, 302, 302, 137, 137, 92, 141, 141, 141, 163, 157, 141, 149, 150, 227, 101, 141, 104, 152, 141, 141, 141, 153, 171, 171, 171, 164, 105, 141, 237, 106, 139, 93, 107, 101, 101, 101, 154, 141, 92, 158, 98, 98, 98, 159, 141, 141, 98, 98, 98, 343, 343, 160, 141, 161, 88, 101, 229, 98, 98, 98, 109, 141, 98, 183, 184, 110, 430, 111, 98, 141, 234, 93, 101, 101, 101, 112, 101, 101, 101, 98, 188, 188, 188, 101, 101, 101, 344, 344, 114, 115, 116, 117, 118, 119, 101, 101, 101, 101, 101, 345, 345, 430, 188, 430, 120, 101, 141, 101, 101, 101, 187, 101, 101, 101, 141, 430, 121, 101, 122, 136, 140, 140, 140, 136, 136, 136, 136, 136, 238, 101, 136, 430, 430, 101, 430, 430, 185, 219, 141, 136, 136, 140, 140, 136, 186, 141, 141, 189, 141, 430, 225, 430, 223, 220, 430, 430, 141, 190, 190, 190, 101, 101, 101, 193, 193, 193, 194, 194, 194, 136, 136, 140, 140, 140, 136, 136, 136, 136, 136, 190, 430, 136, 101, 430, 430, 193, 430, 141, 194, 228, 136, 136, 140, 140, 136, 141, 430, 142, 430, 430, 191, 101, 101, 101, 192, 143, 196, 196, 196, 197, 197, 197, 198, 198, 198, 199, 199, 199, 430, 141, 136, 141, 239, 101, 200, 200, 200, 141, 196, 141, 141, 197, 430, 430, 198, 230, 235, 199, 201, 201, 201, 195, 101, 101, 101, 430, 200, 203, 203, 203, 101, 101, 101, 101, 101, 101, 101, 101, 101, 141, 201, 240, 141, 141, 101, 141, 202, 242, 141, 203, 141, 141, 101, 141, 221, 101, 141, 241, 101, 207, 207, 207, 231, 205, 222, 204, 101, 101, 101, 209, 209, 209, 430, 430, 206, 101, 101, 101, 101, 101, 101, 207, 101, 101, 101, 101, 101, 101, 101, 430, 141, 209, 101, 101, 101, 141, 274, 101, 141, 430, 101, 430, 208, 141, 101, 430, 211, 101, 101, 101, 101, 232, 213, 212, 101, 430, 430, 210, 216, 216, 216, 137, 137, 137, 137, 137, 137, 137, 137, 137, 101, 430, 430, 430, 218, 430, 141, 430, 214, 141, 216, 217, 137, 137, 141, 137, 137, 141, 137, 137, 215, 243, 141, 244, 430, 236, 249, 249, 249, 430, 141, 98, 98, 98, 98, 98, 98, 101, 101, 101, 101, 101, 101, 430, 141, 253, 273, 278, 250, 101, 101, 101, 141, 98, 430, 141, 98, 430, 430, 101, 430, 430, 101, 430, 430, 254, 255, 101, 101, 101, 430, 101, 258, 258, 258, 259, 259, 259, 101, 101, 101, 101, 101, 101, 101, 101, 101, 141, 277, 101, 263, 263, 263, 141, 258, 141, 256, 259, 430, 141, 101, 285, 141, 101, 286, 430, 101, 141, 261, 257, 141, 430, 263, 260, 101, 101, 101, 280, 262, 101, 101, 101, 101, 101, 101, 430, 101, 101, 101, 268, 268, 268, 141, 101, 101, 101, 101, 101, 101, 101, 141, 101, 141, 279, 101, 141, 275, 290, 101, 430, 141, 268, 141, 141, 266, 101, 281, 264, 267, 101, 141, 269, 265, 101, 101, 101, 137, 137, 137, 137, 137, 137, 276, 276, 276, 141, 430, 430, 282, 270, 272, 141, 283, 141, 141, 101, 430, 137, 137, 141, 137, 137, 141, 276, 276, 141, 328, 271, 141, 141, 141, 288, 284, 141, 141, 289, 141, 141, 141, 430, 141, 287, 291, 141, 430, 292, 430, 141, 141, 141, 430, 141, 293, 293, 293, 141, 141, 141, 295, 141, 297, 294, 141, 141, 141, 322, 296, 141, 430, 141, 141, 141, 430, 293, 293, 298, 323, 141, 141, 249, 249, 249, 98, 98, 98, 430, 141, 304, 304, 304, 101, 101, 101, 306, 306, 306, 101, 101, 101, 303, 303, 250, 141, 141, 98, 308, 308, 308, 141, 304, 141, 141, 101, 430, 320, 306, 141, 319, 101, 309, 309, 309, 324, 305, 307, 430, 430, 308, 310, 310, 310, 101, 101, 101, 312, 312, 312, 101, 101, 101, 141, 309, 101, 101, 101, 101, 101, 101, 329, 141, 310, 430, 430, 101, 326, 141, 312, 141, 336, 101, 101, 101, 101, 141, 101, 321, 141, 101, 101, 101, 101, 315, 430, 311, 313, 141, 430, 330, 314, 325, 325, 325, 101, 141, 316, 137, 137, 137, 430, 430, 101, 141, 430, 327, 327, 327, 317, 332, 430, 141, 325, 325, 318, 318, 430, 141, 137, 137, 430, 141, 333, 333, 333, 141, 327, 327, 334, 141, 141, 141, 331, 335, 335, 335, 430, 141, 141, 141, 337, 337, 337, 333, 333, 141, 430, 430, 141, 339, 339, 339, 341, 338, 335, 335, 141, 430, 430, 141, 141, 337, 337, 430, 141, 141, 141, 141, 430, 342, 339, 339, 141, 141, 141, 141, 141, 430, 340, 430, 357, 430, 430, 141, 141, 98, 98, 98, 101, 101, 101, 101, 101, 101, 430, 430, 347, 347, 347, 347, 347, 347, 347, 347, 350, 350, 350, 98, 430, 430, 101, 430, 430, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 350, 348, 430, 141, 141, 349, 355, 355, 355, 430, 101, 141, 141, 101, 358, 141, 101, 360, 141, 101, 361, 430, 141, 141, 351, 430, 141, 141, 355, 364, 141, 363, 366, 352, 430, 141, 353, 354, 137, 137, 137, 359, 359, 359, 362, 362, 362, 430, 430, 356, 356, 356, 356, 356, 356, 356, 356, 430, 430, 137, 137, 430, 359, 359, 430, 362, 362, 141, 141, 141, 141, 365, 141, 367, 141, 141, 396, 141, 141, 141, 141, 430, 141, 141, 369, 141, 368, 141, 371, 371, 371, 141, 141, 141, 373, 370, 430, 372, 372, 372, 141, 411, 430, 374, 374, 374, 381, 381, 381, 371, 371, 382, 382, 382, 141, 430, 430, 430, 372, 372, 430, 430, 141, 141, 374, 374, 430, 141, 381, 141, 430, 141, 430, 382, 387, 141, 430, 141, 375, 375, 375, 375, 375, 375, 375, 375, 376, 376, 376, 376, 376, 376, 376, 376, 377, 377, 377, 377, 377, 377, 377, 377, 379, 379, 379, 379, 379, 379, 379, 379, 101, 101, 101, 101, 101, 101, 384, 384, 384, 430, 101, 101, 101, 141, 390, 141, 141, 430, 397, 394, 430, 141, 101, 141, 141, 101, 430, 430, 384, 141, 414, 383, 101, 388, 388, 388, 430, 141, 385, 389, 389, 389, 430, 380, 386, 386, 386, 386, 386, 386, 386, 386, 430, 430, 388, 388, 391, 391, 391, 141, 389, 389, 392, 392, 392, 141, 141, 141, 398, 430, 98, 98, 98, 141, 141, 430, 430, 391, 391, 393, 393, 393, 141, 392, 392, 395, 395, 395, 141, 404, 141, 430, 98, 101, 101, 101, 141, 430, 430, 430, 393, 393, 399, 399, 399, 141, 395, 395, 141, 430, 409, 141, 141, 141, 412, 101, 141, 141, 430, 141, 141, 430, 422, 399, 399, 141, 430, 430, 141, 430, 405, 430, 430, 430, 430, 430, 141, 400, 400, 400, 400, 400, 400, 400, 400, 401, 401, 401, 401, 401, 401, 401, 401, 402, 402, 402, 402, 402, 402, 402, 402, 101, 101, 101, 101, 101, 101, 430, 137, 137, 137, 410, 410, 410, 413, 413, 413, 98, 98, 98, 101, 101, 101, 101, 430, 430, 101, 408, 407, 137, 137, 430, 410, 410, 430, 413, 413, 141, 141, 98, 141, 430, 101, 430, 430, 141, 141, 406, 141, 101, 101, 101, 420, 420, 420, 137, 137, 137, 430, 421, 430, 430, 418, 423, 423, 423, 424, 424, 424, 430, 430, 101, 430, 430, 420, 430, 137, 137, 430, 101, 101, 101, 430, 430, 423, 423, 430, 424, 424, 141, 430, 419, 141, 426, 426, 426, 430, 141, 430, 430, 141, 101, 427, 427, 427, 430, 430, 425, 428, 428, 428, 429, 429, 429, 430, 426, 430, 430, 430, 430, 430, 430, 430, 427, 427, 430, 430, 430, 141, 428, 428, 430, 430, 429, 141, 430, 141, 430, 430, 430, 430, 430, 141, 22, 22, 22, 22, 22, 22, 68, 68, 68, 68, 68, 68, 70, 70, 70, 70, 70, 70, 78, 78, 78, 78, 78, 78, 82, 82, 82, 82, 82, 82, 97, 97, 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 136, 136, 136, 136, 136, 136, 141, 141, 141, 141, 141, 141, 166, 430, 430, 166, 166, 166, 168, 168, 430, 168, 430, 168, 172, 172, 430, 430, 172, 172, 21, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430 } ; static yyconst short int yy_chk[1846] = { 0, 0, 1, 1, 1, 2, 2, 2, 1, 1, 444, 2, 2, 11, 11, 11, 24, 24, 443, 11, 11, 402, 1, 25, 25, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 401, 28, 7, 9, 9, 9, 400, 9, 28, 9, 9, 7, 7, 7, 7, 7, 10, 10, 10, 378, 10, 28, 10, 10, 247, 9, 12, 12, 12, 15, 15, 15, 12, 12, 246, 15, 15, 245, 10, 72, 72, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 15, 181, 8, 13, 13, 13, 179, 13, 176, 13, 13, 8, 8, 8, 8, 8, 14, 14, 14, 175, 14, 173, 14, 14, 16, 16, 16, 17, 17, 17, 16, 16, 170, 17, 17, 17, 18, 18, 18, 73, 73, 8, 18, 18, 18, 169, 16, 19, 19, 19, 20, 20, 20, 19, 19, 167, 20, 20, 29, 29, 29, 30, 30, 30, 90, 90, 30, 31, 31, 31, 36, 36, 36, 38, 38, 38, 57, 40, 40, 40, 29, 93, 54, 30, 57, 92, 42, 42, 42, 31, 54, 57, 36, 54, 62, 38, 88, 94, 36, 40, 87, 64, 62, 86, 41, 41, 41, 64, 42, 64, 38, 94, 40, 40, 42, 62, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 41, 141, 32, 45, 45, 45, 47, 47, 47, 141, 41, 32, 32, 32, 32, 32, 55, 43, 43, 43, 59, 55, 59, 85, 55, 45, 83, 55, 47, 147, 59, 45, 80, 59, 44, 44, 44, 147, 79, 43, 47, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 43, 145, 34, 145, 43, 44, 46, 46, 46, 145, 76, 34, 34, 34, 34, 34, 75, 44, 48, 48, 48, 71, 154, 44, 49, 49, 49, 67, 46, 49, 154, 50, 50, 50, 46, 84, 84, 84, 46, 48, 48, 34, 35, 35, 35, 49, 49, 56, 60, 56, 251, 251, 50, 50, 66, 56, 60, 148, 63, 60, 63, 56, 56, 148, 35, 148, 35, 58, 63, 58, 158, 58, 81, 81, 81, 63, 35, 58, 158, 35, 50, 27, 35, 37, 37, 37, 58, 61, 26, 61, 97, 97, 97, 61, 150, 61, 99, 99, 99, 299, 299, 61, 150, 61, 23, 37, 150, 100, 100, 100, 37, 155, 97, 99, 100, 37, 21, 37, 99, 155, 155, 81, 102, 102, 102, 37, 39, 39, 39, 100, 107, 107, 107, 106, 106, 106, 300, 300, 39, 39, 39, 39, 39, 39, 102, 104, 104, 104, 39, 301, 301, 0, 107, 0, 39, 106, 159, 105, 105, 105, 106, 108, 108, 108, 159, 0, 39, 104, 39, 51, 51, 51, 51, 51, 51, 51, 51, 51, 159, 105, 51, 0, 0, 108, 0, 0, 104, 142, 144, 51, 51, 51, 51, 51, 105, 142, 144, 108, 146, 0, 146, 0, 144, 142, 0, 0, 146, 109, 109, 109, 110, 110, 110, 111, 111, 111, 112, 112, 112, 51, 53, 53, 53, 53, 53, 53, 53, 53, 53, 109, 0, 53, 110, 0, 0, 111, 0, 149, 112, 149, 53, 53, 53, 53, 53, 149, 0, 53, 0, 0, 110, 113, 113, 113, 110, 53, 114, 114, 114, 115, 115, 115, 116, 116, 116, 117, 117, 117, 0, 151, 53, 156, 160, 113, 118, 118, 118, 151, 114, 156, 160, 115, 0, 0, 116, 151, 156, 117, 119, 119, 119, 113, 120, 120, 120, 0, 118, 121, 121, 121, 122, 122, 122, 123, 123, 123, 124, 124, 124, 163, 119, 161, 152, 161, 120, 162, 120, 163, 143, 121, 152, 161, 122, 162, 143, 123, 143, 162, 124, 125, 125, 125, 152, 123, 143, 122, 126, 126, 126, 127, 127, 127, 0, 0, 124, 128, 128, 128, 132, 132, 132, 125, 130, 130, 130, 131, 131, 131, 126, 0, 220, 127, 133, 133, 133, 153, 220, 128, 220, 0, 132, 0, 126, 153, 130, 0, 130, 131, 134, 134, 134, 153, 132, 131, 133, 0, 0, 128, 135, 135, 135, 136, 136, 136, 138, 138, 138, 139, 139, 139, 134, 0, 0, 0, 139, 0, 157, 0, 133, 164, 135, 138, 136, 136, 157, 138, 138, 164, 139, 139, 134, 164, 165, 165, 0, 157, 177, 177, 177, 0, 165, 183, 183, 183, 184, 184, 184, 185, 185, 185, 186, 186, 186, 0, 219, 183, 219, 224, 177, 187, 187, 187, 219, 183, 0, 224, 184, 0, 0, 185, 0, 0, 186, 0, 0, 185, 186, 189, 189, 189, 0, 187, 191, 191, 191, 192, 192, 192, 195, 195, 195, 202, 202, 202, 204, 204, 204, 223, 223, 189, 205, 205, 205, 231, 191, 223, 187, 192, 0, 232, 195, 231, 226, 202, 232, 0, 204, 232, 202, 189, 226, 0, 205, 195, 206, 206, 206, 226, 204, 208, 208, 208, 210, 210, 210, 0, 211, 211, 211, 212, 212, 212, 236, 213, 213, 213, 206, 214, 214, 214, 236, 208, 221, 225, 210, 225, 221, 236, 211, 0, 221, 212, 227, 225, 210, 213, 227, 206, 211, 214, 227, 213, 208, 215, 215, 215, 217, 217, 217, 218, 218, 218, 222, 222, 222, 228, 0, 0, 228, 214, 217, 230, 229, 228, 229, 215, 0, 217, 217, 230, 218, 218, 229, 222, 222, 233, 283, 215, 222, 234, 235, 234, 230, 233, 283, 235, 222, 234, 235, 0, 237, 233, 237, 238, 0, 238, 0, 240, 237, 242, 0, 238, 239, 239, 239, 240, 241, 242, 241, 244, 243, 240, 243, 277, 241, 277, 242, 244, 0, 278, 243, 277, 0, 239, 239, 244, 278, 278, 239, 249, 249, 249, 253, 253, 253, 0, 239, 254, 254, 254, 255, 255, 255, 256, 256, 256, 257, 257, 257, 253, 253, 249, 273, 274, 253, 260, 260, 260, 279, 254, 273, 274, 255, 0, 274, 256, 279, 273, 257, 261, 261, 261, 279, 255, 257, 0, 0, 260, 262, 262, 262, 264, 264, 264, 265, 265, 265, 266, 266, 266, 284, 261, 267, 267, 267, 269, 269, 269, 284, 281, 262, 0, 0, 264, 281, 275, 265, 281, 291, 266, 270, 270, 270, 275, 267, 275, 291, 269, 271, 271, 271, 269, 0, 264, 266, 285, 0, 285, 267, 280, 280, 280, 270, 285, 270, 272, 272, 272, 0, 0, 271, 287, 0, 282, 282, 282, 271, 287, 0, 287, 280, 280, 272, 272, 0, 280, 272, 272, 0, 286, 288, 288, 288, 280, 282, 282, 289, 286, 289, 282, 286, 290, 290, 290, 0, 294, 289, 282, 292, 292, 292, 288, 288, 294, 0, 0, 288, 295, 295, 295, 297, 294, 290, 290, 288, 0, 0, 290, 297, 292, 292, 0, 298, 319, 292, 290, 0, 298, 295, 295, 298, 319, 292, 295, 296, 0, 296, 0, 319, 0, 0, 295, 296, 303, 303, 303, 305, 305, 305, 307, 307, 307, 0, 0, 303, 303, 303, 303, 303, 303, 303, 303, 311, 311, 311, 303, 0, 0, 305, 0, 0, 307, 313, 313, 313, 314, 314, 314, 315, 315, 315, 316, 316, 316, 311, 305, 0, 322, 320, 307, 317, 317, 317, 0, 313, 322, 320, 314, 320, 326, 315, 322, 323, 316, 323, 0, 330, 326, 313, 0, 323, 328, 317, 328, 330, 326, 330, 314, 0, 328, 315, 316, 318, 318, 318, 321, 321, 321, 324, 324, 324, 0, 0, 318, 318, 318, 318, 318, 318, 318, 318, 0, 0, 318, 318, 0, 321, 321, 0, 324, 324, 321, 368, 329, 324, 329, 331, 331, 332, 321, 368, 329, 324, 336, 331, 0, 332, 334, 334, 394, 332, 336, 338, 338, 338, 334, 341, 394, 341, 336, 0, 340, 340, 340, 341, 394, 0, 342, 342, 342, 349, 349, 349, 338, 338, 351, 351, 351, 338, 0, 0, 0, 340, 340, 0, 0, 338, 340, 342, 342, 0, 357, 349, 342, 0, 340, 0, 351, 357, 357, 0, 342, 343, 343, 343, 343, 343, 343, 343, 343, 344, 344, 344, 344, 344, 344, 344, 344, 345, 345, 345, 345, 345, 345, 345, 345, 347, 347, 347, 347, 347, 347, 347, 347, 348, 348, 348, 352, 352, 352, 353, 353, 353, 0, 354, 354, 354, 361, 361, 366, 369, 0, 369, 366, 0, 361, 348, 366, 369, 352, 0, 0, 353, 398, 398, 352, 354, 358, 358, 358, 0, 398, 354, 360, 360, 360, 0, 348, 356, 356, 356, 356, 356, 356, 356, 356, 0, 0, 358, 358, 363, 363, 363, 358, 360, 360, 364, 364, 364, 360, 370, 358, 370, 0, 379, 379, 379, 360, 370, 0, 0, 363, 363, 365, 365, 365, 363, 364, 364, 367, 367, 367, 364, 379, 363, 0, 379, 380, 380, 380, 364, 0, 0, 0, 365, 365, 373, 373, 373, 365, 367, 367, 387, 0, 387, 367, 396, 365, 396, 380, 387, 411, 0, 367, 396, 0, 411, 373, 373, 411, 0, 0, 373, 0, 380, 0, 0, 0, 0, 0, 373, 375, 375, 375, 375, 375, 375, 375, 375, 376, 376, 376, 376, 376, 376, 376, 376, 377, 377, 377, 377, 377, 377, 377, 377, 383, 383, 383, 385, 385, 385, 0, 386, 386, 386, 390, 390, 390, 397, 397, 397, 404, 404, 404, 405, 405, 405, 383, 0, 0, 385, 386, 385, 386, 386, 0, 390, 390, 0, 397, 397, 390, 409, 404, 397, 0, 405, 0, 0, 390, 409, 383, 397, 406, 406, 406, 407, 407, 407, 408, 408, 408, 0, 409, 0, 0, 405, 412, 412, 412, 414, 414, 414, 0, 0, 406, 0, 0, 407, 0, 408, 408, 0, 418, 418, 418, 0, 0, 412, 412, 0, 414, 414, 412, 0, 406, 414, 419, 419, 419, 0, 412, 0, 0, 414, 418, 421, 421, 421, 0, 0, 418, 422, 422, 422, 425, 425, 425, 0, 419, 0, 0, 0, 0, 0, 0, 0, 421, 421, 0, 0, 0, 421, 422, 422, 0, 0, 425, 422, 0, 421, 0, 0, 0, 0, 0, 422, 431, 431, 431, 431, 431, 431, 432, 432, 432, 432, 432, 432, 433, 433, 433, 433, 433, 433, 434, 434, 434, 434, 434, 434, 435, 435, 435, 435, 435, 435, 436, 436, 436, 436, 436, 436, 437, 437, 437, 437, 437, 437, 438, 438, 438, 438, 438, 438, 439, 439, 439, 439, 439, 439, 440, 0, 0, 440, 440, 440, 441, 441, 0, 441, 0, 441, 442, 442, 0, 0, 442, 442, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430 } ; 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 static int yy_more_flag = 0; static int yy_more_len = 0; #define yymore() (yy_more_flag = 1) #define YY_MORE_ADJ yy_more_len #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "html2hdml-scan.l" #define INITIAL 0 #line 2 "html2hdml-scan.l" /* C-HTML scanner */ /* assume no ISO2022 string */ /* reference: [1] RFC1866, [2] http://www.nttdocomo.co.jp/i/tag/ */ #include #include #include #include "html2hdml.h" #include "html2hdml-parse.c" int gl_elem; int gl_prev_c; int gl_text_len = 0; int gl_lineno = 1; int gl_last_ret = -1; /* no such token*/ int gl_dummyspc_printed = 0; #define YYLVAL yylval.str #define SETLVAL() (YYLVAL = my_strdup(yytext)) #define FLUSH_TEXT() \ if (gl_text_len) { \ yyless(gl_text_len); \ yytext[gl_text_len] = '\0'; \ gl_text_len = 0; \ SETLVAL(); \ RETURN(TEXT); \ } else { SETLVAL(); } #define APPEND_TEXT() { \ yymore(); \ gl_text_len = yyleng; \ /*yymore();*/ } #define RETURN_DUMMYSPC(ret) { \ YYLVAL = my_strdup(""); \ RETURN(ret); \ } #define INSERT_DUMMYSPC() \ if (gl_last_ret != ' ' && gl_last_ret != '\n') { \ yyless(0); \ RETURN_DUMMYSPC(' '); \ } #define RETURN(ret) { \ gl_last_ret = ret; \ return ret; } #define POPSTATE() { \ BEGIN gl_prev_c; } #define PUSHSTATE(state) { \ gl_prev_c = YYSTATE; \ BEGIN state; } #define ELEM_RET(i) { \ SETLVAL(); \ BEGIN C_ATTRNAME; \ gl_elem = i; \ RETURN(i); \ } #define ATTR_RET(i, j) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (i) { RETURN(j); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_1(ret, e1) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_2(ret, e1, e2) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_3(ret, e1, e2, e3) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_4(ret, e1, e2, e3, e4) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_5(ret, e1, e2, e3, e4, e5) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4 || gl_elem == e5) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_6(ret, e1, e2, e3, e4, e5, e6) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4 || gl_elem == e5 || gl_elem == e6) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_7(ret, e1, e2, e3, e4, e5, e6, e7) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4 || gl_elem == e5 || gl_elem == e6 || \ gl_elem == e7) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_8(ret, e1, e2, e3, e4, e5, e6, e7, e8) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4 || gl_elem == e5 || gl_elem == e6 || \ gl_elem == e7 || gl_elem == e8) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_9(ret, e1, e2, e3, e4, e5, e6, e7, e8, e9) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4 || gl_elem == e5 || gl_elem == e6 || \ gl_elem == e7 || gl_elem == e8 || gl_elem == e9) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #define ATTR_RET_10(ret, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) { \ YYLVAL = my_strdup(yytext); \ BEGIN C_EQ; \ if (gl_elem == e1 || gl_elem == e2 || gl_elem == e3 || \ gl_elem == e4 || gl_elem == e5 || gl_elem == e6 || \ gl_elem == e7 || gl_elem == e8 || gl_elem == e9 || \ gl_elem == e10) { RETURN(ret); } \ else { RETURN(UNKNOWNATTR); } \ } #undef YY_INPUT #define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms)) int my_yyinput(char *buf, int max_size); #define C_ELEM 1 #define C_ATTRNAME 2 #define C_EQ 3 #define C_ATTRVALUE 4 #define C_AVAL_Q 5 #define C_AVAL_DQ 6 #define C_TAGC 7 #define C_COM 8 #define C_NONASCII 9 #line 1092 "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 = NULL, *yy_bp = NULL; register int yy_act; #line 179 "html2hdml-scan.l" #line 1249 "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_more_len = 0; if ( yy_more_flag ) { yy_more_len = yy_c_buf_p - yytext_ptr; yy_more_flag = 0; } 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 >= 431 ) 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] != 1794 ); 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_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 185 "html2hdml-scan.l" { FLUSH_TEXT(); gl_lineno++; yymore(); } YY_BREAK case 2: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 186 "html2hdml-scan.l" { FLUSH_TEXT(); gl_lineno++; yymore(); } YY_BREAK case 3: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 187 "html2hdml-scan.l" { FLUSH_TEXT(); gl_lineno++; yymore(); } YY_BREAK case 4: YY_RULE_SETUP #line 190 "html2hdml-scan.l" { FLUSH_TEXT(); RETURN(COMMENT); } YY_BREAK case 5: YY_RULE_SETUP #line 191 "html2hdml-scan.l" { FLUSH_TEXT(); BEGIN C_COM; RETURN(COMO); } YY_BREAK case 6: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 194 "html2hdml-scan.l" { FLUSH_TEXT(); BEGIN C_TAGC; RETURN(COMC); } YY_BREAK /* mark declaration */ case 7: YY_RULE_SETUP #line 198 "html2hdml-scan.l" { FLUSH_TEXT(); BEGIN C_TAGC; RETURN(MARKO); } YY_BREAK /* processing instruction */ case 8: YY_RULE_SETUP #line 201 "html2hdml-scan.l" { FLUSH_TEXT(); BEGIN C_TAGC; RETURN(PROCO); } YY_BREAK case 9: YY_RULE_SETUP #line 203 "html2hdml-scan.l" { FLUSH_TEXT(); BEGIN C_ELEM; RETURN(ETAGO); } YY_BREAK case 10: YY_RULE_SETUP #line 204 "html2hdml-scan.l" { FLUSH_TEXT(); BEGIN C_ELEM; RETURN(STAGO); } YY_BREAK case 11: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 207 "html2hdml-scan.l" { ELEM_RET(A); } YY_BREAK case 12: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 208 "html2hdml-scan.l" { ELEM_RET(BASE); } YY_BREAK case 13: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 10; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 209 "html2hdml-scan.l" { ELEM_RET(BLOCKQUOTE); } YY_BREAK case 14: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 210 "html2hdml-scan.l" { ELEM_RET(BODY); } YY_BREAK case 15: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 211 "html2hdml-scan.l" { ELEM_RET(BR); } YY_BREAK case 16: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 212 "html2hdml-scan.l" { ELEM_RET(CENTER); } YY_BREAK case 17: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 213 "html2hdml-scan.l" { ELEM_RET(DIR); } YY_BREAK case 18: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 214 "html2hdml-scan.l" { ELEM_RET(DL); } YY_BREAK case 19: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 215 "html2hdml-scan.l" { ELEM_RET(DT); } YY_BREAK case 20: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 216 "html2hdml-scan.l" { ELEM_RET(DD); } YY_BREAK case 21: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 217 "html2hdml-scan.l" { ELEM_RET(DIV); } YY_BREAK case 22: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 218 "html2hdml-scan.l" { ELEM_RET(FORM); } YY_BREAK case 23: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 219 "html2hdml-scan.l" { ELEM_RET(HEAD); } YY_BREAK case 24: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 220 "html2hdml-scan.l" { ELEM_RET(H1); } YY_BREAK case 25: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 221 "html2hdml-scan.l" { ELEM_RET(H2); } YY_BREAK case 26: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 222 "html2hdml-scan.l" { ELEM_RET(H3); } YY_BREAK case 27: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 223 "html2hdml-scan.l" { ELEM_RET(H4); } YY_BREAK case 28: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 224 "html2hdml-scan.l" { ELEM_RET(H5); } YY_BREAK case 29: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 225 "html2hdml-scan.l" { ELEM_RET(H6); } YY_BREAK case 30: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 226 "html2hdml-scan.l" { ELEM_RET(HR); } YY_BREAK case 31: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 227 "html2hdml-scan.l" { ELEM_RET(HTML); } YY_BREAK case 32: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 228 "html2hdml-scan.l" { ELEM_RET(IMG); } YY_BREAK case 33: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 229 "html2hdml-scan.l" { ELEM_RET(INPUT); } YY_BREAK case 34: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 230 "html2hdml-scan.l" { ELEM_RET(LI); } YY_BREAK case 35: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 231 "html2hdml-scan.l" { ELEM_RET(MENU); } YY_BREAK case 36: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 232 "html2hdml-scan.l" { ELEM_RET(OL); } YY_BREAK case 37: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 233 "html2hdml-scan.l" { ELEM_RET(OPTION); } YY_BREAK case 38: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 234 "html2hdml-scan.l" { ELEM_RET(P); } YY_BREAK case 39: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 235 "html2hdml-scan.l" { ELEM_RET(PLAINTEXT); } YY_BREAK case 40: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 236 "html2hdml-scan.l" { ELEM_RET(PRE); } YY_BREAK case 41: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 237 "html2hdml-scan.l" { ELEM_RET(SELECT); } YY_BREAK case 42: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 238 "html2hdml-scan.l" { ELEM_RET(TEXTAREA); } YY_BREAK case 43: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 239 "html2hdml-scan.l" { ELEM_RET(TITLE); } YY_BREAK case 44: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 240 "html2hdml-scan.l" { ELEM_RET(UL); } YY_BREAK case 45: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 242 "html2hdml-scan.l" { ELEM_RET(UNKNOWNELEM); } YY_BREAK case 46: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 243 "html2hdml-scan.l" { ELEM_RET(UNKNOWNELEM); } YY_BREAK case 47: YY_RULE_SETUP #line 247 "html2hdml-scan.l" { yyless(0); BEGIN C_EQ; } YY_BREAK case 48: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 249 "html2hdml-scan.l" { ATTR_RET_4(NAME, A, INPUT, SELECT, TEXTAREA); } YY_BREAK case 49: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 250 "html2hdml-scan.l" { ATTR_RET_2(HREF, A, BASE); } YY_BREAK case 50: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 251 "html2hdml-scan.l" { ATTR_RET_2(ACCESSKEY, A, INPUT); } YY_BREAK case 51: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 252 "html2hdml-scan.l" { ATTR_RET_1(CLEAR, BR); } YY_BREAK case 52: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 253 "html2hdml-scan.l" { ATTR_RET_10(ALIGN, DIV, H1, H2, H3, H4, H5, H6, HR, IMG, P); } YY_BREAK case 53: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 256 "html2hdml-scan.l" { ATTR_RET_1(ACTION, FORM); } YY_BREAK case 54: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 257 "html2hdml-scan.l" { ATTR_RET_1(METHOD, FORM); } YY_BREAK case 55: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 259 "html2hdml-scan.l" { ATTR_RET_3(SIZE, HR, INPUT, SELECT); } YY_BREAK case 56: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 260 "html2hdml-scan.l" { ATTR_RET_2(WIDTH, HR, IMG); } YY_BREAK case 57: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 261 "html2hdml-scan.l" { ATTR_RET_1(NOSHADE, HR); } YY_BREAK case 58: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 263 "html2hdml-scan.l" { ATTR_RET_1(SRC, IMG); } YY_BREAK case 59: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 264 "html2hdml-scan.l" { ATTR_RET_1(HEIGHT, IMG); } YY_BREAK case 60: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 265 "html2hdml-scan.l" { ATTR_RET_1(HSPACE, IMG); } YY_BREAK case 61: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 266 "html2hdml-scan.l" { ATTR_RET_1(VSPACE, IMG); } YY_BREAK case 62: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 267 "html2hdml-scan.l" { ATTR_RET_1(ALT, IMG); } YY_BREAK case 63: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 268 "html2hdml-scan.l" { ATTR_RET_1(BORDER, IMG); } YY_BREAK case 64: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 270 "html2hdml-scan.l" { ATTR_RET_3(TYPE, INPUT, LI, OL); } /* 2.0 */ YY_BREAK case 65: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 273 "html2hdml-scan.l" { ATTR_RET_1(MAXLENGTH, INPUT); } YY_BREAK case 66: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 274 "html2hdml-scan.l" { ATTR_RET_4(VALUE, INPUT, OPTION, INPUT, LI); } /* 2.0 */ YY_BREAK case 67: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 277 "html2hdml-scan.l" { ATTR_RET_1(CHECKED, INPUT); } YY_BREAK case 68: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 279 "html2hdml-scan.l" { ATTR_RET_1(START, OL); } /* 2.0 */ YY_BREAK case 69: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 281 "html2hdml-scan.l" { ATTR_RET_1(SELECTED, OPTION); } YY_BREAK case 70: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 8; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 282 "html2hdml-scan.l" { ATTR_RET_1(MULTIPLE, SELECT); } /* 2.0 */ YY_BREAK case 71: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 284 "html2hdml-scan.l" { ATTR_RET_1(ROWS, TEXTAREA); } YY_BREAK case 72: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 285 "html2hdml-scan.l" { ATTR_RET_1(COLS, TEXTAREA); } YY_BREAK case 73: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 286 "html2hdml-scan.l" { ATTR_RET_1(ISTYLE, TEXTAREA); } /* 2.0 */ YY_BREAK case 74: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 288 "html2hdml-scan.l" { ATTR_RET(1, UNKNOWNATTR); } YY_BREAK case 75: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 289 "html2hdml-scan.l" { ATTR_RET(1, UNKNOWNATTR); } YY_BREAK case 76: YY_RULE_SETUP #line 294 "html2hdml-scan.l" { SETLVAL(); BEGIN C_ATTRVALUE; RETURN('=');} YY_BREAK case 77: YY_RULE_SETUP #line 295 "html2hdml-scan.l" { yyless(0); BEGIN C_ATTRNAME; } YY_BREAK case 78: YY_RULE_SETUP #line 296 "html2hdml-scan.l" { yyless(0); BEGIN C_ATTRNAME; } YY_BREAK case 79: YY_RULE_SETUP #line 300 "html2hdml-scan.l" { BEGIN C_AVAL_Q; RETURN('\''); } YY_BREAK case 80: YY_RULE_SETUP #line 301 "html2hdml-scan.l" { BEGIN C_AVAL_DQ; RETURN('"'); } YY_BREAK case 81: YY_RULE_SETUP #line 302 "html2hdml-scan.l" { yyless(0); BEGIN C_ATTRNAME; RETURN_DUMMYSPC(ATTRVALUESTR); } YY_BREAK case 82: YY_RULE_SETUP #line 303 "html2hdml-scan.l" { SETLVAL(); BEGIN C_ATTRNAME; RETURN(ATTRVALUESTR); } YY_BREAK case 83: YY_RULE_SETUP #line 309 "html2hdml-scan.l" { FLUSH_TEXT(); INSERT_DUMMYSPC(); BEGIN INITIAL; RETURN(TAGC); } YY_BREAK case 84: #line 313 "html2hdml-scan.l" case 85: YY_RULE_SETUP #line 313 "html2hdml-scan.l" { SETLVAL(); RETURN(ATTRVALUESTR); } YY_BREAK case 86: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 315 "html2hdml-scan.l" { BEGIN C_ATTRNAME; RETURN('\''); } YY_BREAK case 87: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 316 "html2hdml-scan.l" { BEGIN C_ATTRNAME; RETURN('"'); } YY_BREAK case 88: #line 319 "html2hdml-scan.l" case 89: YY_RULE_SETUP #line 319 "html2hdml-scan.l" { static int is_firsttime = 1; int ret; if (is_firsttime) { is_firsttime = 0; SETLVAL(); ret = yytext[0]; yyless(0); /* RETURN(yytext[0]); */ RETURN(ret); } else { is_firsttime = 1; BEGIN C_ATTRNAME; RETURN_DUMMYSPC(' '); } } YY_BREAK case 90: YY_RULE_SETUP #line 337 "html2hdml-scan.l" { int i; FLUSH_TEXT(); i = 63000+ (yytext[yyleng-4] - '0')*100 + (yytext[yyleng-3] - '0')*10 + (yytext[yyleng-2] - '0'); YYLVAL = my_malloc(sizeof(char)*3); sprintf(YYLVAL, "%c%c", i/256, i%256); RETURN(TEXT); } YY_BREAK case 91: YY_RULE_SETUP #line 349 "html2hdml-scan.l" { FLUSH_TEXT(); gl_lineno++; RETURN('\n'); } YY_BREAK case 92: YY_RULE_SETUP #line 350 "html2hdml-scan.l" { FLUSH_TEXT(); RETURN(' '); } YY_BREAK case 93: YY_RULE_SETUP #line 351 "html2hdml-scan.l" { FLUSH_TEXT(); } YY_BREAK case 94: YY_RULE_SETUP #line 352 "html2hdml-scan.l" { APPEND_TEXT(); } YY_BREAK case 95: YY_RULE_SETUP #line 355 "html2hdml-scan.l" ECHO; YY_BREAK #line 2066 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(C_ELEM): case YY_STATE_EOF(C_ATTRNAME): case YY_STATE_EOF(C_EQ): case YY_STATE_EOF(C_ATTRVALUE): case YY_STATE_EOF(C_AVAL_Q): case YY_STATE_EOF(C_AVAL_DQ): case YY_STATE_EOF(C_TAGC): case YY_STATE_EOF(C_COM): case YY_STATE_EOF(C_NONASCII): 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)] : 51); 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 >= 431 ) 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 = 51; 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 >= 431 ) 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 == 430); 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 ); } #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 355 "html2hdml-scan.l" #if 0 int yywrap() { /* fputs("\n", yyout); */ /* fputs("\n", yyout); */ return 1; } #endif extern char myinput[]; extern char *myinputptr; extern char *myinputlim; #ifndef min #define min(a, b) ((a) > (b) ? (b) : (a)) #endif /* min */ int my_yyinput(char *buf, int max_size) { int n = min(max_size, myinputlim - myinputptr); if (n > 0) { memcpy(buf, myinputptr, n); myinputptr += n; } return n; } /* YYSTYPE my_strdup(char *str, int print_this) { struct my_yystype *p; p = (struct my_yystype *)my_malloc(sizeof(struct my_yystype)); p->print_this = print_this; p->noneed_tag = 0; p->top = (struct strlist *)my_malloc(sizeof(struct strlist)); p->last = p->top; p->top->str = my_strdup(str); p->top->next = NULL; return p; } */