From 136e8a6286d69a96a23f6e65687754cc129d91c5 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Tue, 20 Jan 2015 17:16:07 -0800 Subject: [PATCH] tweak --- .../v4/tool/templates/codegen/Java/Java.stg | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) 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 498cebd94..c5a7fd310 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 @@ -266,7 +266,7 @@ public class extends { public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { : +case : return _sempred(()_localctx, predIndex);}; separator="\n"> } return true; @@ -324,9 +324,9 @@ dumpActions(recog, argFuncs, actionFuncs, sempredFuncs) ::= << @Override public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { switch (ruleIndex) { - : - _action(()_localctx, actionIndex); + : + _action(()_localctx, actionIndex); break;}; separator="\n"> } } @@ -337,7 +337,7 @@ case : public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { : +case : return _sempred(()_localctx, predIndex);}; separator="\n"> } return true; @@ -360,8 +360,8 @@ RuleActionFunction(r, actions) ::= << private void _action( _localctx, int actionIndex) { switch (actionIndex) { : - +case : + break;}; separator="\n"> } } @@ -374,7 +374,7 @@ RuleSempredFunction(r, actions) ::= << private boolean _sempred( _localctx, int predIndex) { switch (predIndex) { : +case : return ;}; separator="\n"> } return true; @@ -628,12 +628,12 @@ cases(ttypes) ::= << >> InvokeRule(r, argExprsChunks) ::= << -setState(); +setState(); = }>(,); >> MatchToken(m) ::= << -setState(); +setState(); = }>match(); >> @@ -647,7 +647,8 @@ setState(); if ( \<= 0 || !() ) { = (Token)}>_errHandler.recoverInline(this); -} else { +} +else { consume(); } >>