[antlr-interest] Bug in antlr-3.0.1 DOTTreeGenerator.getNodeST()

Pranab Dhar pdhar at tibco.com
Sat Nov 3 09:17:43 PDT 2007


Hi,

     In the 3.0.1 release of antlr, the DOTTreeGenerator  escapes "
with \  but   not    \  character like \\ . As a result token string
that includes \"  is incorrectly escaped to \\" instead of \\\"

 

The current code shows this

 

if (text!=null) text = text.replaceAll("\"", "\\\\\"");  

 

and this should be

 

if (text!=null) text = text.replaceAll("(\\\\|\")","\\\\$1
<file:///\\\|\%22)%22,%22\$1> ");

 

Regards,

 

Pranab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071103/4cae29cb/attachment.html 


More information about the antlr-interest mailing list