summaryrefslogtreecommitdiff
path: root/src/packrat-parsers.ads
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-12-04 20:17:43 +1100
committerJed Barber <jjbarber@y7mail.com>2020-12-04 20:17:43 +1100
commita21cc8153592700ae7cb2cdfbb24b377e096a22a (patch)
tree9dec048f52576a9881241e509fee72f8b91ac090 /src/packrat-parsers.ads
parent0abd0d9444164cbb85df0e5a50451b5f98fef3db (diff)
Scan/Parse functions are now packages, tests broken with linker errors
Diffstat (limited to 'src/packrat-parsers.ads')
-rw-r--r--src/packrat-parsers.ads47
1 files changed, 29 insertions, 18 deletions
diff --git a/src/packrat-parsers.ads b/src/packrat-parsers.ads
index 8d0ba68..93d06dd 100644
--- a/src/packrat-parsers.ads
+++ b/src/packrat-parsers.ads
@@ -24,8 +24,6 @@ package Packrat.Parsers is
type Parser_Context is private;
- Empty_Context : constant Parser_Context;
-
@@ -54,10 +52,16 @@ package Packrat.Parsers is
Context : in out Parser_Context;
Start : in Positive)
return Combinator_Result;
- procedure Parse
- (Input : in Traits.Element_Array;
- Context : in out Parser_Context;
- Result : out Graphs.Parse_Graph);
+ package Parse_Parts is
+
+ procedure Parse
+ (Input : in Traits.Element_Array;
+ Result : out Graphs.Parse_Graph);
+
+ procedure Reset;
+
+ end Parse_Parts;
+
generic
with function Root
@@ -65,10 +69,16 @@ package Packrat.Parsers is
Context : in out Parser_Context;
Start : in Positive)
return Combinator_Result;
- function Parse_Only
- (Input : in Traits.Element_Array;
- Context : in out Parser_Context)
- return Graphs.Parse_Graph;
+ package Parse_Once is
+
+ function Parse
+ (Input : in Traits.Element_Array)
+ return Graphs.Parse_Graph;
+
+ procedure Reset;
+
+ end Parse_Once;
+
generic
with function Root
@@ -76,10 +86,15 @@ package Packrat.Parsers is
Context : in out Parser_Context;
Start : in Positive)
return Combinator_Result;
- function Parse_With
- (Input : in With_Input;
- Context : in out Parser_Context)
- return Graphs.Parse_Graph;
+ package Parse_With is
+
+ function Parse
+ (Input : in With_Input)
+ return Graphs.Parse_Graph;
+
+ procedure Reset;
+
+ end Parse_With;
@@ -125,10 +140,6 @@ package Packrat.Parsers is
Start : in Positive)
return Combinator_Result;
- private
-
- Combo : Combinator := null;
-
end Redirect;