I am currently in the proccess of writing a rather large Grammar. Currently I am getting rather poor performance results because of a ambiguity.
In theory the ambiguity is easly solved by a predicate, but the predicate does not seem to be evaluated until after the decession is done.
Is this the expected behaviour or is there any dokumentation on when predicates are evaluated?
To test this I took affected rule and gave it a {false}? predicate, the performance and the SLL_MaxLook where unaffected by this change, even thought the predicate never evaluates to true.
Removing the rule (by commenting it out) did lead to the expected performance improvement.
statement
: ifStatement
| {false}? functionStatement
| ...
Is there anyway I can get my desired performance improvement through a predicate? What would a possible alternative be?
Greetings,
Basti