2 /*----------------------------------------------------------------------+
4 | This file contains the structures and defines that are needed to use |
5 | the parser from a C program. |
10 +----------------------------------------------------------------------*/
13 #define P_Len_PARMS 4 /* length of p_parms */
14 #define P_I_Use_Default 0 /* no extra stuff specified */
15 #define P_I_Have_Delim 1 /* extra delimiter specified */
16 #define P_I_Have_EOL 2 /* extra EOL specified */
20 struct p_parmsx *p_parmsx_address; /* address of p_parmsx */
21 unsigned char p_num_extra; /* number of extra stuff */
22 unsigned char p_len_extra_delim; /* length of extra delimiter */
27 unsigned char p_minp; /* Minimum positional number */
28 unsigned char p_maxp; /* Maximum positional number */
29 unsigned int p_1st_control; /* Address of the 1st CONTROL block */
35 unsigned int p_match_flag; /* Controls type matched */
36 unsigned int p_function_flag; /* Function should be taken */
37 unsigned int p_result_buf; /* Result buffer address */
38 unsigned int p_value_list; /* Value list address */
39 unsigned char p_nid; /* # of keyword/SW synonyms */
40 unsigned char p_keyorsw; /* keyword or sw */
45 #define P_Num_Val 0x8000 /* Numeric Value */
46 #define P_SNum_Val 0x4000 /* Signed numeric value */
47 #define P_Simple_S 0x2000 /* Simple string */
48 #define P_Date_S 0x1000 /* Date string */
49 #define P_Time_S 0x0800 /* Time string */
50 #define P_Cmpx_S 0x0400 /* Complex string */
51 #define P_File_Spc 0x0200 /* File Spec */
52 #define P_Drv_Only 0x0100 /* Drive Only */
53 #define P_Qu_String 0x0080 /* Quoted string */
54 #define P_Ig_Colon 0x0010 /* Ignore colon at end in match */
55 #define P_Repeat 0x0002 /* Repeat allowed */
56 #define P_Optional 0x0001 /* Optional */
58 /*----------------------------------------------------------------------+
62 +----------------------------------------------------------------------*/
64 #define P_CAP_File 0x0001 /* CAP result by file table */
65 #define P_CAP_Char 0x0002 /* CAP result by character table */
66 #define P_Rm_Colon 0x0010 /* Remove ":" at the end */
72 #define P_nval_None 0 /* no value list ID */
73 #define P_nval_Range 1 /* range list ID */
74 #define P_nval_Value 2 /* value list ID */
75 #define P_nval_String 3 /* string list ID */
76 #define P_Len_Range 9 /* Length of a range choice(two DD plus one DB) */
77 #define P_Len_Value 5 /* Length of a value choice(one DD plus one DB) */
78 #define P_Len_String 3 /* Length of a string choice(one DW plus one DB) */
81 /*----------------------------------------------------------------------+
83 | problem with doing this in C |
85 +----------------------------------------------------------------------*/
88 unsigned char P_NumofList; /* number of following choice */
89 unsigned int P_Val_XL; /* lower word of value */
90 unsigned int P_Val_XH; /* higher word of value */
91 unsigned int P_Val_YL; /* lower word of another value */
92 unsigned int P_Val_YH; /* higher word of another value */
96 /*----------------------------------------------------------------------+
98 | Result block structure |
100 +----------------------------------------------------------------------*/
104 unsigned char P_Type; /* Type returned */
105 unsigned char P_Item_Tag; /* Matched item tag */
106 unsigned int P_SYNONYM_Ptr; /* pointer to Synonym list returned */
107 unsigned char P_Picked_Val[4]; /* value */
110 /*----------------------------------------------------------------------+
114 +----------------------------------------------------------------------*/
116 #define P_EOL 0 /* End of line */
117 #define P_Number 1 /* Number */
118 #define P_List_Idx 2 /* List Index */
119 #define P_String 3 /* String */
120 #define P_Complex 4 /* Complex */
121 #define P_File_Spec 5 /* File Spec */
122 #define P_Drive 6 /* Drive */
123 #define P_Date_F 7 /* Date */
124 #define P_Time_F 8 /* Time */
125 #define P_Quoted_String 9 /* Quoted String */
127 #define P_No_Tag 0x0FF /* No ITEM_TAG found */
129 /*----------------------------------------------------------------------+
131 | following return code will be returned in the AX register. |
133 +----------------------------------------------------------------------*/
135 #define P_No_Error 0 /* No error */
136 #define P_Too_Many 1 /* Too many operands */
137 #define P_Op_Missing 2 /* Required operand missing */
138 #define P_Not_In_SW 3 /* Not in switch list provided */
139 #define P_Not_In_Key 4 /* Not in keyword list provided */
140 #define P_Out_Of_Range 6 /* Out of range specified */
141 #define P_Not_In_Val 7 /* Not in value list provided */
142 #define P_Not_In_Str 8 /* Not in string list provided */
143 #define P_Syntax 9 /* Syntax error */
144 #define P_RC_EOL 0x0ffff /* End of command line */