[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: Mon, 01 Nov 2021 00:43:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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

> The LPEG people wrote a paper[*] about this problem.

I tried to convert their transcription function to Elisp.  See below.
Seems to work - but so far only basic regexp constructs are supported.

> The problem probably are backrefs and other extensions.

I think backrefs can be implemented in peg.el in a simple way.  They
can't be a standard extension though because matching the backref needs
to advance point (so they are not just a certain `guard').

If that is supported by peg.el I think backrefs could just be
transcribed more or less directly but I I'm not sure about equivalence.

> Helmut
> http://www.lua.inf.puc-rio.br/publications/medeiros11regular.pdf

Attachment: rx-to-peg.el
Description: application/emacs-lisp


reply via email to

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