diff options
author | Jed Barber <jjbarber@y7mail.com> | 2020-04-19 22:57:34 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2020-04-19 22:57:34 +1000 |
commit | 4aa7653f76f2223c41debdfdddf6a420d3f0db88 (patch) | |
tree | 95d09d46eafea4da4a5d7cf4b14cc667ebc0836b /src/packrat-lexer.ads | |
parent | 58e6b24df6935dcd3d6e03c2a926fdc6529cec70 (diff) |
Refactoring of Lexer Scan functions
Diffstat (limited to 'src/packrat-lexer.ads')
-rw-r--r-- | src/packrat-lexer.ads | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/packrat-lexer.ads b/src/packrat-lexer.ads index 693064d..9973cdd 100644 --- a/src/packrat-lexer.ads +++ b/src/packrat-lexer.ads @@ -293,20 +293,19 @@ private - type Lexer_Context is new Ada.Finalization.Controlled with record + type Lexer_Context is record Result_So_Far : Token_Vectors.Vector; - Position : Positive; - Offset : Natural; - Status : Result_Status; + Position : Positive := 1; + Offset : Natural := 0; + Status : Result_Status := Success; Pass_Forward : Input_Holders.Holder; Empty_Labels : Label_Sets.Set; Error_Labels : Label_Vectors.Vector; - Allow_Incomplete : Boolean; + Allow_Incomplete : Boolean := True; end record; Empty_Context : constant Lexer_Context := - (Ada.Finalization.Controlled with - Result_So_Far => Token_Vectors.Empty_Vector, + (Result_So_Far => Token_Vectors.Empty_Vector, Position => 1, Offset => 0, Status => Success, @@ -316,6 +315,14 @@ private Allow_Incomplete => True); + + + procedure Internal_Scan_Core + (Input : in Element_Array; + Context : in out Lexer_Context; + Components : in Component_Array); + + end Packrat.Lexer; |