From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: ksh (with PATCH)
Date: Mon, 13 Mar 2000 10:38:56 +0100 (MET) [thread overview]
Message-ID: <200003130938.KAA13298@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Fri, 10 Mar 2000 16:33:53 +0100 (MET)
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
next reply other threads:[~2000-03-13 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-13 9:38 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-03-13 9:17 Sven Wischnowsky
2000-03-10 15:54 Sven Wischnowsky
2000-03-10 15:33 Sven Wischnowsky
2000-03-10 16:34 ` Bart Schaefer
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=200003130938.KAA13298@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/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).