From d6cd3b6dc93c4ab587bddc6885831566c3a502ed Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 19 Jul 2012 11:22:09 +0200 Subject: [PATCH] Don't die on regular EOF --- parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser.c b/parser.c index 896c729..80347df 100644 --- a/parser.c +++ b/parser.c @@ -146,6 +146,8 @@ bool parser_compile(const char *filename) while (parser->tok != TOKEN_EOF && parser->tok < TOKEN_ERROR) { if (!parser_do(parser)) { + if (parser->tok == TOKEN_EOF) + break; printf("parse error\n"); lex_close(parser->lex); mem_d(parser); -- 2.39.2