From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Johannes Sixt via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH 0/3] Fun with cpp word regex
Date: Thu, 07 Oct 2021 11:14:00 +0200 [thread overview]
Message-ID: <87o881gpq7.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <pull.1054.git.1633589461.gitgitgadget@gmail.com>
On Thu, Oct 07 2021, Johannes Sixt via GitGitGadget wrote:
> The cpp word regex driver is a bit too loose and can match too much text
> where the intent is to match only a number. The first patch fixes that.
>
> The other two patches add support for digit separators and the spaceship
> operator <=> (generalized comparison operator).
>
> I left out support for hexadecimal floating point constants because that
> would require to tighten the regex even more to avoid that entire
> expressions are treated as single tokens.
>
> Johannes Sixt (3):
> userdiff: tighten cpp word regex
> userdiff: permit the digit-separating single-quote in numbers
> userdiff: learn the C++ spaceship operator
>
> userdiff.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
I haven't dug into the C++ syntax here, I trust you know what you're
doing there.
But some tests in t/t4034/cpp/* would be great, and seem from the files
easy to add. E.g. wouldn't changing:
a<b a<=b a>b a>=b
to:
a<b a<=b a>b a>=b a<=>b
Give you an updated regression test for your 3/3? Similar changes can be
done for 1-2/3.
next prev parent reply other threads:[~2021-10-07 9:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 6:50 [PATCH 0/3] Fun with cpp word regex Johannes Sixt via GitGitGadget
2021-10-07 6:50 ` [PATCH 1/3] userdiff: tighten " Johannes Sixt via GitGitGadget
2021-10-07 6:50 ` [PATCH 2/3] userdiff: permit the digit-separating single-quote in numbers Johannes Sixt via GitGitGadget
2021-10-07 6:51 ` [PATCH 3/3] userdiff: learn the C++ spaceship operator Johannes Sixt via GitGitGadget
2021-10-07 9:14 ` Ævar Arnfjörð Bjarmason [this message]
2021-10-07 16:40 ` [PATCH 0/3] Fun with cpp word regex Johannes Sixt
2021-10-08 19:09 ` [PATCH v2 0/5] " Johannes Sixt via GitGitGadget
2021-10-08 19:09 ` [PATCH v2 1/5] t4034/cpp: actually test that operator tokens are not split Johannes Sixt via GitGitGadget
2021-10-08 19:09 ` [PATCH v2 2/5] t4034: add tests showing problematic cpp tokenizations Johannes Sixt via GitGitGadget
2021-10-08 19:09 ` [PATCH v2 3/5] userdiff-cpp: tighten word regex Johannes Sixt via GitGitGadget
2021-10-08 19:09 ` [PATCH v2 4/5] userdiff-cpp: permit the digit-separating single-quote in numbers Johannes Sixt via GitGitGadget
2021-10-08 19:09 ` [PATCH v2 5/5] userdiff-cpp: learn the C++ spaceship operator Johannes Sixt via GitGitGadget
2021-10-08 20:07 ` [PATCH v2 0/5] Fun with cpp word regex Ævar Arnfjörð Bjarmason
2021-10-08 22:11 ` Johannes Sixt
2021-10-09 0:00 ` Ævar Arnfjörð Bjarmason
2021-10-10 20:15 ` Johannes Sixt
2021-10-10 17:02 ` [PATCH v3 0/6] " Johannes Sixt via GitGitGadget
2021-10-10 17:02 ` [PATCH v3 1/6] t4034/cpp: actually test that operator tokens are not split Johannes Sixt via GitGitGadget
2021-10-10 17:03 ` [PATCH v3 2/6] t4034: add tests showing problematic cpp tokenizations Johannes Sixt via GitGitGadget
2021-10-10 17:03 ` [PATCH v3 3/6] userdiff-cpp: tighten word regex Johannes Sixt via GitGitGadget
2021-10-10 17:03 ` [PATCH v3 4/6] userdiff-cpp: prepare test cases with yet unsupported features Johannes Sixt via GitGitGadget
2021-10-10 17:03 ` [PATCH v3 5/6] userdiff-cpp: permit the digit-separating single-quote in numbers Johannes Sixt via GitGitGadget
2021-10-10 17:03 ` [PATCH v3 6/6] userdiff-cpp: learn the C++ spaceship operator Johannes Sixt via GitGitGadget
2021-10-24 9:56 ` [PATCH 7/6] userdiff-cpp: back out the digit-separators in numbers Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o881gpq7.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=j6t@kdbg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.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).