From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17331 invoked by alias); 3 Mar 2017 17:07:40 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22535 Received: (qmail 20596 invoked from network); 3 Mar 2017 17:07:40 -0000 X-Qmail-Scanner-Diagnostics: from mta02.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(24.224.136.13):SA:0(-0.7/5.0):. Processed in 1.207709 secs); 03 Mar 2017 17:07:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.eastlink.ca designates 24.224.136.13 as permitted sender) X-Authority-Analysis: v=2.2 cv=Ms8i0ySe c=1 sm=1 tr=0 a=VQPyJbzkVWdZq2fSRXwWHg==:117 a=VQPyJbzkVWdZq2fSRXwWHg==:17 a=N659UExz7-8A:10 a=8-RMujGT7HJpmiGSWN8A:9 a=pILNOxqGKmIA:10 X-EL-IP-NOAUTH: 24.207.101.1 Subject: Re: wrong error msg To: zsh-users@zsh.org References: <170302084745.ZM15136@torch.brasslantern.com> <0f6ee30a-ab44-d343-fca9-b70cc8b9f65a@eastlink.ca> <170302151443.ZM16284@torch.brasslantern.com> <170303082112.ZM19916@torch.brasslantern.com> From: Ray Andrews Message-id: Date: Fri, 03 Mar 2017 09:07:33 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-version: 1.0 In-reply-to: <170303082112.ZM19916@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 03/03/17 08:21 AM, Bart Schaefer wrote: It gets to be a rather deep subject Sensei, probably not right for the list, but my interest in the subject is profound, tho I come at it from the study of language in general not programming languages per se. > Well, no, that's not really it. The trouble here is that your "natural" > parse is wrong, I'd say that 'natural' is whatever folks would be expected to do, and I'd assert that 'my way' is what most folks would do and that any consistent rule could be used, so nothing is 'wrong' a priori, tho of course it might not be the rule actually used! (Unless of course my 'natural' parse cannot ever be consistent!) > C does not allow nesting of visually-indistinguishable tokens, so this > can't arise there. That's an excellent point. Indeed we use quotes with the same presumed syntactic effect as {}[]() even tho, as you say, they are not visually different. So whereas *we* know what we mean, the parser has no ability to mind-read. Which makes nesting of quote marks necessarily illegal. It's merely theoretical at this point, perhaps that does defeat my view of this. Anyway, I understand what zsh is doing now which is what is relevant here. > Hmm, you could force interactive mode to syntax-check your script like > this: > > zsh -o interactivecomments +o banghist -fnis < scriptfile > % dquote braceparam dquote> zsh: unmatched " > % % > > but you'll get a LOT of output. Deep magic. Too deep for an innocent like me. >