diff options
| author | bringert <bringert@cs.chalmers.se> | 2005-12-06 15:57:43 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2005-12-06 15:57:43 +0000 |
| commit | 5be879dd543d61f871f76586251fe0aad91c0bcc (patch) | |
| tree | d2bd110cbbfaeaf7c85f0ae7e1aeb7fdd93824fe /src/Transfer/Syntax/Syntax.cf | |
| parent | 54b8d70443f2b41691339376677f50c7e5f62fca (diff) | |
Transfer: Changed BNFC's layout syntax resolver to add a semicolon at EOF if using top-level layout sytax. Changed transfer syntax to use this to force semicolon after imports when pretty printing transfer. transfer grammar printer now produces Transfer syntax, not core. It also imports prelude and includes Eq and Compos instances.
Diffstat (limited to 'src/Transfer/Syntax/Syntax.cf')
| -rw-r--r-- | src/Transfer/Syntax/Syntax.cf | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Transfer/Syntax/Syntax.cf b/src/Transfer/Syntax/Syntax.cf index b38dd115f..1b8f8cb4e 100644 --- a/src/Transfer/Syntax/Syntax.cf +++ b/src/Transfer/Syntax/Syntax.cf @@ -10,13 +10,16 @@ comment "{-" "-}" ; Module. Module ::= [Import] [Decl] ; Import. Import ::= "import" Ident ; -separator Import ";" ; +-- FIXME: this is terminator to ensure that the pretty printer +-- produces a semicolon after the last import. This could cause +-- problems in a program which only does imports and uses layout syntax. +terminator Import ";" ; DataDecl. Decl ::= "data" Ident ":" Exp "where" "{" [ConsDecl] "}" ; TypeDecl. Decl ::= Ident ":" Exp ; ValueDecl. Decl ::= Ident [Pattern] Guard "=" Exp ; DeriveDecl. Decl ::= "derive" Ident Ident ; -separator Decl ";" ; +terminator Decl ";" ; ConsDecl. ConsDecl ::= Ident ":" Exp ; separator ConsDecl ";" ; |
