From 1f50fd27f6e5904f090a572136d951f4cabb4d39 Mon Sep 17 00:00:00 2001 From: Gavan Fantom Date: Mon, 31 Dec 2007 00:48:57 +0000 Subject: [PATCH] Return error code from parser on normal process exit --- src/lsc/parser.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lsc/parser.y b/src/lsc/parser.y index 8c0aa84..eee138c 100644 --- a/src/lsc/parser.y +++ b/src/lsc/parser.y @@ -28,6 +28,8 @@ int yywrap() int main(int argc, char *argv[]) { + int rv; + argv++; /* skip over program name */ argc--; if (argc > 0) { @@ -60,10 +62,10 @@ int main(int argc, char *argv[]) err(1, "%s: Failed to open output file", "out.lc"); } - yyparse(); + rv = yyparse(); fclose(binout); fclose(yyin); - return 0; + return rv; } %}