diff --git a/tool/src/org/antlr/v4/codegen/Target.java b/tool/src/org/antlr/v4/codegen/Target.java index 2f0531b09..da095a325 100644 --- a/tool/src/org/antlr/v4/codegen/Target.java +++ b/tool/src/org/antlr/v4/codegen/Target.java @@ -403,6 +403,10 @@ public class Target { } public String getElementName(String name) { + if (".".equals(name)) { + return "_wild"; + } + if ( gen.g.getRule(name)!=null ) return name; int ttype = gen.g.getTokenType(name); if ( ttype==Token.INVALID_TYPE ) return name;