From b65dd53885eabb8f39a3115039563edc08efb2b4 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 6 Jul 2025 17:35:06 +0300 Subject: quick and easy semantic actions --- demos/sample-files/parser-skeleton.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'demos/sample-files/parser-skeleton.c') diff --git a/demos/sample-files/parser-skeleton.c b/demos/sample-files/parser-skeleton.c index 031d829..f601369 100644 --- a/demos/sample-files/parser-skeleton.c +++ b/demos/sample-files/parser-skeleton.c @@ -41,10 +41,12 @@ int main(int argc, char **argv) { if(argc != 2) { fprintf(stderr, "ERROR: Not enough arguments\n"); - return 1; + return 1; } input = argv[1]; - - return lr_parser(); + + printf("INPUT: '%s'\n", input); + printf("OUTPUT: %d\n", lr_parser()); + return 0; } -- cgit v1.2.3