[antlr-interest] Patch for HPIA64 aCC 5.57
Martin Probst
mail at martin-probst.com
Fri Feb 25 01:35:24 PST 2005
Hi,
we encountered a small bug on HPIA64 with the compiler version 5.57 - it
prevents line numbers to be correctly reported on RecognitionExceptions.
It's just a small change in RecognitionException.cpp. aCC somehow doesn't
get the operator+ overload for std::string and int correctly, you'll have
to call it explicitly.
I wouldn't opt to include this in the ANTLR distribution as it is clearly
a compiler bug but maybe people who are running into the same problem
might find it here.
Index: RecognitionException.cpp
===================================================================
--- RecognitionException.cpp (revision 2033)
+++ RecognitionException.cpp (working copy)
@@ -48,7 +48,8 @@
if ( fileName.length() == 0 )
fileLineColumnString = fileLineColumnString +
"line ";
- fileLineColumnString = fileLineColumnString + line;
+ fileLineColumnString = operator+(fileLineColumnString,line);
+ //fileLineColumnString = fileLineColumnString + "" + line;
if ( column != -1 )
fileLineColumnString = fileLineColumnString + ":"
+ column;
More information about the antlr-interest
mailing list