[antlr-interest] C# and '?' cardinality operator in AST rewrite rules

Kay Roepke kroepke at classdump.org
Sat Jan 6 16:36:08 PST 2007


For the record, as this has gone via private mail by accident:

Hi Ben!

On 7. Jan 2007, at 1:23 , Benoit Miller wrote:


> Hmm, bitten by my example again :) I oversimplified the repro.
>

Hah! :)


> Here is the unedited rule:
>
> classDecl : attrList? 'class' IDENTIFIER '{' property+ '}' ';'
>             -> ^(CLASS IDENTIFIER attrList? property+)
>           ;
>
> In the AST rewrite rule, there is a dummy token as the root.
>

Yes, that should work. I suspect a bug in the C# target, then. I use  
this in Java and Objective-C targets
quite often.

Unfortunately I have no inkling in what state both the target and its  
developers are right now ;)
Best bet is to ping the perpetrators and try to get them to supply  
you with a fix. 3.0b6 won't be out
within the next two weeks for sure, because Ter is away for that  
time. The next release could well be
away a month or so. :(

cheers,
-k

-- 
Kay Röpke
http://classdump.org/



More information about the antlr-interest mailing list