From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93845 invoked by alias); 22 May 2018 15:48:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 93710 invoked by uid 89); 22 May 2018 15:48:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=0.1 required=5.0 tests=BAYES_00,FROM_EXCESS_BASE64,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*M:4177, =e5=af=ab=e9, HContent-Transfer-Encoding:8bit?= X-HELO: m176116.mail.qiye.163.com Received: from m176116.mail.qiye.163.com (HELO m176116.mail.qiye.163.com) (59.111.176.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 May 2018 15:48:46 +0000 Received: from [192.168.0.105] (unknown [120.38.217.241]) by m176116.mail.qiye.163.com (HMail) with ESMTPSA id 50CADB41969; Tue, 22 May 2018 23:48:33 +0800 (CST) Subject: Re: support C/C++ identifiers named with non-ASCII characters To: Pedro Alves , gdb-patches@sourceware.org References: <9418d4f0-f22a-c587-cc34-2fa67afbd028@zjz.name> <8c8af079-dbb8-207b-5edf-86b99e9f5db8@simark.ca> <1b915196-3e97-4892-7426-be4211fe7889@zjz.name> <32da087b-da41-7414-3a56-f2e4587fe287@zjz.name> <253bd3ae-5c38-0c01-6e51-f59fc17b781d@redhat.com> From: =?UTF-8?B?5by15L+K6Iqd?= Message-ID: Date: Tue, 22 May 2018 17:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Thunderbird/55.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1ktWUFJV1koWUFPN1dZCBgUCR5ZQUtVS1dZCQ4XHghZQVkyNS06NzI*QU tVS1kG X-HM-Sender-Digest: e1kSHx4VD1lBWUc6MU06Lyo*LTodLyocFhooCBc3OSIwCy9VSlVKTklM S0tPSkpITk5JVTMWGhIXVQERATsBEQFVFRoWHkVZV1kMHhlZQR0aFwgeV1kIAVlBSU1KSDdXWRIL WUFZSklLVUhDVUlKTFVJT0pZBg++ X-HM-Tid: 0a638889a9ec926akuws50cadb41969 X-SW-Source: 2018-05/txt/msg00562.txt.bz2 Pedro Alves 於 2018/5/22 下午11:17 寫道: >> >> I found the patch. Let me rebase it and send it / post it. It'll >> be easier to just look at the patch. > > Here it is. So this is reusing the same logic added to > cp-name-parser.y, in the C/C++ expression parser as well. > I read through your code. If I understand it correctly, you keep all the valid ASCII characters, and treat all non-ASCII characters "as valid". This is pretty much the same thing as I did. The only difference is that I blacklist invalid ASCII characters and you whitelist valid ASCII characters. But we both "validate" all the non-ASCII characters. But I think your code seems better than mine because it updates and reuses some common code. So I think I can abondon my patch and the unfinished test case.