From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16388 invoked by alias); 16 Jan 2011 20:20:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28634 Received: (qmail 7486 invoked from network); 16 Jan 2011 20:20:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.56 as permitted sender) Date: Sun, 16 Jan 2011 19:43:42 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: [PATCH] Correct isident false positive. Message-ID: <20110116194342.27e60278@pws-pc.ntlworld.com> In-Reply-To: <20110116120519.GA10298@alpha.rzhou.org> References: <20110116120519.GA10298@alpha.rzhou.org> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.0; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=rxSvMJLwthgA:10 a=kj9zAlcOel0A:10 a=21c8c_67AAAA:8 a=NLZqzBF-AAAA:8 a=K0s4YF1-sqwrJ0ouLMIA:9 a=ZGUNjK7dc2MLf1FHumULZ5BQ2vQA:4 a=CjuIK1q_8ugA:10 a=t_b4wO5MBi4A:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Sun, 16 Jan 2011 07:05:20 -0500 Ricky Zhou wrote: > I'm not familiar with with the precise definition of an identifier, so > somebody might want to double-check that this change (which assumes that > valid identifiers cannot start with a '[') is correct. This fixes the > following crash: > > printf %n '[0]' Thanks, makes a lot of sense. I'll add the regression test. Index: Test/D04parameter.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/D04parameter.ztst,v retrieving revision 1.52 diff -p -u -r1.52 D04parameter.ztst --- Test/D04parameter.ztst 19 Dec 2010 17:42:10 -0000 1.52 +++ Test/D04parameter.ztst 16 Jan 2011 19:41:59 -0000 @@ -1401,3 +1401,7 @@ >a >b >c + + printf "%n" '[0]' +1:Regression test for identifier test +?(eval):1: not an identifier: [0] -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/