|
|
1.1 root 1: #
2: /*
3: ** COPYRIGHT
4: **
5: ** The Regents of the University of California
6: **
7: ** 1977
8: **
9: ** This program material is the property of the
10: ** Regents of the University of California and
11: ** may not be reproduced or disclosed without
12: ** the prior written permission of the owner.
13: */
14:
15: /*
16: ** Version:
17: ** @(#)parser.h 7.1 2/5/81
18: */
19:
20:
21:
22: # define DBUFSIZ 2000 /* size of buffer for dbu commands */
23: # define TREEMAX 2500 /* max number of bytes for tree */
24: # define MAXATT 150 /* max number of attributes in the att stash */
25:
26: # define V6POINT3COMPAT
27:
28: # define WARN 0 /* for a non fatal error */
29: # define FATAL 1 /* for a fatal error */
30:
31: /* mode parameters for range table manipulation */
32: # define LOOKREL 1
33: # define LOOKVAR 2
34: # define R_INTERNAL 3
35: # define R_EXTERNAL 4
36:
37: # define RELVUSED 01
38:
39: /* the first argument in argv which may be an ad hoc flag */
40: # define FREEFLAGS 6
41:
42: /* error numbers */
43: # define SUMMARY 2000 /* summary of errors */
44: # define TREEOFLO 2118 /* over flow tree buffer */
45: # define DBUFOFLO 2106 /* over flow dbu arg buffer */
46:
47: # define NOATTRIN 2100 /* attrib not in relation */
48: # define CANTUPDATE 2107 /* can't update rel */
49: # define NOVBLE 2109 /* vble not declared */
50: # define NOPATMAT 2120 /* no pattern matching in tl */
51: # define RNGEXIST 2117 /* can't find rel for var */
52: # define REPALL 2123 /* x.all on replace */
53: # define BADCONSTOP 2134 /* bad constant operator */
54:
55: # define INDEXTRA 2111 /* too many atts in key */
56: # define RESXTRA 2130 /* too many resdoms in tl */
57: # define TARGXTRA 2131 /* tl larger than MAXTUP */
58: # define AGGXTRA 2132 /* too many aggs */
59:
60: # define MODTYPE 2119 /* type conflict for MOD */
61: # define CONCATTYPE 2121 /* type conflict for CONCAT */
62: # define AVGTYPE 2125 /* type conflict for AVG(U) */
63: # define SUMTYPE 2126 /* type conflict for SUM(U) */
64: # define FOPTYPE 2127 /* type conflict for func ops */
65: # define UOPTYPE 2128 /* type conflict for unary ops */
66: # define NUMTYPE 2129 /* type conflict for numeric ops */
67: # define RELTYPE 2133 /* type conflict for relatv op */
68:
69: # define RESTYPE 2103 /* result type mismatch w/expr */
70: # define RESAPPEX 2108 /* append res rel not exist */
71: # define RESEXIST 2135 /* result rel already exists */
72:
73: # define NXTCMDERR 2500 /* misspelt where problem */
74: # define NOQRYMOD 2139 /* no qrymod in database */
75:
76: # define BADHOURS 2136 /* no such hour */
77: # define BADMINS 2137 /* no such minute */
78: # define BAD24TIME 2138 /* only 24:00 can be used */
79:
80: /* -- ASSORTED DATA STRUCTURES -- */
81: struct atstash /* attribute table */
82: {
83: char atbid; /* attribute number */
84: char atbfrmt; /* attribute form type */
85: char atbfrml; /* attribute form length */
86: char atbname[MAXNAME]; /* attribute name */
87: struct atstash *atbnext; /* pointer to next entry in chain */
88: };
89:
90: struct parrng /* auxiliary range table */
91: {
92: DESC vardesc;
93: struct parrng *frontpt;
94: struct parrng *backpt;
95: struct atstash *attlist; /* head of attrib list for this reln */
96: int relvused; /* whether variable in use */
97: };
98:
99: typedef struct parrng PARRNG;
100:
101: struct constop /* constant operator lookup table */
102: {
103: char *copname; /* string name for identification */
104: int copnum; /* op number */
105: char coptype; /* op result type for formating */
106: char coplen; /* op result length for formatting */
107: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.