zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Zoltan Hidvegi <hzoli@cs.elte.hu>
Cc: zsh-users@math.gatech.edu
Subject: Re: Bug in case stmt with '('
Date: Thu, 18 Jul 1996 19:23:58 -0700	[thread overview]
Message-ID: <960718192358.ZM702@candle.brasslantern.com> (raw)
In-Reply-To: Zoltan Hidvegi <hzoli@cs.elte.hu> "Re: Bug in case stmt with '('" (Jul 19,  1:43am)

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.



  reply	other threads:[~1996-07-19  2:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-17 21:01 Morris M. Siegel
1996-07-18 18:27 ` Bart Schaefer
1996-07-18 23:43   ` Zoltan Hidvegi
1996-07-19  2:23     ` Bart Schaefer [this message]
1996-07-19 16:00       ` Zoltan Hidvegi
1996-07-21 22:53         ` Morris M. Siegel
1996-07-22  6:31           ` Bart Schaefer
     [not found]             ` <schaefer@candle.brasslantern.com>
1996-07-22 19:26               ` Morris M. Siegel
1996-07-22 19:51                 ` Zoltan Hidvegi
1996-07-22 20:48                   ` Morris M. Siegel
1996-07-22 21:27                     ` Zefram
1996-07-22 21:56                       ` Morris M. Siegel
1996-07-22 21:51                     ` Bart Schaefer
1996-07-22 21:23                   ` Zefram
1996-07-22 22:31               ` Morris M. Siegel
1996-07-22 23:37                 ` Bart Schaefer
1996-07-24 16:07     ` Morrie is off for July 25 Morris M. Siegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=960718192358.ZM702@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=hzoli@cs.elte.hu \
    --cc=schaefer@nbn.com \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).