-- grammar extracted from SMTreeBuildImpl.mesa by PGS, 11-Aug-83 14:19 ||CHAIN ||LISTS ||TABLE1 1 name 2 string 3 , 4 : 5 ; 6 ] 7 filename 8 [ 9 . 10 ~ 11 = 12 > 13 + 14 - 15 * 16 / 17 \ 18 ^ 19 ( 20 ) 21 LAMBDA 22 LET 23 REC 24 IN 25 TYPE 26 STRING 27 ENV 28 NIL 29 CONTROL 30 THEN 31 CROSS 32 endfile 33 eof ||TABLE2 34 goal 35 source 36 exp 37 term 38 factor 39 appl 40 bracket 41 primary 42 group 43 decl 44 binding 45 expList 46 expListC 47 expListS 48 declElem 49 declC 50 declS 51 bindElem 52 bindingC 53 bindingS ||TABLE3 name tokenID string tokenSTR filename tokenFILENAME . initialSymbol endfile tokenEOF ||TABLE4 1 0 goal ::= . source 2 1 source ::= exp endfile 3 2 exp ::= LAMBDA term = > exp IN exp 4 3 | LAMBDA term IN exp 5 4 | LET term IN exp 6 5 | term - > exp 7 6 | term 8 7 term ::= term + factor 9 8 | term THEN factor 10 9 | term - factor 11 10 | term ^ factor 12 11 | term \ factor 13 12 | term / factor 14 13 | factor 15 25 | CONTROL 16 14 factor ::= appl CROSS factor 17 15 | appl CROSS CROSS factor 18 16 | appl 19 17 appl ::= appl bracket 20 18 | appl * bracket 21 19 | primary 22 20 primary ::= name 23 21 | string 24 22 | TYPE 25 23 | TYPE name 26 24 | STRING 27 26 | ENV 28 27 | NIL 29 28 | filename 30 29 | bracket 31 30 | primary . name 32 31 bracket ::= group 33 32 | [ decl ] 34 33 | [ binding ] 35 34 | REC [ binding ] 36 35 | ( exp ) 37 36 group ::= [ expList ] 38 37 | [ ] 39 38 expList ::= exp 40 39 | expListC exp 41 39 | expListS exp 42 38 expListC ::= exp , 43 39 | expListC exp , 44 38 expListS ::= exp ; 45 39 | expListS exp ; 46 40 decl ::= declElem 47 41 | declC declElem 48 41 | declS declElem 49 40 declC ::= declElem , 50 41 | declC declElem , 51 40 declS ::= declElem ; 52 41 | declS declElem ; 53 42 declElem ::= name : exp 54 43 binding ::= bindElem 55 44 | bindingC bindElem 56 44 | bindingS bindElem 57 43 bindingC ::= bindElem , 58 44 | bindingC bindElem , 59 43 bindingS ::= bindElem ; 60 44 | bindingS bindElem ; 61 45 bindElem ::= [ decl ] ~ exp 62 46 | declElem ~ exp 63 47 | name ~ exp 64 48 | group ~ exp