Neil Hodgson wrote:
Kein-Hong Man:
Style is 8 bits. I would want to be very careful about how I use
those bits. Hijack the folding bits? Maybe, but that's a rather
bad way to implement things. Finally, I wouldn't want to go into
storing state information in the lexer itself.
There is an extra 32 bit word of per line lexer state available
through styler.GetLineState / SetLineState.
Thanks for the info. Affirms what I've been saying -- that I
should be doing some serious study before trying any non-trivial
solution. :-)
[snip]
Performance shouldn't be a concern here. One possible
simplification technique would be to always start lexing from the
beginning of the document for Perl. This would avoid any need for
backtracking or finding somewhere to stash state.
Yeah, there are many possible implementations. A similar approach
that might use a minimal of state bits would be to mark places
where the style is "well-defined", so any call to the lexer will
cause a quick rewind prior to lexing.
Anyway, I won't be looking into implementation details until I've
sorted out the glitches. If there are no simplified rules that can
be used, then the hard way might be inevitable.
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest