summaryrefslogtreecommitdiff
path: root/test/packrat-lexers-debug.ads
blob: 89d9a24e8748f9ea537941c2ddcd138eb694868f (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
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
86
87
88
89
90
91
92
93
94
95
96


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


with

    Ada.Containers.Vectors;


generic
package Packrat.Lexers.Debug is


    Empty_Context : constant Lexer_Context;

    Empty_Fail : constant Combinator_Result;


    function Create_Result
           (Finish : in Natural;
            Status : in Result_Status)
        return Combinator_Result;

    function Join
           (Left, Right : in Combinator_Result)
        return Combinator_Result;

    function Status
           (This : in Combinator_Result)
        return Result_Status;

    function Debug_String
           (This : in Combinator_Result)
        return String;




    type Token_Vector is tagged private;

    function So_Far
           (This : in Lexer_Context)
        return Token_Vector;

    function Position
           (This : in Lexer_Context)
        return Positive;

    function Status
           (This : in Lexer_Context)
        return Result_Status;

    function Has_Pass
           (This : in Lexer_Context)
        return Boolean;

    function Pass
           (This : in Lexer_Context)
        return Traits.Element_Array;

    function Length
           (Vec : in Token_Vector)
        return Natural;

    function Element
           (Vec : in Token_Vector;
            Dex : in Positive)
        return Traits.Tokens.Token_Type;




    function Is_Failure
           (Result : in Component_Result)
        return Boolean;

    function Is_Success
           (Result : in Component_Result)
        return Boolean;


private


    Empty_Context : constant Lexer_Context := Packrat.Lexers.Empty_Context;

    Empty_Fail : constant Combinator_Result := Packrat.Lexers.Empty_Fail;


    type Token_Vector is new Token_Vectors.Vector with null record;


end Packrat.Lexers.Debug;