SCM Repository
[smlnj] Annotation of /lexgen/releases/release-110.61/src/reg-exp-sig.sml
Annotation of /lexgen/releases/release-110.61/src/reg-exp-sig.sml
Parent Directory
|
Revision Log
Revision 2110 -
(view)
(download)
Original Path: lexgen/trunk/src/reg-exp-sig.sml
1 : |
mblume |
1902 |
(* reg-exp-sig.sml
|
2 : |
|
|
*
|
3 : |
|
|
* COPYRIGHT (c) 2005
|
4 : |
|
|
* John Reppy (http://www.cs.uchicago.edu/~jhr)
|
5 : |
|
|
* Aaron Turon (adrassi@gmail.com)
|
6 : |
|
|
* All rights reserved.
|
7 : |
|
|
*
|
8 : |
|
|
* RE representation and manipulation
|
9 : |
|
|
*)
|
10 : |
|
|
|
11 : |
|
|
signature REG_EXP =
|
12 : |
|
|
sig
|
13 : |
|
|
|
14 : |
|
|
structure Sym : INTERVAL_DOMAIN
|
15 : |
|
|
structure SymSet : INTERVAL_SET
|
16 : |
|
|
|
17 : |
|
|
type symbol
|
18 : |
|
|
type sym_set
|
19 : |
|
|
type re
|
20 : |
|
|
|
21 : |
|
|
val any : re (* wildcard *)
|
22 : |
|
|
val none : re (* EMPTY language *)
|
23 : |
|
|
val epsilon : re (* the nil character (of length 0) *)
|
24 : |
|
|
|
25 : |
|
|
val mkSym : symbol -> re
|
26 : |
|
|
val mkSymSet : sym_set -> re
|
27 : |
|
|
|
28 : |
|
|
val mkOr : re * re -> re
|
29 : |
|
|
val mkAnd : re * re -> re
|
30 : |
|
|
val mkXor : re * re -> re
|
31 : |
|
|
val mkNot : re -> re
|
32 : |
|
|
val mkConcat : re * re -> re
|
33 : |
|
|
val mkClosure : re -> re
|
34 : |
|
|
val mkOpt : re -> re
|
35 : |
|
|
val mkRep : re * int * int -> re
|
36 : |
|
|
val mkAtLeast : re * int -> re
|
37 : |
|
|
|
38 : |
|
|
val isNone : re -> bool
|
39 : |
|
|
val nullable : re -> bool
|
40 : |
|
|
val derivative : symbol -> re -> re
|
41 : |
|
|
val derivatives : re Vector.vector ->
|
42 : |
|
|
((re Vector.vector) * sym_set) list
|
43 : |
|
|
|
44 : |
|
|
val symToString : symbol -> string
|
45 : |
|
|
val toString : re -> string
|
46 : |
|
|
val compare : re * re -> order
|
47 : |
|
|
|
48 : |
|
|
end
|