1: exec:     iffable
   2:     | SDO end_spec intonlyon label intonlyoff dospec
   3:         {
   4:         if($4->labdefined)
   5:             error("no backward DO loops",0,0,EXECERR);
   6:         $4->blklevel = blklevel+1;
   7:         exdo($4->labelno, $6);
   8:         }
   9:     | logif iffable
  10:         { exendif();  thiswasbranch = NO; }
  11:     | logif STHEN
  12:     | SELSEIF end_spec SLPAR expr SRPAR STHEN
  13:         { exelif($4); }
  14:     | SELSE end_spec
  15:         { exelse(); }
  16:     | SENDIF end_spec
  17:         { exendif(); }
  18:     ;
  19: 
  20: logif:    SLOGIF end_spec SLPAR expr SRPAR
  21:         { exif($4); }
  22:     ;
  23: 
  24: dospec:   name SEQUALS exprlist
  25:         { $$ = mkchain($1, $3); }
  26:     ;
  27: 
  28: iffable:  let lhs SEQUALS expr
  29:         { exequals($2, $4); }
  30:     | SASSIGN end_spec labelval STO name
  31:         { exassign($5, $3); }
  32:     | SCONTINUE end_spec
  33:     | goto
  34:     | io
  35:         { inioctl = NO; }
  36:     | SARITHIF end_spec SLPAR expr SRPAR label SCOMMA label SCOMMA label
  37:         { exarif($4, $6, $8, $10);  thiswasbranch = YES; }
  38:     | call
  39:         { excall($1, 0, 0, labarray); }
  40:     | call SLPAR SRPAR
  41:         { excall($1, 0, 0, labarray); }
  42:     | call SLPAR callarglist SRPAR
  43:         { if(nstars < MAXLABLIST)
  44:             excall($1, mklist($3), nstars, labarray);
  45:           else
  46:             error("too many alternate returns",0,0,ERR);
  47:         }
  48:     | SRETURN end_spec opt_expr
  49:         { exreturn($3);  thiswasbranch = YES; }
  50:     | stop end_spec opt_expr
  51:         { exstop($1, $3);  thiswasbranch = $1; }
  52:     ;
  53: 
  54: let:      SLET
  55:         { if(parstate == OUTSIDE)
  56:             {
  57:             newproc();
  58:             startproc(0, CLMAIN);
  59:             }
  60:         }
  61:     ;
  62: 
  63: goto:     SGOTO end_spec label
  64:         { exgoto($3);  thiswasbranch = YES; }
  65:     | SASGOTO end_spec name
  66:         { exasgoto($3);  thiswasbranch = YES; }
  67:     | SASGOTO end_spec name opt_comma SLPAR labellist SRPAR
  68:         { exasgoto($3);  thiswasbranch = YES; }
  69:     | SCOMPGOTO end_spec SLPAR labellist SRPAR opt_comma expr
  70:         { if(nstars < MAXLABLIST)
  71:             putcmgo(fixtype($7), nstars, labarray);
  72:           else
  73:             error("computed GOTO list too long",0,0,ERR);
  74:         }
  75:     ;
  76: 
  77: opt_comma:
  78:     | SCOMMA
  79:     ;
  80: 
  81: call:     SCALL end_spec name
  82:         { nstars = 0; $$ = $3; }
  83:     ;
  84: 
  85: callarglist:  callarg
  86:         { $$ = ($1 ? mkchain($1,0) : 0); }
  87:     | callarglist SCOMMA callarg
  88:         { if($3)
  89:             if($1) $$ = hookup($1, mkchain($3,0));
  90:             else $$ = mkchain($3,0);
  91:         }
  92:     ;
  93: 
  94: callarg:  expr
  95:     | SSTAR label
  96:         { if(nstars<MAXLABLIST) labarray[nstars++] = $2; $$ = 0; }
  97:     ;
  98: 
  99: stop:     SPAUSE
 100:         { $$ = 0; }
 101:     | SSTOP
 102:         { $$ = 1; }
 103:     ;
 104: 
 105: exprlist:  expr
 106:         { $$ = mkchain($1, 0); }
 107:     | exprlist SCOMMA expr
 108:         { $$ = hookup($1, mkchain($3,0) ); }
 109:     ;
 110: 
 111: end_spec:
 112:         { if(parstate == OUTSIDE)
 113:             {
 114:             newproc();
 115:             startproc(0, CLMAIN);
 116:             }
 117:           if(parstate < INDATA) enddcl();
 118:         }
 119:     ;
 120: 
 121: intonlyon:
 122:         { intonly = YES; }
 123:     ;
 124: 
 125: intonlyoff:
 126:         { intonly = NO; }
 127:     ;
Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1992
Valid CSS Valid XHTML 1.0 Strict