|
|
1.1 root 1:
2: # line 15 "grammar.z"
3: /* SCANNER/PARSER GLOBALS & TABLES */
4: # include <ingres.h>
5: # include <aux.h>
6: # include <tree.h>
7: # include <symbol.h>
8: # include <pv.h>
9: # include "parser.h"
10: # include <sccs.h>
11:
12: SCCSID(@(#)grammar.y 7.2 4/7/82)
13:
14: # ifdef xPTR1
15: # define YYDEBUG
16: # endif
17:
18: int i;
19: struct atstash *aptr;
20: char permbuf[3];
21: /* space for two names, their null bytes and the seperator */
22: char modbuf[(2 * (MAXNAME + 1)) + 1];
23: static char hqmbuf[2];
24:
25: extern DESC Reldesc;
26: extern int Opflag;
27: extern QTREE *Lastree;
28: extern QTREE *Tidnode;
29: extern int Rsdmno;
30: extern int Resrng;
31: extern int Qrymod;
32: extern int Permcomd;
33: extern char *Trname;
34: extern int Qlflag;
35: extern struct atstash Faketid;
36:
37: # ifdef DISTRIB
38: extern struct atstash Fakesid;
39: # endif
40:
41: extern int Patflag;
42: extern char *Indexname;
43:
44: extern QTREE *tree();
45: extern QTREE *tlprepend();
46: extern QTREE *addresdom();
47: extern QTREE *xdot();
48: extern QTREE *norml();
49: extern struct atstash *attlookup();
50: extern int rngent();
51: extern int rnglook();
52: extern PARRNG Parrng[];
53:
54: # line 71 "grammar.z"
55: typedef union
56: {
57: int type_type; /* OPERATOR TYPES ETC. */
58: QTREE *tree_type;
59: int rng_type;
60: char char_type;
61: int int_type;
62: short *I2_type;
63: long *I4_type;
64: float *F4_type;
65: double *F8_type;
66: char *string_type;
67: } YYSTYPE;
68: # define APPEND 257
69: # define COPY 258
70: # define CREATE 259
71: # define DELETE 260
72: # define DESTROY 261
73: # define HELP 262
74: # define INDEX 263
75: # define MODIFY 264
76: # define PRINT 265
77: # define RANGE 266
78: # define REPLACE 267
79: # define RETRIEVE 268
80: # define SAVE 269
81: # define DEFINE 270
82: # define PERMIT 271
83: # define VIEW 272
84: # define INTEGRITY 273
85: # define ALL 274
86: # define BY 275
87: # define FROM 276
88: # define IN 277
89: # define INTO 278
90: # define UNIQUE 279
91: # define AT 280
92: # define IS 281
93: # define OF 282
94: # define ON 283
95: # define ONTO 284
96: # define TO 285
97: # define UNTIL 286
98: # define WHERE 287
99: # define NAME 288
100: # define SCONST 289
101: # define I2CONST 290
102: # define I4CONST 291
103: # define F4CONST 292
104: # define F8CONST 293
105: # define COMMA 294
106: # define LPAREN 295
107: # define PERIOD 296
108: # define RPAREN 297
109: # define COLON 298
110: # define BGNCMNT 299
111: # define ENDCMNT 300
112: # define UAOP 301
113: # define BAOP 302
114: # define BAOPH 303
115: # define BDOP 304
116: # define EOP 305
117: # define LBOP 306
118: # define LUOP 307
119: # define FOP 308
120: # define FBOP 309
121: # define AGOP 310
122: # define unaryop 311
123: #define yyclearin yychar = -1
124: #define yyerrok yyerrflag = 0
125: extern int yychar;
126: extern short yyerrflag;
127: #ifndef YYMAXDEPTH
128: #define YYMAXDEPTH 150
129: #endif
130: YYSTYPE yylval, yyval;
131: # define YYERRCODE 256
132:
133: # line 1091 "grammar.z"
134:
135: # include "scanner.h"
136: # include "tables.y"
137: # include "yyerror.y"
138: short yyexca[] ={
139: -1, 1,
140: 0, -1,
141: -2, 0,
142: -1, 35,
143: 295, 45,
144: -2, 49,
145: -1, 195,
146: 296, 128,
147: -2, 134,
148: };
149: # define YYNPROD 203
150: # define YYLAST 485
151: short yyact[]={
152:
153: 183, 314, 195, 194, 190, 191, 192, 193, 270, 180,
154: 225, 230, 142, 284, 331, 197, 320, 225, 287, 234,
155: 326, 181, 187, 188, 189, 195, 194, 190, 191, 192,
156: 193, 234, 237, 231, 230, 271, 297, 316, 197, 232,
157: 231, 230, 235, 233, 207, 187, 188, 189, 144, 296,
158: 241, 232, 231, 230, 235, 233, 232, 231, 230, 204,
159: 240, 321, 232, 231, 230, 232, 231, 230, 295, 301,
160: 70, 271, 232, 231, 230, 232, 231, 230, 232, 231,
161: 230, 267, 210, 200, 266, 211, 199, 122, 135, 134,
162: 162, 136, 60, 62, 239, 144, 238, 108, 168, 120,
163: 132, 87, 323, 76, 119, 81, 286, 106, 208, 122,
164: 127, 126, 125, 61, 73, 178, 307, 77, 78, 306,
165: 332, 330, 325, 318, 311, 61, 253, 293, 178, 159,
166: 72, 77, 78, 69, 157, 68, 280, 265, 328, 244,
167: 319, 292, 285, 304, 261, 61, 221, 245, 246, 147,
168: 61, 264, 173, 245, 222, 117, 166, 161, 150, 137,
169: 124, 123, 80, 56, 206, 144, 258, 260, 59, 57,
170: 58, 104, 103, 141, 329, 324, 218, 85, 105, 130,
171: 308, 227, 86, 83, 84, 223, 216, 236, 99, 98,
172: 154, 156, 112, 158, 100, 96, 66, 64, 203, 251,
173: 302, 263, 243, 65, 202, 205, 171, 164, 249, 291,
174: 248, 220, 176, 19, 38, 39, 40, 41, 42, 43,
175: 53, 46, 47, 48, 49, 50, 51, 45, 177, 201,
176: 272, 273, 274, 275, 93, 179, 198, 92, 276, 277,
177: 278, 279, 196, 146, 94, 91, 114, 113, 115, 89,
178: 75, 90, 110, 109, 111, 107, 116, 2, 67, 54,
179: 175, 174, 36, 32, 283, 257, 259, 215, 256, 214,
180: 165, 30, 44, 28, 79, 27, 74, 26, 71, 250,
181: 252, 254, 25, 255, 24, 22, 155, 153, 247, 152,
182: 21, 95, 298, 143, 163, 82, 29, 312, 315, 290,
183: 289, 305, 133, 288, 262, 217, 131, 88, 31, 52,
184: 37, 102, 118, 101, 35, 317, 97, 34, 63, 23,
185: 121, 55, 20, 33, 315, 327, 322, 18, 17, 16,
186: 15, 14, 13, 12, 11, 10, 9, 8, 7, 129,
187: 128, 6, 5, 4, 3, 149, 186, 185, 313, 229,
188: 184, 148, 252, 300, 138, 182, 145, 139, 219, 140,
189: 167, 1, 0, 0, 0, 0, 0, 0, 0, 0,
190: 0, 0, 0, 0, 151, 0, 0, 160, 0, 0,
191: 0, 0, 169, 0, 209, 0, 212, 0, 0, 0,
192: 170, 0, 0, 0, 172, 0, 0, 0, 0, 213,
193: 0, 0, 0, 0, 224, 0, 0, 310, 0, 0,
194: 309, 0, 0, 0, 0, 0, 226, 228, 0, 0,
195: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
196: 0, 0, 0, 0, 0, 0, 0, 149, 0, 0,
197: 0, 0, 0, 148, 242, 0, 0, 0, 0, 0,
198: 0, 0, 0, 268, 303, 0, 0, 0, 0, 0,
199: 0, 269, 0, 0, 0, 0, 0, 0, 0, 0,
200: 0, 0, 0, 0, 0, 0, 0, 0, 0, 294,
201: 281, 299, 0, 0, 282 };
202: short yypact[]={
203:
204: -43, -43,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
205: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
206: -115,-143,-143, -80,-138,-160,-171,-126,-190,-100,
207: -143, -23,-143, -87, -89,-107,-143,-198,-1000,-1000,
208: -1000,-1000,-1000, -19, -91, -25,-1000,-1000,-1000,-1000,
209: -1000,-1000,-133,-1000,-1000,-133,-1000,-1000,-1000,-1000,
210: -191,-1000,-196,-133,-1000,-1000,-1000,-185,-127,-128,
211: -1000,-182,-1000,-1000,-183,-1000,-1000,-1000,-1000,-184,
212: -1000,-143,-133,-1000,-1000,-1000,-1000,-106,-194,-1000,
213: -1000,-1000,-1000,-1000,-1000,-185,-129,-133,-1000,-1000,
214: -1000,-198,-133,-1000,-1000,-1000,-113,-122,-139,-1000,
215: -1000,-1000,-130,-1000,-1000,-1000,-1000,-1000,-198,-143,
216: -143,-122,-143,-1000,-1000,-161,-157,-131,-207, -74,
217: -132,-197, -23,-133,-1000,-1000,-1000, -75,-198,-122,
218: -1000,-175,-1000,-286,-1000,-211,-1000, -77,-1000,-237,
219: -76,-122,-253,-186, -77,-212, -77,-1000,-1000,-1000,
220: -1000,-1000,-1000,-286,-1000, -97,-1000,-109,-142,-1000,
221: -1000,-134,-122,-1000,-1000,-162,-1000,-1000,-1000,-296,
222: -286,-286,-1000,-250,-1000,-1000,-263,-199,-201,-235,
223: -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-246,-1000,
224: -139,-263,-1000,-1000,-135,-140,-1000, -68,-143,-163,
225: -143,-1000,-143,-296,-121,-144,-1000, -79,-137,-213,
226: -1000,-1000,-1000,-1000,-162,-286,-289,-262,-1000,-263,
227: -263,-263,-263,-1000,-1000,-1000,-1000,-263,-263,-263,
228: -263,-141,-1000,-223,-1000,-1000,-1000,-153,-1000,-1000,
229: -77,-1000,-1000,-1000, -77,-1000,-1000,-146,-1000,-188,
230: -1000,-280, -67,-147,-1000,-1000,-1000,-142,-1000,-1000,
231: -1000,-1000,-223,-1000,-292,-269,-226,-229,-245,-239,
232: -1000,-163,-143,-225,-1000, -81,-144,-145,-122,-103,
233: -103,-166,-1000,-1000,-1000,-1000,-263,-263,-260,-1000,
234: -1000,-146,-167,-1000,-1000,-1000,-1000,-1000,-148,-1000,
235: -1000,-282,-236,-192,-1000,-223,-1000,-1000,-1000,-110,
236: -168,-1000,-277,-263,-150,-111,-1000,-1000,-1000,-169,
237: -284,-170,-1000 };
238: short yypgo[]={
239:
240: 0, 361, 360, 358, 211, 255, 356, 243, 12, 235,
241: 355, 0, 350, 349, 348, 1, 242, 236, 347, 346,
242: 70, 257, 344, 343, 342, 341, 338, 337, 336, 335,
243: 334, 333, 332, 331, 330, 329, 328, 327, 323, 322,
244: 321, 256, 319, 318, 317, 316, 314, 313, 311, 310,
245: 309, 308, 307, 306, 305, 304, 303, 249, 302, 300,
246: 119, 299, 116, 296, 295, 294, 229, 293, 290, 289,
247: 288, 287, 199, 286, 285, 284, 258, 282, 278, 277,
248: 276, 275, 274, 250, 273, 272, 271, 270, 269, 268,
249: 267, 266, 167, 265, 264, 13, 263, 262, 261, 260,
250: 228 };
251: short yyr1[]={
252:
253: 0, 1, 1, 1, 21, 21, 21, 21, 21, 21,
254: 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
255: 21, 33, 38, 22, 39, 40, 40, 40, 40, 40,
256: 25, 42, 43, 43, 43, 43, 34, 44, 45, 45,
257: 45, 45, 35, 46, 47, 47, 47, 48, 48, 48,
258: 37, 49, 50, 31, 51, 52, 52, 57, 57, 57,
259: 57, 57, 53, 58, 58, 58, 2, 2, 3, 3,
260: 4, 54, 54, 55, 55, 55, 56, 56, 56, 56,
261: 61, 62, 59, 60, 29, 63, 64, 64, 64, 64,
262: 64, 65, 65, 41, 5, 6, 6, 7, 7, 7,
263: 66, 66, 8, 8, 67, 9, 9, 9, 9, 10,
264: 13, 13, 13, 11, 11, 11, 11, 11, 11, 11,
265: 11, 11, 12, 12, 14, 14, 15, 16, 17, 18,
266: 18, 18, 18, 18, 18, 18, 19, 23, 68, 69,
267: 69, 71, 71, 72, 72, 20, 73, 73, 70, 70,
268: 24, 74, 26, 26, 75, 77, 77, 78, 78, 78,
269: 27, 27, 27, 79, 81, 81, 81, 80, 80, 80,
270: 83, 83, 82, 82, 28, 84, 85, 30, 86, 87,
271: 88, 88, 90, 91, 91, 92, 92, 89, 89, 93,
272: 94, 94, 95, 76, 76, 32, 96, 36, 97, 98,
273: 99, 99, 100 };
274: short yyr2[]={
275:
276: 0, 2, 1, 0, 1, 1, 1, 1, 1, 1,
277: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
278: 1, 5, 1, 5, 1, 1, 1, 1, 1, 0,
279: 4, 1, 1, 1, 1, 0, 5, 1, 1, 1,
280: 1, 0, 4, 1, 2, 0, 1, 1, 1, 0,
281: 3, 2, 2, 8, 2, 1, 3, 1, 1, 1,
282: 1, 1, 2, 1, 1, 1, 3, 0, 1, 3,
283: 1, 2, 2, 2, 2, 0, 2, 2, 2, 2,
284: 0, 0, 8, 4, 5, 2, 1, 1, 1, 1,
285: 0, 1, 0, 1, 3, 1, 3, 3, 1, 3,
286: 1, 1, 2, 0, 1, 3, 2, 3, 1, 3,
287: 1, 1, 1, 1, 1, 3, 3, 3, 3, 2,
288: 4, 6, 7, 5, 1, 3, 1, 3, 1, 1,
289: 1, 1, 1, 1, 1, 1, 1, 7, 1, 1,
290: 0, 3, 5, 1, 1, 1, 3, 5, 1, 1,
291: 5, 1, 2, 2, 1, 3, 3, 1, 3, 1,
292: 2, 1, 2, 1, 2, 2, 2, 1, 3, 1,
293: 1, 1, 1, 3, 4, 5, 1, 6, 1, 1,
294: 2, 0, 1, 1, 3, 1, 3, 2, 0, 1,
295: 1, 3, 3, 1, 3, 2, 1, 4, 1, 3,
296: 1, 1, 1 };
297: short yychk[]={
298:
299: -1000, -1, -21, -22, -23, -24, -25, -26, -27, -28,
300: -29, -30, -31, -32, -33, -34, -35, -36, -37, 256,
301: -39, -68, -74, -42, -75, -77, -79, -81, -84, -63,
302: -86, -51, -96, -38, -44, -46, -97, -49, 257, 258,
303: 259, 260, 261, 262, -85, 270, 264, 265, 266, 267,
304: 268, 269, -50, 263, -21, -40, 278, 284, 285, 283,
305: -20, 288, -20, -43, 277, 283, 276, -76, 273, 271,
306: -20, -78, 290, 274, -80, -83, 274, 288, 289, -82,
307: 288, 295, -64, 283, 284, 277, 282, -20, -52, -57,
308: 274, 268, 260, 257, 267, -76, 282, -45, 278, 277,
309: 283, -47, -48, 279, 278, 285, -20, -5, 295, 272,
310: 271, 273, 283, 272, 271, 273, -41, 288, -41, 295,
311: 295, -41, 294, 288, 288, 294, 294, 294, -76, -41,
312: 285, -53, 294, -58, 283, 282, 285, 288, -41, -5,
313: -41, 286, -8, -67, 287, -6, -7, 288, -16, -17,
314: 288, -5, -69, -71, -20, -73, -20, -8, -20, 290,
315: -83, 288, 297, -65, 281, -87, 288, -2, 295, -57,
316: -41, 281, -5, -8, -98, -99, -20,-100, 290, -9,
317: 295, 307, -10, -11, -12, -18, -19, 308, 309, 310,
318: 290, 291, 292, 293, 289, 288, -16, 301, -17, 297,
319: 294, -66, 281, 275, 296, 281, -8, 297, 294, -66,
320: 294, 297, -66, -9, -88, -90, 283, -54, 285, -3,
321: -4, 288, 288, -8,-100, 306, -9, -11, -9, -13,
322: 303, 302, 301, 305, 281, 304, -11, 295, 295, 295,
323: 295, 296, -7, -11, 274, 288, 288, -70, 278, 276,
324: -20, -72, -20, 289, -20, -20, -89, -93, 287, -91,
325: -92, 288, -55, 280, 288, 274, 297, 294,-100, -9,
326: 297, 297, -11, -11, -11, -11, -11, -11, -11, -11,
327: 289, -66, -66, -94, -95, 288, 294, 298, -56, -59,
328: -61, 276, 288, 274, -4, 297, 294, 275, -8, -72,
329: -20, 294, 281, -92, 288, -8, -60, -62, 283, -60,
330: -62, 290, -11, -14, -15, -11, 297, -95, 290, 288,
331: 298, 297, -8, 294, 285, 290, 297, -15, 288, 285,
332: 290, 298, 290 };
333: short yydef[]={
334:
335: 3, -2, 2, 4, 5, 6, 7, 8, 9, 10,
336: 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
337: 29, 0, 0, 35, 0, 0, 161, 0, 0, 90,
338: 0, 0, 0, 0, 41, -2, 0, 0, 24, 138,
339: 151, 31, 154, 163, 0, 0, 178, 196, 22, 37,
340: 43, 198, 0, 176, 1, 0, 25, 26, 27, 28,
341: 0, 145, 0, 0, 32, 33, 34, 152, 0, 0,
342: 193, 153, 157, 159, 160, 167, 169, 170, 171, 162,
343: 172, 0, 0, 86, 87, 88, 89, 0, 0, 55,
344: 57, 58, 59, 60, 61, 195, 0, 0, 38, 39,
345: 40, 0, 0, 46, 47, 48, 0, 103, 0, 164,
346: 165, 166, 0, 52, 54, 85, 51, 93, 0, 140,
347: 0, 103, 0, 155, 156, 0, 0, 0, 0, 92,
348: 0, 67, 0, 0, 63, 64, 65, 0, 0, 103,
349: 44, 0, 50, 0, 104, 0, 95, 128, 98, 0,
350: 0, 103, 0, 139, 0, 0, 0, 30, 194, 158,
351: 168, 173, 174, 0, 91, 181, 179, 0, 0, 56,
352: 62, 0, 103, 42, 197, 0, 200, 201, 202, 102,
353: 0, 0, 108, 0, 113, 114, 0, 0, 0, 0,
354: 129, 130, 131, 132, 133, -2, 135, 136, 0, 94,
355: 0, 0, 100, 101, 0, 0, 23, 0, 0, 0,
356: 0, 150, 0, 84, 188, 0, 182, 75, 0, 0,
357: 68, 70, 21, 36, 0, 0, 0, 0, 106, 0,
358: 0, 0, 0, 110, 111, 112, 119, 0, 0, 0,
359: 0, 0, 96, 97, 99, 127, 175, 0, 148, 149,
360: 0, 141, 143, 144, 0, 146, 177, 0, 189, 180,
361: 183, 185, 80, 0, 71, 72, 66, 0, 199, 107,
362: 105, 118, 109, 115, 116, 117, 0, 0, 0, 103,
363: 137, 0, 0, 187, 190, 0, 0, 0, 103, 81,
364: 81, 0, 73, 74, 69, 120, 0, 0, 0, 142,
365: 147, 0, 0, 184, 186, 53, 76, 78, 0, 77,
366: 79, 0, 0, 103, 124, 126, 123, 191, 192, 0,
367: 0, 121, 0, 0, 0, 0, 122, 125, 83, 0,
368: 0, 0, 82 };
369: #
370: # define YYFLAG -1000
371: # define YYERROR goto yyerrlab
372: # define YYACCEPT return(0)
373: # define YYABORT return(1)
374:
375: /* parser for yacc output */
376:
377: #ifdef YYDEBUG
378: int yydebug = 0; /* 1 for debugging */
379: #endif
380: YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
381: int yychar = -1; /* current input token number */
382: int yynerrs = 0; /* number of errors */
383: short yyerrflag = 0; /* error recovery flag */
384:
385: yyparse() {
386:
387: short yys[YYMAXDEPTH];
388: short yyj, yym;
389: register YYSTYPE *yypvt;
390: register short yystate, *yyps, yyn;
391: register YYSTYPE *yypv;
392: register short *yyxi;
393:
394: yystate = 0;
395: yychar = -1;
396: yynerrs = 0;
397: yyerrflag = 0;
398: yyps= &yys[-1];
399: yypv= &yyv[-1];
400:
401: yystack: /* put a state and value onto the stack */
402:
403: #ifdef YYDEBUG
404: if( yydebug ) printf( "state %d, char 0%o\n", yystate, yychar );
405: #endif
406: if( ++yyps> &yys[YYMAXDEPTH] ) { yyerror( "yacc stack overflow" ); return(1); }
407: *yyps = yystate;
408: ++yypv;
409: *yypv = yyval;
410:
411: yynewstate:
412:
413: yyn = yypact[yystate];
414:
415: if( yyn<= YYFLAG ) goto yydefault; /* simple state */
416:
417: if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0;
418: if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;
419:
420: if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */
421: yychar = -1;
422: yyval = yylval;
423: yystate = yyn;
424: if( yyerrflag > 0 ) --yyerrflag;
425: goto yystack;
426: }
427:
428: yydefault:
429: /* default state action */
430:
431: if( (yyn=yydef[yystate]) == -2 ) {
432: if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0;
433: /* look through exception table */
434:
435: for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */
436:
437: while( *(yyxi+=2) >= 0 ){
438: if( *yyxi == yychar ) break;
439: }
440: if( (yyn = yyxi[1]) < 0 ) return(0); /* accept */
441: }
442:
443: if( yyn == 0 ){ /* error */
444: /* error ... attempt to resume parsing */
445:
446: switch( yyerrflag ){
447:
448: case 0: /* brand new error */
449:
450: yyerror( "syntax error" );
451: yyerrlab:
452: ++yynerrs;
453:
454: case 1:
455: case 2: /* incompletely recovered error ... try again */
456:
457: yyerrflag = 3;
458:
459: /* find a state where "error" is a legal shift action */
460:
461: while ( yyps >= yys ) {
462: yyn = yypact[*yyps] + YYERRCODE;
463: if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){
464: yystate = yyact[yyn]; /* simulate a shift of "error" */
465: goto yystack;
466: }
467: yyn = yypact[*yyps];
468:
469: /* the current yyps has no shift onn "error", pop stack */
470:
471: #ifdef YYDEBUG
472: if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
473: #endif
474: --yyps;
475: --yypv;
476: }
477:
478: /* there is no state on the stack with an error shift ... abort */
479:
480: yyabort:
481: return(1);
482:
483:
484: case 3: /* no shift yet; clobber input char */
485:
486: #ifdef YYDEBUG
487: if( yydebug ) printf( "error recovery discards char %d\n", yychar );
488: #endif
489:
490: if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */
491: yychar = -1;
492: goto yynewstate; /* try again in the same state */
493:
494: }
495:
496: }
497:
498: /* reduction by production yyn */
499:
500: #ifdef YYDEBUG
501: if( yydebug ) printf("reduce %d\n",yyn);
502: #endif
503: yyps -= yyr2[yyn];
504: yypvt = yypv;
505: yypv -= yyr2[yyn];
506: yyval = yypv[1];
507: yym=yyn;
508: /* consult goto table to find next state */
509: yyn = yyr1[yyn];
510: yyj = yypgo[yyn] + *yyps + 1;
511: if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]];
512: switch(yym){
513:
514: case 1:
515: # line 156 "grammar.z"
516:
517: {
518: # ifdef xPTR1
519: tTfp(38, 0, "*** [program stmnt] parsed.\n");
520: # endif
521:
522: if (endquelst(Opflag) < 0)
523: return (-1);
524: } break;
525: case 2:
526: # line 165 "grammar.z"
527:
528: {
529: # ifdef xPTR1
530: tTfp(38, 1, "*** [stmnt] parsed.\n");
531: # endif
532:
533: if (endquelst(Opflag) < 0)
534: return (-1);
535: } break;
536: case 3:
537: # line 175 "grammar.z"
538: {
539: # ifdef xPTR1
540: tTfp(38, 2, "*** [(NULL)] parsed.\n");
541: # endif
542: } break;
543: case 20:
544: # line 198 "grammar.z"
545: {
546: # ifdef xPTR1
547: tTfp(38, 0, "*** [error] parsed.\n");
548: # endif
549: } break;
550: case 21:
551: # line 205 "grammar.z"
552:
553: {
554: if ((i = openr(&Reldesc, -1, yypvt[-0].string_type)) < 0)
555: syserr("relname: error in openr '%d'", i);
556: if (i > 0)
557: {
558: /* invalid relation name */
559: par_error(RNGEXIST, WARN, yypvt[-0].string_type, 0);
560: YYERROR;
561: }
562: else
563: rngent(R_EXTERNAL, yypvt[-2].string_type, &Reldesc);
564: } break;
565: case 22:
566: # line 219 "grammar.z"
567:
568: {
569: Opflag = mdRANGE;
570: } break;
571: case 23:
572: # line 224 "grammar.z"
573:
574: {
575: /* make root node */
576: Lastree = tree(yypvt[-1].tree_type, yypvt[-0].tree_type, ROOT, sizeof(struct rootnode), 1);
577: } break;
578: case 24:
579: # line 230 "grammar.z"
580:
581: {
582: Opflag = mdAPP;
583: } break;
584: case 30:
585: # line 241 "grammar.z"
586:
587: {
588: /* make root node for delete, with a TIDNODE at leftmost */
589: Lastree = tree(tree(NULL, Tidnode, RESDOM, sizeof(struct resdomnode), NULL), yypvt[-0].tree_type, ROOT, sizeof(struct rootnode), 1);
590: } break;
591: case 31:
592: # line 247 "grammar.z"
593:
594: {
595: Opflag = mdDEL;
596: } break;
597: case 36:
598: # line 257 "grammar.z"
599:
600: {
601: /* make root node for replace */
602: Lastree = tree(yypvt[-1].tree_type, yypvt[-0].tree_type, ROOT, sizeof(struct rootnode), 1);
603: } break;
604: case 37:
605: # line 263 "grammar.z"
606:
607: {
608: Opflag = mdREPL;
609: } break;
610: case 42:
611: # line 273 "grammar.z"
612:
613: {
614: /* make root node for retrieve */
615: Lastree = tree(yypvt[-1].tree_type, yypvt[-0].tree_type, ROOT, sizeof(struct rootnode), 1);
616: } break;
617: case 43:
618: # line 279 "grammar.z"
619:
620: {
621: Opflag = mdRETR;
622: } break;
623: case 44:
624: # line 284 "grammar.z"
625:
626: {
627: /* set up pipe block and save relname for create */
628: # ifdef xPTR2
629: tTfp(38, 4, "retclause: Rsdmno %d", Rsdmno);
630: # endif
631: Rsdmno = 0;
632: setp(PV_STR, "0"); /* relstat = nil */
633: setp(PV_STR, trim_relname(Parrng[Resrng].vardesc.reldum.relid));
634: } break;
635: case 45:
636: # line 294 "grammar.z"
637:
638: {
639: /* no result relation, output to terminal */
640: Rsdmno = 0;
641: Resrng = -1;
642: } break;
643: case 46:
644: # line 300 "grammar.z"
645:
646: {
647: Opflag = mdRET_UNI;
648: Rsdmno = 0;
649: Resrng = -1;
650: } break;
651: case 50:
652: # line 311 "grammar.z"
653:
654: {
655: Lastree = tree(yypvt[-1].tree_type, yypvt[-0].tree_type, ROOT, sizeof(struct rootnode), 1);
656: } break;
657: case 51:
658: # line 316 "grammar.z"
659:
660: {
661: Rsdmno = 0;
662: setp(PV_STR, "0040"); /* relstat = S_VIEW */
663: setp(PV_STR, trim_relname(Parrng[Resrng].vardesc.reldum.relid));
664: } break;
665: case 52:
666: # line 323 "grammar.z"
667:
668: {
669: Opflag = mdVIEW;
670: if (!Qrymod)
671: {
672: /* no qrymod in database */
673: par_error(NOQRYMOD, WARN, 0);
674: }
675: } break;
676: case 53:
677: # line 333 "grammar.z"
678:
679: {
680: Lastree = tree(yypvt[-4].tree_type, yypvt[-0].tree_type, ROOT, sizeof(struct rootnode), 1);
681: } break;
682: case 54:
683: # line 338 "grammar.z"
684:
685: {
686: Opflag = mdPROT;
687: if (!Qrymod)
688: {
689: /* no qrymod in database */
690: par_error(NOQRYMOD, WARN, 0);
691: }
692: } break;
693: case 57:
694: # line 351 "grammar.z"
695:
696: {
697: permcom(-1); /* means 'all' commands */
698: } break;
699: case 58:
700: # line 355 "grammar.z"
701:
702: {
703: permcom(mdRETR);
704: } break;
705: case 59:
706: # line 359 "grammar.z"
707:
708: {
709: permcom(mdDEL);
710: } break;
711: case 60:
712: # line 363 "grammar.z"
713:
714: {
715: permcom(mdAPP);
716: } break;
717: case 61:
718: # line 367 "grammar.z"
719:
720: {
721: permcom(mdREPL);
722: } break;
723: case 62:
724: # line 372 "grammar.z"
725:
726: {
727: /* put command vector into list now since this always happens */
728: setp(PV_INT, Permcomd);
729: Permcomd = 0; /* reset command map */
730: setp(PV_STR, trim_relname(Parrng[Resrng].vardesc.reldum.relid));
731: bmove(Parrng[Resrng].vardesc.reldum.relowner, permbuf, 2);
732: permbuf[2] = 0;
733: setp(PV_STR, permbuf);
734: } break;
735: case 66:
736: # line 387 "grammar.z"
737:
738: {
739: yyval.tree_type = yypvt[-1].tree_type;
740: } break;
741: case 67:
742: # line 391 "grammar.z"
743:
744: {
745: yyval.tree_type = NULL;
746: } break;
747: case 69:
748: # line 397 "grammar.z"
749:
750: {
751: /*
752: ** attach bulk of permit tl to leftmost node of new elem
753: */
754: if (!Err_current)
755: yyval.tree_type = tlprepend(yypvt[-2].tree_type, yypvt[-0].tree_type);
756: } break;
757: case 70:
758: # line 406 "grammar.z"
759:
760: {
761: /* Resrng is set by the "relation" production */
762: if (!Err_current)
763: {
764: Trname = yypvt[-0].string_type;
765: aptr = attlookup(Resrng, Trname);
766: yyval.tree_type = tree(NULL, NULL, VAR, sizeof(struct varnode), Resrng, aptr);
767: yyval.tree_type = addresdom(NULL, yyval.tree_type);
768: }
769: } break;
770: case 71:
771: # line 418 "grammar.z"
772:
773: {
774: setp(PV_STR, yypvt[-0].string_type);
775: } break;
776: case 72:
777: # line 422 "grammar.z"
778:
779: {
780: setp(PV_STR, "all");
781: } break;
782: case 73:
783: # line 427 "grammar.z"
784:
785: {
786: setp(PV_STR, yypvt[-0].string_type);
787: } break;
788: case 74:
789: # line 431 "grammar.z"
790:
791: {
792: setp(PV_STR, "all");
793: } break;
794: case 75:
795: # line 435 "grammar.z"
796:
797: {
798: setp(PV_STR, "all"); /* default is all */
799: } break;
800: case 80:
801: # line 445 "grammar.z"
802:
803: {
804: setp(PV_INT, 0);
805: setp(PV_INT, 1440);
806: } break;
807: case 81:
808: # line 451 "grammar.z"
809:
810: {
811: setp(PV_STR, "sun");
812: setp(PV_STR, "sat");
813: } break;
814: case 82:
815: # line 457 "grammar.z"
816:
817: {
818: setp(PV_INT, timeofday(yypvt[-6].I2_type, yypvt[-4].I2_type));
819: setp(PV_INT, timeofday(yypvt[-2].I2_type, yypvt[-0].I2_type));
820: } break;
821: case 83:
822: # line 463 "grammar.z"
823:
824: {
825: setp(PV_STR, yypvt[-2].string_type);
826: setp(PV_STR, yypvt[-0].string_type);
827: } break;
828: case 84:
829: # line 469 "grammar.z"
830:
831: {
832: Lastree = tree(NULL, norml(yypvt[-0].tree_type), ROOT, sizeof(struct rootnode), 1);
833: Qlflag--; /* turn off here */
834: } break;
835: case 85:
836: # line 475 "grammar.z"
837:
838: {
839: Opflag = mdINTEG;
840: Qlflag++; /* OK to turn on here because integrity doesn't have a targ list */
841: if (!Qrymod)
842: {
843: /* no qrymod in database */
844: par_error(NOQRYMOD, WARN, 0);
845: }
846: } break;
847: case 93:
848: # line 495 "grammar.z"
849:
850: {
851: # ifdef xPTR2
852: tTfp(38, 3, "res rel name/var: '%s'\n", yypvt[-0].string_type);
853: # endif
854: switch (Opflag)
855: {
856: case mdRETR:
857: case mdVIEW:
858: /* result better not be a rel name */
859: if ((i = openr(&Reldesc, -1, yypvt[-0].string_type)) < 0)
860: syserr("relation: err openr '%d'", i);
861: if (i == 0)
862: {
863: /* reln exists */
864: if (bequal(Reldesc.reldum.relowner, Usercode, 2))
865: {
866: /* same owner, can't duplicate name */
867: par_error(RESEXIST, WARN, yypvt[-0].string_type, 0);
868: YYERROR;
869: }
870: else if (!Err_current)
871: {
872: /* owned by dba -- purge range table */
873: rngdel(yypvt[-0].string_type);
874: }
875: }
876: if (!Err_current)
877: {
878: bmove(Usercode, Reldesc.reldum.relowner, 2);
879: pmove(yypvt[-0].string_type, Reldesc.reldum.relid, MAXNAME, ' ');
880: Resrng = rngent(R_INTERNAL, "", &Reldesc);
881: }
882: break;
883:
884: case mdAPP:
885: /* result is a rel name */
886: if (!Err_current)
887: {
888: Resrng = rnglook(yypvt[-0].string_type, LOOKREL);
889: if (Resrng < 0)
890: {
891: if ((i = openr(&Reldesc, -1, yypvt[-0].string_type)) < 0)
892: syserr("relation: err openr '%d'", i);
893: if (i)
894: {
895: /* invalid relation name */
896: par_error(RESAPPEX, WARN, yypvt[-0].string_type, 0);
897: YYERROR;
898: }
899: Resrng = rngent(R_INTERNAL, "", &Reldesc);
900: }
901: else
902: ctlmod_decl(Resrng);
903: checkupd(Resrng);
904: }
905: break;
906:
907: case mdPROT:
908: case mdINTEG:
909: # ifdef DISTRIB
910: case mdDISTRIB:
911: # endif
912: /* the result is a tuple variable */
913: Resrng = rnglook(yypvt[-0].string_type, LOOKVAR);
914: if (Resrng < 0)
915: {
916: /* variable not declared */
917: par_error(NOVBLE, WARN, yypvt[-0].string_type, 0);
918: YYERROR;
919: }
920: else
921: ctlmod_decl(Resrng);
922: break;
923:
924: case mdREPL:
925: case mdDEL:
926: /* the result is a tuple variable */
927: Resrng = rnglook(yypvt[-0].string_type, LOOKVAR);
928: if (Resrng < 0)
929: /* variable not declared */
930: {
931: par_error(NOVBLE, WARN, yypvt[-0].string_type, 0);
932: YYERROR;
933: }
934: else
935: ctlmod_decl(Resrng);
936:
937: checkupd(Resrng);
938: Tidnode = tree(NULL, NULL, VAR, sizeof(struct varnode), Resrng, &Faketid);
939: break;
940: }
941: } break;
942: case 94:
943: # line 589 "grammar.z"
944:
945: {
946: if (Patflag)
947: {
948: /* no patt match in targ list */
949: par_error(NOPATMAT, WARN, 0);
950: }
951: yyval.tree_type = yypvt[-1].tree_type;
952:
953: /*
954: ** replace must have tid node as left branch
955: ** (so does delete but it doesn't have a targ list)
956: */
957: if (Opflag == mdREPL && !Err_current)
958: {
959: yyval.tree_type = tlprepend(tree(NULL, Tidnode, RESDOM, sizeof(struct resdomnode), 0), yyval.tree_type);
960: }
961: } break;
962: case 96:
963: # line 609 "grammar.z"
964:
965: {
966: /*
967: ** attach bulk of targ list to leftmost node
968: ** of new element
969: */
970: if (!Err_current)
971: yyval.tree_type = tlprepend(yypvt[-2].tree_type, yypvt[-0].tree_type);
972: } break;
973: case 97:
974: # line 619 "grammar.z"
975:
976: {
977: Trname = yypvt[-2].string_type;
978: /* make a new resdom entry for targ list */
979: if (!Err_current)
980: yyval.tree_type = addresdom(NULL, yypvt[-0].tree_type);
981: } break;
982: case 98:
983: # line 626 "grammar.z"
984:
985: {
986: /* makes a new resdom entry for targ list */
987: if (!Err_current)
988: yyval.tree_type = addresdom(NULL, yypvt[-0].tree_type);
989: } break;
990: case 99:
991: # line 632 "grammar.z"
992:
993: {
994: if (Opflag == mdREPL)
995: {
996: /* ALL not defined for REPLACE */
997: par_error(REPALL, WARN,
998: trim_relname(Qt.qt_rangev[yypvt[-2].rng_type].rngvdesc->relvname), 0);
999: YYERROR;
1000: }
1001: /* makes set of new resdom entries for targ list */
1002: else if (!Err_current)
1003: yyval.tree_type = xdot(yypvt[-2].rng_type);
1004: } break;
1005: case 102:
1006: # line 649 "grammar.z"
1007:
1008: {
1009: yyval.tree_type = norml(yypvt[-0].tree_type);
1010: Qlflag--;
1011: } break;
1012: case 103:
1013: # line 654 "grammar.z"
1014:
1015: {
1016: /* null qualification */
1017: yyval.tree_type = norml(NULL);
1018: } break;
1019: case 104:
1020: # line 660 "grammar.z"
1021:
1022: {
1023: Qlflag++;
1024: } break;
1025: case 105:
1026: # line 665 "grammar.z"
1027:
1028: {
1029: yyval.tree_type = yypvt[-1].tree_type;
1030: } break;
1031: case 106:
1032: # line 669 "grammar.z"
1033:
1034: {
1035: yyval.tree_type = tree(NULL, yypvt[-0].tree_type, UOP, 2, yypvt[-1].type_type);
1036: } break;
1037: case 107:
1038: # line 673 "grammar.z"
1039:
1040: {
1041: yyval.tree_type = tree(yypvt[-2].tree_type, yypvt[-0].tree_type, yypvt[-1].type_type, sizeof (struct rootnode) -2, 0);
1042: } break;
1043: case 109:
1044: # line 679 "grammar.z"
1045:
1046: {
1047: yyval.tree_type = tree(yypvt[-2].tree_type, yypvt[-0].tree_type, BOP, 2, yypvt[-1].type_type);
1048: } break;
1049: case 115:
1050: # line 690 "grammar.z"
1051:
1052: {
1053: yyval.tree_type = tree(yypvt[-2].tree_type, yypvt[-0].tree_type, BOP, 2, yypvt[-1].type_type);
1054: } break;
1055: case 116:
1056: # line 694 "grammar.z"
1057:
1058: {
1059: yyval.tree_type = tree(yypvt[-2].tree_type, yypvt[-0].tree_type, BOP, 2, yypvt[-1].type_type);
1060: } break;
1061: case 117:
1062: # line 698 "grammar.z"
1063:
1064: {
1065: yyval.tree_type = tree(yypvt[-2].tree_type, yypvt[-0].tree_type, BOP, 2, yypvt[-1].type_type);
1066: } break;
1067: case 118:
1068: # line 702 "grammar.z"
1069:
1070: {
1071: yyval.tree_type = yypvt[-1].tree_type;
1072: } break;
1073: case 119:
1074: # line 706 "grammar.z"
1075:
1076: {
1077: yyval.tree_type = tree(NULL, yypvt[-0].tree_type, UOP, 2, yypvt[-1].type_type);
1078: } break;
1079: case 120:
1080: # line 710 "grammar.z"
1081:
1082: {
1083: yyval.tree_type = tree(yypvt[-1].tree_type, NULL, UOP, 2, yypvt[-3].type_type);
1084: } break;
1085: case 121:
1086: # line 714 "grammar.z"
1087:
1088: {
1089: yyval.tree_type = tree(yypvt[-3].tree_type, yypvt[-1].tree_type, BOP, 2, yypvt[-5].type_type);
1090: } break;
1091: case 122:
1092: # line 719 "grammar.z"
1093:
1094: {
1095: # ifdef xPTR2
1096: tTfp(39, 0, "agg func\n");
1097: # endif
1098: windup(yypvt[-2].tree_type);
1099: yyval.tree_type = tree(tree(yypvt[-2].tree_type, tree(NULL, yypvt[-4].tree_type, AOP, 6, yypvt[-6].type_type), BYHEAD, sizeof(struct resdomnode), 0), yypvt[-1].tree_type, AGHEAD, sizeof(struct rootnode), 0);
1100: tlprepend(tree(NULL, NULL, TREE, 0), yyval.tree_type);
1101: } break;
1102: case 123:
1103: # line 728 "grammar.z"
1104:
1105: {
1106: yyval.tree_type = tree(tree(NULL, yypvt[-2].tree_type, AOP, 6, yypvt[-4].type_type), yypvt[-1].tree_type, AGHEAD, sizeof(struct rootnode), 0);
1107: } break;
1108: case 125:
1109: # line 734 "grammar.z"
1110:
1111: {
1112: yyval.tree_type = tlprepend(yypvt[-2].tree_type, yypvt[-0].tree_type);
1113: } break;
1114: case 126:
1115: # line 739 "grammar.z"
1116:
1117: {
1118: yyval.tree_type = tree(NULL, yypvt[-0].tree_type, RESDOM, sizeof(struct resdomnode), Rsdmno);
1119: } break;
1120: case 127:
1121: # line 744 "grammar.z"
1122:
1123: {
1124: # ifdef xPTR2
1125: tTfp(39, 1, "attrib %12s.%12s found\n",
1126: Qt.qt_rangev[yypvt[-2].rng_type].rngvdesc->relvname, yypvt[-0].string_type);
1127: # endif
1128:
1129: /* remember attribute name */
1130: Trname = yypvt[-0].string_type;
1131:
1132: /* look up attribute */
1133: aptr = attlookup(yypvt[-2].rng_type, Trname);
1134: yyval.tree_type = tree(NULL, NULL, VAR, sizeof(struct varnode), yypvt[-2].rng_type, aptr);
1135: } break;
1136: case 128:
1137: # line 759 "grammar.z"
1138:
1139: {
1140: yyval.rng_type = rnglook(yypvt[-0].string_type, LOOKVAR);
1141: if (yyval.rng_type < 0)
1142: {
1143: /* variable not declared */
1144: par_error(NOVBLE, WARN, yypvt[-0].string_type, 0);
1145: YYERROR;
1146: }
1147: else
1148: ctlmod_decl(yyval.rng_type);
1149: } break;
1150: case 129:
1151: # line 772 "grammar.z"
1152:
1153: {
1154: yyval.tree_type = tree(NULL, NULL, INT, 2, yypvt[-0].I2_type);
1155: } break;
1156: case 130:
1157: # line 776 "grammar.z"
1158:
1159: {
1160: yyval.tree_type = tree(NULL, NULL, INT, 4, yypvt[-0].I4_type);
1161: } break;
1162: case 131:
1163: # line 780 "grammar.z"
1164:
1165: {
1166: yyval.tree_type = tree(NULL, NULL, FLOAT, 4, yypvt[-0].F4_type);
1167: } break;
1168: case 132:
1169: # line 784 "grammar.z"
1170:
1171: {
1172: yyval.tree_type = tree(NULL, NULL, FLOAT, 8, yypvt[-0].F8_type);
1173: } break;
1174: case 133:
1175: # line 788 "grammar.z"
1176:
1177: {
1178: if (patmat(yypvt[-0].string_type) && !Qlflag)
1179: Patflag = 1;
1180: yyval.tree_type = tree(NULL, NULL, CHAR, length(yypvt[-0].string_type), yypvt[-0].string_type);
1181: } break;
1182: case 134:
1183: # line 794 "grammar.z"
1184:
1185: {
1186: yyval.tree_type = tree(NULL, NULL, COP, 2, yypvt[-0].string_type);
1187: } break;
1188: case 136:
1189: # line 800 "grammar.z"
1190:
1191: {
1192: if (yypvt[-0].type_type == opADD)
1193: yyval.type_type = opPLUS;
1194: else
1195: if (yypvt[-0].type_type == opSUB)
1196: yyval.type_type = opMINUS;
1197: } break;
1198: case 137:
1199: # line 809 "grammar.z"
1200:
1201: {
1202: # ifdef xPTR2
1203: tTfp(39, 3, "copy %12s,%12s\n", yypvt[-5].string_type, yypvt[-0].string_type);
1204: # endif
1205:
1206: setp(PV_STR, yypvt[-0].string_type);
1207: } break;
1208: case 138:
1209: # line 818 "grammar.z"
1210:
1211: {
1212: Opflag = mdCOPY;
1213: } break;
1214: case 144:
1215: # line 830 "grammar.z"
1216:
1217: {
1218: setp(PV_STR, yypvt[-0].string_type);
1219: } break;
1220: case 145:
1221: # line 835 "grammar.z"
1222:
1223: {
1224: if (!Err_current)
1225: {
1226: setp(PV_STR, yypvt[-0].string_type);
1227: if (Opflag == mdDESTROY || Opflag == mdCREATE
1228: # ifdef DISTRIB
1229: || Opflag == mdDCREATE
1230: # endif
1231: )
1232: rngdel(yypvt[-0].string_type);
1233: }
1234: } break;
1235: case 148:
1236: # line 852 "grammar.z"
1237:
1238: {
1239: setp(PV_STR, "\0");
1240: setp(PV_STR, "i");
1241: } break;
1242: case 149:
1243: # line 857 "grammar.z"
1244:
1245: {
1246: setp(PV_STR, "\0");
1247: setp(PV_STR, "f");
1248: } break;
1249: case 151:
1250: # line 865 "grammar.z"
1251:
1252: {
1253: Opflag = mdCREATE;
1254:
1255: /* set up parameters for regular create */
1256: setp(PV_STR, "0"); /* relstat = nil */
1257: } break;
1258: case 154:
1259: # line 876 "grammar.z"
1260:
1261: {
1262: Opflag = mdDESTROY;
1263: } break;
1264: case 155:
1265: # line 881 "grammar.z"
1266:
1267: {
1268: Opflag = mdREMQM;
1269: if (!Qrymod)
1270: /* no qrymod in database */
1271: par_error(NOQRYMOD, WARN, 0);
1272: setp(PV_STR, "6");
1273: setp(PV_STR, yypvt[-0].string_type);
1274: } break;
1275: case 156:
1276: # line 890 "grammar.z"
1277:
1278: {
1279: Opflag = mdREMQM;
1280: if (!Qrymod)
1281: /* no qrymod in database */
1282: par_error(NOQRYMOD, WARN, 0);
1283: setp(PV_STR, "5");
1284: setp(PV_STR, yypvt[-0].string_type);
1285: } break;
1286: case 157:
1287: # line 900 "grammar.z"
1288:
1289: {
1290: i = iocv(*(yypvt[-0].I2_type));
1291: setp(PV_STR, i);
1292: } break;
1293: case 158:
1294: # line 905 "grammar.z"
1295:
1296: {
1297: i = iocv(*(yypvt[-0].I2_type));
1298: setp(PV_STR, i);
1299: } break;
1300: case 161:
1301: # line 913 "grammar.z"
1302:
1303: {
1304: setp(PV_STR, "2"); /* all relns */
1305: } break;
1306: case 163:
1307: # line 919 "grammar.z"
1308:
1309: {
1310: Opflag = mdHELP;
1311: } break;
1312: case 164:
1313: # line 924 "grammar.z"
1314:
1315: {
1316: Opflag = mdDISPLAY;
1317: if (!Qrymod)
1318: /* no qrymod in database */
1319: par_error(NOQRYMOD, WARN, 0);
1320: smove("4", hqmbuf);
1321: } break;
1322: case 165:
1323: # line 932 "grammar.z"
1324:
1325: {
1326: Opflag = mdDISPLAY;
1327: if (!Qrymod)
1328: /* no qrymod in database */
1329: par_error(NOQRYMOD, WARN, 0);
1330: smove("5", hqmbuf);
1331: } break;
1332: case 166:
1333: # line 940 "grammar.z"
1334:
1335: {
1336: Opflag = mdDISPLAY;
1337: if (!Qrymod)
1338: /* no qrymod in database */
1339: par_error(NOQRYMOD, WARN, 0);
1340: smove("6", hqmbuf);
1341: } break;
1342: case 169:
1343: # line 951 "grammar.z"
1344:
1345: {
1346: setp(PV_STR, "3");
1347: } break;
1348: case 170:
1349: # line 956 "grammar.z"
1350:
1351: {
1352: /* relation */
1353: setp(PV_STR, "0");
1354: setp(PV_STR, yypvt[-0].string_type);
1355: } break;
1356: case 171:
1357: # line 962 "grammar.z"
1358:
1359: {
1360: /* manual page */
1361: setp(PV_STR, "1");
1362: setp(PV_STR, yypvt[-0].string_type);
1363: } break;
1364: case 172:
1365: # line 969 "grammar.z"
1366:
1367: {
1368: setp(PV_STR, hqmbuf);
1369: setp(PV_STR, yypvt[-0].string_type);
1370: } break;
1371: case 173:
1372: # line 974 "grammar.z"
1373:
1374: {
1375: setp(PV_STR, hqmbuf);
1376: setp(PV_STR, yypvt[-0].string_type);
1377: } break;
1378: case 174:
1379: # line 980 "grammar.z"
1380:
1381: {
1382: if (Rsdmno > MAXKEYS)
1383: /* too many attributes in key */
1384: par_error(INDEXTRA, WARN, 0);
1385: } break;
1386: case 175:
1387: # line 987 "grammar.z"
1388:
1389: {
1390: /* init INDEX command */
1391: Rsdmno = 0;
1392: setp(PV_STR, yypvt[-2].string_type);
1393: setp(PV_STR, yypvt[-0].string_type);
1394: Indexname = yypvt[-0].string_type;
1395: } break;
1396: case 176:
1397: # line 996 "grammar.z"
1398:
1399: {
1400: Opflag = mdINDEX;
1401: } break;
1402: case 178:
1403: # line 1003 "grammar.z"
1404:
1405: {
1406: Opflag = mdMODIFY;
1407: Rsdmno = 0;
1408: } break;
1409: case 179:
1410: # line 1009 "grammar.z"
1411:
1412: {
1413: setp(PV_STR, yypvt[-0].string_type);
1414: } break;
1415: case 182:
1416: # line 1016 "grammar.z"
1417:
1418: {
1419: setp(PV_STR, "name");
1420: } break;
1421: case 185:
1422: # line 1024 "grammar.z"
1423:
1424: {
1425: setp(PV_STR, yypvt[-0].string_type);
1426: } break;
1427: case 186:
1428: # line 1028 "grammar.z"
1429:
1430: {
1431: concat(yypvt[-2].string_type, ztack(":", yypvt[-0].string_type), modbuf);
1432: setp(PV_STR, modbuf);
1433: } break;
1434: case 189:
1435: # line 1037 "grammar.z"
1436:
1437: {
1438: setp(PV_STR, "\0");
1439: } break;
1440: case 192:
1441: # line 1045 "grammar.z"
1442:
1443: {
1444: setp(PV_STR, yypvt[-2].string_type);
1445: i = iocv(*(yypvt[-0].I2_type));
1446: setp(PV_STR, i);
1447: } break;
1448: case 193:
1449: # line 1052 "grammar.z"
1450:
1451: {
1452: Rsdmno++;
1453: } break;
1454: case 194:
1455: # line 1056 "grammar.z"
1456:
1457: {
1458: Rsdmno++;
1459: } break;
1460: case 196:
1461: # line 1063 "grammar.z"
1462:
1463: {
1464: Opflag = mdPRINT;
1465: } break;
1466: case 198:
1467: # line 1070 "grammar.z"
1468:
1469: {
1470: Opflag = mdSAVE;
1471: } break;
1472: case 202:
1473: # line 1080 "grammar.z"
1474:
1475: {
1476: i = iocv(*(yypvt[-0].I2_type));
1477:
1478: # ifdef xPTR3
1479: tTfp(39, 4, "day_year: %s\n", i);
1480: # endif
1481:
1482: setp(PV_STR, i);
1483: } break;
1484: }
1485: goto yystack; /* stack new state and value */
1486:
1487: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.