Research V6 development
[unix-history] / usr / source / rat / r.g
CommitLineData
ec73ebc9
BK
1%term LCURL RCURL LPAR RPAR SCOL DIGITS
2%term XIF XELSE XFOR XWHILE XBREAK NEXT
3%term OLDDO NEWDO
4%term XGOK XDEFINE XINCLUDE
5%term REPEAT UNTIL
6%%
7
8statl : statl stat
9 |
10 ;
11stat : if stat ={ outcont($1); }
12 | ifelse stat ={ outcont($1+1); }
13 | while stat ={ whilestat($1); }
14 | for stat ={ forstat($1); }
15 | repeat stat UNTIL ={ untils($1); }
16 | XBREAK ={ breakcode($1); }
17 | NEXT ={ nextcode($1); }
18 | newdo stat ={ dostat($1); }
19 | OLDDO ={ docode(0,$1); }
20 | XGOK ={ gokcode($1); }
21 | SCOL
22 | LCURL statl RCURL
23 | label stat
24 | error ={ errcode($1); yyclearin; }
25 ;
26label : DIGITS ={ outcode($1); outcode("\t"); }
27 ;
28if : XIF ={ ifcode($1); }
29 ;
30ifelse : if stat XELSE ={ outgoto($1+1); outcont($1); }
31 ;
32while : XWHILE ={ whilecode($1); }
33 ;
34for : XFOR ={ forcode($1); }
35 ;
36repeat : REPEAT ={ repcode($1); }
37 ;
38newdo : NEWDO ={ docode(1,$1); }
39 ;
40%%