home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / forut062.zip / ForUtil-0.62 / ffscan / ffscan.c < prev    next >
C/C++ Source or Header  |  1996-08-28  |  102KB  |  3,002 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.85 95/04/24 10:48:47 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_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  130.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  131.         } \
  132.     while ( 0 )
  133.  
  134. #define unput(c) yyunput( c, yytext_ptr )
  135.  
  136. /* The following is because we cannot portably get our hands on size_t
  137.  * (without autoconf's help, which isn't available because we want
  138.  * flex-generated scanners to compile on their own).
  139.  */
  140. typedef unsigned int yy_size_t;
  141.  
  142.  
  143. struct yy_buffer_state
  144.     {
  145.     FILE *yy_input_file;
  146.  
  147.     char *yy_ch_buf;        /* input buffer */
  148.     char *yy_buf_pos;        /* current position in input buffer */
  149.  
  150.     /* Size of input buffer in bytes, not including room for EOB
  151.      * characters.
  152.      */
  153.     yy_size_t yy_buf_size;
  154.  
  155.     /* Number of characters read into yy_ch_buf, not including EOB
  156.      * characters.
  157.      */
  158.     int yy_n_chars;
  159.  
  160.     /* Whether we "own" the buffer - i.e., we know we created it,
  161.      * and can realloc() it to grow it, and should free() it to
  162.      * delete it.
  163.      */
  164.     int yy_is_our_buffer;
  165.  
  166.     /* Whether this is an "interactive" input source; if so, and
  167.      * if we're using stdio for input, then we want to use getc()
  168.      * instead of fread(), to make sure we stop fetching input after
  169.      * each newline.
  170.      */
  171.     int yy_is_interactive;
  172.  
  173.     /* Whether we're considered to be at the beginning of a line.
  174.      * If so, '^' rules will be active on the next match, otherwise
  175.      * not.
  176.      */
  177.     int yy_at_bol;
  178.  
  179.     /* Whether to try to fill the input buffer when we reach the
  180.      * end of it.
  181.      */
  182.     int yy_fill_buffer;
  183.  
  184.     int yy_buffer_status;
  185. #define YY_BUFFER_NEW 0
  186. #define YY_BUFFER_NORMAL 1
  187.     /* When an EOF's been seen but there's still some text to process
  188.      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  189.      * shouldn't try reading from the input source any more.  We might
  190.      * still have a bunch of tokens to match, though, because of
  191.      * possible backing-up.
  192.      *
  193.      * When we actually see the EOF, we change the status to "new"
  194.      * (via yyrestart()), so that the user can continue scanning by
  195.      * just pointing yyin at a new input file.
  196.      */
  197. #define YY_BUFFER_EOF_PENDING 2
  198.     };
  199.  
  200. static YY_BUFFER_STATE yy_current_buffer = 0;
  201.  
  202. /* We provide macros for accessing buffer states in case in the
  203.  * future we want to put the buffer states in a more general
  204.  * "scanner state".
  205.  */
  206. #define YY_CURRENT_BUFFER yy_current_buffer
  207.  
  208.  
  209. /* yy_hold_char holds the character lost when yytext is formed. */
  210. static char yy_hold_char;
  211.  
  212. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  213.  
  214.  
  215. int yyleng;
  216.  
  217. /* Points to current character in buffer. */
  218. static char *yy_c_buf_p = (char *) 0;
  219. static int yy_init = 1;        /* whether we need to initialize */
  220. static int yy_start = 0;    /* start state number */
  221.  
  222. /* Flag which is used to allow yywrap()'s to do buffer switches
  223.  * instead of setting up a fresh yyin.  A bit of a hack ...
  224.  */
  225. static int yy_did_buffer_switch_on_eof;
  226.  
  227. void yyrestart YY_PROTO(( FILE *input_file ));
  228.  
  229. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  230. void yy_load_buffer_state YY_PROTO(( void ));
  231. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  232. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  233. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  234. void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  235. #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
  236.  
  237. YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
  238. YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
  239. YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
  240.  
  241. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  242. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
  243. static void yy_flex_free YY_PROTO(( void * ));
  244.  
  245. #define yy_new_buffer yy_create_buffer
  246.  
  247. #define yy_set_interactive(is_interactive) \
  248.     { \
  249.     if ( ! yy_current_buffer ) \
  250.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  251.     yy_current_buffer->yy_is_interactive = is_interactive; \
  252.     }
  253.  
  254. #define yy_set_bol(at_bol) \
  255.     { \
  256.     if ( ! yy_current_buffer ) \
  257.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  258.     yy_current_buffer->yy_at_bol = at_bol; \
  259.     }
  260.  
  261. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  262.  
  263.  
  264. #define YY_USES_REJECT
  265. typedef unsigned char YY_CHAR;
  266. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  267. typedef int yy_state_type;
  268. extern int yylineno;
  269. int yylineno = 1;
  270. extern char *yytext;
  271. #define yytext_ptr yytext
  272.  
  273. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  274. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  275. static int yy_get_next_buffer YY_PROTO(( void ));
  276. static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
  277.  
  278. /* Done after the current pattern has been matched and before the
  279.  * corresponding action - sets up yytext.
  280.  */
  281. #define YY_DO_BEFORE_ACTION \
  282.     yytext_ptr = yy_bp; \
  283.     yyleng = (int) (yy_cp - yy_bp); \
  284.     yy_hold_char = *yy_cp; \
  285.     *yy_cp = '\0'; \
  286.     yy_c_buf_p = yy_cp;
  287.  
  288. #define YY_NUM_RULES 11
  289. #define YY_END_OF_BUFFER 12
  290. static yyconst short int yy_acclist[925] =
  291.     {   0,
  292.        12,   10,   11,    9,   11,   10,   11,   10,   11,    1,
  293.        10,   11,   11,   11,    6,    7,   11,    1,    1,    6,
  294.         7,    6,    7,    6,    7,    6,    7,    1,    1,    6,
  295.         8,    6,    8,    1,    6,    8,    6,    8,    6,    8,
  296.         6,    8,    6,    8,    1,    6,    8,    6,    8,    1,
  297.         6,    6,    6,    8,    6,    8,    5,    1,    5,    6,
  298.         6,    6,    6,    6,    8,    6,    8,    7,    7,    7,
  299.         7,    7,    6,    7,    8,    6,    7,    8,    6,    7,
  300.         8,    6,    6,    8,    6,    8,    7,    7,    7,    7,
  301.         6,    7,    8,    6,    7,    8,    7,    6,    7,    8,
  302.  
  303.         6,    7,    8,    6,    7,    8,    6,    7,    8,    6,
  304.         7,    8,    6,    7,    8,    6,    6,    8,    6,    8,
  305.         6,    8,    6,    8,    6,    8,    7,    7,    6,    7,
  306.         8,    7,    6,    7,    8,    6,    7,    8,    6,    6,
  307.         8,    6,    8,    6,    8,    6,    8,    8,    8,    8,
  308.         5,    7,    7,    6,    7,    8,    7,    6,    7,    8,
  309.         6,    7,    8,    8,    8,    8,    8,    8,    6,    8,
  310.         6,    8,    6,    8,    6,    6,    8,    6,    8,    6,
  311.         8,    6,    8,    8,    8,    8,    8,    8,    8,    6,
  312.         8,    6,    8,    7,    7,    6,    7,    8,    7,    6,
  313.  
  314.         7,    8,    6,    7,    8,    8,    8,    6,    8,    8,
  315.         6,    8,    6,    8,    6,    8,    6,    8,    6,    8,
  316.         6,    8,    6,    6,    8,    6,    8,    8,    8,    6,
  317.         8,    7,    7,    6,    7,    8,    7,    6,    7,    8,
  318.         6,    7,    8,    8,    8,    8,    6,    8,    6,    8,
  319.         6,    8,    6,    8,    8,    8,    6,    8,    2,    2,
  320.         7,    7,    7,    7,    6,    7,    8,    6,    7,    8,
  321.         6,    7,    8,    7,    6,    7,    8,    6,    7,    8,
  322.         6,    7,    8,    6,    7,    8,    6,    7,    8,    6,
  323.         7,    8,    8,    8,    8,    6,    8,    6,    8,    6,
  324.  
  325.         8,    6,    8,    8,    8,    6,    8,    3,    3,    7,
  326.         6,    7,    8,    6,    7,    8,    7,    7,    7,    6,
  327.         7,    8,    6,    7,    8,    6,    7,    8,    6,    7,
  328.         8,    7,    8,    7,    8,    7,    8,    8,    8,    8,
  329.         6,    8,    6,    8,    6,    8,    6,    8,    6,    8,
  330.         6,    8,    6,    8,    6,    8,    8,    8,    8,    8,
  331.         8,    8,    6,    8,    6,    7,    8,    6,    7,    8,
  332.         7,    7,    7,    7,    6,    7,    6,    7,    6,    7,
  333.         7,    8,    7,    8,    7,    8,    7,    8,    7,    8,
  334.         6,    7,    8,    6,    7,    8,    6,    7,    8,    6,
  335.  
  336.         7,    8,    6,    7,    8,    6,    7,    8,    6,    7,
  337.         8,    7,    8,    7,    8,    7,    8,    7,    8,    7,
  338.         8,    7,    8,    6,    7,    8,    6,    7,    8,    8,
  339.         8,    8,    6,    8,    6,    8,    6,    8,    6,    8,
  340.         8,    8,    8,    8,    8,    6,    8,    6,    8,    6,
  341.         8,    6,    8,    4,    4,    6,    7,    8,    6,    7,
  342.         8,    7,    6,    7,    7,    6,    7,    6,    7,    6,
  343.         7,    6,    7,    6,    7,    7,    8,    7,    8,    6,
  344.         7,    8,    7,    8,    6,    7,    8,    6,    7,    8,
  345.         6,    7,    8,    6,    7,    8,    6,    7,    8,    6,
  346.  
  347.         7,    8,    6,    7,    8,    6,    7,    8,    7,    8,
  348.         7,    8,    6,    7,    8,    8,    8,    6,    8,    6,
  349.         8,    6,    8,    6,    8,    6,    8,    6,    7,    8,
  350.         6,    7,    8,    7,    7,    6,    7,    6,    7,    7,
  351.         8,    7,    8,    7,    8,    6,    7,    8,    6,    7,
  352.         8,    6,    7,    8,    6,    7,    8,    7,    8,    7,
  353.         8,    6,    7,    8,    6,    8,    6,    7,    8,    6,
  354.         7,    8,    7,    7,    6,    7,    6,    7,    7,    8,
  355.         7,    8,    7,    8,    6,    7,    8,    6,    7,    8,
  356.         6,    7,    8,    6,    7,    8,    7,    8,    7,    8,
  357.  
  358.         6,    7,    8,    6,    8,    6,    7,    8,    6,    7,
  359.         8,    7,    7,    7,    7,    7,    7,    6,    7,    6,
  360.         7,    7,    8,    7,    8,    7,    8,    6,    7,    8,
  361.         6,    7,    8,    6,    7,    8,    6,    7,    8,    6,
  362.         7,    8,    6,    7,    8,    6,    7,    8,    6,    7,
  363.         8,    7,    8,    7,    8,    7,    8,    7,    8,    7,
  364.         8,    7,    8,    6,    7,    8,    6,    8,    7,    7,
  365.         8,    7,    8,    7,    8,    7,    7,    7,    7,    6,
  366.         7,    8,    6,    7,    8,    6,    7,    6,    7,    6,
  367.         7,    6,    7,    7,    8,    7,    8,    7,    8,    6,
  368.  
  369.         7,    8,    6,    7,    8,    6,    7,    8,    6,    7,
  370.         8,    7,    8,    7,    8,    7,    8,    7,    8,    7,
  371.         8,    6,    7,    8,    6,    7,    8,    6,    7,    8,
  372.         6,    7,    8,    6,    7,    6,    7,    7,    8,    7,
  373.         8,    7,    7,    7,    7,    6,    7,    6,    7,    8,
  374.         6,    7,    6,    7,    6,    7,    7,    7,    8,    7,
  375.         8,    6,    7,    8,    6,    7,    8,    6,    7,    8,
  376.         6,    7,    8,    6,    7,    8,    6,    7,    7,    8,
  377.         7,    8,    7,    6,    7,    8,    6,    7,    7,    6,
  378.         7,    8,    6,    7,    7,    8,    7,    8,    7,    6,
  379.  
  380.         7,    8,    7,    6,    7,    6,    7,    7,    6,    7,
  381.         8,    6,    7,    7,    8,    7,    8,    7,    6,    7,
  382.         8,    6,    7,    7,    6,    7,    8,    6,    7,    7,
  383.         8,    7,    8,    7,    8,    7,    8,    7,    8,    6,
  384.         7,    8,    6,    7,    8,    6,    7,    8,    6,    7,
  385.         8,    6,    7,    7,    6,    7,    7,    8,    7,    8,
  386.         7,    6,    7,    8,    6,    7,    8,    6,    7,    8,
  387.         6,    7,    8,    6,    7,    7,    8,    7,    6,    7,
  388.         8,    6,    7,    8,    7,    8,    7,    6,    7,    8,
  389.         6,    7,    8,    7,    8,    7,    6,    7,    8,    6,
  390.  
  391.         7,    8,    7,    8,    7,    6,    7,    8,    6,    7,
  392.         8,    7,    8,    7,    7,    7,    6,    7,    8,    6,
  393.         7,    8,    7,    8
  394.     } ;
  395.  
  396. static yyconst short int yy_accept[593] =
  397.     {   0,
  398.         1,    1,    1,    1,    1,    2,    4,    6,    8,   10,
  399.        13,   14,   15,   18,   18,   18,   19,   20,   20,   22,
  400.        22,   24,   26,   26,   26,   28,   28,   28,   28,   29,
  401.        30,   30,   30,   30,   30,   32,   34,   34,   34,   35,
  402.        35,   35,   37,   39,   41,   43,   45,   45,   45,   46,
  403.        46,   46,   46,   46,   46,   48,   50,   50,   50,   51,
  404.        51,   51,   51,   51,   51,   52,   53,   55,   57,   58,
  405.        58,   58,   58,   58,   58,   58,   58,   60,   60,   60,
  406.        60,   60,   60,   60,   61,   62,   63,   64,   66,   68,
  407.        68,   68,   68,   68,   68,   69,   70,   71,   72,   73,
  408.  
  409.        76,   79,   82,   82,   82,   83,   85,   87,   87,   87,
  410.        87,   87,   87,   88,   89,   90,   91,   94,   97,   98,
  411.       101,  104,  107,  110,  113,  116,  116,  116,  117,  119,
  412.       121,  123,  125,  127,  127,  127,  127,  127,  127,  128,
  413.       129,  132,  133,  133,  136,  139,  139,  139,  139,  139,
  414.       139,  140,  142,  144,  146,  148,  149,  150,  151,  152,
  415.       152,  152,  152,  152,  153,  154,  157,  158,  158,  161,
  416.       164,  165,  166,  167,  168,  169,  169,  171,  173,  175,
  417.       175,  176,  178,  180,  182,  184,  185,  186,  187,  188,
  418.       189,  190,  192,  194,  194,  194,  194,  194,  195,  196,
  419.  
  420.       199,  200,  200,  203,  206,  207,  208,  210,  211,  213,
  421.       215,  217,  219,  221,  223,  223,  224,  226,  228,  228,
  422.       229,  230,  232,  232,  232,  232,  232,  233,  234,  237,
  423.       238,  238,  241,  244,  245,  246,  247,  249,  251,  253,
  424.       255,  255,  256,  257,  259,  259,  260,  261,  261,  261,
  425.       262,  263,  264,  265,  268,  271,  274,  275,  275,  278,
  426.       281,  284,  287,  290,  293,  294,  295,  296,  298,  300,
  427.       302,  304,  304,  305,  306,  308,  309,  310,  310,  311,
  428.       314,  317,  318,  319,  320,  320,  320,  320,  323,  326,
  429.       329,  332,  334,  336,  338,  339,  340,  341,  343,  345,
  430.  
  431.       347,  349,  351,  353,  355,  357,  357,  358,  359,  360,
  432.       361,  362,  363,  365,  365,  368,  371,  372,  373,  374,
  433.       375,  377,  379,  381,  383,  385,  387,  389,  391,  394,
  434.       397,  400,  403,  406,  409,  412,  414,  416,  418,  420,
  435.       422,  424,  427,  430,  431,  432,  433,  435,  437,  439,
  436.       441,  441,  442,  443,  444,  445,  446,  448,  450,  452,
  437.       454,  455,  456,  459,  462,  463,  465,  466,  468,  470,
  438.       472,  474,  476,  478,  480,  483,  485,  488,  491,  494,
  439.       497,  500,  503,  506,  509,  509,  511,  513,  516,  517,
  440.       518,  520,  522,  524,  526,  528,  531,  534,  535,  536,
  441.  
  442.       536,  538,  540,  542,  544,  546,  549,  552,  555,  558,
  443.       558,  560,  562,  565,  567,  570,  573,  574,  575,  575,
  444.       577,  579,  581,  583,  585,  588,  591,  594,  597,  597,
  445.       599,  601,  604,  606,  609,  612,  613,  614,  615,  616,
  446.       617,  618,  618,  620,  622,  624,  626,  628,  631,  634,
  447.       637,  640,  643,  646,  649,  652,  652,  654,  656,  658,
  448.       660,  662,  664,  667,  669,  670,  672,  674,  676,  677,
  449.       678,  679,  680,  683,  686,  686,  688,  690,  692,  694,
  450.       696,  698,  700,  703,  706,  709,  712,  712,  714,  716,
  451.       718,  720,  722,  725,  728,  731,  734,  736,  738,  740,
  452.  
  453.       742,  743,  744,  745,  746,  748,  751,  751,  753,  755,
  454.       757,  758,  760,  762,  765,  768,  771,  774,  777,  779,
  455.       781,  783,  784,  787,  787,  787,  789,  790,  793,  795,
  456.       797,  799,  800,  803,  804,  806,  808,  809,  812,  814,
  457.       816,  818,  819,  822,  824,  825,  828,  830,  832,  834,
  458.       836,  838,  840,  843,  846,  849,  852,  854,  855,  857,
  459.       859,  861,  862,  865,  868,  871,  874,  876,  878,  879,
  460.       882,  885,  887,  888,  891,  894,  896,  897,  900,  903,
  461.       905,  906,  909,  912,  914,  915,  916,  917,  920,  923,
  462.       925,  925
  463.  
  464.     } ;
  465.  
  466. static yyconst int yy_ec[256] =
  467.     {   0,
  468.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  469.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  470.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  471.         1,    4,    1,    1,    1,    1,    1,    1,    5,    6,
  472.         7,    8,    1,    1,    1,    1,    1,    9,    9,    9,
  473.         9,    9,    9,    9,    9,    9,    9,    1,    1,    1,
  474.         1,    1,    1,    1,   12,   13,   14,    9,   15,   16,
  475.        17,    9,   18,    9,    9,   19,   20,   21,   22,   23,
  476.         9,   24,   25,   26,   27,    9,    9,    9,    9,    9,
  477.         1,    1,    1,    1,   11,    1,   12,   13,   14,    9,
  478.  
  479.        15,   16,   17,    9,   18,    9,    9,   19,   20,   21,
  480.        22,   23,    9,   24,   25,   26,   27,    9,    9,    9,
  481.         9,    9,    1,    1,    1,    1,    1,    1,    1,    1,
  482.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  483.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  484.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  485.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  486.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  487.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  488.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  489.  
  490.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  491.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  492.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  493.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  494.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  495.         1,    1,    1,    1,    1
  496.     } ;
  497.  
  498. static yyconst int yy_meta[28] =
  499.     {   0,
  500.         1,    2,    3,    4,    5,    5,    5,    2,    2,    2,
  501.         1,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  502.         2,    2,    2,    2,    2,    2,    2
  503.     } ;
  504.  
  505. static yyconst short int yy_base[645] =
  506.     {   0,
  507.         0,    5,   19,   29,  256,    0,   10, 2422,   13,   14,
  508.        39, 2422,   49,   44,   58,    0,   59,   73,   83,   39,
  509.        61,   62,   63,  246,    0,   78,  192,   92,   93,  191,
  510.        73,    0,   94,   95,  101,  106,  176,  110,  161,  111,
  511.       112,  116,  121,  125,  127,  132,  157,  136,  156,  137,
  512.       138,  141,  142,  167,  148,  150,  164,  156,  152,  155,
  513.       159,  160,    0,  163,  170,  179,  181,  186, 2422,  192,
  514.         0,  176,  185,  189,  196,  197,    0,  215,  196,  203,
  515.       219,  222,  223,  207,  226,  230,  232,  237,  239,  229,
  516.       236,  245,  247,  247,  251,  262,  267,  269,  274,  276,
  517.  
  518.       281,  286,  258,  288,  292,  294,  299,  289,  298,  302,
  519.       305,  305,  145,  313,  319,  321,  327,  329,  334,  339,
  520.       309,  341,  346,  348,  353,  355,  358,  362,  364,  368,
  521.       372,  374,  379,  383,  382,  386,  387,  133,  387,  389,
  522.       397,  408,  401,  413,  415,  419,  420,  423,  424,  427,
  523.       431,  433,  438,  443,  445,  450,  455,  460,  449,  453,
  524.       458,  464,  129,  469,  475,  480,  482,  471,  489,  491,
  525.       496,  498,  503,  505,  510,  512,  516,  518,  523,  525,
  526.       529,  531,  535,  537,  542,  122,  547,  552,  554,  559,
  527.       564,  569,  571,  567,  575,  577,  118,  577,  593,  583,
  528.  
  529.       598,  588,  603,  605,  610,  612,  617,  619,  624,  626,
  530.       630,  632,  637,  642,  644,  648,  650,  655,  117,  660,
  531.       665,  670,  654,  674,  663,  107,  679,  681,  688,  690,
  532.       694,  698,  700,  705,  707,  712,  717,  719,  724,  726,
  533.        99,  731,  736,  741,  745, 2422,  734,  739,    0,  750,
  534.       758,  762,  767,  772,  776,  780,  785,  790,  794,  798,
  535.       802,  804,  809,  814,  819,  821,  826,  831,  833,  838,
  536.       840,   98,  845,  850,  855, 2422,  756,  848,  862,  867,
  537.       872,  877,  882,  887,  889,  892,  893,  897,  899,  904,
  538.       906,  911,  916,  921,  923,  928,  933,  938,  940,  945,
  539.  
  540.       947,  951,  955,  960,  965,   74,  970,  975,  979,  983,
  541.       988,  993,  998, 1002, 1004, 1009, 1016, 1021, 1023, 1028,
  542.      1033, 1035, 1040, 1042, 1047, 1052, 1054, 1059, 1061, 1066,
  543.      1071, 1073, 1077, 1079, 1084,   67, 1089, 1094, 1096, 1101,
  544.      1106, 1111, 1113, 1118, 1120, 1125, 1130, 1132, 1137, 1139,
  545.         0, 1144, 1149, 1154, 1159, 1164, 1169, 1174, 1178, 1182,
  546.      2422,  761, 1187, 1192, 1197, 1202, 1204, 1209, 1211, 1215,
  547.      1217, 1222, 1224, 1229, 1234, 1236, 1241, 1243, 1247, 1249,
  548.      1254, 1259, 1261, 1266,   66, 1271, 1276, 1281, 1283, 1288,
  549.      1293, 1295, 1300, 1305, 1310, 1315, 1320, 1325, 1330, 1334,
  550.  
  551.      1338, 1340, 1345, 1347, 1352, 1357, 1359, 1364, 1366,   40,
  552.      1371, 1376, 1381, 1383, 1388, 1393, 1398, 1403, 1407, 1411,
  553.      1413, 1418, 1420, 1425, 1430, 1432, 1437, 1439,   34, 1444,
  554.      1449, 1454, 1456, 1461, 1466, 1471, 1476, 1480, 1484, 1489,
  555.      1494, 1498, 1502, 1504, 1509, 1511, 1516, 1521, 1523, 1528,
  556.      1530, 1534, 1538, 1543, 1548,   24, 1553, 1558, 1562, 1566,
  557.      1571, 1576, 1581, 1583, 1588, 1593, 1598, 1600, 1605, 1610,
  558.      1615, 1620, 1625, 1630, 1632, 1636, 1638, 1642, 1646, 1651,
  559.      1653, 1658, 1663, 1665, 1670, 1672,    0, 1677, 1682, 1687,
  560.      1692, 1697, 1702, 1707, 1711, 1715, 1720, 1725, 1727, 1732,
  561.  
  562.      1737, 1742, 1744, 1749, 1754, 1759, 1764, 1768, 1770, 1775,
  563.      1777, 1782, 1787, 1792, 1794, 1799, 1804, 1809, 1814, 1819,
  564.      1824, 1829, 1834, 1838, 1842, 1846, 1851, 1856, 1861, 1866,
  565.      1871, 1876, 1881, 1886, 1891, 1896, 1901, 1906, 1911, 1916,
  566.      1921, 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1960, 1964,
  567.      1969, 1974, 1979, 1983, 1987, 1992, 1997, 2002, 2007, 2012,
  568.      2017, 2019, 2024, 2029, 2031, 2036, 2038, 2043, 2048, 2053,
  569.      2058, 2063, 2068, 2073, 2078, 2083, 2088, 2093, 2098, 2103,
  570.      2108, 2113, 2118, 2123, 2128, 2133, 2138, 2143, 2148, 2153,
  571.      2422, 2160, 2165, 2170, 2175, 2178, 2183, 2188, 2193, 2198,
  572.  
  573.      2203, 2207, 2211, 2216, 2221, 2226, 2231, 2236, 2241, 2246,
  574.      2251, 2256, 2261, 2266, 2271, 2276, 2281, 2286, 2291, 2296,
  575.      2301, 2306, 2311, 2316, 2321, 2326, 2331, 2336, 2341, 2346,
  576.      2351, 2356, 2361, 2366, 2371, 2376, 2381, 2386, 2391, 2396,
  577.      2401, 2406, 2411, 2416
  578.     } ;
  579.  
  580. static yyconst short int yy_def[645] =
  581.     {   0,
  582.       592,  592,  593,  593,  591,  591,  591,  591,  591,  594,
  583.       595,  591,  596,  591,  591,  594,  594,  595,  596,   18,
  584.        19,  597,  591,  598,   19,  591,  591,  591,  594,  594,
  585.       591,  598,  597,  597,  599,  599,  591,  591,  594,  597,
  586.       597,  599,  600,  599,  599,  599,  591,  591,  594,  597,
  587.       597,  591,  600,  601,  599,  599,  591,  602,  594,  597,
  588.       603,  591,  601,  600,  604,  604,  599,  599,  591,  602,
  589.        70,  602,  602,  602,  602,  602,  594,  603,  605,  605,
  590.       603,  606,  600,  604,  600,  604,  604,  599,  599,  602,
  591.       602,  602,  602,  597,  605,  605,  606,  605,  605,  607,
  592.  
  593.       607,  607,  600,  600,  604,  608,  608,  602,  602,  602,
  594.       602,  591,  591,  605,  605,  605,  607,  607,  605,  607,
  595.       600,  607,  607,  607,  607,  609,  600,  604,  610,  611,
  596.       608,  610,  608,  602,  602,  602,  602,  591,  605,  605,
  597.       607,  605,  600,  607,  607,  612,  612,  600,  613,  600,
  598.       604,  610,  610,  610,  610,  612,  611,  613,  602,  602,
  599.       602,  602,  591,  605,  605,  607,  605,  600,  607,  607,
  600.       612,  612,  613,  612,  612,  591,  614,  614,  614,  600,
  601.       604,  600,  610,  610,  610,  591,  612,  613,  612,  611,
  602.       612,  614,  614,  602,  602,  602,  591,  605,  605,  607,
  603.  
  604.       605,  600,  607,  607,  612,  612,  614,  612,  614,  600,
  605.       614,  614,  614,  614,  600,  604,  610,  610,  591,  612,
  606.       611,  614,  602,  602,  602,  591,  615,  615,  616,  615,
  607.       600,  617,  617,  612,  612,  612,  614,  614,  610,  610,
  608.       591,  612,  611,  614,  602,  591,  602,  602,  618,  605,
  609.       605,  605,  606,  607,  619,  607,  605,  620,  621,  622,
  610.       617,  621,  617,  621,  612,  612,  612,  614,  614,  610,
  611.       623,  591,  612,  624,  614,  591,  602,  602,  605,  607,
  612.       607,  605,  619,  625,  626,  626,  627,  621,  621,  621,
  613.       621,  626,  622,  627,  612,  612,  612,  614,  614,  623,
  614.  
  615.       610,  611,  623,  610,  610,  591,  628,  612,  612,  624,
  616.       613,  612,  629,  602,  607,  607,  605,  625,  619,  605,
  617.       630,  630,  630,  626,  626,  627,  626,  626,  631,  631,
  618.       631,  600,  621,  621,  621,  591,  626,  627,  626,  622,
  619.       626,  631,  631,  628,  628,  628,  629,  629,  623,  610,
  620.       632,  612,  613,  612,  612,  628,  614,  614,  611,  614,
  621.       591,  602,  607,  607,  605,  630,  619,  630,  600,  630,
  622.       630,  630,  626,  626,  631,  626,  631,  600,  631,  631,
  623.       631,  631,  621,  621,  591,  626,  622,  631,  613,  612,
  624.       629,  629,  614,  614,  614,  607,  607,  605,  619,  600,
  625.  
  626.       630,  630,  626,  626,  626,  631,  631,  621,  621,  591,
  627.       626,  622,  631,  614,  616,  617,  605,  633,  600,  630,
  628.       630,  626,  626,  626,  631,  631,  621,  634,  591,  626,
  629.       635,  631,  614,  607,  617,  615,  626,  626,  636,  627,
  630.       626,  600,  630,  637,  626,  626,  626,  631,  631,  634,
  631.       621,  622,  634,  621,  621,  591,  638,  626,  626,  635,
  632.       627,  626,  639,  629,  625,  626,  626,  626,  605,  615,
  633.       625,  605,  631,  631,  600,  637,  630,  619,  630,  638,
  634.       638,  638,  639,  639,  634,  621,  640,  626,  627,  626,
  635.       626,  638,  631,  631,  622,  631,  630,  630,  626,  626,
  636.  
  637.       605,  625,  615,  625,  630,  631,  641,  637,  630,  630,
  638.       619,  627,  626,  639,  639,  631,  631,  631,  630,  626,
  639.       626,  605,  631,  605,  625,  630,  619,  631,  630,  626,
  640.       626,  605,  631,  605,  630,  630,  619,  631,  630,  642,
  641.       642,  605,  643,  630,  619,  639,  637,  626,  605,  627,
  642.       626,  626,  631,  619,  631,  631,  637,  636,  630,  626,
  643.       626,  605,  631,  631,  631,  631,  637,  626,  605,  631,
  644.       631,  626,  605,  631,  631,  626,  605,  631,  631,  638,
  645.       644,  639,  639,  626,  626,  626,  626,  631,  639,  626,
  646.         0,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  647.  
  648.       591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  649.       591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  650.       591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  651.       591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  652.       591,  591,  591,  591
  653.     } ;
  654.  
  655. static yyconst short int yy_nxt[2450] =
  656.     {   0,
  657.       591,   14,    7,   14,    8,    8,    9,    7,    9,    8,
  658.         8,   14,   10,   14,   15,   17,   15,   17,   10,   11,
  659.        11,   11,   12,   12,   12,   12,   11,  487,   11,   11,
  660.        11,   11,   12,   12,   12,   12,   11,  456,   11,   18,
  661.        18,   18,   31,  429,   32,   26,   18,   26,   18,   20,
  662.        20,   21,   22,   23,   24,   23,   20,   27,   20,   28,
  663.        29,   28,   29,   18,   33,   34,   31,   24,   32,  410,
  664.       385,   27,   30,   18,   18,   18,   31,  351,   32,   26,
  665.        18,   26,   18,   20,   20,   21,   22,   23,   24,   23,
  666.        20,   27,   20,   38,   29,   38,   29,   40,   41,   24,
  667.  
  668.        24,  306,  272,   43,   44,   27,   30,   45,   43,   46,
  669.       249,   48,   45,   48,   50,   51,   24,   24,   43,   44,
  670.       241,  226,   45,   27,   53,  219,   54,   43,   55,   43,
  671.        44,   45,  197,   45,   43,   56,  163,   58,   45,   58,
  672.        60,   61,   24,   24,   62,   64,   63,   54,  138,   27,
  673.        43,   67,   43,   68,   45,   77,   45,   70,   78,   71,
  674.        24,   80,   81,   62,   82,   63,   83,   69,   54,   73,
  675.        66,   74,   85,   86,   59,   57,   87,  591,   75,   49,
  676.        76,   85,   86,   43,   88,   87,  591,   45,   43,   89,
  677.       591,   74,   45,   70,   47,   71,   90,  591,  591,   96,
  678.  
  679.        74,   97,   39,   37,   74,   73,   98,   74,   99,   85,
  680.        86,   74,   74,   87,   75,   91,   76,   80,   94,   92,
  681.        82,   80,   94,   93,   82,  101,  103,  102,   54,  104,
  682.       591,   54,   85,  105,   85,   86,   87,  591,   87,   43,
  683.       106,   43,  107,   45,   74,   45,  591,  108,  591,   36,
  684.       112,   74,   24,  113,  114,  591,  109,  115,  591,  111,
  685.        74,  126,   74,   54,  113,  116,  110,   97,  115,  113,
  686.       117,  113,  119,  118,   99,  115,  113,  114,  121,  122,
  687.       115,  591,  123,  121,  124,  591,  125,  123,  121,  122,
  688.       591,  127,  123,   54,   85,  128,  130,  131,   87,  591,
  689.  
  690.       132,  130,  133,  591,   74,  132,  591,  134,   31,  591,
  691.        32,  135,  143,   74,   54,  113,  139,   74,  136,  115,
  692.        74,  113,  114,  113,  140,  115,   97,  115,  137,  121,
  693.       141,  121,  122,  123,  591,  123,  113,  142,  591,   99,
  694.       115,  121,  122,  121,  144,  123,  591,  123,  121,  122,
  695.       121,  145,  123,  125,  123,  121,  122,  147,  148,  123,
  696.       149,  150,  591,   54,   85,  151,   43,  153,   87,  154,
  697.       155,  157,  591,  158,  130,  131,   43,  153,  132,  154,
  698.       155,  130,  133,  591,  591,  132,  159,  591,  591,  113,
  699.       164,  113,  165,  115,   97,  115,  591,   74,   74,  121,
  700.  
  701.       166,   74,   74,  123,  168,  591,   54,  160,  162,  161,
  702.       113,  167,  591,   99,  115,  121,  169,  121,  170,  123,
  703.       125,  123,  172,  174,  173,  175,  176,  178,   54,  179,
  704.       180,  591,   54,   85,  181,  182,  183,   87,  591,  184,
  705.       182,  185,  591,  154,  184,  182,  183,  182,  183,  184,
  706.       591,  184,  186,  187,  591,  188,  189,  186,  190,  591,
  707.       158,  191,  186,  192,   74,  591,  193,  591,   74,  195,
  708.       194,  113,  198,   74,  202,  115,   54,  113,  199,   74,
  709.        97,  115,  121,  200,  113,  201,  123,   99,  115,  591,
  710.       196,  121,  203,  121,  204,  123,  125,  123,  186,  205,
  711.  
  712.       186,  206,  189,  173,  189,  186,  207,  186,  208,  193,
  713.       175,  189,  186,  205,  591,   62,  189,   63,  210,  211,
  714.       210,  213,  212,  214,  212,  210,  211,  591,  215,  212,
  715.        54,   85,  216,  591,   53,   87,   54,  182,  217,  182,
  716.       183,  184,  591,  184,  182,  218,  591,  154,  184,  186,
  717.       220,  591,  188,  189,  186,  207,  186,  205,  193,  591,
  718.       189,  186,  221,  591,  158,  191,  186,  187,  591,  188,
  719.       189,  210,  222,  210,  211,  212,  591,  212,  591,  113,
  720.       227,  591,   74,  115,  591,  121,  229,  591,  223,  123,
  721.        74,  231,   74,   54,  224,  113,  228,  591,   97,  115,
  722.  
  723.       113,  230,  225,   99,  115,  121,  232,  121,  233,  123,
  724.       125,  123,  186,  234,  186,  235,  189,  173,  189,  210,
  725.       222,  186,  236,  212,  175,  189,  210,  211,  591,   53,
  726.       212,   54,  210,  237,  210,  211,  212,  591,  212,  210,
  727.       238,  591,  214,  212,  210,  211,  591,  148,  212,   54,
  728.        85,  216,  182,  239,   87,  591,  184,  182,  240,  591,
  729.       154,  184,  186,  242,  591,  188,  189,  186,  243,   74,
  730.       158,  191,  210,  244,  245,  246,  212,  247,   74,  591,
  731.       248,  251,  227,  251,  228,  252,  253,  252,  591,   74,
  732.       255,  232,  251,  230,  256,  257,  252,  258,  591,   54,
  733.  
  734.       260,  261,  260,  263,  262,  264,  262,  186,  265,  186,
  735.       266,  189,  173,  189,  186,  267,  591,  175,  189,  210,
  736.       268,  210,  269,  212,  214,  212,  182,  270,  182,  271,
  737.       184,  154,  184,  186,  273,  591,  188,  189,  186,  274,
  738.       591,  158,  191,  210,  275,  591,  276,  212,  277,   74,
  739.       591,  591,  113,  119,   74,   99,  115,  591,  591,  278,
  740.        74,  279,  591,   99,  113,  119,  591,   99,  115,  113,
  741.       280,   74,  102,  118,  121,  281,   74,  125,  123,  283,
  742.       591,  284,  121,  281,  591,  125,  123,  113,  119,  591,
  743.        99,  115,  286,  148,  591,  287,  121,  289,  591,  290,
  744.  
  745.       291,  293,  591,  294,  260,  261,  121,  289,  262,  290,
  746.       291,  260,  263,  591,  264,  262,  121,  289,  591,  290,
  747.       291,  186,  295,  186,  296,  189,  173,  189,  186,  297,
  748.       591,  175,  189,  210,  298,  210,  299,  212,  214,  212,
  749.       182,  300,  302,  303,  184,  304,  305,  186,  307,  591,
  750.       188,  189,  309,  310,  591,  311,  312,  210,  313,  591,
  751.       591,  212,  314,   74,  113,  142,  591,   99,  115,  121,
  752.       315,  591,  125,  123,  121,  316,  591,  125,  123,  113,
  753.       317,  591,  318,  115,  113,  319,  591,  284,  320,  113,
  754.       322,  591,  325,  323,  326,  327,  330,  328,  331,  332,
  755.  
  756.       333,  332,  335,  334,  290,  334,  332,  333,  332,  333,
  757.       334,  591,  334,  336,  337,  591,  338,  339,  336,  340,
  758.       591,  294,  341,  336,  342,  186,  344,  343,  591,  189,
  759.       186,  345,  591,  173,  189,  186,  346,  591,  175,  189,
  760.       210,  347,  210,  348,  212,  214,  212,  302,  349,  182,
  761.       350,  305,  154,  184,  157,  591,  158,  302,  303,  591,
  762.       304,  305,  182,  350,  591,  154,  184,  182,  350,  591,
  763.       154,  184,  309,  307,  591,  353,  354,  186,  206,  591,
  764.       173,  189,  355,  591,  175,  309,  356,  591,  311,  312,
  765.       186,  357,  591,  179,  193,  186,  206,  591,  173,  189,
  766.  
  767.       359,  347,  591,  361,  360,  362,  121,  363,  591,  125,
  768.       123,  121,  364,  591,  125,  123,  591,   74,  113,  365,
  769.       591,  318,  115,  113,  366,  113,  367,  323,  284,  320,
  770.       113,  317,  591,  318,  115,  369,  370,  369,  372,  371,
  771.       591,  371,  369,  370,  336,  373,  371,  591,  339,  336,
  772.       374,  591,  326,  339,  336,  375,  336,  376,  343,  328,
  773.       339,  336,  373,  378,  379,  339,  591,  380,  378,  381,
  774.       591,  382,  380,  378,  379,  591,  143,  380,   54,  332,
  775.       383,  332,  333,  334,  591,  334,  332,  384,  591,  290,
  776.       334,  336,  386,  591,  338,  339,  336,  375,  336,  373,
  777.  
  778.       343,  591,  339,  336,  387,  591,  294,  341,  336,  337,
  779.       591,  338,  339,  378,  388,  378,  379,  380,  591,  380,
  780.       309,  344,  309,  345,  354,  389,  354,  309,  346,  591,
  781.       390,  354,  359,  391,  359,  392,  360,  393,  360,  302,
  782.       349,  182,  185,  305,  154,  184,  186,  208,  591,  175,
  783.       189,  186,  394,  591,  179,  193,  186,  208,  591,  175,
  784.       189,  186,  236,  591,  175,  189,  309,  345,  591,  389,
  785.       354,  210,  395,  591,  214,  212,  210,  213,  591,  214,
  786.       212,  157,  591,  158,  210,  213,  591,  214,  212,  121,
  787.       396,  591,  125,  123,  121,  397,  591,  125,  123,  113,
  788.  
  789.       398,  591,  318,  115,  369,  372,  113,  399,  371,  284,
  790.       320,  369,  370,  591,  400,  371,   54,  369,  401,  369,
  791.       370,  371,  591,  371,  369,  402,  336,  403,  371,  591,
  792.       339,  336,  404,  591,  326,  339,  378,  388,  336,  405,
  793.       380,  328,  339,  378,  379,  591,  143,  380,   54,  378,
  794.       406,  378,  379,  380,  591,  380,  378,  407,  591,  382,
  795.       380,  378,  379,  332,  408,  380,  591,  334,  332,  409,
  796.       591,  290,  334,  336,  411,  591,  338,  339,  336,  412,
  797.       591,  294,  341,  378,  413,  186,  394,  380,  179,  193,
  798.       186,  208,  591,  175,  189,  359,  391,  359,  392,  360,
  799.  
  800.       393,  360,  210,  213,  591,  214,  212,  210,  395,  591,
  801.       214,  212,  210,  414,  591,  214,  212,  121,  415,  591,
  802.       125,  123,  121,  416,  591,  125,  123,  113,  417,  591,
  803.       318,  115,  113,  418,  591,  284,  320,  419,  591,   54,
  804.       369,  420,  369,  421,  371,  591,  371,  336,  422,  336,
  805.       423,  339,  326,  339,  336,  424,  591,  328,  339,  378,
  806.       425,  378,  426,  380,  382,  380,  332,  427,  332,  428,
  807.       334,  290,  334,  336,  430,  591,  338,  339,  336,  431,
  808.       591,  294,  341,  378,  432,  210,  433,  380,  214,  212,
  809.       255,  416,  591,  434,  256,  260,  435,  591,  264,  262,
  810.  
  811.       113,  436,  591,  318,  115,  438,  439,  591,  440,  441,
  812.       442,  591,   54,  369,  443,  369,  444,  371,  591,  371,
  813.       336,  445,  336,  446,  339,  326,  339,  336,  447,  591,
  814.       328,  339,  378,  448,  378,  449,  380,  382,  380,  332,
  815.       450,  452,  453,  334,  454,  455,  336,  457,  591,  338,
  816.       339,  459,  460,  591,  461,  462,  378,  463,  210,  464,
  817.       380,  214,  212,  121,  281,  591,  125,  123,  260,  435,
  818.       591,  264,  262,  251,  436,  591,  465,  252,  113,  466,
  819.       591,  326,  467,  468,  591,  328,  251,  470,  591,  471,
  820.       472,  113,  473,  591,  331,  474,  113,  466,  591,  326,
  821.  
  822.       467,  475,  591,   54,  369,  476,  478,  476,  371,  591,
  823.       479,  336,  480,  336,  481,  339,  326,  339,  336,  482,
  824.       591,  328,  339,  378,  483,  378,  484,  380,  382,  380,
  825.       452,  485,  332,  486,  455,  290,  334,  293,  591,  294,
  826.       452,  453,  591,  454,  455,  332,  486,  591,  290,  334,
  827.       332,  486,  591,  290,  334,  459,  457,  591,  489,  490,
  828.       336,  374,  591,  326,  339,  491,  591,  328,  459,  492,
  829.       591,  461,  462,  336,  493,  591,  331,  343,  336,  374,
  830.       591,  326,  339,  495,  483,  359,  348,  496,  393,  360,
  831.       113,  497,  591,  498,  323,  336,  499,  591,  326,  339,
  832.  
  833.       336,  373,  336,  500,  339,  328,  339,  113,  501,  591,
  834.       502,  115,  251,  503,  591,  504,  252,  113,  505,  591,
  835.       498,  323,  113,  501,  591,  502,  115,  378,  506,  591,
  836.       382,  380,  378,  379,  591,  507,  380,   54,  478,  508,
  837.       369,  509,  479,  510,  371,  511,  591,  284,  369,  509,
  838.       591,  510,  371,  459,  480,  459,  481,  490,  512,  490,
  839.       459,  482,  591,  513,  490,  495,  514,  495,  515,  496,
  840.       516,  496,  452,  485,  332,  335,  455,  290,  334,  336,
  841.       376,  591,  328,  339,  336,  517,  591,  331,  343,  336,
  842.       376,  591,  328,  339,  336,  405,  591,  328,  339,  459,
  843.  
  844.       481,  591,  512,  490,  378,  518,  591,  382,  380,  378,
  845.       381,  591,  382,  380,  293,  591,  294,  378,  381,  591,
  846.       382,  380,  369,  519,  591,  510,  371,  369,  370,  336,
  847.       520,  371,  326,  339,  336,  521,  591,  328,  339,  113,
  848.       522,  591,  502,  115,  113,  366,  251,  503,  323,  504,
  849.       252,  113,  497,  591,  498,  323,  369,  519,  591,  510,
  850.       371,  378,  523,  591,  382,  380,   80,  148,  591,  525,
  851.       478,  508,  369,  526,  479,  510,  371,  369,  370,  113,
  852.       527,  371,  284,  320,  336,  517,  591,  331,  343,  336,
  853.       376,  591,  328,  339,  495,  514,  495,  515,  496,  516,
  854.  
  855.       496,  378,  381,  591,  382,  380,  378,  518,  591,  382,
  856.       380,  378,  528,  591,  382,  380,  369,  529,  591,  510,
  857.       371,  336,  530,  591,  326,  339,  336,  531,  591,  328,
  858.       339,  113,  532,  591,  502,  115,  378,  533,  591,  382,
  859.       380,  534,  591,  502,  591,  535,  591,  498,  369,  536,
  860.       591,  510,  371,  113,  537,  591,  284,  320,  378,  538,
  861.       591,  382,  380,  369,  539,  591,  510,  371,  336,  540,
  862.       591,  326,  339,  336,  541,  591,  328,  339,  113,  542,
  863.       591,  502,  115,  378,  543,  591,  382,  380,  113,  501,
  864.       591,  502,  115,  369,  509,  591,  510,  371,  369,  544,
  865.  
  866.       591,  510,  371,  113,  545,  591,  284,  320,  378,  546,
  867.       591,  382,  380,  369,  547,  591,  510,  371,  549,  481,
  868.       591,  550,  551,  549,  482,  591,  552,  551,  113,  503,
  869.       591,  502,  115,  554,  484,  591,  555,  556,  369,  557,
  870.       591,  510,  371,  113,  558,  591,  284,  320,  495,  484,
  871.       591,  516,  496,  478,  557,  591,  559,  479,  336,  560,
  872.       591,  561,  339,  562,  591,   99,  336,  563,  591,  564,
  873.       343,  336,  560,  591,  561,  339,  336,  560,  591,  561,
  874.       339,  378,  565,  591,  566,  380,  283,  591,  284,  378,
  875.       565,  591,  566,  380,  378,  565,  591,  566,  380,  478,
  876.  
  877.       567,  591,  559,  479,  251,  439,  591,  471,  472,  369,
  878.       509,  591,  510,  371,  336,  568,  591,  561,  339,  336,
  879.       373,  113,  569,  339,   99,  115,  378,  570,  591,  566,
  880.       380,  378,  379,  378,  571,  380,  566,  380,  378,  379,
  881.       478,  567,  380,  559,  479,  336,  572,  591,  561,  339,
  882.       113,  573,  591,   99,  115,  378,  574,  591,  566,  380,
  883.       378,  575,  591,  566,  380,  336,  576,  591,  561,  339,
  884.       113,  577,  591,   99,  115,  378,  578,  591,  566,  380,
  885.       378,  579,  591,  566,  380,  336,  580,  591,  561,  339,
  886.       113,  581,  591,   99,  115,  378,  582,  591,  566,  380,
  887.  
  888.       378,  583,  591,  566,  380,  459,  580,  591,  584,  490,
  889.       438,  230,  591,  586,  587,  495,  583,  591,  588,  496,
  890.       495,  589,  591,  588,  496,  336,  376,  591,  328,  339,
  891.       113,  590,  591,  328,  467,  113,  590,  591,  328,  467,
  892.       113,  590,  591,  328,  467,  378,  381,  591,  382,  380,
  893.       495,  589,  591,  588,  496,  336,  500,  591,  328,  339,
  894.         6,    6,    6,    6,    6,   13,   13,   13,   13,   13,
  895.        16,   16,  591,   16,   16,   19,   19,   19,   25,   25,
  896.        25,   25,   25,   23,   23,  591,   23,   23,   35,   35,
  897.       591,   35,   35,   42,   42,   42,   42,   42,   52,   52,
  898.  
  899.       591,   52,   52,   65,   65,  591,   65,   65,   72,  591,
  900.        72,   79,   79,   79,   79,   79,   84,   84,   84,   84,
  901.        84,   95,   95,  591,   95,   95,  100,  100,  591,  100,
  902.       100,  120,  120,  120,  120,  120,  129,  129,  129,  129,
  903.       129,  146,  146,  146,  146,  146,  152,  152,  152,  152,
  904.       152,  156,  156,  591,  156,  156,  171,  171,  591,  171,
  905.       171,  177,  177,  591,  177,  177,  209,  209,  209,  209,
  906.       209,  250,  250,  250,  250,  250,  254,  254,  254,  254,
  907.       254,  259,  259,  259,  259,  259,   80,   80,   80,  591,
  908.        80,  282,  282,  591,  282,  282,  285,  285,  285,  285,
  909.  
  910.       285,  288,  288,  288,  288,  288,  292,  292,  591,  292,
  911.       292,  301,  301,  301,  301,  301,  308,  308,  308,  308,
  912.       308,  321,  321,  321,  321,  321,  324,  324,  591,  324,
  913.       324,  329,  329,  591,  329,  329,  352,  352,  352,  352,
  914.       352,  358,  358,  358,  358,  358,  368,  368,  368,  368,
  915.       368,  377,  377,  377,  377,  377,  147,  147,  147,  591,
  916.       147,  437,  437,  437,  437,  437,  451,  451,  451,  451,
  917.       451,  458,  458,  458,  458,  458,  469,  469,  469,  469,
  918.       469,  477,  477,  477,  477,  477,  488,  488,  488,  488,
  919.       488,  494,  494,  494,  494,  494,  286,  286,  286,  591,
  920.  
  921.       286,  524,  524,  524,  524,  524,  548,  548,  548,  548,
  922.       548,  553,  553,  553,  553,  553,  585,  585,  585,  585,
  923.       585,    5,  591,  591,  591,  591,  591,  591,  591,  591,
  924.       591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  925.       591,  591,  591,  591,  591,  591,  591,  591,  591
  926.     } ;
  927.  
  928. static yyconst short int yy_chk[2450] =
  929.     {   0,
  930.         0,    6,    1,    6,    1,    1,    2,    2,    2,    2,
  931.         2,    7,    2,    7,    9,   10,    9,   10,    2,    3,
  932.         3,    3,    3,    3,    3,    3,    3,  456,    3,    4,
  933.         4,    4,    4,    4,    4,    4,    4,  429,    4,   11,
  934.        11,   11,   20,  410,   20,   14,   11,   14,   11,   13,
  935.        13,   13,   13,   13,   13,   13,   13,   14,   13,   15,
  936.        17,   15,   17,   21,   21,   22,   23,   22,   23,  385,
  937.       336,   15,   17,   18,   18,   18,   31,  306,   31,   26,
  938.        18,   26,   18,   19,   19,   19,   19,   19,   19,   19,
  939.        19,   26,   19,   28,   29,   28,   29,   33,   34,   33,
  940.  
  941.        34,  272,  241,   35,   35,   28,   29,   35,   36,   36,
  942.       226,   38,   36,   38,   40,   41,   40,   41,   42,   42,
  943.       219,  197,   42,   38,   43,  186,   43,   44,   44,   45,
  944.        45,   44,  163,   45,   46,   46,  138,   48,   46,   48,
  945.        50,   51,   50,   51,   52,   53,   52,   53,  113,   48,
  946.        55,   55,   56,   56,   55,   59,   56,   58,   60,   58,
  947.        60,   61,   61,   62,   61,   62,   64,   57,   64,   58,
  948.        54,   58,   65,   65,   49,   47,   65,   72,   58,   39,
  949.        58,   66,   66,   67,   67,   66,   73,   67,   68,   68,
  950.        74,   72,   68,   70,   37,   70,   73,   75,   76,   79,
  951.  
  952.        73,   79,   30,   27,   74,   70,   80,   70,   80,   84,
  953.        84,   75,   76,   84,   70,   74,   70,   78,   78,   75,
  954.        78,   81,   81,   76,   81,   82,   83,   82,   83,   85,
  955.        90,   85,   86,   86,   87,   87,   86,   91,   87,   88,
  956.        88,   89,   89,   88,   90,   89,   92,   90,   93,   24,
  957.        94,   91,   94,   95,   95,    5,   91,   95,    0,   93,
  958.        92,  103,   93,  103,   96,   96,   92,   96,   96,   97,
  959.        97,   98,   98,   97,   98,   98,   99,   99,  100,  100,
  960.        99,    0,  100,  101,  101,    0,  101,  101,  102,  102,
  961.       108,  104,  102,  104,  105,  105,  106,  106,  105,  109,
  962.  
  963.       106,  107,  107,  110,  108,  107,  111,  108,  112,    0,
  964.       112,  109,  121,  109,  121,  114,  114,  110,  110,  114,
  965.       111,  115,  115,  116,  116,  115,  116,  116,  111,  117,
  966.       117,  118,  118,  117,    0,  118,  119,  119,    0,  119,
  967.       119,  120,  120,  122,  122,  120,    0,  122,  123,  123,
  968.       124,  124,  123,  124,  124,  125,  125,  126,  126,  125,
  969.       126,  127,    0,  127,  128,  128,  129,  129,  128,  129,
  970.       129,  130,    0,  130,  131,  131,  132,  132,  131,  132,
  971.       132,  133,  133,  135,  134,  133,  134,  136,  137,  139,
  972.       139,  140,  140,  139,  140,  140,    0,  135,  134,  141,
  973.  
  974.       141,  136,  137,  141,  143,    0,  143,  135,  137,  136,
  975.       142,  142,    0,  142,  142,  144,  144,  145,  145,  144,
  976.       145,  145,  146,  147,  146,  147,  148,  149,  148,  149,
  977.       150,    0,  150,  151,  151,  152,  152,  151,    0,  152,
  978.       153,  153,    0,  153,  153,  154,  154,  155,  155,  154,
  979.       159,  155,  156,  156,  160,  156,  156,  157,  157,  161,
  980.       157,  157,  158,  158,  159,  162,  158,    0,  160,  161,
  981.       160,  164,  164,  161,  168,  164,  168,  165,  165,  162,
  982.       165,  165,  166,  166,  167,  167,  166,  167,  167,    0,
  983.       162,  169,  169,  170,  170,  169,  170,  170,  171,  171,
  984.  
  985.       172,  172,  171,  172,  172,  173,  173,  174,  174,  173,
  986.       174,  174,  175,  175,    0,  176,  175,  176,  177,  177,
  987.       178,  178,  177,  178,  178,  179,  179,    0,  180,  179,
  988.       180,  181,  181,    0,  182,  181,  182,  183,  183,  184,
  989.       184,  183,    0,  184,  185,  185,    0,  185,  185,  187,
  990.       187,    0,  187,  187,  188,  188,  189,  189,  188,    0,
  991.       189,  190,  190,    0,  190,  190,  191,  191,  194,  191,
  992.       191,  192,  192,  193,  193,  192,  195,  193,  196,  198,
  993.       198,    0,  194,  198,    0,  200,  200,    0,  194,  200,
  994.       195,  202,  196,  202,  195,  199,  199,    0,  199,  199,
  995.  
  996.       201,  201,  196,  201,  201,  203,  203,  204,  204,  203,
  997.       204,  204,  205,  205,  206,  206,  205,  206,  206,  207,
  998.       207,  208,  208,  207,  208,  208,  209,  209,    0,  210,
  999.       209,  210,  211,  211,  212,  212,  211,    0,  212,  213,
  1000.       213,    0,  213,  213,  214,  214,    0,  215,  214,  215,
  1001.       216,  216,  217,  217,  216,  223,  217,  218,  218,    0,
  1002.       218,  218,  220,  220,  225,  220,  220,  221,  221,  223,
  1003.       221,  221,  222,  222,  223,  224,  222,  224,  225,    0,
  1004.       225,  227,  227,  228,  228,  227,  228,  228,    0,  224,
  1005.       229,  229,  230,  230,  229,  230,  230,  231,    0,  231,
  1006.  
  1007.       232,  232,  233,  233,  232,  233,  233,  234,  234,  235,
  1008.       235,  234,  235,  235,  236,  236,    0,  236,  236,  237,
  1009.       237,  238,  238,  237,  238,  238,  239,  239,  240,  240,
  1010.       239,  240,  240,  242,  242,  247,  242,  242,  243,  243,
  1011.       248,  243,  243,  244,  244,    0,  245,  244,  245,  247,
  1012.         0,    0,  250,  250,  248,  250,  250,  277,    0,  248,
  1013.       245,  251,  362,  251,  252,  252,    0,  252,  252,  253,
  1014.       253,  277,  253,  253,  254,  254,  362,  254,  254,  255,
  1015.         0,  255,  256,  256,    0,  256,  256,  257,  257,    0,
  1016.       257,  257,  258,  258,    0,  258,  259,  259,    0,  259,
  1017.  
  1018.       259,  260,    0,  260,  261,  261,  262,  262,  261,  262,
  1019.       262,  263,  263,    0,  263,  263,  264,  264,    0,  264,
  1020.       264,  265,  265,  266,  266,  265,  266,  266,  267,  267,
  1021.         0,  267,  267,  268,  268,  269,  269,  268,  269,  269,
  1022.       270,  270,  271,  271,  270,  271,  271,  273,  273,  278,
  1023.       273,  273,  274,  274,    0,  274,  274,  275,  275,    0,
  1024.         0,  275,  278,  278,  279,  279,    0,  279,  279,  280,
  1025.       280,    0,  280,  280,  281,  281,    0,  281,  281,  282,
  1026.       282,    0,  282,  282,  283,  283,    0,  283,  283,  284,
  1027.       284,    0,  285,  284,  285,  286,  287,  286,  287,  288,
  1028.  
  1029.       288,  289,  289,  288,  289,  289,  290,  290,  291,  291,
  1030.       290,    0,  291,  292,  292,    0,  292,  292,  293,  293,
  1031.         0,  293,  293,  294,  294,  295,  295,  294,    0,  295,
  1032.       296,  296,    0,  296,  296,  297,  297,    0,  297,  297,
  1033.       298,  298,  299,  299,  298,  299,  299,  300,  300,  301,
  1034.       301,  300,  301,  301,  302,    0,  302,  303,  303,    0,
  1035.       303,  303,  304,  304,    0,  304,  304,  305,  305,    0,
  1036.       305,  305,  307,  307,    0,  307,  307,  308,  308,    0,
  1037.       308,  308,  309,    0,  309,  310,  310,    0,  310,  310,
  1038.       311,  311,    0,  311,  311,  312,  312,    0,  312,  312,
  1039.  
  1040.       313,  313,    0,  314,  313,  314,  315,  315,    0,  315,
  1041.       315,  316,  316,    0,  316,  316,    0,  314,  317,  317,
  1042.         0,  317,  317,  318,  318,  319,  319,  318,  319,  319,
  1043.       320,  320,    0,  320,  320,  321,  321,  322,  322,  321,
  1044.         0,  322,  323,  323,  324,  324,  323,    0,  324,  325,
  1045.       325,    0,  325,  325,  326,  326,  327,  327,  326,  327,
  1046.       327,  328,  328,  329,  329,  328,    0,  329,  330,  330,
  1047.         0,  330,  330,  331,  331,    0,  332,  331,  332,  333,
  1048.       333,  334,  334,  333,    0,  334,  335,  335,    0,  335,
  1049.       335,  337,  337,    0,  337,  337,  338,  338,  339,  339,
  1050.  
  1051.       338,    0,  339,  340,  340,    0,  340,  340,  341,  341,
  1052.         0,  341,  341,  342,  342,  343,  343,  342,    0,  343,
  1053.       344,  344,  345,  345,  344,  345,  345,  346,  346,    0,
  1054.       346,  346,  347,  347,  348,  348,  347,  348,  348,  349,
  1055.       349,  350,  350,  349,  350,  350,  352,  352,    0,  352,
  1056.       352,  353,  353,    0,  353,  353,  354,  354,    0,  354,
  1057.       354,  355,  355,    0,  355,  355,  356,  356,    0,  356,
  1058.       356,  357,  357,    0,  357,  357,  358,  358,    0,  358,
  1059.       358,  359,    0,  359,  360,  360,    0,  360,  360,  363,
  1060.       363,    0,  363,  363,  364,  364,    0,  364,  364,  365,
  1061.  
  1062.       365,    0,  365,  365,  366,  366,  367,  367,  366,  367,
  1063.       367,  368,  368,    0,  369,  368,  369,  370,  370,  371,
  1064.       371,  370,    0,  371,  372,  372,  373,  373,  372,    0,
  1065.       373,  374,  374,    0,  374,  374,  375,  375,  376,  376,
  1066.       375,  376,  376,  377,  377,    0,  378,  377,  378,  379,
  1067.       379,  380,  380,  379,    0,  380,  381,  381,    0,  381,
  1068.       381,  382,  382,  383,  383,  382,    0,  383,  384,  384,
  1069.         0,  384,  384,  386,  386,    0,  386,  386,  387,  387,
  1070.         0,  387,  387,  388,  388,  389,  389,  388,  389,  389,
  1071.       390,  390,    0,  390,  390,  391,  391,  392,  392,  391,
  1072.  
  1073.       392,  392,  393,  393,    0,  393,  393,  394,  394,    0,
  1074.       394,  394,  395,  395,    0,  395,  395,  396,  396,    0,
  1075.       396,  396,  397,  397,    0,  397,  397,  398,  398,    0,
  1076.       398,  398,  399,  399,    0,  399,  399,  400,    0,  400,
  1077.       401,  401,  402,  402,  401,    0,  402,  403,  403,  404,
  1078.       404,  403,  404,  404,  405,  405,    0,  405,  405,  406,
  1079.       406,  407,  407,  406,  407,  407,  408,  408,  409,  409,
  1080.       408,  409,  409,  411,  411,    0,  411,  411,  412,  412,
  1081.         0,  412,  412,  413,  413,  414,  414,  413,  414,  414,
  1082.       415,  415,    0,  415,  415,  416,  416,    0,  416,  416,
  1083.  
  1084.       417,  417,    0,  417,  417,  418,  418,    0,  418,  418,
  1085.       419,    0,  419,  420,  420,  421,  421,  420,    0,  421,
  1086.       422,  422,  423,  423,  422,  423,  423,  424,  424,    0,
  1087.       424,  424,  425,  425,  426,  426,  425,  426,  426,  427,
  1088.       427,  428,  428,  427,  428,  428,  430,  430,    0,  430,
  1089.       430,  431,  431,    0,  431,  431,  432,  432,  433,  433,
  1090.       432,  433,  433,  434,  434,    0,  434,  434,  435,  435,
  1091.         0,  435,  435,  436,  436,    0,  436,  436,  437,  437,
  1092.         0,  437,  437,  438,    0,  438,  439,  439,    0,  439,
  1093.       439,  440,  440,    0,  440,  440,  441,  441,    0,  441,
  1094.  
  1095.       441,  442,    0,  442,  443,  443,  444,  444,  443,    0,
  1096.       444,  445,  445,  446,  446,  445,  446,  446,  447,  447,
  1097.         0,  447,  447,  448,  448,  449,  449,  448,  449,  449,
  1098.       450,  450,  451,  451,  450,  451,  451,  452,    0,  452,
  1099.       453,  453,    0,  453,  453,  454,  454,    0,  454,  454,
  1100.       455,  455,    0,  455,  455,  457,  457,    0,  457,  457,
  1101.       458,  458,    0,  458,  458,  459,    0,  459,  460,  460,
  1102.         0,  460,  460,  461,  461,    0,  461,  461,  462,  462,
  1103.         0,  462,  462,  463,  463,  464,  464,  463,  464,  464,
  1104.       465,  465,    0,  465,  465,  466,  466,    0,  466,  466,
  1105.  
  1106.       467,  467,  468,  468,  467,  468,  468,  469,  469,    0,
  1107.       469,  469,  470,  470,    0,  470,  470,  471,  471,    0,
  1108.       471,  471,  472,  472,    0,  472,  472,  473,  473,    0,
  1109.       473,  473,  474,  474,    0,  475,  474,  475,  476,  476,
  1110.       477,  477,  476,  477,  477,  478,    0,  478,  479,  479,
  1111.         0,  479,  479,  480,  480,  481,  481,  480,  481,  481,
  1112.       482,  482,    0,  482,  482,  483,  483,  484,  484,  483,
  1113.       484,  484,  485,  485,  486,  486,  485,  486,  486,  488,
  1114.       488,    0,  488,  488,  489,  489,    0,  489,  489,  490,
  1115.       490,    0,  490,  490,  491,  491,    0,  491,  491,  492,
  1116.  
  1117.       492,    0,  492,  492,  493,  493,    0,  493,  493,  494,
  1118.       494,    0,  494,  494,  495,    0,  495,  496,  496,    0,
  1119.       496,  496,  497,  497,    0,  497,  497,  498,  498,  499,
  1120.       499,  498,  499,  499,  500,  500,    0,  500,  500,  501,
  1121.       501,    0,  501,  501,  502,  502,  503,  503,  502,  503,
  1122.       503,  504,  504,    0,  504,  504,  505,  505,    0,  505,
  1123.       505,  506,  506,    0,  506,  506,  507,  507,    0,  507,
  1124.       508,  508,  509,  509,  508,  509,  509,  510,  510,  511,
  1125.       511,  510,  511,  511,  512,  512,    0,  512,  512,  513,
  1126.       513,    0,  513,  513,  514,  514,  515,  515,  514,  515,
  1127.  
  1128.       515,  516,  516,    0,  516,  516,  517,  517,    0,  517,
  1129.       517,  518,  518,    0,  518,  518,  519,  519,    0,  519,
  1130.       519,  520,  520,    0,  520,  520,  521,  521,    0,  521,
  1131.       521,  522,  522,    0,  522,  522,  523,  523,    0,  523,
  1132.       523,  524,    0,  524,  525,  525,    0,  525,  526,  526,
  1133.         0,  526,  526,  527,  527,    0,  527,  527,  528,  528,
  1134.         0,  528,  528,  529,  529,    0,  529,  529,  530,  530,
  1135.         0,  530,  530,  531,  531,    0,  531,  531,  532,  532,
  1136.         0,  532,  532,  533,  533,    0,  533,  533,  534,  534,
  1137.         0,  534,  534,  535,  535,    0,  535,  535,  536,  536,
  1138.  
  1139.         0,  536,  536,  537,  537,    0,  537,  537,  538,  538,
  1140.         0,  538,  538,  539,  539,    0,  539,  539,  540,  540,
  1141.         0,  540,  540,  541,  541,    0,  541,  541,  542,  542,
  1142.         0,  542,  542,  543,  543,    0,  543,  543,  544,  544,
  1143.         0,  544,  544,  545,  545,    0,  545,  545,  546,  546,
  1144.         0,  546,  546,  547,  547,    0,  547,  547,  548,  548,
  1145.         0,  548,  548,  549,    0,  549,  550,  550,    0,  550,
  1146.       550,  551,  551,    0,  551,  551,  552,  552,    0,  552,
  1147.       552,  553,  553,    0,  553,  553,  554,    0,  554,  555,
  1148.       555,    0,  555,  555,  556,  556,    0,  556,  556,  557,
  1149.  
  1150.       557,    0,  557,  557,  558,  558,    0,  558,  558,  559,
  1151.       559,    0,  559,  559,  560,  560,    0,  560,  560,  561,
  1152.       561,  562,  562,  561,  562,  562,  563,  563,    0,  563,
  1153.       563,  564,  564,  565,  565,  564,  565,  565,  566,  566,
  1154.       567,  567,  566,  567,  567,  568,  568,    0,  568,  568,
  1155.       569,  569,    0,  569,  569,  570,  570,    0,  570,  570,
  1156.       571,  571,    0,  571,  571,  572,  572,    0,  572,  572,
  1157.       573,  573,    0,  573,  573,  574,  574,    0,  574,  574,
  1158.       575,  575,    0,  575,  575,  576,  576,    0,  576,  576,
  1159.       577,  577,    0,  577,  577,  578,  578,    0,  578,  578,
  1160.  
  1161.       579,  579,    0,  579,  579,  580,  580,    0,  580,  580,
  1162.       581,  581,    0,  581,  581,  582,  582,    0,  582,  582,
  1163.       583,  583,    0,  583,  583,  584,  584,    0,  584,  584,
  1164.       585,  585,    0,  585,  585,  586,  586,    0,  586,  586,
  1165.       587,  587,    0,  587,  587,  588,  588,    0,  588,  588,
  1166.       589,  589,    0,  589,  589,  590,  590,    0,  590,  590,
  1167.       592,  592,  592,  592,  592,  593,  593,  593,  593,  593,
  1168.       594,  594,    0,  594,  594,  595,  595,  595,  596,  596,
  1169.       596,  596,  596,  597,  597,    0,  597,  597,  598,  598,
  1170.         0,  598,  598,  599,  599,  599,  599,  599,  600,  600,
  1171.  
  1172.         0,  600,  600,  601,  601,    0,  601,  601,  602,    0,
  1173.       602,  603,  603,  603,  603,  603,  604,  604,  604,  604,
  1174.       604,  605,  605,    0,  605,  605,  606,  606,    0,  606,
  1175.       606,  607,  607,  607,  607,  607,  608,  608,  608,  608,
  1176.       608,  609,  609,  609,  609,  609,  610,  610,  610,  610,
  1177.       610,  611,  611,    0,  611,  611,  612,  612,    0,  612,
  1178.       612,  613,  613,    0,  613,  613,  614,  614,  614,  614,
  1179.       614,  615,  615,  615,  615,  615,  616,  616,  616,  616,
  1180.       616,  617,  617,  617,  617,  617,  618,  618,  618,    0,
  1181.       618,  619,  619,    0,  619,  619,  620,  620,  620,  620,
  1182.  
  1183.       620,  621,  621,  621,  621,  621,  622,  622,    0,  622,
  1184.       622,  623,  623,  623,  623,  623,  624,  624,  624,  624,
  1185.       624,  625,  625,  625,  625,  625,  626,  626,    0,  626,
  1186.       626,  627,  627,    0,  627,  627,  628,  628,  628,  628,
  1187.       628,  629,  629,  629,  629,  629,  630,  630,  630,  630,
  1188.       630,  631,  631,  631,  631,  631,  632,  632,  632,    0,
  1189.       632,  633,  633,  633,  633,  633,  634,  634,  634,  634,
  1190.       634,  635,  635,  635,  635,  635,  636,  636,  636,  636,
  1191.       636,  637,  637,  637,  637,  637,  638,  638,  638,  638,
  1192.       638,  639,  639,  639,  639,  639,  640,  640,  640,    0,
  1193.  
  1194.       640,  641,  641,  641,  641,  641,  642,  642,  642,  642,
  1195.       642,  643,  643,  643,  643,  643,  644,  644,  644,  644,
  1196.       644,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  1197.       591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
  1198.       591,  591,  591,  591,  591,  591,  591,  591,  591
  1199.     } ;
  1200.  
  1201. static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
  1202. static char *yy_full_match;
  1203. static int yy_lp;
  1204. #define REJECT \
  1205. { \
  1206. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
  1207. yy_cp = yy_full_match; /* restore poss. backed-over text */ \
  1208. ++yy_lp; \
  1209. goto find_rule; \
  1210. }
  1211. #define yymore() yymore_used_but_not_detected
  1212. #define YY_MORE_ADJ 0
  1213. char *yytext;
  1214. #line 1 "ffscan.l"
  1215. #define INITIAL 0
  1216. #line 2 "ffscan.l"
  1217. #ifndef lint
  1218. static char rcsId[]="$Source: /usr/local/rcs/ForUtil/ffscan/RCS/ffscan.l,v $";
  1219. #endif
  1220. /*****
  1221. * fflow.l : f77 argument checker
  1222. *
  1223. * This file Version    $Revision: 1.5 $
  1224. *
  1225. * Creation date:    Wed Jul 17 22:38:31 GMT+0100 1996
  1226. * Last modification:     $Date: 1996/08/28 17:50:18 $
  1227. * By:            $Author: koen $
  1228. * Current State:    $State: Exp $
  1229. *
  1230. * Author:        koen
  1231. * (C)Copyright 1995-1996 Ripley Software Development
  1232. * All Rights Reserved
  1233. *
  1234. * This program has one undocumented switch for debugging purposes:
  1235. * -m for memory information under msdos
  1236. *****/
  1237. /*****
  1238. * ChangeLog 
  1239. * $Log: ffscan.l,v $
  1240. * Revision 1.5  1996/08/28 17:50:18  koen
  1241. * Changed verbose options and argument printing in count_args. 
  1242. * Added print_version_id.
  1243. *
  1244. * Revision 1.4  1996/08/27 19:16:48  koen
  1245. * Heavy changes: new scanner rules; optimized memory allocations; Moved
  1246. * a number of routines to libflow.c
  1247. *
  1248. * Revision 1.3  1996/08/07 21:14:56  koen
  1249. * Updated for MSDOS
  1250. *
  1251. * Revision 1.2  1996/08/02 14:50:47  koen
  1252. * moved all system dependencies to lib/sysdeps.h
  1253. *
  1254. * Revision 1.1  1996/07/30 02:04:03  koen
  1255. * Initial Revision. Based on fflow and scan_commons.
  1256. *
  1257. *****/
  1258. #ifdef HAVE_CONFIG_H
  1259. #include "autoconf.h"
  1260. #endif
  1261.  
  1262. #include <stdio.h>
  1263. #include <string.h>
  1264. #include <ctype.h>
  1265.  
  1266. #include "forutil.h"
  1267. #include "memmacros.h"
  1268. #include "version.h"
  1269. #include "libflow.h"
  1270.  
  1271. /**** Private Variables ****/
  1272. static char *outfile;
  1273. static int verbose, num_diff; 
  1274. static int total_routines, total_calls, total_funcs;
  1275. static int never_invoked;
  1276. static FILE *output_file;
  1277.  
  1278. static char *usage = {"Usage: %s [-fhnqv] [-Eext] [-Idir] [-ofile] [-xname] [files]\n\n"
  1279. " Scans the arguments of calls and compares them with the subroutine definition.\n\n"
  1280. " Options\n"
  1281. "\t-f: print precise location of filenames. Otherwise print name\n"
  1282. "\t    of file only.\n"
  1283. "\t-h, --help: print this help\n"
  1284. "\t-n: tell what subroutines are never invoked\n"
  1285. "\t-q: be really quiet (usefull if called from a script)\n"
  1286. "\t-v: be verbose. Additional -v increases verbosiness\n"
  1287. "\t--version: display version number\n"
  1288. "\t-Eext: extensions to use for retrieving files. Multiple -E allowed.\n"
  1289. "\t-Idir: get files from directory dir. Multiple -I allowed\n"
  1290. "\t-ofile: file to write flowgraph to, default is stdout\n"
  1291. "\t-xname.f: exclude file. Multiple -x allowed\n\n"
  1292. "(C)Copyright 1995-1996 by Ripley Software Development\n"};
  1293.  
  1294. /**** Private Functions ****/
  1295. static int set_global_option(char *arg);
  1296. static inline void count_args(char *text);
  1297. static void cross_check(FILE *file, flowInfo *list);
  1298.  
  1299. /*****
  1300. * On the regular expressions below:
  1301. * The routine and program regexps _must_ start with spaces (or tabs) (6 min.)
  1302. * at the beginning of a line followed by the name of keyword subroutine or 
  1303. * program and followed by a space (or a tab)
  1304. * The regexp for call and function is different in that it does not have to 
  1305. * start at the beginning of the line.
  1306. * It must start with at least one space and may be preceeded by any combination
  1307. * of whitespace, characters, digits and delimiters tokens.
  1308. * The name of the (function,subroutine,program) may _not_ start with a left
  1309. * or right brace or a single quote. The name itself may be made by any 
  1310. * combination of alpha-numeric characters and underscores and can be followed
  1311. * by an optional space or newline.
  1312. * The regexps for the argument blocks is split in two parts.
  1313. * The first part is the regexp for a single line of arguments: it may start 
  1314. * with up to six spaces, followed by any possible character (continuation char)
  1315. * any number of spaces and a left brace. After that any number of characters,
  1316. * followed by an optional right brace, an optional space and and optional
  1317. * newline.
  1318. * The second part is an argument list that may start right after the name
  1319. * of a (function,subroutine,program). It can have up to five spaces, any 
  1320. * possible character except a space (continuation char), optional spaces,
  1321. * an optional left brace. After that any number of chars followed by an
  1322. * optional right brace, space and newline.
  1323. * The regexp field <FNAME> contains three different regexps which will
  1324. * match (to my knowledge) any formulation of a function or subroutine
  1325. * definition with any sort of argument specification, including no arguments.
  1326. *****/
  1327. #define FNAME 1
  1328.  
  1329. #line 1330 "lex.yy.c"
  1330.  
  1331. /* Macros after this point can all be overridden by user definitions in
  1332.  * section 1.
  1333.  */
  1334.  
  1335. #ifndef YY_SKIP_YYWRAP
  1336. #ifdef __cplusplus
  1337. extern "C" int yywrap YY_PROTO(( void ));
  1338. #else
  1339. extern int yywrap YY_PROTO(( void ));
  1340. #endif
  1341. #endif
  1342.  
  1343. #ifndef YY_NO_UNPUT
  1344. static void yyunput YY_PROTO(( int c, char *buf_ptr ));
  1345. #endif
  1346.  
  1347. #ifndef yytext_ptr
  1348. static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
  1349. #endif
  1350.  
  1351. #ifndef YY_NO_INPUT
  1352. #ifdef __cplusplus
  1353. static int yyinput YY_PROTO(( void ));
  1354. #else
  1355. static int input YY_PROTO(( void ));
  1356. #endif
  1357. #endif
  1358.  
  1359. #if YY_STACK_USED
  1360. static int yy_start_stack_ptr = 0;
  1361. static int yy_start_stack_depth = 0;
  1362. static int *yy_start_stack = 0;
  1363. #ifndef YY_NO_PUSH_STATE
  1364. static void yy_push_state YY_PROTO(( int new_state ));
  1365. #endif
  1366. #ifndef YY_NO_POP_STATE
  1367. static void yy_pop_state YY_PROTO(( void ));
  1368. #endif
  1369. #ifndef YY_NO_TOP_STATE
  1370. static int yy_top_state YY_PROTO(( void ));
  1371. #endif
  1372.  
  1373. #else
  1374. #define YY_NO_PUSH_STATE 1
  1375. #define YY_NO_POP_STATE 1
  1376. #define YY_NO_TOP_STATE 1
  1377. #endif
  1378.  
  1379. #ifdef YY_MALLOC_DECL
  1380. YY_MALLOC_DECL
  1381. #else
  1382. #if __STDC__
  1383. #ifndef __cplusplus
  1384. #include <stdlib.h>
  1385. #endif
  1386. #else
  1387. /* Just try to get by without declaring the routines.  This will fail
  1388.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  1389.  * or sizeof(void*) != sizeof(int).
  1390.  */
  1391. #endif
  1392. #endif
  1393.  
  1394. /* Amount of stuff to slurp up with each read. */
  1395. #ifndef YY_READ_BUF_SIZE
  1396. #define YY_READ_BUF_SIZE 8192
  1397. #endif
  1398.  
  1399. /* Copy whatever the last rule matched to the standard output. */
  1400.  
  1401. #ifndef ECHO
  1402. /* This used to be an fputs(), but since the string might contain NUL's,
  1403.  * we now use fwrite().
  1404.  */
  1405. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  1406. #endif
  1407.  
  1408. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  1409.  * is returned in "result".
  1410.  */
  1411. #ifndef YY_INPUT
  1412. #define YY_INPUT(buf,result,max_size) \
  1413.     if ( yy_current_buffer->yy_is_interactive ) \
  1414.         { \
  1415.         int c = '*', n; \
  1416.         for ( n = 0; n < max_size && \
  1417.                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  1418.             buf[n] = (char) c; \
  1419.         if ( c == '\n' ) \
  1420.             buf[n++] = (char) c; \
  1421.         if ( c == EOF && ferror( yyin ) ) \
  1422.             YY_FATAL_ERROR( "input in flex scanner failed" ); \
  1423.         result = n; \
  1424.         } \
  1425.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  1426.           && ferror( yyin ) ) \
  1427.         YY_FATAL_ERROR( "input in flex scanner failed" );
  1428. #endif
  1429.  
  1430. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  1431.  * we don't want an extra ';' after the "return" because that will cause
  1432.  * some compilers to complain about unreachable statements.
  1433.  */
  1434. #ifndef yyterminate
  1435. #define yyterminate() return YY_NULL
  1436. #endif
  1437.  
  1438. /* Number of entries by which start-condition stack grows. */
  1439. #ifndef YY_START_STACK_INCR
  1440. #define YY_START_STACK_INCR 25
  1441. #endif
  1442.  
  1443. /* Report a fatal error. */
  1444. #ifndef YY_FATAL_ERROR
  1445. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  1446. #endif
  1447.  
  1448. /* Default declaration of generated scanner - a define so the user can
  1449.  * easily add parameters.
  1450.  */
  1451. #ifndef YY_DECL
  1452. #define YY_DECL int yylex YY_PROTO(( void ))
  1453. #endif
  1454.  
  1455. /* Code executed at the beginning of each rule, after yytext and yyleng
  1456.  * have been set up.
  1457.  */
  1458. #ifndef YY_USER_ACTION
  1459. #define YY_USER_ACTION
  1460. #endif
  1461.  
  1462. /* Code executed at the end of each rule. */
  1463. #ifndef YY_BREAK
  1464. #define YY_BREAK break;
  1465. #endif
  1466.  
  1467. #define YY_RULE_SETUP \
  1468.     if ( yyleng > 0 ) \
  1469.         yy_current_buffer->yy_at_bol = \
  1470.                 (yytext[yyleng - 1] == '\n'); \
  1471.     YY_USER_ACTION
  1472.  
  1473. YY_DECL
  1474.     {
  1475.     register yy_state_type yy_current_state;
  1476.     register char *yy_cp, *yy_bp;
  1477.     register int yy_act;
  1478.  
  1479. #line 127 "ffscan.l"
  1480.  
  1481. #line 1482 "lex.yy.c"
  1482.  
  1483.     if ( yy_init )
  1484.         {
  1485.         yy_init = 0;
  1486.  
  1487. #ifdef YY_USER_INIT
  1488.         YY_USER_INIT;
  1489. #endif
  1490.  
  1491.         if ( ! yy_start )
  1492.             yy_start = 1;    /* first start state */
  1493.  
  1494.         if ( ! yyin )
  1495.             yyin = stdin;
  1496.  
  1497.         if ( ! yyout )
  1498.             yyout = stdout;
  1499.  
  1500.         if ( ! yy_current_buffer )
  1501.             yy_current_buffer =
  1502.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  1503.  
  1504.         yy_load_buffer_state();
  1505.         }
  1506.  
  1507.     while ( 1 )        /* loops until end-of-file is reached */
  1508.         {
  1509.         yy_cp = yy_c_buf_p;
  1510.  
  1511.         /* Support of yytext. */
  1512.         *yy_cp = yy_hold_char;
  1513.  
  1514.         /* yy_bp points to the position in yy_ch_buf of the start of
  1515.          * the current run.
  1516.          */
  1517.         yy_bp = yy_cp;
  1518.  
  1519.         yy_current_state = yy_start;
  1520.         yy_current_state += YY_AT_BOL();
  1521.         yy_state_ptr = yy_state_buf;
  1522.         *yy_state_ptr++ = yy_current_state;
  1523. yy_match:
  1524.         do
  1525.             {
  1526.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  1527.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1528.                 {
  1529.                 yy_current_state = (int) yy_def[yy_current_state];
  1530.                 if ( yy_current_state >= 592 )
  1531.                     yy_c = yy_meta[(unsigned int) yy_c];
  1532.                 }
  1533.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1534.             *yy_state_ptr++ = yy_current_state;
  1535.             ++yy_cp;
  1536.             }
  1537.         while ( yy_base[yy_current_state] != 2422 );
  1538.  
  1539. yy_find_action:
  1540.         yy_current_state = *--yy_state_ptr;
  1541.         yy_lp = yy_accept[yy_current_state];
  1542. find_rule: /* we branch to this label when backing up */
  1543.         for ( ; ; ) /* until we find what rule we matched */
  1544.             {
  1545.             if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
  1546.                 {
  1547.                 yy_act = yy_acclist[yy_lp];
  1548.                     {
  1549.                     yy_full_match = yy_cp;
  1550.                     break;
  1551.                     }
  1552.                 }
  1553.             --yy_cp;
  1554.             yy_current_state = *--yy_state_ptr;
  1555.             yy_lp = yy_accept[yy_current_state];
  1556.             }
  1557.  
  1558.         YY_DO_BEFORE_ACTION;
  1559.  
  1560.         if ( yy_act != YY_END_OF_BUFFER )
  1561.             {
  1562.             int yyl;
  1563.             for ( yyl = 0; yyl < yyleng; ++yyl )
  1564.                 if ( yytext[yyl] == '\n' )
  1565.                     ++yylineno;
  1566.             }
  1567.  
  1568. do_action:    /* This label is used only to access EOF actions. */
  1569.  
  1570.  
  1571.         switch ( yy_act )
  1572.     { /* beginning of action switch */
  1573. case 1:
  1574. YY_RULE_SETUP
  1575. #line 128 "ffscan.l"
  1576. ; /* eat up comments entirely */  
  1577.     YY_BREAK
  1578. case 2:
  1579. YY_RULE_SETUP
  1580. #line 129 "ffscan.l"
  1581. {
  1582.             action = ADDFUNC; 
  1583.             Type   = PROGRAM;
  1584.             BEGIN FNAME;
  1585.         }  
  1586.     YY_BREAK
  1587. case 3:
  1588. YY_RULE_SETUP
  1589. #line 134 "ffscan.l"
  1590. {
  1591.             numfunc++;
  1592.             action = ADDFUNC; 
  1593.             Type   = FUNCTION; 
  1594.             BEGIN FNAME;
  1595.         }  
  1596.     YY_BREAK
  1597. case 4:
  1598. YY_RULE_SETUP
  1599. #line 140 "ffscan.l"
  1600. {
  1601.             numroutine++;
  1602.             action = ADDFUNC; 
  1603.             Type   = SUBROUTINE; 
  1604.             BEGIN FNAME;
  1605.         } 
  1606.     YY_BREAK
  1607. case 5:
  1608. YY_RULE_SETUP
  1609. #line 146 "ffscan.l"
  1610. {
  1611.             numcall++;
  1612.             action = ADDCALL; 
  1613.             Type   = UNKNOWN; 
  1614.             BEGIN FNAME;
  1615.         } 
  1616.     YY_BREAK
  1617. case 6:
  1618. #line 153 "ffscan.l"
  1619. case 7:
  1620. #line 154 "ffscan.l"
  1621. case 8:
  1622. YY_RULE_SETUP
  1623. #line 154 "ffscan.l"
  1624. {
  1625.             count_args(yytext);
  1626.             BEGIN 0;
  1627.         }  
  1628.     YY_BREAK
  1629. case 9:
  1630. YY_RULE_SETUP
  1631. #line 158 "ffscan.l"
  1632. BEGIN 0;
  1633.     YY_BREAK
  1634. case 10:
  1635. YY_RULE_SETUP
  1636. #line 159 "ffscan.l"
  1637. ; /* do nothing  for all other remaining chars */
  1638.     YY_BREAK
  1639. case 11:
  1640. YY_RULE_SETUP
  1641. #line 160 "ffscan.l"
  1642. ECHO;
  1643.     YY_BREAK
  1644. #line 1645 "lex.yy.c"
  1645.             case YY_STATE_EOF(INITIAL):
  1646.             case YY_STATE_EOF(FNAME):
  1647.                 yyterminate();
  1648.  
  1649.     case YY_END_OF_BUFFER:
  1650.         {
  1651.         /* Amount of text matched not including the EOB char. */
  1652.         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  1653.  
  1654.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  1655.         *yy_cp = yy_hold_char;
  1656.  
  1657.         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  1658.             {
  1659.             /* We're scanning a new file or input source.  It's
  1660.              * possible that this happened because the user
  1661.              * just pointed yyin at a new source and called
  1662.              * yylex().  If so, then we have to assure
  1663.              * consistency between yy_current_buffer and our
  1664.              * globals.  Here is the right place to do so, because
  1665.              * this is the first action (other than possibly a
  1666.              * back-up) that will match for the new input source.
  1667.              */
  1668.             yy_n_chars = yy_current_buffer->yy_n_chars;
  1669.             yy_current_buffer->yy_input_file = yyin;
  1670.             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  1671.             }
  1672.  
  1673.         /* Note that here we test for yy_c_buf_p "<=" to the position
  1674.          * of the first EOB in the buffer, since yy_c_buf_p will
  1675.          * already have been incremented past the NUL character
  1676.          * (since all states make transitions on EOB to the
  1677.          * end-of-buffer state).  Contrast this with the test
  1678.          * in input().
  1679.          */
  1680.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1681.             { /* This was really a NUL. */
  1682.             yy_state_type yy_next_state;
  1683.  
  1684.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  1685.  
  1686.             yy_current_state = yy_get_previous_state();
  1687.  
  1688.             /* Okay, we're now positioned to make the NUL
  1689.              * transition.  We couldn't have
  1690.              * yy_get_previous_state() go ahead and do it
  1691.              * for us because it doesn't know how to deal
  1692.              * with the possibility of jamming (and we don't
  1693.              * want to build jamming into it because then it
  1694.              * will run more slowly).
  1695.              */
  1696.  
  1697.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  1698.  
  1699.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  1700.  
  1701.             if ( yy_next_state )
  1702.                 {
  1703.                 /* Consume the NUL. */
  1704.                 yy_cp = ++yy_c_buf_p;
  1705.                 yy_current_state = yy_next_state;
  1706.                 goto yy_match;
  1707.                 }
  1708.  
  1709.             else
  1710.                 {
  1711.                 yy_cp = yy_c_buf_p;
  1712.                 goto yy_find_action;
  1713.                 }
  1714.             }
  1715.  
  1716.         else switch ( yy_get_next_buffer() )
  1717.             {
  1718.             case EOB_ACT_END_OF_FILE:
  1719.                 {
  1720.                 yy_did_buffer_switch_on_eof = 0;
  1721.  
  1722.                 if ( yywrap() )
  1723.                     {
  1724.                     /* Note: because we've taken care in
  1725.                      * yy_get_next_buffer() to have set up
  1726.                      * yytext, we can now set up
  1727.                      * yy_c_buf_p so that if some total
  1728.                      * hoser (like flex itself) wants to
  1729.                      * call the scanner after we return the
  1730.                      * YY_NULL, it'll still work - another
  1731.                      * YY_NULL will get returned.
  1732.                      */
  1733.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1734.  
  1735.                     yy_act = YY_STATE_EOF(YY_START);
  1736.                     goto do_action;
  1737.                     }
  1738.  
  1739.                 else
  1740.                     {
  1741.                     if ( ! yy_did_buffer_switch_on_eof )
  1742.                         YY_NEW_FILE;
  1743.                     }
  1744.                 break;
  1745.                 }
  1746.  
  1747.             case EOB_ACT_CONTINUE_SCAN:
  1748.                 yy_c_buf_p =
  1749.                     yytext_ptr + yy_amount_of_matched_text;
  1750.  
  1751.                 yy_current_state = yy_get_previous_state();
  1752.  
  1753.                 yy_cp = yy_c_buf_p;
  1754.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  1755.                 goto yy_match;
  1756.  
  1757.             case EOB_ACT_LAST_MATCH:
  1758.                 yy_c_buf_p =
  1759.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  1760.  
  1761.                 yy_current_state = yy_get_previous_state();
  1762.  
  1763.                 yy_cp = yy_c_buf_p;
  1764.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  1765.                 goto yy_find_action;
  1766.             }
  1767.         break;
  1768.         }
  1769.  
  1770.     default:
  1771.         YY_FATAL_ERROR(
  1772.             "fatal flex scanner internal error--no action found" );
  1773.     } /* end of action switch */
  1774.         } /* end of scanning one token */
  1775.     } /* end of yylex */
  1776.  
  1777.  
  1778. /* yy_get_next_buffer - try to read in a new buffer
  1779.  *
  1780.  * Returns a code representing an action:
  1781.  *    EOB_ACT_LAST_MATCH -
  1782.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1783.  *    EOB_ACT_END_OF_FILE - end of file
  1784.  */
  1785.  
  1786. static int yy_get_next_buffer()
  1787.     {
  1788.     register char *dest = yy_current_buffer->yy_ch_buf;
  1789.     register char *source = yytext_ptr;
  1790.     register int number_to_move, i;
  1791.     int ret_val;
  1792.  
  1793.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  1794.         YY_FATAL_ERROR(
  1795.         "fatal flex scanner internal error--end of buffer missed" );
  1796.  
  1797.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  1798.         { /* Don't try to fill the buffer, so this is an EOF. */
  1799.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  1800.             {
  1801.             /* We matched a singled characater, the EOB, so
  1802.              * treat this as a final EOF.
  1803.              */
  1804.             return EOB_ACT_END_OF_FILE;
  1805.             }
  1806.  
  1807.         else
  1808.             {
  1809.             /* We matched some text prior to the EOB, first
  1810.              * process it.
  1811.              */
  1812.             return EOB_ACT_LAST_MATCH;
  1813.             }
  1814.         }
  1815.  
  1816.     /* Try to read more data. */
  1817.  
  1818.     /* First move last chars to start of buffer. */
  1819.     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  1820.  
  1821.     for ( i = 0; i < number_to_move; ++i )
  1822.         *(dest++) = *(source++);
  1823.  
  1824.     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1825.         /* don't do the read, it's not guaranteed to return an EOF,
  1826.          * just force an EOF
  1827.          */
  1828.         yy_n_chars = 0;
  1829.  
  1830.     else
  1831.         {
  1832.         int num_to_read =
  1833.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  1834.  
  1835.         while ( num_to_read <= 0 )
  1836.             { /* Not enough room in the buffer - grow it. */
  1837. #ifdef YY_USES_REJECT
  1838.             YY_FATAL_ERROR(
  1839. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  1840. #else
  1841.  
  1842.             /* just a shorter name for the current buffer */
  1843.             YY_BUFFER_STATE b = yy_current_buffer;
  1844.  
  1845.             int yy_c_buf_p_offset =
  1846.                 (int) (yy_c_buf_p - b->yy_ch_buf);
  1847.  
  1848.             if ( b->yy_is_our_buffer )
  1849.                 {
  1850.                 int new_size = b->yy_buf_size * 2;
  1851.  
  1852.                 if ( new_size <= 0 )
  1853.                     b->yy_buf_size += b->yy_buf_size / 8;
  1854.                 else
  1855.                     b->yy_buf_size *= 2;
  1856.  
  1857.                 b->yy_ch_buf = (char *)
  1858.                     /* Include room in for 2 EOB chars. */
  1859.                     yy_flex_realloc( (void *) b->yy_ch_buf,
  1860.                              b->yy_buf_size + 2 );
  1861.                 }
  1862.             else
  1863.                 /* Can't grow it, we don't own it. */
  1864.                 b->yy_ch_buf = 0;
  1865.  
  1866.             if ( ! b->yy_ch_buf )
  1867.                 YY_FATAL_ERROR(
  1868.                 "fatal error - scanner input buffer overflow" );
  1869.  
  1870.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1871.  
  1872.             num_to_read = yy_current_buffer->yy_buf_size -
  1873.                         number_to_move - 1;
  1874. #endif
  1875.             }
  1876.  
  1877.         if ( num_to_read > YY_READ_BUF_SIZE )
  1878.             num_to_read = YY_READ_BUF_SIZE;
  1879.  
  1880.         /* Read in more data. */
  1881.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1882.             yy_n_chars, num_to_read );
  1883.         }
  1884.  
  1885.     if ( yy_n_chars == 0 )
  1886.         {
  1887.         if ( number_to_move == YY_MORE_ADJ )
  1888.             {
  1889.             ret_val = EOB_ACT_END_OF_FILE;
  1890.             yyrestart( yyin );
  1891.             }
  1892.  
  1893.         else
  1894.             {
  1895.             ret_val = EOB_ACT_LAST_MATCH;
  1896.             yy_current_buffer->yy_buffer_status =
  1897.                 YY_BUFFER_EOF_PENDING;
  1898.             }
  1899.         }
  1900.  
  1901.     else
  1902.         ret_val = EOB_ACT_CONTINUE_SCAN;
  1903.  
  1904.     yy_n_chars += number_to_move;
  1905.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1906.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1907.  
  1908.     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  1909.  
  1910.     return ret_val;
  1911.     }
  1912.  
  1913.  
  1914. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1915.  
  1916. static yy_state_type yy_get_previous_state()
  1917.     {
  1918.     register yy_state_type yy_current_state;
  1919.     register char *yy_cp;
  1920.  
  1921.     yy_current_state = yy_start;
  1922.     yy_current_state += YY_AT_BOL();
  1923.     yy_state_ptr = yy_state_buf;
  1924.     *yy_state_ptr++ = yy_current_state;
  1925.  
  1926.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1927.         {
  1928.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1929.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1930.             {
  1931.             yy_current_state = (int) yy_def[yy_current_state];
  1932.             if ( yy_current_state >= 592 )
  1933.                 yy_c = yy_meta[(unsigned int) yy_c];
  1934.             }
  1935.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1936.         *yy_state_ptr++ = yy_current_state;
  1937.         }
  1938.  
  1939.     return yy_current_state;
  1940.     }
  1941.  
  1942.  
  1943. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1944.  *
  1945.  * synopsis
  1946.  *    next_state = yy_try_NUL_trans( current_state );
  1947.  */
  1948.  
  1949. #ifdef YY_USE_PROTOS
  1950. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  1951. #else
  1952. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1953. yy_state_type yy_current_state;
  1954. #endif
  1955.     {
  1956.     register int yy_is_jam;
  1957.  
  1958.     register YY_CHAR yy_c = 1;
  1959.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1960.         {
  1961.         yy_current_state = (int) yy_def[yy_current_state];
  1962.         if ( yy_current_state >= 592 )
  1963.             yy_c = yy_meta[(unsigned int) yy_c];
  1964.         }
  1965.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1966.     *yy_state_ptr++ = yy_current_state;
  1967.     yy_is_jam = (yy_current_state == 591);
  1968.  
  1969.     return yy_is_jam ? 0 : yy_current_state;
  1970.     }
  1971.  
  1972.  
  1973. #ifndef YY_NO_UNPUT
  1974. #ifdef YY_USE_PROTOS
  1975. static void yyunput( int c, register char *yy_bp )
  1976. #else
  1977. static void yyunput( c, yy_bp )
  1978. int c;
  1979. register char *yy_bp;
  1980. #endif
  1981.     {
  1982.     register char *yy_cp = yy_c_buf_p;
  1983.  
  1984.     /* undo effects of setting up yytext */
  1985.     *yy_cp = yy_hold_char;
  1986.  
  1987.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1988.         { /* need to shift things up to make room */
  1989.         /* +2 for EOB chars. */
  1990.         register int number_to_move = yy_n_chars + 2;
  1991.         register char *dest = &yy_current_buffer->yy_ch_buf[
  1992.                     yy_current_buffer->yy_buf_size + 2];
  1993.         register char *source =
  1994.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  1995.  
  1996.         while ( source > yy_current_buffer->yy_ch_buf )
  1997.             *--dest = *--source;
  1998.  
  1999.         yy_cp += (int) (dest - source);
  2000.         yy_bp += (int) (dest - source);
  2001.         yy_n_chars = yy_current_buffer->yy_buf_size;
  2002.  
  2003.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  2004.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  2005.         }
  2006.  
  2007.     *--yy_cp = (char) c;
  2008.  
  2009.     if ( c == '\n' )
  2010.         --yylineno;
  2011.  
  2012.     yytext_ptr = yy_bp;
  2013.     yy_hold_char = *yy_cp;
  2014.     yy_c_buf_p = yy_cp;
  2015.     }
  2016. #endif    /* ifndef YY_NO_UNPUT */
  2017.  
  2018.  
  2019. #ifdef __cplusplus
  2020. static int yyinput()
  2021. #else
  2022. static int input()
  2023. #endif
  2024.     {
  2025.     int c;
  2026.  
  2027.     *yy_c_buf_p = yy_hold_char;
  2028.  
  2029.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  2030.         {
  2031.         /* yy_c_buf_p now points to the character we want to return.
  2032.          * If this occurs *before* the EOB characters, then it's a
  2033.          * valid NUL; if not, then we've hit the end of the buffer.
  2034.          */
  2035.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  2036.             /* This was really a NUL. */
  2037.             *yy_c_buf_p = '\0';
  2038.  
  2039.         else
  2040.             { /* need more input */
  2041.             yytext_ptr = yy_c_buf_p;
  2042.             ++yy_c_buf_p;
  2043.  
  2044.             switch ( yy_get_next_buffer() )
  2045.                 {
  2046.                 case EOB_ACT_END_OF_FILE:
  2047.                     {
  2048.                     if ( yywrap() )
  2049.                         {
  2050.                         yy_c_buf_p =
  2051.                         yytext_ptr + YY_MORE_ADJ;
  2052.                         return EOF;
  2053.                         }
  2054.  
  2055.                     if ( ! yy_did_buffer_switch_on_eof )
  2056.                         YY_NEW_FILE;
  2057. #ifdef __cplusplus
  2058.                     return yyinput();
  2059. #else
  2060.                     return input();
  2061. #endif
  2062.                     }
  2063.  
  2064.                 case EOB_ACT_CONTINUE_SCAN:
  2065.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  2066.                     break;
  2067.  
  2068.                 case EOB_ACT_LAST_MATCH:
  2069. #ifdef __cplusplus
  2070.                     YY_FATAL_ERROR(
  2071.                     "unexpected last match in yyinput()" );
  2072. #else
  2073.                     YY_FATAL_ERROR(
  2074.                     "unexpected last match in input()" );
  2075. #endif
  2076.                 }
  2077.             }
  2078.         }
  2079.  
  2080.     c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */
  2081.     *yy_c_buf_p = '\0';    /* preserve yytext */
  2082.     yy_hold_char = *++yy_c_buf_p;
  2083.  
  2084.     yy_current_buffer->yy_at_bol = (c == '\n');
  2085.     if ( yy_current_buffer->yy_at_bol )
  2086.         ++yylineno;
  2087.  
  2088.     return c;
  2089.     }
  2090.  
  2091.  
  2092. #ifdef YY_USE_PROTOS
  2093. void yyrestart( FILE *input_file )
  2094. #else
  2095. void yyrestart( input_file )
  2096. FILE *input_file;
  2097. #endif
  2098.     {
  2099.     if ( ! yy_current_buffer )
  2100.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  2101.  
  2102.     yy_init_buffer( yy_current_buffer, input_file );
  2103.     yy_load_buffer_state();
  2104.     }
  2105.  
  2106.  
  2107. #ifdef YY_USE_PROTOS
  2108. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  2109. #else
  2110. void yy_switch_to_buffer( new_buffer )
  2111. YY_BUFFER_STATE new_buffer;
  2112. #endif
  2113.     {
  2114.     if ( yy_current_buffer == new_buffer )
  2115.         return;
  2116.  
  2117.     if ( yy_current_buffer )
  2118.         {
  2119.         /* Flush out information for old buffer. */
  2120.         *yy_c_buf_p = yy_hold_char;
  2121.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  2122.         yy_current_buffer->yy_n_chars = yy_n_chars;
  2123.         }
  2124.  
  2125.     yy_current_buffer = new_buffer;
  2126.     yy_load_buffer_state();
  2127.  
  2128.     /* We don't actually know whether we did this switch during
  2129.      * EOF (yywrap()) processing, but the only time this flag
  2130.      * is looked at is after yywrap() is called, so it's safe
  2131.      * to go ahead and always set it.
  2132.      */
  2133.     yy_did_buffer_switch_on_eof = 1;
  2134.     }
  2135.  
  2136.  
  2137. #ifdef YY_USE_PROTOS
  2138. void yy_load_buffer_state( void )
  2139. #else
  2140. void yy_load_buffer_state()
  2141. #endif
  2142.     {
  2143.     yy_n_chars = yy_current_buffer->yy_n_chars;
  2144.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  2145.     yyin = yy_current_buffer->yy_input_file;
  2146.     yy_hold_char = *yy_c_buf_p;
  2147.     }
  2148.  
  2149.  
  2150. #ifdef YY_USE_PROTOS
  2151. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  2152. #else
  2153. YY_BUFFER_STATE yy_create_buffer( file, size )
  2154. FILE *file;
  2155. int size;
  2156. #endif
  2157.     {
  2158.     YY_BUFFER_STATE b;
  2159.  
  2160.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  2161.     if ( ! b )
  2162.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  2163.  
  2164.     b->yy_buf_size = size;
  2165.  
  2166.     /* yy_ch_buf has to be 2 characters longer than the size given because
  2167.      * we need to put in 2 end-of-buffer characters.
  2168.      */
  2169.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  2170.     if ( ! b->yy_ch_buf )
  2171.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  2172.  
  2173.     b->yy_is_our_buffer = 1;
  2174.  
  2175.     yy_init_buffer( b, file );
  2176.  
  2177.     return b;
  2178.     }
  2179.  
  2180.  
  2181. #ifdef YY_USE_PROTOS
  2182. void yy_delete_buffer( YY_BUFFER_STATE b )
  2183. #else
  2184. void yy_delete_buffer( b )
  2185. YY_BUFFER_STATE b;
  2186. #endif
  2187.     {
  2188.     if ( ! b )
  2189.         return;
  2190.  
  2191.     if ( b == yy_current_buffer )
  2192.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  2193.  
  2194.     if ( b->yy_is_our_buffer )
  2195.         yy_flex_free( (void *) b->yy_ch_buf );
  2196.  
  2197.     yy_flex_free( (void *) b );
  2198.     }
  2199.  
  2200.  
  2201. #ifndef YY_ALWAYS_INTERACTIVE
  2202. #ifndef YY_NEVER_INTERACTIVE
  2203. extern int isatty YY_PROTO(( int ));
  2204. #endif
  2205. #endif
  2206.  
  2207. #ifdef YY_USE_PROTOS
  2208. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  2209. #else
  2210. void yy_init_buffer( b, file )
  2211. YY_BUFFER_STATE b;
  2212. FILE *file;
  2213. #endif
  2214.  
  2215.  
  2216.     {
  2217.     yy_flush_buffer( b );
  2218.  
  2219.     b->yy_input_file = file;
  2220.     b->yy_fill_buffer = 1;
  2221.  
  2222. #if YY_ALWAYS_INTERACTIVE
  2223.     b->yy_is_interactive = 1;
  2224. #else
  2225. #if YY_NEVER_INTERACTIVE
  2226.     b->yy_is_interactive = 0;
  2227. #else
  2228.     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  2229. #endif
  2230. #endif
  2231.     }
  2232.  
  2233.  
  2234. #ifdef YY_USE_PROTOS
  2235. void yy_flush_buffer( YY_BUFFER_STATE b )
  2236. #else
  2237. void yy_flush_buffer( b )
  2238. YY_BUFFER_STATE b;
  2239. #endif
  2240.  
  2241.     {
  2242.     b->yy_n_chars = 0;
  2243.  
  2244.     /* We always need two end-of-buffer characters.  The first causes
  2245.      * a transition to the end-of-buffer state.  The second causes
  2246.      * a jam in that state.
  2247.      */
  2248.     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  2249.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  2250.  
  2251.     b->yy_buf_pos = &b->yy_ch_buf[0];
  2252.  
  2253.     b->yy_at_bol = 1;
  2254.     b->yy_buffer_status = YY_BUFFER_NEW;
  2255.  
  2256.     if ( b == yy_current_buffer )
  2257.         yy_load_buffer_state();
  2258.     }
  2259.  
  2260.  
  2261. #ifndef YY_NO_SCAN_BUFFER
  2262. #ifdef YY_USE_PROTOS
  2263. YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
  2264. #else
  2265. YY_BUFFER_STATE yy_scan_buffer( base, size )
  2266. char *base;
  2267. yy_size_t size;
  2268. #endif
  2269.     {
  2270.     YY_BUFFER_STATE b;
  2271.  
  2272.     if ( size < 2 ||
  2273.          base[size-2] != YY_END_OF_BUFFER_CHAR ||
  2274.          base[size-1] != YY_END_OF_BUFFER_CHAR )
  2275.         /* They forgot to leave room for the EOB's. */
  2276.         return 0;
  2277.  
  2278.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  2279.     if ( ! b )
  2280.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  2281.  
  2282.     b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
  2283.     b->yy_buf_pos = b->yy_ch_buf = base;
  2284.     b->yy_is_our_buffer = 0;
  2285.     b->yy_input_file = 0;
  2286.     b->yy_n_chars = b->yy_buf_size;
  2287.     b->yy_is_interactive = 0;
  2288.     b->yy_at_bol = 1;
  2289.     b->yy_fill_buffer = 0;
  2290.     b->yy_buffer_status = YY_BUFFER_NEW;
  2291.  
  2292.     yy_switch_to_buffer( b );
  2293.  
  2294.     return b;
  2295.     }
  2296. #endif
  2297.  
  2298.  
  2299. #ifndef YY_NO_SCAN_STRING
  2300. #ifdef YY_USE_PROTOS
  2301. YY_BUFFER_STATE yy_scan_string( yyconst char *str )
  2302. #else
  2303. YY_BUFFER_STATE yy_scan_string( str )
  2304. yyconst char *str;
  2305. #endif
  2306.     {
  2307.     int len;
  2308.     for ( len = 0; str[len]; ++len )
  2309.         ;
  2310.  
  2311.     return yy_scan_bytes( str, len );
  2312.     }
  2313. #endif
  2314.  
  2315.  
  2316. #ifndef YY_NO_SCAN_BYTES
  2317. #ifdef YY_USE_PROTOS
  2318. YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
  2319. #else
  2320. YY_BUFFER_STATE yy_scan_bytes( bytes, len )
  2321. yyconst char *bytes;
  2322. int len;
  2323. #endif
  2324.     {
  2325.     YY_BUFFER_STATE b;
  2326.     char *buf;
  2327.     yy_size_t n;
  2328.     int i;
  2329.  
  2330.     /* Get memory for full buffer, including space for trailing EOB's. */
  2331.     n = len + 2;
  2332.     buf = (char *) yy_flex_alloc( n );
  2333.     if ( ! buf )
  2334.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  2335.  
  2336.     for ( i = 0; i < len; ++i )
  2337.         buf[i] = bytes[i];
  2338.  
  2339.     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  2340.  
  2341.     b = yy_scan_buffer( buf, n );
  2342.     if ( ! b )
  2343.         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  2344.  
  2345.     /* It's okay to grow etc. this buffer, and we should throw it
  2346.      * away when we're done.
  2347.      */
  2348.     b->yy_is_our_buffer = 1;
  2349.  
  2350.     return b;
  2351.     }
  2352. #endif
  2353.  
  2354.  
  2355. #ifndef YY_NO_PUSH_STATE
  2356. #ifdef YY_USE_PROTOS
  2357. static void yy_push_state( int new_state )
  2358. #else
  2359. static void yy_push_state( new_state )
  2360. int new_state;
  2361. #endif
  2362.     {
  2363.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  2364.         {
  2365.         yy_size_t new_size;
  2366.  
  2367.         yy_start_stack_depth += YY_START_STACK_INCR;
  2368.         new_size = yy_start_stack_depth * sizeof( int );
  2369.  
  2370.         if ( ! yy_start_stack )
  2371.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  2372.  
  2373.         else
  2374.             yy_start_stack = (int *) yy_flex_realloc(
  2375.                     (void *) yy_start_stack, new_size );
  2376.  
  2377.         if ( ! yy_start_stack )
  2378.             YY_FATAL_ERROR(
  2379.             "out of memory expanding start-condition stack" );
  2380.         }
  2381.  
  2382.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  2383.  
  2384.     BEGIN(new_state);
  2385.     }
  2386. #endif
  2387.  
  2388.  
  2389. #ifndef YY_NO_POP_STATE
  2390. static void yy_pop_state()
  2391.     {
  2392.     if ( --yy_start_stack_ptr < 0 )
  2393.         YY_FATAL_ERROR( "start-condition stack underflow" );
  2394.  
  2395.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  2396.     }
  2397. #endif
  2398.  
  2399.  
  2400. #ifndef YY_NO_TOP_STATE
  2401. static int yy_top_state()
  2402.     {
  2403.     return yy_start_stack[yy_start_stack_ptr - 1];
  2404.     }
  2405. #endif
  2406.  
  2407. #ifndef YY_EXIT_FAILURE
  2408. #define YY_EXIT_FAILURE 2
  2409. #endif
  2410.  
  2411. #ifdef YY_USE_PROTOS
  2412. static void yy_fatal_error( yyconst char msg[] )
  2413. #else
  2414. static void yy_fatal_error( msg )
  2415. char msg[];
  2416. #endif
  2417.     {
  2418.     (void) fprintf( stderr, "%s\n", msg );
  2419.     exit( YY_EXIT_FAILURE );
  2420.     }
  2421.  
  2422.  
  2423.  
  2424. /* Redefine yyless() so it works in section 3 code. */
  2425.  
  2426. #undef yyless
  2427. #define yyless(n) \
  2428.     do \
  2429.         { \
  2430.         /* Undo effects of setting up yytext. */ \
  2431.         yytext[yyleng] = yy_hold_char; \
  2432.         yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
  2433.         yy_hold_char = *yy_c_buf_p; \
  2434.         *yy_c_buf_p = '\0'; \
  2435.         yyleng = n; \
  2436.         } \
  2437.     while ( 0 )
  2438.  
  2439.  
  2440. /* Internal utility routines. */
  2441.  
  2442. #ifndef yytext_ptr
  2443. #ifdef YY_USE_PROTOS
  2444. static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
  2445. #else
  2446. static void yy_flex_strncpy( s1, s2, n )
  2447. char *s1;
  2448. yyconst char *s2;
  2449. int n;
  2450. #endif
  2451.     {
  2452.     register int i;
  2453.     for ( i = 0; i < n; ++i )
  2454.         s1[i] = s2[i];
  2455.     }
  2456. #endif
  2457.  
  2458.  
  2459. #ifdef YY_USE_PROTOS
  2460. static void *yy_flex_alloc( yy_size_t size )
  2461. #else
  2462. static void *yy_flex_alloc( size )
  2463. yy_size_t size;
  2464. #endif
  2465.     {
  2466.     return (void *) malloc( size );
  2467.     }
  2468.  
  2469. #ifdef YY_USE_PROTOS
  2470. static void *yy_flex_realloc( void *ptr, yy_size_t size )
  2471. #else
  2472. static void *yy_flex_realloc( ptr, size )
  2473. void *ptr;
  2474. yy_size_t size;
  2475. #endif
  2476.     {
  2477.     /* The cast to (char *) in the following accommodates both
  2478.      * implementations that use char* generic pointers, and those
  2479.      * that use void* generic pointers.  It works with the latter
  2480.      * because both ANSI C and C++ allow castless assignment from
  2481.      * any pointer type to void*, and deal with argument conversions
  2482.      * as though doing an assignment.
  2483.      */
  2484.     return (void *) realloc( (char *) ptr, size );
  2485.     }
  2486.  
  2487. #ifdef YY_USE_PROTOS
  2488. static void yy_flex_free( void *ptr )
  2489. #else
  2490. static void yy_flex_free( ptr )
  2491. void *ptr;
  2492. #endif
  2493.     {
  2494.     free( ptr );
  2495.     }
  2496.  
  2497. #if YY_MAIN
  2498. int main()
  2499.     {
  2500.     yylex();
  2501.     return 0;
  2502.     }
  2503. #endif
  2504. #line 160 "ffscan.l"
  2505.  
  2506.  
  2507. /*****
  2508. * Count all arguments in the given text
  2509. *****/
  2510. static inline void
  2511. count_args(char *text)
  2512. {
  2513.     char *string = text;
  2514.     char func_name[64];
  2515.     char *args = NULL;
  2516.     int brace = 0, num_args = 0, num_line = 0, at_bol = 0;
  2517.  
  2518.     /* get function name */
  2519.     for(;*string !='\0' && *string != '(' && *string != '\n' && 
  2520.         !isspace(*string) ; string++);
  2521.  
  2522.     /* do not overflow name space */
  2523.     strncpy(func_name, text, string - text > 64 ? 64 : string - text);
  2524.  
  2525.     /* null-terminate */
  2526.     func_name[string-text] = '\0';
  2527.     /* only if we have to be very verbose */
  2528.     if(verbose > 2)
  2529.     {    
  2530.         char *chPtr;
  2531.         int i = 0;
  2532.         /* copy remaining args */
  2533.         checked_alloca(args, strlen(text), char);
  2534.         strncpy(args, string, strlen(string));
  2535.         args[strlen(string)] = '\0';
  2536.         printf("-------------------\n");
  2537.         /* 
  2538.         * print out the text preceeded with line numbers. 
  2539.         * This slows things seriously down!
  2540.         */
  2541.         printf("line %i, text scanned:\n", yylineno);
  2542.         printf("%i: ", i);
  2543.         for(chPtr = text; *chPtr != '\0'; chPtr++)
  2544.         {
  2545.             putc(*chPtr, stdout);
  2546.             if(*chPtr == '\n' && *(chPtr+1)!='\0')
  2547.                 printf("%i:", ++i);
  2548.         }
  2549.         putc('\n', stdout);
  2550.     }
  2551.     while(*string)
  2552.     {
  2553.         switch(*string)
  2554.         {
  2555.             case '(':     /* initialize argcount. */
  2556.                 if(num_args == 0)
  2557.                     num_args++;
  2558.                 brace++;
  2559.                 break;
  2560.             case ')':
  2561.                 brace--;
  2562.                 break;
  2563.             case '*': /* eat up comments entirely */
  2564.             case 'c':
  2565.             case 'C':
  2566.                 if(at_bol)
  2567.                 {
  2568.                     if(verbose > 2)
  2569.                         printf("Rejecting comment on "
  2570.                             "line %i\n", num_line); 
  2571.                     while(*string != '\0' && 
  2572.                         *string != '\n')
  2573.                         string++;
  2574.                     at_bol = 0;
  2575.                 }
  2576.                 break;
  2577.             case '\'':
  2578.                 string++;
  2579.                 while(*string != '\0' && *string != '\'')
  2580.                 {
  2581.                     if(*string == '\n')
  2582.                         num_line++;
  2583.                     string++;
  2584.                 }
  2585.                 break;
  2586.             case ',':     /* only when single left brace open*/
  2587.                 if(brace == 1)    
  2588.                     num_args++;
  2589.                 break;
  2590.         }
  2591.         if(*string == '\0')
  2592.             break;
  2593.         at_bol = 0;
  2594.         if(*string == '\n')
  2595.         {
  2596.             num_line++;
  2597.             at_bol = 1;
  2598.         }
  2599.         string++;
  2600.     }
  2601.     /* only if we have to be very verbose */
  2602.     if(verbose > 2)
  2603.     {
  2604.         if(action == ADDFUNC)
  2605.             printf("routine name is %s\nargs are: %s", func_name,
  2606.                 num_args == 0 ? "<none>\n":args);
  2607.         if(action == ADDCALL)
  2608.             printf("call made: %s\nargs supplied are: %s",
  2609.                 func_name, num_args == 0 ? "<none>\n":args);
  2610.         printf("brace count: %i\nargcount: %i\n", brace, num_args);
  2611.         printf("-------------------\n");
  2612.         fflush(stdout);
  2613.     }
  2614.     /* 19 continuation lines allowed by f77 standard */
  2615.     if(num_line > 18)    
  2616.     {
  2617.             fprintf(stderr, "WARNING: more than 19 continuation "
  2618.                 "lines ");
  2619.             if(Type == ADDFUNC)
  2620.                 fprintf(stderr, "in routine %s.\n", func_name); 
  2621.             else
  2622.                 fprintf(stderr, "in call to %s.\n", func_name);
  2623.             fprintf(stderr,"near line %i in file %s%s\n", yylineno, 
  2624.                 curr_path, curr_file);
  2625.     }
  2626.     if(brace != 0)
  2627.     {
  2628.         if(brace < 0)
  2629.             fprintf(stderr, "WARNING: unbalanced right brace ");
  2630.         else
  2631.             fprintf(stderr, "WARNING: unbalanced left brace ");
  2632.         fprintf(stderr, "on line %i of argument list ", num_line);
  2633.         if(Type == ADDFUNC)
  2634.             fprintf(stderr, "in routine %s.\n", func_name); 
  2635.         else
  2636.             fprintf(stderr, "in call to %s.\n", func_name);
  2637.         fprintf(stderr,"near line %i in file %s%s\n", yylineno, 
  2638.             curr_path, curr_file);
  2639.     }
  2640.     /*
  2641.     * Depending on the action taken,
  2642.     * add a new function to the flowgraph list or
  2643.     * add an entry for a call made in the current 
  2644.     * function
  2645.     */
  2646.     if(action == ADDFUNC)
  2647.         add_new_func(func_name, yylineno, curr_path, curr_file, 
  2648.             num_args);
  2649.     else
  2650.         add_new_call(func_name, yylineno, num_args);
  2651. }
  2652.  
  2653. /*****
  2654. * Perform argument check
  2655. *****/
  2656. static void
  2657. cross_check(FILE *file, flowInfo *list)
  2658. {
  2659.     flowInfo *curr_func, *call; 
  2660.     for(curr_func = list; curr_func != NULL; curr_func = curr_func->next) 
  2661.     {
  2662.         for(call = curr_func->calls; call != NULL; call = call->next)
  2663.         {
  2664.             if(call->parent && 
  2665.                 call->num_args != call->parent->num_args)
  2666.             {
  2667.                 num_diff++;
  2668.                 if(full_names)
  2669.                 {
  2670.                     fprintf(file, "---> %s called with %i "
  2671.                         "args\n", 
  2672.                         call->name, call->num_args);
  2673.                     fprintf(file, "near line %i of %s%s\n",
  2674.                         call->defline, curr_func->path,
  2675.                         curr_func->file);
  2676.                     fprintf(file, "Defined with %i args "
  2677.                         "near line %i in \n",
  2678.                         call->parent->num_args, 
  2679.                         call->parent->defline);
  2680.                     fprintf(file, "%s%s\n", 
  2681.                         call->parent->path, 
  2682.                         call->parent->file);
  2683.                 }
  2684.                 else
  2685.                 {
  2686.                     fprintf(file, "---> %s called with %i "
  2687.                         "args ", 
  2688.                         call->name, call->num_args);
  2689.                     fprintf(file, "near line %i of %s\n", 
  2690.                         call->defline, 
  2691.                         curr_func->file);
  2692.                     fprintf(file, "Defined with %i args ", 
  2693.                         call->parent->num_args);
  2694.                     fprintf(file, "near line %i in %s\n", 
  2695.                         call->parent->defline, 
  2696.                         call->parent->file);
  2697.                 }
  2698.             }
  2699.         }
  2700.     }
  2701. }
  2702.  
  2703. /*****
  2704. * Scan command line options
  2705. *****/
  2706. static int 
  2707. set_global_option(char *arg)
  2708.     switch(arg[0])
  2709.     {
  2710.         case 'f' :    /* use full names instead of filename only.*/
  2711.             full_names = 1 ;
  2712.             break;
  2713.         case 'h' :    /* help requested */
  2714.             printf(usage, progname); 
  2715.             exit(2); 
  2716.         case 'n' :    /* tell what subroutines are never invoked */
  2717.             never_invoked = 1;
  2718.             break;
  2719. #ifdef __MSDOS__
  2720.         case 'm' :    /* show memory usage under msdos */
  2721.             need_mem_info_for_msdos = 1;
  2722.             break;
  2723. #endif
  2724.         case 'q' :     /* be really quiet */
  2725.             quiet = 1; 
  2726.             verbose = 0; 
  2727.             break; 
  2728.         case 'v' :     /* be verbose */
  2729.             verbose++;
  2730.             break; 
  2731.         case 'E' :    /* an extension specification */
  2732.             SCAN_ARG("-E");
  2733.             if(num_extensions == MAXEXTS)
  2734.             {
  2735.                 fprintf(stderr, "Capacity exceeded, more than "
  2736.                     "%i extensions given on command line\n",
  2737.                     MAXEXTS);
  2738.                 fprintf(stderr,"Ignoring extension %s\n",arg+1);
  2739.             }
  2740.             else
  2741.             {
  2742.                 checked_malloc(ext_table[num_extensions], 
  2743.                     strlen(arg+1)+1, char);
  2744.                 strcpy(ext_table[num_extensions++], arg+1);
  2745. #ifdef __MSDOS__ /* dos returns uppercase when building a filelist */
  2746.                 upcase(ext_table[num_extensions-1]);
  2747. #endif
  2748.             }
  2749.             return(1); 
  2750.         case 'I' :    /* a directory specification */
  2751.             SCAN_ARG("-I");
  2752.             if(num_dirs_to_visit == MAXDIRS)
  2753.             {
  2754.                 fprintf(stderr,"Capacity exceeded, more than %i"
  2755.                     " directories given on command line\n",
  2756.                     MAXDIRS);
  2757.                 fprintf(stderr,"Ignoring directory %s\n",arg+1);
  2758.             }
  2759.             else
  2760.             {
  2761.                 checked_malloc(dirs_to_visit[num_dirs_to_visit],
  2762.                     strlen(arg+1)+1, char);
  2763.                 strcpy(dirs_to_visit[num_dirs_to_visit++], 
  2764.                     arg+1); 
  2765.             }
  2766.             return(1); 
  2767.         case 'o' :    /* name of the output file */
  2768.             SCAN_ARG("-o");
  2769.             outfile = arg + 1;
  2770.             return(1); 
  2771.         case 'x' :    /* ignore the given file */
  2772.             SCAN_ARG("-x");
  2773.             if(num_ignore == MAXIGNORE)
  2774.             {
  2775.                 fprintf(stderr, "Capacity exceeded, more than "
  2776.                     "%i ignores given on command line\n",
  2777.                     MAXIGNORE);
  2778.                 fprintf(stderr, "Ignoring option -x%s\n",arg+1);
  2779.             }
  2780.             else
  2781.             {
  2782.                 checked_malloc(ignore_list[num_ignore], 
  2783.                     strlen(arg+1)+1, char);
  2784.                 strcpy(ignore_list[num_ignore++], arg+1);
  2785. #ifdef __MSDOS__ /* dos returns uppercase when building a filelist */
  2786.                 upcase(ignore_list[num_ignore-1]);
  2787. #endif
  2788.             }
  2789.             return(1); 
  2790.         case '-' :            /* secondary options */
  2791.             if(!strcmp("help", arg+1))    /* help wanted */
  2792.             {
  2793.                 printf(usage, progname); 
  2794.                 exit(2); 
  2795.             }
  2796.             if(!strcmp("version", arg+1))    /* show version number*/
  2797.             {
  2798.                 print_version_id(progname, VERSION, "$Revision: 1.5 $");
  2799.                 exit(2);
  2800.             }        /* fall through */
  2801.         default:
  2802.             fprintf(stderr,"unknown option -%s\n", arg);
  2803.             exit(3);
  2804.     }
  2805.     return(0); 
  2806. }
  2807.  
  2808. /*****
  2809. * main for ffscan
  2810. *****/
  2811. int 
  2812. main (int argc, char **argv)
  2813.     int i, narg;
  2814.     char *arg;
  2815.  
  2816.     /* set global default values */
  2817.     initialise(argv[0]);
  2818.  
  2819.     if(argc == 1) 
  2820.     {
  2821.         fprintf(stderr, "%s: no files given\n",progname);
  2822.         printf(usage, progname);
  2823.         exit(4);
  2824.     }
  2825.  
  2826.     /* Default values */
  2827.     outfile = "stdout";
  2828.  
  2829.     /* scan for any command line options */
  2830.     arg = argv[narg = 1];
  2831.     while ( narg < argc && arg[0] == '-' )
  2832.     {
  2833.         if (arg[0] == '-')
  2834.         {
  2835.             int num_opts = strlen(arg) ;
  2836.             for(i = 1 ; i < num_opts ; i++ )
  2837.             if(set_global_option(++arg))
  2838.                 break;
  2839.         }
  2840.         arg = argv[++narg];
  2841.     }
  2842.     /* if no directories nor any files are given, exit */
  2843.     if(num_dirs_to_visit == 0 && narg == argc)
  2844.     {
  2845.         fprintf(stderr,"no files given.\n");
  2846.         exit(4);
  2847.     }
  2848.  
  2849.     /* install signal handlers */
  2850.     install_sig_handlers();
  2851.  
  2852.     /* open the output file */
  2853.     if(!strcmp(outfile, "stdout"))
  2854.         output_file = stdout;
  2855.     else if((output_file = fopen(outfile, "w")) == NULL)
  2856.     {
  2857.         perror(outfile);
  2858.         exit(6);
  2859.     }
  2860.  
  2861.     /*
  2862.     * always use this extension of none is given and directories are to be
  2863.     * searched. 3 equals the size of .f\0
  2864.     */
  2865.     if(num_dirs_to_visit && !num_extensions)
  2866.     {
  2867.         checked_malloc(ext_table[num_extensions], 3, char);
  2868. #ifdef __MSDOS__    /* msdos returns uppercase when building a filelist */
  2869.         ext_table[num_extensions++] = ".F";
  2870. #else
  2871.         ext_table[num_extensions++] = ".f";
  2872. #endif
  2873.     }
  2874.  
  2875.     /* when directories have been given on the cmdline, build a filelist */
  2876.     if(num_dirs_to_visit && verbose > 1)
  2877.         printf("Scanning directories:\n");
  2878.  
  2879.     /* build a list of all files in the given directories (if any) */
  2880.     for(i = 0 ; i < num_dirs_to_visit; i++)
  2881.     {
  2882.         if(verbose > 1)
  2883.             printf("%s\n", dirs_to_visit[i]); 
  2884.         build_file_list(&file_list, &num_files, dirs_to_visit[i],
  2885.             ext_table, num_extensions); 
  2886.     }
  2887.     /* see if we have files left on the command line */
  2888.     if(narg != argc)
  2889.     {
  2890.         for(i = narg ; i < argc ; i++)
  2891.         {
  2892.             checked_realloc(file_list, num_files+1, char*);
  2893.             checked_malloc(file_list[num_files], strlen(argv[i])+1,
  2894.                 char);
  2895.             sprintf(file_list[num_files++], "%s", argv[i]);
  2896.         }
  2897.         if(verbose > 1 && argc-narg !=0)
  2898.             printf("%i files given on command line.\n", argc - narg);
  2899.     }
  2900.  
  2901.     /* show settings if we have to be a little bit verbose */
  2902.     if(verbose > 1)
  2903.         print_settings();
  2904.  
  2905.     if(verbose > 1)
  2906.     {
  2907.         printf("Total Files to scan: %i\n", num_files);
  2908.         printf("File to write to: %s\n", outfile);
  2909.     }
  2910.     fflush(stdout);
  2911.  
  2912.     /* purge any non-matching output from yylex to /dev/null */
  2913.     yyout = fopen(YYOUT_DEVICE, "w+");
  2914.  
  2915.     /* scan the file list */
  2916.     for(i = 0; i < num_files; i++)
  2917.     {
  2918.         if ((num_ignore == 0 ? 1 : ignore_this_file(file_list[i])))
  2919.         {
  2920.             /* reset scanner for this file */
  2921.             if((yyin = reset_scanner(file_list[i])) == NULL)
  2922.                 continue;
  2923.             yylineno = 0;
  2924.             /* scan the file */
  2925.             yylex();
  2926.             /*
  2927.             * flush the buffer of flex so we won't have
  2928.             * any trailing stuff from the previous file
  2929.             */
  2930.             YY_FLUSH_BUFFER;
  2931.             /* close input file */
  2932.             fclose(yyin);
  2933.             /* report some statistics if we have to */
  2934.             if(verbose)
  2935.                 print_file_stats(output_file, file_list[i], 
  2936.                     yylineno);
  2937.             total_routines += numroutine;
  2938.             total_calls += numcall;
  2939.             total_funcs += numfunc;
  2940.         }
  2941.     }
  2942.     fclose(yyout);
  2943.  
  2944.     /* this is the final flowgraph data */
  2945.     flow = global_flow.head;
  2946.  
  2947.     if(!quiet) 
  2948.         printf("Sorting...\n"); 
  2949.     fflush(stdout);
  2950.  
  2951.     /* Sort the flowgraph */
  2952.     flow = sortAll(flow); 
  2953.  
  2954.     /* do argument check */
  2955.     cross_check(output_file, flow);
  2956.  
  2957.     /* print subroutines that are never invoked */
  2958.     if(never_invoked)
  2959.         print_unused_routines(output_file, flow);
  2960.  
  2961.     if(verbose)
  2962.     {
  2963.         fprintf(output_file, "Checked %i files.\n", num_files);
  2964.         fprintf(output_file, "Found %i subroutine definitions\n",
  2965.             total_routines);
  2966.         fprintf(output_file, "Found %i function definitions\n", 
  2967.             total_funcs);
  2968.         fprintf(output_file, "Found %i calls to subroutines\n", 
  2969.             total_calls);
  2970.         fprintf(output_file, "Checked %i calls in %i defined "
  2971.             "subroutines in %i files.\n", 
  2972.             total_calls, total_routines, num_files);
  2973.     }
  2974.  
  2975.     /* report final results */
  2976.     if(strcmp(outfile, "stdout") || !quiet)
  2977.     {
  2978.         if(num_diff)
  2979.             fprintf(output_file, "Found %i argument mismatches.\n", 
  2980.                 num_diff);
  2981.         else
  2982.             fprintf(output_file, "No argument mismatches found.\n");
  2983.     }
  2984.  
  2985.     /* close output file */
  2986.     if(strcmp(outfile, "stdout"))
  2987.     {
  2988.         fflush(output_file);
  2989.         fclose(output_file);
  2990.     }
  2991.  
  2992.     /* when wanted, print msdos memory usage summary */
  2993.     print_dos_memory_usage();
  2994.  
  2995.     if(num_diff)
  2996.         return(12);
  2997.     else
  2998.         return(0);
  2999. }
  3000.