JavaCC, Java 1.5, and StringBuilder

20 Aug 2007

I've just checked in a small patch to JavaCC - now it defaults to emitting Java 1.5 source code when generating a parser. You'll still be able to generate code for Java 1.4 (and earlier) via the JDK_VERSION option, but the default will be 1.5.

Along the same lines, I checked in another small patch which causes JavaCC to generate tokenizers that use StringBuilder rather than StringBuffer to accumulate token images. That closes this issue, which I opened last May - the wheels of JavaCC grind slowly but exceedingly fine :-)

Anyhow, I'm glad that we're keeping JavaCC current with Java development; the underlying principles of JavaCC are as useful today as they were when Dr. Sankar and Sreenivasa wrote JavaCC 10 years ago. Just needs an occasional tweak to bring things up to date.

For more on JavaCC, check out my JavaCC book!