summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2021-01-19 13:25:33 +1100
committerJed Barber <jjbarber@y7mail.com>2021-01-19 13:25:33 +1100
commitce3d96238d0b5068a0abfb8d056e2993048f8637 (patch)
treec690585b7c07fa93484f7e5ecf2d7e5f3a5a7145 /src
parentda389927ddf9240bbba10b819eb782e80a5d6bf7 (diff)
Slight improvement to curtailment in Memoize and Continue
Diffstat (limited to 'src')
-rw-r--r--src/packrat-parsers.adb3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/packrat-parsers.adb b/src/packrat-parsers.adb
index ed0f3d3..abb2736 100644
--- a/src/packrat-parsers.adb
+++ b/src/packrat-parsers.adb
@@ -170,8 +170,6 @@ package body Packrat.Parsers is
Result.Curtails.Exclude (Combo);
elsif Result.Curtails.Contains (Combo) then
Result.Curtails.Replace (Combo, Left);
- else
- Result.Curtails.Insert (Combo, Left);
end if;
else
Result.Curtails.Exclude (Combo);
@@ -345,6 +343,7 @@ package body Packrat.Parsers is
Salt, Temp : Combinator_Result;
Adjust : Result_Sets.Set;
begin
+ Salt.Curtails := From.Curtails;
for R of From.Results loop
Temp := Next (Input, Context, R.Finish + 1);
Adjust.Clear;