git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: git@vger.kernel.org
Subject: Re: Numbers with specific base
Date: Fri, 13 Dec 2019 14:00:26 -0800	[thread overview]
Message-ID: <xmqqimmjhon9.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <87tv64ymam.fsf@Rainer.invalid> (Achim Gratz's message of "Fri, 13 Dec 2019 21:59:13 +0100")

Achim Gratz <Stromeko@nexgo.de> writes:

> Nothing to do with the patch from Ed, but the regex following his
> correction matches a lot of things that decidedly are not "Numbers with
> specific bases" as it claims to do in the comment.
>
> Ed Maste writes:
>>  PATTERNS("elixir",
>>  	 "^[ \t]*((def(macro|module|impl|protocol|p)?|test)[ \t].*)$",
>>  	 /* Atoms, names, and module attributes */
>> -	 "|[@:]?[a-zA-Z0-9@_?!]+"
>> +	 "[@:]?[a-zA-Z0-9@_?!]+"
>>  	 /* Numbers with specific base */
>>  	 "|[-+]?0[xob][0-9a-fA-F]+"
>
> Here, things like "+0bad" would match as a base 2 number, which doesn't
> seem right.  If it's intended to match that broadly, I'd have expected a
> comment to that effect.

No need for such a comment, as it is implicit that we assume the
user writes reasonable text that our patterns try to match.

      reply	other threads:[~2019-12-13 22:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 17:39 [PATCH] userdiff: remove empty subexpression from elixir regex Ed Maste
2019-12-13 17:45 ` Jeff King
2019-12-13 14:11   ` Ed Maste
2019-12-13 17:55 ` [PATCH v2] " Ed Maste
2019-12-13 18:18   ` Jeff King
2019-12-13 19:24   ` Johannes Sixt
2019-12-13 15:58     ` Ed Maste
2019-12-13 20:23       ` Junio C Hamano
2019-12-13 20:59 ` Numbers with specific base (was: [PATCH] userdiff: remove empty subexpression from elixir regex) Achim Gratz
2019-12-13 22:00   ` Junio C Hamano [this message]

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=xmqqimmjhon9.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Stromeko@nexgo.de \
    --cc=git@vger.kernel.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).