File:  [MW Coherent from dump] / coherent / b / STREAMS / conf / bin / src / lex.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:36 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

#ifndef	LEX_H
#define	LEX_H

/*
 *-IMPORTS:
 *	<sys/compat.h>
 *		CONST
 *		EXTERN_C_BEGIN
 *		EXTERN_C_END
 *		PROTO ()
 *	<stddef.h>
 *		size_t
 */

#include <sys/compat.h>
#include <stddef.h>


#ifndef	LEX_T
#define	LEX_T
typedef struct lexinfo	lex_t;
#endif


/*
 * Structure for communicating lexical parameters to the tokenizer.
 */

struct lexinfo {
	CONST lex_t   *	l_prev;		/* for stacking lexical rules */

	CONST char    *	l_flush;	/* leading flush characters */
	CONST char    *	l_sep;		/* separator/terminator characters */
	CONST char    *	l_valid;	/* characters that are valid */
	CONST char    *	l_error;	/* characters that are errors */
};

extern CONST char	LEX_WILD [1];	/* special wildcard value */


#define	STD_FLUSH	" \t\r"
#define	STD_SEP		" \t\r\n"

extern lex_t		WHITESPACE [];


enum {	CLASS_FLUSH,
	CLASS_SEP,
	CLASS_VALID
};


EXTERN_C_BEGIN

int		classify	PROTO ((lex_t * _lexp, int _char,
					int _flushflag));

EXTERN_C_END

#endif	/* ! defined (LEX_H) */


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.