From 5e719dbadf33f7dae28cef573fcaa2342e3776a6 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 23 Nov 2014 20:46:35 +0100 Subject: [PATCH] Immediately terminate parsing in case of error. --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 13b0b5a..aaab159 100644 --- a/main.c +++ b/main.c @@ -2,12 +2,14 @@ #include "Monicelli.tab.h" #include +#include #include int lineNumber = 1; void yyerror(const char *message) { fprintf(stderr, "At line %d: %s\n", lineNumber, message); + exit(1); } void emit(const char *text, ...) {