From 9a2dea46d103d180c3b0e0780df4f10a8a16f386 Mon Sep 17 00:00:00 2001 From: bringert Date: Tue, 29 Nov 2005 18:16:33 +0000 Subject: Use rec and sig for records. --- src/Transfer/Syntax/Syntax.cf | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/Transfer/Syntax/Syntax.cf') diff --git a/src/Transfer/Syntax/Syntax.cf b/src/Transfer/Syntax/Syntax.cf index 1c4ecb559..1d7083eb3 100644 --- a/src/Transfer/Syntax/Syntax.cf +++ b/src/Transfer/Syntax/Syntax.cf @@ -1,6 +1,6 @@ entrypoints Module, Exp ; -layout "let", "where", "of" ; +layout "let", "where", "of","rec", "sig" ; layout stop "in" ; layout toplevel ; @@ -28,7 +28,7 @@ _. Pattern ::= Pattern1 ; -- Constructor pattern with parantheses PCons. Pattern1 ::= "(" Ident [Pattern] ")" ; -- Record patterns -PRec. Pattern1 ::= "{" [FieldPattern] "}"; +PRec. Pattern1 ::= "rec" "{" [FieldPattern] "}"; -- The pattern matching the Type constant PType. Pattern1 ::= "Type" ; -- String literal patterns @@ -85,15 +85,13 @@ EApp. Exp9 ::= Exp9 Exp10 ; EProj. Exp10 ::= Exp10 "." Ident ; -EEmptyRec. Exp11 ::= "{" "}" ; - -ERecType. Exp11 ::= "{" [FieldType] "}" ; +ERecType. Exp11 ::= "sig" "{" [FieldType] "}" ; FieldType. FieldType ::= Ident ":" Exp ; -separator nonempty FieldType ";" ; +separator FieldType ";" ; -ERec. Exp11 ::= "{" [FieldValue] "}" ; +ERec. Exp11 ::= "rec" "{" [FieldValue] "}" ; FieldValue.FieldValue ::= Ident "=" Exp ; -separator nonempty FieldValue ";" ; +separator FieldValue ";" ; EVar. Exp11 ::= Ident ; EType. Exp11 ::= "Type" ; -- cgit v1.2.3