Mike Roberts a écrit :
What would the interest level be in an expanded regular expression parser/matcher?

It is up to Neil to really answer, but I believe there was two motivations to choose the current engine: no string attached (public domain), seems OK with your, and small size (no bloat). Here, I don't know how much bytes it will add to Scintilla.

Beside, on my personal side, I would welcome better regexes, sometime I miss not to have alternation or non-greedy matches, etc.

There are four drawbacks. The first, and probably biggest, is that it follows my own coding style, which is rather different from Scintilla's. Either we'd have to live with the inconsistency, or someone would have to go through and reformat the code. The latter would be ideal, obviously, but it's a fairly big job (~3500 lines) that I'm afraid I can't volunteer for.

Well, Neil routinely runs (or ran?) a source code beautifier to put foreign code in Scintilla's norms. Or he can just leave the file as is, RESearch.cxx is still not 100% conformant to Scintilla coding rules.

The third drawback is relatively minor: my RE syntax has a few small differences from the canonical Unix-style RE syntax - e.g., the quoting character is "%" rather than "\". It would probably be desirable to fix that; this isn't a big job.

Looks like Lua's regular expressions...

The fourth problem is that the code only handles SBCS. My original version actually does all its work in UTF-8 (a multibyte Unicode encoding), so the infrastructure is there for MBCS handling - but for the Scintilla conversion I only accounted for single-byte characters. For proper MBCS support, it would be necessary to retrofit whatever Scintilla's standard mechanism is. This wouldn't be too hard, as all string access is already encapsulated as a class; but it's obviously work, and as with the reformatting I probably wouldn't be able to volunteer.

Well, current RE engine doesn't handle them either (AFAIK), but better support for that would be nice for some users.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to