[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Greedy matching with LPEG
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 17 Feb 2009 13:36:44 -0300
> Roberto Ierusalimschy wrote:
> [...]
> > Exactly because it is generated automatically, shouldn't it be easy to
> > put the list in proper order? All you have to do is to order the entries by
> > decreasing token length.
>
> Yes, but I'm looking for a solution that doesn't involve doing this ---
> does such a thing exist?
I am afraid not. The whole idea of PEGs is that ordered choice gives
determinism. To control this determinism, you must order your choices
properly.
-- Roberto