>>>> "PB" == rendhalver
<rendhalver(a)xemacs.org> writes:
Thanks for looking at this. Be aware that this stuff is not easy, and
the code is crufty. Some references are the Dragon Book's (Aho,
Sethi, Ullman _Compilers_) chapter on lexical analysis and Sedgewick's
_Algorithms_ (get the C version).
PB> i believe the perl regular expression engine supports
PB> [:alpha:] constructs, maybe we could have a look at how they
PB> do it to get ideas on how XEmacs can support those nifty
PB> constructs
I don't think this is terribly hard, just a little tedious.
PB> i think implementing POSIX bracket-expression's in XEmacs will
PB> enhance its multi-language capabilities
Hard to say. The problem is that POSIX bracket-expressions depend on
the POSIX locale, which we pretty much ignore elsewhere. That means
we are likely to get weird interactions between people's expectations
of how XEmacs "should" behave and what it does in regexps.
PB> the other idea i had was wether pcre could be used in XEmacs
PB> (pcre is a library that does perl compatible regular
PB> expressions for those who dont know)
No, at least not as a _replacement_ for the current stuff (backward
compatibility, remember? lots and lots of Lisp that would have to be
ported). Also, we have extensions (the \sX syntax matcher) and
documented but unimplemented extensions (generic character categories
using \cX) that are not in POSIX that we really should implement.
What has been suggested in the past is
(1) synch to GNU Emacs's regexp engine (Stefan Monnier did a _lot_ of
work on it---he is extremely busy now but might be able to spare a
clue or two; Jan Vroonhof, also very busy, has looked at this in
the past)
(2) implementing something like Python's raw-strings which would allow
regexps to be written without all those doubled and quadrupled
backslashes.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
My nostalgia for Icon makes me forget about any of the bad things. I don't
have much nostalgia for Perl, so its faults I remember. Scott Gilbert c.l.py