Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
new lexing bug, and possible fix
- X-seq: zsh-workers 1671
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Z Shell workers mailing list)
- Subject: new lexing bug, and possible fix
- Date: Tue, 16 Jul 1996 20:44:18 +0100 (BST)
-----BEGIN PGP SIGNED MESSAGE-----
zsh -fc 'echo ${'
Index: Src/lex.c
===================================================================
RCS file: /home/zefram/usr/cvsroot/zsh/Src/lex.c,v
retrieving revision 1.7
diff -c -r1.7 lex.c
*** lex.c 1996/07/16 14:26:55 1.7
--- lex.c 1996/07/16 18:20:32
***************
*** 715,721 ****
}
c = Outpar;
} else {
! if (e == '{') {
add(c);
c = Inbrace;
++bct;
--- 715,721 ----
}
c = Outpar;
} else {
! if (e == '{') { /*}*/
add(c);
c = Inbrace;
++bct;
***************
*** 768,774 ****
break;
case LX2_INBRACE:
if (isset(IGNOREBRACES) || sub)
! c = '{';
else {
if (in_brace_param)
cmdpush(CS_BRACE);
--- 768,774 ----
break;
case LX2_INBRACE:
if (isset(IGNOREBRACES) || sub)
! c = '{'; /*}*/
else {
if (in_brace_param)
cmdpush(CS_BRACE);
***************
*** 964,969 ****
--- 964,972 ----
brk:
hungetc(c);
*bptr = '\0';
+ if (in_brace_param)
+ while(bct-- >= in_brace_param)
+ cmdpop();
DPUTS(cmdsp != ocmdsp, "BUG: gettok: cmdstack changed.");
return peek;
}
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBMeveTnD/+HJTpU/hAQG0bQP/QWxzgTrcGS9jnaqeK5FC73epXRJQNXE1
5z84WhUpSxfuZ8Eoiyo6eo6jL4ZUZ2opaMUvjZabPZj/TIC3EOjT1xUksLdN8Na8
FZsFTZUNEP94cDh51MbZMQ4s7/nspZiAB8F/aY9lh0dF6x25uUcNTIMMsbBleIKV
owzhlSYeevs=
=cw0M
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author