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


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


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;