#include "mainwindow.h" #include #include #include #include #include int main(int argc, char *argv[]) { /* QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); */ ParseContext parseContext; auto schema = loadSchemaFromFile(&parseContext, "/home/bbr/Documents/personal/projects/modeler/schema.csl", std::cout); if(schema) { std::vector signatures; signatures.push_back(domain::FunctionSignature("divisible", std::vector{domain::Value::INT, domain::Value::INT})); signatures.push_back(domain::FunctionSignature("less_then", std::vector{domain::Value::INT, domain::Value::INT})); signatures.push_back(domain::FunctionSignature("greater_then", std::vector{domain::Value::INT, domain::Value::INT})); signatures.push_back(domain::FunctionSignature("contains_address", std::vector{domain::Value::ADDRESS_SPACE, domain::Value::INT})); signatures.push_back(domain::FunctionSignature("contains", std::vector{domain::Value::ADDRESS_SPACE, domain::Value::INT, domain::Value::INT})); signatures.push_back(domain::FunctionSignature("unique", std::vector{domain::Value::ADDRESS_SPACE, domain::Value::INT, domain::Value::INT})); domain::ComdelGenerator generator(signatures); auto library = generator.loadLibrary(*schema->library); for (auto& error : generator.getErrors()) { parseContext.formatError(error, std::cout, "ERROR: "); } if(library) { auto instance = generator.loadSchema(*schema, *library); for (auto& error : generator.getErrors()) { parseContext.formatError(error, std::cout, "ERROR: "); } } } }