2 /*----------------------------------------------------------------------+
4 | This file contains the structures and defines that are needed to use |
5 | the parser from a C program. |
6 | ** customized for the JOIN and SUBST utilities ** |
11 +----------------------------------------------------------------------*/
16 struct p_parmsx *p_parmsx_address; /* address of p_parmsx */
17 unsigned char p_num_extra; /* number of extra stuff */
22 unsigned char p_minp; /* Minimum positional number */
23 unsigned char p_maxp; /* Maximum positional number */
24 struct p_control_blk *p_control1; /* Address of the 1st CONTROL block */
25 struct p_control_blk *p_control2; /* Address of the 2nd CONTROL block */
26 unsigned char p_maxs; /* Maximun switches */
27 struct p_switch_blk *p_switch; /* Address of the SWITCH block */
28 unsigned char p_maxk; /* Maximum keywords */
34 unsigned int p_match_flag; /* Controls type matched */
35 unsigned int p_function_flag; /* Function should be taken */
36 unsigned int p_result_buf; /* Result buffer address */
37 unsigned int p_value_list; /* Value list address */
38 unsigned char p_nid; /* # of keyword/SW synonyms */
43 unsigned int sp_match_flag; /* Controls type matched */
44 unsigned int sp_function_flag; /* Function should be taken */
45 unsigned int sp_result_buf; /* Result buffer address */
46 unsigned int sp_value_list; /* Value list address */
47 unsigned char sp_nid; /* # of keyword/SW synonyms */
48 unsigned char sp_keyorsw[3]; /* keyword or sw */
53 #define P_Num_Val 0x8000 /* Numeric Value */
54 #define P_SNum_Val 0x4000 /* Signed numeric value */
55 #define P_Simple_S 0x2000 /* Simple string */
56 #define P_Date_S 0x1000 /* Date string */
57 #define P_Time_S 0x0800 /* Time string */
58 #define P_Cmpx_S 0x0400 /* Complex string */
59 #define P_File_Spc 0x0200 /* File Spec */
60 #define P_Drv_Only 0x0100 /* Drive Only */
61 #define P_Qu_String 0x0080 /* Quoted string */
62 #define P_Ig_Colon 0x0010 /* Ignore colon at end in match */
63 #define P_Repeat 0x0002 /* Repeat allowed */
64 #define P_Optional 0x0001 /* Optional */
66 /*----------------------------------------------------------------------+
70 +----------------------------------------------------------------------*/
72 #define P_CAP_File 0x0001 /* CAP result by file table */
73 #define P_CAP_Char 0x0002 /* CAP result by character table */
74 #define P_Rm_Colon 0x0010 /* Remove ":" at the end */
78 #define P_nval_None 0 /* no value list ID */
79 #define P_nval_Range 1 /* range list ID */
80 #define P_nval_Value 2 /* value list ID */
81 #define P_nval_String 3 /* string list ID */
82 #define P_Len_Range 9 /* Length of a range choice(two DD plus one DB) */
83 #define P_Len_Value 5 /* Length of a value choice(one DD plus one DB) */
84 #define P_Len_String 3 /* Length of a string choice(one DW plus one DB) */
87 /*----------------------------------------------------------------------+
89 | Result block structure |
91 +----------------------------------------------------------------------*/
95 unsigned char P_Type; /* Type returned */
96 unsigned char P_Item_Tag; /* Matched item tag */
97 unsigned int P_SYNONYM_Ptr; /* pointer to Synonym list returned */
98 unsigned int p_result_buff[2]; /* result value */
103 unsigned char fP_Type; /* Type returned */
104 unsigned char fP_Item_Tag; /* Matched item tag */
105 unsigned int fP_SYNONYM_Ptr; /* pointer to Synonym list returned */
106 char far * fp_result_buff; /* result value */
109 /*----------------------------------------------------------------------+
113 +----------------------------------------------------------------------*/
115 #define P_EOL 0 /* End of line */
116 #define P_Number 1 /* Number */
117 #define P_List_Idx 2 /* List Index */
118 #define P_String 3 /* String */
119 #define P_Complex 4 /* Complex */
120 #define P_File_Spec 5 /* File Spec */
121 #define P_Drive 6 /* Drive */
122 #define P_Date_F 7 /* Date */
123 #define P_Time_F 8 /* Time */
124 #define P_Quoted_String 9 /* Quoted String */
126 #define P_No_Tag 0x0FF /* No ITEM_TAG found */
128 /*----------------------------------------------------------------------+
130 | Value list structure |
132 +----------------------------------------------------------------------*/
139 /*----------------------------------------------------------------------+
141 | following return code will be returned in the AX register. |
143 +----------------------------------------------------------------------*/
145 #define P_No_Error 0 /* No error */
146 #define P_Too_Many 1 /* Too many operands */
147 #define P_Op_Missing 2 /* Required operand missing */
148 #define P_Not_In_SW 3 /* Not in switch list provided */
149 #define P_Not_In_Key 4 /* Not in keyword list provided */
150 #define P_Out_Of_Range 6 /* Out of range specified */
151 #define P_Not_In_Val 7 /* Not in value list provided */
152 #define P_Not_In_Str 8 /* Not in string list provided */
153 #define P_Syntax 9 /* Syntax error */
154 #define P_RC_EOL 0x0ffff /* End of command line */