I've written a lexer for the Take Command / TCC scripting language (a superset of CMD.EXE), including folding for the DO / FOR / IFF commands. The lexer will also work with the older 4NT & 4DOS scripts.
There needs to be a set of definitions in Scintilla.iface for SCE_TCMD_*.
There are some warnings:
..\lexers\LexTCMD.cxx(54) : warning C4100: 'wbl' : unreferenced formal parameter
..\lexers\LexTCMD.cxx(258) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
..\lexers\LexTCMD.cxx(290) : warning C4018: '<' : signed/unsigned mismatch
..\lexers\LexTCMD.cxx(105) : warning C4189: 'keywords2' : local variable is initialized but not referenced
A reference to the license should be included in a similar form to, say, LexCmake.cxx. Otherwise I get asked what license this lexer is under.
The Scintilla source code is mirrored on many web sites, some of which will be scanned by spammers for email addresses. If you include your own email address in the code then it will receive spam.
Updated lextcmd.cxx and scintilla.iface with SCE_TCMD_* defines.
Replaced _strupr with portable code. See http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/rev/531fcf46cd54
There are several calls to is* functions from ctype.h which are not protected from non-ASCII characters. isascii or equivalent should always be used as a guard before isdigit, isspace, and so on as these functions are not defined for non-ASCII characters and will often cause failure messages, read out-of-bounds data or crash. For example, a UTF-8 file containing "rem颇" will hang in the Visual Studio debugger.