From 88b57c216a6ac2f1565686a66448c155f571852c Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 13 Dec 2020 23:22:31 +1100 Subject: Bugfixes, esp Delete_Unreachable --- src/packrat-parse_graphs.ads | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/packrat-parse_graphs.ads') diff --git a/src/packrat-parse_graphs.ads b/src/packrat-parse_graphs.ads index e13bfc7..b302004 100644 --- a/src/packrat-parse_graphs.ads +++ b/src/packrat-parse_graphs.ads @@ -335,6 +335,19 @@ private + -- This 'use type' is to avoid some ambiguities with "=" functions when + -- instantiating the Base package. + use type Traits.Tokens.Token_Type; + + package Base is new Directed_Graphs + (Node_ID_Type => Node_ID_Type, + Edge_ID_Type => Edge_ID_Type, + Node_Label_Type => Node_Label_Type, + Edge_Label_Type => Edge_Label_Type); + + + + function To_Node (Container : in Parse_Graph; Token : in Traits.Tokens.Token_Type) @@ -350,19 +363,10 @@ private Node : in Node_ID_Type) return Boolean; - - - - -- This 'use type' is to avoid some ambiguities with "=" functions when - -- instantiating the Base package. - use type Traits.Tokens.Token_Type; - - package Base is new Directed_Graphs - (Node_ID_Type => Node_ID_Type, - Edge_ID_Type => Edge_ID_Type, - Node_Label_Type => Node_Label_Type, - Edge_Label_Type => Edge_Label_Type); - + function Unreachable_Outbound + (Container : in Parse_Graph; + Node : in Node_ID_Type) + return Base.Edge_Array; -- cgit