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); } )+
;
formalList returns [pair< std::list<Type*>, bool > p]
: { $p.second = false; } (t=formal { $p.first.push_back($t); } )*
(ELLIPSIS { $p.second = true; } )?
;
with
varDecl returns [pair<Symbol,Type*> var]
: t=type (s=STAR)? i=IDENT { $var = pair<Symbol,Type*>($i.text, $t); }
;
formal returns [Type* type]
: ^(FORMAL t=formalType (s=STAR)? IDENT) { $type = $t; }
;
I was searching through the archive on this but couldnt find a solution that
seemed to work. i.e. changing $v --> $v.value gives an unknown attribute type
error. Any help would be appreciated.
Thanks in advance,
Carter.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
LPCCollect.g
Description: Binary data
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
