Commit 0211dba6 authored by Ocan Sankur's avatar Ocan Sankur

Fixed parser bug, atomic guard in query and comments now allowed

parent f8441922
...@@ -14,6 +14,7 @@ extern "C" { ...@@ -14,6 +14,7 @@ extern "C" {
#include <cassert> #include <cassert>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <streambuf>
#include <utap/utap.h> #include <utap/utap.h>
...@@ -353,6 +354,7 @@ make_query(const expression_t &query) ...@@ -353,6 +354,7 @@ make_query(const expression_t &query)
default: default:
result = make_atomic_guard(Val_int(-1), query); result = make_atomic_guard(Val_int(-1), query);
result = caml_callback(*caml_named_value("cb_qb_make_atomic"), result);
break; break;
} }
...@@ -891,7 +893,8 @@ xta_from_xmlfile(value filename, value qfilename, value enable_cora) ...@@ -891,7 +893,8 @@ xta_from_xmlfile(value filename, value qfilename, value enable_cora)
{ {
// look into the .q file // look into the .q file
std::ifstream inqfile(String_val(qfilename)); std::ifstream inqfile(String_val(qfilename));
std::getline(inqfile, squery); squery = std::string((std::istreambuf_iterator<char>(inqfile)),
std::istreambuf_iterator<char>());
} }
assert(squery != ""); assert(squery != "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment