From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@math.gatech.edu, Zoltan Hidvegi <hzoli@cs.elte.hu>
Subject: Re: Bug in case stmt with '('
Date: Sun, 21 Jul 1996 23:53:22 -0700 [thread overview]
Message-ID: <960721235322.ZM22844@candle.brasslantern.com> (raw)
In-Reply-To: "Bart Schaefer" <schaefer> "Re: Bug in case stmt with '('" (Jul 21, 11:31pm)
On Jul 21, 11:31pm, Bart Schaefer wrote:
} Subject: Re: Bug in case stmt with '('
}
} I think we should leave it POSIX-style.
}
} However, there is a remaining bug in Zoltan's patch.
}
} zagzig<8> case foo in
} > (foo) echo yes;;
} zsh: parse error near `echo'
}
} Apparently there still needs to be at least one token between the close
} paren and the first word of the actual command.
I thought Zoltan's "if" cascade looked a little too easy. Here's the fix.
*** Src/parse.c.0 Fri Jul 19 11:17:12 1996
--- Src/parse.c Sun Jul 21 23:45:10 1996
***************
*** 522,544 ****
str2[sl] = Bar;
str2[sl+1] = '\0';
str = str2;
! } else if (tok == STRING) {
! char *str2;
int sl = strlen(str);
! if (str[sl - 1] != Bar)
! YYERRORV;
! str2 = ncalloc(sl + strlen(tokstr) + 1);
! strcpy(str2, str);
! strcpy(str2 + sl, tokstr);
! str = str2;
! } else {
! /* POSIX allows (foo*) patterns */
! char *s = str;
! if (skipparens(Inpar, Outpar, &s) || *s)
! YYERRORV;
! break;
}
}
addlinknode(pats, str);
--- 522,547 ----
str2[sl] = Bar;
str2[sl+1] = '\0';
str = str2;
! } else {
int sl = strlen(str);
! if (str[sl - 1] != Bar) {
! /* POSIX allows (foo*) patterns */
! char *s = str;
! if (skipparens(Inpar, Outpar, &s) || *s)
! YYERRORV;
! break;
! } else {
! char *str2;
!
! if (tok != STRING)
! YYERRORV;
! str2 = ncalloc(sl + strlen(tokstr) + 1);
! strcpy(str2, str);
! strcpy(str2 + sl, tokstr);
! str = str2;
! }
}
}
addlinknode(pats, str);
***************
--
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 7:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-14 0:34 Another patch to compctl-examples CVS compctl, and a bug? Bart Schaefer
1996-07-14 1:55 ` Bart Schaefer
[not found] ` <schaefer>
1996-07-14 2:00 ` Bart Schaefer
1996-07-17 21:52 ` Completion behavior change in 3.0-pre3 Bart Schaefer
1996-07-19 19:53 ` Another patch to compctl-examples CVS compctl, and a bug? Bart Schaefer
1996-07-22 7:34 ` Peter Stephenson
1996-07-22 6:53 ` Bart Schaefer [this message]
1996-07-15 1:02 ` Zoltan Hidvegi
1996-07-15 2:32 ` Bart Schaefer
1996-07-15 4:30 ` Zoltan Hidvegi
1996-07-15 7:03 ` Bart Schaefer
1996-07-15 17:02 ` Bart Schaefer
[not found] <17651.199607222123@stone.dcs.warwick.ac.uk>
1996-07-23 14:08 ` Bug in case stmt with '(' Zoltan Hidvegi
1996-07-23 16:25 ` Bart Schaefer
[not found] ` <schaefer@candle.brasslantern.com>
1996-07-23 20:01 ` Morris M. Siegel
1996-07-23 21:55 ` Bart Schaefer
1996-07-24 8:29 ` Zefram
[not found] ` <A.Main@dcs.warwick.ac.uk>
1996-07-24 11:10 ` Bart Schaefer
1996-07-24 14:16 ` Zoltan Hidvegi
1996-07-24 9:52 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
1996-07-16 6:00 Completion behavior change in 3.0-pre3 Bart Schaefer
1996-07-17 9:52 ` Christoph von Stuckrad
1996-07-17 15:29 ` Bart Schaefer
[not found] <199607191600.SAA08613@bolyai.cs.elte.hu>
[not found] ` <9607211853.ZM979@morgan.com>
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=960721235322.ZM22844@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=hzoli@cs.elte.hu \
--cc=schaefer@nbn.com \
--cc=zsh-workers@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).