Browse Source

Return error code from parser on normal process exit

master
Gavan Fantom 17 years ago
parent
commit
1f50fd27f6
  1. 6
      src/lsc/parser.y

6
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;
}
%}

Loading…
Cancel
Save