guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: major change to argument processing.


From: Rob Browning
Subject: Re: RFC: major change to argument processing.
Date: 01 Jun 2001 12:28:07 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Marius Vollmer <address@hidden> writes:

> I think so, yes.  The effort is not really that large (I think Rob has
> already written it).

Yes.

> The main purpose is to allow whitespace in meta-arguments.  Using
> `read' would be a clever hack to achieve this, but `read' does so much
> more.  It is doing too much for his application, in my view.

I'm more or less in agreement.  With whatever we choose is going to
involve tradeoffs, and going to need to be well documented because
it's not going to be exactly as everyone expects, no matter what.

>     A backlash removes any special meaning from the next char.  The
>     backslash is discarded.

Done.

>     Arguments are separated by whitespace.

Done.

>     A single quote removes the special meanings from all chars except
>     the single quote upto the next single quote.  The two single
>     quotes involved are discarded.

Ok, I'll add this.

>     A double quote removes any special meaning from all chars expcept
>     the backslash and the double quote upto the next double quote that
>     has its special meaning.  The two double quotes are discarded.

Done.

> That is, this
> 
>     "'"'"'"'"
> 
> forms a single argument, namely <'"'>.

Hmm. I treat any quoted block as a complete argument, so that your
above example would produce three separate arguments containing <'>,
<">, and <'>.  In other words.  I don't do any additional "adjacent
string concatenation", though I suppose I could if that's what's
desired.  That would be more in keeping with shell behavior.

Oh, and I have also implemented this rule:

  Arguments without quotes still respect backslash escaping, so you
  can say

    -e fo\"o

  to set the entry point to be (string->symbol "fo\"o").

-- 
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930



reply via email to

[Prev in Thread] Current Thread [Next in Thread]