[notes]
We cannot collect predicates that are dependent on local context if
we are doing a global follow. They appear as if they were not there at all.

[type]
Parser

[grammar]
grammar T;
@parser::members {
<Declare_pred()>
}
s : a[99] ;
a[int i] : e {<ValEquals("$i","99"):Invoke_pred()>}? {<writeln("\"parse\"")>} '!' ;
b[int i] : e {<ValEquals("$i","99"):Invoke_pred()>}? ID ;
e : ID | ; // non-LL(1) so we use ATN
ID : 'a'..'z'+ ;
INT : '0'..'9'+;
WS : (' '|'\n') -> skip ;

[start]
s

[input]
a!

[output]
eval=true
parse

