JavaCC/JJTree file generation bug fix
For a long time there's been an annoying bug with JJTree and Windows. JJTree generates source files with the directory path in a comment header, and if one of the subdirectoy names starts with a "u" it ends up being output as a Unicode escape. This causes problems about ten seconds down the road when you try to compile the code.
For example, suppose you're generating the JJTree files into my\utils\dir. You'll get a comment header like this in your Constants file:
/* Generated By:JJTree: Do not edit this line. my\utils\dir\SomeParserTreeConstants.java */
A \u begins a Java Unicode escape sequence, and \utils is, of course, an invalid escape sequence. Thus the compiler chokes on this invalid sequence when it tries to lex this file.
Well, thanks to Paul Cager, this bug is fixed in CVS. He actually just avoided the problem by just printing the generated file name in the comment header rather than including the whole directory path. I've uploaded an updated JavaCC 4.0 jar file here if you want to give it a try. Enjoy, and thanks to Paul for cleaning this up!
Using JavaCC? Check out my JavaCC book!
Tom, something I'd love to see make it's way into rubyforge: A clear and findable display for gem dependancies. I spend a lot of time stuck working behind the firewall, and have to download and transfer gems on a disk. It's a real pain to discover after downloading and transfering the file that there are unfulfilled dependancies.
Posted by: Chris Flipse | November 08, 2007 at 09:53 AM
Chris - Hm, yeah, that would be nice... that kind of rings a bell somehow. Have you posted about this to ruby-talk? Maybe someone's got something like that in the works...
Posted by: tomcopeland | November 21, 2007 at 11:29 AM