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 >
Wrap
C/C++ Source or Header
|
1996-08-28
|
102KB
|
3,002 lines
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define YY_USES_REJECT
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern int yylineno;
int yylineno = 1;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 11
#define YY_END_OF_BUFFER 12
static yyconst short int yy_acclist[925] =
{ 0,
12, 10, 11, 9, 11, 10, 11, 10, 11, 1,
10, 11, 11, 11, 6, 7, 11, 1, 1, 6,
7, 6, 7, 6, 7, 6, 7, 1, 1, 6,
8, 6, 8, 1, 6, 8, 6, 8, 6, 8,
6, 8, 6, 8, 1, 6, 8, 6, 8, 1,
6, 6, 6, 8, 6, 8, 5, 1, 5, 6,
6, 6, 6, 6, 8, 6, 8, 7, 7, 7,
7, 7, 6, 7, 8, 6, 7, 8, 6, 7,
8, 6, 6, 8, 6, 8, 7, 7, 7, 7,
6, 7, 8, 6, 7, 8, 7, 6, 7, 8,
6, 7, 8, 6, 7, 8, 6, 7, 8, 6,
7, 8, 6, 7, 8, 6, 6, 8, 6, 8,
6, 8, 6, 8, 6, 8, 7, 7, 6, 7,
8, 7, 6, 7, 8, 6, 7, 8, 6, 6,
8, 6, 8, 6, 8, 6, 8, 8, 8, 8,
5, 7, 7, 6, 7, 8, 7, 6, 7, 8,
6, 7, 8, 8, 8, 8, 8, 8, 6, 8,
6, 8, 6, 8, 6, 6, 8, 6, 8, 6,
8, 6, 8, 8, 8, 8, 8, 8, 8, 6,
8, 6, 8, 7, 7, 6, 7, 8, 7, 6,
7, 8, 6, 7, 8, 8, 8, 6, 8, 8,
6, 8, 6, 8, 6, 8, 6, 8, 6, 8,
6, 8, 6, 6, 8, 6, 8, 8, 8, 6,
8, 7, 7, 6, 7, 8, 7, 6, 7, 8,
6, 7, 8, 8, 8, 8, 6, 8, 6, 8,
6, 8, 6, 8, 8, 8, 6, 8, 2, 2,
7, 7, 7, 7, 6, 7, 8, 6, 7, 8,
6, 7, 8, 7, 6, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 8, 6, 7, 8, 6,
7, 8, 8, 8, 8, 6, 8, 6, 8, 6,
8, 6, 8, 8, 8, 6, 8, 3, 3, 7,
6, 7, 8, 6, 7, 8, 7, 7, 7, 6,
7, 8, 6, 7, 8, 6, 7, 8, 6, 7,
8, 7, 8, 7, 8, 7, 8, 8, 8, 8,
6, 8, 6, 8, 6, 8, 6, 8, 6, 8,
6, 8, 6, 8, 6, 8, 8, 8, 8, 8,
8, 8, 6, 8, 6, 7, 8, 6, 7, 8,
7, 7, 7, 7, 6, 7, 6, 7, 6, 7,
7, 8, 7, 8, 7, 8, 7, 8, 7, 8,
6, 7, 8, 6, 7, 8, 6, 7, 8, 6,
7, 8, 6, 7, 8, 6, 7, 8, 6, 7,
8, 7, 8, 7, 8, 7, 8, 7, 8, 7,
8, 7, 8, 6, 7, 8, 6, 7, 8, 8,
8, 8, 6, 8, 6, 8, 6, 8, 6, 8,
8, 8, 8, 8, 8, 6, 8, 6, 8, 6,
8, 6, 8, 4, 4, 6, 7, 8, 6, 7,
8, 7, 6, 7, 7, 6, 7, 6, 7, 6,
7, 6, 7, 6, 7, 7, 8, 7, 8, 6,
7, 8, 7, 8, 6, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 8, 6, 7, 8, 6,
7, 8, 6, 7, 8, 6, 7, 8, 7, 8,
7, 8, 6, 7, 8, 8, 8, 6, 8, 6,
8, 6, 8, 6, 8, 6, 8, 6, 7, 8,
6, 7, 8, 7, 7, 6, 7, 6, 7, 7,
8, 7, 8, 7, 8, 6, 7, 8, 6, 7,
8, 6, 7, 8, 6, 7, 8, 7, 8, 7,
8, 6, 7, 8, 6, 8, 6, 7, 8, 6,
7, 8, 7, 7, 6, 7, 6, 7, 7, 8,
7, 8, 7, 8, 6, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 8, 7, 8, 7, 8,
6, 7, 8, 6, 8, 6, 7, 8, 6, 7,
8, 7, 7, 7, 7, 7, 7, 6, 7, 6,
7, 7, 8, 7, 8, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 8, 6, 7, 8, 6,
7, 8, 6, 7, 8, 6, 7, 8, 6, 7,
8, 7, 8, 7, 8, 7, 8, 7, 8, 7,
8, 7, 8, 6, 7, 8, 6, 8, 7, 7,
8, 7, 8, 7, 8, 7, 7, 7, 7, 6,
7, 8, 6, 7, 8, 6, 7, 6, 7, 6,
7, 6, 7, 7, 8, 7, 8, 7, 8, 6,
7, 8, 6, 7, 8, 6, 7, 8, 6, 7,
8, 7, 8, 7, 8, 7, 8, 7, 8, 7,
8, 6, 7, 8, 6, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 6, 7, 7, 8, 7,
8, 7, 7, 7, 7, 6, 7, 6, 7, 8,
6, 7, 6, 7, 6, 7, 7, 7, 8, 7,
8, 6, 7, 8, 6, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 8, 6, 7, 7, 8,
7, 8, 7, 6, 7, 8, 6, 7, 7, 6,
7, 8, 6, 7, 7, 8, 7, 8, 7, 6,
7, 8, 7, 6, 7, 6, 7, 7, 6, 7,
8, 6, 7, 7, 8, 7, 8, 7, 6, 7,
8, 6, 7, 7, 6, 7, 8, 6, 7, 7,
8, 7, 8, 7, 8, 7, 8, 7, 8, 6,
7, 8, 6, 7, 8, 6, 7, 8, 6, 7,
8, 6, 7, 7, 6, 7, 7, 8, 7, 8,
7, 6, 7, 8, 6, 7, 8, 6, 7, 8,
6, 7, 8, 6, 7, 7, 8, 7, 6, 7,
8, 6, 7, 8, 7, 8, 7, 6, 7, 8,
6, 7, 8, 7, 8, 7, 6, 7, 8, 6,
7, 8, 7, 8, 7, 6, 7, 8, 6, 7,
8, 7, 8, 7, 7, 7, 6, 7, 8, 6,
7, 8, 7, 8
} ;
static yyconst short int yy_accept[593] =
{ 0,
1, 1, 1, 1, 1, 2, 4, 6, 8, 10,
13, 14, 15, 18, 18, 18, 19, 20, 20, 22,
22, 24, 26, 26, 26, 28, 28, 28, 28, 29,
30, 30, 30, 30, 30, 32, 34, 34, 34, 35,
35, 35, 37, 39, 41, 43, 45, 45, 45, 46,
46, 46, 46, 46, 46, 48, 50, 50, 50, 51,
51, 51, 51, 51, 51, 52, 53, 55, 57, 58,
58, 58, 58, 58, 58, 58, 58, 60, 60, 60,
60, 60, 60, 60, 61, 62, 63, 64, 66, 68,
68, 68, 68, 68, 68, 69, 70, 71, 72, 73,
76, 79, 82, 82, 82, 83, 85, 87, 87, 87,
87, 87, 87, 88, 89, 90, 91, 94, 97, 98,
101, 104, 107, 110, 113, 116, 116, 116, 117, 119,
121, 123, 125, 127, 127, 127, 127, 127, 127, 128,
129, 132, 133, 133, 136, 139, 139, 139, 139, 139,
139, 140, 142, 144, 146, 148, 149, 150, 151, 152,
152, 152, 152, 152, 153, 154, 157, 158, 158, 161,
164, 165, 166, 167, 168, 169, 169, 171, 173, 175,
175, 176, 178, 180, 182, 184, 185, 186, 187, 188,
189, 190, 192, 194, 194, 194, 194, 194, 195, 196,
199, 200, 200, 203, 206, 207, 208, 210, 211, 213,
215, 217, 219, 221, 223, 223, 224, 226, 228, 228,
229, 230, 232, 232, 232, 232, 232, 233, 234, 237,
238, 238, 241, 244, 245, 246, 247, 249, 251, 253,
255, 255, 256, 257, 259, 259, 260, 261, 261, 261,
262, 263, 264, 265, 268, 271, 274, 275, 275, 278,
281, 284, 287, 290, 293, 294, 295, 296, 298, 300,
302, 304, 304, 305, 306, 308, 309, 310, 310, 311,
314, 317, 318, 319, 320, 320, 320, 320, 323, 326,
329, 332, 334, 336, 338, 339, 340, 341, 343, 345,
347, 349, 351, 353, 355, 357, 357, 358, 359, 360,
361, 362, 363, 365, 365, 368, 371, 372, 373, 374,
375, 377, 379, 381, 383, 385, 387, 389, 391, 394,
397, 400, 403, 406, 409, 412, 414, 416, 418, 420,
422, 424, 427, 430, 431, 432, 433, 435, 437, 439,
441, 441, 442, 443, 444, 445, 446, 448, 450, 452,
454, 455, 456, 459, 462, 463, 465, 466, 468, 470,
472, 474, 476, 478, 480, 483, 485, 488, 491, 494,
497, 500, 503, 506, 509, 509, 511, 513, 516, 517,
518, 520, 522, 524, 526, 528, 531, 534, 535, 536,
536, 538, 540, 542, 544, 546, 549, 552, 555, 558,
558, 560, 562, 565, 567, 570, 573, 574, 575, 575,
577, 579, 581, 583, 585, 588, 591, 594, 597, 597,
599, 601, 604, 606, 609, 612, 613, 614, 615, 616,
617, 618, 618, 620, 622, 624, 626, 628, 631, 634,
637, 640, 643, 646, 649, 652, 652, 654, 656, 658,
660, 662, 664, 667, 669, 670, 672, 674, 676, 677,
678, 679, 680, 683, 686, 686, 688, 690, 692, 694,
696, 698, 700, 703, 706, 709, 712, 712, 714, 716,
718, 720, 722, 725, 728, 731, 734, 736, 738, 740,
742, 743, 744, 745, 746, 748, 751, 751, 753, 755,
757, 758, 760, 762, 765, 768, 771, 774, 777, 779,
781, 783, 784, 787, 787, 787, 789, 790, 793, 795,
797, 799, 800, 803, 804, 806, 808, 809, 812, 814,
816, 818, 819, 822, 824, 825, 828, 830, 832, 834,
836, 838, 840, 843, 846, 849, 852, 854, 855, 857,
859, 861, 862, 865, 868, 871, 874, 876, 878, 879,
882, 885, 887, 888, 891, 894, 896, 897, 900, 903,
905, 906, 909, 912, 914, 915, 916, 917, 920, 923,
925, 925
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 1, 1, 1, 1, 1, 1, 5, 6,
7, 8, 1, 1, 1, 1, 1, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
1, 1, 1, 1, 12, 13, 14, 9, 15, 16,
17, 9, 18, 9, 9, 19, 20, 21, 22, 23,
9, 24, 25, 26, 27, 9, 9, 9, 9, 9,
1, 1, 1, 1, 11, 1, 12, 13, 14, 9,
15, 16, 17, 9, 18, 9, 9, 19, 20, 21,
22, 23, 9, 24, 25, 26, 27, 9, 9, 9,
9, 9, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[28] =
{ 0,
1, 2, 3, 4, 5, 5, 5, 2, 2, 2,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2
} ;
static yyconst short int yy_base[645] =
{ 0,
0, 5, 19, 29, 256, 0, 10, 2422, 13, 14,
39, 2422, 49, 44, 58, 0, 59, 73, 83, 39,
61, 62, 63, 246, 0, 78, 192, 92, 93, 191,
73, 0, 94, 95, 101, 106, 176, 110, 161, 111,
112, 116, 121, 125, 127, 132, 157, 136, 156, 137,
138, 141, 142, 167, 148, 150, 164, 156, 152, 155,
159, 160, 0, 163, 170, 179, 181, 186, 2422, 192,
0, 176, 185, 189, 196, 197, 0, 215, 196, 203,
219, 222, 223, 207, 226, 230, 232, 237, 239, 229,
236, 245, 247, 247, 251, 262, 267, 269, 274, 276,
281, 286, 258, 288, 292, 294, 299, 289, 298, 302,
305, 305, 145, 313, 319, 321, 327, 329, 334, 339,
309, 341, 346, 348, 353, 355, 358, 362, 364, 368,
372, 374, 379, 383, 382, 386, 387, 133, 387, 389,
397, 408, 401, 413, 415, 419, 420, 423, 424, 427,
431, 433, 438, 443, 445, 450, 455, 460, 449, 453,
458, 464, 129, 469, 475, 480, 482, 471, 489, 491,
496, 498, 503, 505, 510, 512, 516, 518, 523, 525,
529, 531, 535, 537, 542, 122, 547, 552, 554, 559,
564, 569, 571, 567, 575, 577, 118, 577, 593, 583,
598, 588, 603, 605, 610, 612, 617, 619, 624, 626,
630, 632, 637, 642, 644, 648, 650, 655, 117, 660,
665, 670, 654, 674, 663, 107, 679, 681, 688, 690,
694, 698, 700, 705, 707, 712, 717, 719, 724, 726,
99, 731, 736, 741, 745, 2422, 734, 739, 0, 750,
758, 762, 767, 772, 776, 780, 785, 790, 794, 798,
802, 804, 809, 814, 819, 821, 826, 831, 833, 838,
840, 98, 845, 850, 855, 2422, 756, 848, 862, 867,
872, 877, 882, 887, 889, 892, 893, 897, 899, 904,
906, 911, 916, 921, 923, 928, 933, 938, 940, 945,
947, 951, 955, 960, 965, 74, 970, 975, 979, 983,
988, 993, 998, 1002, 1004, 1009, 1016, 1021, 1023, 1028,
1033, 1035, 1040, 1042, 1047, 1052, 1054, 1059, 1061, 1066,
1071, 1073, 1077, 1079, 1084, 67, 1089, 1094, 1096, 1101,
1106, 1111, 1113, 1118, 1120, 1125, 1130, 1132, 1137, 1139,
0, 1144, 1149, 1154, 1159, 1164, 1169, 1174, 1178, 1182,
2422, 761, 1187, 1192, 1197, 1202, 1204, 1209, 1211, 1215,
1217, 1222, 1224, 1229, 1234, 1236, 1241, 1243, 1247, 1249,
1254, 1259, 1261, 1266, 66, 1271, 1276, 1281, 1283, 1288,
1293, 1295, 1300, 1305, 1310, 1315, 1320, 1325, 1330, 1334,
1338, 1340, 1345, 1347, 1352, 1357, 1359, 1364, 1366, 40,
1371, 1376, 1381, 1383, 1388, 1393, 1398, 1403, 1407, 1411,
1413, 1418, 1420, 1425, 1430, 1432, 1437, 1439, 34, 1444,
1449, 1454, 1456, 1461, 1466, 1471, 1476, 1480, 1484, 1489,
1494, 1498, 1502, 1504, 1509, 1511, 1516, 1521, 1523, 1528,
1530, 1534, 1538, 1543, 1548, 24, 1553, 1558, 1562, 1566,
1571, 1576, 1581, 1583, 1588, 1593, 1598, 1600, 1605, 1610,
1615, 1620, 1625, 1630, 1632, 1636, 1638, 1642, 1646, 1651,
1653, 1658, 1663, 1665, 1670, 1672, 0, 1677, 1682, 1687,
1692, 1697, 1702, 1707, 1711, 1715, 1720, 1725, 1727, 1732,
1737, 1742, 1744, 1749, 1754, 1759, 1764, 1768, 1770, 1775,
1777, 1782, 1787, 1792, 1794, 1799, 1804, 1809, 1814, 1819,
1824, 1829, 1834, 1838, 1842, 1846, 1851, 1856, 1861, 1866,
1871, 1876, 1881, 1886, 1891, 1896, 1901, 1906, 1911, 1916,
1921, 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1960, 1964,
1969, 1974, 1979, 1983, 1987, 1992, 1997, 2002, 2007, 2012,
2017, 2019, 2024, 2029, 2031, 2036, 2038, 2043, 2048, 2053,
2058, 2063, 2068, 2073, 2078, 2083, 2088, 2093, 2098, 2103,
2108, 2113, 2118, 2123, 2128, 2133, 2138, 2143, 2148, 2153,
2422, 2160, 2165, 2170, 2175, 2178, 2183, 2188, 2193, 2198,
2203, 2207, 2211, 2216, 2221, 2226, 2231, 2236, 2241, 2246,
2251, 2256, 2261, 2266, 2271, 2276, 2281, 2286, 2291, 2296,
2301, 2306, 2311, 2316, 2321, 2326, 2331, 2336, 2341, 2346,
2351, 2356, 2361, 2366, 2371, 2376, 2381, 2386, 2391, 2396,
2401, 2406, 2411, 2416
} ;
static yyconst short int yy_def[645] =
{ 0,
592, 592, 593, 593, 591, 591, 591, 591, 591, 594,
595, 591, 596, 591, 591, 594, 594, 595, 596, 18,
19, 597, 591, 598, 19, 591, 591, 591, 594, 594,
591, 598, 597, 597, 599, 599, 591, 591, 594, 597,
597, 599, 600, 599, 599, 599, 591, 591, 594, 597,
597, 591, 600, 601, 599, 599, 591, 602, 594, 597,
603, 591, 601, 600, 604, 604, 599, 599, 591, 602,
70, 602, 602, 602, 602, 602, 594, 603, 605, 605,
603, 606, 600, 604, 600, 604, 604, 599, 599, 602,
602, 602, 602, 597, 605, 605, 606, 605, 605, 607,
607, 607, 600, 600, 604, 608, 608, 602, 602, 602,
602, 591, 591, 605, 605, 605, 607, 607, 605, 607,
600, 607, 607, 607, 607, 609, 600, 604, 610, 611,
608, 610, 608, 602, 602, 602, 602, 591, 605, 605,
607, 605, 600, 607, 607, 612, 612, 600, 613, 600,
604, 610, 610, 610, 610, 612, 611, 613, 602, 602,
602, 602, 591, 605, 605, 607, 605, 600, 607, 607,
612, 612, 613, 612, 612, 591, 614, 614, 614, 600,
604, 600, 610, 610, 610, 591, 612, 613, 612, 611,
612, 614, 614, 602, 602, 602, 591, 605, 605, 607,
605, 600, 607, 607, 612, 612, 614, 612, 614, 600,
614, 614, 614, 614, 600, 604, 610, 610, 591, 612,
611, 614, 602, 602, 602, 591, 615, 615, 616, 615,
600, 617, 617, 612, 612, 612, 614, 614, 610, 610,
591, 612, 611, 614, 602, 591, 602, 602, 618, 605,
605, 605, 606, 607, 619, 607, 605, 620, 621, 622,
617, 621, 617, 621, 612, 612, 612, 614, 614, 610,
623, 591, 612, 624, 614, 591, 602, 602, 605, 607,
607, 605, 619, 625, 626, 626, 627, 621, 621, 621,
621, 626, 622, 627, 612, 612, 612, 614, 614, 623,
610, 611, 623, 610, 610, 591, 628, 612, 612, 624,
613, 612, 629, 602, 607, 607, 605, 625, 619, 605,
630, 630, 630, 626, 626, 627, 626, 626, 631, 631,
631, 600, 621, 621, 621, 591, 626, 627, 626, 622,
626, 631, 631, 628, 628, 628, 629, 629, 623, 610,
632, 612, 613, 612, 612, 628, 614, 614, 611, 614,
591, 602, 607, 607, 605, 630, 619, 630, 600, 630,
630, 630, 626, 626, 631, 626, 631, 600, 631, 631,
631, 631, 621, 621, 591, 626, 622, 631, 613, 612,
629, 629, 614, 614, 614, 607, 607, 605, 619, 600,
630, 630, 626, 626, 626, 631, 631, 621, 621, 591,
626, 622, 631, 614, 616, 617, 605, 633, 600, 630,
630, 626, 626, 626, 631, 631, 621, 634, 591, 626,
635, 631, 614, 607, 617, 615, 626, 626, 636, 627,
626, 600, 630, 637, 626, 626, 626, 631, 631, 634,
621, 622, 634, 621, 621, 591, 638, 626, 626, 635,
627, 626, 639, 629, 625, 626, 626, 626, 605, 615,
625, 605, 631, 631, 600, 637, 630, 619, 630, 638,
638, 638, 639, 639, 634, 621, 640, 626, 627, 626,
626, 638, 631, 631, 622, 631, 630, 630, 626, 626,
605, 625, 615, 625, 630, 631, 641, 637, 630, 630,
619, 627, 626, 639, 639, 631, 631, 631, 630, 626,
626, 605, 631, 605, 625, 630, 619, 631, 630, 626,
626, 605, 631, 605, 630, 630, 619, 631, 630, 642,
642, 605, 643, 630, 619, 639, 637, 626, 605, 627,
626, 626, 631, 619, 631, 631, 637, 636, 630, 626,
626, 605, 631, 631, 631, 631, 637, 626, 605, 631,
631, 626, 605, 631, 631, 626, 605, 631, 631, 638,
644, 639, 639, 626, 626, 626, 626, 631, 639, 626,
0, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591
} ;
static yyconst short int yy_nxt[2450] =
{ 0,
591, 14, 7, 14, 8, 8, 9, 7, 9, 8,
8, 14, 10, 14, 15, 17, 15, 17, 10, 11,
11, 11, 12, 12, 12, 12, 11, 487, 11, 11,
11, 11, 12, 12, 12, 12, 11, 456, 11, 18,
18, 18, 31, 429, 32, 26, 18, 26, 18, 20,
20, 21, 22, 23, 24, 23, 20, 27, 20, 28,
29, 28, 29, 18, 33, 34, 31, 24, 32, 410,
385, 27, 30, 18, 18, 18, 31, 351, 32, 26,
18, 26, 18, 20, 20, 21, 22, 23, 24, 23,
20, 27, 20, 38, 29, 38, 29, 40, 41, 24,
24, 306, 272, 43, 44, 27, 30, 45, 43, 46,
249, 48, 45, 48, 50, 51, 24, 24, 43, 44,
241, 226, 45, 27, 53, 219, 54, 43, 55, 43,
44, 45, 197, 45, 43, 56, 163, 58, 45, 58,
60, 61, 24, 24, 62, 64, 63, 54, 138, 27,
43, 67, 43, 68, 45, 77, 45, 70, 78, 71,
24, 80, 81, 62, 82, 63, 83, 69, 54, 73,
66, 74, 85, 86, 59, 57, 87, 591, 75, 49,
76, 85, 86, 43, 88, 87, 591, 45, 43, 89,
591, 74, 45, 70, 47, 71, 90, 591, 591, 96,
74, 97, 39, 37, 74, 73, 98, 74, 99, 85,
86, 74, 74, 87, 75, 91, 76, 80, 94, 92,
82, 80, 94, 93, 82, 101, 103, 102, 54, 104,
591, 54, 85, 105, 85, 86, 87, 591, 87, 43,
106, 43, 107, 45, 74, 45, 591, 108, 591, 36,
112, 74, 24, 113, 114, 591, 109, 115, 591, 111,
74, 126, 74, 54, 113, 116, 110, 97, 115, 113,
117, 113, 119, 118, 99, 115, 113, 114, 121, 122,
115, 591, 123, 121, 124, 591, 125, 123, 121, 122,
591, 127, 123, 54, 85, 128, 130, 131, 87, 591,
132, 130, 133, 591, 74, 132, 591, 134, 31, 591,
32, 135, 143, 74, 54, 113, 139, 74, 136, 115,
74, 113, 114, 113, 140, 115, 97, 115, 137, 121,
141, 121, 122, 123, 591, 123, 113, 142, 591, 99,
115, 121, 122, 121, 144, 123, 591, 123, 121, 122,
121, 145, 123, 125, 123, 121, 122, 147, 148, 123,
149, 150, 591, 54, 85, 151, 43, 153, 87, 154,
155, 157, 591, 158, 130, 131, 43, 153, 132, 154,
155, 130, 133, 591, 591, 132, 159, 591, 591, 113,
164, 113, 165, 115, 97, 115, 591, 74, 74, 121,
166, 74, 74, 123, 168, 591, 54, 160, 162, 161,
113, 167, 591, 99, 115, 121, 169, 121, 170, 123,
125, 123, 172, 174, 173, 175, 176, 178, 54, 179,
180, 591, 54, 85, 181, 182, 183, 87, 591, 184,
182, 185, 591, 154, 184, 182, 183, 182, 183, 184,
591, 184, 186, 187, 591, 188, 189, 186, 190, 591,
158, 191, 186, 192, 74, 591, 193, 591, 74, 195,
194, 113, 198, 74, 202, 115, 54, 113, 199, 74,
97, 115, 121, 200, 113, 201, 123, 99, 115, 591,
196, 121, 203, 121, 204, 123, 125, 123, 186, 205,
186, 206, 189, 173, 189, 186, 207, 186, 208, 193,
175, 189, 186, 205, 591, 62, 189, 63, 210, 211,
210, 213, 212, 214, 212, 210, 211, 591, 215, 212,
54, 85, 216, 591, 53, 87, 54, 182, 217, 182,
183, 184, 591, 184, 182, 218, 591, 154, 184, 186,
220, 591, 188, 189, 186, 207, 186, 205, 193, 591,
189, 186, 221, 591, 158, 191, 186, 187, 591, 188,
189, 210, 222, 210, 211, 212, 591, 212, 591, 113,
227, 591, 74, 115, 591, 121, 229, 591, 223, 123,
74, 231, 74, 54, 224, 113, 228, 591, 97, 115,
113, 230, 225, 99, 115, 121, 232, 121, 233, 123,
125, 123, 186, 234, 186, 235, 189, 173, 189, 210,
222, 186, 236, 212, 175, 189, 210, 211, 591, 53,
212, 54, 210, 237, 210, 211, 212, 591, 212, 210,
238, 591, 214, 212, 210, 211, 591, 148, 212, 54,
85, 216, 182, 239, 87, 591, 184, 182, 240, 591,
154, 184, 186, 242, 591, 188, 189, 186, 243, 74,
158, 191, 210, 244, 245, 246, 212, 247, 74, 591,
248, 251, 227, 251, 228, 252, 253, 252, 591, 74,
255, 232, 251, 230, 256, 257, 252, 258, 591, 54,
260, 261, 260, 263, 262, 264, 262, 186, 265, 186,
266, 189, 173, 189, 186, 267, 591, 175, 189, 210,
268, 210, 269, 212, 214, 212, 182, 270, 182, 271,
184, 154, 184, 186, 273, 591, 188, 189, 186, 274,
591, 158, 191, 210, 275, 591, 276, 212, 277, 74,
591, 591, 113, 119, 74, 99, 115, 591, 591, 278,
74, 279, 591, 99, 113, 119, 591, 99, 115, 113,
280, 74, 102, 118, 121, 281, 74, 125, 123, 283,
591, 284, 121, 281, 591, 125, 123, 113, 119, 591,
99, 115, 286, 148, 591, 287, 121, 289, 591, 290,
291, 293, 591, 294, 260, 261, 121, 289, 262, 290,
291, 260, 263, 591, 264, 262, 121, 289, 591, 290,
291, 186, 295, 186, 296, 189, 173, 189, 186, 297,
591, 175, 189, 210, 298, 210, 299, 212, 214, 212,
182, 300, 302, 303, 184, 304, 305, 186, 307, 591,
188, 189, 309, 310, 591, 311, 312, 210, 313, 591,
591, 212, 314, 74, 113, 142, 591, 99, 115, 121,
315, 591, 125, 123, 121, 316, 591, 125, 123, 113,
317, 591, 318, 115, 113, 319, 591, 284, 320, 113,
322, 591, 325, 323, 326, 327, 330, 328, 331, 332,
333, 332, 335, 334, 290, 334, 332, 333, 332, 333,
334, 591, 334, 336, 337, 591, 338, 339, 336, 340,
591, 294, 341, 336, 342, 186, 344, 343, 591, 189,
186, 345, 591, 173, 189, 186, 346, 591, 175, 189,
210, 347, 210, 348, 212, 214, 212, 302, 349, 182,
350, 305, 154, 184, 157, 591, 158, 302, 303, 591,
304, 305, 182, 350, 591, 154, 184, 182, 350, 591,
154, 184, 309, 307, 591, 353, 354, 186, 206, 591,
173, 189, 355, 591, 175, 309, 356, 591, 311, 312,
186, 357, 591, 179, 193, 186, 206, 591, 173, 189,
359, 347, 591, 361, 360, 362, 121, 363, 591, 125,
123, 121, 364, 591, 125, 123, 591, 74, 113, 365,
591, 318, 115, 113, 366, 113, 367, 323, 284, 320,
113, 317, 591, 318, 115, 369, 370, 369, 372, 371,
591, 371, 369, 370, 336, 373, 371, 591, 339, 336,
374, 591, 326, 339, 336, 375, 336, 376, 343, 328,
339, 336, 373, 378, 379, 339, 591, 380, 378, 381,
591, 382, 380, 378, 379, 591, 143, 380, 54, 332,
383, 332, 333, 334, 591, 334, 332, 384, 591, 290,
334, 336, 386, 591, 338, 339, 336, 375, 336, 373,
343, 591, 339, 336, 387, 591, 294, 341, 336, 337,
591, 338, 339, 378, 388, 378, 379, 380, 591, 380,
309, 344, 309, 345, 354, 389, 354, 309, 346, 591,
390, 354, 359, 391, 359, 392, 360, 393, 360, 302,
349, 182, 185, 305, 154, 184, 186, 208, 591, 175,
189, 186, 394, 591, 179, 193, 186, 208, 591, 175,
189, 186, 236, 591, 175, 189, 309, 345, 591, 389,
354, 210, 395, 591, 214, 212, 210, 213, 591, 214,
212, 157, 591, 158, 210, 213, 591, 214, 212, 121,
396, 591, 125, 123, 121, 397, 591, 125, 123, 113,
398, 591, 318, 115, 369, 372, 113, 399, 371, 284,
320, 369, 370, 591, 400, 371, 54, 369, 401, 369,
370, 371, 591, 371, 369, 402, 336, 403, 371, 591,
339, 336, 404, 591, 326, 339, 378, 388, 336, 405,
380, 328, 339, 378, 379, 591, 143, 380, 54, 378,
406, 378, 379, 380, 591, 380, 378, 407, 591, 382,
380, 378, 379, 332, 408, 380, 591, 334, 332, 409,
591, 290, 334, 336, 411, 591, 338, 339, 336, 412,
591, 294, 341, 378, 413, 186, 394, 380, 179, 193,
186, 208, 591, 175, 189, 359, 391, 359, 392, 360,
393, 360, 210, 213, 591, 214, 212, 210, 395, 591,
214, 212, 210, 414, 591, 214, 212, 121, 415, 591,
125, 123, 121, 416, 591, 125, 123, 113, 417, 591,
318, 115, 113, 418, 591, 284, 320, 419, 591, 54,
369, 420, 369, 421, 371, 591, 371, 336, 422, 336,
423, 339, 326, 339, 336, 424, 591, 328, 339, 378,
425, 378, 426, 380, 382, 380, 332, 427, 332, 428,
334, 290, 334, 336, 430, 591, 338, 339, 336, 431,
591, 294, 341, 378, 432, 210, 433, 380, 214, 212,
255, 416, 591, 434, 256, 260, 435, 591, 264, 262,
113, 436, 591, 318, 115, 438, 439, 591, 440, 441,
442, 591, 54, 369, 443, 369, 444, 371, 591, 371,
336, 445, 336, 446, 339, 326, 339, 336, 447, 591,
328, 339, 378, 448, 378, 449, 380, 382, 380, 332,
450, 452, 453, 334, 454, 455, 336, 457, 591, 338,
339, 459, 460, 591, 461, 462, 378, 463, 210, 464,
380, 214, 212, 121, 281, 591, 125, 123, 260, 435,
591, 264, 262, 251, 436, 591, 465, 252, 113, 466,
591, 326, 467, 468, 591, 328, 251, 470, 591, 471,
472, 113, 473, 591, 331, 474, 113, 466, 591, 326,
467, 475, 591, 54, 369, 476, 478, 476, 371, 591,
479, 336, 480, 336, 481, 339, 326, 339, 336, 482,
591, 328, 339, 378, 483, 378, 484, 380, 382, 380,
452, 485, 332, 486, 455, 290, 334, 293, 591, 294,
452, 453, 591, 454, 455, 332, 486, 591, 290, 334,
332, 486, 591, 290, 334, 459, 457, 591, 489, 490,
336, 374, 591, 326, 339, 491, 591, 328, 459, 492,
591, 461, 462, 336, 493, 591, 331, 343, 336, 374,
591, 326, 339, 495, 483, 359, 348, 496, 393, 360,
113, 497, 591, 498, 323, 336, 499, 591, 326, 339,
336, 373, 336, 500, 339, 328, 339, 113, 501, 591,
502, 115, 251, 503, 591, 504, 252, 113, 505, 591,
498, 323, 113, 501, 591, 502, 115, 378, 506, 591,
382, 380, 378, 379, 591, 507, 380, 54, 478, 508,
369, 509, 479, 510, 371, 511, 591, 284, 369, 509,
591, 510, 371, 459, 480, 459, 481, 490, 512, 490,
459, 482, 591, 513, 490, 495, 514, 495, 515, 496,
516, 496, 452, 485, 332, 335, 455, 290, 334, 336,
376, 591, 328, 339, 336, 517, 591, 331, 343, 336,
376, 591, 328, 339, 336, 405, 591, 328, 339, 459,
481, 591, 512, 490, 378, 518, 591, 382, 380, 378,
381, 591, 382, 380, 293, 591, 294, 378, 381, 591,
382, 380, 369, 519, 591, 510, 371, 369, 370, 336,
520, 371, 326, 339, 336, 521, 591, 328, 339, 113,
522, 591, 502, 115, 113, 366, 251, 503, 323, 504,
252, 113, 497, 591, 498, 323, 369, 519, 591, 510,
371, 378, 523, 591, 382, 380, 80, 148, 591, 525,
478, 508, 369, 526, 479, 510, 371, 369, 370, 113,
527, 371, 284, 320, 336, 517, 591, 331, 343, 336,
376, 591, 328, 339, 495, 514, 495, 515, 496, 516,
496, 378, 381, 591, 382, 380, 378, 518, 591, 382,
380, 378, 528, 591, 382, 380, 369, 529, 591, 510,
371, 336, 530, 591, 326, 339, 336, 531, 591, 328,
339, 113, 532, 591, 502, 115, 378, 533, 591, 382,
380, 534, 591, 502, 591, 535, 591, 498, 369, 536,
591, 510, 371, 113, 537, 591, 284, 320, 378, 538,
591, 382, 380, 369, 539, 591, 510, 371, 336, 540,
591, 326, 339, 336, 541, 591, 328, 339, 113, 542,
591, 502, 115, 378, 543, 591, 382, 380, 113, 501,
591, 502, 115, 369, 509, 591, 510, 371, 369, 544,
591, 510, 371, 113, 545, 591, 284, 320, 378, 546,
591, 382, 380, 369, 547, 591, 510, 371, 549, 481,
591, 550, 551, 549, 482, 591, 552, 551, 113, 503,
591, 502, 115, 554, 484, 591, 555, 556, 369, 557,
591, 510, 371, 113, 558, 591, 284, 320, 495, 484,
591, 516, 496, 478, 557, 591, 559, 479, 336, 560,
591, 561, 339, 562, 591, 99, 336, 563, 591, 564,
343, 336, 560, 591, 561, 339, 336, 560, 591, 561,
339, 378, 565, 591, 566, 380, 283, 591, 284, 378,
565, 591, 566, 380, 378, 565, 591, 566, 380, 478,
567, 591, 559, 479, 251, 439, 591, 471, 472, 369,
509, 591, 510, 371, 336, 568, 591, 561, 339, 336,
373, 113, 569, 339, 99, 115, 378, 570, 591, 566,
380, 378, 379, 378, 571, 380, 566, 380, 378, 379,
478, 567, 380, 559, 479, 336, 572, 591, 561, 339,
113, 573, 591, 99, 115, 378, 574, 591, 566, 380,
378, 575, 591, 566, 380, 336, 576, 591, 561, 339,
113, 577, 591, 99, 115, 378, 578, 591, 566, 380,
378, 579, 591, 566, 380, 336, 580, 591, 561, 339,
113, 581, 591, 99, 115, 378, 582, 591, 566, 380,
378, 583, 591, 566, 380, 459, 580, 591, 584, 490,
438, 230, 591, 586, 587, 495, 583, 591, 588, 496,
495, 589, 591, 588, 496, 336, 376, 591, 328, 339,
113, 590, 591, 328, 467, 113, 590, 591, 328, 467,
113, 590, 591, 328, 467, 378, 381, 591, 382, 380,
495, 589, 591, 588, 496, 336, 500, 591, 328, 339,
6, 6, 6, 6, 6, 13, 13, 13, 13, 13,
16, 16, 591, 16, 16, 19, 19, 19, 25, 25,
25, 25, 25, 23, 23, 591, 23, 23, 35, 35,
591, 35, 35, 42, 42, 42, 42, 42, 52, 52,
591, 52, 52, 65, 65, 591, 65, 65, 72, 591,
72, 79, 79, 79, 79, 79, 84, 84, 84, 84,
84, 95, 95, 591, 95, 95, 100, 100, 591, 100,
100, 120, 120, 120, 120, 120, 129, 129, 129, 129,
129, 146, 146, 146, 146, 146, 152, 152, 152, 152,
152, 156, 156, 591, 156, 156, 171, 171, 591, 171,
171, 177, 177, 591, 177, 177, 209, 209, 209, 209,
209, 250, 250, 250, 250, 250, 254, 254, 254, 254,
254, 259, 259, 259, 259, 259, 80, 80, 80, 591,
80, 282, 282, 591, 282, 282, 285, 285, 285, 285,
285, 288, 288, 288, 288, 288, 292, 292, 591, 292,
292, 301, 301, 301, 301, 301, 308, 308, 308, 308,
308, 321, 321, 321, 321, 321, 324, 324, 591, 324,
324, 329, 329, 591, 329, 329, 352, 352, 352, 352,
352, 358, 358, 358, 358, 358, 368, 368, 368, 368,
368, 377, 377, 377, 377, 377, 147, 147, 147, 591,
147, 437, 437, 437, 437, 437, 451, 451, 451, 451,
451, 458, 458, 458, 458, 458, 469, 469, 469, 469,
469, 477, 477, 477, 477, 477, 488, 488, 488, 488,
488, 494, 494, 494, 494, 494, 286, 286, 286, 591,
286, 524, 524, 524, 524, 524, 548, 548, 548, 548,
548, 553, 553, 553, 553, 553, 585, 585, 585, 585,
585, 5, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591
} ;
static yyconst short int yy_chk[2450] =
{ 0,
0, 6, 1, 6, 1, 1, 2, 2, 2, 2,
2, 7, 2, 7, 9, 10, 9, 10, 2, 3,
3, 3, 3, 3, 3, 3, 3, 456, 3, 4,
4, 4, 4, 4, 4, 4, 4, 429, 4, 11,
11, 11, 20, 410, 20, 14, 11, 14, 11, 13,
13, 13, 13, 13, 13, 13, 13, 14, 13, 15,
17, 15, 17, 21, 21, 22, 23, 22, 23, 385,
336, 15, 17, 18, 18, 18, 31, 306, 31, 26,
18, 26, 18, 19, 19, 19, 19, 19, 19, 19,
19, 26, 19, 28, 29, 28, 29, 33, 34, 33,
34, 272, 241, 35, 35, 28, 29, 35, 36, 36,
226, 38, 36, 38, 40, 41, 40, 41, 42, 42,
219, 197, 42, 38, 43, 186, 43, 44, 44, 45,
45, 44, 163, 45, 46, 46, 138, 48, 46, 48,
50, 51, 50, 51, 52, 53, 52, 53, 113, 48,
55, 55, 56, 56, 55, 59, 56, 58, 60, 58,
60, 61, 61, 62, 61, 62, 64, 57, 64, 58,
54, 58, 65, 65, 49, 47, 65, 72, 58, 39,
58, 66, 66, 67, 67, 66, 73, 67, 68, 68,
74, 72, 68, 70, 37, 70, 73, 75, 76, 79,
73, 79, 30, 27, 74, 70, 80, 70, 80, 84,
84, 75, 76, 84, 70, 74, 70, 78, 78, 75,
78, 81, 81, 76, 81, 82, 83, 82, 83, 85,
90, 85, 86, 86, 87, 87, 86, 91, 87, 88,
88, 89, 89, 88, 90, 89, 92, 90, 93, 24,
94, 91, 94, 95, 95, 5, 91, 95, 0, 93,
92, 103, 93, 103, 96, 96, 92, 96, 96, 97,
97, 98, 98, 97, 98, 98, 99, 99, 100, 100,
99, 0, 100, 101, 101, 0, 101, 101, 102, 102,
108, 104, 102, 104, 105, 105, 106, 106, 105, 109,
106, 107, 107, 110, 108, 107, 111, 108, 112, 0,
112, 109, 121, 109, 121, 114, 114, 110, 110, 114,
111, 115, 115, 116, 116, 115, 116, 116, 111, 117,
117, 118, 118, 117, 0, 118, 119, 119, 0, 119,
119, 120, 120, 122, 122, 120, 0, 122, 123, 123,
124, 124, 123, 124, 124, 125, 125, 126, 126, 125,
126, 127, 0, 127, 128, 128, 129, 129, 128, 129,
129, 130, 0, 130, 131, 131, 132, 132, 131, 132,
132, 133, 133, 135, 134, 133, 134, 136, 137, 139,
139, 140, 140, 139, 140, 140, 0, 135, 134, 141,
141, 136, 137, 141, 143, 0, 143, 135, 137, 136,
142, 142, 0, 142, 142, 144, 144, 145, 145, 144,
145, 145, 146, 147, 146, 147, 148, 149, 148, 149,
150, 0, 150, 151, 151, 152, 152, 151, 0, 152,
153, 153, 0, 153, 153, 154, 154, 155, 155, 154,
159, 155, 156, 156, 160, 156, 156, 157, 157, 161,
157, 157, 158, 158, 159, 162, 158, 0, 160, 161,
160, 164, 164, 161, 168, 164, 168, 165, 165, 162,
165, 165, 166, 166, 167, 167, 166, 167, 167, 0,
162, 169, 169, 170, 170, 169, 170, 170, 171, 171,
172, 172, 171, 172, 172, 173, 173, 174, 174, 173,
174, 174, 175, 175, 0, 176, 175, 176, 177, 177,
178, 178, 177, 178, 178, 179, 179, 0, 180, 179,
180, 181, 181, 0, 182, 181, 182, 183, 183, 184,
184, 183, 0, 184, 185, 185, 0, 185, 185, 187,
187, 0, 187, 187, 188, 188, 189, 189, 188, 0,
189, 190, 190, 0, 190, 190, 191, 191, 194, 191,
191, 192, 192, 193, 193, 192, 195, 193, 196, 198,
198, 0, 194, 198, 0, 200, 200, 0, 194, 200,
195, 202, 196, 202, 195, 199, 199, 0, 199, 199,
201, 201, 196, 201, 201, 203, 203, 204, 204, 203,
204, 204, 205, 205, 206, 206, 205, 206, 206, 207,
207, 208, 208, 207, 208, 208, 209, 209, 0, 210,
209, 210, 211, 211, 212, 212, 211, 0, 212, 213,
213, 0, 213, 213, 214, 214, 0, 215, 214, 215,
216, 216, 217, 217, 216, 223, 217, 218, 218, 0,
218, 218, 220, 220, 225, 220, 220, 221, 221, 223,
221, 221, 222, 222, 223, 224, 222, 224, 225, 0,
225, 227, 227, 228, 228, 227, 228, 228, 0, 224,
229, 229, 230, 230, 229, 230, 230, 231, 0, 231,
232, 232, 233, 233, 232, 233, 233, 234, 234, 235,
235, 234, 235, 235, 236, 236, 0, 236, 236, 237,
237, 238, 238, 237, 238, 238, 239, 239, 240, 240,
239, 240, 240, 242, 242, 247, 242, 242, 243, 243,
248, 243, 243, 244, 244, 0, 245, 244, 245, 247,
0, 0, 250, 250, 248, 250, 250, 277, 0, 248,
245, 251, 362, 251, 252, 252, 0, 252, 252, 253,
253, 277, 253, 253, 254, 254, 362, 254, 254, 255,
0, 255, 256, 256, 0, 256, 256, 257, 257, 0,
257, 257, 258, 258, 0, 258, 259, 259, 0, 259,
259, 260, 0, 260, 261, 261, 262, 262, 261, 262,
262, 263, 263, 0, 263, 263, 264, 264, 0, 264,
264, 265, 265, 266, 266, 265, 266, 266, 267, 267,
0, 267, 267, 268, 268, 269, 269, 268, 269, 269,
270, 270, 271, 271, 270, 271, 271, 273, 273, 278,
273, 273, 274, 274, 0, 274, 274, 275, 275, 0,
0, 275, 278, 278, 279, 279, 0, 279, 279, 280,
280, 0, 280, 280, 281, 281, 0, 281, 281, 282,
282, 0, 282, 282, 283, 283, 0, 283, 283, 284,
284, 0, 285, 284, 285, 286, 287, 286, 287, 288,
288, 289, 289, 288, 289, 289, 290, 290, 291, 291,
290, 0, 291, 292, 292, 0, 292, 292, 293, 293,
0, 293, 293, 294, 294, 295, 295, 294, 0, 295,
296, 296, 0, 296, 296, 297, 297, 0, 297, 297,
298, 298, 299, 299, 298, 299, 299, 300, 300, 301,
301, 300, 301, 301, 302, 0, 302, 303, 303, 0,
303, 303, 304, 304, 0, 304, 304, 305, 305, 0,
305, 305, 307, 307, 0, 307, 307, 308, 308, 0,
308, 308, 309, 0, 309, 310, 310, 0, 310, 310,
311, 311, 0, 311, 311, 312, 312, 0, 312, 312,
313, 313, 0, 314, 313, 314, 315, 315, 0, 315,
315, 316, 316, 0, 316, 316, 0, 314, 317, 317,
0, 317, 317, 318, 318, 319, 319, 318, 319, 319,
320, 320, 0, 320, 320, 321, 321, 322, 322, 321,
0, 322, 323, 323, 324, 324, 323, 0, 324, 325,
325, 0, 325, 325, 326, 326, 327, 327, 326, 327,
327, 328, 328, 329, 329, 328, 0, 329, 330, 330,
0, 330, 330, 331, 331, 0, 332, 331, 332, 333,
333, 334, 334, 333, 0, 334, 335, 335, 0, 335,
335, 337, 337, 0, 337, 337, 338, 338, 339, 339,
338, 0, 339, 340, 340, 0, 340, 340, 341, 341,
0, 341, 341, 342, 342, 343, 343, 342, 0, 343,
344, 344, 345, 345, 344, 345, 345, 346, 346, 0,
346, 346, 347, 347, 348, 348, 347, 348, 348, 349,
349, 350, 350, 349, 350, 350, 352, 352, 0, 352,
352, 353, 353, 0, 353, 353, 354, 354, 0, 354,
354, 355, 355, 0, 355, 355, 356, 356, 0, 356,
356, 357, 357, 0, 357, 357, 358, 358, 0, 358,
358, 359, 0, 359, 360, 360, 0, 360, 360, 363,
363, 0, 363, 363, 364, 364, 0, 364, 364, 365,
365, 0, 365, 365, 366, 366, 367, 367, 366, 367,
367, 368, 368, 0, 369, 368, 369, 370, 370, 371,
371, 370, 0, 371, 372, 372, 373, 373, 372, 0,
373, 374, 374, 0, 374, 374, 375, 375, 376, 376,
375, 376, 376, 377, 377, 0, 378, 377, 378, 379,
379, 380, 380, 379, 0, 380, 381, 381, 0, 381,
381, 382, 382, 383, 383, 382, 0, 383, 384, 384,
0, 384, 384, 386, 386, 0, 386, 386, 387, 387,
0, 387, 387, 388, 388, 389, 389, 388, 389, 389,
390, 390, 0, 390, 390, 391, 391, 392, 392, 391,
392, 392, 393, 393, 0, 393, 393, 394, 394, 0,
394, 394, 395, 395, 0, 395, 395, 396, 396, 0,
396, 396, 397, 397, 0, 397, 397, 398, 398, 0,
398, 398, 399, 399, 0, 399, 399, 400, 0, 400,
401, 401, 402, 402, 401, 0, 402, 403, 403, 404,
404, 403, 404, 404, 405, 405, 0, 405, 405, 406,
406, 407, 407, 406, 407, 407, 408, 408, 409, 409,
408, 409, 409, 411, 411, 0, 411, 411, 412, 412,
0, 412, 412, 413, 413, 414, 414, 413, 414, 414,
415, 415, 0, 415, 415, 416, 416, 0, 416, 416,
417, 417, 0, 417, 417, 418, 418, 0, 418, 418,
419, 0, 419, 420, 420, 421, 421, 420, 0, 421,
422, 422, 423, 423, 422, 423, 423, 424, 424, 0,
424, 424, 425, 425, 426, 426, 425, 426, 426, 427,
427, 428, 428, 427, 428, 428, 430, 430, 0, 430,
430, 431, 431, 0, 431, 431, 432, 432, 433, 433,
432, 433, 433, 434, 434, 0, 434, 434, 435, 435,
0, 435, 435, 436, 436, 0, 436, 436, 437, 437,
0, 437, 437, 438, 0, 438, 439, 439, 0, 439,
439, 440, 440, 0, 440, 440, 441, 441, 0, 441,
441, 442, 0, 442, 443, 443, 444, 444, 443, 0,
444, 445, 445, 446, 446, 445, 446, 446, 447, 447,
0, 447, 447, 448, 448, 449, 449, 448, 449, 449,
450, 450, 451, 451, 450, 451, 451, 452, 0, 452,
453, 453, 0, 453, 453, 454, 454, 0, 454, 454,
455, 455, 0, 455, 455, 457, 457, 0, 457, 457,
458, 458, 0, 458, 458, 459, 0, 459, 460, 460,
0, 460, 460, 461, 461, 0, 461, 461, 462, 462,
0, 462, 462, 463, 463, 464, 464, 463, 464, 464,
465, 465, 0, 465, 465, 466, 466, 0, 466, 466,
467, 467, 468, 468, 467, 468, 468, 469, 469, 0,
469, 469, 470, 470, 0, 470, 470, 471, 471, 0,
471, 471, 472, 472, 0, 472, 472, 473, 473, 0,
473, 473, 474, 474, 0, 475, 474, 475, 476, 476,
477, 477, 476, 477, 477, 478, 0, 478, 479, 479,
0, 479, 479, 480, 480, 481, 481, 480, 481, 481,
482, 482, 0, 482, 482, 483, 483, 484, 484, 483,
484, 484, 485, 485, 486, 486, 485, 486, 486, 488,
488, 0, 488, 488, 489, 489, 0, 489, 489, 490,
490, 0, 490, 490, 491, 491, 0, 491, 491, 492,
492, 0, 492, 492, 493, 493, 0, 493, 493, 494,
494, 0, 494, 494, 495, 0, 495, 496, 496, 0,
496, 496, 497, 497, 0, 497, 497, 498, 498, 499,
499, 498, 499, 499, 500, 500, 0, 500, 500, 501,
501, 0, 501, 501, 502, 502, 503, 503, 502, 503,
503, 504, 504, 0, 504, 504, 505, 505, 0, 505,
505, 506, 506, 0, 506, 506, 507, 507, 0, 507,
508, 508, 509, 509, 508, 509, 509, 510, 510, 511,
511, 510, 511, 511, 512, 512, 0, 512, 512, 513,
513, 0, 513, 513, 514, 514, 515, 515, 514, 515,
515, 516, 516, 0, 516, 516, 517, 517, 0, 517,
517, 518, 518, 0, 518, 518, 519, 519, 0, 519,
519, 520, 520, 0, 520, 520, 521, 521, 0, 521,
521, 522, 522, 0, 522, 522, 523, 523, 0, 523,
523, 524, 0, 524, 525, 525, 0, 525, 526, 526,
0, 526, 526, 527, 527, 0, 527, 527, 528, 528,
0, 528, 528, 529, 529, 0, 529, 529, 530, 530,
0, 530, 530, 531, 531, 0, 531, 531, 532, 532,
0, 532, 532, 533, 533, 0, 533, 533, 534, 534,
0, 534, 534, 535, 535, 0, 535, 535, 536, 536,
0, 536, 536, 537, 537, 0, 537, 537, 538, 538,
0, 538, 538, 539, 539, 0, 539, 539, 540, 540,
0, 540, 540, 541, 541, 0, 541, 541, 542, 542,
0, 542, 542, 543, 543, 0, 543, 543, 544, 544,
0, 544, 544, 545, 545, 0, 545, 545, 546, 546,
0, 546, 546, 547, 547, 0, 547, 547, 548, 548,
0, 548, 548, 549, 0, 549, 550, 550, 0, 550,
550, 551, 551, 0, 551, 551, 552, 552, 0, 552,
552, 553, 553, 0, 553, 553, 554, 0, 554, 555,
555, 0, 555, 555, 556, 556, 0, 556, 556, 557,
557, 0, 557, 557, 558, 558, 0, 558, 558, 559,
559, 0, 559, 559, 560, 560, 0, 560, 560, 561,
561, 562, 562, 561, 562, 562, 563, 563, 0, 563,
563, 564, 564, 565, 565, 564, 565, 565, 566, 566,
567, 567, 566, 567, 567, 568, 568, 0, 568, 568,
569, 569, 0, 569, 569, 570, 570, 0, 570, 570,
571, 571, 0, 571, 571, 572, 572, 0, 572, 572,
573, 573, 0, 573, 573, 574, 574, 0, 574, 574,
575, 575, 0, 575, 575, 576, 576, 0, 576, 576,
577, 577, 0, 577, 577, 578, 578, 0, 578, 578,
579, 579, 0, 579, 579, 580, 580, 0, 580, 580,
581, 581, 0, 581, 581, 582, 582, 0, 582, 582,
583, 583, 0, 583, 583, 584, 584, 0, 584, 584,
585, 585, 0, 585, 585, 586, 586, 0, 586, 586,
587, 587, 0, 587, 587, 588, 588, 0, 588, 588,
589, 589, 0, 589, 589, 590, 590, 0, 590, 590,
592, 592, 592, 592, 592, 593, 593, 593, 593, 593,
594, 594, 0, 594, 594, 595, 595, 595, 596, 596,
596, 596, 596, 597, 597, 0, 597, 597, 598, 598,
0, 598, 598, 599, 599, 599, 599, 599, 600, 600,
0, 600, 600, 601, 601, 0, 601, 601, 602, 0,
602, 603, 603, 603, 603, 603, 604, 604, 604, 604,
604, 605, 605, 0, 605, 605, 606, 606, 0, 606,
606, 607, 607, 607, 607, 607, 608, 608, 608, 608,
608, 609, 609, 609, 609, 609, 610, 610, 610, 610,
610, 611, 611, 0, 611, 611, 612, 612, 0, 612,
612, 613, 613, 0, 613, 613, 614, 614, 614, 614,
614, 615, 615, 615, 615, 615, 616, 616, 616, 616,
616, 617, 617, 617, 617, 617, 618, 618, 618, 0,
618, 619, 619, 0, 619, 619, 620, 620, 620, 620,
620, 621, 621, 621, 621, 621, 622, 622, 0, 622,
622, 623, 623, 623, 623, 623, 624, 624, 624, 624,
624, 625, 625, 625, 625, 625, 626, 626, 0, 626,
626, 627, 627, 0, 627, 627, 628, 628, 628, 628,
628, 629, 629, 629, 629, 629, 630, 630, 630, 630,
630, 631, 631, 631, 631, 631, 632, 632, 632, 0,
632, 633, 633, 633, 633, 633, 634, 634, 634, 634,
634, 635, 635, 635, 635, 635, 636, 636, 636, 636,
636, 637, 637, 637, 637, 637, 638, 638, 638, 638,
638, 639, 639, 639, 639, 639, 640, 640, 640, 0,
640, 641, 641, 641, 641, 641, 642, 642, 642, 642,
642, 643, 643, 643, 643, 643, 644, 644, 644, 644,
644, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
591, 591, 591, 591, 591, 591, 591, 591, 591
} ;
static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static char *yy_full_match;
static int yy_lp;
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
char *yytext;
#line 1 "ffscan.l"
#define INITIAL 0
#line 2 "ffscan.l"
#ifndef lint
static char rcsId[]="$Source: /usr/local/rcs/ForUtil/ffscan/RCS/ffscan.l,v $";
#endif
/*****
* fflow.l : f77 argument checker
*
* This file Version $Revision: 1.5 $
*
* Creation date: Wed Jul 17 22:38:31 GMT+0100 1996
* Last modification: $Date: 1996/08/28 17:50:18 $
* By: $Author: koen $
* Current State: $State: Exp $
*
* Author: koen
* (C)Copyright 1995-1996 Ripley Software Development
* All Rights Reserved
*
* This program has one undocumented switch for debugging purposes:
* -m for memory information under msdos
*****/
/*****
* ChangeLog
* $Log: ffscan.l,v $
* Revision 1.5 1996/08/28 17:50:18 koen
* Changed verbose options and argument printing in count_args.
* Added print_version_id.
*
* Revision 1.4 1996/08/27 19:16:48 koen
* Heavy changes: new scanner rules; optimized memory allocations; Moved
* a number of routines to libflow.c
*
* Revision 1.3 1996/08/07 21:14:56 koen
* Updated for MSDOS
*
* Revision 1.2 1996/08/02 14:50:47 koen
* moved all system dependencies to lib/sysdeps.h
*
* Revision 1.1 1996/07/30 02:04:03 koen
* Initial Revision. Based on fflow and scan_commons.
*
*****/
#ifdef HAVE_CONFIG_H
#include "autoconf.h"
#endif
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "forutil.h"
#include "memmacros.h"
#include "version.h"
#include "libflow.h"
/**** Private Variables ****/
static char *outfile;
static int verbose, num_diff;
static int total_routines, total_calls, total_funcs;
static int never_invoked;
static FILE *output_file;
static char *usage = {"Usage: %s [-fhnqv] [-Eext] [-Idir] [-ofile] [-xname] [files]\n\n"
" Scans the arguments of calls and compares them with the subroutine definition.\n\n"
" Options\n"
"\t-f: print precise location of filenames. Otherwise print name\n"
"\t of file only.\n"
"\t-h, --help: print this help\n"
"\t-n: tell what subroutines are never invoked\n"
"\t-q: be really quiet (usefull if called from a script)\n"
"\t-v: be verbose. Additional -v increases verbosiness\n"
"\t--version: display version number\n"
"\t-Eext: extensions to use for retrieving files. Multiple -E allowed.\n"
"\t-Idir: get files from directory dir. Multiple -I allowed\n"
"\t-ofile: file to write flowgraph to, default is stdout\n"
"\t-xname.f: exclude file. Multiple -x allowed\n\n"
"(C)Copyright 1995-1996 by Ripley Software Development\n"};
/**** Private Functions ****/
static int set_global_option(char *arg);
static inline void count_args(char *text);
static void cross_check(FILE *file, flowInfo *list);
/*****
* On the regular expressions below:
* The routine and program regexps _must_ start with spaces (or tabs) (6 min.)
* at the beginning of a line followed by the name of keyword subroutine or
* program and followed by a space (or a tab)
* The regexp for call and function is different in that it does not have to
* start at the beginning of the line.
* It must start with at least one space and may be preceeded by any combination
* of whitespace, characters, digits and delimiters tokens.
* The name of the (function,subroutine,program) may _not_ start with a left
* or right brace or a single quote. The name itself may be made by any
* combination of alpha-numeric characters and underscores and can be followed
* by an optional space or newline.
* The regexps for the argument blocks is split in two parts.
* The first part is the regexp for a single line of arguments: it may start
* with up to six spaces, followed by any possible character (continuation char)
* any number of spaces and a left brace. After that any number of characters,
* followed by an optional right brace, an optional space and and optional
* newline.
* The second part is an argument list that may start right after the name
* of a (function,subroutine,program). It can have up to five spaces, any
* possible character except a space (continuation char), optional spaces,
* an optional left brace. After that any number of chars followed by an
* optional right brace, space and newline.
* The regexp field <FNAME> contains three different regexps which will
* match (to my knowledge) any formulation of a function or subroutine
* definition with any sort of argument specification, including no arguments.
*****/
#define FNAME 1
#line 1330 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
yy_current_buffer->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 127 "ffscan.l"
#line 1482 "lex.yy.c"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 592 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
++yy_cp;
}
while ( yy_base[yy_current_state] != 2422 );
yy_find_action:
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
for ( ; ; ) /* until we find what rule we matched */
{
if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
{
yy_act = yy_acclist[yy_lp];
{
yy_full_match = yy_cp;
break;
}
}
--yy_cp;
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
if ( yy_act != YY_END_OF_BUFFER )
{
int yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
++yylineno;
}
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 128 "ffscan.l"
; /* eat up comments entirely */
YY_BREAK
case 2:
YY_RULE_SETUP
#line 129 "ffscan.l"
{
action = ADDFUNC;
Type = PROGRAM;
BEGIN FNAME;
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 134 "ffscan.l"
{
numfunc++;
action = ADDFUNC;
Type = FUNCTION;
BEGIN FNAME;
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 140 "ffscan.l"
{
numroutine++;
action = ADDFUNC;
Type = SUBROUTINE;
BEGIN FNAME;
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 146 "ffscan.l"
{
numcall++;
action = ADDCALL;
Type = UNKNOWN;
BEGIN FNAME;
}
YY_BREAK
case 6:
#line 153 "ffscan.l"
case 7:
#line 154 "ffscan.l"
case 8:
YY_RULE_SETUP
#line 154 "ffscan.l"
{
count_args(yytext);
BEGIN 0;
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 158 "ffscan.l"
BEGIN 0;
YY_BREAK
case 10:
YY_RULE_SETUP
#line 159 "ffscan.l"
; /* do nothing for all other remaining chars */
YY_BREAK
case 11:
YY_RULE_SETUP
#line 160 "ffscan.l"
ECHO;
YY_BREAK
#line 1645 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(FNAME):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a singled characater, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 592 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 592 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
yy_is_jam = (yy_current_state == 591);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
if ( c == '\n' )
--yylineno;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
yytext_ptr = yy_c_buf_p;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
{
yy_c_buf_p =
yytext_ptr + YY_MORE_ADJ;
return EOF;
}
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
break;
case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
YY_FATAL_ERROR(
"unexpected last match in yyinput()" );
#else
YY_FATAL_ERROR(
"unexpected last match in input()" );
#endif
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
yy_current_buffer->yy_at_bol = (c == '\n');
if ( yy_current_buffer->yy_at_bol )
++yylineno;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *str )
#else
YY_BUFFER_STATE yy_scan_string( str )
yyconst char *str;
#endif
{
int len;
for ( len = 0; str[len]; ++len )
;
return yy_scan_bytes( str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 160 "ffscan.l"
/*****
* Count all arguments in the given text
*****/
static inline void
count_args(char *text)
{
char *string = text;
char func_name[64];
char *args = NULL;
int brace = 0, num_args = 0, num_line = 0, at_bol = 0;
/* get function name */
for(;*string !='\0' && *string != '(' && *string != '\n' &&
!isspace(*string) ; string++);
/* do not overflow name space */
strncpy(func_name, text, string - text > 64 ? 64 : string - text);
/* null-terminate */
func_name[string-text] = '\0';
/* only if we have to be very verbose */
if(verbose > 2)
{
char *chPtr;
int i = 0;
/* copy remaining args */
checked_alloca(args, strlen(text), char);
strncpy(args, string, strlen(string));
args[strlen(string)] = '\0';
printf("-------------------\n");
/*
* print out the text preceeded with line numbers.
* This slows things seriously down!
*/
printf("line %i, text scanned:\n", yylineno);
printf("%i: ", i);
for(chPtr = text; *chPtr != '\0'; chPtr++)
{
putc(*chPtr, stdout);
if(*chPtr == '\n' && *(chPtr+1)!='\0')
printf("%i:", ++i);
}
putc('\n', stdout);
}
while(*string)
{
switch(*string)
{
case '(': /* initialize argcount. */
if(num_args == 0)
num_args++;
brace++;
break;
case ')':
brace--;
break;
case '*': /* eat up comments entirely */
case 'c':
case 'C':
if(at_bol)
{
if(verbose > 2)
printf("Rejecting comment on "
"line %i\n", num_line);
while(*string != '\0' &&
*string != '\n')
string++;
at_bol = 0;
}
break;
case '\'':
string++;
while(*string != '\0' && *string != '\'')
{
if(*string == '\n')
num_line++;
string++;
}
break;
case ',': /* only when single left brace open*/
if(brace == 1)
num_args++;
break;
}
if(*string == '\0')
break;
at_bol = 0;
if(*string == '\n')
{
num_line++;
at_bol = 1;
}
string++;
}
/* only if we have to be very verbose */
if(verbose > 2)
{
if(action == ADDFUNC)
printf("routine name is %s\nargs are: %s", func_name,
num_args == 0 ? "<none>\n":args);
if(action == ADDCALL)
printf("call made: %s\nargs supplied are: %s",
func_name, num_args == 0 ? "<none>\n":args);
printf("brace count: %i\nargcount: %i\n", brace, num_args);
printf("-------------------\n");
fflush(stdout);
}
/* 19 continuation lines allowed by f77 standard */
if(num_line > 18)
{
fprintf(stderr, "WARNING: more than 19 continuation "
"lines ");
if(Type == ADDFUNC)
fprintf(stderr, "in routine %s.\n", func_name);
else
fprintf(stderr, "in call to %s.\n", func_name);
fprintf(stderr,"near line %i in file %s%s\n", yylineno,
curr_path, curr_file);
}
if(brace != 0)
{
if(brace < 0)
fprintf(stderr, "WARNING: unbalanced right brace ");
else
fprintf(stderr, "WARNING: unbalanced left brace ");
fprintf(stderr, "on line %i of argument list ", num_line);
if(Type == ADDFUNC)
fprintf(stderr, "in routine %s.\n", func_name);
else
fprintf(stderr, "in call to %s.\n", func_name);
fprintf(stderr,"near line %i in file %s%s\n", yylineno,
curr_path, curr_file);
}
/*
* Depending on the action taken,
* add a new function to the flowgraph list or
* add an entry for a call made in the current
* function
*/
if(action == ADDFUNC)
add_new_func(func_name, yylineno, curr_path, curr_file,
num_args);
else
add_new_call(func_name, yylineno, num_args);
}
/*****
* Perform argument check
*****/
static void
cross_check(FILE *file, flowInfo *list)
{
flowInfo *curr_func, *call;
for(curr_func = list; curr_func != NULL; curr_func = curr_func->next)
{
for(call = curr_func->calls; call != NULL; call = call->next)
{
if(call->parent &&
call->num_args != call->parent->num_args)
{
num_diff++;
if(full_names)
{
fprintf(file, "---> %s called with %i "
"args\n",
call->name, call->num_args);
fprintf(file, "near line %i of %s%s\n",
call->defline, curr_func->path,
curr_func->file);
fprintf(file, "Defined with %i args "
"near line %i in \n",
call->parent->num_args,
call->parent->defline);
fprintf(file, "%s%s\n",
call->parent->path,
call->parent->file);
}
else
{
fprintf(file, "---> %s called with %i "
"args ",
call->name, call->num_args);
fprintf(file, "near line %i of %s\n",
call->defline,
curr_func->file);
fprintf(file, "Defined with %i args ",
call->parent->num_args);
fprintf(file, "near line %i in %s\n",
call->parent->defline,
call->parent->file);
}
}
}
}
}
/*****
* Scan command line options
*****/
static int
set_global_option(char *arg)
{
switch(arg[0])
{
case 'f' : /* use full names instead of filename only.*/
full_names = 1 ;
break;
case 'h' : /* help requested */
printf(usage, progname);
exit(2);
case 'n' : /* tell what subroutines are never invoked */
never_invoked = 1;
break;
#ifdef __MSDOS__
case 'm' : /* show memory usage under msdos */
need_mem_info_for_msdos = 1;
break;
#endif
case 'q' : /* be really quiet */
quiet = 1;
verbose = 0;
break;
case 'v' : /* be verbose */
verbose++;
break;
case 'E' : /* an extension specification */
SCAN_ARG("-E");
if(num_extensions == MAXEXTS)
{
fprintf(stderr, "Capacity exceeded, more than "
"%i extensions given on command line\n",
MAXEXTS);
fprintf(stderr,"Ignoring extension %s\n",arg+1);
}
else
{
checked_malloc(ext_table[num_extensions],
strlen(arg+1)+1, char);
strcpy(ext_table[num_extensions++], arg+1);
#ifdef __MSDOS__ /* dos returns uppercase when building a filelist */
upcase(ext_table[num_extensions-1]);
#endif
}
return(1);
case 'I' : /* a directory specification */
SCAN_ARG("-I");
if(num_dirs_to_visit == MAXDIRS)
{
fprintf(stderr,"Capacity exceeded, more than %i"
" directories given on command line\n",
MAXDIRS);
fprintf(stderr,"Ignoring directory %s\n",arg+1);
}
else
{
checked_malloc(dirs_to_visit[num_dirs_to_visit],
strlen(arg+1)+1, char);
strcpy(dirs_to_visit[num_dirs_to_visit++],
arg+1);
}
return(1);
case 'o' : /* name of the output file */
SCAN_ARG("-o");
outfile = arg + 1;
return(1);
case 'x' : /* ignore the given file */
SCAN_ARG("-x");
if(num_ignore == MAXIGNORE)
{
fprintf(stderr, "Capacity exceeded, more than "
"%i ignores given on command line\n",
MAXIGNORE);
fprintf(stderr, "Ignoring option -x%s\n",arg+1);
}
else
{
checked_malloc(ignore_list[num_ignore],
strlen(arg+1)+1, char);
strcpy(ignore_list[num_ignore++], arg+1);
#ifdef __MSDOS__ /* dos returns uppercase when building a filelist */
upcase(ignore_list[num_ignore-1]);
#endif
}
return(1);
case '-' : /* secondary options */
if(!strcmp("help", arg+1)) /* help wanted */
{
printf(usage, progname);
exit(2);
}
if(!strcmp("version", arg+1)) /* show version number*/
{
print_version_id(progname, VERSION, "$Revision: 1.5 $");
exit(2);
} /* fall through */
default:
fprintf(stderr,"unknown option -%s\n", arg);
exit(3);
}
return(0);
}
/*****
* main for ffscan
*****/
int
main (int argc, char **argv)
{
int i, narg;
char *arg;
/* set global default values */
initialise(argv[0]);
if(argc == 1)
{
fprintf(stderr, "%s: no files given\n",progname);
printf(usage, progname);
exit(4);
}
/* Default values */
outfile = "stdout";
/* scan for any command line options */
arg = argv[narg = 1];
while ( narg < argc && arg[0] == '-' )
{
if (arg[0] == '-')
{
int num_opts = strlen(arg) ;
for(i = 1 ; i < num_opts ; i++ )
if(set_global_option(++arg))
break;
}
arg = argv[++narg];
}
/* if no directories nor any files are given, exit */
if(num_dirs_to_visit == 0 && narg == argc)
{
fprintf(stderr,"no files given.\n");
exit(4);
}
/* install signal handlers */
install_sig_handlers();
/* open the output file */
if(!strcmp(outfile, "stdout"))
output_file = stdout;
else if((output_file = fopen(outfile, "w")) == NULL)
{
perror(outfile);
exit(6);
}
/*
* always use this extension of none is given and directories are to be
* searched. 3 equals the size of .f\0
*/
if(num_dirs_to_visit && !num_extensions)
{
checked_malloc(ext_table[num_extensions], 3, char);
#ifdef __MSDOS__ /* msdos returns uppercase when building a filelist */
ext_table[num_extensions++] = ".F";
#else
ext_table[num_extensions++] = ".f";
#endif
}
/* when directories have been given on the cmdline, build a filelist */
if(num_dirs_to_visit && verbose > 1)
printf("Scanning directories:\n");
/* build a list of all files in the given directories (if any) */
for(i = 0 ; i < num_dirs_to_visit; i++)
{
if(verbose > 1)
printf("%s\n", dirs_to_visit[i]);
build_file_list(&file_list, &num_files, dirs_to_visit[i],
ext_table, num_extensions);
}
/* see if we have files left on the command line */
if(narg != argc)
{
for(i = narg ; i < argc ; i++)
{
checked_realloc(file_list, num_files+1, char*);
checked_malloc(file_list[num_files], strlen(argv[i])+1,
char);
sprintf(file_list[num_files++], "%s", argv[i]);
}
if(verbose > 1 && argc-narg !=0)
printf("%i files given on command line.\n", argc - narg);
}
/* show settings if we have to be a little bit verbose */
if(verbose > 1)
print_settings();
if(verbose > 1)
{
printf("Total Files to scan: %i\n", num_files);
printf("File to write to: %s\n", outfile);
}
fflush(stdout);
/* purge any non-matching output from yylex to /dev/null */
yyout = fopen(YYOUT_DEVICE, "w+");
/* scan the file list */
for(i = 0; i < num_files; i++)
{
if ((num_ignore == 0 ? 1 : ignore_this_file(file_list[i])))
{
/* reset scanner for this file */
if((yyin = reset_scanner(file_list[i])) == NULL)
continue;
yylineno = 0;
/* scan the file */
yylex();
/*
* flush the buffer of flex so we won't have
* any trailing stuff from the previous file
*/
YY_FLUSH_BUFFER;
/* close input file */
fclose(yyin);
/* report some statistics if we have to */
if(verbose)
print_file_stats(output_file, file_list[i],
yylineno);
total_routines += numroutine;
total_calls += numcall;
total_funcs += numfunc;
}
}
fclose(yyout);
/* this is the final flowgraph data */
flow = global_flow.head;
if(!quiet)
printf("Sorting...\n");
fflush(stdout);
/* Sort the flowgraph */
flow = sortAll(flow);
/* do argument check */
cross_check(output_file, flow);
/* print subroutines that are never invoked */
if(never_invoked)
print_unused_routines(output_file, flow);
if(verbose)
{
fprintf(output_file, "Checked %i files.\n", num_files);
fprintf(output_file, "Found %i subroutine definitions\n",
total_routines);
fprintf(output_file, "Found %i function definitions\n",
total_funcs);
fprintf(output_file, "Found %i calls to subroutines\n",
total_calls);
fprintf(output_file, "Checked %i calls in %i defined "
"subroutines in %i files.\n",
total_calls, total_routines, num_files);
}
/* report final results */
if(strcmp(outfile, "stdout") || !quiet)
{
if(num_diff)
fprintf(output_file, "Found %i argument mismatches.\n",
num_diff);
else
fprintf(output_file, "No argument mismatches found.\n");
}
/* close output file */
if(strcmp(outfile, "stdout"))
{
fflush(output_file);
fclose(output_file);
}
/* when wanted, print msdos memory usage summary */
print_dos_memory_usage();
if(num_diff)
return(12);
else
return(0);
}