I want to parse recipes and I have something like
ingrediententry
: q=number uid=unit iid=ingredient
qid=ingredient_qualifier*
{ .
Where ingredient_qualifier can appear more than once. How do I accumulate a
list of qualifiers that I can then process in the action to
ingrediententry?
I tried
ingrediententry
@init {
List<int> li = new List<int>();
}
// ingredient returns an id
: q=number uid=unit iid=ingredient
qid=ingredient_qualifier* {$li.Add($qid);}
{.
But that gives an missing attribute access error on rule scope for $qid.
Cheers,
Sven
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address