home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Magazine / wwwoffle-2.1.tar.gz / wwwoffle-2.1 / html.c < prev    next >
C/C++ Source or Header  |  1998-03-02  |  62KB  |  2,394 lines

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