4 #include "yaccParser/impidt.h"
12 /************** impid ******************/
14 impidt mkimpid(PPgimpid, PPgimptype, PPgimpfinfo, PPgivline)
20 register struct Simpid *pp =
21 (struct Simpid *) malloc(sizeof(struct Simpid));
23 pp -> Xgimpid = PPgimpid;
24 pp -> Xgimptype = PPgimptype;
25 pp -> Xgimpfinfo = PPgimpfinfo;
26 pp -> Xgivline = PPgivline;
34 fprintf(stderr,"gimpid: illegal selection; was %d\n", t -> tag);
35 return(& t -> Xgimpid);
42 fprintf(stderr,"gimptype: illegal selection; was %d\n", t -> tag);
43 return(& t -> Xgimptype);
50 fprintf(stderr,"gimpfinfo: illegal selection; was %d\n", t -> tag);
51 return(& t -> Xgimpfinfo);
58 fprintf(stderr,"givline: illegal selection; was %d\n", t -> tag);
59 return(& t -> Xgivline);
62 /************** imptype ******************/
64 impidt mkimptype(PPgimptypec, PPgimptypet, PPgimptyped, PPgitline)
70 register struct Simptype *pp =
71 (struct Simptype *) malloc(sizeof(struct Simptype));
73 pp -> Xgimptypec = PPgimptypec;
74 pp -> Xgimptypet = PPgimptypet;
75 pp -> Xgimptyped = PPgimptyped;
76 pp -> Xgitline = PPgitline;
83 if(t -> tag != imptype)
84 fprintf(stderr,"gimptypec: illegal selection; was %d\n", t -> tag);
85 return(& t -> Xgimptypec);
91 if(t -> tag != imptype)
92 fprintf(stderr,"gimptypet: illegal selection; was %d\n", t -> tag);
93 return(& t -> Xgimptypet);
99 if(t -> tag != imptype)
100 fprintf(stderr,"gimptyped: illegal selection; was %d\n", t -> tag);
101 return(& t -> Xgimptyped);
107 if(t -> tag != imptype)
108 fprintf(stderr,"gitline: illegal selection; was %d\n", t -> tag);
109 return(& t -> Xgitline);
112 /************** impsyn ******************/
114 impidt mkimpsyn(PPgimpsynti, PPgimpsynts, PPgisline)
119 register struct Simpsyn *pp =
120 (struct Simpsyn *) malloc(sizeof(struct Simpsyn));
122 pp -> Xgimpsynti = PPgimpsynti;
123 pp -> Xgimpsynts = PPgimpsynts;
124 pp -> Xgisline = PPgisline;
131 if(t -> tag != impsyn)
132 fprintf(stderr,"gimpsynti: illegal selection; was %d\n", t -> tag);
133 return(& t -> Xgimpsynti);
139 if(t -> tag != impsyn)
140 fprintf(stderr,"gimpsynts: illegal selection; was %d\n", t -> tag);
141 return(& t -> Xgimpsynts);
147 if(t -> tag != impsyn)
148 fprintf(stderr,"gisline: illegal selection; was %d\n", t -> tag);
149 return(& t -> Xgisline);
152 /************** impeqtype ******************/
154 impidt mkimpeqtype(PPgimpeqtype)
155 binding PPgimpeqtype;
157 register struct Simpeqtype *pp =
158 (struct Simpeqtype *) malloc(sizeof(struct Simpeqtype));
159 pp -> tag = impeqtype;
160 pp -> Xgimpeqtype = PPgimpeqtype;
164 binding *Rgimpeqtype(t)
165 struct Simpeqtype *t;
167 if(t -> tag != impeqtype)
168 fprintf(stderr,"gimpeqtype: illegal selection; was %d\n", t -> tag);
169 return(& t -> Xgimpeqtype);
172 /************** impclass ******************/
174 impidt mkimpclass(PPgimpclassc, PPgimpclasst, PPgimpclassw, PPgicline)
180 register struct Simpclass *pp =
181 (struct Simpclass *) malloc(sizeof(struct Simpclass));
182 pp -> tag = impclass;
183 pp -> Xgimpclassc = PPgimpclassc;
184 pp -> Xgimpclasst = PPgimpclasst;
185 pp -> Xgimpclassw = PPgimpclassw;
186 pp -> Xgicline = PPgicline;
193 if(t -> tag != impclass)
194 fprintf(stderr,"gimpclassc: illegal selection; was %d\n", t -> tag);
195 return(& t -> Xgimpclassc);
198 ttype *Rgimpclasst(t)
201 if(t -> tag != impclass)
202 fprintf(stderr,"gimpclasst: illegal selection; was %d\n", t -> tag);
203 return(& t -> Xgimpclasst);
209 if(t -> tag != impclass)
210 fprintf(stderr,"gimpclassw: illegal selection; was %d\n", t -> tag);
211 return(& t -> Xgimpclassw);
217 if(t -> tag != impclass)
218 fprintf(stderr,"gicline: illegal selection; was %d\n", t -> tag);
219 return(& t -> Xgicline);
222 /************** impinst ******************/
224 impidt mkimpinst(PPgimpinstc, PPgimpinstid, PPgimpinstt, PPgiiline)
230 register struct Simpinst *pp =
231 (struct Simpinst *) malloc(sizeof(struct Simpinst));
233 pp -> Xgimpinstc = PPgimpinstc;
234 pp -> Xgimpinstid = PPgimpinstid;
235 pp -> Xgimpinstt = PPgimpinstt;
236 pp -> Xgiiline = PPgiiline;
243 if(t -> tag != impinst)
244 fprintf(stderr,"gimpinstc: illegal selection; was %d\n", t -> tag);
245 return(& t -> Xgimpinstc);
251 if(t -> tag != impinst)
252 fprintf(stderr,"gimpinstid: illegal selection; was %d\n", t -> tag);
253 return(& t -> Xgimpinstid);
259 if(t -> tag != impinst)
260 fprintf(stderr,"gimpinstt: illegal selection; was %d\n", t -> tag);
261 return(& t -> Xgimpinstt);
267 if(t -> tag != impinst)
268 fprintf(stderr,"giiline: illegal selection; was %d\n", t -> tag);
269 return(& t -> Xgiiline);
272 /************** impmod ******************/
274 impidt mkimpmod(PPgimpmodn, PPgimpmodimp, PPgimpmodren, PPgimline)
280 register struct Simpmod *pp =
281 (struct Simpmod *) malloc(sizeof(struct Simpmod));
283 pp -> Xgimpmodn = PPgimpmodn;
284 pp -> Xgimpmodimp = PPgimpmodimp;
285 pp -> Xgimpmodren = PPgimpmodren;
286 pp -> Xgimline = PPgimline;
293 if(t -> tag != impmod)
294 fprintf(stderr,"gimpmodn: illegal selection; was %d\n", t -> tag);
295 return(& t -> Xgimpmodn);
301 if(t -> tag != impmod)
302 fprintf(stderr,"gimpmodimp: illegal selection; was %d\n", t -> tag);
303 return(& t -> Xgimpmodimp);
309 if(t -> tag != impmod)
310 fprintf(stderr,"gimpmodren: illegal selection; was %d\n", t -> tag);
311 return(& t -> Xgimpmodren);
317 if(t -> tag != impmod)
318 fprintf(stderr,"gimline: illegal selection; was %d\n", t -> tag);
319 return(& t -> Xgimline);