summaryrefslogtreecommitdiff
path: root/example/ssss.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-12-12 12:49:01 +1100
committerJed Barber <jjbarber@y7mail.com>2020-12-12 12:49:01 +1100
commit2adeae8eb1bc8437b392bed07f1858363f95ab8a (patch)
tree13611fd2ca660ef2592e1b948d57bfc0762c91d2 /example/ssss.adb
parent192172cfc44220975b34295d38c5213b08de5191 (diff)
More bugfixes and Parser unit tests
Diffstat (limited to 'example/ssss.adb')
-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);