User Tools

Site Tools


new_settings_in_javacc_21

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
new_settings_in_javacc_21 [2021/02/09 11:17]
revusky
new_settings_in_javacc_21 [2021/02/09 11:20] (current)
revusky
Line 2: Line 2:
  
   * **BASE_SRC_DIR** This supersedes the older OUTPUT_DIRECTORY setting. Files are generated //relative// to the BASE_SRC_DIR, i.e. taking into account the package naming. If this is unset, BASE_SRC_DIR is assumed to be the directory where the grammar is.   * **BASE_SRC_DIR** This supersedes the older OUTPUT_DIRECTORY setting. Files are generated //relative// to the BASE_SRC_DIR, i.e. taking into account the package naming. If this is unset, BASE_SRC_DIR is assumed to be the directory where the grammar is.
-  * **ENSURE_FINAL_EOL** With this setting turned on (it is off by default) the generated parser makes sure +  * **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.
-that the input ends with a newline character. Some grammars are actually quite hard to write if you can'be  +
-sure that every line (including the last one) terminates 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://javacc.com/2020/05/05/gigabyte-is-the-new-megabyte/|The Gigabyte is the new Megabyte]] for more information on the reasoning behind all this. Note that the experimental fault-tolerant parsing features only work with HUGE_FILE_SUPPORT off. Also, having TREE_BUILDING_ENABLED set to true (which is the default) means that HUGE_FILE_SUPPORT is automatically turned off.   * **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://javacc.com/2020/05/05/gigabyte-is-the-new-megabyte/|The Gigabyte is the new Megabyte]] for more information on the reasoning behind all this. Note that the experimental fault-tolerant parsing features only work with HUGE_FILE_SUPPORT off. Also, having TREE_BUILDING_ENABLED set to true (which is the default) means that HUGE_FILE_SUPPORT is automatically turned off.
new_settings_in_javacc_21.txt · Last modified: 2021/02/09 11:20 by revusky