From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Zoltan Hidvegi <hzoli@cs.elte.hu>,
segal@morgan.com (Morris M. Siegel),
zsh-users@math.gatech.edu
Subject: Re: Bug in case stmt with '('
Date: Mon, 22 Jul 1996 16:37:24 -0700 [thread overview]
Message-ID: <960722163724.ZM10811@candle.brasslantern.com> (raw)
In-Reply-To: segal@morgan.com (Morris M. Siegel) "Re: Bug in case stmt with '('" (Jul 22, 6:31pm)
On Jul 22, 6:31pm, Morris M. Siegel wrote:
} Subject: Re: Bug in case stmt with '('
}
} > There's no such thing as "unescaped whitespace in glob patterns." Zsh
} > lexes glob patterns as a STRING token.
}
} Okay -- (not knowing how lex.c works puts me somewhat at a disadvantage) --
} in light of what you say, then what I mean is that the whitespace would have
} to be escaped with backslash or quotes to be non-trivial.
Unfortunately, glob patterns are not the only STRING tokens. That means
that you can't strip out the "trivial" spaces when lexing, without messing
up other uses of those tokens.
} E.g., the glob pattern
} ( file*.* ~ file.c )
} would be equivalent to
} (file*.*~file.c)
That's exactly what my `if (incasepat && ...)' patch does, except it only
does it in the pattern part of case statements.
Unfortunately, it breaks this sort of thing:
case "foo bar" in
(foo bar)|boing) echo yes;;
esac
because you can't tell until you find the `|' beyond the first ')' that
you should not have been stripping out spaces when lexing inside the
earlier '('.
This works, though:
case "foo bar" in
((foo bar)|boing) echo yes;;
esac
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"
next prev parent reply other threads:[~1996-07-22 23:39 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
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 [this message]
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=960722163724.ZM10811@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=hzoli@cs.elte.hu \
--cc=schaefer@nbn.com \
--cc=segal@morgan.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).