diff --git a/src/test/datalog_parser.cpp b/src/test/datalog_parser.cpp index a927be29a..800f21717 100644 --- a/src/test/datalog_parser.cpp +++ b/src/test/datalog_parser.cpp @@ -23,22 +23,14 @@ static void dparse_string(char const* str) { context ctx(m, re, params); parser* p = parser::create(ctx,m); - bool res=p->parse_string(str); + bool res = p->parse_string(str); - if (!res) { + if (res) { + std::cout << "Parsed\n"<get_num_rules(); - for (unsigned j = 0; j < num_rules; ++j) { - rule* r = p->get_rules()[j]; - std::cout << mk_pp(r->head(), m) << "\n"; - for (unsigned i = 0; i < r->size(); ++i) { - std::cout << "body: " << mk_pp((*r)[i], m) << "\n"; - } - } -#endif dealloc(p); } @@ -54,16 +46,6 @@ static void dparse_file(char const* file) { if (!p->parse_file(file)) { std::cout << "Failed to parse file\n"; } -#if 0 - unsigned num_rules = p->get_num_rules(); - for (unsigned j = 0; j < num_rules; ++j) { - rule* r = p->get_rules()[j]; - std::cout << mk_pp(r->head(), m) << "\n"; - for (unsigned i = 0; i < r->size(); ++i) { - std::cout << "body: " << mk_pp((*r)[i], m) << "\n"; - } - } -#endif dealloc(p); }