[antlr-interest] AST rewrite bug C# target

Floris van Nee floris.vannee at gmail.com
Sat May 9 07:43:39 PDT 2009


Thanks! It works perfectly now :)
Floris

On Sat, May 9, 2009 at 12:04 PM, Gavin Lambert <antlr at mirality.co.nz> wrote:

> At 20:55 9/05/2009, Floris van Nee wrote:
>
>> There's one more error left though, in rules like:
>> type_qualifier returns [List<string> ids]
>> :v=VOID
>> {
>> $ids = new List<String>() { "System", "Void" };
>> }
>> |qual=qualifier
>> {
>> $ids = qual;
>> }
>> ;
>>
>> Here I want to assign the value of qual (which should be of type
>> List<string>) to $ids. In output=AST mode qual is of type qualifier_return,
>> instead of List<string>, but in normal mode it compiles correctly. What am I
>> doing wrong here then?
>>
>
> Assuming that the 'qualifier' rule is defined similarly, then you should be
> using this instead:
>
>  $ids = $qual.ids;
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090509/5bf951b0/attachment.html 


More information about the antlr-interest mailing list