diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg index 34c289349..120dcdd23 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg @@ -37,25 +37,17 @@ public class { RuleFunction(f,code,decls,context) ::= << - - }>public final void () { + }>public final void (, }>BitSet _follow) { +.push(new ); !> _ctx.push(new (}; separator=",">)); - _(null); - return _ctx.pop(); - - _(null); -} - - - }>public final void _(BitSet _follow) { -.push(new ); !> try { } finally { + return _ctx.pop(); } } >> @@ -148,9 +140,7 @@ cases(ttypes) ::= << >> InvokeRule(r) ::= << -_ctx.push(new ()); - = (); -_ctx.pop(); + = (, }>); >> MatchToken(m) ::= <<