From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B08EC43603 for ; Fri, 13 Dec 2019 22:00:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E5E0206C3 for ; Fri, 13 Dec 2019 22:00:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="wvGdPgrH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726004AbfLMWAb (ORCPT ); Fri, 13 Dec 2019 17:00:31 -0500 Received: from pb-smtp1.pobox.com ([64.147.108.70]:57840 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbfLMWAb (ORCPT ); Fri, 13 Dec 2019 17:00:31 -0500 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 2F416247CF; Fri, 13 Dec 2019 17:00:29 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=iu0R1tPMWQge4U7Sa9ARf2C0IQc=; b=wvGdPg rHfw5gRSoUjOR9a74yrqSzaa3v5StXgrvjRyG8rP9mc1xCvtFxpLbv8x5jo90X+t 1fRiefARHjSYkE8ImTvLiuPR+OeFp4c7YmVsxlcDqaMZSa0Wg/EjBdZRqmDhZRhQ o2SXtlWZCAls0l8dL+xT9sEZ9fYV2C3Ux+8Uk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=nQ61zdgX901KlgkLhhoGtW4MQdBARfB/ 3z8TNGBgXs92VMKX1eRxVl7ZCLkP+2aK6ptXw37Sc6jW2YBdYsthevQR0xV2auDa lE1nbT5+IG7bhqB8oRKqZ46BZp9ikf6ASKtUmEDWed96jCywj+mOXKz5C4y1Lo9k NW2EF0NwxSg= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 26243247CE; Fri, 13 Dec 2019 17:00:29 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 49C04247CD; Fri, 13 Dec 2019 17:00:27 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Achim Gratz Cc: git@vger.kernel.org Subject: Re: Numbers with specific base References: <20191213173902.71541-1-emaste@FreeBSD.org> <87tv64ymam.fsf@Rainer.invalid> Date: Fri, 13 Dec 2019 14:00:26 -0800 In-Reply-To: <87tv64ymam.fsf@Rainer.invalid> (Achim Gratz's message of "Fri, 13 Dec 2019 21:59:13 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: F897ADA6-1DF3-11EA-B2E9-C28CBED8090B-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Achim Gratz 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.