Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ksh (with PATCH)
- X-seq: zsh-workers 10105
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: ksh (with PATCH)
- Date: Mon, 13 Mar 2000 10:38:56 +0100 (MET)
- In-reply-to: Sven Wischnowsky's message of Fri, 10 Mar 2000 16:33:53 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author