From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway22.websitewelcome.com (gateway22.websitewelcome.com [192.185.46.229]) by sourceware.org (Postfix) with ESMTPS id 5DF693857C76 for ; Sat, 11 Jul 2020 22:05:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5DF693857C76 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway22.websitewelcome.com (Postfix) with ESMTP id F0D579918 for ; Sat, 11 Jul 2020 17:05:44 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id uNcujdd1dhmVTuNcujCsE5; Sat, 11 Jul 2020 17:05:44 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=G6hCoYGf7QmTJ4EnSTQf9Z5Opk4nDVDqdkchhXdTkpw=; b=IUonBUSSu+8Nm/6ATNeu9gKFxF 6KB7LHl7BTz8i7tVU8w51Xz0jvUQYA9VkUqq19jXpvAtlLPVHfe96lwD5B+f/M4njr7Kf578/Yj1k TdWsc4pStXgHCCLcv3YVemFO7; Received: from 174-16-104-48.hlrn.qwest.net ([174.16.104.48]:57530 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1juNcu-001PXA-Lj; Sat, 11 Jul 2020 16:05:44 -0600 From: Tom Tromey To: Daniel Xu Cc: gdb-patches@sourceware.org, tom@tromey.com Subject: Re: [PATCH] rust: Support raw identifiers References: <20200704030430.822085-1-dxu@dxuuu.xyz> X-Attribution: Tom Date: Sat, 11 Jul 2020 16:05:42 -0600 In-Reply-To: <20200704030430.822085-1-dxu@dxuuu.xyz> (Daniel Xu's message of "Fri, 3 Jul 2020 20:04:30 -0700") Message-ID: <87imetr9l5.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.104.48 X-Source-L: No X-Exim-ID: 1juNcu-001PXA-Lj X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-104-48.hlrn.qwest.net (bapiya) [174.16.104.48]:57530 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3026.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, PDS_OTHER_BAD_TLD, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 22:05:46 -0000 >>>>> "Daniel" == Daniel Xu writes: Daniel> This patch adds rust raw identifier support. Raw identifiers are Daniel> detailed here: https://doc.rust-lang.org/reference/identifiers.html . Daniel> PR 23427 This should be mentioned in both ChangeLog files, and should read "PR rust/23427" -- the parser is a bit picky. Daniel> @@ -1402,6 +1402,8 @@ rust_parser::lex_identifier (YYSTYPE *lvalp) Daniel> while ((pstate->lexptr[0] >= 'a' && pstate->lexptr[0] <= 'z') Daniel> || (pstate->lexptr[0] >= 'A' && pstate->lexptr[0] <= 'Z') Daniel> || pstate->lexptr[0] == '_' Daniel> + || (pstate->lexptr[0] == '#' && pstate->lexptr - start == 1 Daniel> + && *start == 'r') This seems maybe a little roundabout, but OTOH the convenience variable code isn't any better. This patch is ok. I think given the size we will need copyright paperwork before we can check it in. Do you have that? If not, contact me off-list and I will get you started. thanks, Tom