From 5e1b372ca1a3e3cb3498d27753ab4256b4b9d4fa Mon Sep 17 00:00:00 2001 From: sharwell Date: Fri, 18 Nov 2011 11:33:45 -0800 Subject: [PATCH] v4: fix generated attribute name for wildcards (_track__wild instead of _track_.) [git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9390] --- tool/src/org/antlr/v4/codegen/Target.java | 4 ++++ 1 file changed, 4 insertions(+) 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;