|
|
Re: How can i disable backtracking ? [message #1801158 is a reply to message #1801153] |
Mon, 14 January 2019 17:17   |
kimi raikonnan Messages: 145 Registered: June 2015 |
Senior Member |
|
|
by debugging in InternalDSLParser.java i found that state.backtracking = 2 not zero
so i think there is something i am missing in disabling the backtracking
I know that zero means no backtracking but the value is not equal to zero!!
public final EObject entryRuleprimary() throws RecognitionException {
EObject current = null;
int entryRuleprimary_StartIndex = input.index();
EObject iv_ruleprimary = null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 409) ) { return current; }
[Updated on: Mon, 14 January 2019 17:18] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: How can i disable backtracking ? [message #1801224 is a reply to message #1801177] |
Tue, 15 January 2019 15:46   |
kimi raikonnan Messages: 145 Registered: June 2015 |
Senior Member |
|
|
I found the modification in state.baacktracking happens in functions with this name
public final boolean synpred27_InternalDSLParser() {
state.backtracking++;
int start = input.mark();
try {
synpred27_InternalDSLParser_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
also it happens in many functions start with the same prefix "synpred".
Do you know what does it means?
[Updated on: Tue, 15 January 2019 15:50] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02436 seconds