From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11601 invoked by alias); 18 May 2015 10:53:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35184 Received: (qmail 19784 invoked from network); 18 May 2015 10:53:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-45-5559c4908219 Date: Mon, 18 May 2015 11:53:01 +0100 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: vim completion problem after workers/35168 Message-id: <20150518115301.0c80918d@pwslap01u.europe.root.pri> In-reply-to: References: 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=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xK7oTjkSGGnyfw29xsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4MnaeW8FcMJ+3oveDYgPjbK4uRk4OCQETiY2L9zND2GISF+6t Z+ti5OIQEljKKHHv4AtWCGcGk8TW/fehMtsYJTo/LmECaWERUJVY9GUWO4jNJmAoMXXTbMYu Rg4OEQFtifaPYiBhYQFziZVnZ7GA2LwC9hI7r18G28YpECzRteskWKuQQIDE/d93GUFsfgF9 iat/PzFBXGQvMfPKGUaIXkGJH5Pvgc1hFlCXmDRvETOErS3x5N0FVog56hI37u5mn8AoNAtJ yywkLbOQtCxgZF7FKJpamlxQnJSea6hXnJhbXJqXrpecn7uJERKyX3YwLj5mdYhRgINRiYeX IyIyVIg1say4MvcQowQHs5II7/Z9QCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8c3e9DxESSE8s Sc1OTS1ILYLJMnFwSjUw6jO+XfPpzkG+ebkJcuZmmbLb3XQm6jA1vnnsXMk8VWS6Q+7KCa98 di+9I1fv83CKWvZcC5WNT0JKmqcsdZh18ID9svXRcpPuTJU8pvuyc+HdP5UysrtebStfd1Sq 9Fkk/wG1Myavplx8FThdctVfk/X15msYbD+vmcC9tWNrs1Xgu10Hi4UZriqxFGckGmoxFxUn AgA/PPNgVQIAAA== On Mon, 18 May 2015 13:29:03 +0300 =C4=B0smail D=C3=B6nmez wrote: > vim results in: >=20 > _vim:7: parse error near `(' >=20 > I guess it needs extra quoting but not sure where, so no patch attached :/ No, that's a snafu with getting the right lexical analysis mode for the pattern. Was OK for the first one, but got screwed up after "|", and _vim happens to have a pattern begining with a parenthesis after a "|". Thanks for being up to date... BTW for backward compatibility I'll also need to special case (|...) which used to match an empty string but is now a parse error. Should get around to all that some time this week but it's a busy week... pws diff --git a/Src/parse.c b/Src/parse.c index c938d2d..c486699 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1174,8 +1174,6 @@ par_case(int *cmplx) if (!strcmp(tokstr, "esac")) break; str =3D dupstring(tokstr); - incasepat =3D 0; - incmdpos =3D 1; type =3D WC_CASE_OR; pp =3D ecadd(0); palts =3D ecadd(0); diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 1ba0a54..41fb486 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -543,6 +543,7 @@ . ./bad_syntax 126: Attempt to "." file with bad syntax. ?./bad_syntax:2: parse error near `\n' +# ` =20 echo 'false' >dot_false . ./dot_false @@ -650,3 +651,17 @@ >Pattern matched five >Pattern matched six >Character class matched abecedinarian + + case grumph in + ( no | (grumph) ) + print 1 OK + ;; + esac + case snruf in + ( fleer | (|snr(|[au]f)) ) + print 2 OK + ;; + esac +0: case patterns within words +>1 OK +>2 OK