example:
rule: xs=something* ( ?{ xs.length == 0 } simple | complex) ;
will always do complex
(caveat, the predicate needs to be written like such: return ((ArrayList)xs).size() == 0;)
_t=ERROR; do{ //or
{ int _p108=_pos; _t=ERROR; do { //and
if (!__pred107(ps,xs)) _t=ERROR;
since _t is set to ERROR at start of alternative list, and a predicate does not reset _t only set it to error if needed, this will fail
workaround: place an empty before the first predicate:
rule: xs=something* ( empty ?{ xs.length == 0 } simple | complex) ;