Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
X-AuditID: cbfec7f4-f796c6d000001486-12-570b99343bab
Date: Mon, 11 Apr 2016 13:31:45 +0100
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Allow slash in alternation patterns in limited cases?
Message-id: <20160411133145.486788a5@pwslap01u.europe.root.pri>
In-reply-to:
 <CAHYJk3Qc8WsRAxav6wT8MmoEKj-hDByAA3ZCWHHbTt=+CaUQxQ@mail.gmail.com>
References:
 <CAHYJk3TY5kU0fXDkk2iO7kRJhhMTS1f4a9Am1ueN4wCXOQ7Hsg@mail.gmail.com>
 <160410151105.ZM21544@torch.brasslantern.com>
 <20160411093738.11406966@pwslap01u.europe.root.pri>
 <CAHYJk3SEeghkbpLCE26bG_76nM5PYp9MF68AO1ue00DHTwRV6A@mail.gmail.com>
 <20160411112941.579d8157@pwslap01u.europe.root.pri>
 <CAHYJk3QkC_jDq94ax2vMZUCaU2iELFO7kk49ogQUg-qafDtgPA@mail.gmail.com>
 <20160411120716.06a6d1c9@pwslap01u.europe.root.pri>
 <CAHYJk3Qc8WsRAxav6wT8MmoEKj-hDByAA3ZCWHHbTt=+CaUQxQ@mail.gmail.com>
Organization: Samsung Cambridge Solution Centre
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu)
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
X-Brightmail-Tracker:
 H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xq7omM7nDDdo6lC0ONj9kcmD0WHXw
	A1MAYxSXTUpqTmZZapG+XQJXxsq7C5gKOjkqFt7byNLAuJWti5GTQ0LARGLynKWMELaYxIV7
	64HiXBxCAksZJfqvd7KDJIQEZjBJ7F5oD5E4xyhx4WEHO4RzllHiwIlNYKNYBFQlzr5YwwRi
	swkYSkzdNBtsrAhQvPn7PxYQW1jASeLVw7NA9RwcvAL2EgffpYGEOQWCJRpv3oLa/JNZ4v3r
	C6wgCX4BfYmrfz8xQZxnLzHzyhmwmbwCghI/Jt8Dm8ksoCWxeVsTK4QtL7F5zVtmiKvVJW7c
	3c0+gVF4FpKWWUhaZiFpWcDIvIpRNLU0uaA4KT3XUK84Mbe4NC9dLzk/dxMjJJy/7GBcfMzq
	EKMAB6MSD6/DNa5wIdbEsuLK3EOMEhzMSiK81jO4w4V4UxIrq1KL8uOLSnNSiw8xSnOwKInz
	zt31PkRIID2xJDU7NbUgtQgmy8TBKdXAyFbnkTmpUK21yn5b4ILkuzM8j6rlbJj27qyjWkDL
	tWJ7/ozJ3e/l4if3slzqn+FzccrauCThNLN+I30mweOSs7Knz0tYUfL+b3StUkXKFu+iHCmv
	FUuVj3rU1v1dfIGPW/dGk7LxQtd2+XWXT2nv0J8iVCRY77bwh0Qk+523MflrN+SEnj6nxFKc
	kWioxVxUnAgA1LG192MCAAA=
X-Seq: zsh-workers 38274

On Mon, 11 Apr 2016 14:06:10 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:

> On Mon, Apr 11, 2016 at 1:07 PM, Peter Stephenson
> <p.stephenson@samsung.com> wrote:
> > The point is that, unlike the ~ case which is just a flag passed in to
> > the pattern match parser, it would longer done by pattern matching at
> > all.  It would be done in the glob code.  The pattern match code would
> > see the foo, bar, baz, bong, and it would it be reassembled higher up.
> > So it's not so much incompatible as something utterly different.
> 
> This is already the same difference we have between (foo|bar) in
> globbing and pattern matching though. If it's a glob, it's handled
> recursively by scanner() and if it's pattern, it's somewhere else (I
> don't even know where the general pattern matching code is by heart).

No, expressions like (foo|bar) are *only* handled by the pattern
matcher.  The scanner's sole responsibility is to till the pattern
matcher whether or not it should stop if it sees a "/".

pws

