zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: lexing
Date: Sun, 29 Nov 2015 20:47:01 -0800	[thread overview]
Message-ID: <565BD4C5.1070608@eastlink.ca> (raw)
In-Reply-To: <565BCE96.4070406@eastlink.ca>

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.


  reply	other threads:[~2015-11-30  5:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-29 15:24 lexing Ray Andrews
2015-11-29 17:13 ` lexing ZyX
2015-11-29 18:07 ` lexing Bart Schaefer
2015-11-30  2:10   ` lexing Ray Andrews
2015-11-30  3:33     ` lexing Daniel Shahaf
2015-11-30  4:20       ` lexing Ray Andrews
2015-11-30  4:47         ` Ray Andrews [this message]
2015-11-30 16:23           ` lexing Bart Schaefer
2015-11-30 16:50             ` lexing Ray Andrews
2015-12-04 19:15             ` master class Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=565BD4C5.1070608@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).