summaryrefslogtreecommitdiff
path: root/src/packrat-lexers.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2021-01-13 19:15:56 +1100
committerJed Barber <jjbarber@y7mail.com>2021-01-13 19:15:56 +1100
commitc5f78d029ff16b8ee0f92186c0bfe6304a53d968 (patch)
treebe0dd8c436f0ea22dc4348c32d71ebcf4e831c99 /src/packrat-lexers.adb
parentea022446ea40844831a7daa3c6e6d9f7d91c01f2 (diff)
Lexer now is sure to slide input arrays to start with 1
Diffstat (limited to 'src/packrat-lexers.adb')
-rw-r--r--src/packrat-lexers.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/packrat-lexers.adb b/src/packrat-lexers.adb
index cd81635..b09b6eb 100644
--- a/src/packrat-lexers.adb
+++ b/src/packrat-lexers.adb
@@ -133,7 +133,7 @@ package body Packrat.Lexers is
if not Context.Pass_Forward.Is_Empty then
Real_Input.Replace_Element (Slide (Context.Pass_Forward.Element) & Input);
else
- Real_Input.Replace_Element (Input);
+ Real_Input.Replace_Element (Slide (Input));
end if;
Tidy_Context (Context, Components'Length);
Context.Result_So_Far.Clear;
@@ -165,7 +165,7 @@ package body Packrat.Lexers is
if not Context.Pass_Forward.Is_Empty then
Real_Input.Replace_Element (Slide (Context.Pass_Forward.Element) & Input);
else
- Real_Input.Replace_Element (Input);
+ Real_Input.Replace_Element (Slide (Input));
end if;
Tidy_Context (Context, Components'Length);
Context.Result_So_Far.Clear;
@@ -197,7 +197,7 @@ package body Packrat.Lexers is
begin
Context.Result_So_Far.Clear;
loop
- Real_Input.Replace_Element (Input.all);
+ Real_Input.Replace_Element (Slide (Input.all));
Empty_Input := Real_Input.Element'Length = 0;
if not Context.Pass_Forward.Is_Empty then
Real_Input.Replace_Element