about summary refs log tree commit diff
path: root/src/fix-ng/fix.sdf
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-05T15·34+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-05T15·34+0000
commit80bb477cc4ea5226ae760726730b3e09d21559de (patch)
tree148773dc1fc90edb88cb2128f2db164ae5b06753 /src/fix-ng/fix.sdf
parent0690c1c9c01dd5889dbfccf2da6cb99f5c4e151b (diff)
* Default function arguments.
Diffstat (limited to 'src/fix-ng/fix.sdf')
-rw-r--r--src/fix-ng/fix.sdf8
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
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%