/[svn]/parser/location.mli
ViewVC logotype

Contents of /parser/location.mli

Parent Directory Parent Directory | Revision Log Revision Log


Revision 522 - (show annotations)
Tue Jul 10 17:41:19 2007 UTC (5 years, 10 months ago) by abate
File size: 1274 byte(s)
[r2003-06-17 15:49:59 by cvscast] Review type-checking of strings (TODO: clean the parser; improve
pretty-printing of errors)

Original author: cvscast
Date: 2003-06-17 15:50:00+00:00
1 (* Locations in source file,
2 and presentation of results and errors *)
3
4 type source = [ `None | `File of string | `Stream | `String of string ]
5 type loc = source * int * int
6 type precise = [ `Full | `Char of int ]
7
8 exception Location of loc * precise * exn
9 exception Generic of string
10 val noloc:loc
11 val nopos:int * int
12
13 val merge_loc: loc -> loc -> loc
14
15 val raise_loc: int -> int -> exn -> 'a
16 val raise_generic: string -> 'a
17 val raise_loc_generic: loc -> string -> 'a
18
19 val push_source: source -> unit
20 val pop_source: unit -> unit
21
22 val current_dir : unit -> string
23
24 val warning_ppf : Format.formatter ref
25
26 type viewport = [ `Html | `Text ]
27 val set_viewport: viewport -> unit
28
29 val protect: Format.formatter -> (Format.formatter -> unit) -> unit
30
31 val print_loc: Format.formatter -> loc * precise -> unit
32 val dump_loc: Format.formatter -> loc * precise -> unit
33 val html_hilight: Format.formatter -> loc * precise -> unit
34
35 type 'a located = { loc : loc; descr : 'a }
36 val mk: int * int -> 'a -> 'a located
37 val mk_loc: loc -> 'a -> 'a located
38 val mknoloc: 'a -> 'a located
39
40 val loc_of_pos : int * int -> loc
41
42
43 (* Are we working in a protected environement (web prototype ...) ? *)
44 val set_protected : bool -> unit
45 val is_protected : unit -> bool
46 val protect_op : string -> unit

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5