X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Flisp%2Fparser.cpp;h=4f7697c42b2c47207fa31d52d43f626340b482d0;hb=5667d7e94d85f968ab914bc457edd689fc907253;hp=c59535f9d9e6438053f2fad0475dd73f4f2dde19;hpb=99cf62c2d44b4555e9761f1c8f1b10cf880c33fb;p=supertux.git diff --git a/src/lisp/parser.cpp b/src/lisp/parser.cpp index c59535f9d..4f7697c42 100644 --- a/src/lisp/parser.cpp +++ b/src/lisp/parser.cpp @@ -66,9 +66,8 @@ static std::string dirname(const std::string& filename) const Lisp* Parser::parse(const std::string& filename) { - Unison::VFS::istream in(filename); - //IFileStreambuf ins(filename); - //std::istream in(&ins); + IFileStreambuf ins(filename); + std::istream in(&ins); if(!in.good()) { std::stringstream msg; @@ -108,7 +107,7 @@ Parser::parse_error(const char* msg) const { std::stringstream emsg; emsg << "Parse Error at '" << filename << "' line " << lexer->getLineNumber() - << ": " << msg; + << ": " << msg; throw std::runtime_error(emsg.str()); } @@ -118,7 +117,7 @@ Parser::read() Lisp* result; switch(token) { case Lexer::TOKEN_EOF: { - parse_error("Unexpected EOF."); + parse_error("Unexpected EOF."); } case Lexer::TOKEN_CLOSE_PAREN: { parse_error("Unexpected ')'."); @@ -138,7 +137,7 @@ Parser::read() // evaluate translation function (_ str) in place here token = lexer->getNextToken(); if(token != Lexer::TOKEN_STRING) - parse_error("Expected string after '(_'"); + parse_error("Expected string after '(_'"); result = new(obst) Lisp(Lisp::TYPE_STRING); if(dictionary) { @@ -152,7 +151,7 @@ Parser::read() } token = lexer->getNextToken(); if(token != Lexer::TOKEN_CLOSE_PAREN) - parse_error("Expected ')' after '(_ string'"); + parse_error("Expected ')' after '(_ string'"); break; }