[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rx.el sexp regexp syntax
From: |
Peter Neidhardt |
Subject: |
Re: rx.el sexp regexp syntax |
Date: |
Sat, 26 May 2018 01:32:11 +0200 |
User-agent: |
mu4e 1.0; emacs 26.1 |
Michael Heerdegen <address@hidden> writes:
>> A string regexp, by contrast, usually fits onto a single line.
>
> But regexps are tree-like structures. That's why rx, which uses sexps
> (i.e. trees), is the easier to read representation for complicated
> regexps than a one-dimensional string. Unless you have the ability to
> form a representation in your head.
I did not think of this at first but I think it's an excellent,
fundamental point.
>> The "English" counterpart used in rx is bulky and difficult to learn.
>> Somehow, you've got to learn that it's "word-start" and not
>> "word-beginning", that it's "not" and not "non", and so on.
>
> That's IMHO the main reason why people avoid using rx. I wonder if that
> aspect of rx could be improved (why not just use $ as synonym for bol
> etc.)?
I guess you meant 'eol' ;)
rx supports synonyms and I think in general it's not a good idea.
That said, I really like that it uses meaningful words. So instead of
‘line-end’, ‘eol’
I'd leave it to only
‘line-end’
--
Peter Neidhardt
signature.asc
Description: PGP signature
- 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, 2018/05/31
- RE: rx.el sexp regexp syntax, Drew Adams, 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 <=
- Re: rx.el sexp regexp syntax (WAS: Off Topic), Peter Neidhardt, 2018/05/25
- Re: rx.el sexp regexp syntax, Tom Tromey, 2018/05/27
- Re: rx.el sexp regexp syntax, Alan Mackenzie, 2018/05/27
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/27
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/27
- Re: rx.el sexp regexp syntax, Pierre Neidhardt, 2018/05/28
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/28