#include #include #include #include #include #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QFile in("D:\\Projects\\Cpp\\WsNovelParser\\CoreTest\\syntax_example.txt"); in.open(QIODevice::ReadOnly|QIODevice::Text); QTextStream tt(&in); lib_words::WordReader reader; auto vwords = reader.wordsFrom(tt, "D:\\Projects\\Cpp\\WsNovelParser\\CoreTest\\syntax_example.txt"); auto words = vwords; while (words) { qDebug() << words->content(); words = words->nextWord(); } ast_gen::SyntaxParser parser(example_novel::NovalSyntax::getSyntaxTree()); auto rst = parser.parse(vwords); auto prag_root = std::make_shared< ast_basic::ExprProgram>("HelloWorld!"); auto structx = parser.getAst(rst.first(), prag_root); qDebug() << "finished"; return a.exec(); }