2019-06-04 20:45:06 -07:00
|
|
|
#include "ast.hpp"
|
|
|
|
#include "pattern.hpp"
|
|
|
|
#include "parser.hpp"
|
2019-06-11 17:24:28 -07:00
|
|
|
#include "gmachine.hpp"
|
2019-06-12 01:38:27 -07:00
|
|
|
#include "llvm.hpp"
|
2019-06-12 08:43:06 -07:00
|
|
|
#include <sstream>
|
2019-06-04 20:45:06 -07:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
try {
|
2019-06-12 08:43:06 -07:00
|
|
|
std::ostringstream oss;
|
|
|
|
oss << std::cin.rdbuf();
|
|
|
|
std::string input = oss.str();
|
2019-06-12 01:38:27 -07:00
|
|
|
|
2019-06-12 08:43:06 -07:00
|
|
|
lily::program_ptr prog = lily::parse(input);
|
2019-06-12 01:38:27 -07:00
|
|
|
prog->gen_llvm();
|
2019-06-04 20:45:06 -07:00
|
|
|
} catch(lily::error& e) {
|
|
|
|
std::cout << e.message << std::endl;
|
|
|
|
}
|
|
|
|
}
|