2 * Constants and structures for TOPS-20 style parser
6 /* type codes for nodes & return values in parse tree */
18 /* return codes from single_parse */
20 #define MATCH 1 /* exact match found */
21 #define INCOMP 2 /* incomplete field */
22 #define AMBIG 3 /* ambiguous response */
23 #define NOMATCH 4 /* no match */
26 /* maximum line length for parser */
29 /* the nodes which make up the parse tree */
32 char *p_word; /* keyword, data description */
33 MenuItem *p_menu; /* MMoira menu entry for this command */
34 struct parse_node *p_peer; /* next node this level */
35 struct parse_node *p_next; /* next level nodes */
36 struct parse_node *p_link; /* for temporary chains */
40 #define NULNODE ((struct parse_node *) 0)
43 /* this structure is used for collecting data to pass to parse functions */
45 #define pval struct pvalst
48 char *p_dat; /* data value or pointer */
49 int p_free; /* size of data to free */
52 /* how many return values are allowed in a single parse */