From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19748 invoked from network); 13 Mar 2000 09:39:03 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Mar 2000 09:39:03 -0000 Received: (qmail 12881 invoked by alias); 13 Mar 2000 09:38:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10105 Received: (qmail 12873 invoked from network); 13 Mar 2000 09:38:57 -0000 Date: Mon, 13 Mar 2000 10:38:56 +0100 (MET) Message-Id: <200003130938.KAA13298@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Fri, 10 Mar 2000 16:33:53 +0100 (MET) Subject: Re: ksh (with PATCH) I wrote: > ... > > - test -d . -a '(' ! -f . ')' isn't parsed correctly. Sorry, wrong line. The offending one was: [[ '!' = ! ]]. The problem is that the ! (without quotes) is reported as the BANG token when we are in conditions. The patch tries to minimally invasive, making the lexer report it as BANG only when we are in the first word of a condition. > - [[ $(print -r - "$(print -r - 'abc*|" \')") != 'abc*|" \' ]] isn't > parsed correctly either. Maybe this is just that we use quoting differently? Bye Sven diff -ru ../z.old/Src/lex.c Src/lex.c --- ../z.old/Src/lex.c Mon Mar 13 10:34:59 2000 +++ Src/lex.c Mon Mar 13 10:35:28 2000 @@ -1526,7 +1526,7 @@ } else if (incond && !strcmp(yytext, "]]")) { tok = DOUTBRACK; incond = 0; - } else if (incond && yytext[0] == '!' && !yytext[1]) + } else if (incond == 1 && yytext[0] == '!' && !yytext[1]) tok = BANG; } inalmore = 0; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de