|
|
1.1 ! root 1: #ifndef LEX_H ! 2: #define LEX_H ! 3: ! 4: /* ! 5: *-IMPORTS: ! 6: * <sys/compat.h> ! 7: * CONST ! 8: * EXTERN_C_BEGIN ! 9: * EXTERN_C_END ! 10: * PROTO () ! 11: * <stddef.h> ! 12: * size_t ! 13: */ ! 14: ! 15: #include <sys/compat.h> ! 16: #include <stddef.h> ! 17: ! 18: ! 19: #ifndef LEX_T ! 20: #define LEX_T ! 21: typedef struct lexinfo lex_t; ! 22: #endif ! 23: ! 24: ! 25: /* ! 26: * Structure for communicating lexical parameters to the tokenizer. ! 27: */ ! 28: ! 29: struct lexinfo { ! 30: CONST lex_t * l_prev; /* for stacking lexical rules */ ! 31: ! 32: CONST char * l_flush; /* leading flush characters */ ! 33: CONST char * l_sep; /* separator/terminator characters */ ! 34: CONST char * l_valid; /* characters that are valid */ ! 35: CONST char * l_error; /* characters that are errors */ ! 36: }; ! 37: ! 38: extern CONST char LEX_WILD [1]; /* special wildcard value */ ! 39: ! 40: ! 41: #define STD_FLUSH " \t\r" ! 42: #define STD_SEP " \t\r\n" ! 43: ! 44: extern lex_t WHITESPACE []; ! 45: ! 46: ! 47: enum { CLASS_FLUSH, ! 48: CLASS_SEP, ! 49: CLASS_VALID ! 50: }; ! 51: ! 52: ! 53: EXTERN_C_BEGIN ! 54: ! 55: int classify PROTO ((lex_t * _lexp, int _char, ! 56: int _flushflag)); ! 57: ! 58: EXTERN_C_END ! 59: ! 60: #endif /* ! defined (LEX_H) */ ! 61:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.