summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-11-14 00:35:45 +1100
committerJed Barber <jjbarber@y7mail.com>2020-11-14 00:35:45 +1100
commitb2bcd79d78276289fab3406280c787277476b357 (patch)
treeaade7944ae50d99ebd188e15ad4a2298582ab971 /src
parentf8869a5efae197a77b238576a6863a3e1459399d (diff)
Changed No_Loops_Introduced to Loops_Introduced
Diffstat (limited to 'src')
-rw-r--r--src/packrat-parse_graphs.adb8
-rw-r--r--src/packrat-parse_graphs.ads4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/packrat-parse_graphs.adb b/src/packrat-parse_graphs.adb
index c44500f..ef425d7 100644
--- a/src/packrat-parse_graphs.adb
+++ b/src/packrat-parse_graphs.adb
@@ -439,7 +439,7 @@ package body Packrat.Parse_Graphs is
end Valid_Starts_Finishes;
- function No_Loops_Introduced
+ function Loops_Introduced
(Container : in Parse_Graph;
Parent : in Finished_Token;
Subtokens : in Finished_Token_Array)
@@ -461,9 +461,9 @@ package body Packrat.Parse_Graphs is
end if;
end Looper;
begin
- return not Container.Contains (Parent.Token) or else
- (for all Sub of Subtokens => not Looper (Sub));
- end No_Loops_Introduced;
+ return Container.Contains (Parent.Token) and then
+ (for some Sub of Subtokens => Looper (Sub));
+ end Loops_Introduced;
function Is_Sorted
diff --git a/src/packrat-parse_graphs.ads b/src/packrat-parse_graphs.ads
index 595c695..fc5861d 100644
--- a/src/packrat-parse_graphs.ads
+++ b/src/packrat-parse_graphs.ads
@@ -137,7 +137,7 @@ package Packrat.Parse_Graphs is
return Boolean
with Pre => Subtokens'Length > 0;
- function No_Loops_Introduced
+ function Loops_Introduced
(Container : in Parse_Graph;
Parent : in Finished_Token;
Subtokens : in Finished_Token_Array)
@@ -183,7 +183,7 @@ package Packrat.Parse_Graphs is
Subtokens : in Finished_Token_Array)
with Pre => Subtokens'Length > 0 and
Valid_Starts_Finishes (Parent, Subtokens) and
- Container.No_Loops_Introduced (Parent, Subtokens);
+ not Container.Loops_Introduced (Parent, Subtokens);
procedure Prune
(Container : in out Parse_Graph;