From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14646 invoked by alias); 30 Nov 2015 05:17:07 -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: 21017 Received: (qmail 20921 invoked from network); 30 Nov 2015 05:17:05 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=Uh/wpEIUX9UX0FOdpsyW1Q==:117 a=Uh/wpEIUX9UX0FOdpsyW1Q==:17 a=IkcTkHD0fZMA:10 a=XJFZeCqboE0TXJX9dRUA:9 a=QEXdDO2ut3YA:10 Message-id: <565BD4C5.1070608@eastlink.ca> Date: Sun, 29 Nov 2015 20:47:01 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: lexing References: <565B18C6.6090707@eastlink.ca> <151129100735.ZM24525@torch.brasslantern.com> <565BB016.6020905@eastlink.ca> <20151130033348.GJ2504@tarsus.local2> <565BCE96.4070406@eastlink.ca> In-reply-to: <565BCE96.4070406@eastlink.ca> Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit A fruitful hunt for highlighting errors: These are not mistaken as comments: #!/usr/bin/zsh ${(kv#)var} ${#var} $#var ${(s. # .)var} ${var// # /test} ${var//# /test} ${var%#}, ${var:-#} 2#111 '#', "#", \# `posh -c 'echo foo#bar'` These are mistaken for comments: (#b) (#c1,2) (#a3) $[[#2]7] ##Z ... as are these: $(( ##\e )) is 27, (( #VAR )) $(( #var )) ... but, given that there is preceding whitespace, would these three not break Bart's rule? Perhaps the whitespace here is does not qualify as 'word separating'? Or is the " $(()) " construct an exception? ... and unfortunately: $(# this IS a comment). is not considered to be a comment.