diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-05T15·34+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-05T15·34+0000 |
commit | 80bb477cc4ea5226ae760726730b3e09d21559de (patch) | |
tree | 148773dc1fc90edb88cb2128f2db164ae5b06753 /src/fix-ng/fix.sdf | |
parent | 0690c1c9c01dd5889dbfccf2da6cb99f5c4e151b (diff) |
* Default function arguments.
Diffstat (limited to 'src/fix-ng/fix.sdf')
-rw-r--r-- | src/fix-ng/fix.sdf | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fix-ng/fix.sdf b/src/fix-ng/fix.sdf index 8e9f0fa72163..9dc04d937391 100644 --- a/src/fix-ng/fix.sdf +++ b/src/fix-ng/fix.sdf @@ -17,7 +17,7 @@ imports Fix-Exprs Fix-Layout module Fix-Exprs imports Fix-Lexicals URI exports - sorts Expr Bind + sorts Expr Bind Formal context-free syntax Id -> Expr {cons("Var")} @@ -34,7 +34,9 @@ exports Expr Expr -> Expr {cons("Call"), left} - "{" {Id ","}* "}" ":" Expr -> Expr {cons("Function"), right} + "{" {Formal ","}* "}" ":" Expr -> Expr {cons("Function"), right} + Id -> Formal {cons("NoDefFormal")} + Id "?" Expr -> Formal {cons("DefFormal")} "rec" "{" Binds "}" -> Expr {cons("Rec")} "let" "{" Binds "}" -> Expr {cons("LetRec")} @@ -62,7 +64,7 @@ exports Expr "." Id -> Expr > Expr ExprList -> ExprList > Expr Expr -> Expr - > "{" {Id ","}* "}" ":" Expr -> Expr + > "{" {Formal ","}* "}" ":" Expr -> Expr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |