| IDENT "fold"; kind = reduction_kind; t = tactic_term; p = pattern_spec ->
let (pt,_,_) = p in
if pt <> None then
- raise (CicNotationParser.Parse_error
- (loc, "the pattern cannot specify the term to replace, only its"
- ^ " paths in the hypotheses and in the conclusion"))
+ raise (HExtlib.Localized (loc, CicNotationParser.Parse_error
+ ("the pattern cannot specify the term to replace, only its"
+ ^ " paths in the hypotheses and in the conclusion")))
else
GrafiteAst.Fold (loc, kind, t, p)
| IDENT "fourier" ->
let (pt,_,_) = p in
if pt <> None then
raise
- (CicNotationParser.Parse_error
- (loc,"the pattern cannot specify the term to rewrite, only its paths in the hypotheses and in the conclusion"))
+ (HExtlib.Localized (loc,
+ (CicNotationParser.Parse_error
+ "the pattern cannot specify the term to rewrite, only its paths in the hypotheses and in the conclusion")))
else
GrafiteAst.Rewrite (loc, d, t, p)
| IDENT "right" ->
then
GrafiteAst.Ident_alias (id, uri)
else
- raise (CicNotationParser.Parse_error (loc,sprintf "Not a valid uri: %s" uri))
+ raise
+ (HExtlib.Localized (loc, CicNotationParser.Parse_error (sprintf "Not a valid uri: %s" uri)))
else
- raise (CicNotationParser.Parse_error (loc,
- sprintf "Not a valid identifier: %s" id))
+ raise (HExtlib.Localized (loc, CicNotationParser.Parse_error (
+ sprintf "Not a valid identifier: %s" id)))
| IDENT "symbol"; symbol = QSTRING;
instance = OPT [ LPAREN; IDENT "instance"; n = int; RPAREN -> n ];
SYMBOL "="; dsc = QSTRING ->
| IDENT "metadata"; [ IDENT "dependency" | IDENT "baseuri" ] ; URI ->
(** metadata commands lives only in .moo, where they are in marshalled
* form *)
- raise (CicNotationParser.Parse_error (loc, "metadata not allowed here"))
+ raise (HExtlib.Localized (loc,CicNotationParser.Parse_error "metadata not allowed here"))
| IDENT "dump" -> GrafiteAst.Dump loc
| IDENT "render"; u = URI ->
with
| Stdpp.Exc_located (_, End_of_file) -> raise End_of_file
| Stdpp.Exc_located (floc, Stream.Error msg) ->
- raise (CicNotationParser.Parse_error (floc, msg))
+ raise (HExtlib.Localized (floc,CicNotationParser.Parse_error msg))
| Stdpp.Exc_located (floc, exn) ->
- raise (CicNotationParser.Parse_error (floc, (Printexc.to_string exn)))
+ raise
+ (HExtlib.Localized (floc,CicNotationParser.Parse_error (Printexc.to_string exn)))
let parse_statement lexbuf =
exc_located_wrapper