There is now just a single type of semantic predicates, which looks like this:
{ <<boolean-epxression>> }?
And the input
attribute from the abstract class Parser
(which your generated parser extends from) now has an underscore in front of it.
So, in your case, the following ANTLR v3 syntax:
{input.LT(1).getType() == RBRACE}? =>
would look like this in ANTLR v4:
{_input.LT(1).getType() == RBRACE}?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…