Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 2/2] clear the heredoc list in case par_event() fails
- X-seq: zsh-workers 43856
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH 2/2] clear the heredoc list in case par_event() fails
- Date: Fri, 30 Nov 2018 09:55:23 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181130095526euoutp0203abea08647de4079af9068300802a7d~r3k6eLZJo0700707007euoutp02I
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543571726; bh=5WDxKvPZf+b0LVCqY6NrC7m+19IBJoBk8uHRZVIOpBY=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Ig6zfM/mSnAYIX3XPZkCuIJpcoZOud6Ecx9NkO7J4f/ZVU+Qduwb+BAbISmOqZMR9 MJG7NxMAUkLO0pELqjWruzziPXmTVBaUzhF3KDLVC8WryDNgRW9ngJFxBfs1avZSP6 tZ6D01jDsTNh08dSRPeXKuBMqPp3orQsbpf677eE=
- In-reply-to: <CAH+w=7aYJyZaod5HgBioF2aQ8ezjTBM+tffezs73yd_QLibxsA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <1429277155-24607-1-git-send-email-kdudka@redhat.com> <1429277155-24607-2-git-send-email-kdudka@redhat.com> <20150417201753.41812294@ntlworld.com> <CGME20181129163223epcas2p409f7d3c4b9417e2a3a9956abfd64ea3b@epcas2p4.samsung.com> <2172016.U8TV6t29ou@kdudka-nb> <1543512844.6025.28.camel@samsung.com> <CAH+w=7aYJyZaod5HgBioF2aQ8ezjTBM+tffezs73yd_QLibxsA@mail.gmail.com>
On Thu, 29 Nov 2018 10:39:15 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Nov 29, 2018 at 9:42 AM Peter Stephenson
> <p.stephenson@xxxxxxxxxxx> wrote:
> >
> > There's some slightly icky linkage between lex errors and the top level
> > requiring tok to be LEXERR. The simple fix using the existing
> > signalling looks like the following. I definitely don't think the tok =
> > LEXERR has a moral right to percolate through in the way it must
> > previously have been doing to avoid this, and the lexer does certainly
> > have the right to update the token when signalling a parse error, so
> > (famous last words) it's hard to see what could be wrong with this...
>
> Might this need to be conditional upon ... something ... so that e.g.
> ${(z)...} on a malformed here-document doesn't throw an error? I
> don't have the code handy to poke around.
All this change is doing is setting the token to LEXERR in a case which
already loudly complains about the error and sets the error flag (this
is in a function parsestr() which calls parsetrnoerr() just above).
In most cases you'd expect the token in such a case already to be
LEXERR: Kamil's test includes an incomplete $( inside a here document so
there was some interesting nested parsing involved.
So anything reacting badly to the change in the token needs fixing.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author