[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rx.el sexp regexp syntax
From: |
Stefan Monnier |
Subject: |
Re: rx.el sexp regexp syntax |
Date: |
Thu, 31 May 2018 10:19:02 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Itʼs not clear to me how you'd do that. Looking at rx-constituents,
> quite a few of the verbose ways of specifying what to match already
> have a succinct version, eg
>
> sequence => and
> zero-or-more => *
The verbosity for me is not so much in the identifier as in the "( ID
SPC ) SPC" and the need for quotation marks to surround actual
characters. So for example the string's single-char * turns into
a 5-char * in RX.
I really like the regularity, extensibility, and clear structure of RX,
but in practice it makes the regexps too long: short regexps are
simple enough that RX's advantages don't get a chance to shine, and more
complex regexps are made to spread too many lines for comfort.
That doesn't mean I don't like RX, by the way. Just that I expected I'd
really love it, and in the end I never use it because I never find it to
be significantly better (I do think it's significantly better when you
need to manipulate it programmatically, of course, which is why lex.el
takes an RX syntax as input).
Stefan
PS: By the way, we should deprecate the `and` shorthand for `sequence`,
because `and` in regexps could also mean "conjunction" (that's what
it means in lex.el).
- Re: rx.el sexp regexp syntax, (continued)
- Re: rx.el sexp regexp syntax, Philipp Stephani, 2018/05/29
- Re: rx.el sexp regexp syntax, Richard Stallman, 2018/05/29
- Re: rx.el sexp regexp syntax, Robert Pluim, 2018/05/30
- Re: rx.el sexp regexp syntax, Richard Stallman, 2018/05/30
- Re: rx.el sexp regexp syntax, Robert Pluim, 2018/05/31
- Re: rx.el sexp regexp syntax, Clément Pit-Claudel, 2018/05/31
- Re: rx.el sexp regexp syntax,
Stefan Monnier <=
- RE: rx.el sexp regexp syntax, Drew Adams, 2018/05/31
- Re: rx.el sexp regexp syntax, João Távora, 2018/05/31
- Re: rx.el sexp regexp syntax, Robert Pluim, 2018/05/31
- Re: rx.el sexp regexp syntax, Basil L. Contovounesios, 2018/05/31
- Re: rx.el sexp regexp syntax, Basil L. Contovounesios, 2018/05/31
- Re: rx.el sexp regexp syntax, João Távora, 2018/05/31
- Re: rx.el sexp regexp syntax (WAS: Off Topic), Alan Mackenzie, 2018/05/25
- Re: rx.el sexp regexp syntax, Michael Heerdegen, 2018/05/25
- Re: rx.el sexp regexp syntax, Peter Neidhardt, 2018/05/25
- Re: rx.el sexp regexp syntax (WAS: Off Topic), Peter Neidhardt, 2018/05/25