emacs-devel
[Top][All Lists]
Advanced

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

Re: Unquoted special characters in regexps


From: martin rudalics
Subject: Re: Unquoted special characters in regexps
Date: Sun, 05 Mar 2006 12:10:26 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Luc Teirlinck wrote:
> If you consider in "[a]b]" the first and the second `]' to be _both_
> inside or _both_ outside the context of a character alternative, then
> it would be impossible to determine solely from that notion of context
> which of the two `]' has to be taken literally.

That's what I don't get tired of saying for one week already.  You
always denied it by saying things like

   The special meaning of `]' inside a character alternative is
   obviously to close that alternative.

and

   `]' has the special meaning of closing a character alternative
   _inside_ a character alternative

If the closing `]' is inside the alternative where does the first `]' in
"[a]b]" go?

> If you consider the
> opening and ending " of a string to be _both_ inside or _both_ outside
> the context of a string, then it would be impossible from that notion
> of context to determine which " open and which " close strings.

You're cheating here: The double-quote opening a string compares to the
_left_ bracket opening a character alternative.  The double-quote
closing a string compares to the _right_ bracket closing a character
alternative.






reply via email to

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