101
/****************************************************************
102
Copyright 1990, 1993 by AT&T Bell Laboratories, Bellcore.
104
Permission to use, copy, modify, and distribute this software
105
and its documentation for any purpose and without fee is hereby
106
granted, provided that the above copyright notice appear in all
107
copies and that both that the copyright notice and this
108
permission notice and warranty disclaimer appear in supporting
109
documentation, and that the names of AT&T Bell Laboratories or
110
Bellcore or any of their entities not be used in advertising or
111
publicity pertaining to distribution of the software without
112
specific, written prior permission.
114
AT&T and Bellcore disclaim all warranties with regard to this
115
software, including all implied warranties of merchantability
116
and fitness. In no event shall AT&T or Bellcore be liable for
117
any special, indirect or consequential damages or any damages
118
whatsoever resulting from loss of use, data or profits, whether
119
in an action of contract, negligence or other tortious action,
120
arising out of or in connection with the use or performance of
122
****************************************************************/
128
static int nstars; /* Number of labels in an
129
alternate return CALL */
130
static int datagripe;
134
static ftnint varleng;
135
static struct Dims dims[MAXDIM+1];
136
extern struct Labelblock **labarray; /* Labels in an alternate
138
extern int maxlablist;
140
/* The next two variables are used to verify that each statement might be reached
141
during runtime. lastwasbranch is tested only in the defintion of the
142
stat: nonterminal. */
144
int lastwasbranch = NO;
145
static int thiswasbranch = NO;
146
extern ftnint yystno;
148
static chainp datastack;
149
extern long laststfcn, thisstno;
150
extern int can_include; /* for netlib */
151
extern struct Primblock *primchk Argdcl((expptr));
153
#define ESNULL (Extsym *)0
154
#define NPNULL (Namep)0
155
#define LBNULL (struct Listblock *)0
158
pop_datastack(Void) {
159
chainp d0 = datastack;
161
curdtp = (chainp)d0->datap;
162
datastack = d0->nextp;
169
/* Specify precedences and associativities. */
178
struct Labelblock *labval;
179
struct Nameblock *namval;
180
struct Eqvchain *eqvval;
191
%nonassoc SLT SGT SLE SGE SEQ SNE
198
%type <labval> thislabel label assignlabel
199
%type <tagval> other inelt
200
%type <ival> type typespec typename dcl letter addop relop stop nameeq
201
%type <lval> lengspec
202
%type <charpval> filename
203
%type <chval> datavar datavarlist namelistlist funarglist funargs
204
%type <chval> dospec dospecw
205
%type <chval> callarglist arglist args exprlist inlist outlist out2 substring
206
%type <namval> name arg call var
207
%type <expval> lhs expr uexpr opt_expr fexpr unpar_fexpr
208
%type <expval> ubound simple value callarg complex_const simple_const bit_const
209
%type <extval> common comblock entryname progname
210
%type <eqvval> equivlist
218
stat: thislabel entry
220
/* stat: is the nonterminal for Fortran statements */
222
lastwasbranch = NO; }
225
{ /* forbid further statement function definitions... */
226
if (parstate == INDATA && laststfcn != thisstno)
229
if($1 && ($1->labelno==dorange))
231
if(lastwasbranch && thislabel==NULL)
232
warn("statement cannot be reached");
233
lastwasbranch = thiswasbranch;
237
if($1->labtype == LABFORMAT)
238
err("label already that of a format");
240
$1->labtype = LABEXEC;
244
| thislabel SINCLUDE filename
248
fprintf(diagfile, "Cannot open file %s\n", $3);
252
| thislabel SEND end_spec
255
endproc(); /* lastwasbranch = NO; -- set in endproc() */
260
/* flline flushes the current line, ignoring the rest of the text there */
264
{ flline(); needkwd = NO; inioctl = NO;
265
yyerrok; yyclearin; }
272
$$ = thislabel = mklabel(yystno);
274
if (procclass == CLUNKNOWN)
276
puthead(CNULL, procclass);
278
if(thislabel->labdefined)
279
execerr("label %s already defined",
280
convic(thislabel->stateno) );
282
if(thislabel->blklevel!=0 && thislabel->blklevel<blklevel
283
&& thislabel->labtype!=LABFORMAT)
284
warn1("there is a branch to label %s from outside block",
285
convic( (ftnint) (thislabel->stateno) ) );
286
thislabel->blklevel = blklevel;
287
thislabel->labdefined = YES;
288
if(thislabel->labtype != LABFORMAT)
289
p1_label((long)(thislabel - labeltab));
292
else $$ = thislabel = NULL;
296
entry: SPROGRAM new_proc progname
297
{startproc($3, CLMAIN); }
298
| SPROGRAM new_proc progname progarglist
299
{ warn("ignoring arguments to main program");
301
startproc($3, CLMAIN); }
302
| SBLOCK new_proc progname
303
{ if($3) NO66("named BLOCKDATA");
304
startproc($3, CLBLOCK); }
305
| SSUBROUTINE new_proc entryname arglist
306
{ entrypt(CLPROC, TYSUBR, (ftnint) 0, $3, $4); }
307
| SFUNCTION new_proc entryname arglist
308
{ entrypt(CLPROC, TYUNKNOWN, (ftnint) 0, $3, $4); }
309
| type SFUNCTION new_proc entryname arglist
310
{ entrypt(CLPROC, $1, varleng, $4, $5); }
311
| SENTRY entryname arglist
312
{ if(parstate==OUTSIDE || procclass==CLMAIN
313
|| procclass==CLBLOCK)
314
execerr("misplaced entry statement", CNULL);
315
entrypt(CLENTRY, 0, (ftnint) 0, $2, $3);
324
{ $$ = newentry($1, 1); }
328
{ $$ = mkname(token); }
331
progname: { $$ = NULL; }
337
| SLPAR progargs SRPAR
341
| progargs SCOMMA progarg
345
| SNAME SEQUALS SNAME
351
{ NO66(" () argument list");
358
{ $$ = ($1 ? mkchain((char *)$1,CHNULL) : CHNULL ); }
360
{ if($3) $1 = $$ = mkchain((char *)$3, $1); }
364
{ if($1->vstg!=STGUNKNOWN && $1->vstg!=STGARG)
365
dclerr("name declared as argument after use", $1);
369
{ NO66("altenate return argument");
371
/* substars means that '*'ed formal parameters should be replaced.
372
This is used to specify alternate return labels; in theory, only
373
parameter slots which have '*' should accept the statement labels.
374
This compiler chooses to ignore the '*'s in the formal declaration, and
375
always return the proper value anyway.
377
This variable is only referred to in proc.c */
379
$$ = 0; substars = YES; }
387
s = copyn(toklen+1, token);
401
{ NO66("SAVE statement");
404
{ NO66("SAVE statement"); }
406
{ fmtstmt(thislabel); setfmt(thislabel); }
407
| SPARAM in_dcl SLPAR paramlist SRPAR
408
{ NO66("PARAMETER statement"); }
411
dcl: type opt_comma name in_dcl new_dcl dims lengspec
412
{ settype($3, $1, $7);
413
if(ndim>0) setbound($3,ndim,dims);
415
| dcl SCOMMA name dims lengspec
416
{ settype($3, $1, $5);
417
if(ndim>0) setbound($3,ndim,dims);
419
| dcl SSLASHD datainit vallist SSLASHD
420
{ if (new_dcl == 2) {
421
err("attempt to give DATA in type-declaration");
427
new_dcl: { new_dcl = 2; } ;
429
type: typespec lengspec
434
{ varleng = ($1<0 || ONEOF($1,M(TYLOGICAL)|M(TYLONG))
439
typename: SINTEGER { $$ = TYLONG; }
440
| SREAL { $$ = tyreal; }
441
| SCOMPLEX { ++complex_seen; $$ = tycomplex; }
442
| SDOUBLE { $$ = TYDREAL; }
443
| SDCOMPLEX { ++dcomplex_seen; NOEXT("DOUBLE COMPLEX statement"); $$ = TYDCOMPLEX; }
444
| SLOGICAL { $$ = TYLOGICAL; }
445
| SCHARACTER { NO66("CHARACTER statement"); $$ = TYCHAR; }
446
| SUNDEFINED { $$ = TYUNKNOWN; }
447
| SDIMENSION { $$ = TYUNKNOWN; }
448
| SAUTOMATIC { NOEXT("AUTOMATIC statement"); $$ = - STGAUTO; }
449
| SSTATIC { NOEXT("STATIC statement"); $$ = - STGBSS; }
450
| SBYTE { $$ = TYINT1; }
455
| SSTAR intonlyon expr intonlyoff
459
NO66("length specification *n");
460
if( ! ISICON(p) || p->constblock.Const.ci <= 0 )
463
dclerr("length must be a positive integer constant",
467
if (vartype == TYCHAR)
468
$$ = p->constblock.Const.ci;
469
else switch((int)p->constblock.Const.ci) {
470
case 1: $$ = 1; break;
471
case 2: $$ = typesize[TYSHORT]; break;
472
case 4: $$ = typesize[TYLONG]; break;
473
case 8: $$ = typesize[TYDREAL]; break;
474
case 16: $$ = typesize[TYDCOMPLEX]; break;
476
dclerr("invalid length",NPNULL);
481
| SSTAR intonlyon SLPAR SSTAR SRPAR intonlyoff
482
{ NO66("length specification *(*)"); $$ = -1; }
485
common: SCOMMON in_dcl var
486
{ incomm( $$ = comblock("") , $3 ); }
487
| SCOMMON in_dcl comblock var
488
{ $$ = $3; incomm($3, $4); }
489
| common opt_comma comblock opt_comma var
490
{ $$ = $3; incomm($3, $5); }
496
{ $$ = comblock(""); }
497
| SSLASH SNAME SSLASH
498
{ $$ = comblock(token); }
501
external: SEXTERNAL in_dcl name
503
| external SCOMMA name
507
intrinsic: SINTRINSIC in_dcl name
508
{ NO66("INTRINSIC statement"); setintr($3); }
509
| intrinsic SCOMMA name
513
equivalence: SEQUIV in_dcl equivset
514
| equivalence SCOMMA equivset
517
equivset: SLPAR equivlist SRPAR
519
struct Equivblock *p;
520
if(nequiv >= maxequiv)
521
many("equivalences", 'q', maxequiv);
522
p = & eqvclass[nequiv++];
531
{ $$=ALLOC(Eqvchain);
532
$$->eqvitem.eqvlhs = primchk($1);
534
| equivlist SCOMMA lhs
535
{ $$=ALLOC(Eqvchain);
536
$$->eqvitem.eqvlhs = primchk($3);
541
data: SDATA in_data datalist
542
| data opt_comma datalist
546
{ if(parstate == OUTSIDE)
549
startproc(ESNULL, CLMAIN);
551
if(parstate < INDATA)
560
datalist: datainit datavarlist SSLASH datapop vallist SSLASH
562
if(nextdata(&junk) != NULL)
563
err("too few initializers");
569
datainit: /* nothing */ { frchain(&datastack); curdtp = 0; } ;
571
datapop: /* nothing */ { pop_datastack(); } ;
573
vallist: { toomanyinit = NO; } val
578
{ dataval(ENULL, $1); }
585
{ if( $1==OPMINUS && ISCONST($2) )
586
consnegop((Constp)$2);
593
| savelist SCOMMA saveitem
600
if( ! ONEOF(k, M(STGUNKNOWN)|M(STGBSS)|M(STGINIT)) )
601
dclerr("can only save static variables", $1);
607
| paramlist SCOMMA paramitem
610
paramitem: name SEQUALS expr
611
{ if($1->vclass == CLUNKNOWN)
612
make_param((struct Paramblock *)$1, $3);
613
else dclerr("cannot make into parameter", $1);
618
{ if(ndim>0) setbound($1, ndim, dims); }
623
struct Primblock *pp = (struct Primblock *)$1;
627
err("parameter in data statement");
629
erri("tag %d in data statement",tt);
636
if ((pp->fcharp || pp->lcharp)
637
&& (np->vtype != TYCHAR || np->vdim))
639
if(np->vstg == STGCOMMON)
640
extsymtab[np->vardesc.varno].extinit = YES;
641
else if(np->vstg==STGEQUIV)
642
eqvclass[np->vardesc.varno].eqvinit = YES;
643
else if(np->vstg!=STGINIT && np->vstg!=STGBSS) {
644
errstr(np->vstg == STGARG
645
? "Dummy argument \"%.60s\" in data statement."
646
: "Cannot give data to \"%.75s\"",
652
$$ = mkchain((char *)$1, CHNULL);
654
| SLPAR datavarlist SCOMMA dospec SRPAR
655
{ chainp p; struct Impldoblock *q;
657
q = ALLOC(Impldoblock);
659
(q->varnp = (Namep) ($4->datap))->vimpldovar = 1;
661
if(p) { q->implb = (expptr)(p->datap); p = p->nextp; }
662
if(p) { q->impub = (expptr)(p->datap); p = p->nextp; }
663
if(p) { q->impstep = (expptr)(p->datap); }
665
$$ = mkchain((char *)q, CHNULL);
666
q->datalist = hookup($2, $$);
673
datastack = mkchain((char *)curdtp, datastack);
674
curdtp = $1; curdtelt = 0;
676
| datavarlist SCOMMA datavar
677
{ $$ = hookup($1, $3); }
682
| SLPAR dimlist SRPAR
685
dimlist: { ndim = 0; } dim
692
err("too many dimensions");
693
else if(ndim < maxdim)
702
err("too many dimensions");
703
else if(ndim < maxdim)
704
{ dims[ndim].lb = $1;
717
{ nstars = 1; labarray[0] = $1; }
718
| labellist SCOMMA label
719
{ if(nstars < maxlablist) labarray[nstars++] = $3; }
723
{ $$ = execlab( convci(toklen, token) ); }
726
implicit: SIMPLICIT in_dcl implist
727
{ NO66("IMPLICIT statement"); }
728
| implicit SCOMMA implist
731
implist: imptype SLPAR letgroups SRPAR
733
{ if (vartype != TYUNKNOWN)
734
dclerr("-- expected letter range",NPNULL);
735
setimpl(vartype, varleng, 'a', 'z'); }
738
imptype: { needkwd = 1; } type
739
/* { vartype = $2; } */
743
| letgroups SCOMMA letgroup
747
{ setimpl(vartype, varleng, $1, $1); }
748
| letter SMINUS letter
749
{ setimpl(vartype, varleng, $1, $3); }
753
{ if(toklen!=1 || token[0]<'a' || token[0]>'z')
755
dclerr("implicit item must be single letter", NPNULL);
763
| namelist namelistentry
766
namelistentry: SSLASH name SSLASH namelistlist
768
if($2->vclass == CLUNKNOWN)
770
$2->vclass = CLNAMELIST;
773
$2->varxptr.namelist = $4;
774
$2->vardesc.varno = ++lastvarno;
776
else dclerr("cannot be a namelist name", $2);
781
{ $$ = mkchain((char *)$1, CHNULL); }
782
| namelistlist SCOMMA name
783
{ $$ = hookup($1, mkchain((char *)$3, CHNULL)); }
789
case OUTSIDE: newproc();
790
startproc(ESNULL, CLMAIN);
791
case INSIDE: parstate = INDCL;
797
"Statement order error: declaration after DATA",
804
dclerr("declaration among executables", NPNULL);
811
{ $$ = revchain($1); }
815
{ $$ = mkchain((char *)$1, CHNULL); }
816
| funargs SCOMMA expr
817
{ $$ = mkchain((char *)$3, $1); }
822
| SLPAR expr SRPAR { $$ = $2; if ($$->tag == TPRIM)
823
$$->primblock.parenused = 1; }
829
| expr addop expr %prec SPLUS
830
{ $$ = mkexpr($2, $1, $3); }
832
{ $$ = mkexpr(OPSTAR, $1, $3); }
834
{ $$ = mkexpr(OPSLASH, $1, $3); }
836
{ $$ = mkexpr(OPPOWER, $1, $3); }
837
| addop expr %prec SSTAR
839
$$ = mkexpr(OPNEG, $2, ENULL);
842
| expr relop expr %prec SEQ
843
{ $$ = mkexpr($2, $1, $3); }
845
{ NO66(".EQV. operator");
846
$$ = mkexpr(OPEQV, $1,$3); }
848
{ NO66(".NEQV. operator");
849
$$ = mkexpr(OPNEQV, $1, $3); }
851
{ $$ = mkexpr(OPOR, $1, $3); }
853
{ $$ = mkexpr(OPAND, $1, $3); }
855
{ $$ = mkexpr(OPNOT, $2, ENULL); }
857
{ NO66("concatenation operator //");
858
$$ = mkexpr(OPCONCAT, $1, $3); }
861
addop: SPLUS { $$ = OPPLUS; }
862
| SMINUS { $$ = OPMINUS; }
865
relop: SEQ { $$ = OPEQ; }
874
{ $$ = mkprim($1, LBNULL, CHNULL); }
876
{ NO66("substring operator :");
877
$$ = mkprim($1, LBNULL, $2); }
878
| name SLPAR funarglist SRPAR
879
{ $$ = mkprim($1, mklist($3), CHNULL); }
880
| name SLPAR funarglist SRPAR substring
881
{ NO66("substring operator :");
882
$$ = mkprim($1, mklist($3), $5); }
885
substring: SLPAR opt_expr SCOLON opt_expr SRPAR
886
{ $$ = mkchain((char *)$2, mkchain((char *)$4,CHNULL)); }
895
{ if($1->vclass == CLPARAM)
896
$$ = (expptr) cpexpr(
897
( (struct Paramblock *) ($1) ) -> paramval);
902
simple_const: STRUE { $$ = mklogcon(1); }
903
| SFALSE { $$ = mklogcon(0); }
904
| SHOLLERITH { $$ = mkstrcon(toklen, token); }
905
| SICON = { $$ = mkintcon( convci(toklen, token) ); }
906
| SRCON = { $$ = mkrealcon(tyreal, token); }
907
| SDCON = { $$ = mkrealcon(TYDREAL, token); }
911
complex_const: SLPAR uexpr SCOMMA uexpr SRPAR
912
{ $$ = mkcxcon($2,$4); }
916
{ NOEXT("hex constant");
917
$$ = mkbitcon(4, toklen, token); }
919
{ NOEXT("octal constant");
920
$$ = mkbitcon(3, toklen, token); }
922
{ NOEXT("binary constant");
923
$$ = mkbitcon(1, toklen, token); }
933
| fexpr addop fexpr %prec SPLUS
934
{ $$ = mkexpr($2, $1, $3); }
936
{ $$ = mkexpr(OPSTAR, $1, $3); }
938
{ $$ = mkexpr(OPSLASH, $1, $3); }
940
{ $$ = mkexpr(OPPOWER, $1, $3); }
941
| addop fexpr %prec SSTAR
943
$$ = mkexpr(OPNEG, $2, ENULL);
946
| fexpr SCONCAT fexpr
947
{ NO66("concatenation operator //");
948
$$ = mkexpr(OPCONCAT, $1, $3); }
951
| SDO end_spec intonlyon label intonlyoff opt_comma dospecw
954
execerr("no backward DO loops", CNULL);
955
$4->blklevel = blklevel+1;
956
exdo($4->labelno, NPNULL, $7);
958
| SDO end_spec opt_comma dospecw
960
exdo((int)(ctls - ctlstack - 2), NPNULL, $4);
961
NOEXT("DO without label");
966
{ exendif(); thiswasbranch = NO; }
968
| SELSEIF end_spec SLPAR expr SRPAR STHEN
969
{ exelif($4); lastwasbranch = NO; }
971
{ exelse(); lastwasbranch = NO; }
973
{ exendif(); lastwasbranch = NO; }
976
logif: SLOGIF end_spec SLPAR expr SRPAR
980
dospec: name SEQUALS exprlist
981
{ $$ = mkchain((char *)$1, $3); }
985
| SWHILE SLPAR expr SRPAR
986
{ $$ = mkchain(CNULL, (chainp)$3); }
989
iffable: let lhs SEQUALS expr
990
{ exequals((struct Primblock *)$2, $4); }
991
| SASSIGN end_spec assignlabel STO name
992
{ exassign($5, $3); }
997
| SARITHIF end_spec SLPAR expr SRPAR label SCOMMA label SCOMMA label
998
{ exarif($4, $6, $8, $10); thiswasbranch = YES; }
1000
{ excall($1, LBNULL, 0, labarray); }
1002
{ excall($1, LBNULL, 0, labarray); }
1003
| call SLPAR callarglist SRPAR
1004
{ if(nstars < maxlablist)
1005
excall($1, mklist(revchain($3)), nstars, labarray);
1007
many("alternate returns", 'l', maxlablist);
1009
| SRETURN end_spec opt_expr
1010
{ exreturn($3); thiswasbranch = YES; }
1011
| stop end_spec opt_expr
1012
{ exstop($1, $3); thiswasbranch = $1; }
1016
{ $$ = mklabel( convci(toklen, token) ); }
1020
{ if(parstate == OUTSIDE)
1023
startproc(ESNULL, CLMAIN);
1028
goto: SGOTO end_spec label
1029
{ exgoto($3); thiswasbranch = YES; }
1030
| SASGOTO end_spec name
1031
{ exasgoto($3); thiswasbranch = YES; }
1032
| SASGOTO end_spec name opt_comma SLPAR labellist SRPAR
1033
{ exasgoto($3); thiswasbranch = YES; }
1034
| SCOMPGOTO end_spec SLPAR labellist SRPAR opt_comma expr
1035
{ if(nstars < maxlablist)
1036
putcmgo(putx(fixtype($7)), nstars, labarray);
1038
many("labels in computed GOTO list", 'l', maxlablist);
1046
call: SCALL end_spec name
1047
{ nstars = 0; $$ = $3; }
1050
callarglist: callarg
1051
{ $$ = $1 ? mkchain((char *)$1,CHNULL) : CHNULL; }
1052
| callarglist SCOMMA callarg
1053
{ $$ = $3 ? mkchain((char *)$3, $1) : $1; }
1058
{ if(nstars < maxlablist) labarray[nstars++] = $2; $$ = 0; }
1068
{ $$ = mkchain((char *)$1, CHNULL); }
1069
| exprlist SCOMMA expr
1070
{ $$ = hookup($1, mkchain((char *)$3,CHNULL) ); }
1074
{ if(parstate == OUTSIDE)
1077
startproc(ESNULL, CLMAIN);
1080
/* This next statement depends on the ordering of the state table encoding */
1082
if(parstate < INDATA) enddcl();
1093
/* Input/Output Statements */
1100
| iofmove unpar_fexpr
1101
{ ioclause(IOSUNIT, $2); endioctl(); }
1103
{ ioclause(IOSUNIT, ENULL); endioctl(); }
1105
{ ioclause(IOSUNIT, IOSTDERR); endioctl(); }
1112
{ doio(revchain($3)); }
1113
| read infmt SCOMMA inlist
1114
{ doio(revchain($4)); }
1115
| read ioctl SCOMMA inlist
1116
{ doio(revchain($4)); }
1119
| write ioctl outlist
1120
{ doio(revchain($3)); }
1123
| print SCOMMA outlist
1124
{ doio(revchain($3)); }
1127
iofmove: fmkwd end_spec in_ioctl
1131
{ iostmt = IOBACKSPACE; }
1133
{ iostmt = IOREWIND; }
1135
{ iostmt = IOENDFILE; }
1138
iofctl: ctlkwd end_spec in_ioctl
1142
{ iostmt = IOINQUIRE; }
1144
{ iostmt = IOOPEN; }
1146
{ iostmt = IOCLOSE; }
1151
ioclause(IOSUNIT, ENULL);
1152
ioclause(IOSFMT, $1);
1157
ioclause(IOSUNIT, ENULL);
1158
ioclause(IOSFMT, ENULL);
1163
ioctl: SLPAR fexpr SRPAR
1165
ioclause(IOSUNIT, $2);
1168
| SLPAR ctllist SRPAR
1173
| ctllist SCOMMA ioclause
1177
{ ioclause(IOSPOSITIONAL, $1); }
1179
{ ioclause(IOSPOSITIONAL, ENULL); }
1181
{ ioclause(IOSPOSITIONAL, IOSTDERR); }
1183
{ ioclause($1, $2); }
1185
{ ioclause($1, ENULL); }
1187
{ ioclause($1, IOSTDERR); }
1194
read: SREAD end_spec in_ioctl
1195
{ iostmt = IOREAD; }
1198
write: SWRITE end_spec in_ioctl
1199
{ iostmt = IOWRITE; }
1202
print: SPRINT end_spec fexpr in_ioctl
1205
ioclause(IOSUNIT, ENULL);
1206
ioclause(IOSFMT, $3);
1209
| SPRINT end_spec SSTAR in_ioctl
1212
ioclause(IOSUNIT, ENULL);
1213
ioclause(IOSFMT, ENULL);
1219
{ $$ = mkchain((char *)$1, CHNULL); }
1220
| inlist SCOMMA inelt
1221
{ $$ = mkchain((char *)$3, $1); }
1225
{ $$ = (tagptr) $1; }
1226
| SLPAR inlist SCOMMA dospec SRPAR
1227
{ $$ = (tagptr) mkiodo($4,revchain($2)); }
1231
{ $$ = mkchain((char *)$1, CHNULL); }
1233
{ $$ = mkchain((char *)$1, CHNULL); }
1237
out2: uexpr SCOMMA uexpr
1238
{ $$ = mkchain((char *)$3, mkchain((char *)$1, CHNULL) ); }
1239
| uexpr SCOMMA other
1240
{ $$ = mkchain((char *)$3, mkchain((char *)$1, CHNULL) ); }
1241
| other SCOMMA uexpr
1242
{ $$ = mkchain((char *)$3, mkchain((char *)$1, CHNULL) ); }
1243
| other SCOMMA other
1244
{ $$ = mkchain((char *)$3, mkchain((char *)$1, CHNULL) ); }
1246
{ $$ = mkchain((char *)$3, $1); }
1248
{ $$ = mkchain((char *)$3, $1); }
1251
other: complex_const
1252
{ $$ = (tagptr) $1; }
1254
{ $$ = (tagptr) $2; }
1255
| SLPAR uexpr SCOMMA dospec SRPAR
1256
{ $$ = (tagptr) mkiodo($4, mkchain((char *)$2, CHNULL) ); }
1257
| SLPAR other SCOMMA dospec SRPAR
1258
{ $$ = (tagptr) mkiodo($4, mkchain((char *)$2, CHNULL) ); }
1259
| SLPAR out2 SCOMMA dospec SRPAR
1260
{ $$ = (tagptr) mkiodo($4, revchain($2)); }