Paul Cager has been working on various JavaCC and JJTree bugs lately. Just recently he fixed a rather annoying bug; in JavaCC 4.0, the OUTPUT_DIRECTORY option setting wasn't copied from the .jjt file into the .jj file. So you'd have a grammar like this:
And running JJTree on it would result in an error like this:
And if you did create the "foobar" directory and run JJTree again, the "foo.jj" file would be created in the working directory and wouldn't have the OUTPUT_DIRECTORY option. Booo. However, with Paul's changes, it now works fine:
And the OUTPUT_DIRECTORY option is preserved:
Good stuff! I think we're getting close to a 4.1 release, which will be nice since it'll have lots of improvements to the Java 1.5 code that JavaCC generates, and it'll be the first official release that's BSD licensed. Hopefully we can get in a few more bug fixes and then get this release out the door.
And, of course, here's a gratuitous plug for my JavaCC book!