From fab6172749c4bb1572474234338ecc31b26494d1 Mon Sep 17 00:00:00 2001 From: Ivan Kochurkin Date: Fri, 17 Feb 2017 23:31:51 +0300 Subject: [PATCH] Added "action" to badWords set for Go runtime. Some spaced replaced with tabs. --- tool/src/org/antlr/v4/codegen/target/GoTarget.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tool/src/org/antlr/v4/codegen/target/GoTarget.java b/tool/src/org/antlr/v4/codegen/target/GoTarget.java index 491092dd5..7e71a576a 100644 --- a/tool/src/org/antlr/v4/codegen/target/GoTarget.java +++ b/tool/src/org/antlr/v4/codegen/target/GoTarget.java @@ -50,7 +50,7 @@ public class GoTarget extends Target { }; /** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */ - private final Set badWords = new HashSet(goKeywords.length + goPredeclaredIdentifiers.length + 2); + private final Set badWords = new HashSet(goKeywords.length + goPredeclaredIdentifiers.length + 3); private static final boolean DO_GOFMT = !Boolean.parseBoolean(System.getenv("ANTLR_GO_DISABLE_GOFMT")) && !Boolean.parseBoolean(System.getProperty("antlr.go.disable-gofmt")); @@ -59,12 +59,12 @@ public class GoTarget extends Target { super(gen, "Go"); } - @Override - public String getVersion() { + @Override + public String getVersion() { return "4.6.1"; } - public Set getBadWords() { + public Set getBadWords() { if (badWords.isEmpty()) { addBadWords(); } @@ -77,6 +77,7 @@ public class GoTarget extends Target { badWords.addAll(Arrays.asList(goPredeclaredIdentifiers)); badWords.add("rule"); badWords.add("parserRule"); + badWords.add("action"); } @Override