Re: item
[email protected] (Ted Zlatanov) Mon, 28 Jul 2003 14:07:09 -0400
| Newsgroups | perl.recdescent |
|---|---|
| Organization | Теодор Златанов @ Cienfuegos |
| Message-ID | <[email protected]> |
On Mon, 28 Jul 2003, [email protected] wrote: > in a rule... > > ruleX : blah1 | blah2 | blah3 > > $item[1] will match whatever of the subrules succeed, isn't it ? I believe the action is bound to the production, so: a: b { CODE_B } | c { CODE_C } | { CODE_ELSE } means that CODE_B will be run when b matches, and CODE_C will be run when c matches. CODE_ELSE will be run if b and c fail to match. If you want to have an action run for all the subrules, you can make those subrules a rule and associate an action with it. Ted