bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#31953: [VanL] Re: bug#31953: feature request - `highlight-rx` intera


From: Juri Linkov
Subject: bug#31953: [VanL] Re: bug#31953: feature request - `highlight-rx` interactively
Date: Tue, 22 Oct 2019 00:19:48 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> - ‘or’ has a synonym ‘|’, but ‘and’ has no synonym ‘&’
>
> `and' is not the counterpart of `or', it's a synonym for `seq' or `:'.
> We should probably deprecate `and', since this is a bit confusing.

I consider ‘rx’ as an analogue of Definite Clause Grammar.

I'm so accustomed to Prolog paradigms used for defining grammars in DCG
that I can't use `rx' without its analogous constructs, e.g. such DCG:

  rx --> a, b; c.

where ‘,’ denotes conjunction, and ‘;’ denotes disjunction,
would naturally translate in ‘rx’ to corresponding and/or:

  (rx (| (& a b) c))

For example, this package parses a regexp and returns a DCG structure:
https://github.com/SWI-Prolog/packages-regex/blob/master/regex.dcg.pl





reply via email to

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