GNU bug report logs - #58727
29.0.50; rx doc: Semantics of RX...

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Sun, 23 Oct 2022 02:33:02 UTC

Severity: normal

Found in version 29.0.50

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 58727 <at> debbugs.gnu.org
Subject: bug#58727: 29.0.50; rx doc: Semantics of RX...
Date: Sun, 23 Oct 2022 18:14:10 +0200
> The resulting regexps are concatenating like with an implicit `seq'.
> This is not trivial, though: in stringish regexps the repetition
> operators are only unary, and different interpretations would make sense
> for `rx' (implicit `seq', implicit `or').

The rule is implicit concatenation unless specified otherwise; maybe we could say that in the leading paragraph. (`or` is the only place where concatenation isn't done.)

Otherwise I think we should grant our readers some common sense. It's not a formal specification but meant for humans to understand, and I'm quite sure they do.

> Oh, and maybe let's also make more clear that `rx' always cares about
> implicit grouping when necessary.

No, there is no such thing in rx. The manual provides corresponding string-notation constructs for orientation only.
This is important -- rx forms are defined by their semantics, not by what strings they translate to.





This bug report was last modified 2 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.