From c5f78d029ff16b8ee0f92186c0bfe6304a53d968 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 13 Jan 2021 19:15:56 +1100 Subject: Lexer now is sure to slide input arrays to start with 1 --- src/packrat-lexers.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/packrat-lexers.adb') 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 -- cgit