Immediately terminate parsing in case of error.

This commit is contained in:
Stefano Sanfilippo 2014-11-23 20:46:35 +01:00
parent 95087c6e7e
commit 5e719dbadf

2
main.c
View File

@ -2,12 +2,14 @@
#include "Monicelli.tab.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
int lineNumber = 1;
void yyerror(const char *message) {
fprintf(stderr, "At line %d: %s\n", lineNumber, message);
exit(1);
}
void emit(const char *text, ...) {