v4: fix generated attribute name for wildcards (_track__wild instead of _track_.)

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9390]
This commit is contained in:
sharwell 2011-11-18 11:33:45 -08:00
parent ca141afc28
commit 5e1b372ca1
1 changed files with 4 additions and 0 deletions

View File

@ -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;