aboutsummaryrefslogtreecommitdiff
path: root/demos/sample-files/parser-skeleton.c
diff options
context:
space:
mode:
authorkartofen <kartofen.mail.0@protonmail.com>2025-07-06 17:35:06 +0300
committerkartofen <kartofen.mail.0@protonmail.com>2025-07-06 17:35:06 +0300
commite37eccfabbc5c626791e9698cc6c5fb1ec335625 (patch)
tree75ec27e5cda989316b2498c913e0283c9ed08841 /demos/sample-files/parser-skeleton.c
parent9b4c8231a368524f9e797af111019ce95823f981 (diff)
quick and easy semantic actions
Diffstat (limited to 'demos/sample-files/parser-skeleton.c')
-rw-r--r--demos/sample-files/parser-skeleton.c8
1 files changed, 5 insertions, 3 deletions
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;
}