summaryrefslogtreecommitdiff
path: root/src/packrat-parsers.ads
diff options
context:
space:
mode:
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;