The below is a synonym for
some_line ::= common_thing
some_line ::= uncommon_thing
some_line ::= rare_thing
It's also a synonym for those same thing rules stated in any order.
There should be no effect on efficiency, and no prioritization.
Marpa gets its power from non-determinism -- the ability to keep several
alternatives "in mind" at once. If you're used to other parsers, which
are fully deterministic in the sense of only considering one possibility
at a time, the working of its internals can be counter-intuitive.
-- jeffrey
On 05/16/2014 03:04 PM, Christopher Layne wrote:
Basic question: Does the declared order of RHS alternatives affect the
efficiency of parsing?
some_line ::= common_thing
| uncommon_thing
| rare_thing
I would think so, but based on other statements about how Marpa's internal
parsing approach isn't necessarily how one expects it to be with regards to
determinance, I wanted to ask. Seeing that there has to be some sense of
priority I would think so, but I may be confused when it comes to equal
priority of RHS alternatives and use (or not) of '||' vs '|'.
-cl
--
You received this message because you are subscribed to the Google Groups "marpa
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.