regular expression engine and ranges

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 2 15:05:37 PST 2014


On Tue, 02 Dec 2014 22:47:05 +0000
MrSmith via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> IIRC, there was a request for ranged regex in phobos somewhere.
> Is there anything simple that can be easily ported?
i don't think so. i.e. there are either very simple and barely usable
engines, or complex and hard to port ones. maybe i'll port TRE engine
someday, but for now i don't want to do that.

> Btw, do you use ropes for text? What do you use for storing 
> lines, wrapped lines and text style?
i don't care about wrapping. as for other things -- it's a slightly
modified piece chains which maps down to paging system, with "line
chunks" that keeps some line info together (such as line length, state
of the syntax highlighter in the beginning of the line and so on).
style is generally aplied to the whole piece of text, with occasional
"special marks" inside piece if engine decides that breaking the given
piece for restyling is silly thing.

this is more the experiment in various structures for text processing
than a real editor, so some of structures are stupid and others are
overcomplicated, it allocates like crazy and so on.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141203/b6f923b7/attachment.sig>


More information about the Digitalmars-d-learn mailing list