GPFault 0 Report post Posted February 13, 2006 Hi! i was very surprised, when i found that ndn.hgl can`t highlight C++ correctly (the highlighter for C and C++ was the same) So highlighter for C++ and some others(ndn configs, batch) was created/enchanced. IMHO all highlightings in file below are improved, but i understand that someone may think opposite - there is some ambiguous changes, so i offer it here, even if they won`t be included in NDN package i hope they may be useful for users. (the file is attached to this post - forum forbids hgl extension) cndnbat.txt There is many compicated regexps in highlighter, but it seems that highlighter speed doesn`t depend on complication of highlighter - it`s as slow as with highlighter with only 1 keyword my main principles in hihghliters are: 1.highlighter should highlight only keywords, not often used words (it may highlight often use words, but in another color and ALL or NONE words of this type(system lib, standard constants etc.)) 2.A highlighter highlights correct construction. A GOOD highlighter doesn`t highlight wrong construction. unfortuantly, ndn highlighter now isn`t so great to make 2 possible, but i`ve made some attempts Main changes: *.HGL colorkeywords is now set to on and colors names are removed from keywords2 the problem is that color identical to bg is invisible keywords3 added macros rewritten NDN configs highlighting completly rewritten(really created) .bat rewritten - enhanced, but also try to be Windows 9x compatible (for NT+ exist .cmd - maybe i`ll create enhanced highlighter for it a little later) config.sys - rewritten/created C/C++: why was "autobrackets off" in hgl file?????(other languages too) imho, if user don`t want them he may disable in menu. i`ve commented it. do while pair in C/C++ is not added as a bracket pair because while may be used independent note:C/C++ Trigraphs (??= insted of #) and alternative tokens like %: instead of # are not highlighted i`ve never see a code with it C: (1999 ISO standard) (i don`t mean that highlight conform standard, standard was only used as source of information - so there is no any extension-keywords etc.(asm, for example)) note: _Bool,_Complex,_Imaginary are from standard! preprocessor highlight enchanced no nested commanets L"string" L'C' support ll number suffix support macros rewritten C++:(created) (2003 ISO standard) (i don`t mean that highlight conform standard, standard was only used as source of information - so there is no any extension-keywords etc.(typeof, for exapmple)) C++ keywords, and see C above Sorry for some very long lines in hgl file. i`ve tired of resplitting them after minor changes. Also i hope it may improve perfomance. i checked they are less than 255 - the may-lead-to-bugs-everywhere number :) Share this post Link to post Share on other sites
AngelsHolocaust 0 Report post Posted February 14, 2006 hi i would like to ask all users to check this and give their opinion since i don't want to/can't decide myself thanks GP Stefan / AH Share this post Link to post Share on other sites