From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9392 invoked from network); 3 Oct 2002 20:44:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Oct 2002 20:44:10 -0000 Received: (qmail 3675 invoked by alias); 3 Oct 2002 20:43:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17759 Received: (qmail 3656 invoked from network); 3 Oct 2002 20:43:57 -0000 Date: Thu, 3 Oct 2002 16:43:41 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Cc: 163237-forwarded@bugs.debian.org Subject: [doogie@brainfood.com: Bug#163237: zsh barfs on valid shell] Message-ID: <20021003204341.GD13111@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) This happens under emulate -R sh as well. ----- Forwarded message from Adam Heath ----- adam@yakko:~$ for shell in ash bash zsh ksh; do echo -n "$shell:"; $shell -c 'case foo in (foo)echo foo;;(bar)echo bar;;esac';done ash:foo bash:foo zsh:zsh: parse error near `foo' ksh:foo adam@yakko:~$ for shell in ash bash zsh ksh; do echo -n "$shell:"; $shell -c 'case foo in (foo) echo foo;;(bar) echo bar;;esac';done ash:foo bash:foo zsh:foo ksh:foo http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_02_10_02 Scroll down a bit to the actual grammer(surrounded by
):

The case_item and case_item_ns show that there is no required space(or other
break char) between the ')' and the compound_list.

case_item_ns     :     pattern ')'               linebreak
                 |     pattern ')' compound_list linebreak
                 | '(' pattern ')'               linebreak
                 | '(' pattern ')' compound_list linebreak
                 ;
case_item        :     pattern ')' linebreak     DSEMI linebreak
                 |     pattern ')' compound_list DSEMI linebreak
                 | '(' pattern ')' linebreak     DSEMI linebreak
                 | '(' pattern ')' compound_list DSEMI linebreak



----- End forwarded message -----