blob: dad33db5b9452f34dbaf689d2553acc054d82046 (
plain)
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
|
with
Packrat.Traits,
Packrat.Lexers,
Packrat.Parse_Graphs,
Packrat.Parsers;
generic
type Lexer_Labels is (<>);
type Parser_Labels is (<>);
package Packrat.Text.Wide_Wide is
package Lexer_Traits is new Packrat.Traits
(Label_Enum => Lexer_Labels,
Element_Type => Wide_Wide_Character,
Element_Array => Wide_Wide_String);
package Lexers is new Packrat.Lexers
(Traits => Lexer_Traits);
subtype Lexer_Result is Lexer_Traits.Tokens.Token_Array;
package Parser_Traits is new Packrat.Traits
(Label_Enum => Parser_Labels,
Element_Type => Lexer_Traits.Tokens.Token,
Element_Array => Lexer_Traits.Tokens.Token_Array,
"<" => Lexer_Traits.Tokens."<");
package Parse_Graphs is new Packrat.Parse_Graphs
(Traits => Parser_Traits);
package Parsers is new Packrat.Parsers
(Traits => Parser_Traits,
Graphs => Parse_Graphs);
subtype Parser_Result is Parse_Graphs.Parse_Graph;
end Packrat.Text.Wide_Wide;
|