record labels in compiler experiment

This commit is contained in:
aarne
2007-04-20 15:36:33 +00:00
parent 8150faa640
commit 56c4e750a0
3 changed files with 23 additions and 20 deletions

View File

@@ -20,10 +20,12 @@ coercions Type 1 ;
terminator Type "" ;
FTyp. Typing ::= Ident ":" Type ;
FTyp. Typing ::= Label ":" Type ;
separator Typing ";" ;
Lab. Label ::= Ident "#" Integer ;
EVar. Exp2 ::= "$" Ident ;
EOpr. Exp2 ::= "&" Ident ;
ECon. Exp2 ::= Ident ;
@@ -33,7 +35,7 @@ ECst. Exp2 ::= "(" Ident "@" [Exp] ")" ;
ERec. Exp2 ::= "{" [Assign] "}" ;
EApp. Exp1 ::= Exp1 Exp2 ;
ESel. Exp1 ::= Exp1 "!" Exp2 ;
EPro. Exp1 ::= Exp1 "." Exp2 ;
EPro. Exp1 ::= Exp1 "." Label ;
ETab. Exp1 ::= "table" Type "{" [Case] "}" ;
ECat. Exp ::= Exp "++" Exp1 ;
EAbs. Exp ::= "\\" Ident "->" Exp ;
@@ -42,7 +44,7 @@ coercions Exp 2 ;
separator Exp "," ;
FExp. Assign ::= Ident "=" Exp ;
FExp. Assign ::= Label "=" Exp ;
separator Assign ";" ;
@@ -57,7 +59,7 @@ PCon. Patt ::= "(" Ident [Patt] ")" ;
terminator Patt "" ;
FPatt. AssPatt ::= Ident "=" Patt ;
FPatt. AssPatt ::= Label "=" Patt ;
separator AssPatt ";" ;