summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2015-03-05 15:33:07 -0500
committerQuentin Carbonneaux2015-03-05 15:33:07 -0500
commit8a59c32946014165fa7b1843713537dc38d14bb0 (patch)
treee0e325cf04ec5d49c71bd57e3d2c15a8661d3b2d
parent6b619da0bf69bc50f67a64bd497c5fd00747ccaf (diff)
more correct C code
-rw-r--r--act.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/act.y b/act.y
index 2db2bf7..e7d7dc6 100644
--- a/act.y
+++ b/act.y
@@ -6,7 +6,7 @@
start: 'x' foo 'y';
foo: { puts("act!"); };
%%
-int yyerror() { puts("oops, yacc error!"); }
+int yyerror() { puts("oops, yacc error!"); return 0; }
int yylex() { int c = getchar(); printf("lex %d\n", c); return c==EOF?0:c; }
-int main() { yyparse(); }
+int main() { return yyparse(); }