From 2adeae8eb1bc8437b392bed07f1858363f95ab8a Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 12 Dec 2020 12:49:01 +1100 Subject: More bugfixes and Parser unit tests --- example/ssss.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'example') 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); -- cgit