summaryrefslogtreecommitdiff
path: root/src/packrat-no_lex.ads
blob: ab80f2694c9eb7a9e40324422588d9536fc3ca90 (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


--  This source is licensed under the Sunset License v1.0


with

    Packrat.Traits,
    Packrat.Parse_Graphs,
    Packrat.Parsers;


generic

    type Parser_Labels is (<>);

    type Element_Type is private;
    type Element_Array is array (Positive range <>) of Element_Type;

    with function "<" (Left, Right : in Element_Type) return Boolean is <>;

package Packrat.No_Lex is


    package Parser_Traits is new Packrat.Traits
       (Lab_Enum   => Parser_Labels,
        Elem_Type  => Element_Type,
        Elem_Array => Element_Array);

    package Parse_Graphs is new Packrat.Parse_Graphs
       (Traits => Parser_Traits);

    package Parsers is new Packrat.Parsers
       (Traits => Parser_Traits,
        Graphs => Parse_Graphs);

    package Parser_Tokens renames Parser_Traits.Tokens;

    subtype Parser_Result is Parse_Graphs.Parse_Graph;


end Packrat.No_Lex;