1997-08-22 01:55:41 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
1997-08-22 01:55:41 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1997 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1997-08-22 01:55:41 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* Auxiliary type for reporting syntax errors *)
|
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
open Format
|
|
|
|
|
1997-08-22 01:55:41 -07:00
|
|
|
type error =
|
|
|
|
Unclosed of Location.t * string * Location.t * string
|
2012-10-16 07:04:33 -07:00
|
|
|
| Expecting of Location.t * string
|
2013-04-11 06:52:06 -07:00
|
|
|
| Not_expecting of Location.t * string
|
2009-07-15 07:06:37 -07:00
|
|
|
| Applicative_path of Location.t
|
2012-03-22 19:20:24 -07:00
|
|
|
| Variable_in_scope of Location.t * string
|
1997-08-22 01:55:41 -07:00
|
|
|
| Other of Location.t
|
2014-08-22 06:45:02 -07:00
|
|
|
| Ill_formed_ast of Location.t * string
|
1997-08-22 01:55:41 -07:00
|
|
|
|
|
|
|
exception Error of error
|
1997-11-12 04:32:53 -08:00
|
|
|
exception Escape_error
|
1997-08-22 01:55:41 -07:00
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
val report_error: formatter -> error -> unit
|
2013-09-12 04:59:45 -07:00
|
|
|
(* Deprecated. Use Location.{error_of_exn, report_error}. *)
|
2012-10-16 07:04:33 -07:00
|
|
|
|
|
|
|
val location_of_error: error -> Location.t
|
2014-08-22 06:45:02 -07:00
|
|
|
val ill_formed_ast: Location.t -> string -> 'a
|