summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-14 23:31:07 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-14 23:31:07 +1100
commitb60f27407c20344f5d48fa7d6f3efe5f9d4e87fb (patch)
tree228f75e20799813eed1f17adf21bafee32283697 /src
parent5a01394fadfe73cc9bfdc3576a58ac3cd4dcb1f2 (diff)
Tests added for Stamp and Ignore procedures in Packrat.Lexer
Diffstat (limited to 'src')
-rw-r--r--src/packrat-lexer.adb6
-rw-r--r--src/packrat-lexer.ads19
2 files changed, 18 insertions, 7 deletions
diff --git a/src/packrat-lexer.adb b/src/packrat-lexer.adb
index e1765d9..a563f69 100644
--- a/src/packrat-lexer.adb
+++ b/src/packrat-lexer.adb
@@ -135,14 +135,16 @@ package body Packrat.Lexer is
procedure Stamp
- (Context : in out Lexer_Context) is
+ (Input : in Element_Array;
+ Context : in out Lexer_Context) is
begin
null;
end Stamp;
procedure Ignore
- (Context : in out Lexer_Context) is
+ (Input : in Element_Array;
+ Context : in out Lexer_Context) is
begin
null;
end Ignore;
diff --git a/src/packrat-lexer.ads b/src/packrat-lexer.ads
index fe5ff9d..1da9662 100644
--- a/src/packrat-lexer.ads
+++ b/src/packrat-lexer.ads
@@ -40,7 +40,8 @@ package Packrat.Lexer is
type Lexer_Component is access procedure
- (Context : in out Lexer_Context);
+ (Input : in Element_Array;
+ Context : in out Lexer_Context);
type Component_Array is array (Positive range <>) of Lexer_Component;
@@ -49,14 +50,22 @@ package Packrat.Lexer is
generic
Label : in Label_Enum;
- Combo : in Combinator;
+ with function Combo
+ (Input : in Element_Array;
+ Start : in Positive)
+ return Combinator_Result;
procedure Stamp
- (Context : in out Lexer_Context);
+ (Input : in Element_Array;
+ Context : in out Lexer_Context);
generic
- Combo : in Combinator;
+ with function Combo
+ (Input : in Element_Array;
+ Start : in Positive)
+ return Combinator_Result;
procedure Ignore
- (Context : in out Lexer_Context);
+ (Input : in Element_Array;
+ Context : in out Lexer_Context);