meta data for this page
  •  

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
new_settings_in_javacc_21 [2021/11/24 01:51] revuskynew_settings_in_javacc_21 [2021/12/20 15:01] revusky
Line 9: Line 9:
   * **SMART_NODE_CREATION** This is the default behavior, so you would have to explicitly turn it off. It means that if no JJTree-style tree-building annotation is used, then a new Node will be created if there are more than one Nodes on the stack. So, a production like '' A (B)* '' will create a new Node if there are one or more B's after the A. If there is only an ''A'' then the production will just leave it on the stack. It is our belief that this is the behavior that most people would want most of the time.   * **SMART_NODE_CREATION** This is the default behavior, so you would have to explicitly turn it off. It means that if no JJTree-style tree-building annotation is used, then a new Node will be created if there are more than one Nodes on the stack. So, a production like '' A (B)* '' will create a new Node if there are one or more B's after the A. If there is only an ''A'' then the production will just leave it on the stack. It is our belief that this is the behavior that most people would want most of the time.
   * **SPECIAL_TOKENS_ARE_NODES** This sets whether to add so-called "special tokens" to the AST. By default, it is set to false. (Note that this option and TOKENS_ARE_NODES are meaningless if TREE_BUILDING_ENABLED is set to false.)   * **SPECIAL_TOKENS_ARE_NODES** This sets whether to add so-called "special tokens" to the AST. By default, it is set to false. (Note that this option and TOKENS_ARE_NODES are meaningless if TREE_BUILDING_ENABLED is set to false.)
-  * **TABS_TO_SPACES** This is an integer (typically from 1 to 8, in practice) that defines how many spaces a tab stop is. This is off by default, but if you use this setting, all TAB characters (\t) are converted to spaces when the file is read in. Note that, if you do not have this turned on, all reported error locations simply treat a tab character as one horizontal offset. If you want JavaCC to report errors as if a TAB stop is 4 spaces, say, you need to set TAB_SPACES=4 in your settings. +  * **TABS_TO_SPACES** This is an integer (typically from 1 to 8, in practice) that defines how many spaces a tab stop is. This is now set to 8 by default. (Until very recentlythe default was that the option was off.) This means that all TAB characters (\t) are converted to spaces when the file is read in. Note that, if you turn this off, all reported error locations simply treat a tab character as one horizontal offset. If you want JavaCC to report errors as if a TAB stop is 4 spaces, say, you need to set TAB_SPACES=4 in your settings. 
   * **TOKENS_ARE_NODES** This sets whether we add Tokens as terminal nodes to the AST. By default, it is true.   * **TOKENS_ARE_NODES** This sets whether we add Tokens as terminal nodes to the AST. By default, it is true.
  
 See [[deprecated settings]] for a list of legacy JavaCC options that no longer exist in JavaCC 21. See [[deprecated settings]] for a list of legacy JavaCC options that no longer exist in JavaCC 21.