Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: grammar triviality with '&&'
- X-seq: zsh-users 19939
- From: Lawrence Velázquez <vq@xxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: grammar triviality with '&&'
- Date: Sun, 1 Mar 2015 13:49:38 -0500
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=larryv.me; h= x-sasl-enc:content-type:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; s= mesmtp; bh=gD7gPweGzJogdbnxQ0hmeCsHSwY=; b=FViLS/cByu/iSfSpHprvB JEM+scxH0dBlIr3qNDggXoPE8CqCZsP//zOePOSuSoG0jrZGDS4rV93MK5tyU+js RqNaoN70Pi7JqrK4AdlQNhD75SjXCmyR4NxYZWZFNu+C8JJQcmZ5UaGmA6od7A+6 RpCxCbeRnUiEihnn/1V3bY=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:content-type:mime-version :subject:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; s=smtpout; bh=gD7gPweGzJogdbnxQ0hmeCs HSwY=; b=j89mU6uY0DhUCb7GbnKZpEaCKmlecAZlGu7d4HCsu9dYgL4/YEU5Z6X gxDJTVMEqMfzErQ0Jvs3kBoO6jGq08XNw4XoHI2uGYUweQtsrlMQkDNeirl8y0mu BPowwBIpmuzF6fxIl+EpUfHHobhQGraSTQaqbhL1F9c7f/PRhn5U=
- In-reply-to: <54F345D3.9010204@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <54F33934.2070607@eastlink.ca> <13666281425228233@web7o.yandex.ru> <54F345D3.9010204@eastlink.ca>
On Mar 1, 2015, at 12:01 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> I see, so it's not a 'hard' syntactic issue, the limitation is in the
> rules for look ahead, namely that if the parser feels it has
> a complete sentence then it never looks at the next line.
It's not just a parser implementation detail. Lists are *defined* to
terminate on newlines. From zshmisc(1):
A list is a sequence of zero or more sublists, in which each sublist
is terminated by `;', `&', `&|', `&!', or a newline.
In your second example, `[ -e file1 ]` constitutes a list.
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author