diff --git a/tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java b/tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java index d5a73b74c..8ef08d401 100644 --- a/tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java +++ b/tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java @@ -70,8 +70,8 @@ import java.util.*; * TODO: 1 action per lex rule */ public class BasicSemanticChecks extends GrammarTreeVisitor { - public static final Set legalLexerOptions = - new HashSet() { + public static final Set legalLexerOptions = + new HashSet() { { add("language"); add("tokenVocab"); add("TokenLabelType"); @@ -83,8 +83,8 @@ public class BasicSemanticChecks extends GrammarTreeVisitor { } }; - public static final Set legalParserOptions = - new HashSet() { + public static final Set legalParserOptions = + new HashSet() { { add("language"); add("tokenVocab"); add("output"); add("rewrite"); add("ASTLabelType"); @@ -96,8 +96,8 @@ public class BasicSemanticChecks extends GrammarTreeVisitor { } }; - public static final Set legalTreeParserOptions = - new HashSet() { + public static final Set legalTreeParserOptions = + new HashSet() { { add("language"); add("tokenVocab"); add("output"); add("rewrite"); add("ASTLabelType"); @@ -110,20 +110,20 @@ public class BasicSemanticChecks extends GrammarTreeVisitor { } }; - public static final Set legalRuleOptions = - new HashSet() { + public static final Set legalRuleOptions = + new HashSet() { { add("k"); add("greedy"); add("memoize"); add("backtrack"); add("strategy"); } }; - public static final Set legalBlockOptions = - new HashSet() {{add("k"); add("greedy"); add("backtrack"); add("memoize");}}; + public static final Set legalBlockOptions = + new HashSet() {{add("k"); add("greedy"); add("backtrack"); add("memoize");}}; /** Legal options for terminal refs like ID */ - public static final Set legalTokenOptions = - new HashSet() { + public static final Set legalTokenOptions = + new HashSet() { { add(TerminalAST.defaultTokenOption); add("associativity"); diff --git a/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java b/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java index dfc66ba2a..7871c8214 100644 --- a/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java +++ b/tool/src/org/antlr/v4/tool/ast/GrammarRootAST.java @@ -37,8 +37,8 @@ import java.util.HashMap; import java.util.Map; public class GrammarRootAST extends GrammarASTWithOptions { - public static final Map defaultOptions = - new HashMap() { + public static final Map defaultOptions = + new HashMap() { { put("language","Java"); }