From 726468c883e75b883a440216e2fd0742f357615a Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 19 Jul 2023 06:58:45 -0700 Subject: Change: adding whole rule match to bindings for action application --- argot.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'argot.lisp') diff --git a/argot.lisp b/argot.lisp index 2d72866..f86ce22 100644 --- a/argot.lisp +++ b/argot.lisp @@ -225,7 +225,8 @@ any pattern fails the whole parse fails." (let ((*bindings* nil)) (try-parse (result) (parse-pattern (rule-pattern rule)) (if (rule-action rule) - (succeed (funcall (rule-action rule) *bindings*)) + (succeed (funcall (rule-action rule) + (acons nonterminal result *bindings*))) (succeed result)))) (fail))) -- cgit v1.2.3