summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/ssss.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/example/ssss.adb b/example/ssss.adb
index 56f980d..387c02c 100644
--- a/example/ssss.adb
+++ b/example/ssss.adb
@@ -16,7 +16,7 @@ procedure Ssss is
Input : String := "xxxx";
- type Parser_Labels is (S);
+ type Parser_Labels is (S, X);
package My_Rat is new Packrat.No_Lex (Parser_Labels, Character, String);
@@ -26,8 +26,10 @@ procedure Ssss is
package S_Redir is new My_Rat.Parsers.Redirect;
function Match_X is new My_Rat.Parsers.Match ('x');
+ function Let_X is new My_Rat.Parsers.Stamp (X, Match_X);
+
function S_Seq is new My_Rat.Parsers.Sequence
- ((Match_X'Access, S_Redir.Call'Access, S_Redir.Call'Access));
+ ((Let_X'Access, S_Redir.Call'Access, S_Redir.Call'Access));
function S_Choice is new My_Rat.Parsers.Choice
((S_Seq'Access, My_Rat.Parsers.Empty'Access));
function S is new My_Rat.Parsers.Stamp (S, S_Choice);