[project @ 1996-03-22 09:24:22 by partain]
[ghc-hetmet.git] / ghc / compiler / yaccParser / finfot.c
1
2
3 #include "hspincl.h"
4 #include "yaccParser/finfot.h"
5
6 Tfinfot tfinfot(t)
7  finfot t;
8 {
9         return(t -> tag);
10 }
11
12
13 /************** finfo ******************/
14
15 finfot mkfinfo(PPfi1, PPfi2)
16  stringId PPfi1;
17  stringId PPfi2;
18 {
19         register struct Sfinfo *pp =
20                 (struct Sfinfo *) malloc(sizeof(struct Sfinfo));
21         pp -> tag = finfo;
22         pp -> Xfi1 = PPfi1;
23         pp -> Xfi2 = PPfi2;
24         return((finfot)pp);
25 }
26
27 stringId *Rfi1(t)
28  struct Sfinfo *t;
29 {
30 #ifdef UGEN_DEBUG
31         if(t -> tag != finfo)
32                 fprintf(stderr,"fi1: illegal selection; was %d\n", t -> tag);
33 #endif /* UGEN_DEBUG */
34         return(& t -> Xfi1);
35 }
36
37 stringId *Rfi2(t)
38  struct Sfinfo *t;
39 {
40 #ifdef UGEN_DEBUG
41         if(t -> tag != finfo)
42                 fprintf(stderr,"fi2: illegal selection; was %d\n", t -> tag);
43 #endif /* UGEN_DEBUG */
44         return(& t -> Xfi2);
45 }