dmgtris/tools/Highlighters/WLA DX Z80 Assembler.chl

185 lines
7.7 KiB
Plaintext

//////////////////////////////////////////////////////////////////////////////
//
// Z80 Assembly plus WLA DX keywords highlighter written by Maxim, maxim@mwos.cjb.net
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// language name
Language: WLA-Z80 Assembler
//////////////////////////////////////////////////////////////////////////////
// put whatever you want here, short description, author name, email address..
Description: Z80 Assembly highlighter including WLA DX keywords, written by Maxim, maxim@mwos.cjb.net Keywords1 = Z80 opcodes; Keywords2 = Z80 registers; Keywords3 = Z80 opcode parameters; Keywords4 = WLA keywords; Keywords5 = WLA keyword parameters
//////////////////////////////////////////////////////////////////////////////
// default file filter
// note: if more than one extension is associated, eg:
// C/C++ files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp
Filter: Z80 Assembler files (*.asm,*.inc,*.dat,*.z80)|*.asm;*.inc;*.dat;*.z80
//////////////////////////////////////////////////////////////////////////////
// help file which will be invoked when F1 is pressed
HelpFile:
//////////////////////////////////////////////////////////////////////////////
// language case sensitivity
// 0 - no
// 1 - yes
CaseSensitive: 0
//////////////////////////////////////////////////////////////////////////////
// comment type: LineComment - comment to the EOL
// BlockCommentBeg - block comment begin, it could be
// multiline
// BlockCommentEnd - block comment end
//
// if there is more than one definition of line/beg/end comment string,
// you can separate it with spaces.
// for example, for pascal it would be:
// LineComment: //
// BlockCommentBeg: (* {
// BlockCommentEnd: *) }
LineComment: ;
BlockCommentBeg: /*
BlockCommentEnd: */
//////////////////////////////////////////////////////////////////////////////
// identifier characters
// note: characters shouldn't be delimited, except arrays
// array of chars could be defined as from_char..to_char
IdentifierBegChars: a..z A..Z _ .
IdentifierChars: a..z A..Z 0..9 _ .
//////////////////////////////////////////////////////////////////////////////
// numeric constants begin characters
// note: characters shouldn't be delimited, except arrays
// array of chars could be defined as from_char..to_char
// number always starts with 0..9 except when NumConstBeg
// defines other
NumConstBegChars: 0..9 $ %
//////////////////////////////////////////////////////////////////////////////
// numeric constants characters
// note: characters shouldn't be delimited, except arrays
// array of chars could be defined as from_char..to_char
// number always starts with 0..9 except when NumConstBeg
// defines other
NumConstChars: 0..9 a..f A..F . h
//////////////////////////////////////////////////////////////////////////////
// escape character
EscapeChar: \
//////////////////////////////////////////////////////////////////////////////
// keyword table
// note: delimited with spaces, lines could be wrapped
// you may divide keywords into five groups which can be
// highlighted differently
// Z80 opcodes
KeyWords1: adc add and bit call ccf cp cpd cpdr cpi cpir cpl daa dec di djnz ei ex exx halt im in inc ind indr ini inir jp jr ld ldd lddr ldi ldir neg nop or otdr otir out outd outi pop push res ret reti retn rl rla rlc rlca rld rr rra rrc rrca rrd rst sbc scf set sla sra srl sub xor
// registers
KeyWords2: a f b c d e h l af bc de hl ix iy i r af' sp pc
// Z80 opcode parameters
KeyWords3: z nz nc po pe p m
// WLA keywords
KeyWords4: .computesmschecksum .sdsctag .smstag .emptyfill .export .outname .asc .asctable .asciitable .asm .background .bank .block .br .breakpoint .byt .rombanksize .db .dbcos .dbrnd .dbsin .define .def .ds .dsb .dstruct .dsw .dw .dwcos .dwrnd .dwsin .else .enda .endasm .endb .ende .endif .endm .endme .endr .endro .ends .endst .enum .equ .fail .fclose .fopen .fread .fsize .if .ifdef .ifdefm .ifeq .ifexists .ifgr .ifgreq .ifle .ifleeq .ifndef .ifndefm .ifneq .incbin .incdir .include .input .macro .memorymap .org .orga .printt .printv .ramsection .redefine .redef .repeat .rept .rombankmap .rombanks .seed .section .shift .slot .struct .sym .symbol .unbackground .undefine .undef .word
// WLA keyword parameters and special things
KeyWords5: align args asc bank banks banksize bankstotal data db defaultslot desc ds dsb dsw dw export force free fsize instanceof map nargs overwrite read returnorg semifree size skip slot slotsize start superfree swap to
//////////////////////////////////////////////////////////////////////////////
// string delimiter: StringBegChar - string begin char
// StringEndChar - string end char
// MultilineStrings - enables multiline strings, as perl
// has it
StringBegChar: "
StringEndChar: "
MultilineStrings: 0
//////////////////////////////////////////////////////////////////////////////
// use preprocessor: 0 - no
// 1 - yes
// note: if yes, '#' and statements after it will be
// highlighted with Preprocessor defined colors
UsePreprocessor: 0
//////////////////////////////////////////////////////////////////////////////
// highlight line: 0 - no
// 1 - yes
// note: if yes, current line will be highlighted
CurrLineHighlighted: 0
//////////////////////////////////////////////////////////////////////////////
// colors
// note: first value is foreground, second is background color
// and third (optional) represents font attribute:
// B - bold
// I - italic
// U - underline
// S - strike out
// attributes can be combined: eg. B or BI
// as value, it could be used any standard windows color:
// clBlack, clMaroon, clGreen, clOlive, clNavy,
// clPurple, clTeal, clGray, clSilver, clRed, clLime,
// clYellow, clBlue, clFuchsia, clAqua, clLtGray,
// clDkGray, clWhite, clScrollBar, clBackground,
// clActiveCaption, clInactiveCaption, clMenu, clWindow,
// clWindowFrame, clMenuText, clWindowText, clCaptionText,
// clActiveBorder, clInactiveBorder, clAppWorkSpace,
// clHighlight, clHighlightText, clBtnFace, clBtnShadow,
// clGrayText, clBtnText, clInactiveCaptionText,
// clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText,
// clInfoBk
// as value, it could be used hex numeric constant too:
// $BBGGRR - BB: blue, GG: green, RR: red, eg: $FF6A00
SpaceCol: clWindowText clWindow
Keyword1Col: clNavy clWindow B
Keyword2Col: clPurple clWindow B
Keyword3Col: clNavy clWindow BI
IdentifierCol: clWindowText clWindow I
CommentCol: clNavy clWindow I
NumberCol: clRed clWindow
StringCol: clMaroon clWindow
SymbolCol: clGray clWindow
PreprocessorCol: clBlue clWindow
SelectionCol: clBlack $00C0C0C0
CurrentLineCol: clBlack $00FFFF00
OverrideTxtFgColor: 0
BlockAutoindent: 0
BlockBegStr:
BlockEndStr:
Keyword4Col: $00FF4040 clWindow
Keyword5Col: $00FF4040 clWindow I
MatchedBracesCol: clWindowText clGray