1 (***********************************************************************)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
11 (***********************************************************************)
15 (* Auxiliary functions for parsing *)
20 exception Error
of error
22 let tbl_ident = (Hashtbl.create
57 : (string, Ident.t
) Hashtbl.t
)
25 let id = Ident.create s
in
26 Hashtbl.add
tbl_ident s
id;
31 Hashtbl.find
tbl_ident s
33 raise
(Error
(Unbound s
))
36 Hashtbl.remove
tbl_ident (Ident.name
id)
38 let report_error = function
40 prerr_string
"Unbound identifier "; prerr_string s
; prerr_endline
"."