home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / disks / disk407.lzh / Flex / flex.skel < prev    next >
Text File  |  1990-11-18  |  20KB  |  834 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* scanner skeleton version:
  4.  * $Header: WPL:Generators/flex-2.3/RCS/flex.skel,v 1.2 90/07/15 01:17:26 loftus Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8.  
  9. #include <stdio.h>
  10.  
  11. #ifdef __STDC__
  12.  
  13. #ifndef DONT_HAVE_STDLIB_H
  14. #include <stdlib.h>
  15. #else
  16. void *malloc( unsigned );
  17. void free( void* );
  18. #endif
  19.  
  20. #define YY_USE_PROTOS
  21. #define YY_USE_CONST
  22. #endif
  23.  
  24.  
  25. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  26. #ifdef c_plusplus
  27. #ifndef __cplusplus
  28. #define __cplusplus
  29. #endif
  30. #endif
  31.  
  32.  
  33. #ifdef __cplusplus
  34.  
  35. #ifndef __STDC__
  36. #include <stdlib.h>
  37. #endif
  38.  
  39. #include <osfcn.h>
  40.  
  41. /* use prototypes in function declarations */
  42. #define YY_USE_PROTOS
  43.  
  44. /* the "const" storage-class-modifier is valid */
  45. #define YY_USE_CONST
  46.  
  47. #endif
  48.  
  49.  
  50. #ifdef __TURBOC__
  51. #define YY_USE_CONST
  52. #endif
  53.  
  54.  
  55. #ifndef YY_USE_CONST
  56. #define const
  57. #endif
  58.  
  59.  
  60. #ifdef YY_USE_PROTOS
  61. #define YY_PROTO(proto) proto
  62. #else
  63. #define YY_PROTO(proto) ()
  64. /* there's no standard place to get these definitions */
  65. char *malloc();
  66. int free();
  67. int read();
  68. #endif
  69.  
  70.  
  71. /* amount of stuff to slurp up with each read */
  72. #ifndef YY_READ_BUF_SIZE
  73. #define YY_READ_BUF_SIZE 8192
  74. #endif
  75.  
  76. /* returned upon end-of-file */
  77. #define YY_END_TOK 0
  78.  
  79. /* copy whatever the last rule matched to the standard output */
  80.  
  81. /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
  82. /* this used to be an fputs(), but since the string might contain NUL's,
  83.  * we now use fwrite()
  84.  */
  85. #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
  86.  
  87. /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  88.  * is returned in "result".
  89.  */
  90. #define YY_INPUT(buf,result,max_size) \
  91.     if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  92.         YY_FATAL_ERROR( "read() in flex scanner failed" );
  93. #define YY_NULL 0
  94.  
  95. /* no semi-colon after return; correct usage is to write "yyterminate();" -
  96.  * we don't want an extra ';' after the "return" because that will cause
  97.  * some compilers to complain about unreachable statements.
  98.  */
  99. #define yyterminate() return ( YY_NULL )
  100.  
  101. /* report a fatal error */
  102.  
  103. /* The funky do-while is used to turn this macro definition into
  104.  * a single C statement (which needs a semi-colon terminator).
  105.  * This avoids problems with code like:
  106.  *
  107.  *     if ( something_happens )
  108.  *        YY_FATAL_ERROR( "oops, the something happened" );
  109.  *    else
  110.  *        everything_okay();
  111.  *
  112.  * Prior to using the do-while the compiler would get upset at the
  113.  * "else" because it interpreted the "if" statement as being all
  114.  * done when it reached the ';' after the YY_FATAL_ERROR() call.
  115.  */
  116.  
  117. #define YY_FATAL_ERROR(msg) \
  118.     do \
  119.         { \
  120.         (void) fputs( msg, stderr ); \
  121.         (void) putc( '\n', stderr ); \
  122.         exit( 1 ); \
  123.         } \
  124.     while ( 0 )
  125.  
  126. /* default yywrap function - always treat EOF as an EOF */
  127. #define yywrap() 1
  128.  
  129. /* enter a start condition.  This macro really ought to take a parameter,
  130.  * but we do it the disgusting crufty way forced on us by the ()-less
  131.  * definition of BEGIN
  132.  */
  133. #define BEGIN yy_start = 1 + 2 *
  134.  
  135. /* action number for EOF rule of a given start state */
  136. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  137.  
  138. /* special action meaning "start processing a new file" */
  139. #define YY_NEW_FILE \
  140.     do \
  141.         { \
  142.         yy_init_buffer( yy_current_buffer, yyin ); \
  143.         yy_load_buffer_state(); \
  144.         } \
  145.     while ( 0 )
  146.  
  147. /* default declaration of generated scanner - a define so the user can
  148.  * easily add parameters
  149.  */
  150. #define YY_DECL int yylex YY_PROTO(( void )) 
  151.  
  152. /* code executed at the end of each rule */
  153. #define YY_BREAK break;
  154.  
  155. #define YY_END_OF_BUFFER_CHAR 0
  156.  
  157. #ifndef YY_BUF_SIZE
  158. #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
  159. #endif
  160.  
  161. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  162.  
  163. %% section 1 definitions go here
  164.  
  165. /* done after the current pattern has been matched and before the
  166.  * corresponding action - sets up yytext
  167.  */
  168. #define YY_DO_BEFORE_ACTION \
  169.     yytext = yy_bp; \
  170. %% code to fiddle yytext and yyleng for yymore() goes here
  171.     yy_hold_char = *yy_cp; \
  172.     *yy_cp = '\0'; \
  173.     yy_c_buf_p = yy_cp;
  174.  
  175. #define EOB_ACT_CONTINUE_SCAN 0
  176. #define EOB_ACT_END_OF_FILE 1
  177. #define EOB_ACT_LAST_MATCH 2
  178.  
  179. /* return all but the first 'n' matched characters back to the input stream */
  180. #define yyless(n) \
  181.     do \
  182.         { \
  183.         /* undo effects of setting up yytext */ \
  184.         *yy_cp = yy_hold_char; \
  185.         yy_c_buf_p = yy_cp = yy_bp + n; \
  186.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  187.         } \
  188.     while ( 0 )
  189.  
  190. #define unput(c) yyunput( c, yytext )
  191.  
  192.  
  193. struct yy_buffer_state
  194.     {
  195.     FILE *yy_input_file;
  196.  
  197.     YY_CHAR *yy_ch_buf;        /* input buffer */
  198.     YY_CHAR *yy_buf_pos;    /* current position in input buffer */
  199.  
  200.     /* size of input buffer in bytes, not including room for EOB characters*/
  201.     int yy_buf_size;    
  202.  
  203.     /* number of characters read into yy_ch_buf, not including EOB characters */
  204.     int yy_n_chars;
  205.  
  206.     int yy_eof_status;        /* whether we've seen an EOF on this buffer */
  207. #define EOF_NOT_SEEN 0
  208.     /* "pending" happens when the EOF has been seen but there's still
  209.      * some text process
  210.      */
  211. #define EOF_PENDING 1
  212. #define EOF_DONE 2
  213.     };
  214.  
  215. static YY_BUFFER_STATE yy_current_buffer;
  216.  
  217. /* we provide macros for accessing buffer states in case in the
  218.  * future we want to put the buffer states in a more general
  219.  * "scanner state"
  220.  */
  221. #define YY_CURRENT_BUFFER yy_current_buffer
  222.  
  223.  
  224. /* yy_hold_char holds the character lost when yytext is formed */
  225. static YY_CHAR yy_hold_char;
  226.  
  227. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  228.  
  229.  
  230.  
  231. #ifndef YY_USER_ACTION
  232. #define YY_USER_ACTION
  233. #endif
  234.  
  235. #ifndef YY_USER_INIT
  236. #define YY_USER_INIT
  237. #endif
  238.  
  239. extern YY_CHAR *yytext;
  240. extern int yyleng;
  241. extern FILE *yyin, *yyout;
  242.  
  243. YY_CHAR *yytext;
  244. int yyleng;
  245.  
  246. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  247.  
  248. %% data tables for the DFA go here
  249.  
  250. /* these variables are all declared out here so that section 3 code can
  251.  * manipulate them
  252.  */
  253. /* points to current character in buffer */
  254. static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
  255. static int yy_init = 1;        /* whether we need to initialize */
  256. static int yy_start = 0;    /* start state number */
  257.  
  258. /* flag which is used to allow yywrap()'s to do buffer switches
  259.  * instead of setting up a fresh yyin.  A bit of a hack ...
  260.  */
  261. static int yy_did_buffer_switch_on_eof;
  262.  
  263. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  264. static yy_state_type yy_try_NUL_trans YY_PROTO(( register yy_state_type current_state ));
  265. static int yy_get_next_buffer YY_PROTO(( void ));
  266. static void yyunput YY_PROTO(( YY_CHAR c, register YY_CHAR *buf_ptr ));
  267. void yyrestart YY_PROTO(( FILE *input_file ));
  268. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  269. void yy_load_buffer_state YY_PROTO(( void ));
  270. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  271. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  272. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  273.  
  274. #define yy_new_buffer yy_create_buffer
  275.  
  276. #ifdef __cplusplus
  277. static int yyinput YY_PROTO(( void ));
  278. #else
  279. static int input YY_PROTO(( void ));
  280. #endif
  281.  
  282. YY_DECL
  283.     {
  284.     register yy_state_type yy_current_state;
  285.     register YY_CHAR *yy_cp, *yy_bp;
  286.     register int yy_act;
  287.  
  288. %% user's declarations go here
  289.  
  290.     if ( yy_init )
  291.     {
  292.     YY_USER_INIT;
  293.  
  294.     if ( ! yy_start )
  295.         yy_start = 1;    /* first start state */
  296.  
  297.     if ( ! yyin )
  298.         yyin = stdin;
  299.  
  300.     if ( ! yyout )
  301.         yyout = stdout;
  302.  
  303.     if ( yy_current_buffer )
  304.         yy_init_buffer( yy_current_buffer, yyin );
  305.     else
  306.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  307.  
  308.     yy_load_buffer_state();
  309.  
  310.     yy_init = 0;
  311.     }
  312.  
  313.     while ( 1 )        /* loops until end-of-file is reached */
  314.     {
  315. %% yymore()-related code goes here
  316.     yy_cp = yy_c_buf_p;
  317.  
  318.     /* support of yytext */
  319.     *yy_cp = yy_hold_char;
  320.  
  321.     /* yy_bp points to the position in yy_ch_buf of the start of the
  322.      * current run.
  323.      */
  324.     yy_bp = yy_cp;
  325.  
  326. %% code to set up and find next match goes here
  327.  
  328. yy_find_action:
  329. %% code to find the action number goes here
  330.  
  331.     YY_DO_BEFORE_ACTION;
  332.     YY_USER_ACTION;
  333.  
  334. do_action:    /* this label is used only to access EOF actions */
  335.  
  336. %% debug code goes here
  337.  
  338.     switch ( yy_act )
  339.         {
  340. %% actions go here
  341.  
  342.         case YY_END_OF_BUFFER:
  343.         {
  344.         /* amount of text matched not including the EOB char */
  345.         int yy_amount_of_matched_text = yy_cp - yytext - 1;
  346.  
  347.         /* undo the effects of YY_DO_BEFORE_ACTION */
  348.         *yy_cp = yy_hold_char;
  349.  
  350.         /* note that here we test for yy_c_buf_p "<=" to the position
  351.          * of the first EOB in the buffer, since yy_c_buf_p will
  352.          * already have been incremented past the NUL character
  353.          * (since all states make transitions on EOB to the end-
  354.          * of-buffer state).  Contrast this with the test in yyinput().
  355.          */
  356.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  357.             /* this was really a NUL */
  358.             {
  359.             yy_state_type yy_next_state;
  360.  
  361.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  362.  
  363.             yy_current_state = yy_get_previous_state();
  364.  
  365.             /* okay, we're now positioned to make the
  366.              * NUL transition.  We couldn't have
  367.              * yy_get_previous_state() go ahead and do it
  368.              * for us because it doesn't know how to deal
  369.              * with the possibility of jamming (and we
  370.              * don't want to build jamming into it because
  371.              * then it will run more slowly)
  372.              */
  373.  
  374.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  375.  
  376.             yy_bp = yytext + YY_MORE_ADJ;
  377.  
  378.             if ( yy_next_state )
  379.             {
  380.             /* consume the NUL */
  381.             yy_cp = ++yy_c_buf_p;
  382.             yy_current_state = yy_next_state;
  383.             goto yy_match;
  384.             }
  385.  
  386.             else
  387.             {
  388. %% code to do backtracking for compressed tables and set up yy_cp goes here
  389.             goto yy_find_action;
  390.             }
  391.             }
  392.  
  393.         else switch ( yy_get_next_buffer() )
  394.             {
  395.             case EOB_ACT_END_OF_FILE:
  396.             {
  397.             yy_did_buffer_switch_on_eof = 0;
  398.  
  399.             if ( yywrap() )
  400.                 {
  401.                 /* note: because we've taken care in
  402.                  * yy_get_next_buffer() to have set up yytext,
  403.                  * we can now set up yy_c_buf_p so that if some
  404.                  * total hoser (like flex itself) wants
  405.                  * to call the scanner after we return the
  406.                  * YY_NULL, it'll still work - another YY_NULL
  407.                  * will get returned.
  408.                  */
  409.                 yy_c_buf_p = yytext + YY_MORE_ADJ;
  410.  
  411.                 yy_act = YY_STATE_EOF((yy_start - 1) / 2);
  412.                 goto do_action;
  413.                 }
  414.  
  415.             else
  416.                 {
  417.                 if ( ! yy_did_buffer_switch_on_eof )
  418.                 YY_NEW_FILE;
  419.                 }
  420.             }
  421.             break;
  422.  
  423.             case EOB_ACT_CONTINUE_SCAN:
  424.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  425.  
  426.             yy_current_state = yy_get_previous_state();
  427.  
  428.             yy_cp = yy_c_buf_p;
  429.             yy_bp = yytext + YY_MORE_ADJ;
  430.             goto yy_match;
  431.  
  432.             case EOB_ACT_LAST_MATCH:
  433.             yy_c_buf_p =
  434.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  435.  
  436.             yy_current_state = yy_get_previous_state();
  437.  
  438.             yy_cp = yy_c_buf_p;
  439.             yy_bp = yytext + YY_MORE_ADJ;
  440.             goto yy_find_action;
  441.             }
  442.         break;
  443.         }
  444.  
  445.         default:
  446. #ifdef FLEX_DEBUG
  447.         printf( "action # %d\n", yy_act );
  448. #endif
  449.         YY_FATAL_ERROR(
  450.             "fatal flex scanner internal error--no action found" );
  451.         }
  452.     }
  453.     }
  454.  
  455.  
  456. /* yy_get_next_buffer - try to read in a new buffer
  457.  *
  458.  * synopsis
  459.  *     int yy_get_next_buffer();
  460.  *     
  461.  * returns a code representing an action
  462.  *     EOB_ACT_LAST_MATCH - 
  463.  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  464.  *     EOB_ACT_END_OF_FILE - end of file
  465.  */
  466.  
  467. static int yy_get_next_buffer()
  468.  
  469.     {
  470.     register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  471.     register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
  472.     register int number_to_move, i;
  473.     int ret_val;
  474.  
  475.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  476.     YY_FATAL_ERROR(
  477.         "fatal flex scanner internal error--end of buffer missed" );
  478.  
  479.     /* try to read more data */
  480.  
  481.     /* first move last chars to start of buffer */
  482.     number_to_move = yy_c_buf_p - yytext;
  483.  
  484.     for ( i = 0; i < number_to_move; ++i )
  485.     *(dest++) = *(source++);
  486.  
  487.     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  488.     /* don't do the read, it's not guaranteed to return an EOF,
  489.      * just force an EOF
  490.      */
  491.     yy_n_chars = 0;
  492.  
  493.     else
  494.     {
  495.     int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  496.  
  497.     if ( num_to_read > YY_READ_BUF_SIZE )
  498.         num_to_read = YY_READ_BUF_SIZE;
  499.  
  500.     else if ( num_to_read <= 0 )
  501.         YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
  502.  
  503.     /* read in more data */
  504.     YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  505.           yy_n_chars, num_to_read );
  506.     }
  507.  
  508.     if ( yy_n_chars == 0 )
  509.     {
  510.     if ( number_to_move == 1 )
  511.         {
  512.         ret_val = EOB_ACT_END_OF_FILE;
  513.         yy_current_buffer->yy_eof_status = EOF_DONE;
  514.         }
  515.  
  516.     else
  517.         {
  518.         ret_val = EOB_ACT_LAST_MATCH;
  519.         yy_current_buffer->yy_eof_status = EOF_PENDING;
  520.         }
  521.     }
  522.  
  523.     else
  524.     ret_val = EOB_ACT_CONTINUE_SCAN;
  525.  
  526.     yy_n_chars += number_to_move;
  527.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  528.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  529.  
  530.     /* yytext begins at the second character in yy_ch_buf; the first
  531.      * character is the one which preceded it before reading in the latest
  532.      * buffer; it needs to be kept around in case it's a newline, so
  533.      * yy_get_previous_state() will have with '^' rules active
  534.      */
  535.  
  536.     yytext = &yy_current_buffer->yy_ch_buf[1];
  537.  
  538.     return ( ret_val );
  539.     }
  540.  
  541.  
  542. /* yy_get_previous_state - get the state just before the EOB char was reached
  543.  *
  544.  * synopsis
  545.  *     yy_state_type yy_get_previous_state();
  546.  */
  547.  
  548. static yy_state_type yy_get_previous_state()
  549.  
  550.     {
  551.     register yy_state_type yy_current_state;
  552.     register YY_CHAR *yy_cp;
  553.  
  554. %% code to get the start state into yy_current_state goes here
  555.  
  556.     for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  557.     {
  558. %% code to find the next state goes here
  559.     }
  560.  
  561.     return ( yy_current_state );
  562.     }
  563.  
  564.  
  565. /* yy_try_NUL_trans - try to make a transition on the NUL character
  566.  *
  567.  * synopsis
  568.  *     next_state = yy_try_NUL_trans( current_state );
  569.  */
  570.  
  571. #ifdef YY_USE_PROTOS
  572. static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
  573. #else
  574. static yy_state_type yy_try_NUL_trans( yy_current_state )
  575. register yy_state_type yy_current_state;
  576. #endif
  577.  
  578.     {
  579.     register int yy_is_jam;
  580. %% code to find the next state, and perhaps do backtracking, goes here
  581.  
  582.     return ( yy_is_jam ? 0 : yy_current_state );
  583.     }
  584.  
  585.  
  586. #ifdef YY_USE_PROTOS
  587. static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
  588. #else
  589. static void yyunput( c, yy_bp )
  590. YY_CHAR c;
  591. register YY_CHAR *yy_bp;
  592. #endif
  593.  
  594.     {
  595.     register YY_CHAR *yy_cp = yy_c_buf_p;
  596.  
  597.     /* undo effects of setting up yytext */
  598.     *yy_cp = yy_hold_char;
  599.  
  600.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  601.     { /* need to shift things up to make room */
  602.     register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
  603.     register YY_CHAR *dest =
  604.         &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
  605.     register YY_CHAR *source =
  606.         &yy_current_buffer->yy_ch_buf[number_to_move];
  607.  
  608.     while ( source > yy_current_buffer->yy_ch_buf )
  609.         *--dest = *--source;
  610.  
  611.     yy_cp += dest - source;
  612.     yy_bp += dest - source;
  613.     yy_n_chars = yy_current_buffer->yy_buf_size;
  614.  
  615.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  616.         YY_FATAL_ERROR( "flex scanner push-back overflow" );
  617.     }
  618.  
  619.     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  620.     yy_cp[-2] = '\n';
  621.  
  622.     *--yy_cp = c;
  623.  
  624.     /* note: the formal parameter *must* be called "yy_bp" for this
  625.      *       macro to now work correctly
  626.      */
  627.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  628.     }
  629.  
  630.  
  631. #ifdef __cplusplus
  632. static int yyinput()
  633. #else
  634. static int input()
  635. #endif
  636.  
  637.     {
  638.     int c;
  639.     YY_CHAR *yy_cp = yy_c_buf_p;
  640.  
  641.     *yy_cp = yy_hold_char;
  642.  
  643.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  644.     {
  645.     /* yy_c_buf_p now points to the character we want to return.
  646.      * If this occurs *before* the EOB characters, then it's a
  647.      * valid NUL; if not, then we've hit the end of the buffer.
  648.      */
  649.     if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  650.         /* this was really a NUL */
  651.         *yy_c_buf_p = '\0';
  652.  
  653.     else
  654.         { /* need more input */
  655.         yytext = yy_c_buf_p;
  656.         ++yy_c_buf_p;
  657.  
  658.         switch ( yy_get_next_buffer() )
  659.         {
  660.         case EOB_ACT_END_OF_FILE:
  661.             {
  662.             if ( yywrap() )
  663.             {
  664.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  665.             return ( EOF );
  666.             }
  667.  
  668.             YY_NEW_FILE;
  669.  
  670. #ifdef __cplusplus
  671.             return ( yyinput() );
  672. #else
  673.             return ( input() );
  674. #endif
  675.             }
  676.             break;
  677.  
  678.         case EOB_ACT_CONTINUE_SCAN:
  679.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  680.             break;
  681.  
  682.         case EOB_ACT_LAST_MATCH:
  683. #ifdef __cplusplus
  684.             YY_FATAL_ERROR( "unexpected last match in yyinput()" );
  685. #else
  686.             YY_FATAL_ERROR( "unexpected last match in input()" );
  687. #endif
  688.         }
  689.         }
  690.     }
  691.  
  692.     c = *yy_c_buf_p;
  693.     yy_hold_char = *++yy_c_buf_p;
  694.  
  695.     return ( c );
  696.     }
  697.  
  698.  
  699. #ifdef YY_USE_PROTOS
  700. void yyrestart( FILE *input_file )
  701. #else
  702. void yyrestart( input_file )
  703. FILE *input_file;
  704. #endif
  705.  
  706.     {
  707.     yy_init_buffer( yy_current_buffer, input_file );
  708.     yy_load_buffer_state();
  709.     }
  710.  
  711.  
  712. #ifdef YY_USE_PROTOS
  713. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  714. #else
  715. void yy_switch_to_buffer( new_buffer )
  716. YY_BUFFER_STATE new_buffer;
  717. #endif
  718.  
  719.     {
  720.     if ( yy_current_buffer == new_buffer )
  721.     return;
  722.  
  723.     if ( yy_current_buffer )
  724.     {
  725.     /* flush out information for old buffer */
  726.     *yy_c_buf_p = yy_hold_char;
  727.     yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  728.     yy_current_buffer->yy_n_chars = yy_n_chars;
  729.     }
  730.  
  731.     yy_current_buffer = new_buffer;
  732.     yy_load_buffer_state();
  733.  
  734.     /* we don't actually know whether we did this switch during
  735.      * EOF (yywrap()) processing, but the only time this flag
  736.      * is looked at is after yywrap() is called, so it's safe
  737.      * to go ahead and always set it.
  738.      */
  739.     yy_did_buffer_switch_on_eof = 1;
  740.     }
  741.  
  742.  
  743. #ifdef YY_USE_PROTOS
  744. void yy_load_buffer_state( void )
  745. #else
  746. void yy_load_buffer_state()
  747. #endif
  748.  
  749.     {
  750.     yy_n_chars = yy_current_buffer->yy_n_chars;
  751.     yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  752.     yyin = yy_current_buffer->yy_input_file;
  753.     yy_hold_char = *yy_c_buf_p;
  754.     }
  755.  
  756.  
  757. #ifdef YY_USE_PROTOS
  758. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  759. #else
  760. YY_BUFFER_STATE yy_create_buffer( file, size )
  761. FILE *file;
  762. int size;
  763. #endif
  764.  
  765.     {
  766.     YY_BUFFER_STATE b;
  767.  
  768.     b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
  769.  
  770.     if ( ! b )
  771.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  772.  
  773.     b->yy_buf_size = size;
  774.  
  775.     /* yy_ch_buf has to be 2 characters longer than the size given because
  776.      * we need to put in 2 end-of-buffer characters.
  777.      */
  778.     b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
  779.  
  780.     if ( ! b->yy_ch_buf )
  781.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  782.  
  783.     yy_init_buffer( b, file );
  784.  
  785.     return ( b );
  786.     }
  787.  
  788.  
  789. #ifdef YY_USE_PROTOS
  790. void yy_delete_buffer( YY_BUFFER_STATE b )
  791. #else
  792. void yy_delete_buffer( b )
  793. YY_BUFFER_STATE b;
  794. #endif
  795.  
  796.     {
  797.     if ( b == yy_current_buffer )
  798.     yy_current_buffer = (YY_BUFFER_STATE) 0;
  799.  
  800.     free( (char *) b->yy_ch_buf );
  801.     free( (char *) b );
  802.     }
  803.  
  804.  
  805. #ifdef YY_USE_PROTOS
  806. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  807. #else
  808. void yy_init_buffer( b, file )
  809. YY_BUFFER_STATE b;
  810. FILE *file;
  811. #endif
  812.  
  813.     {
  814.     b->yy_input_file = file;
  815.  
  816.     /* we put in the '\n' and start reading from [1] so that an
  817.      * initial match-at-newline will be true.
  818.      */
  819.  
  820.     b->yy_ch_buf[0] = '\n';
  821.     b->yy_n_chars = 1;
  822.  
  823.     /* we always need two end-of-buffer characters.  The first causes
  824.      * a transition to the end-of-buffer state.  The second causes
  825.      * a jam in that state.
  826.      */
  827.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  828.     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  829.  
  830.     b->yy_buf_pos = &b->yy_ch_buf[1];
  831.  
  832.     b->yy_eof_status = EOF_NOT_SEEN;
  833.     }
  834.