-
Notifications
You must be signed in to change notification settings - Fork 14
/
lex-engine.sig
executable file
·67 lines (48 loc) · 2.03 KB
/
lex-engine.sig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
signature LEX_ENGINE =
sig
structure Streamable : STREAMABLE
type symbol
val next7x1 : int -> string -> int -> int -> int
val next8x1 : int -> string -> int -> int -> int
val next9x1 : int -> string -> int -> int -> int
val next10x1 : int -> string -> int -> int -> int
val next7x2 : int -> string -> int -> int -> int
val next8x2 : int -> string -> int -> int -> int
val next9x2 : int -> string -> int -> int -> int
val next10x2 : int -> string -> int -> int -> int
val next0x1 : string -> int -> int
val next0x2 : string -> int -> int
type ('a, 'b) action =
{ match : symbol list,
len : int,
start : symbol Streamable.t,
follow : symbol Streamable.t,
self : 'b } -> 'a
type ('a, 'b) table =
int * int * int * ('a, 'b) action vector * (int -> int -> int) * (int -> int)
val lex : 'b -> ('a, 'b) table -> symbol Streamable.t -> 'a
end
signature MONO_LEX_ENGINE =
sig
structure Streamable : MONO_STREAMABLE
type symbol = Streamable.elem
val next7x1 : int -> string -> int -> int -> int
val next8x1 : int -> string -> int -> int -> int
val next9x1 : int -> string -> int -> int -> int
val next10x1 : int -> string -> int -> int -> int
val next7x2 : int -> string -> int -> int -> int
val next8x2 : int -> string -> int -> int -> int
val next9x2 : int -> string -> int -> int -> int
val next10x2 : int -> string -> int -> int -> int
val next0x1 : string -> int -> int
val next0x2 : string -> int -> int
type ('a, 'b) action =
{ match : symbol list,
len : int,
start : Streamable.t,
follow : Streamable.t,
self : 'b } -> 'a
type ('a, 'b) table =
int * int * int * ('a, 'b) action vector * (int -> int -> int) * (int -> int)
val lex : 'b -> ('a, 'b) table -> Streamable.t -> 'a
end