emacs-devel
[Top][All Lists]
Advanced

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

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


From: Augusto Stoffel
Subject: Re: Make peg.el a built-in library?
Date: Fri, 01 Oct 2021 10:14:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Thu, 30 Sep 2021 at 15:34, Adam Porter <adam@alphapapa.net> wrote:

> In org-ql, the PEX is redefined at load time and/or run time, being
> derived from search keywords that are defined by the package and
> possibly by the user.  So the PEX can't be defined in advance, at
> compile time.  So having to use `with-peg-rules' means having to use
> `eval'.
>
> That's why it would be nice to have a `peg' function that could be
> called with a PEX form, to return a function that could be stored in a
> variable and later be called with a string argument, that would parse
> the string with the PEG.  Sort of like Python's re.compile.

FWIW, in my use of PEGs (which is outside of Emacs, in a code
analyzer/language server for TeX), such on-the-fly generation of parsers
is used all the time as well.



reply via email to

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