diff --git a/preprocessor/ParsingDriver.cc b/preprocessor/ParsingDriver.cc
index a5f345634a5a2930ae5c724cb6714ddc6d8db230..39c240238114cfc6244aebacc9da60321c3cefe9 100644
--- a/preprocessor/ParsingDriver.cc
+++ b/preprocessor/ParsingDriver.cc
@@ -105,7 +105,16 @@ ParsingDriver::parse(istream &in, bool debug)
 void
 ParsingDriver::error(const Dynare::parser::location_type &l, const string &m)
 {
-  cerr << "ERROR: " << l << ": " << m << endl;
+  cerr << "ERROR: " << *l.begin.filename << ": line " << l.begin.line;
+  if (l.begin.line == l.end.line)
+    if (l.begin.column == l.end.column - 1)
+      cerr << ", col " << l.begin.column;
+    else
+      cerr << ", cols " << l.begin.column << "-" << l.end.column - 1;
+  else
+    cerr << ", col " << l.begin.column << " -"
+         << " line " << l.end.line << ", col " << l.end.column - 1;
+  cerr << ": " << m << endl;
   exit(EXIT_FAILURE);
 }