I have the pleasure to officially release (hoping for official
integration in Scintilla) a lexer for the AutoHotkey language
<http://www.autohotkey.com/>. There is a forum thread on the subject (if
you are interested by release notes) at:
http://www.autohotkey.com/forum/topic9656.html
The source file is available at:
http://file.autohotkey.net/PhiLho/LexAHK.cxx
The related .properties file is at:
http://file.autohotkey.net/PhiLho/ahk.properties
The needed changes to Scintilla are:
=> Scintilla.iface
# Lexical states for SCLEX_AHK
lex AHK=SCLEX_AHK SCE_AHK_
val SCE_AHK_DEFAULT=0
val SCE_AHK_COMMENTLINE=1
val SCE_AHK_COMMENTBLOCK=2
val SCE_AHK_ESCAPE=3
val SCE_AHK_SYNOPERATOR=4
val SCE_AHK_EXPOPERATOR=5
val SCE_AHK_STRING=6
val SCE_AHK_NUMBER=7
val SCE_AHK_IDENTIFIER=8
val SCE_AHK_VARREF=9
val SCE_AHK_LABEL=10
val SCE_AHK_WORD_CF=11
val SCE_AHK_WORD_CMD=12
val SCE_AHK_WORD_FN=13
val SCE_AHK_WORD_DIR=14
val SCE_AHK_WORD_KB=15
val SCE_AHK_WORD_VAR=16
val SCE_AHK_WORD_SP=17
val SCE_AHK_WORD_UD=18
val SCE_AHK_VARREFKW=19
val SCE_AHK_ERROR=20
=> SciLexer.h (generated!)
#define SCLEX_AHK 78
#define SCE_AHK_DEFAULT 0
#define SCE_AHK_COMMENTLINE 1
#define SCE_AHK_COMMENTBLOCK 2
#define SCE_AHK_ESCAPE 3
#define SCE_AHK_SYNOPERATOR 4
#define SCE_AHK_EXPOPERATOR 5
#define SCE_AHK_STRING 6
#define SCE_AHK_NUMBER 7
#define SCE_AHK_IDENTIFIER 8
#define SCE_AHK_VARREF 9
#define SCE_AHK_LABEL 10
#define SCE_AHK_WORD_CF 11
#define SCE_AHK_WORD_CMD 12
#define SCE_AHK_WORD_FN 13
#define SCE_AHK_WORD_DIR 14
#define SCE_AHK_WORD_KB 15
#define SCE_AHK_WORD_VAR 16
#define SCE_AHK_WORD_SP 17
#define SCE_AHK_WORD_UD 18
#define SCE_AHK_VARREFKW 19
#define SCE_AHK_ERROR 20
=> KeyWords.cxx
LINK_LEXER(lmAHK);
This language is a derivative of the original (v.2) AutoIt language,
itself inspired by batch files and some old automation language.
Hence the quite quirky syntax, enhanced by some improvements (expression
support). It can displease seasoned programmers (that's the reason for
the v.3 of AutoIt) but it seems to please non-programmers ("Wow! No need
for these ugly quotes around strings!"...).
This lexer is a work in progress, some enhancements need to use back
tracking, but it is already functionnal, I use it daily.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- --
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest