diff options
author | Jed Barber <jjbarber@y7mail.com> | 2020-12-10 23:22:19 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2020-12-10 23:22:19 +1100 |
commit | 192172cfc44220975b34295d38c5213b08de5191 (patch) | |
tree | 555de972762414ba11e3e3f9908425dba55675f7 /test/packrat-parsers-debug.ads | |
parent | fb29719b1ce83fca511c1f310b388e0af65da257 (diff) |
Some unit tests for Packrat.Parsers
Diffstat (limited to 'test/packrat-parsers-debug.ads')
-rw-r--r-- | test/packrat-parsers-debug.ads | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/test/packrat-parsers-debug.ads b/test/packrat-parsers-debug.ads new file mode 100644 index 0000000..7fd425b --- /dev/null +++ b/test/packrat-parsers-debug.ads @@ -0,0 +1,76 @@ + + +generic +package Packrat.Parsers.Debug is + + + type Result_Part is private; + type Result_Part_Array is array (Positive range <>) of Result_Part; + + type Curtail_Map is private; + + + + + Empty_Context : constant Parser_Context; + Empty_Fail : constant Combinator_Result; + + + + + function Parts + (This : in Combinator_Result) + return Result_Part_Array; + + function Curtails + (This : in Combinator_Result) + return Curtail_Map; + + function Status + (This : in Combinator_Result) + return Result_Status; + + + + + function Finish + (Part : in Result_Part) + return Traits.Tokens.Finish_Type; + + function Value + (Part : in Result_Part) + return Traits.Element_Array; + + function Tokens + (Part : in Result_Part) + return Traits.Tokens.Finished_Token_Array; + + + + + function Is_Empty + (Curt : in Curtail_Map) + return Boolean; + + + + + function Debug_String + (This : in Combinator_Result) + return String; + + +private + + + type Result_Part is new Combo_Result_Part; + type Curtail_Map is new Curtail_Maps.Map with null record; + + + Empty_Context : constant Parser_Context := Packrat.Parsers.Empty_Context; + Empty_Fail : constant Combinator_Result := Packrat.Parsers.Empty_Fail; + + +end Packrat.Parsers.Debug; + + |