* Re: master 930c578c104: ; Improvements to PEG documentation
[not found] ` <20240416031700.9D2B1C1FB45@vcs2.savannah.gnu.org>
@ 2024-04-16 10:00 ` Michael Albinus
2024-04-16 10:05 ` Mattias Engdegård
0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2024-04-16 10:00 UTC (permalink / raw)
To: emacs-devel; +Cc: Eric Abrahamsen
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
Hi Eric,
> doc/lispref/peg.texi | 128 +++++++++++++++++---------------------------------
> lisp/progmodes/peg.el | 7 +--
> 2 files changed, 48 insertions(+), 87 deletions(-)
>
> diff --git a/doc/lispref/peg.texi b/doc/lispref/peg.texi
> index fbf57852ee0..90aa76988db 100644
> --- a/doc/lispref/peg.texi
> +++ b/doc/lispref/peg.texi
> @@ -1,78 +1,31 @@
> -@c -*-texinfo-*-
> -@c This is part of the GNU Emacs Lisp Reference Manual.
> -@c Copyright (C) 1990--1995, 1998--1999, 2001--2023 Free Software
> -@c Foundation, Inc.
> -@c See the file elisp.texi for copying conditions.
> -@node Parsing Expression Grammars
> -@chapter Parsing Expression Grammars
> -@cindex text parsing
> -@cindex parsing expression grammar
> -@cindex PEG
...
It looks, like the beginning of peg.texi has been removed accidently.
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-16 10:00 ` master 930c578c104: ; Improvements to PEG documentation Michael Albinus
@ 2024-04-16 10:05 ` Mattias Engdegård
2024-04-17 0:33 ` Eric Abrahamsen
0 siblings, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2024-04-16 10:05 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel, Eric Abrahamsen
16 apr. 2024 kl. 12.00 skrev Michael Albinus <michael.albinus@gmx.de>:
> It looks, like the beginning of peg.texi has been removed accidently.
I reverted the commit since it was such an obvious mistake. (Hope you don't mind.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-16 10:05 ` Mattias Engdegård
@ 2024-04-17 0:33 ` Eric Abrahamsen
2024-04-17 2:38 ` Michael Heerdegen via Emacs development discussions.
2024-04-17 12:26 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Eric Abrahamsen @ 2024-04-17 0:33 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: Michael Albinus, emacs-devel, Eli Zaretskii
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> 16 apr. 2024 kl. 12.00 skrev Michael Albinus <michael.albinus@gmx.de>:
>
>> It looks, like the beginning of peg.texi has been removed accidently.
>
> I reverted the commit since it was such an obvious mistake. (Hope you don't mind.)
I certainly don't mind, thank you for coming to my rescue. I seem to be
slightly cursed recently.
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
>> Date: Mon, 15 Apr 2024 20:18:56 -0700
>>
>>
>> On 04/14/24 07:58 AM, Eli Zaretskii wrote:
>> >> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> >> Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, emacs-devel@gnu.org
>> >> Date: Sat, 13 Apr 2024 15:36:14 -0400
>> >>
>> >> > Ping! Eric, any progress with this?
>> >>
>> >> I fixed the test failures.
>> >
>> > Thanks.
>> >
>> > Eric, this leaves the documentation-related comments in my message
>> > from 2 weeks ago; could you please take care of those?
>>
>> Done! Thank you for the push, and thanks to Stefan for fixing the tests.
>>
>> I hope the docs read a bit better now -- I've also removed the mention
>> that `peg-parse' could also accept a single list of PEXS, as I don't
>> think it can any more (and I don't think it needs to be *so* flexible as
>> all that).
>
> Thanks, but it looks like you made some editing mistake, which deleted
> too much of the text, so the commit was reverted. Please take a look
> and fix as needed; I tried to figure out what you wanted to do, but
> couldn't, presumably because too much of the text was inadvertently
> lost when you installed the changes.
I did delete quite a large chunk of text by accident, I've rewritten it
and committed again. Sorry this has been so rocky.
Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-17 0:33 ` Eric Abrahamsen
@ 2024-04-17 2:38 ` Michael Heerdegen via Emacs development discussions.
2024-04-17 3:54 ` Eric Abrahamsen
2024-04-17 12:26 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Michael Heerdegen via Emacs development discussions. @ 2024-04-17 2:38 UTC (permalink / raw)
To: emacs-devel
Hello Eric,
why do you use the term "lambda form" here?
| +@defun peg-run peg-matcher &optional failure-function success-function
| +This function accepts a single @var{peg-matcher}, which is the result of
| +calling @code{peg} (see below) on a named rule, usually the entry-point
| +of a larger grammar.
| +
| +At the end of parsing, one of @var{failure-function} or
| +@var{success-function} is called, depending on whether the parsing
| +succeeded or not. If @var{success-function} is called, it is passed a
| +lambda form that runs all the actions collected on the stack during
| +parsing -- by default this lambda form is simply executed.
AFAIU the function is just passed a function. An anonymous function
maybe, but certainly a function value, not a function form - so just
daily business - or do I miss something?
TIA,
Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-17 2:38 ` Michael Heerdegen via Emacs development discussions.
@ 2024-04-17 3:54 ` Eric Abrahamsen
2024-04-19 23:28 ` Eric Abrahamsen
0 siblings, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2024-04-17 3:54 UTC (permalink / raw)
To: Michael Heerdegen via Emacs development discussions.; +Cc: Michael Heerdegen
Michael Heerdegen via "Emacs development discussions."
<emacs-devel@gnu.org> writes:
> Hello Eric,
>
> why do you use the term "lambda form" here?
>
> | +@defun peg-run peg-matcher &optional failure-function success-function
> | +This function accepts a single @var{peg-matcher}, which is the result of
> | +calling @code{peg} (see below) on a named rule, usually the entry-point
> | +of a larger grammar.
> | +
> | +At the end of parsing, one of @var{failure-function} or
> | +@var{success-function} is called, depending on whether the parsing
> | +succeeded or not. If @var{success-function} is called, it is passed a
> | +lambda form that runs all the actions collected on the stack during
> | +parsing -- by default this lambda form is simply executed.
>
> AFAIU the function is just passed a function. An anonymous function
> maybe, but certainly a function value, not a function form - so just
> daily business - or do I miss something?
No, you're right, I was probably just looking at the code and describing
what I was seeing.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-17 0:33 ` Eric Abrahamsen
2024-04-17 2:38 ` Michael Heerdegen via Emacs development discussions.
@ 2024-04-17 12:26 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2024-04-17 12:26 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: mattias.engdegard, michael.albinus, emacs-devel
> From: Eric Abrahamsen <eric@ericabrahamsen.net>
> Cc: Michael Albinus <michael.albinus@gmx.de>, emacs-devel@gnu.org,
> Eli Zaretskii <eliz@gnu.org>
> Date: Tue, 16 Apr 2024 17:33:38 -0700
>
> Mattias Engdegård <mattias.engdegard@gmail.com> writes:
>
> > Thanks, but it looks like you made some editing mistake, which deleted
> > too much of the text, so the commit was reverted. Please take a look
> > and fix as needed; I tried to figure out what you wanted to do, but
> > couldn't, presumably because too much of the text was inadvertently
> > lost when you installed the changes.
>
> I did delete quite a large chunk of text by accident, I've rewritten it
> and committed again. Sorry this has been so rocky.
Thanks, LGTM.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-17 3:54 ` Eric Abrahamsen
@ 2024-04-19 23:28 ` Eric Abrahamsen
2024-04-20 23:39 ` Michael Heerdegen via Emacs development discussions.
0 siblings, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2024-04-19 23:28 UTC (permalink / raw)
To: Michael Heerdegen via Emacs development discussions.; +Cc: Michael Heerdegen
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Michael Heerdegen via "Emacs development discussions."
> <emacs-devel@gnu.org> writes:
>
>> Hello Eric,
>>
>> why do you use the term "lambda form" here?
>>
>> | +@defun peg-run peg-matcher &optional failure-function success-function
>> | +This function accepts a single @var{peg-matcher}, which is the result of
>> | +calling @code{peg} (see below) on a named rule, usually the entry-point
>> | +of a larger grammar.
>> | +
>> | +At the end of parsing, one of @var{failure-function} or
>> | +@var{success-function} is called, depending on whether the parsing
>> | +succeeded or not. If @var{success-function} is called, it is passed a
>> | +lambda form that runs all the actions collected on the stack during
>> | +parsing -- by default this lambda form is simply executed.
>>
>> AFAIU the function is just passed a function. An anonymous function
>> maybe, but certainly a function value, not a function form - so just
>> daily business - or do I miss something?
>
> No, you're right, I was probably just looking at the code and describing
> what I was seeing.
I've fixed this -- I ended up using "anonymous function" instead, mostly
because the sentence was a bit confusing with just "function".
Thanks,
Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-19 23:28 ` Eric Abrahamsen
@ 2024-04-20 23:39 ` Michael Heerdegen via Emacs development discussions.
2024-04-21 0:51 ` Eric Abrahamsen
0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen via Emacs development discussions. @ 2024-04-20 23:39 UTC (permalink / raw)
To: emacs-devel
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> I've fixed this -- I ended up using "anonymous function" instead,
> mostly because the sentence was a bit confusing with just "function".
Thanks.
[ "Function" would have been fine with me, since it would be really
surprising if the code would name this ad-hoc constructed function that
is useful only once. And it doesn't matter. What matters a bit maybe
is the signature of this function - although one can guess it. ]
Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master 930c578c104: ; Improvements to PEG documentation
2024-04-20 23:39 ` Michael Heerdegen via Emacs development discussions.
@ 2024-04-21 0:51 ` Eric Abrahamsen
0 siblings, 0 replies; 9+ messages in thread
From: Eric Abrahamsen @ 2024-04-21 0:51 UTC (permalink / raw)
To: emacs-devel
Michael Heerdegen via "Emacs development discussions."
<emacs-devel@gnu.org> writes:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I've fixed this -- I ended up using "anonymous function" instead,
>> mostly because the sentence was a bit confusing with just "function".
>
> Thanks.
>
> [ "Function" would have been fine with me, since it would be really
> surprising if the code would name this ad-hoc constructed function that
> is useful only once. And it doesn't matter. What matters a bit maybe
> is the signature of this function - although one can guess it. ]
It was more the language of the documentation: two "functions" in close
proximity that referred to different functions; I found it a bit
ambiguous, and awkward.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-04-21 0:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <171323742013.5283.3736155251539337632@vcs2.savannah.gnu.org>
[not found] ` <20240416031700.9D2B1C1FB45@vcs2.savannah.gnu.org>
2024-04-16 10:00 ` master 930c578c104: ; Improvements to PEG documentation Michael Albinus
2024-04-16 10:05 ` Mattias Engdegård
2024-04-17 0:33 ` Eric Abrahamsen
2024-04-17 2:38 ` Michael Heerdegen via Emacs development discussions.
2024-04-17 3:54 ` Eric Abrahamsen
2024-04-19 23:28 ` Eric Abrahamsen
2024-04-20 23:39 ` Michael Heerdegen via Emacs development discussions.
2024-04-21 0:51 ` Eric Abrahamsen
2024-04-17 12:26 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).