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.cpp

37 lines
586 B
C++
Raw Normal View History

#include "Monicelli.tab.h"
#include <iostream>
#include <cstdlib>
using namespace monicelli;
int lineNumber = 1;
Program *program;
void monicelli_error(const char *message) {
std::cerr << "At line " << lineNumber << ": " << message << std::endl;
std::exit(1);
}
void monicelli_meta(const char *text) {
while (text != '\0' && *text == ' ') {
text += 1;
}
std::cerr << "META: " << text << std::endl;
}
int main() {
#if YYDEBUG
yydebug = 1;
#endif
program = new Program();
monicelli_parse();
program->emit(std::cout);
return 0;
}