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 | ||
new_settings_in_javacc_21 [2020/09/27 00:20] – revusky | new_settings_in_javacc_21 [2021/02/09 11:20] – revusky | ||
---|---|---|---|
Line 2: | Line 2: | ||
* **BASE_SRC_DIR** This supersedes the older OUTPUT_DIRECTORY setting. Files are generated // | * **BASE_SRC_DIR** This supersedes the older OUTPUT_DIRECTORY setting. Files are generated // | ||
+ | * **ENSURE_FINAL_EOL** With this setting turned on (it is off by default) the generated parser ensures that the input file ends with a newline character. (It tacks one on if it is not present.) This is a nitpicking detail but it is surprisingly difficult to write certain grammars (ones that are very line-oriented) if you cannot be sure that every line (including the last one!) ends with a newline. | ||
* **FAULT_TOLERANT** This turns on the experimental support for building a [[fault tolerant]] parser. It is off by default. | * **FAULT_TOLERANT** This turns on the experimental support for building a [[fault tolerant]] parser. It is off by default. | ||
- | * **HUGE_FILE_SUPPORT** Since we believe that the normal usage of the tool is simply to build a tree, it makes little sense to have any qualms about reading in the entire input into memory. So this is the default. This option allows you to turn on the legacy behavior of only maintaining a (fairly small) buffer in memory of the input file. See [[https:// | + | * **HUGE_FILE_SUPPORT** Since we believe that the normal usage of the tool is simply to build a tree, it makes little sense to have any qualms about reading in the entire input into memory. So this is the default. This option allows you to turn on the legacy behavior of only maintaining a (fairly small) buffer in memory of the input file. See [[https:// |
* **LEGACY_API** If you turn on this setting, the tool generates code that is more compatible with legacy JavaCC. One example is that JavaCC 21 removes publicly visible fields like Token.kind and Token.image and replaces them with getter/ | * **LEGACY_API** If you turn on this setting, the tool generates code that is more compatible with legacy JavaCC. One example is that JavaCC 21 removes publicly visible fields like Token.kind and Token.image and replaces them with getter/ | ||
* **PRESERVE_LINE_ENDINGS** This is true by default (though this could change in the future based on user feedback. If you turn this setting off, all Windows/DOS style line endings (\r\n) are converted to UNIX/MacOS style (\n) internally when the file is read in. Note, by the way, that one advantage of this and the TABS_TO_SPACES option is that if you convert tabs to spaces and line endings to \n then your grammar' | * **PRESERVE_LINE_ENDINGS** This is true by default (though this could change in the future based on user feedback. If you turn this setting off, all Windows/DOS style line endings (\r\n) are converted to UNIX/MacOS style (\n) internally when the file is read in. Note, by the way, that one advantage of this and the TABS_TO_SPACES option is that if you convert tabs to spaces and line endings to \n then your grammar' |