jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: bskip_chars("...\\") -> Unfinished escape sequence


Joerg Sommer <joerg@xxxxxxxxxxxx> wrote:
>I don't know what's going on here, but I get an error, where I never got
>it before.
>
>bskip_chars("A-Z\\") should skip all big letter characters and backslash,
>but I get SLang_verror (SL_INVALID_PARM, "Unfinished escape sequence in
>range specification"); from slwclut.c:396 in SLang-2.

   This is something that will need to be documented.  The problem is
that with UTF-8 support "all big letter characters" does not
necessarily mean "A-Z".  For this reason, the functions that take
character ranges have been extended also take character classes.  For
example, the generalization of

    bskip_chars ("A-Z");

is
  
    bskip_chars ("\\u");

At the moment, the following "special" range sequences are supported:

  \w        matches a unicode "word" character, taken to be alphanumeric.
  \a        alphabetic character, excluding digits
  \s        matches whitespace
  \l        matches lowercase
  \u        matches uppercase
  \d        matches a digit

With that said, you appear to have uncovered a bug.  It appears that I
made no provision for encoding "\\".  I plan to release a new slang2
snapshot tomorrow and I will make sure that this bug is fixed.

>BTW: Is it possible for future versions to make all skip functions return
>the number of characters they have skiped.

I think that it would be better to keep the existing functions as they
are but introduce others that return such information.

Thanks,
--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]