|
@@ -17,7 +17,7 @@ EvalContext::parseFile(const std::string &filename)
|
|
|
{
|
|
|
file = filename;
|
|
|
scan_begin();
|
|
|
- isc::eval::EvalParser parser (*this);
|
|
|
+ isc::eval::EvalParser parser(*this);
|
|
|
parser.set_debug_level(trace_parsing);
|
|
|
int res = parser.parse();
|
|
|
scan_end();
|
|
@@ -27,6 +27,11 @@ EvalContext::parseFile(const std::string &filename)
|
|
|
int
|
|
|
EvalContext::parseString(const std::string& str)
|
|
|
{
|
|
|
+ /// @todo: Is there any way for the parser to read from a stream,
|
|
|
+ /// rather than a file? It would be better to use stringstream,
|
|
|
+ /// but it seems that the lexer operates on FILE* interface.
|
|
|
+
|
|
|
+ // Put the content into a file and then open that file for reading.
|
|
|
remove("/tmp/eval");
|
|
|
std::fstream f("/tmp/eval", std::ios::out);
|
|
|
|
|
@@ -40,9 +45,9 @@ EvalContext::parseString(const std::string& str)
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-EvalContext::error (const isc::eval::location& l, const std::string& m)
|
|
|
+EvalContext::error(const isc::eval::location& l, const std::string& m)
|
|
|
{
|
|
|
- std::cerr << l << ": " << m << std::endl;
|
|
|
+ std::cerr << l << ": " << m << std::endl;
|
|
|
}
|
|
|
|
|
|
void
|