From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id MAA29985 for ; Fri, 19 Jul 1996 12:31:08 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id WAA14442; Thu, 18 Jul 1996 22:24:59 -0400 (EDT) Resent-Date: Thu, 18 Jul 1996 22:23:04 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960718192358.ZM702@candle.brasslantern.com> Date: Thu, 18 Jul 1996 19:23:58 -0700 In-Reply-To: Zoltan Hidvegi "Re: Bug in case stmt with '('" (Jul 19, 1:43am) References: <199607182343.BAA02057@hzoli.ppp.cs.elte.hu> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: Zoltan Hidvegi Subject: Re: Bug in case stmt with '(' Cc: zsh-users@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"aPxK83.0.yW3.76lxn"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/313 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 19, 1:43am, Zoltan Hidvegi wrote: > Subject: Re: Bug in case stmt with '(' > Bart Schaefer wrote: > > > That means it can't look only for matching parens, but also has to look > > for matching parens followed by a closing paren or vertical bar. > > > > I'm unsure of this patch, so the pre3 stuff is still there #ifdef OLD. > > There may be a better way to deal with it. > > Actually the patch below is a simpler solution for that. Is it? It handles (v|w)), but it doesn't handle this case: case v in (v|w)|x) gigo="case '(v|w)|x)'" echo $gigo;; *) gigo="case '*)'" echo $gigo;; esac I backed out my patch and applied yours, and I still get: zsh: command not found: gigo=case '(v|w)|x)' > An other > advantage of that is that hgetc()/hungetc() is not used which is > scientifically better since tokens should be recognized in lex.c Yes, I know, but there are other cases in parse.c that lookahead with hgetc(). > parse.c should only use the tokens returned by lex.c. The patch to lex.c > removes an unnecessary special case for `<' in a case pattern. After that > the only effect of the incasepat variable is that it disables spell > checking. That's fine, but doesn't address the problem.