Added "action" to badWords set for Go runtime.

Some spaced replaced with tabs.
This commit is contained in:
Ivan Kochurkin 2017-02-17 23:31:51 +03:00
parent 628aa8ff02
commit fab6172749
1 changed files with 5 additions and 4 deletions

View File

@ -50,7 +50,7 @@ public class GoTarget extends Target {
}; };
/** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */ /** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */
private final Set<String> badWords = new HashSet<String>(goKeywords.length + goPredeclaredIdentifiers.length + 2); private final Set<String> badWords = new HashSet<String>(goKeywords.length + goPredeclaredIdentifiers.length + 3);
private static final boolean DO_GOFMT = !Boolean.parseBoolean(System.getenv("ANTLR_GO_DISABLE_GOFMT")) private static final boolean DO_GOFMT = !Boolean.parseBoolean(System.getenv("ANTLR_GO_DISABLE_GOFMT"))
&& !Boolean.parseBoolean(System.getProperty("antlr.go.disable-gofmt")); && !Boolean.parseBoolean(System.getProperty("antlr.go.disable-gofmt"));
@ -77,6 +77,7 @@ public class GoTarget extends Target {
badWords.addAll(Arrays.asList(goPredeclaredIdentifiers)); badWords.addAll(Arrays.asList(goPredeclaredIdentifiers));
badWords.add("rule"); badWords.add("rule");
badWords.add("parserRule"); badWords.add("parserRule");
badWords.add("action");
} }
@Override @Override