zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: schaefer@nbn.com
Cc: hzoli@cs.elte.hu, zsh-workers@math.gatech.edu
Subject: Re: Remaining zsh3.0-pre2 bugs
Date: Mon, 8 Jul 1996 08:57:49 +0100 (BST)	[thread overview]
Message-ID: <28790.199607080757@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <960707232105.ZM7626@candle.brasslantern.com> from "Bart Schaefer" at Jul 7, 96 11:21:03 pm

>So I rather suspect that has something to do with the bug, but I'm lost
>at this point in terms of knowing what \230 represents, or how it got
>into tokstr and thus ultimately into clwords[1], or whether INULL() is
>supposed to be true at that point.

'\230' is Snull -- the token that the ' turns into.  INULL() *is*
supposed to be true for this token -- it indicates that that character
should be ignored when considering the line at later stages of
execution.  The four tokens it is true for are Snull (single quote as
here), Dnull (double quote), Bnull (backslash) and Nularg (an empty
argument).

Note that the ; in the middle did *not* turn into a token -- the lexer
sees that it is quoted, so leaves it literal.  If the line were
actually being executed (pretending that it really is a ; and not a
newline), the code after the lexer would see an argument a;b, ignoring
the Snull tokens.  Had the quotes not been there, the ; would have
turned into a token and been treated specially.

It's really quite an elegant system.  Unfortunately it does fall over
somewhat when the token values are appearing in the input as normal
characters, but as you know we now have a workaround for that too.

>Anyway, cs decrements down to 8 because of the two \230 in qword; but
>"echo 'a;b'" of course has 10 characters.

Bingo.  That loop has special code for handling backslashes, but not
quotes.  I think it needs to handle quotes too.  The completion code
really doesn't cope with quotes at all, so I'm not surprised this is
happening.

-zefram



  reply	other threads:[~1996-07-08  8:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-06 22:59 Huy Le
1996-07-07  5:29 ` Bart Schaefer
1996-07-07  5:53 ` Bart Schaefer
1996-07-07  7:07   ` Bart Schaefer
1996-07-07  6:08 ` Bart Schaefer
1996-07-07  9:06   ` Zefram
1996-07-08  0:48 ` Zoltan Hidvegi
1996-07-08  4:22   ` Bart Schaefer
1996-07-08  6:21     ` Bart Schaefer
1996-07-08  7:57       ` Zefram [this message]
1996-07-08  8:48         ` Bart Schaefer
1996-07-09  1:32           ` Zoltan Hidvegi
1996-07-09  9:08             ` Bart Schaefer
1996-07-09 14:06               ` Zoltan Hidvegi
1996-07-10 19:11                 ` Bart Schaefer
1996-07-10 19:48                   ` Zoltan Hidvegi
1996-07-11  0:04                     ` Bart Schaefer
1996-07-11 12:16                       ` Zoltan Hidvegi
1996-07-11 16:45                         ` Bart Schaefer
1996-07-08 14:28     ` Zoltan Hidvegi
1996-07-08  6:38   ` Bart Schaefer
1996-07-11  8:11 ` Peter Stephenson
1996-07-11 12:51   ` Redirection bug fix Peter Stephenson

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=28790.199607080757@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=hzoli@cs.elte.hu \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).