> <mailto:
mike.l...@googlemail.com>> wrote:
>> Look inside LexCPP.cxx for the "standalone" js lexer :)
>
> Ugh, how on earth did a javascript lexer end up in the c++ lexer? There's another one
> in the HTML lexer, so .. duplicate code probably.
>
> It is common (but bad IMHO) to mix together languages that have a superficial syntactic
> similarity, for example ctags has *parsers* for most of the { } languages in one totally
> unmaintainable file.
There is no LexJava either, for example. Indeed, a number of "C-like languages" have been
put in this lexer, mostly because a Scintilla lexer acts only on a superficial level, so
it is OK for all these languages. If you look at it, it doesn't has so much contortions to
address a specific flavor. If a language differs too much (like allowing to nest block
comments, etc.), it forks this lexer (but now, indeed, we have to remove some fluff).
--
Philippe Lhoste
-- (near) Paris -- France
--
http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --