2 | SDO end_spec intonlyon label intonlyoff opt_comma dospecw
5 execerr("no backward DO loops", CNULL);
6 $4->blklevel = blklevel+1;
7 exdo($4->labelno, NPNULL, $7);
9 | SDO end_spec opt_comma dospecw
11 exdo((int)(ctls - ctlstack - 2), NPNULL, $4);
12 NOEXT("DO without label");
17 { exendif(); thiswasbranch = NO; }
19 | SELSEIF end_spec SLPAR expr SRPAR STHEN
20 { exelif($4); lastwasbranch = NO; }
22 { exelse(); lastwasbranch = NO; }
24 { exendif(); lastwasbranch = NO; }
27 logif: SLOGIF end_spec SLPAR expr SRPAR
31 dospec: name SEQUALS exprlist
32 { $$ = mkchain((char *)$1, $3); }
36 | SWHILE SLPAR expr SRPAR
37 { $$ = mkchain(CNULL, (chainp)$3); }
40 iffable: let lhs SEQUALS expr
41 { exequals((struct Primblock *)$2, $4); }
42 | SASSIGN end_spec assignlabel STO name
48 | SARITHIF end_spec SLPAR expr SRPAR label SCOMMA label SCOMMA label
49 { exarif($4, $6, $8, $10); thiswasbranch = YES; }
51 { excall($1, LBNULL, 0, labarray); }
53 { excall($1, LBNULL, 0, labarray); }
54 | call SLPAR callarglist SRPAR
55 { if(nstars < MAXLABLIST)
56 excall($1, mklist(revchain($3)), nstars, labarray);
58 err("too many alternate returns");
60 | SRETURN end_spec opt_expr
61 { exreturn($3); thiswasbranch = YES; }
62 | stop end_spec opt_expr
63 { exstop($1, $3); thiswasbranch = $1; }
67 { $$ = mklabel( convci(toklen, token) ); }
71 { if(parstate == OUTSIDE)
74 startproc(ESNULL, CLMAIN);
79 goto: SGOTO end_spec label
80 { exgoto($3); thiswasbranch = YES; }
81 | SASGOTO end_spec name
82 { exasgoto($3); thiswasbranch = YES; }
83 | SASGOTO end_spec name opt_comma SLPAR labellist SRPAR
84 { exasgoto($3); thiswasbranch = YES; }
85 | SCOMPGOTO end_spec SLPAR labellist SRPAR opt_comma expr
86 { if(nstars < MAXLABLIST)
87 putcmgo(putx(fixtype($7)), nstars, labarray);
89 err("computed GOTO list too long");
97 call: SCALL end_spec name
98 { nstars = 0; $$ = $3; }
102 { $$ = $1 ? mkchain((char *)$1,CHNULL) : CHNULL; }
103 | callarglist SCOMMA callarg
104 { $$ = $3 ? mkchain((char *)$3, $1) : $1; }
109 { if(nstars<MAXLABLIST) labarray[nstars++] = $2; $$ = 0; }
119 { $$ = mkchain((char *)$1, CHNULL); }
120 | exprlist SCOMMA expr
121 { $$ = hookup($1, mkchain((char *)$3,CHNULL) ); }
125 { if(parstate == OUTSIDE)
128 startproc(ESNULL, CLMAIN);
131 /* This next statement depends on the ordering of the state table encoding */
133 if(parstate < INDATA) enddcl();