On Tuesday 10 February 2009 16:50:48 Carter Cheng wrote:
> Hello,
>
> I am getting a missing attribute access error on a number of rules which I
> do not quite understand and was hoping I might be able to get some help
> fixing them. The errors point to the following rules in the tree grammar.
>
> varDecls[std::list<std::string> & err] returns [std::map<Symbol,Type*>
> vars]
>
> : (v=varDecl { $vars.insert($v); } )+
>
> ;
I think you want to insert the return value from varDecl, so you can write
$vars.insert($v.var)
(i.e. use the name you gave to the return value in the rule)
the other rule should work similar...
cheers,
Michael
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---