diff --git a/src/parser/PrismParser.cpp b/src/parser/PrismParser.cpp index 19eed26ae..e893dd28c 100644 --- a/src/parser/PrismParser.cpp +++ b/src/parser/PrismParser.cpp @@ -449,9 +449,11 @@ std::shared_ptr PrismParser::parse(std::istream& inputStream // Construct the error message including a caret display of the position in the // erroneous line. std::stringstream msg; + std::string line = e.first.get_currentline(); + while (line.find('\t') != std::string::npos) line.replace(line.find('\t'),1," "); msg << pos.file << ", line " << pos.line << ", column " << pos.column << ": parse error: expected " << e.what_ << std::endl << "\t" - << e.first.get_currentline() << std::endl << "\t"; + << line << std::endl << "\t"; int i = 0; for (i = 0; i < pos.column; ++i) { msg << "-";