From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5731 invoked from network); 15 Nov 1998 22:23:43 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Nov 1998 22:23:43 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id RAA03204; Sun, 15 Nov 1998 17:22:50 -0500 (EST) Resent-Date: Sun, 15 Nov 1998 17:22:50 -0500 (EST) From: "Bart Schaefer" Message-Id: <981115142107.ZM29503@candle.brasslantern.com> Date: Sun, 15 Nov 1998 14:21:06 -0800 In-Reply-To: <199811050140.BAA02822@athenaeum.demon.co.uk> Comments: In reply to Phil Pennock "Re: Arithmetic expression (bug?)" (Nov 5, 1:40am) References: <199811050140.BAA02822@athenaeum.demon.co.uk> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Phil Pennock , zsh-workers@math.gatech.edu Subject: Re: Arithmetic expression (bug?) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"ENmzt3.0.yn.wGrJs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4642 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Catching up on some more old stuff: On Nov 5, 1:40am, Phil Pennock wrote: } Subject: Re: Arithmetic expression (bug?) } } Typing away merrily, Bernd Eggink produced the immortal words: } > > -----------------------------< cut here >------------------------------- } > > foo=alpha } > > print -- ${(l<$[10]>)foo} } > > print -- ${(l<10>)foo} } > > -----------------------------< cut here >------------------------------- } > > why does the third line produce: } > > ./testfile: error in flags [3] } > > ? } > } > I can't reproduce this. I *can* reproduce this. I can reproduce it in 3.0.5, too. The problem is with the parse: l<$[10]> parses as 'l' '<' String Inbrack '1' '0' Outbrack '>' '<' 'x' '>' l<10> parses as 'l' Inang '1' '0' Outang '<' 'x' '>' Now because (Inang != '<') the error is reported when looking at the after correctly scanning the <10>. I'm not fluent enough with the parser to understand why that happens, or whether the fix is to treat Inang, Inpar, etc. as equal to '<', '(', etc. in the substitution code, or to actually modify the parser. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com