[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / yaccParser / tree.h
1 #ifndef tree_defined
2 #define tree_defined
3
4 #include <stdio.h>
5
6 #ifndef PROTO
7 #ifdef __STDC__
8 #define PROTO(x) x
9 #else
10 #define PROTO(x) /**/
11 #endif
12 #endif
13
14 typedef enum {
15         hmodule,
16         ident,
17         lit,
18         tuple,
19         ap,
20         lambda,
21         let,
22         casee,
23         ife,
24         par,
25         as,
26         lazyp,
27         plusp,
28         wildp,
29         restr,
30         comprh,
31         qual,
32         guard,
33         def,
34         tinfixop,
35         lsection,
36         rsection,
37         eenum,
38         llist,
39         ccall,
40         scc,
41         negate
42 } Ttree;
43
44 typedef struct { Ttree tag; } *tree;
45
46 #ifdef __GNUC__
47 extern __inline__ Ttree ttree(tree t)
48 {
49         return(t -> tag);
50 }
51 #else  /* ! __GNUC__ */
52 extern Ttree ttree PROTO((tree));
53 #endif /* ! __GNUC__ */
54
55 struct Shmodule {
56         Ttree tag;
57         stringId Xghname;
58         list Xghimplist;
59         list Xghexplist;
60         binding Xghmodlist;
61         long Xghmodline;
62 };
63
64 struct Sident {
65         Ttree tag;
66         unkId Xgident;
67 };
68
69 struct Slit {
70         Ttree tag;
71         literal Xglit;
72 };
73
74 struct Stuple {
75         Ttree tag;
76         list Xgtuplelist;
77 };
78
79 struct Sap {
80         Ttree tag;
81         tree Xgfun;
82         tree Xgarg;
83 };
84
85 struct Slambda {
86         Ttree tag;
87         list Xglampats;
88         tree Xglamexpr;
89         long Xglamline;
90 };
91
92 struct Slet {
93         Ttree tag;
94         binding Xgletvdeflist;
95         tree Xgletvexpr;
96 };
97
98 struct Scasee {
99         Ttree tag;
100         tree Xgcaseexpr;
101         list Xgcasebody;
102 };
103
104 struct Sife {
105         Ttree tag;
106         tree Xgifpred;
107         tree Xgifthen;
108         tree Xgifelse;
109 };
110
111 struct Spar {
112         Ttree tag;
113         tree Xgpare;
114 };
115
116 struct Sas {
117         Ttree tag;
118         unkId Xgasid;
119         tree Xgase;
120 };
121
122 struct Slazyp {
123         Ttree tag;
124         tree Xglazyp;
125 };
126
127 struct Splusp {
128         Ttree tag;
129         tree Xgplusp;
130         literal Xgplusi;
131 };
132
133 struct Swildp {
134         Ttree tag;
135 };
136
137 struct Srestr {
138         Ttree tag;
139         tree Xgrestre;
140         ttype Xgrestrt;
141 };
142
143 struct Scomprh {
144         Ttree tag;
145         tree Xgcexp;
146         list Xgcquals;
147 };
148
149 struct Squal {
150         Ttree tag;
151         tree Xgqpat;
152         tree Xgqexp;
153 };
154
155 struct Sguard {
156         Ttree tag;
157         tree Xggexp;
158 };
159
160 struct Sdef {
161         Ttree tag;
162         tree Xggdef;
163 };
164
165 struct Stinfixop {
166         Ttree tag;
167         infixTree Xgdummy;
168 };
169
170 struct Slsection {
171         Ttree tag;
172         tree Xglsexp;
173         unkId Xglsop;
174 };
175
176 struct Srsection {
177         Ttree tag;
178         unkId Xgrsop;
179         tree Xgrsexp;
180 };
181
182 struct Seenum {
183         Ttree tag;
184         tree Xgefrom;
185         list Xgestep;
186         list Xgeto;
187 };
188
189 struct Sllist {
190         Ttree tag;
191         list Xgllist;
192 };
193
194 struct Sccall {
195         Ttree tag;
196         stringId Xgccid;
197         stringId Xgccinfo;
198         list Xgccargs;
199 };
200
201 struct Sscc {
202         Ttree tag;
203         hstring Xgsccid;
204         tree Xgsccexp;
205 };
206
207 struct Snegate {
208         Ttree tag;
209         tree Xgnexp;
210 };
211
212 extern tree mkhmodule PROTO((stringId, list, list, binding, long));
213 #ifdef __GNUC__
214
215 extern __inline__ stringId *Rghname(struct Shmodule *t)
216 {
217 #ifdef UGEN_DEBUG
218         if(t -> tag != hmodule)
219                 fprintf(stderr,"ghname: illegal selection; was %d\n", t -> tag);
220 #endif /* UGEN_DEBUG */
221         return(& t -> Xghname);
222 }
223 #else  /* ! __GNUC__ */
224 extern stringId *Rghname PROTO((struct Shmodule *));
225 #endif /* ! __GNUC__ */
226
227 #define ghname(xyzxyz) (*Rghname((struct Shmodule *) (xyzxyz)))
228 #ifdef __GNUC__
229
230 extern __inline__ list *Rghimplist(struct Shmodule *t)
231 {
232 #ifdef UGEN_DEBUG
233         if(t -> tag != hmodule)
234                 fprintf(stderr,"ghimplist: illegal selection; was %d\n", t -> tag);
235 #endif /* UGEN_DEBUG */
236         return(& t -> Xghimplist);
237 }
238 #else  /* ! __GNUC__ */
239 extern list *Rghimplist PROTO((struct Shmodule *));
240 #endif /* ! __GNUC__ */
241
242 #define ghimplist(xyzxyz) (*Rghimplist((struct Shmodule *) (xyzxyz)))
243 #ifdef __GNUC__
244
245 extern __inline__ list *Rghexplist(struct Shmodule *t)
246 {
247 #ifdef UGEN_DEBUG
248         if(t -> tag != hmodule)
249                 fprintf(stderr,"ghexplist: illegal selection; was %d\n", t -> tag);
250 #endif /* UGEN_DEBUG */
251         return(& t -> Xghexplist);
252 }
253 #else  /* ! __GNUC__ */
254 extern list *Rghexplist PROTO((struct Shmodule *));
255 #endif /* ! __GNUC__ */
256
257 #define ghexplist(xyzxyz) (*Rghexplist((struct Shmodule *) (xyzxyz)))
258 #ifdef __GNUC__
259
260 extern __inline__ binding *Rghmodlist(struct Shmodule *t)
261 {
262 #ifdef UGEN_DEBUG
263         if(t -> tag != hmodule)
264                 fprintf(stderr,"ghmodlist: illegal selection; was %d\n", t -> tag);
265 #endif /* UGEN_DEBUG */
266         return(& t -> Xghmodlist);
267 }
268 #else  /* ! __GNUC__ */
269 extern binding *Rghmodlist PROTO((struct Shmodule *));
270 #endif /* ! __GNUC__ */
271
272 #define ghmodlist(xyzxyz) (*Rghmodlist((struct Shmodule *) (xyzxyz)))
273 #ifdef __GNUC__
274
275 extern __inline__ long *Rghmodline(struct Shmodule *t)
276 {
277 #ifdef UGEN_DEBUG
278         if(t -> tag != hmodule)
279                 fprintf(stderr,"ghmodline: illegal selection; was %d\n", t -> tag);
280 #endif /* UGEN_DEBUG */
281         return(& t -> Xghmodline);
282 }
283 #else  /* ! __GNUC__ */
284 extern long *Rghmodline PROTO((struct Shmodule *));
285 #endif /* ! __GNUC__ */
286
287 #define ghmodline(xyzxyz) (*Rghmodline((struct Shmodule *) (xyzxyz)))
288
289 extern tree mkident PROTO((unkId));
290 #ifdef __GNUC__
291
292 extern __inline__ unkId *Rgident(struct Sident *t)
293 {
294 #ifdef UGEN_DEBUG
295         if(t -> tag != ident)
296                 fprintf(stderr,"gident: illegal selection; was %d\n", t -> tag);
297 #endif /* UGEN_DEBUG */
298         return(& t -> Xgident);
299 }
300 #else  /* ! __GNUC__ */
301 extern unkId *Rgident PROTO((struct Sident *));
302 #endif /* ! __GNUC__ */
303
304 #define gident(xyzxyz) (*Rgident((struct Sident *) (xyzxyz)))
305
306 extern tree mklit PROTO((literal));
307 #ifdef __GNUC__
308
309 extern __inline__ literal *Rglit(struct Slit *t)
310 {
311 #ifdef UGEN_DEBUG
312         if(t -> tag != lit)
313                 fprintf(stderr,"glit: illegal selection; was %d\n", t -> tag);
314 #endif /* UGEN_DEBUG */
315         return(& t -> Xglit);
316 }
317 #else  /* ! __GNUC__ */
318 extern literal *Rglit PROTO((struct Slit *));
319 #endif /* ! __GNUC__ */
320
321 #define glit(xyzxyz) (*Rglit((struct Slit *) (xyzxyz)))
322
323 extern tree mktuple PROTO((list));
324 #ifdef __GNUC__
325
326 extern __inline__ list *Rgtuplelist(struct Stuple *t)
327 {
328 #ifdef UGEN_DEBUG
329         if(t -> tag != tuple)
330                 fprintf(stderr,"gtuplelist: illegal selection; was %d\n", t -> tag);
331 #endif /* UGEN_DEBUG */
332         return(& t -> Xgtuplelist);
333 }
334 #else  /* ! __GNUC__ */
335 extern list *Rgtuplelist PROTO((struct Stuple *));
336 #endif /* ! __GNUC__ */
337
338 #define gtuplelist(xyzxyz) (*Rgtuplelist((struct Stuple *) (xyzxyz)))
339
340 extern tree mkap PROTO((tree, tree));
341 #ifdef __GNUC__
342
343 extern __inline__ tree *Rgfun(struct Sap *t)
344 {
345 #ifdef UGEN_DEBUG
346         if(t -> tag != ap)
347                 fprintf(stderr,"gfun: illegal selection; was %d\n", t -> tag);
348 #endif /* UGEN_DEBUG */
349         return(& t -> Xgfun);
350 }
351 #else  /* ! __GNUC__ */
352 extern tree *Rgfun PROTO((struct Sap *));
353 #endif /* ! __GNUC__ */
354
355 #define gfun(xyzxyz) (*Rgfun((struct Sap *) (xyzxyz)))
356 #ifdef __GNUC__
357
358 extern __inline__ tree *Rgarg(struct Sap *t)
359 {
360 #ifdef UGEN_DEBUG
361         if(t -> tag != ap)
362                 fprintf(stderr,"garg: illegal selection; was %d\n", t -> tag);
363 #endif /* UGEN_DEBUG */
364         return(& t -> Xgarg);
365 }
366 #else  /* ! __GNUC__ */
367 extern tree *Rgarg PROTO((struct Sap *));
368 #endif /* ! __GNUC__ */
369
370 #define garg(xyzxyz) (*Rgarg((struct Sap *) (xyzxyz)))
371
372 extern tree mklambda PROTO((list, tree, long));
373 #ifdef __GNUC__
374
375 extern __inline__ list *Rglampats(struct Slambda *t)
376 {
377 #ifdef UGEN_DEBUG
378         if(t -> tag != lambda)
379                 fprintf(stderr,"glampats: illegal selection; was %d\n", t -> tag);
380 #endif /* UGEN_DEBUG */
381         return(& t -> Xglampats);
382 }
383 #else  /* ! __GNUC__ */
384 extern list *Rglampats PROTO((struct Slambda *));
385 #endif /* ! __GNUC__ */
386
387 #define glampats(xyzxyz) (*Rglampats((struct Slambda *) (xyzxyz)))
388 #ifdef __GNUC__
389
390 extern __inline__ tree *Rglamexpr(struct Slambda *t)
391 {
392 #ifdef UGEN_DEBUG
393         if(t -> tag != lambda)
394                 fprintf(stderr,"glamexpr: illegal selection; was %d\n", t -> tag);
395 #endif /* UGEN_DEBUG */
396         return(& t -> Xglamexpr);
397 }
398 #else  /* ! __GNUC__ */
399 extern tree *Rglamexpr PROTO((struct Slambda *));
400 #endif /* ! __GNUC__ */
401
402 #define glamexpr(xyzxyz) (*Rglamexpr((struct Slambda *) (xyzxyz)))
403 #ifdef __GNUC__
404
405 extern __inline__ long *Rglamline(struct Slambda *t)
406 {
407 #ifdef UGEN_DEBUG
408         if(t -> tag != lambda)
409                 fprintf(stderr,"glamline: illegal selection; was %d\n", t -> tag);
410 #endif /* UGEN_DEBUG */
411         return(& t -> Xglamline);
412 }
413 #else  /* ! __GNUC__ */
414 extern long *Rglamline PROTO((struct Slambda *));
415 #endif /* ! __GNUC__ */
416
417 #define glamline(xyzxyz) (*Rglamline((struct Slambda *) (xyzxyz)))
418
419 extern tree mklet PROTO((binding, tree));
420 #ifdef __GNUC__
421
422 extern __inline__ binding *Rgletvdeflist(struct Slet *t)
423 {
424 #ifdef UGEN_DEBUG
425         if(t -> tag != let)
426                 fprintf(stderr,"gletvdeflist: illegal selection; was %d\n", t -> tag);
427 #endif /* UGEN_DEBUG */
428         return(& t -> Xgletvdeflist);
429 }
430 #else  /* ! __GNUC__ */
431 extern binding *Rgletvdeflist PROTO((struct Slet *));
432 #endif /* ! __GNUC__ */
433
434 #define gletvdeflist(xyzxyz) (*Rgletvdeflist((struct Slet *) (xyzxyz)))
435 #ifdef __GNUC__
436
437 extern __inline__ tree *Rgletvexpr(struct Slet *t)
438 {
439 #ifdef UGEN_DEBUG
440         if(t -> tag != let)
441                 fprintf(stderr,"gletvexpr: illegal selection; was %d\n", t -> tag);
442 #endif /* UGEN_DEBUG */
443         return(& t -> Xgletvexpr);
444 }
445 #else  /* ! __GNUC__ */
446 extern tree *Rgletvexpr PROTO((struct Slet *));
447 #endif /* ! __GNUC__ */
448
449 #define gletvexpr(xyzxyz) (*Rgletvexpr((struct Slet *) (xyzxyz)))
450
451 extern tree mkcasee PROTO((tree, list));
452 #ifdef __GNUC__
453
454 extern __inline__ tree *Rgcaseexpr(struct Scasee *t)
455 {
456 #ifdef UGEN_DEBUG
457         if(t -> tag != casee)
458                 fprintf(stderr,"gcaseexpr: illegal selection; was %d\n", t -> tag);
459 #endif /* UGEN_DEBUG */
460         return(& t -> Xgcaseexpr);
461 }
462 #else  /* ! __GNUC__ */
463 extern tree *Rgcaseexpr PROTO((struct Scasee *));
464 #endif /* ! __GNUC__ */
465
466 #define gcaseexpr(xyzxyz) (*Rgcaseexpr((struct Scasee *) (xyzxyz)))
467 #ifdef __GNUC__
468
469 extern __inline__ list *Rgcasebody(struct Scasee *t)
470 {
471 #ifdef UGEN_DEBUG
472         if(t -> tag != casee)
473                 fprintf(stderr,"gcasebody: illegal selection; was %d\n", t -> tag);
474 #endif /* UGEN_DEBUG */
475         return(& t -> Xgcasebody);
476 }
477 #else  /* ! __GNUC__ */
478 extern list *Rgcasebody PROTO((struct Scasee *));
479 #endif /* ! __GNUC__ */
480
481 #define gcasebody(xyzxyz) (*Rgcasebody((struct Scasee *) (xyzxyz)))
482
483 extern tree mkife PROTO((tree, tree, tree));
484 #ifdef __GNUC__
485
486 extern __inline__ tree *Rgifpred(struct Sife *t)
487 {
488 #ifdef UGEN_DEBUG
489         if(t -> tag != ife)
490                 fprintf(stderr,"gifpred: illegal selection; was %d\n", t -> tag);
491 #endif /* UGEN_DEBUG */
492         return(& t -> Xgifpred);
493 }
494 #else  /* ! __GNUC__ */
495 extern tree *Rgifpred PROTO((struct Sife *));
496 #endif /* ! __GNUC__ */
497
498 #define gifpred(xyzxyz) (*Rgifpred((struct Sife *) (xyzxyz)))
499 #ifdef __GNUC__
500
501 extern __inline__ tree *Rgifthen(struct Sife *t)
502 {
503 #ifdef UGEN_DEBUG
504         if(t -> tag != ife)
505                 fprintf(stderr,"gifthen: illegal selection; was %d\n", t -> tag);
506 #endif /* UGEN_DEBUG */
507         return(& t -> Xgifthen);
508 }
509 #else  /* ! __GNUC__ */
510 extern tree *Rgifthen PROTO((struct Sife *));
511 #endif /* ! __GNUC__ */
512
513 #define gifthen(xyzxyz) (*Rgifthen((struct Sife *) (xyzxyz)))
514 #ifdef __GNUC__
515
516 extern __inline__ tree *Rgifelse(struct Sife *t)
517 {
518 #ifdef UGEN_DEBUG
519         if(t -> tag != ife)
520                 fprintf(stderr,"gifelse: illegal selection; was %d\n", t -> tag);
521 #endif /* UGEN_DEBUG */
522         return(& t -> Xgifelse);
523 }
524 #else  /* ! __GNUC__ */
525 extern tree *Rgifelse PROTO((struct Sife *));
526 #endif /* ! __GNUC__ */
527
528 #define gifelse(xyzxyz) (*Rgifelse((struct Sife *) (xyzxyz)))
529
530 extern tree mkpar PROTO((tree));
531 #ifdef __GNUC__
532
533 extern __inline__ tree *Rgpare(struct Spar *t)
534 {
535 #ifdef UGEN_DEBUG
536         if(t -> tag != par)
537                 fprintf(stderr,"gpare: illegal selection; was %d\n", t -> tag);
538 #endif /* UGEN_DEBUG */
539         return(& t -> Xgpare);
540 }
541 #else  /* ! __GNUC__ */
542 extern tree *Rgpare PROTO((struct Spar *));
543 #endif /* ! __GNUC__ */
544
545 #define gpare(xyzxyz) (*Rgpare((struct Spar *) (xyzxyz)))
546
547 extern tree mkas PROTO((unkId, tree));
548 #ifdef __GNUC__
549
550 extern __inline__ unkId *Rgasid(struct Sas *t)
551 {
552 #ifdef UGEN_DEBUG
553         if(t -> tag != as)
554                 fprintf(stderr,"gasid: illegal selection; was %d\n", t -> tag);
555 #endif /* UGEN_DEBUG */
556         return(& t -> Xgasid);
557 }
558 #else  /* ! __GNUC__ */
559 extern unkId *Rgasid PROTO((struct Sas *));
560 #endif /* ! __GNUC__ */
561
562 #define gasid(xyzxyz) (*Rgasid((struct Sas *) (xyzxyz)))
563 #ifdef __GNUC__
564
565 extern __inline__ tree *Rgase(struct Sas *t)
566 {
567 #ifdef UGEN_DEBUG
568         if(t -> tag != as)
569                 fprintf(stderr,"gase: illegal selection; was %d\n", t -> tag);
570 #endif /* UGEN_DEBUG */
571         return(& t -> Xgase);
572 }
573 #else  /* ! __GNUC__ */
574 extern tree *Rgase PROTO((struct Sas *));
575 #endif /* ! __GNUC__ */
576
577 #define gase(xyzxyz) (*Rgase((struct Sas *) (xyzxyz)))
578
579 extern tree mklazyp PROTO((tree));
580 #ifdef __GNUC__
581
582 extern __inline__ tree *Rglazyp(struct Slazyp *t)
583 {
584 #ifdef UGEN_DEBUG
585         if(t -> tag != lazyp)
586                 fprintf(stderr,"glazyp: illegal selection; was %d\n", t -> tag);
587 #endif /* UGEN_DEBUG */
588         return(& t -> Xglazyp);
589 }
590 #else  /* ! __GNUC__ */
591 extern tree *Rglazyp PROTO((struct Slazyp *));
592 #endif /* ! __GNUC__ */
593
594 #define glazyp(xyzxyz) (*Rglazyp((struct Slazyp *) (xyzxyz)))
595
596 extern tree mkplusp PROTO((tree, literal));
597 #ifdef __GNUC__
598
599 extern __inline__ tree *Rgplusp(struct Splusp *t)
600 {
601 #ifdef UGEN_DEBUG
602         if(t -> tag != plusp)
603                 fprintf(stderr,"gplusp: illegal selection; was %d\n", t -> tag);
604 #endif /* UGEN_DEBUG */
605         return(& t -> Xgplusp);
606 }
607 #else  /* ! __GNUC__ */
608 extern tree *Rgplusp PROTO((struct Splusp *));
609 #endif /* ! __GNUC__ */
610
611 #define gplusp(xyzxyz) (*Rgplusp((struct Splusp *) (xyzxyz)))
612 #ifdef __GNUC__
613
614 extern __inline__ literal *Rgplusi(struct Splusp *t)
615 {
616 #ifdef UGEN_DEBUG
617         if(t -> tag != plusp)
618                 fprintf(stderr,"gplusi: illegal selection; was %d\n", t -> tag);
619 #endif /* UGEN_DEBUG */
620         return(& t -> Xgplusi);
621 }
622 #else  /* ! __GNUC__ */
623 extern literal *Rgplusi PROTO((struct Splusp *));
624 #endif /* ! __GNUC__ */
625
626 #define gplusi(xyzxyz) (*Rgplusi((struct Splusp *) (xyzxyz)))
627
628 extern tree mkwildp PROTO(());
629
630 extern tree mkrestr PROTO((tree, ttype));
631 #ifdef __GNUC__
632
633 extern __inline__ tree *Rgrestre(struct Srestr *t)
634 {
635 #ifdef UGEN_DEBUG
636         if(t -> tag != restr)
637                 fprintf(stderr,"grestre: illegal selection; was %d\n", t -> tag);
638 #endif /* UGEN_DEBUG */
639         return(& t -> Xgrestre);
640 }
641 #else  /* ! __GNUC__ */
642 extern tree *Rgrestre PROTO((struct Srestr *));
643 #endif /* ! __GNUC__ */
644
645 #define grestre(xyzxyz) (*Rgrestre((struct Srestr *) (xyzxyz)))
646 #ifdef __GNUC__
647
648 extern __inline__ ttype *Rgrestrt(struct Srestr *t)
649 {
650 #ifdef UGEN_DEBUG
651         if(t -> tag != restr)
652                 fprintf(stderr,"grestrt: illegal selection; was %d\n", t -> tag);
653 #endif /* UGEN_DEBUG */
654         return(& t -> Xgrestrt);
655 }
656 #else  /* ! __GNUC__ */
657 extern ttype *Rgrestrt PROTO((struct Srestr *));
658 #endif /* ! __GNUC__ */
659
660 #define grestrt(xyzxyz) (*Rgrestrt((struct Srestr *) (xyzxyz)))
661
662 extern tree mkcomprh PROTO((tree, list));
663 #ifdef __GNUC__
664
665 extern __inline__ tree *Rgcexp(struct Scomprh *t)
666 {
667 #ifdef UGEN_DEBUG
668         if(t -> tag != comprh)
669                 fprintf(stderr,"gcexp: illegal selection; was %d\n", t -> tag);
670 #endif /* UGEN_DEBUG */
671         return(& t -> Xgcexp);
672 }
673 #else  /* ! __GNUC__ */
674 extern tree *Rgcexp PROTO((struct Scomprh *));
675 #endif /* ! __GNUC__ */
676
677 #define gcexp(xyzxyz) (*Rgcexp((struct Scomprh *) (xyzxyz)))
678 #ifdef __GNUC__
679
680 extern __inline__ list *Rgcquals(struct Scomprh *t)
681 {
682 #ifdef UGEN_DEBUG
683         if(t -> tag != comprh)
684                 fprintf(stderr,"gcquals: illegal selection; was %d\n", t -> tag);
685 #endif /* UGEN_DEBUG */
686         return(& t -> Xgcquals);
687 }
688 #else  /* ! __GNUC__ */
689 extern list *Rgcquals PROTO((struct Scomprh *));
690 #endif /* ! __GNUC__ */
691
692 #define gcquals(xyzxyz) (*Rgcquals((struct Scomprh *) (xyzxyz)))
693
694 extern tree mkqual PROTO((tree, tree));
695 #ifdef __GNUC__
696
697 extern __inline__ tree *Rgqpat(struct Squal *t)
698 {
699 #ifdef UGEN_DEBUG
700         if(t -> tag != qual)
701                 fprintf(stderr,"gqpat: illegal selection; was %d\n", t -> tag);
702 #endif /* UGEN_DEBUG */
703         return(& t -> Xgqpat);
704 }
705 #else  /* ! __GNUC__ */
706 extern tree *Rgqpat PROTO((struct Squal *));
707 #endif /* ! __GNUC__ */
708
709 #define gqpat(xyzxyz) (*Rgqpat((struct Squal *) (xyzxyz)))
710 #ifdef __GNUC__
711
712 extern __inline__ tree *Rgqexp(struct Squal *t)
713 {
714 #ifdef UGEN_DEBUG
715         if(t -> tag != qual)
716                 fprintf(stderr,"gqexp: illegal selection; was %d\n", t -> tag);
717 #endif /* UGEN_DEBUG */
718         return(& t -> Xgqexp);
719 }
720 #else  /* ! __GNUC__ */
721 extern tree *Rgqexp PROTO((struct Squal *));
722 #endif /* ! __GNUC__ */
723
724 #define gqexp(xyzxyz) (*Rgqexp((struct Squal *) (xyzxyz)))
725
726 extern tree mkguard PROTO((tree));
727 #ifdef __GNUC__
728
729 extern __inline__ tree *Rggexp(struct Sguard *t)
730 {
731 #ifdef UGEN_DEBUG
732         if(t -> tag != guard)
733                 fprintf(stderr,"ggexp: illegal selection; was %d\n", t -> tag);
734 #endif /* UGEN_DEBUG */
735         return(& t -> Xggexp);
736 }
737 #else  /* ! __GNUC__ */
738 extern tree *Rggexp PROTO((struct Sguard *));
739 #endif /* ! __GNUC__ */
740
741 #define ggexp(xyzxyz) (*Rggexp((struct Sguard *) (xyzxyz)))
742
743 extern tree mkdef PROTO((tree));
744 #ifdef __GNUC__
745
746 extern __inline__ tree *Rggdef(struct Sdef *t)
747 {
748 #ifdef UGEN_DEBUG
749         if(t -> tag != def)
750                 fprintf(stderr,"ggdef: illegal selection; was %d\n", t -> tag);
751 #endif /* UGEN_DEBUG */
752         return(& t -> Xggdef);
753 }
754 #else  /* ! __GNUC__ */
755 extern tree *Rggdef PROTO((struct Sdef *));
756 #endif /* ! __GNUC__ */
757
758 #define ggdef(xyzxyz) (*Rggdef((struct Sdef *) (xyzxyz)))
759
760 extern tree mktinfixop PROTO((infixTree));
761 #ifdef __GNUC__
762
763 extern __inline__ infixTree *Rgdummy(struct Stinfixop *t)
764 {
765 #ifdef UGEN_DEBUG
766         if(t -> tag != tinfixop)
767                 fprintf(stderr,"gdummy: illegal selection; was %d\n", t -> tag);
768 #endif /* UGEN_DEBUG */
769         return(& t -> Xgdummy);
770 }
771 #else  /* ! __GNUC__ */
772 extern infixTree *Rgdummy PROTO((struct Stinfixop *));
773 #endif /* ! __GNUC__ */
774
775 #define gdummy(xyzxyz) (*Rgdummy((struct Stinfixop *) (xyzxyz)))
776
777 extern tree mklsection PROTO((tree, unkId));
778 #ifdef __GNUC__
779
780 extern __inline__ tree *Rglsexp(struct Slsection *t)
781 {
782 #ifdef UGEN_DEBUG
783         if(t -> tag != lsection)
784                 fprintf(stderr,"glsexp: illegal selection; was %d\n", t -> tag);
785 #endif /* UGEN_DEBUG */
786         return(& t -> Xglsexp);
787 }
788 #else  /* ! __GNUC__ */
789 extern tree *Rglsexp PROTO((struct Slsection *));
790 #endif /* ! __GNUC__ */
791
792 #define glsexp(xyzxyz) (*Rglsexp((struct Slsection *) (xyzxyz)))
793 #ifdef __GNUC__
794
795 extern __inline__ unkId *Rglsop(struct Slsection *t)
796 {
797 #ifdef UGEN_DEBUG
798         if(t -> tag != lsection)
799                 fprintf(stderr,"glsop: illegal selection; was %d\n", t -> tag);
800 #endif /* UGEN_DEBUG */
801         return(& t -> Xglsop);
802 }
803 #else  /* ! __GNUC__ */
804 extern unkId *Rglsop PROTO((struct Slsection *));
805 #endif /* ! __GNUC__ */
806
807 #define glsop(xyzxyz) (*Rglsop((struct Slsection *) (xyzxyz)))
808
809 extern tree mkrsection PROTO((unkId, tree));
810 #ifdef __GNUC__
811
812 extern __inline__ unkId *Rgrsop(struct Srsection *t)
813 {
814 #ifdef UGEN_DEBUG
815         if(t -> tag != rsection)
816                 fprintf(stderr,"grsop: illegal selection; was %d\n", t -> tag);
817 #endif /* UGEN_DEBUG */
818         return(& t -> Xgrsop);
819 }
820 #else  /* ! __GNUC__ */
821 extern unkId *Rgrsop PROTO((struct Srsection *));
822 #endif /* ! __GNUC__ */
823
824 #define grsop(xyzxyz) (*Rgrsop((struct Srsection *) (xyzxyz)))
825 #ifdef __GNUC__
826
827 extern __inline__ tree *Rgrsexp(struct Srsection *t)
828 {
829 #ifdef UGEN_DEBUG
830         if(t -> tag != rsection)
831                 fprintf(stderr,"grsexp: illegal selection; was %d\n", t -> tag);
832 #endif /* UGEN_DEBUG */
833         return(& t -> Xgrsexp);
834 }
835 #else  /* ! __GNUC__ */
836 extern tree *Rgrsexp PROTO((struct Srsection *));
837 #endif /* ! __GNUC__ */
838
839 #define grsexp(xyzxyz) (*Rgrsexp((struct Srsection *) (xyzxyz)))
840
841 extern tree mkeenum PROTO((tree, list, list));
842 #ifdef __GNUC__
843
844 extern __inline__ tree *Rgefrom(struct Seenum *t)
845 {
846 #ifdef UGEN_DEBUG
847         if(t -> tag != eenum)
848                 fprintf(stderr,"gefrom: illegal selection; was %d\n", t -> tag);
849 #endif /* UGEN_DEBUG */
850         return(& t -> Xgefrom);
851 }
852 #else  /* ! __GNUC__ */
853 extern tree *Rgefrom PROTO((struct Seenum *));
854 #endif /* ! __GNUC__ */
855
856 #define gefrom(xyzxyz) (*Rgefrom((struct Seenum *) (xyzxyz)))
857 #ifdef __GNUC__
858
859 extern __inline__ list *Rgestep(struct Seenum *t)
860 {
861 #ifdef UGEN_DEBUG
862         if(t -> tag != eenum)
863                 fprintf(stderr,"gestep: illegal selection; was %d\n", t -> tag);
864 #endif /* UGEN_DEBUG */
865         return(& t -> Xgestep);
866 }
867 #else  /* ! __GNUC__ */
868 extern list *Rgestep PROTO((struct Seenum *));
869 #endif /* ! __GNUC__ */
870
871 #define gestep(xyzxyz) (*Rgestep((struct Seenum *) (xyzxyz)))
872 #ifdef __GNUC__
873
874 extern __inline__ list *Rgeto(struct Seenum *t)
875 {
876 #ifdef UGEN_DEBUG
877         if(t -> tag != eenum)
878                 fprintf(stderr,"geto: illegal selection; was %d\n", t -> tag);
879 #endif /* UGEN_DEBUG */
880         return(& t -> Xgeto);
881 }
882 #else  /* ! __GNUC__ */
883 extern list *Rgeto PROTO((struct Seenum *));
884 #endif /* ! __GNUC__ */
885
886 #define geto(xyzxyz) (*Rgeto((struct Seenum *) (xyzxyz)))
887
888 extern tree mkllist PROTO((list));
889 #ifdef __GNUC__
890
891 extern __inline__ list *Rgllist(struct Sllist *t)
892 {
893 #ifdef UGEN_DEBUG
894         if(t -> tag != llist)
895                 fprintf(stderr,"gllist: illegal selection; was %d\n", t -> tag);
896 #endif /* UGEN_DEBUG */
897         return(& t -> Xgllist);
898 }
899 #else  /* ! __GNUC__ */
900 extern list *Rgllist PROTO((struct Sllist *));
901 #endif /* ! __GNUC__ */
902
903 #define gllist(xyzxyz) (*Rgllist((struct Sllist *) (xyzxyz)))
904
905 extern tree mkccall PROTO((stringId, stringId, list));
906 #ifdef __GNUC__
907
908 extern __inline__ stringId *Rgccid(struct Sccall *t)
909 {
910 #ifdef UGEN_DEBUG
911         if(t -> tag != ccall)
912                 fprintf(stderr,"gccid: illegal selection; was %d\n", t -> tag);
913 #endif /* UGEN_DEBUG */
914         return(& t -> Xgccid);
915 }
916 #else  /* ! __GNUC__ */
917 extern stringId *Rgccid PROTO((struct Sccall *));
918 #endif /* ! __GNUC__ */
919
920 #define gccid(xyzxyz) (*Rgccid((struct Sccall *) (xyzxyz)))
921 #ifdef __GNUC__
922
923 extern __inline__ stringId *Rgccinfo(struct Sccall *t)
924 {
925 #ifdef UGEN_DEBUG
926         if(t -> tag != ccall)
927                 fprintf(stderr,"gccinfo: illegal selection; was %d\n", t -> tag);
928 #endif /* UGEN_DEBUG */
929         return(& t -> Xgccinfo);
930 }
931 #else  /* ! __GNUC__ */
932 extern stringId *Rgccinfo PROTO((struct Sccall *));
933 #endif /* ! __GNUC__ */
934
935 #define gccinfo(xyzxyz) (*Rgccinfo((struct Sccall *) (xyzxyz)))
936 #ifdef __GNUC__
937
938 extern __inline__ list *Rgccargs(struct Sccall *t)
939 {
940 #ifdef UGEN_DEBUG
941         if(t -> tag != ccall)
942                 fprintf(stderr,"gccargs: illegal selection; was %d\n", t -> tag);
943 #endif /* UGEN_DEBUG */
944         return(& t -> Xgccargs);
945 }
946 #else  /* ! __GNUC__ */
947 extern list *Rgccargs PROTO((struct Sccall *));
948 #endif /* ! __GNUC__ */
949
950 #define gccargs(xyzxyz) (*Rgccargs((struct Sccall *) (xyzxyz)))
951
952 extern tree mkscc PROTO((hstring, tree));
953 #ifdef __GNUC__
954
955 extern __inline__ hstring *Rgsccid(struct Sscc *t)
956 {
957 #ifdef UGEN_DEBUG
958         if(t -> tag != scc)
959                 fprintf(stderr,"gsccid: illegal selection; was %d\n", t -> tag);
960 #endif /* UGEN_DEBUG */
961         return(& t -> Xgsccid);
962 }
963 #else  /* ! __GNUC__ */
964 extern hstring *Rgsccid PROTO((struct Sscc *));
965 #endif /* ! __GNUC__ */
966
967 #define gsccid(xyzxyz) (*Rgsccid((struct Sscc *) (xyzxyz)))
968 #ifdef __GNUC__
969
970 extern __inline__ tree *Rgsccexp(struct Sscc *t)
971 {
972 #ifdef UGEN_DEBUG
973         if(t -> tag != scc)
974                 fprintf(stderr,"gsccexp: illegal selection; was %d\n", t -> tag);
975 #endif /* UGEN_DEBUG */
976         return(& t -> Xgsccexp);
977 }
978 #else  /* ! __GNUC__ */
979 extern tree *Rgsccexp PROTO((struct Sscc *));
980 #endif /* ! __GNUC__ */
981
982 #define gsccexp(xyzxyz) (*Rgsccexp((struct Sscc *) (xyzxyz)))
983
984 extern tree mknegate PROTO((tree));
985 #ifdef __GNUC__
986
987 extern __inline__ tree *Rgnexp(struct Snegate *t)
988 {
989 #ifdef UGEN_DEBUG
990         if(t -> tag != negate)
991                 fprintf(stderr,"gnexp: illegal selection; was %d\n", t -> tag);
992 #endif /* UGEN_DEBUG */
993         return(& t -> Xgnexp);
994 }
995 #else  /* ! __GNUC__ */
996 extern tree *Rgnexp PROTO((struct Snegate *));
997 #endif /* ! __GNUC__ */
998
999 #define gnexp(xyzxyz) (*Rgnexp((struct Snegate *) (xyzxyz)))
1000
1001 #endif