Austin Hastings wrote:
token typedef_name {
<identifier> <?{ is_a_typedef(~$0) }>
}
Yeah, except it would be <?{{ ... pir ... }}>, and I'd prefer to code it
in NQP if possible. That's why I was wondering if there's a "fail from
within" function available in the Action methods.
It's definitely not possible within Actions. Because actions invoked for
already parsed tree. OTOH you can use
token typedef_name {
<identifier> <.ensure_typedef>
}
and implement Close::Grammar::ensure_typedef in NQP.
--
Bacek
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev