|
From: Andy S. <an...@ru...> - 2006-06-06 15:17:18
|
On Tuesday 06 June 2006 11:25 am, Vampire wrote: > I would vote for removing gnu.regexp Me too. Doing so removes what has become redundant functionality since the release of Java 1.4 now years ago. Seems like a lot of work, I was thinking of it as I was writing a mode file. Yet, it will be helpful for new people who will expect the code to use Java regex, and one would think the gnu.regex will cease to be maintained. Andy > Marcelo Vanzin wrote: > >Slava Pestov wrote: > >>Which reminds me, gnu.regexp should go as well. Duplicating code that's > >>in the Java > >>core library just wastes memory. Anybody feel like spending a few hours > >>refactoring? :) > > > >So I started playing with changing gnu.regexp to java.util.regex. I have > >the syntax highlighting working (still will have to fix a bunch of > >modes, since the syntax is slightly different), and I also changed the > >VFS system (haven't tested yet, but there shouldn't be any problems - RE > >usage there was very simple). The next step is the search engine. > > > >This will mean breaking backwards compatibility in two ways: > > > >(i) The valid regexps for searching will change from whatever RESyntax > >was being used (apparently some sort of Perl-compatible syntax from a > >quick look at the code) to the syntax accepted by the > >java.util.regex.Pattern class. This is the user-visible part. > > > >(ii) Internally a lot will have to change, including some classes that > >will have to be rewritten (RESearchMatcher comes to mind). > > > >I haven't yet assessed how much API-level things will have to change, > >btut it's safe to say that if you in some way try to use more obscure > >functionality of the search system, things might break for you. > > > >Given that, is this OK or should we keep the current code using > > gnu.regexp? |