Obsolete Settings from Legacy JavaCC (and JJTree)

As a result of quite a bit of forward evolution, some of the settings from legacy JavaCC (and JJTree) are obsolete in JavaCC21. We don't anticipate that any of them will be missed.

   INJECT BaseNode : extends SomeClass

In general, code injection can be used to specify that any generated class should extend a given class or implement whatever interface(s). There is no need for a plethora of configuration settings for this.

The following configuration option is still supported but is deprecated in JavaCC21:

The use of both PARSER_BEGIN….PARSER_END and TOKEN_MGR_DECLS is deprecated in favor of the new code injection feature. Injecting code into the generated parser and lexer is simply a specific case of code injection, so there is no need for these separate constructs. However, they will continue to work for the foreseeable future.

To specify the parser and lexer class names, you may use the PARSER_CLASS and LEXER_CLASS configuration options. However, it is not mandatory, since a Foo.javacc file will automatically generate a parser class called FooParser and a lexer class called FooLexer. There will rarely be any practical value in overriding that.

There are a host of settings that were added after the FreeCC fork, which was in mid-2008. See ancient history for more information on all this. No settings added to legacy JavaCC after about 2008 are currently supported in JavaCC 21. Most of them are of very marginal value. Moreover, it is safe to say that nobody uses them because they are not documented anywhere that I can find! Just for example, the GRAMMAR_ENCODING option was added at some point after 2008 (I don't know when exactly) to specify what encoding your grammar file is in. I am certain that nobody uses this. (Or just about nobody surely.) Everybody stores their grammar files in the system default encoding which is UTF-8 on any remotely modern system that any serious developer would be working on. Adding these kinds of options that nobody uses is actually very typical of a nothingburger project. (Adding all these options and not even documenting them is nothingburger-ism squared!)

See new settings in JavaCC 21 for information on settings introduced in JavaCC21 that were not present in legacy JavaCC.