<div dir="ltr"><div class="gmail_quote">On Wed, May 26, 2010 at 11:43 AM, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graemeg.lists@gmail.com">graemeg.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2010/5/25 Zaher Dirkey :<br>
<div class="im">> I beleave regex is not a good choice.<br>
> If you compare the speed you will find SynEdit is more faster.<br>
<br>
</div>Again, I think this is more related to implementation details. Some<br>
editors do it great, some others don't. Some of the editors I looked<br>
at that uses regular expressions for syntax highlighting, managed to<br>
open 10MB source code files (like the old macosall.pp unit) and syntax<br>
highlighting was instant (even when you scroll to the end of the<br>
file).<br>
<br>
So it is definitely *not* a hard and fast rule that if an editor uses<br>
regular expressions for syntax highlighting, that it is immediately<br>
slower than others.<font color="#888888"><br></font></blockquote><div><br>I meant the mechanism of SynEdit not SynEdit it self, Let us call "Line Feeding Highlighting", LFH if you like :P <br>RegEx used on whale file in memory, but that LFH do it line by line, you can generate the colored and syntax online without load it in memory, just line by line. <br>
SynEdit use that way the LFH one.<br><br>in fact i like FSHL (PHP), you can make the rules by the engine create the scanner source from it and it use the generated one, the rules is more easy than (SynEdit mechanism)<br><a href="http://www.hvge.sk/scripts/fshl/">http://www.hvge.sk/scripts/fshl/</a><br>
<a href="http://code.google.com/p/fshl/">http://code.google.com/p/fshl/</a><br><br>Best Regards<br><br></div></div>-- <br>Zaher Dirkey<br>
</div>