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