version 1.12, 2015/11/19 23:20:34 |
version 1.13, 2015/11/19 23:34:56 |
|
|
|
|
/* Always be prepared to generate an 8-bit scanner. */ |
/* Always be prepared to generate an 8-bit scanner. */ |
#define CSIZE 256 |
#define CSIZE 256 |
#define Char unsigned char |
|
|
|
/* Size of input alphabet - should be size of ASCII set. */ |
/* Size of input alphabet - should be size of ASCII set. */ |
#ifndef DEFAULT_CSIZE |
#ifndef DEFAULT_CSIZE |
|
|
|
|
extern int lastccl, *cclmap, *ccllen, *cclng, cclreuse; |
extern int lastccl, *cclmap, *ccllen, *cclng, cclreuse; |
extern int current_maxccls, current_max_ccl_tbl_size; |
extern int current_maxccls, current_max_ccl_tbl_size; |
extern Char *ccltbl; |
extern u_char *ccltbl; |
|
|
|
|
/* Variables for miscellaneous information: |
/* Variables for miscellaneous information: |
|
|
(char *) reallocate_array( (void *) array, size, sizeof( char ) ) |
(char *) reallocate_array( (void *) array, size, sizeof( char ) ) |
|
|
#define allocate_Character_array(size) \ |
#define allocate_Character_array(size) \ |
(Char *) allocate_array( size, sizeof( Char ) ) |
(u_char *) allocate_array( size, sizeof( u_char ) ) |
|
|
#define reallocate_Character_array(array,size) \ |
#define reallocate_Character_array(array,size) \ |
(Char *) reallocate_array( (void *) array, size, sizeof( Char ) ) |
(u_char *) reallocate_array( (void *) array, size, sizeof( u_char ) ) |
|
|
|
|
/* Used to communicate between scanner and parser. The type should really |
/* Used to communicate between scanner and parser. The type should really |
|
|
extern int cre8ecs PROTO ((int[], int[], int)); |
extern int cre8ecs PROTO ((int[], int[], int)); |
|
|
/* Update equivalence classes based on character class transitions. */ |
/* Update equivalence classes based on character class transitions. */ |
extern void mkeccl PROTO ((Char[], int, int[], int[], int, int)); |
extern void mkeccl PROTO ((u_char[], int, int[], int[], int, int)); |
|
|
/* Create equivalence class for single character. */ |
/* Create equivalence class for single character. */ |
extern void mkechar PROTO ((int, int[], int[])); |
extern void mkechar PROTO ((int, int[], int[])); |
|
|
extern void check_char PROTO ((int c)); |
extern void check_char PROTO ((int c)); |
|
|
/* Replace upper-case letter to lower-case. */ |
/* Replace upper-case letter to lower-case. */ |
extern Char clower PROTO ((int)); |
extern u_char clower PROTO ((int)); |
|
|
/* Returns a dynamically allocated copy of a string. */ |
/* Returns a dynamically allocated copy of a string. */ |
extern char *copy_string PROTO ((const char *)); |
extern char *copy_string PROTO ((const char *)); |
|
|
/* Returns a dynamically allocated copy of a (potentially) unsigned string. */ |
/* Returns a dynamically allocated copy of a (potentially) unsigned string. */ |
extern Char *copy_unsigned_string PROTO ((Char *)); |
extern u_char *copy_unsigned_string PROTO ((u_char *)); |
|
|
/* Compare two characters for use by qsort with '\0' sorting last. */ |
/* Compare two characters for use by qsort with '\0' sorting last. */ |
extern int cclcmp PROTO ((const void *, const void *)); |
extern int cclcmp PROTO ((const void *, const void *)); |
|
|
#endif /* ! HAVE_DECL___func__ */ |
#endif /* ! HAVE_DECL___func__ */ |
|
|
/* Convert a hexadecimal digit string to an integer value. */ |
/* Convert a hexadecimal digit string to an integer value. */ |
extern int htoi PROTO ((Char[])); |
extern int htoi PROTO ((u_char[])); |
|
|
/* Report an error message formatted with one integer argument. */ |
/* Report an error message formatted with one integer argument. */ |
extern void lerrif PROTO ((const char *, int)); |
extern void lerrif PROTO ((const char *, int)); |
|
|
extern int myctoi PROTO ((const char *)); |
extern int myctoi PROTO ((const char *)); |
|
|
/* Return character corresponding to escape sequence. */ |
/* Return character corresponding to escape sequence. */ |
extern Char myesc PROTO ((Char[])); |
extern u_char myesc PROTO ((u_char[])); |
|
|
/* Convert an octal digit string to an integer value. */ |
/* Convert an octal digit string to an integer value. */ |
extern int otoi PROTO ((Char[])); |
extern int otoi PROTO ((u_char[])); |
|
|
/* Output a (possibly-formatted) string to the generated scanner. */ |
/* Output a (possibly-formatted) string to the generated scanner. */ |
extern void out PROTO ((const char *)); |
extern void out PROTO ((const char *)); |
|
|
/* from file sym.c */ |
/* from file sym.c */ |
|
|
/* Save the text of a character class. */ |
/* Save the text of a character class. */ |
extern void cclinstal PROTO ((Char[], int)); |
extern void cclinstal PROTO ((u_char[], int)); |
|
|
/* Lookup the number associated with character class. */ |
/* Lookup the number associated with character class. */ |
extern int ccllookup PROTO ((Char[])); |
extern int ccllookup PROTO ((u_char[])); |
|
|
extern void ndinstal PROTO ((const char *, Char[])); /* install a name definition */ |
extern void ndinstal PROTO ((const char *, u_char[])); /* install a name definition */ |
extern Char *ndlookup PROTO ((const char *)); /* lookup a name definition */ |
extern u_char *ndlookup PROTO ((const char *)); /* lookup a name definition */ |
|
|
/* Increase maximum number of SC's. */ |
/* Increase maximum number of SC's. */ |
extern void scextend PROTO ((void)); |
extern void scextend PROTO ((void)); |