Allow extra semicolon at end of where clause
authorAdam Chlipala <adamc@hcoop.net>
Sun, 29 Apr 2007 01:11:36 +0000 (01:11 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sun, 29 Apr 2007 01:11:36 +0000 (01:11 +0000)
src/domtool.grm
src/plugins/hcoop.sml

index ca9ff3a..0cf5778 100644 (file)
@@ -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)
 
index 93d98ec..b5f6b40 100644 (file)
@@ -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