summaryrefslogtreecommitdiffstats
path: root/test/YACC/live.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/YACC/live.py')
-rw-r--r--test/YACC/live.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/YACC/live.py b/test/YACC/live.py
index d567ec3..f6733da 100644
--- a/test/YACC/live.py
+++ b/test/YACC/live.py
@@ -61,20 +61,23 @@ foo.CFile(target = 'not_foo', source = 'foo.y')
yacc = r"""
%%{
#include <stdio.h>
+extern int yyparse();
+int yyerror(char *s);
+int yylex();
-main()
+int main()
{
- yyparse();
+ return yyparse();
}
-yyerror(s)
+int yyerror(s)
char *s;
{
fprintf(stderr, "%%s\n", s);
return 0;
}
-yylex()
+int yylex()
{
int c;