meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
deprecated_settings [2020/05/10 12:50] – revusky | deprecated_settings [2021/11/11 17:17] – revusky | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Obsolete Settings from Legacy JavaCC ====== | + | ====== Obsolete Settings from Legacy JavaCC |
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. | 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. | ||
Line 5: | Line 5: | ||
* **STATIC**: JavaCC21 does not support static parsers. Or, in other words, this is always set to false, (and thus, ignored.) | * **STATIC**: JavaCC21 does not support static parsers. Or, in other words, this is always set to false, (and thus, ignored.) | ||
+ | * **LOOKAHEAD** Legacy JavaCC allowed you to specify a //default// numerical lookahead other than 1 token. In JavaCC21, this setting is gone and is always effectively equal to 1. Of course, you can still specify numerical lookahead other than 1 at [[choice points]] as needed. | ||
+ | * **CHOICE_AMBIGUITY_CHECK** This was a parameter in legacy JavaCC that allowed you to specify how far to scan ahead when checking for " | ||
+ | * **OTHER_AMBIGUITY_CHECK** The same comments basically apply here as to **CHOICE_AMBIGUITY_CHECK**. The code for these so-called " | ||
+ | * **FORCE_LA_CHECK** Frankly, we are unsure what this setting ever did. At least in this case, ignorance is bliss. So the setting is gone. Besides, the fact remains that lookahead was always fundamentally broken in legacy JavaCC anyway, so all of these sophisticated checks were surely all for nothing anyway! | ||
* **UNICODE_INPUT**: | * **UNICODE_INPUT**: | ||
- | * **USER_CHAR_STREAM**: | + | * **USER_CHAR_STREAM**: |
- | * **BUILD_LEXER**: | + | * **BUILD_LEXER**: |
- | * **BUILD_PARSER**: | + | * **BUILD_PARSER**: |
* **KEEP_LINE_COL**: | * **KEEP_LINE_COL**: | ||
- | * **ERROR_REPORTING**: | + | * **ERROR_REPORTING**: |
* **SANITY_CHECK**: | * **SANITY_CHECK**: | ||
- | * **CACHE_TOKENS**: | + | * **CACHE_TOKENS**: |
+ | * **TOKEN_FACTORY** : This setting has been removed (as of 11/11/2021) since it is really not very useful now that we have INJECT. I doubt it was really very widely used (if at all). | ||
* **TRACK_TOKENS** : There is no real reason for this setting to exist any more, since, by default, Tokens are added to the AST and they have their line/column information. In fact, all Node objects have line/column information. | * **TRACK_TOKENS** : There is no real reason for this setting to exist any more, since, by default, Tokens are added to the AST and they have their line/column information. In fact, all Node objects have line/column information. | ||
- | * **COMMON_TOKEN_ACTION** : This feature is still supported but the configuration setting is no longer necessary, since JavaCC21 deduces it from the presence (or absence) of the appropriately named method in your generated lexer class. | + | |
- | * **NODE_SCOPE_HOOK** : As with COMMON_TOKEN_OPTION, | + | |
- | * **NODE_EXTENDS** : Since JavaCC21 has the [[INCLUDE]] statement, there is no need for this configuration option to exist. If you want to specify that your BaseNode class extends some specific class, simply use [[Code Injection in JavaCC 21|code injection]] to specify this. | + | * **NODE_SCOPE_HOOK** : As with the '' |
+ | * **NODE_EXTENDS** : Since JavaCC21 has '' | ||
- | <html>< | + | <code> |
- | | + | |
- | </pre></ | + | </code> |
- | The following | + | 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 |
- | * **OUTPUT_DIRECTORY**: | + | The following configuration option is still supported but is deprecated in JavaCC21: |
- | * **NODE_PREFIX**: Use of this is not encouraged in JavaCC21. By default, it is simply the empty string. (In JavaCC (or JJTree to be precise) it was " | + | |
- | The following option has been renamed for consistency, but the older name is still supported: | + | * **NODE_PREFIX**: |
- | USER_TOKEN_MANAGER | + | The use of both '' |
- | The use of both '' | + | To specify the parser and lexer class names, you may use the '' |
+ | |||
+ | There are a host of settings that were added // | ||
- | To specify the parser class name, you may use the PARSER_CLASS configuration option. However, it is not mandatory, since a '' | ||
See [[new settings in JavaCC 21]] for information on settings introduced in JavaCC21 that were not present in legacy JavaCC. | See [[new settings in JavaCC 21]] for information on settings introduced in JavaCC21 that were not present in legacy JavaCC. | ||