forked from jasder/antlr
make the switch an ENV not property.
This commit is contained in:
parent
e1a1867149
commit
933cc6e63c
|
@ -293,7 +293,8 @@ public class ParserATNSimulator extends ATNSimulator {
|
||||||
public static final boolean dfa_debug = false;
|
public static final boolean dfa_debug = false;
|
||||||
public static final boolean retry_debug = false;
|
public static final boolean retry_debug = false;
|
||||||
|
|
||||||
public static final boolean TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT = Boolean.parseBoolean(System.getProperty("TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT"));
|
/** Just in case this optimization is bad, add an ENV variable to turn it off */
|
||||||
|
public static final boolean TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT = Boolean.parseBoolean(System.getenv("TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT"));
|
||||||
|
|
||||||
protected final Parser parser;
|
protected final Parser parser;
|
||||||
|
|
||||||
|
@ -1694,6 +1695,8 @@ public class ParserATNSimulator extends ATNSimulator {
|
||||||
* making a decision in stat seeing through expr. It is only when
|
* making a decision in stat seeing through expr. It is only when
|
||||||
* parsing rule expr that we must use the precedence to get the
|
* parsing rule expr that we must use the precedence to get the
|
||||||
* right interpretation and, hence, parse tree.
|
* right interpretation and, hence, parse tree.
|
||||||
|
*
|
||||||
|
* @since 4.6
|
||||||
*/
|
*/
|
||||||
protected boolean canDropLoopEntryEdgeInLeftRecursiveRule(ATNConfig config) {
|
protected boolean canDropLoopEntryEdgeInLeftRecursiveRule(ATNConfig config) {
|
||||||
if ( TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT ) return false;
|
if ( TURN_OFF_LR_LOOP_ENTRY_BRANCH_OPT ) return false;
|
||||||
|
|
Loading…
Reference in New Issue