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


with

    Ada.Strings.Unbounded;


package Packrat is


    type Result_Status is (Failure, Needs_More, Optional_More, Success);


    Parser_Error : exception;
    Lexer_Error  : exception;


private


    function "+"
           (S : in String)
        return Ada.Strings.Unbounded.Unbounded_String
        renames Ada.Strings.Unbounded.To_Unbounded_String;

    function "-"
           (US : in Ada.Strings.Unbounded.Unbounded_String)
        return String
        renames Ada.Strings.Unbounded.To_String;




    generic
        type Base_Type is private;
        type Array_Type is array (Positive range <>) of Base_Type;
        with function "<" (Left, Right : in Base_Type) return Boolean is <>;
    function Array_Less_Than
           (Left, Right : in Array_Type)
        return Boolean;


end Packrat;