/* <tpadef.h>
 *
 *	TPARSE control block (LIB$TPARSE)
 */
#ifndef _TPADEF_H
#define _TPADEF_H
/*
   This block is one of the arguments used to call TPARSE,
   and becomes the argument list to action routines.
 */
#define TPA$K_COUNT0	8	/* ZERO LEVEL VALUE IS 8 */
#define TPA$V_BLANKS	0
#define TPA$V_ABBREV	1
#define TPA$V_ABBRFM	2
#define TPA$V_AMBIG	16
#define TPA$M_BLANKS	(1<<TPA$V_BLANKS)	/* 0x01 */
#define TPA$M_ABBREV	(1<<TPA$V_ABBREV)	/* 0x02 */
#define TPA$M_ABBRFM	(1<<TPA$V_ABBRFM)	/* 0x04 */
#define TPA$M_AMBIG	(1<<TPA$V_AMBIG)	/* 0x010000 */
#define TPA$K_LENGTH0	36	/* length of zero level parameter block */
#define TPA$C_LENGTH0	36
struct tpadef {
    unsigned long tpa$l_count;		/* argument count (number of longwords) */
    union {
	unsigned long tpa$l_options;	/* options longword */
	struct {
	    unsigned tpa$v_blanks : 1;	/* process blanks and tabs explicitly */
	    unsigned tpa$v_abbrev : 1;	/* allow minimal abbreviation */
	    unsigned tpa$v_abbrfm : 1;	/* allow first match abbreviation */
	    unsigned		  : 13;
	    unsigned tpa$v_ambig  : 1;	/* ambiguous keyword at this state */
	    unsigned		  : 7;
	    unsigned		  : 8;	/* padding */
	} tpa$r_options_bits;
	struct {
	    unsigned	: 8, : 8, : 8;	/* char fill[3]; */
	    unsigned char tpa$b_mcount; /* minimum abbreviation on keywords */
	} tpa$r_options_fields;
    } tpa$r_options_overlay;
    unsigned long tpa$l_stringcnt;	/* byte count of string being parsed */
    unsigned long tpa$l_stringptr;	/* address of string being parsed */
    unsigned long tpa$l_tokencnt;	/* byte count of current matching token */
    unsigned long tpa$l_tokenptr;	/* address of matching token */
    union {
	unsigned long tpa$l_char;	/* ascii code of single character token */
	unsigned char tpa$b_char;	/* byte form of single char cell */
    } tpa$r_char_overlay;
    unsigned long tpa$l_number;		/* numeric value of numeric token */
    unsigned long tpa$l_param;		/* parameter longword from state table */
};

#endif	/*_TPADEF_H*/
