1(* Modified by sweeks@acm.org on 2000-8-24.
2 * Ported to MLton.
3 *)
4type int = Int.int
5
6(* ML-Yacc Parser Generator (c) 1989 Andrew W. Appel, David R. Tarditi
7 *
8 * $Log$
9 * Revision 1.1  2006/06/22 07:40:27  michaeln
10 * Add a MoscowML compilable implementation of MLyacc, using the MLton sources
11 * as the base.
12 *
13 * Revision 1.1.1.1  1997/01/14 01:38:06  george
14 *   Version 109.24
15 *
16 * Revision 1.1.1.1  1996/01/31  16:01:46  george
17 * Version 109
18 *
19 *)
20
21signature ORDSET =
22   sig
23      type set
24      type elem
25      exception Select_arb
26      val app : (elem -> unit) -> set -> unit
27	  and card: set -> int
28          and closure: set * (elem -> set) -> set
29          and difference: set * set -> set
30          and elem_eq: (elem * elem -> bool)
31	  and elem_gt : (elem * elem -> bool)
32          and empty: set
33	  and exists: (elem * set) -> bool
34	  and find : (elem * set)  ->  elem option
35	  and fold: ((elem * 'b) -> 'b) -> set -> 'b -> 'b
36          and insert: (elem * set) -> set
37          and is_empty: set -> bool
38          and make_list: set -> elem list
39          and make_set: (elem list -> set)
40          and partition: (elem -> bool) -> (set -> set * set)
41          and remove: (elem * set) -> set
42	  and revfold: ((elem * 'b) -> 'b) -> set -> 'b -> 'b
43          and select_arb: set -> elem
44	  and set_eq: (set * set) -> bool
45	  and set_gt: (set * set) -> bool
46          and singleton: (elem -> set)
47          and union: set * set -> set
48   end
49
50signature TABLE =
51   sig
52	type 'a table
53	type key
54	val size : 'a table -> int
55	val empty: 'a table
56	val exists: (key * 'a table) -> bool
57	val find : (key * 'a table)  ->  'a option
58	val insert: ((key * 'a) * 'a table) -> 'a table
59	val make_table : (key * 'a ) list -> 'a table
60	val make_list : 'a table -> (key * 'a) list
61	val fold : ((key * 'a) * 'b -> 'b) -> 'a table -> 'b -> 'b
62   end
63
64signature HASH =
65  sig
66    type table
67    type elem
68
69    val size : table -> int
70    val add : elem * table -> table
71    val find : elem * table -> int option
72    val exists : elem * table -> bool
73    val empty : table
74  end;
75