[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make peg.el a built-in library?

From: Michael Heerdegen
Subject: Re: Make peg.el a built-in library?
Date: Fri, 22 Oct 2021 18:33:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Helmut Eller <eller.helmut@gmail.com> writes:

> On Sun, Oct 10 2021, Michael Heerdegen wrote:
> > Is it practically possible to transform a regexp into a really
> > equivalent PEG, or is it too difficult, or would the resulting PEG just
> > be too large or inefficient?
> The LPEG people wrote a paper[*] about this problem.

IIUC their answer to the ordered `or' operator problem is simply, at the
end, to apply the distributive law when performing the transcription.
So e.g.

(and (or "a" "aa") "b") doesn't match "aab" as a peg, but
(or (and "a" "b") (and "aa" "b")) does.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]