zsh-workers
 help / color / mirror / code / Atom feed
* \} parse error in 3.0.3-test4
@ 1997-01-28 20:03 Roderick Schertler
  1997-01-28 23:28 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Roderick Schertler @ 1997-01-28 20:03 UTC (permalink / raw)
  To: zsh-workers

Here's a parse error in 3.0.3-test4 which wasn't in 3.0.2:

    $ zsh-3.0.2 -fxc 'eval last=\$\{$#\}' foo bar
    + eval last=${1}
    + last=bar

    $ zsh-3.0.3-test4 -fxc 'eval last=\$\{$#\}' foo bar
    + eval last=${1
    foo: closing brace expected

It doesn't happen if you use quotes rather than a backwhack.

    $ zsh-3.0.3-test4 -fxc 'eval last=\$\{$#"}"' foo bar
    + eval last=${1}
    + last=bar

-- 
Roderick Schertler
roderick@gate.net


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: \} parse error in 3.0.3-test4
  1997-01-28 20:03 \} parse error in 3.0.3-test4 Roderick Schertler
@ 1997-01-28 23:28 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1997-01-28 23:28 UTC (permalink / raw)
  To: Roderick Schertler; +Cc: zsh-workers

> Here's a parse error in 3.0.3-test4 which wasn't in 3.0.2:
> 
>     $ zsh-3.0.2 -fxc 'eval last=\$\{$#\}' foo bar
>     + eval last=${1}
>     + last=bar
> 
>     $ zsh-3.0.3-test4 -fxc 'eval last=\$\{$#\}' foo bar
>     + eval last=${1
>     foo: closing brace expected

Fix is included below.  This should be applied to zsh-3.0.3-test4 and
zsh-3.1.1.

Zoltan


*** Src/lex.c	1997/01/05 21:07:31	3.1.1.4
--- Src/lex.c	1997/01/28 23:27:21
***************
*** 986,992 ****
  	    cmdpop();
  	zerr("closing brace expected", NULL, 0);
      } else if (unset(IGNOREBRACES) && !sub && len > 1 &&
! 	       peek == STRING && bptr[-1] == '}') {
  	/* hack to get {foo} command syntax work */
  	bptr--;
  	len--;
--- 986,992 ----
  	    cmdpop();
  	zerr("closing brace expected", NULL, 0);
      } else if (unset(IGNOREBRACES) && !sub && len > 1 &&
! 	       peek == STRING && bptr[-1] == '}' && bptr[-2] != Bnull) {
  	/* hack to get {foo} command syntax work */
  	bptr--;
  	len--;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-01-29  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-28 20:03 \} parse error in 3.0.3-test4 Roderick Schertler
1997-01-28 23:28 ` Zoltan Hidvegi

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).