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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
with
Unit_Tests;
use
Unit_Tests;
private with
Packrat.No_Lex,
Packrat.Parsers.Debug,
Packrat.Errors,
Packrat.Traits;
package Rat_Tests.Parsers is
function Count_Check return Test_Result;
function Many_Nomin_Check return Test_Result;
function Many_Min_Check return Test_Result;
function Many_Until_Nomin_Check return Test_Result;
function Many_Until_Min_Check return Test_Result;
function Satisfy_Check return Test_Result;
function Satisfy_With_Check return Test_Result;
function Match_Check return Test_Result;
function Match_With_Check return Test_Result;
function Multimatch_Check return Test_Result;
function Take_Check return Test_Result;
function Take_While_Check return Test_Result;
function Take_Until_Check return Test_Result;
function Empty_Check return Test_Result;
function Not_Empty_Check return Test_Result;
Combinator_Tests : Test_Array :=
((+"Count", Count_Check'Access),
(+"Many No Minimum", Many_Nomin_Check'Access),
(+"Many With Minimum", Many_Min_Check'Access),
(+"Many_Until No Minimum", Many_Until_Nomin_Check'Access),
(+"Many_Until With Minimum", Many_Until_Min_Check'Access),
(+"Satisfy", Satisfy_Check'Access),
(+"Satisfy_With", Satisfy_With_Check'Access),
(+"Match", Match_Check'Access),
(+"Match_With", Match_With_Check'Access),
(+"Multimatch", Multimatch_Check'Access),
(+"Take", Take_Check'Access),
(+"Take_While", Take_While_Check'Access),
(+"Take_Until", Take_Until_Check'Access),
(+"Empty", Empty_Check'Access),
(+"Not_Empty", Not_Empty_Check'Access));
function Default_Result_Check return Test_Result;
Other_Tests : Test_Array :=
(1 => (+"Default Combinator Result", Default_Result_Check'Access));
private
type Parser_Labels_One is (One, Two, Three, Four, Five, Six);
package Pone is new Packrat.No_Lex
(Parser_Labels_One, Character, String);
package One_Debug is new Pone.Parsers.Debug;
function Alphanum_Switch
(Char : in Character)
return Character;
end Rat_Tests.Parsers;
|