home *** CD-ROM | disk | FTP | other *** search
/ ftp.shrubbery.net / 2015-02-07.ftp.shrubbery.net.tar / ftp.shrubbery.net / pub / foad / foad-0.3.tar.gz / foad-0.3.tar / foad-0.3 / lexer.c < prev    next >
C/C++ Source or Header  |  2003-09-22  |  44KB  |  1,740 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* Scanner skeleton version:
  4.  * $NetBSD: flex.skl,v 1.16 2001/01/06 02:09:31 christos 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, yy_size_t len ));
  241.  
  242. #define yy_new_buffer yy_create_buffer
  243.  
  244. #define yy_set_interactive(is_interactive) \
  245.     { \
  246.     if ( ! yy_current_buffer ) \
  247.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  248.     yy_current_buffer->yy_is_interactive = is_interactive; \
  249.     }
  250.  
  251. #define yy_set_bol(at_bol) \
  252.     { \
  253.     if ( ! yy_current_buffer ) \
  254.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  255.     yy_current_buffer->yy_at_bol = at_bol; \
  256.     }
  257.  
  258. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  259.  
  260. typedef unsigned char YY_CHAR;
  261. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  262. typedef int yy_state_type;
  263. extern char *yytext;
  264. #define yytext_ptr yytext
  265.  
  266. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  267. #ifndef YY_USES_REJECT
  268. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
  269. #endif
  270. static void yy_flex_free YY_PROTO(( void * ));
  271.  
  272. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  273. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  274. static int yy_get_next_buffer YY_PROTO(( void ));
  275. static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
  276.  
  277. /* Done after the current pattern has been matched and before the
  278.  * corresponding action - sets up yytext.
  279.  */
  280. #define YY_DO_BEFORE_ACTION \
  281.     yytext_ptr = yy_bp; \
  282.     yyleng = (int) (yy_cp - yy_bp); \
  283.     yy_hold_char = *yy_cp; \
  284.     *yy_cp = '\0'; \
  285.     yy_c_buf_p = yy_cp;
  286.  
  287. #define YY_NUM_RULES 12
  288. #define YY_END_OF_BUFFER 13
  289. static yyconst short int yy_accept[79] =
  290.     {   0,
  291.         0,    0,    0,    0,    0,    0,    0,    0,   13,   11,
  292.         1,   11,   11,    1,   11,   11,   11,   11,   11,   11,
  293.        11,   11,   11,    0,    0,    0,    0,    0,    0,    0,
  294.         0,    0,    0,    0,    0,    0,    0,    0,    0,    9,
  295.         0,    0,    0,    0,    0,    7,    5,    3,    0,    0,
  296.        10,    0,    0,    0,    0,    0,    0,    0,    0,    4,
  297.         0,    0,    0,    0,    2,    0,    0,    6,    0,    0,
  298.         0,    0,    8,    0,    0,    0,    0,    0
  299.     } ;
  300.  
  301. static yyconst int yy_ec[256] =
  302.     {   0,
  303.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  304.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  305.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  306.         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
  307.         1,    1,    1,    1,    4,    1,    1,    1,    1,    1,
  308.         1,    1,    1,    1,    1,    1,    1,    5,    1,    1,
  309.         1,    1,    1,    1,    1,    6,    7,    1,    8,    9,
  310.         1,    1,    1,    1,    1,    1,   10,   11,   12,    1,
  311.         1,   13,   14,   15,    1,    1,    1,    1,    1,    1,
  312.         1,    1,    1,    1,    1,    1,    1,    6,    7,    1,
  313.  
  314.         8,    1,    1,    1,    1,    1,    1,    1,   10,   11,
  315.        12,    1,    1,   16,   14,   15,    1,    1,    1,    1,
  316.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  317.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  318.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  319.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  320.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  321.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  322.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  323.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  324.  
  325.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  326.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  327.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  328.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  329.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  330.         1,    1,    1,    1,    1
  331.     } ;
  332.  
  333. static yyconst int yy_meta[17] =
  334.     {   0,
  335.         1,    2,    3,    1,    1,    1,    1,    1,    1,    1,
  336.         1,    1,    1,    1,    1,    1
  337.     } ;
  338.  
  339. static yyconst short int yy_base[90] =
  340.     {   0,
  341.       145,    0,  144,  144,  142,  142,  140,  140,  141,  149,
  342.       149,  135,  137,  133,   12,   13,   16,   17,   18,  129,
  343.       134,  133,  132,  128,   22,  129,   31,   21,  126,   26,
  344.        30,  125,  126,   34,  125,   37,  124,   39,   43,  149,
  345.        97,   45,   38,   44,   49,  149,  149,  149,   93,   53,
  346.       149,   55,   56,   90,   56,   60,   62,   91,   66,  149,
  347.        68,   61,   89,   69,  149,   88,   72,  149,   75,   75,
  348.        50,   79,  149,   78,   81,   82,   85,  149,   97,  100,
  349.       103,  105,  107,  109,  111,  114,  117,  120,  123
  350.     } ;
  351.  
  352. static yyconst short int yy_def[90] =
  353.     {   0,
  354.        79,   78,   79,    2,   79,    2,   79,    2,   78,   78,
  355.        78,   80,   81,   80,   80,   80,   80,   80,   80,   17,
  356.        82,   83,   84,   80,   80,   81,   81,   80,   80,   80,
  357.        80,   80,   82,   82,   83,   83,   84,   84,   85,   78,
  358.        80,   80,   80,   80,   80,   78,   78,   78,   85,   85,
  359.        78,   80,   86,   80,   80,   87,   88,   86,   86,   78,
  360.        80,   80,   87,   87,   78,   88,   88,   78,   89,   80,
  361.        89,   89,   78,   80,   80,   80,   80,    0,   78,   78,
  362.        78,   78,   78,   78,   78,   78,   78,   78,   78
  363.     } ;
  364.  
  365. static yyconst short int yy_nxt[166] =
  366.     {   0,
  367.        12,   13,   14,   12,   12,   15,   16,   12,   17,   12,
  368.        12,   12,   18,   12,   19,   20,   25,   25,   28,   29,
  369.        25,   25,   25,   39,   31,   25,   25,   41,   30,   32,
  370.        25,   30,   27,   40,   25,   34,   46,   43,   36,   47,
  371.        38,   48,   25,   44,   50,   51,   53,   54,   25,   25,
  372.        56,   55,   73,   25,   50,   51,   57,   59,   60,   25,
  373.        25,   64,   65,   67,   68,   25,   62,   59,   60,   69,
  374.        64,   65,   25,   67,   68,   70,   72,   73,   74,   25,
  375.        72,   73,   25,   75,   76,   25,   25,   28,   29,   25,
  376.        68,   65,   77,   60,   61,   51,   32,   10,   10,   10,
  377.  
  378.        24,   52,   24,   26,   26,   33,   33,   35,   35,   37,
  379.        37,   49,   49,   49,   58,   58,   58,   63,   63,   63,
  380.        66,   66,   66,   71,   71,   71,   48,   47,   46,   45,
  381.        42,   40,   25,   38,   36,   34,   31,   25,   27,   25,
  382.        78,   23,   11,   22,   11,   21,   11,   11,    9,   78,
  383.        78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
  384.        78,   78,   78,   78,   78
  385.     } ;
  386.  
  387. static yyconst short int yy_chk[166] =
  388.     {   0,
  389.         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  390.         2,    2,    2,    2,    2,    2,   15,   16,   15,   16,
  391.        17,   18,   19,   25,   18,   28,   25,   28,   17,   19,
  392.        30,   17,   27,   27,   31,   34,   34,   30,   36,   36,
  393.        38,   38,   43,   31,   39,   39,   42,   43,   44,   42,
  394.        45,   44,   71,   45,   50,   50,   52,   53,   53,   52,
  395.        55,   56,   56,   57,   57,   62,   55,   59,   59,   61,
  396.        64,   64,   61,   67,   67,   62,   69,   69,   70,   70,
  397.        72,   72,   74,   74,   74,   75,   76,   75,   76,   77,
  398.        66,   63,   74,   58,   54,   49,   77,   79,   79,   79,
  399.  
  400.        80,   41,   80,   81,   81,   82,   82,   83,   83,   84,
  401.        84,   85,   85,   85,   86,   86,   86,   87,   87,   87,
  402.        88,   88,   88,   89,   89,   89,   37,   35,   33,   32,
  403.        29,   26,   24,   23,   22,   21,   20,   14,   13,   12,
  404.         9,    8,    7,    6,    5,    4,    3,    1,   78,   78,
  405.        78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
  406.        78,   78,   78,   78,   78
  407.     } ;
  408.  
  409. static yy_state_type yy_last_accepting_state;
  410. static char *yy_last_accepting_cpos;
  411.  
  412. /* The intent behind this definition is that it'll catch
  413.  * any uses of REJECT which flex missed.
  414.  */
  415. #define REJECT reject_used_but_not_detected
  416. #define yymore() yymore_used_but_not_detected
  417. #define YY_MORE_ADJ 0
  418. #define YY_RESTORE_YY_MORE_OFFSET
  419. char *yytext;
  420. #line 1 "lexer.l"
  421. #define INITIAL 0
  422. #line 2 "lexer.l"
  423. #include "foad.h"
  424. #include "parser.h"
  425.  
  426. extern char            *progname;        /* program's name */
  427. extern int        debug;
  428.  
  429. #define    L_DEBUG        (debug > 2)
  430. #define bcc 1
  431.  
  432. #define cc 2
  433.  
  434. #define to 3
  435.  
  436. #line 437 "lexer.c"
  437.  
  438. /* Macros after this point can all be overridden by user definitions in
  439.  * section 1.
  440.  */
  441.  
  442. #ifndef YY_SKIP_YYWRAP
  443. #ifdef __cplusplus
  444. extern "C" int yywrap YY_PROTO(( void ));
  445. #else
  446. extern int yywrap YY_PROTO(( void ));
  447. #endif
  448. #endif
  449.  
  450. #ifndef YY_NO_UNPUT
  451. static void yyunput YY_PROTO(( int c, char *buf_ptr ))
  452. #ifdef __GNUC__
  453.     __attribute__ ((unused))
  454. #endif
  455. ;
  456. #endif
  457.  
  458. #ifndef yytext_ptr
  459. static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, yy_size_t ));
  460. #endif
  461.  
  462. #ifdef YY_NEED_STRLEN
  463. static yy_size_t yy_flex_strlen YY_PROTO(( yyconst char * ));
  464. #endif
  465.  
  466. #ifndef YY_NO_INPUT
  467. #ifdef __cplusplus
  468. static int yyinput YY_PROTO(( void ));
  469. #else
  470. static int input YY_PROTO(( void ));
  471. #endif
  472. #endif
  473.  
  474. #if YY_STACK_USED
  475. static int yy_start_stack_ptr = 0;
  476. static int yy_start_stack_depth = 0;
  477. static int *yy_start_stack = 0;
  478. #ifndef YY_NO_PUSH_STATE
  479. static void yy_push_state YY_PROTO(( int new_state ));
  480. #endif
  481. #ifndef YY_NO_POP_STATE
  482. static void yy_pop_state YY_PROTO(( void ));
  483. #endif
  484. #ifndef YY_NO_TOP_STATE
  485. static int yy_top_state YY_PROTO(( void ));
  486. #endif
  487.  
  488. #else
  489. #define YY_NO_PUSH_STATE 1
  490. #define YY_NO_POP_STATE 1
  491. #define YY_NO_TOP_STATE 1
  492. #endif
  493.  
  494. #ifdef YY_MALLOC_DECL
  495. YY_MALLOC_DECL
  496. #else
  497. #if __STDC__
  498. #ifndef __cplusplus
  499. #include <stdlib.h>
  500. #endif
  501. #else
  502. /* Just try to get by without declaring the routines.  This will fail
  503.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  504.  * or sizeof(void*) != sizeof(int).
  505.  */
  506. #endif
  507. #endif
  508.  
  509. /* Amount of stuff to slurp up with each read. */
  510. #ifndef YY_READ_BUF_SIZE
  511. #define YY_READ_BUF_SIZE 8192
  512. #endif
  513.  
  514. /* Copy whatever the last rule matched to the standard output. */
  515.  
  516. #ifndef ECHO
  517. /* This used to be an fputs(), but since the string might contain NUL's,
  518.  * we now use fwrite().
  519.  */
  520. #define ECHO (void) fwrite( yytext, (size_t)yyleng, 1, yyout )
  521. #endif
  522.  
  523. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  524.  * is returned in "result".
  525.  */
  526. #ifndef YY_INPUT
  527. #define YY_INPUT(buf,result,max_size) \
  528.     if ( yy_current_buffer->yy_is_interactive ) \
  529.         { \
  530.         int c = '*', n; \
  531.         for ( n = 0; n < max_size && \
  532.                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  533.             buf[n] = (char) c; \
  534.         if ( c == '\n' ) \
  535.             buf[n++] = (char) c; \
  536.         if ( c == EOF && ferror( yyin ) ) \
  537.             YY_FATAL_ERROR( "input in flex scanner failed" ); \
  538.         result = n; \
  539.         } \
  540.     else if ( ((result = fread( buf, 1, (size_t)max_size, yyin )) == 0) \
  541.           && ferror( yyin ) ) \
  542.         YY_FATAL_ERROR( "input in flex scanner failed" );
  543. #endif
  544.  
  545. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  546.  * we don't want an extra ';' after the "return" because that will cause
  547.  * some compilers to complain about unreachable statements.
  548.  */
  549. #ifndef yyterminate
  550. #define yyterminate() return YY_NULL
  551. #endif
  552.  
  553. /* Number of entries by which start-condition stack grows. */
  554. #ifndef YY_START_STACK_INCR
  555. #define YY_START_STACK_INCR 25
  556. #endif
  557.  
  558. /* Report a fatal error. */
  559. #ifndef YY_FATAL_ERROR
  560. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  561. #endif
  562.  
  563. /* Default declaration of generated scanner - a define so the user can
  564.  * easily add parameters.
  565.  */
  566. #ifndef YY_DECL
  567. #define YY_DECL int yylex YY_PROTO(( void ))
  568. #endif
  569.  
  570. /* Code executed at the beginning of each rule, after yytext and yyleng
  571.  * have been set up.
  572.  */
  573. #ifndef YY_USER_ACTION
  574. #define YY_USER_ACTION
  575. #endif
  576.  
  577. /* Code executed at the end of each rule. */
  578. #ifndef YY_BREAK
  579. #define YY_BREAK /*LINTED*/break;
  580. #endif
  581.  
  582. #define YY_RULE_SETUP \
  583.     if ( yyleng > 0 ) \
  584.         yy_current_buffer->yy_at_bol = \
  585.                 (yytext[yyleng - 1] == '\n'); \
  586.     YY_USER_ACTION
  587.  
  588. YY_DECL
  589.     {
  590.     register yy_state_type yy_current_state;
  591.     register char *yy_cp, *yy_bp;
  592.     register int yy_act;
  593.  
  594. #line 23 "lexer.l"
  595.  
  596. #line 597 "lexer.c"
  597.  
  598. #if defined(YY_USES_REJECT) && (defined(__GNUC__) || defined(lint))
  599.     /* XXX: shut up `unused label' warning with %options yylineno */
  600.     if (/*CONSTCOND*/0 && yy_full_match)
  601.         goto find_rule;
  602. #endif
  603.     if ( yy_init )
  604.         {
  605.         yy_init = 0;
  606.  
  607. #ifdef YY_USER_INIT
  608.         YY_USER_INIT;
  609. #endif
  610.  
  611.         if ( ! yy_start )
  612.             yy_start = 1;    /* first start state */
  613.  
  614.         if ( ! yyin )
  615.             yyin = stdin;
  616.  
  617.         if ( ! yyout )
  618.             yyout = stdout;
  619.  
  620.         if ( ! yy_current_buffer )
  621.             yy_current_buffer =
  622.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  623.  
  624.         yy_load_buffer_state();
  625.         }
  626.  
  627.     while (/*CONSTCOND*/ 1 )    /* loops until end-of-file is reached */
  628.         {
  629.         yy_cp = yy_c_buf_p;
  630.  
  631.         /* Support of yytext. */
  632.         *yy_cp = yy_hold_char;
  633.  
  634.         /* yy_bp points to the position in yy_ch_buf of the start of
  635.          * the current run.
  636.          */
  637.         yy_bp = yy_cp;
  638.  
  639.         yy_current_state = yy_start;
  640.         yy_current_state += YY_AT_BOL();
  641. yy_match:
  642.         do
  643.             {
  644.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  645.             if ( yy_accept[yy_current_state] )
  646.                 {
  647.                 yy_last_accepting_state = yy_current_state;
  648.                 yy_last_accepting_cpos = yy_cp;
  649.                 }
  650.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  651.                 {
  652.                 yy_current_state = (int) yy_def[yy_current_state];
  653.                 if ( yy_current_state >= 79 )
  654.                     yy_c = yy_meta[(unsigned int) yy_c];
  655.                 }
  656.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  657.             ++yy_cp;
  658.             }
  659.         while ( yy_base[yy_current_state] != 149 );
  660.  
  661. yy_find_action:
  662.         yy_act = yy_accept[yy_current_state];
  663.         if ( yy_act == 0 )
  664.             { /* have to back up */
  665.             yy_cp = yy_last_accepting_cpos;
  666.             yy_current_state = yy_last_accepting_state;
  667.             yy_act = yy_accept[yy_current_state];
  668.             }
  669.  
  670.         YY_DO_BEFORE_ACTION;
  671.  
  672.  
  673. do_action:    /* This label is used only to access EOF actions. */
  674.  
  675.  
  676.         switch ( yy_act )
  677.     { /* beginning of action switch */
  678.             case 0: /* must back up */
  679.             /* undo the effects of YY_DO_BEFORE_ACTION */
  680.             *yy_cp = yy_hold_char;
  681.             yy_cp = yy_last_accepting_cpos;
  682.             yy_current_state = yy_last_accepting_state;
  683.             goto yy_find_action;
  684.  
  685. case 1:
  686. YY_RULE_SETUP
  687. #line 24 "lexer.l"
  688. {
  689.           if (L_DEBUG)
  690.             fprintf(stderr, "%s: lexer \\n\n", progname);
  691.           return('\n');
  692.         }
  693.     YY_BREAK
  694. case 2:
  695. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  696. yy_c_buf_p = yy_cp -= 1;
  697. YY_DO_BEFORE_ACTION; /* set up yytext again */
  698. YY_RULE_SETUP
  699. #line 30 "lexer.l"
  700. {
  701.           if (L_DEBUG)
  702.             fprintf(stderr, "%s: lexer to: %s\n", progname, yytext);
  703.           BEGIN(to);
  704.           yylval.cptr = strdup(index(yytext, ':') + 1);
  705.           return T_TO;
  706.         }
  707.     YY_BREAK
  708. case 3:
  709. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  710. yy_c_buf_p = yy_cp -= 1;
  711. YY_DO_BEFORE_ACTION; /* set up yytext again */
  712. YY_RULE_SETUP
  713. #line 37 "lexer.l"
  714. {
  715.           if (L_DEBUG)
  716.             fprintf(stderr, "%s: lexer to continuation: %s\n",
  717.                 progname, yytext);
  718.           yylval.cptr = strdup(yytext);
  719.           return T_TO_CONT;
  720.         }
  721.     YY_BREAK
  722. case 4:
  723. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  724. yy_c_buf_p = yy_cp -= 1;
  725. YY_DO_BEFORE_ACTION; /* set up yytext again */
  726. YY_RULE_SETUP
  727. #line 45 "lexer.l"
  728. {
  729.           if (L_DEBUG)
  730.             fprintf(stderr, "%s: lexer cc: %s\n", progname, yytext);
  731.           BEGIN(cc);
  732.           yylval.cptr = strdup(index(yytext, ':') + 1);
  733.           return T_CC;
  734.         }
  735.     YY_BREAK
  736. case 5:
  737. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  738. yy_c_buf_p = yy_cp -= 1;
  739. YY_DO_BEFORE_ACTION; /* set up yytext again */
  740. YY_RULE_SETUP
  741. #line 52 "lexer.l"
  742. {
  743.           if (L_DEBUG)
  744.             fprintf(stderr, "%s: lexer cc continuation: %s\n",
  745.                 progname, yytext);
  746.           yylval.cptr = strdup(yytext);
  747.           return T_CC_CONT;
  748.         }
  749.     YY_BREAK
  750. case 6:
  751. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  752. yy_c_buf_p = yy_cp -= 1;
  753. YY_DO_BEFORE_ACTION; /* set up yytext again */
  754. YY_RULE_SETUP
  755. #line 60 "lexer.l"
  756. {
  757.           if (L_DEBUG)
  758.             fprintf(stderr, "%s: lexer bcc: %s\n", progname,
  759.                 yytext);
  760.           BEGIN(cc);
  761.           yylval.cptr = strdup(index(yytext, ':') + 1);
  762.           return T_BCC;
  763.         }
  764.     YY_BREAK
  765. case 7:
  766. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  767. yy_c_buf_p = yy_cp -= 1;
  768. YY_DO_BEFORE_ACTION; /* set up yytext again */
  769. YY_RULE_SETUP
  770. #line 68 "lexer.l"
  771. {
  772.           if (L_DEBUG)
  773.             fprintf(stderr, "%s: lexer bcc continuation: %s\n",
  774.                 progname, yytext);
  775.           yylval.cptr = strdup(yytext);
  776.           return T_BCC_CONT;
  777.         }
  778.     YY_BREAK
  779. case 8:
  780. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  781. yy_c_buf_p = yy_cp -= 1;
  782. YY_DO_BEFORE_ACTION; /* set up yytext again */
  783. YY_RULE_SETUP
  784. #line 76 "lexer.l"
  785. {
  786.           if (L_DEBUG)
  787.             fprintf(stderr, "%s: lexer from: %s\n", progname,
  788.                 yytext);
  789.           BEGIN(0);
  790.           yylval.cptr = strdup(index(yytext, ':') + 1);
  791.           return T_FROM;
  792.         }
  793.     YY_BREAK
  794. case 9:
  795. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  796. yy_c_buf_p = yy_cp -= 1;
  797. YY_DO_BEFORE_ACTION; /* set up yytext again */
  798. YY_RULE_SETUP
  799. #line 85 "lexer.l"
  800. {
  801.           if (L_DEBUG)
  802.             fprintf(stderr, "%s: lexer continuation: %s\n", progname, yytext);
  803.           return T_CONT;
  804.         }
  805.     YY_BREAK
  806. case 10:
  807. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  808. yy_c_buf_p = yy_cp -= 1;
  809. YY_DO_BEFORE_ACTION; /* set up yytext again */
  810. YY_RULE_SETUP
  811. #line 91 "lexer.l"
  812. {
  813.           if (L_DEBUG)
  814.             fprintf(stderr, "%s: lexer header: %s\n", progname, yytext);
  815.           BEGIN(0);
  816.           return T_LINE; }
  817.     YY_BREAK
  818. case 11:
  819. YY_RULE_SETUP
  820. #line 97 "lexer.l"
  821. {
  822.           if (L_DEBUG)
  823.             fprintf(stderr, "%s: lexer char: %c\n", progname, yytext[0]);
  824.           BEGIN(0);
  825.           /*return(conf_text[0]);*/
  826.         }
  827.     YY_BREAK
  828. case 12:
  829. YY_RULE_SETUP
  830. #line 103 "lexer.l"
  831. ECHO;
  832.     YY_BREAK
  833. #line 834 "lexer.c"
  834. case YY_STATE_EOF(INITIAL):
  835. case YY_STATE_EOF(bcc):
  836. case YY_STATE_EOF(cc):
  837. case YY_STATE_EOF(to):
  838.     yyterminate();
  839.  
  840.     case YY_END_OF_BUFFER:
  841.         {
  842.         /* Amount of text matched not including the EOB char. */
  843.         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  844.  
  845.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  846.         *yy_cp = yy_hold_char;
  847.         YY_RESTORE_YY_MORE_OFFSET
  848.  
  849.         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  850.             {
  851.             /* We're scanning a new file or input source.  It's
  852.              * possible that this happened because the user
  853.              * just pointed yyin at a new source and called
  854.              * yylex().  If so, then we have to assure
  855.              * consistency between yy_current_buffer and our
  856.              * globals.  Here is the right place to do so, because
  857.              * this is the first action (other than possibly a
  858.              * back-up) that will match for the new input source.
  859.              */
  860.             yy_n_chars = yy_current_buffer->yy_n_chars;
  861.             yy_current_buffer->yy_input_file = yyin;
  862.             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  863.             }
  864.  
  865.         /* Note that here we test for yy_c_buf_p "<=" to the position
  866.          * of the first EOB in the buffer, since yy_c_buf_p will
  867.          * already have been incremented past the NUL character
  868.          * (since all states make transitions on EOB to the
  869.          * end-of-buffer state).  Contrast this with the test
  870.          * in input().
  871.          */
  872.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  873.             { /* This was really a NUL. */
  874.             yy_state_type yy_next_state;
  875.  
  876.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  877.  
  878.             yy_current_state = yy_get_previous_state();
  879.  
  880.             /* Okay, we're now positioned to make the NUL
  881.              * transition.  We couldn't have
  882.              * yy_get_previous_state() go ahead and do it
  883.              * for us because it doesn't know how to deal
  884.              * with the possibility of jamming (and we don't
  885.              * want to build jamming into it because then it
  886.              * will run more slowly).
  887.              */
  888.  
  889.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  890.  
  891.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  892.  
  893.             if ( yy_next_state )
  894.                 {
  895.                 /* Consume the NUL. */
  896.                 yy_cp = ++yy_c_buf_p;
  897.                 yy_current_state = yy_next_state;
  898.                 goto yy_match;
  899.                 }
  900.  
  901.             else
  902.                 {
  903.                 yy_cp = yy_c_buf_p;
  904.                 goto yy_find_action;
  905.                 }
  906.             }
  907.  
  908.         else switch ( yy_get_next_buffer() )
  909.             {
  910.             case EOB_ACT_END_OF_FILE:
  911.                 {
  912.                 yy_did_buffer_switch_on_eof = 0;
  913.  
  914.                 if ( yywrap() )
  915.                     {
  916.                     /* Note: because we've taken care in
  917.                      * yy_get_next_buffer() to have set up
  918.                      * yytext, we can now set up
  919.                      * yy_c_buf_p so that if some total
  920.                      * hoser (like flex itself) wants to
  921.                      * call the scanner after we return the
  922.                      * YY_NULL, it'll still work - another
  923.                      * YY_NULL will get returned.
  924.                      */
  925.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  926.  
  927.                     yy_act = YY_STATE_EOF(YY_START);
  928.                     goto do_action;
  929.                     }
  930.  
  931.                 else
  932.                     {
  933.                     if ( ! yy_did_buffer_switch_on_eof )
  934.                         YY_NEW_FILE;
  935.                     }
  936.                 break;
  937.                 }
  938.  
  939.             case EOB_ACT_CONTINUE_SCAN:
  940.                 yy_c_buf_p =
  941.                     yytext_ptr + yy_amount_of_matched_text;
  942.  
  943.                 yy_current_state = yy_get_previous_state();
  944.  
  945.                 yy_cp = yy_c_buf_p;
  946.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  947.                 goto yy_match;
  948.  
  949.             case EOB_ACT_LAST_MATCH:
  950.                 yy_c_buf_p =
  951.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  952.  
  953.                 yy_current_state = yy_get_previous_state();
  954.  
  955.                 yy_cp = yy_c_buf_p;
  956.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  957.                 goto yy_find_action;
  958.             }
  959.         break;
  960.         }
  961.  
  962.     default:
  963.         YY_FATAL_ERROR(
  964.             "fatal flex scanner internal error--no action found" );
  965.     } /* end of action switch */
  966.         } /* end of scanning one token */
  967.     } /* end of yylex */
  968.  
  969.  
  970. /* yy_get_next_buffer - try to read in a new buffer
  971.  *
  972.  * Returns a code representing an action:
  973.  *    EOB_ACT_LAST_MATCH -
  974.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  975.  *    EOB_ACT_END_OF_FILE - end of file
  976.  */
  977.  
  978. static int yy_get_next_buffer()
  979.     {
  980.     register char *dest = yy_current_buffer->yy_ch_buf;
  981.     register char *source = yytext_ptr;
  982.     register int number_to_move, i;
  983.     int ret_val;
  984.  
  985.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  986.         YY_FATAL_ERROR(
  987.         "fatal flex scanner internal error--end of buffer missed" );
  988.  
  989.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  990.         { /* Don't try to fill the buffer, so this is an EOF. */
  991.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  992.             {
  993.             /* We matched a single character, the EOB, so
  994.              * treat this as a final EOF.
  995.              */
  996.             return EOB_ACT_END_OF_FILE;
  997.             }
  998.  
  999.         else
  1000.             {
  1001.             /* We matched some text prior to the EOB, first
  1002.              * process it.
  1003.              */
  1004.             return EOB_ACT_LAST_MATCH;
  1005.             }
  1006.         }
  1007.  
  1008.     /* Try to read more data. */
  1009.  
  1010.     /* First move last chars to start of buffer. */
  1011.     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  1012.  
  1013.     for ( i = 0; i < number_to_move; ++i )
  1014.         *(dest++) = *(source++);
  1015.  
  1016.     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1017.         /* don't do the read, it's not guaranteed to return an EOF,
  1018.          * just force an EOF
  1019.          */
  1020.         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
  1021.  
  1022.     else
  1023.         {
  1024.         int num_to_read =
  1025.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  1026.  
  1027.         while ( num_to_read <= 0 )
  1028.             { /* Not enough room in the buffer - grow it. */
  1029. #ifdef YY_USES_REJECT
  1030.             YY_FATAL_ERROR(
  1031. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  1032. #else
  1033.  
  1034.             /* just a shorter name for the current buffer */
  1035.             YY_BUFFER_STATE b = yy_current_buffer;
  1036.  
  1037.             int yy_c_buf_p_offset =
  1038.                 (int) (yy_c_buf_p - b->yy_ch_buf);
  1039.  
  1040.             if ( b->yy_is_our_buffer )
  1041.                 {
  1042.                 int new_size = b->yy_buf_size * 2;
  1043.  
  1044.                 if ( new_size <= 0 )
  1045.                     b->yy_buf_size += b->yy_buf_size / 8;
  1046.                 else
  1047.                     b->yy_buf_size *= 2;
  1048.  
  1049.                 b->yy_ch_buf = (char *)
  1050.                     /* Include room in for 2 EOB chars. */
  1051.                     yy_flex_realloc( (void *) b->yy_ch_buf,
  1052.                              b->yy_buf_size + 2 );
  1053.                 }
  1054.             else
  1055.                 /* Can't grow it, we don't own it. */
  1056.                 b->yy_ch_buf = 0;
  1057.  
  1058.             if ( ! b->yy_ch_buf )
  1059.                 YY_FATAL_ERROR(
  1060.                 "fatal error - scanner input buffer overflow" );
  1061.  
  1062.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1063.  
  1064.             num_to_read = yy_current_buffer->yy_buf_size -
  1065.                         number_to_move - 1;
  1066. #endif
  1067.             }
  1068.  
  1069.         if ( num_to_read > YY_READ_BUF_SIZE )
  1070.             num_to_read = YY_READ_BUF_SIZE;
  1071.  
  1072.         /* Read in more data. */
  1073.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1074.             yy_n_chars, num_to_read );
  1075.  
  1076.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1077.         }
  1078.  
  1079.     if ( yy_n_chars == 0 )
  1080.         {
  1081.         if ( number_to_move == YY_MORE_ADJ )
  1082.             {
  1083.             ret_val = EOB_ACT_END_OF_FILE;
  1084.             yyrestart( yyin );
  1085.             }
  1086.  
  1087.         else
  1088.             {
  1089.             ret_val = EOB_ACT_LAST_MATCH;
  1090.             yy_current_buffer->yy_buffer_status =
  1091.                 YY_BUFFER_EOF_PENDING;
  1092.             }
  1093.         }
  1094.  
  1095.     else
  1096.         ret_val = EOB_ACT_CONTINUE_SCAN;
  1097.  
  1098.     yy_n_chars += number_to_move;
  1099.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1100.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1101.  
  1102.     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  1103.  
  1104.     return ret_val;
  1105.     }
  1106.  
  1107.  
  1108. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1109.  
  1110. static yy_state_type yy_get_previous_state()
  1111.     {
  1112.     register yy_state_type yy_current_state;
  1113.     register char *yy_cp;
  1114.  
  1115.     yy_current_state = yy_start;
  1116.     yy_current_state += YY_AT_BOL();
  1117.  
  1118.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1119.         {
  1120.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1121.         if ( yy_accept[yy_current_state] )
  1122.             {
  1123.             yy_last_accepting_state = yy_current_state;
  1124.             yy_last_accepting_cpos = yy_cp;
  1125.             }
  1126.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1127.             {
  1128.             yy_current_state = (int) yy_def[yy_current_state];
  1129.             if ( yy_current_state >= 79 )
  1130.                 yy_c = yy_meta[(unsigned int) yy_c];
  1131.             }
  1132.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1133.         }
  1134.  
  1135.     return yy_current_state;
  1136.     }
  1137.  
  1138.  
  1139. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1140.  *
  1141.  * synopsis
  1142.  *    next_state = yy_try_NUL_trans( current_state );
  1143.  */
  1144.  
  1145. #ifdef YY_USE_PROTOS
  1146. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  1147. #else
  1148. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1149. yy_state_type yy_current_state;
  1150. #endif
  1151.     {
  1152.     register int yy_is_jam;
  1153.     register char *yy_cp = yy_c_buf_p;
  1154.  
  1155.     register YY_CHAR yy_c = 1;
  1156.     if ( yy_accept[yy_current_state] )
  1157.         {
  1158.         yy_last_accepting_state = yy_current_state;
  1159.         yy_last_accepting_cpos = yy_cp;
  1160.         }
  1161.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1162.         {
  1163.         yy_current_state = (int) yy_def[yy_current_state];
  1164.         if ( yy_current_state >= 79 )
  1165.             yy_c = yy_meta[(unsigned int) yy_c];
  1166.         }
  1167.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1168.     yy_is_jam = (yy_current_state == 78);
  1169.  
  1170.     return yy_is_jam ? 0 : yy_current_state;
  1171.     }
  1172.  
  1173.  
  1174. #ifndef YY_NO_UNPUT
  1175. #ifdef YY_USE_PROTOS
  1176. static void yyunput( int c, register char *yy_bp )
  1177. #else
  1178. static void yyunput( c, yy_bp )
  1179. int c;
  1180. register char *yy_bp;
  1181. #endif
  1182.     {
  1183.     register char *yy_cp = yy_c_buf_p;
  1184.  
  1185.     /* undo effects of setting up yytext */
  1186.     *yy_cp = yy_hold_char;
  1187.  
  1188.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1189.         { /* need to shift things up to make room */
  1190.         /* +2 for EOB chars. */
  1191.         register int number_to_move = yy_n_chars + 2;
  1192.         register char *dest = &yy_current_buffer->yy_ch_buf[
  1193.                     yy_current_buffer->yy_buf_size + 2];
  1194.         register char *source =
  1195.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  1196.  
  1197.         while ( source > yy_current_buffer->yy_ch_buf )
  1198.             *--dest = *--source;
  1199.  
  1200.         yy_cp += (int) (dest - source);
  1201.         yy_bp += (int) (dest - source);
  1202.         yy_current_buffer->yy_n_chars =
  1203.             yy_n_chars = yy_current_buffer->yy_buf_size;
  1204.  
  1205.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1206.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1207.         }
  1208.  
  1209.     *--yy_cp = (char) c;
  1210.  
  1211.  
  1212.     yytext_ptr = yy_bp;
  1213.     yy_hold_char = *yy_cp;
  1214.     yy_c_buf_p = yy_cp;
  1215.     }
  1216. #endif    /* ifndef YY_NO_UNPUT */
  1217.  
  1218.  
  1219. #ifdef __cplusplus
  1220. static int yyinput()
  1221. #else
  1222. static int input()
  1223. #endif
  1224.     {
  1225.     int c;
  1226.  
  1227.     *yy_c_buf_p = yy_hold_char;
  1228.  
  1229.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1230.         {
  1231.         /* yy_c_buf_p now points to the character we want to return.
  1232.          * If this occurs *before* the EOB characters, then it's a
  1233.          * valid NUL; if not, then we've hit the end of the buffer.
  1234.          */
  1235.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1236.             /* This was really a NUL. */
  1237.             *yy_c_buf_p = '\0';
  1238.  
  1239.         else
  1240.             { /* need more input */
  1241.             int offset = yy_c_buf_p - yytext_ptr;
  1242.             ++yy_c_buf_p;
  1243.  
  1244.             switch ( yy_get_next_buffer() )
  1245.                 {
  1246.                 case EOB_ACT_LAST_MATCH:
  1247.                     /* This happens because yy_g_n_b()
  1248.                      * sees that we've accumulated a
  1249.                      * token and flags that we need to
  1250.                      * try matching the token before
  1251.                      * proceeding.  But for input(),
  1252.                      * there's no matching to consider.
  1253.                      * So convert the EOB_ACT_LAST_MATCH
  1254.                      * to EOB_ACT_END_OF_FILE.
  1255.                      */
  1256.  
  1257.                     /* Reset buffer status. */
  1258.                     yyrestart( yyin );
  1259.  
  1260.                     /*FALLTHROUGH*/
  1261.  
  1262.                 case EOB_ACT_END_OF_FILE:
  1263.                     {
  1264.                     if ( yywrap() )
  1265.                         return EOF;
  1266.  
  1267.                     if ( ! yy_did_buffer_switch_on_eof )
  1268.                         YY_NEW_FILE;
  1269. #ifdef __cplusplus
  1270.                     return yyinput();
  1271. #else
  1272.                     return input();
  1273. #endif
  1274.                     }
  1275.  
  1276.                 case EOB_ACT_CONTINUE_SCAN:
  1277.                     yy_c_buf_p = yytext_ptr + offset;
  1278.                     break;
  1279.                 }
  1280.             }
  1281.         }
  1282.  
  1283.     c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */
  1284.     *yy_c_buf_p = '\0';    /* preserve yytext */
  1285.     yy_hold_char = *++yy_c_buf_p;
  1286.  
  1287.     yy_current_buffer->yy_at_bol = (c == '\n');
  1288.  
  1289.     return c;
  1290.     }
  1291.  
  1292.  
  1293. #ifdef YY_USE_PROTOS
  1294. void yyrestart( FILE *input_file )
  1295. #else
  1296. void yyrestart( input_file )
  1297. FILE *input_file;
  1298. #endif
  1299.     {
  1300.     if ( ! yy_current_buffer )
  1301.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1302.  
  1303.     yy_init_buffer( yy_current_buffer, input_file );
  1304.     yy_load_buffer_state();
  1305.     }
  1306.  
  1307.  
  1308. #ifdef YY_USE_PROTOS
  1309. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1310. #else
  1311. void yy_switch_to_buffer( new_buffer )
  1312. YY_BUFFER_STATE new_buffer;
  1313. #endif
  1314.     {
  1315.     if ( yy_current_buffer == new_buffer )
  1316.         return;
  1317.  
  1318.     if ( yy_current_buffer )
  1319.         {
  1320.         /* Flush out information for old buffer. */
  1321.         *yy_c_buf_p = yy_hold_char;
  1322.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1323.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1324.         }
  1325.  
  1326.     yy_current_buffer = new_buffer;
  1327.     yy_load_buffer_state();
  1328.  
  1329.     /* We don't actually know whether we did this switch during
  1330.      * EOF (yywrap()) processing, but the only time this flag
  1331.      * is looked at is after yywrap() is called, so it's safe
  1332.      * to go ahead and always set it.
  1333.      */
  1334.     yy_did_buffer_switch_on_eof = 1;
  1335.     }
  1336.  
  1337.  
  1338. #ifdef YY_USE_PROTOS
  1339. void yy_load_buffer_state( void )
  1340. #else
  1341. void yy_load_buffer_state()
  1342. #endif
  1343.     {
  1344.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1345.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1346.     yyin = yy_current_buffer->yy_input_file;
  1347.     yy_hold_char = *yy_c_buf_p;
  1348.     }
  1349.  
  1350.  
  1351. #ifdef YY_USE_PROTOS
  1352. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1353. #else
  1354. YY_BUFFER_STATE yy_create_buffer( file, size )
  1355. FILE *file;
  1356. int size;
  1357. #endif
  1358.     {
  1359.     YY_BUFFER_STATE b;
  1360.  
  1361.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1362.     if ( ! b )
  1363.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1364.  
  1365.     b->yy_buf_size = size;
  1366.  
  1367.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1368.      * we need to put in 2 end-of-buffer characters.
  1369.      */
  1370.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  1371.     if ( ! b->yy_ch_buf )
  1372.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1373.  
  1374.     b->yy_is_our_buffer = 1;
  1375.  
  1376.     yy_init_buffer( b, file );
  1377.  
  1378.     return b;
  1379.     }
  1380.  
  1381.  
  1382. #ifdef YY_USE_PROTOS
  1383. void yy_delete_buffer( YY_BUFFER_STATE b )
  1384. #else
  1385. void yy_delete_buffer( b )
  1386. YY_BUFFER_STATE b;
  1387. #endif
  1388.     {
  1389.     if ( ! b )
  1390.         return;
  1391.  
  1392.     if ( b == yy_current_buffer )
  1393.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  1394.  
  1395.     if ( b->yy_is_our_buffer )
  1396.         yy_flex_free( (void *) b->yy_ch_buf );
  1397.  
  1398.     yy_flex_free( (void *) b );
  1399.     }
  1400.  
  1401.  
  1402. #ifndef YY_ALWAYS_INTERACTIVE
  1403. #ifndef YY_NEVER_INTERACTIVE
  1404. #include <unistd.h>
  1405. #endif
  1406. #endif
  1407.  
  1408. #ifdef YY_USE_PROTOS
  1409. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1410. #else
  1411. void yy_init_buffer( b, file )
  1412. YY_BUFFER_STATE b;
  1413. FILE *file;
  1414. #endif
  1415.  
  1416.  
  1417.     {
  1418.     yy_flush_buffer( b );
  1419.  
  1420.     b->yy_input_file = file;
  1421.     b->yy_fill_buffer = 1;
  1422.  
  1423. #if YY_ALWAYS_INTERACTIVE
  1424.     b->yy_is_interactive = 1;
  1425. #else
  1426. #if YY_NEVER_INTERACTIVE
  1427.     b->yy_is_interactive = 0;
  1428. #else
  1429.     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1430. #endif
  1431. #endif
  1432.     }
  1433.  
  1434.  
  1435. #ifdef YY_USE_PROTOS
  1436. void yy_flush_buffer( YY_BUFFER_STATE b )
  1437. #else
  1438. void yy_flush_buffer( b )
  1439. YY_BUFFER_STATE b;
  1440. #endif
  1441.  
  1442.     {
  1443.     if ( ! b )
  1444.         return;
  1445.  
  1446.     b->yy_n_chars = 0;
  1447.  
  1448.     /* We always need two end-of-buffer characters.  The first causes
  1449.      * a transition to the end-of-buffer state.  The second causes
  1450.      * a jam in that state.
  1451.      */
  1452.     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1453.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1454.  
  1455.     b->yy_buf_pos = &b->yy_ch_buf[0];
  1456.  
  1457.     b->yy_at_bol = 1;
  1458.     b->yy_buffer_status = YY_BUFFER_NEW;
  1459.  
  1460.     if ( b == yy_current_buffer )
  1461.         yy_load_buffer_state();
  1462.     }
  1463.  
  1464.  
  1465. #ifndef YY_NO_SCAN_BUFFER
  1466. #ifdef YY_USE_PROTOS
  1467. YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
  1468. #else
  1469. YY_BUFFER_STATE yy_scan_buffer( base, size )
  1470. char *base;
  1471. yy_size_t size;
  1472. #endif
  1473.     {
  1474.     YY_BUFFER_STATE b;
  1475.  
  1476.     if ( size < 2 ||
  1477.          base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1478.          base[size-1] != YY_END_OF_BUFFER_CHAR )
  1479.         /* They forgot to leave room for the EOB's. */
  1480.         return 0;
  1481.  
  1482.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1483.     if ( ! b )
  1484.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  1485.  
  1486.     b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
  1487.     b->yy_buf_pos = b->yy_ch_buf = base;
  1488.     b->yy_is_our_buffer = 0;
  1489.     b->yy_input_file = 0;
  1490.     b->yy_n_chars = b->yy_buf_size;
  1491.     b->yy_is_interactive = 0;
  1492.     b->yy_at_bol = 1;
  1493.     b->yy_fill_buffer = 0;
  1494.     b->yy_buffer_status = YY_BUFFER_NEW;
  1495.  
  1496.     yy_switch_to_buffer( b );
  1497.  
  1498.     return b;
  1499.     }
  1500. #endif
  1501.  
  1502.  
  1503. #ifndef YY_NO_SCAN_STRING
  1504. #ifdef YY_USE_PROTOS
  1505. YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
  1506. #else
  1507. YY_BUFFER_STATE yy_scan_string( yy_str )
  1508. yyconst char *yy_str;
  1509. #endif
  1510.     {
  1511.     yy_size_t len;
  1512.     for ( len = 0; yy_str[len]; ++len )
  1513.         ;
  1514.  
  1515.     return yy_scan_bytes( yy_str, len );
  1516.     }
  1517. #endif
  1518.  
  1519.  
  1520. #ifndef YY_NO_SCAN_BYTES
  1521. #ifdef YY_USE_PROTOS
  1522. YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, yy_size_t len )
  1523. #else
  1524. YY_BUFFER_STATE yy_scan_bytes( bytes, len )
  1525. yyconst char *bytes;
  1526. yy_size_t len;
  1527. #endif
  1528.     {
  1529.     YY_BUFFER_STATE b;
  1530.     char *buf;
  1531.     yy_size_t n, i;
  1532.  
  1533.     /* Get memory for full buffer, including space for trailing EOB's. */
  1534.     n = len + 2;
  1535.     buf = (char *) yy_flex_alloc( n );
  1536.     if ( ! buf )
  1537.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  1538.  
  1539.     for ( i = 0; i < len; ++i )
  1540.         buf[i] = bytes[i];
  1541.  
  1542.     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  1543.  
  1544.     b = yy_scan_buffer( buf, n );
  1545.     if ( ! b )
  1546.         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  1547.  
  1548.     /* It's okay to grow etc. this buffer, and we should throw it
  1549.      * away when we're done.
  1550.      */
  1551.     b->yy_is_our_buffer = 1;
  1552.  
  1553.     return b;
  1554.     }
  1555. #endif
  1556.  
  1557.  
  1558. #ifndef YY_NO_PUSH_STATE
  1559. #ifdef YY_USE_PROTOS
  1560. static void yy_push_state( int new_state )
  1561. #else
  1562. static void yy_push_state( new_state )
  1563. int new_state;
  1564. #endif
  1565.     {
  1566.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  1567.         {
  1568.         yy_size_t new_size;
  1569.  
  1570.         yy_start_stack_depth += YY_START_STACK_INCR;
  1571.         new_size = yy_start_stack_depth * sizeof( int );
  1572.  
  1573.         if ( ! yy_start_stack )
  1574.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  1575.  
  1576.         else
  1577.             yy_start_stack = (int *) yy_flex_realloc(
  1578.                     (void *) yy_start_stack, new_size );
  1579.  
  1580.         if ( ! yy_start_stack )
  1581.             YY_FATAL_ERROR(
  1582.             "out of memory expanding start-condition stack" );
  1583.         }
  1584.  
  1585.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  1586.  
  1587.     BEGIN(new_state);
  1588.     }
  1589. #endif
  1590.  
  1591.  
  1592. #ifndef YY_NO_POP_STATE
  1593. static void yy_pop_state()
  1594.     {
  1595.     if ( --yy_start_stack_ptr < 0 )
  1596.         YY_FATAL_ERROR( "start-condition stack underflow" );
  1597.  
  1598.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  1599.     }
  1600. #endif
  1601.  
  1602.  
  1603. #ifndef YY_NO_TOP_STATE
  1604. static int yy_top_state()
  1605.     {
  1606.     return yy_start_stack[yy_start_stack_ptr - 1];
  1607.     }
  1608. #endif
  1609.  
  1610. #ifndef YY_EXIT_FAILURE
  1611. #define YY_EXIT_FAILURE 2
  1612. #endif
  1613.  
  1614. #ifdef YY_USE_PROTOS
  1615. static void yy_fatal_error( yyconst char msg[] )
  1616. #else
  1617. static void yy_fatal_error( msg )
  1618. char msg[];
  1619. #endif
  1620.     {
  1621.     (void) fprintf( stderr, "%s\n", msg );
  1622.     exit( YY_EXIT_FAILURE );
  1623.     }
  1624.  
  1625.  
  1626.  
  1627. /* Redefine yyless() so it works in section 3 code. */
  1628.  
  1629. #undef yyless
  1630. #define yyless(n) \
  1631.     do \
  1632.         { \
  1633.         /* Undo effects of setting up yytext. */ \
  1634.         yytext[yyleng] = yy_hold_char; \
  1635.         yy_c_buf_p = yytext + n; \
  1636.         yy_hold_char = *yy_c_buf_p; \
  1637.         *yy_c_buf_p = '\0'; \
  1638.         yyleng = n; \
  1639.         } \
  1640.     while ( 0 )
  1641.  
  1642.  
  1643. /* Internal utility routines. */
  1644.  
  1645. #ifndef yytext_ptr
  1646. #ifdef YY_USE_PROTOS
  1647. static void yy_flex_strncpy( char *s1, yyconst char *s2, yy_size_t n )
  1648. #else
  1649. static void yy_flex_strncpy( s1, s2, n )
  1650. char *s1;
  1651. yyconst char *s2;
  1652. yy_size_t n;
  1653. #endif
  1654.     {
  1655.     register yy_size_t i;
  1656.     for ( i = 0; i < n; ++i )
  1657.         s1[i] = s2[i];
  1658.     }
  1659. #endif
  1660.  
  1661. #ifdef YY_NEED_STRLEN
  1662. #ifdef YY_USE_PROTOS
  1663. static yy_size_t yy_flex_strlen( yyconst char *s )
  1664. #else
  1665. static yy_size_t yy_flex_strlen( s )
  1666. yyconst char *s;
  1667. #endif
  1668.     {
  1669.     register yy_size_t n;
  1670.     for ( n = 0; s[n]; ++n )
  1671.         ;
  1672.  
  1673.     return n;
  1674.     }
  1675. #endif
  1676.  
  1677.  
  1678. #ifdef YY_USE_PROTOS
  1679. static void *yy_flex_alloc( yy_size_t size )
  1680. #else
  1681. static void *yy_flex_alloc( size )
  1682. yy_size_t size;
  1683. #endif
  1684.     {
  1685.     return (void *) malloc( size );
  1686.     }
  1687.  
  1688. #ifndef YY_USES_REJECT
  1689. #ifdef YY_USE_PROTOS
  1690. static void *yy_flex_realloc( void *ptr, yy_size_t size )
  1691. #else
  1692. static void *yy_flex_realloc( ptr, size )
  1693. void *ptr;
  1694. yy_size_t size;
  1695. #endif
  1696.     {
  1697.     /* The cast to (char *) in the following accommodates both
  1698.      * implementations that use char* generic pointers, and those
  1699.      * that use void* generic pointers.  It works with the latter
  1700.      * because both ANSI C and C++ allow castless assignment from
  1701.      * any pointer type to void*, and deal with argument conversions
  1702.      * as though doing an assignment.
  1703.      */
  1704.     return (void *) realloc( (char *) ptr, size );
  1705.     }
  1706. #endif
  1707.  
  1708. #ifdef YY_USE_PROTOS
  1709. static void yy_flex_free( void *ptr )
  1710. #else
  1711. static void yy_flex_free( ptr )
  1712. void *ptr;
  1713. #endif
  1714.     {
  1715.     free( ptr );
  1716.     }
  1717.  
  1718. #if YY_MAIN
  1719. int main()
  1720.     {
  1721.     yylex();
  1722.     return 0;
  1723.     }
  1724. #endif
  1725. #line 103 "lexer.l"
  1726.  
  1727.  
  1728. yyerror (char *s)
  1729. {
  1730.     if (s != NULL)
  1731.        fprintf(stderr, "%s: %s at or near %s\n", progname, s, yytext);
  1732.     else  
  1733.        fprintf(stderr, "%s: header parser error at %s\n", progname, yytext);
  1734. }
  1735.  
  1736. yywrap(void)
  1737. {
  1738.     return(1);
  1739. }
  1740.