This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
pacciani/main.c
2014-11-23 19:04:25 +01:00

32 lines
498 B
C

#include "Type.h"
#include "Monicelli.tab.h"
#include <stdio.h>
#include <stdarg.h>
int lineNumber = 1;
void yyerror(const char *message) {
fprintf(stderr, "At line %d: %s\n", lineNumber, message);
}
void emit(const char *text, ...) {
va_list args;
va_start(args, text);
const char *t;
for (t = text; t != NULL; t = va_arg(args, const char *)) {
printf("%s", t);
}
va_end(args);
}
int main() {
#if YYDEBUG
yydebug = 1;
#endif
return yyparse();
}