From 1c83c514c8108fccfec9764da5e4563b98eb871b Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 3 Aug 2025 23:53:24 +0300 Subject: calc implemented in my grammar --- lr-parser.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lr-parser.c') diff --git a/lr-parser.c b/lr-parser.c index 621a9e7..bca8a52 100644 --- a/lr-parser.c +++ b/lr-parser.c @@ -60,6 +60,7 @@ int lr_parser(intptr_t *value) push(a_goto.arg); break; case ACTION_ACCEPT: + for(size_t i = 0; i < 3; i++) push(0); // todo: better fix for reducing the final production expecting an END_INPUT on the stack *value = semantic_actions[0](stack_head); return 0; case ACTION_NOT_SET: -- cgit v1.2.3