📄 flexdef.h
字号:
* numdup - number of duplicate transitions * hshsave - number of hash collisions saved by checking number of states * num_backing_up - number of DFA states requiring backing up * bol_needed - whether scanner needs beginning-of-line recognition */extern char nmstr[MAXLINE];extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;extern int num_backing_up, bol_needed;void *allocate_array PROTO((int, int));void *reallocate_array PROTO((void*, int, int));void *flex_alloc PROTO((unsigned int));void *flex_realloc PROTO((void*, unsigned int));void flex_free PROTO((void*));#define allocate_integer_array(size) \ (int *) allocate_array( size, sizeof( int ) )#define reallocate_integer_array(array,size) \ (int *) reallocate_array( (void *) array, size, sizeof( int ) )#define allocate_int_ptr_array(size) \ (int **) allocate_array( size, sizeof( int * ) )#define allocate_char_ptr_array(size) \ (char **) allocate_array( size, sizeof( char * ) )#define allocate_dfaacc_union(size) \ (union dfaacc_union *) \ allocate_array( size, sizeof( union dfaacc_union ) )#define reallocate_int_ptr_array(array,size) \ (int **) reallocate_array( (void *) array, size, sizeof( int * ) )#define reallocate_char_ptr_array(array,size) \ (char **) reallocate_array( (void *) array, size, sizeof( char * ) )#define reallocate_dfaacc_union(array, size) \ (union dfaacc_union *) \ reallocate_array( (void *) array, size, sizeof( union dfaacc_union ) )#define allocate_character_array(size) \ (char *) allocate_array( size, sizeof( char ) )#define reallocate_character_array(array,size) \ (char *) reallocate_array( (void *) array, size, sizeof( char ) )#define allocate_Character_array(size) \ (Char *) allocate_array( size, sizeof( Char ) )#define reallocate_Character_array(array,size) \ (Char *) reallocate_array( (void *) array, size, sizeof( Char ) )/* Used to communicate between scanner and parser. The type should really * be YYSTYPE, but we can't easily get our hands on it. */extern int yylval;/* External functions that are cross-referenced among the flex source files. *//* from file ccl.c */extern void ccladd PROTO((int, int)); /* add a single character to a ccl */extern int cclinit PROTO((void)); /* make an empty ccl */extern void cclnegate PROTO((int)); /* negate a ccl *//* List the members of a set of characters in CCL form. */extern void list_character_set PROTO((FILE*, int[]));/* from file dfa.c *//* Increase the maximum number of dfas. */extern void increase_max_dfas PROTO((void));extern void ntod PROTO((void)); /* convert a ndfa to a dfa *//* from file ecs.c *//* Convert character classes to set of equivalence classes. */extern void ccl2ecl PROTO((void));/* Associate equivalence class numbers with class members. */extern int cre8ecs PROTO((int[], int[], int));/* Update equivalence classes based on character class transitions. */extern void mkeccl PROTO((Char[], int, int[], int[], int, int));/* Create equivalence class for single character. */extern void mkechar PROTO((int, int[], int[]));/* from file gen.c */extern void make_tables PROTO((void)); /* generate transition tables *//* from file main.c */extern void flexend PROTO((int));extern void usage PROTO((void));/* from file misc.c *//* Add the given text to the stored actions. */extern void add_action PROTO(( char *new_text ));/* True if a string is all lower case. */extern int all_lower PROTO((register char *));/* True if a string is all upper case. */extern int all_upper PROTO((register char *));/* Bubble sort an integer array. */extern void bubble PROTO((int [], int));/* Check a character to make sure it's in the expected range. */extern void check_char PROTO((int c));/* Shell sort a character array. */extern void cshell PROTO((Char [], int, int));/* Finish up a block of data declarations. */extern void dataend PROTO((void));/* Report an error message and terminate. */extern void flexerror PROTO((char[]));/* Report a fatal error message and terminate. */extern void flexfatal PROTO((char[]));/* Report an error message formatted with one integer argument. */extern void lerrif PROTO((char[], int));/* Report an error message formatted with one string argument. */extern void lerrsf PROTO((char[], char[]));/* Spit out a "# line" statement. */extern void line_directive_out PROTO((FILE*));/* Mark the current position in the action array as the end of the section 1 * user defs. */extern void mark_defs1 PROTO((void));/* Mark the current position in the action array as the end of the prolog. */extern void mark_prolog PROTO((void));/* Generate a data statment for a two-dimensional array. */extern void mk2data PROTO((int));extern void mkdata PROTO((int)); /* generate a data statement *//* Return the integer represented by a string of digits. */extern int myctoi PROTO((char []));/* Return a printable version of the given character, which might be * 8-bit. */extern char *readable_form PROTO((int));/* Write out one section of the skeleton file. */extern void skelout PROTO((void));/* Output a yy_trans_info structure. */extern void transition_struct_out PROTO((int, int));/* Only needed when using certain broken versions of bison to build parse.c. */extern void *yy_flex_xmalloc PROTO(( int ));/* Set a region of memory to 0. */extern void zero_out PROTO((char *, int));/* from file nfa.c *//* Add an accepting state to a machine. */extern void add_accept PROTO((int, int));/* Make a given number of copies of a singleton machine. */extern int copysingl PROTO((int, int));/* Debugging routine to write out an nfa. */extern void dumpnfa PROTO((int));/* Finish up the processing for a rule. */extern void finish_rule PROTO((int, int, int, int));/* Connect two machines together. */extern int link_machines PROTO((int, int));/* Mark each "beginning" state in a machine as being a "normal" (i.e., * not trailing context associated) state. */extern void mark_beginning_as_normal PROTO((register int));/* Make a machine that branches to two machines. */extern int mkbranch PROTO((int, int));extern int mkclos PROTO((int)); /* convert a machine into a closure */extern int mkopt PROTO((int)); /* make a machine optional *//* Make a machine that matches either one of two machines. */extern int mkor PROTO((int, int));/* Convert a machine into a positive closure. */extern int mkposcl PROTO((int));extern int mkrep PROTO((int, int, int)); /* make a replicated machine *//* Create a state with a transition on a given symbol. */extern int mkstate PROTO((int));extern void new_rule PROTO((void)); /* initialize for a new rule *//* from file parse.y *//* Write out a message formatted with one string, pinpointing its location. */extern void format_pinpoint_message PROTO((char[], char[]));/* Write out a message, pinpointing its location. */extern void pinpoint_message PROTO((char[]));/* Write out a warning, pinpointing it at the given line. */void line_warning PROTO(( char[], int ));/* Write out a message, pinpointing it at the given line. */void line_pinpoint PROTO(( char[], int ));/* Report a formatted syntax error. */extern void format_synerr PROTO((char [], char[]));extern void synerr PROTO((char [])); /* report a syntax error */extern void warn PROTO((char [])); /* report a warning */extern int yyparse PROTO((void)); /* the YACC parser *//* from file scan.l *//* The Flex-generated scanner for flex. */extern int flexscan PROTO((void));/* Open the given file (if NULL, stdin) for scanning. */extern void set_input_file PROTO((char*));/* Wrapup a file in the lexical analyzer. */extern int yywrap PROTO((void));/* from file sym.c *//* Save the text of a character class. */extern void cclinstal PROTO ((Char [], int));/* Lookup the number associated with character class. */extern int ccllookup PROTO((Char []));extern void ndinstal PROTO((char[], Char[])); /* install a name definition *//* Increase maximum number of SC's. */extern void scextend PROTO((void));extern void scinstal PROTO((char[], int)); /* make a start condition *//* Lookup the number associated with a start condition. */extern int sclookup PROTO((char[]));/* from file tblcmp.c *//* Build table entries for dfa state. */extern void bldtbl PROTO((int[], int, int, int, int));extern void cmptmps PROTO((void)); /* compress template table entries */extern void expand_nxt_chk PROTO((void)); /* increase nxt/chk arrays */extern void inittbl PROTO((void)); /* initialize transition tables *//* Make the default, "jam" table entries. */extern void mkdeftbl PROTO((void));/* Create table entries for a state (or state fragment) which has * only one out-transition. */extern void mk1tbl PROTO((int, int, int, int));/* Place a state into full speed transition table. */extern void place_state PROTO((int*, int, int));/* Save states with only one out-transition to be processed later. */extern void stack1 PROTO((int, int, int, int));/* from file yylex.c */extern int yylex PROTO((void));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -