Can you also update the modifier field as mentioned in the last paragraph (to an empty string instead of null)?
Thanks, Sam -----Original Message----- From: Terence Parr [mailto:[email protected]] Sent: Monday, November 22, 2010 2:24 PM To: Sam Harwell Cc: 'Johannes Luber'; [email protected] Subject: Re: please remove hasDelegates Done. sync. Ter On Nov 22, 2010, at 12:07 PM, Sam Harwell wrote: > The following makes the CSharp3 target usable from the Java version of > the > tool: > > Add the following to AttributeScope.java: > > /* Placeholder for compatibility with the CSharp3 target. */ public > LinkedHashMap<String, GrammarAST> actions = new LinkedHashMap(); > > The Java version of the tool does properly track the rule modifiers. > However, when the modifier isn't specified, the 'modifier' field in > Rule.java defaults to null. Due to the early out in > ASTExpr.getObjectProperty, a null value doesn't end up pulling the > default value from the map defined in my template. If you use an empty > string in Grammar.defineRule whenever the modifier argument is null, > it corrects the issue. > > Sam _______________________________________________ antlr-dev mailing list [email protected] http://www.antlr.org/mailman/listinfo/antlr-dev
