From: Adam Chlipala Date: Sun, 29 Apr 2007 01:11:36 +0000 (+0000) Subject: Allow extra semicolon at end of where clause X-Git-Tag: release_2010-11-19~230 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/6fa78209dd4f38f22fe636154b2d319676147eab Allow extra semicolon at end of where clause --- diff --git a/src/domtool.grm b/src/domtool.grm index ca9ff3a..0cf5778 100644 --- a/src/domtool.grm +++ b/src/domtool.grm @@ -53,6 +53,7 @@ open Ast | ctxt of pred | recd of record | recdNe of record + | SEMIopt of unit %verbose (* print summary of errors *) %pos int (* positions *) @@ -137,10 +138,13 @@ term : LPAREN exp RPAREN (exp) | LET exp IN exp END (ELocal (exp1, exp2), (LETleft, ENDright)) | SYMBOL (EVar SYMBOL, (SYMBOLleft, SYMBOLright)) -sets : CSYMBOL EQ apps ([(ESet (CSYMBOL, apps), (CSYMBOLleft, appsright))]) +sets : CSYMBOL EQ apps SEMIopt ([(ESet (CSYMBOL, apps), (CSYMBOLleft, appsright))]) | CSYMBOL EQ apps SEMI sets ((ESet (CSYMBOL, apps), (CSYMBOLleft, appsright)) :: sets) +SEMIopt: SEMI () + | () + elist : ([]) | elistNe (elistNe) diff --git a/src/plugins/hcoop.sml b/src/plugins/hcoop.sml index 93d98ec..b5f6b40 100644 --- a/src/plugins/hcoop.sml +++ b/src/plugins/hcoop.sml @@ -27,13 +27,11 @@ val dl = ErrorMsg.dummyLoc val _ = Env.type_one "homedir_path" Env.string (fn dir => Domain.yourPath (OS.Path.concat (Domain.homedir (), dir)) - handle OS.Path.InvalidArc => false - | OS.Path.Path => false) + handle _ => false) val () = Env.registerFunction ("home", fn [(EString dir, _)] => (SOME (EString (OS.Path.concat (Domain.homedir (), dir)), dl) - handle OS.Path.InvalidArc => NONE - | OS.Path.Path => NONE) + handle _ => NONE) | _ => NONE) end