Re: Subrule ordering
[email protected] (Richard Jelinek) Fri, 13 Jun 2003 21:18:08 +0200
| Newsgroups | perl.recdescent |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 13, 2003 at 11:24:05AM -0700, Ron D. Smith wrote:
> Ordering is how you establish priority in ambiguous situations. If you turn
This is an interesting aspect/information.
> proplist: property xorand_prop(s?)
>
> xorand_prop: xor_prop|and_prop
> xor_prop: '|' property
> and_prop: ',' property
Actually this does also:
proplist: property xor_prop(s)
| property and_prop(s?)
without the xorand rule. And now I understand this construct and why
it does work. But this doesn't change anything it just pushes the
problem one step further.
You say, ordering is to establish priority in ambiguous
situations. Well - given this rule:
(I)
order_sensitive: phrase
| phrase '(' blah ')'
Ambiguity? Yes. But this NEVER gets to the second production. While
(II)
order_sensitive: phrase '(' blah ')'
| phrase
parses all well, I really don't have a choice to set priority with
ordering. Probably my input has more non-parameter phrases than those
with parameters. No matter what, I have to use the inefficient (II).
With my present knowledge - that is.
--
best regards,
Dipl.-Inf. Richard Jelinek
- The PetaMem Group - Prague/Nuremberg - www.petamem.com -
-= 2325182 Mind Units =-