📄 tdedist.shl
字号:
; tde.shl -- stores descriptions of languages for syntax highlighting.
; Modified from elvis.syn by Steve Kirkendall and its contributors.
; Note: it requires four quotes ("""") for one individual quote (").
; semi-colons also need to be quoted (";").
; Define the colors
;background Blue
;normal Yellow
;bad Bright_red
;keyword White
;comment Grey
;function Bright_green
;string Bright_cyan
;character Bright_cyan
;integer Bright_cyan
;binary Bright_cyan
;octal Bright_cyan
;hex Bright_cyan
;real Bright_cyan
;preprocessor Cyan
;symbol White
;----------------------------------- C ------------------------------------
; Note that ".h" is not listed as a possible file name extension here since it
; could also be C++ code. The differences between the two are small, buf if
; we must guess, then C++ is the better choice because C++ declarations use a
; lot of keywords which are absent from C.
language c
pattern *.c
keyword asm continue extern long static void
keyword auto default float register struct volatile
keyword break do for return switch while
keyword case double goto short typedef public
keyword char else if signed union
keyword const enum int sizeof unsigned
; Add some implementation-specific keywords.
keyword near far typeof
; Add some common predefined stuff.
keyword FILE stdin stdout stderr size_t ssize_t time_t clock_t
keyword bool true false BOOL BOOLEAN TRUE FALSE
comment //
comment /* */
function (
preprocessor # spanline \
string """" spanline \
character ' 4
escape \
octal 0-
hex 0x-
startword _
inword _
innumber flu
c+k 3 Macro "\n \3\n"
c+k b Macro "\n{" c+k 3 "}"
c+k f Macro "(\0)" c+k b
PseudoMacro fo "r " c+k f ";;\l\l"
PseudoMacro if " " c+k f
PseudoMacro }i "\b\nelse if\p"
PseudoMacro }e "\b\nelse" c+k b GotoMark3
PseudoMacro wh "ile " c+k f
Pseudomacro do c+k b " while (\0);"
PseudoMacro sw "itch " c+k f
PseudoMacro ca
"se \0:"
c+k 3
"break;"
RecordMacro
PseudoMacro de
"fault:\n"
" \0\n"
"break;"
RecordMacro
PseudoMacro st "ruct \0" c+k b ";"
PseudoMacro un "ion \0" c+k b ";"
PseudoMacro #h "\binclude <\0.h>"
PseudoMacro #H "\binclude ""\0.h"""
PseudoMacro #d "efine "
c+k s+# Macro
c+k 3
"#else\n"
" \2\n"
"#endif"
RecordMacro
PseudoMacro #i "fdef \0" c+k s+#
PseudoMacro #I "\bif defined( \0 )" c+k s+#
PseudoMacro ma
"\b\bint main" c+k f " int argc, char* argv[] "
GotoMark3
"\0\n\n return 0;"
RecordMacro
UserMenu "{ }" c+k b
UserMenu "() { }" c+k f
UserMenu -
UserMenu "main" ma
UserMenu -
UserMenu "#include <>" #h
UserMenu "#include """"" #H
UserMenu "#define" #d
UserMenu "#ifdef" #i
UserMenu "#if defined" #I
UserMenu -
UserMenu "for" fo
UserMenu "if" if
UserMenu "else if" }i
UserMenu "else" }e
UserMenu "while" wh
UserMenu "do while" do
UserMenu "switch" sw
UserMenu "case" ca
UserMenu "default" de
UserMenu "struct" st
UserMenu "union" un
;---------------------------------- C++ -----------------------------------
; Same as C, but with a few extra keywords.
language c++ from c
pattern *.[ChH] *.cxx *.cc *.cpp *.hxx *.hh *.hpp
keyword bool inline template
keyword catch new this
keyword class operator throw
keyword delete private true
keyword false protected try
keyword friend virtual
; Common predefined C++ stuff.
keyword cin cout cerr
keyword istream ostream
keyword ifstream ofstream fstream
PseudoMacro cl
"ass \0" c+k b ";"
GotoMark3
"\bpublic:" c+k 3
"protected:\n\n"
"private:\n \2"
RecordMacro
PseudoMacro te "mplate <class >\l"
UserMenu "class" cl
UserMenu "template" te
;--------------------------------- Intel ----------------------------------
; Assembly - Intel style (MASM & TASM).
language intel
pattern *.asm *.inc
case ignore
binary -b
hex -h
string """"
character ' 0
; Let's treat (some) labels as functions
function :
comment ";"
; The comment directive is a little tricky. Since assembly doesn't have multi-
; line comments, you could probably fudge something with that.
comment comment
comment ^ ^
startword ?@_$%
inword ?@_$
; In case radix 16 is being used
innumber a-f
; Directives (taken from "IBM PC Assembly Language and Programming Second
; Edition", Peter Abel, 1991, Prentice-Hall International Edition).
preprocessor align alpha assume code comm const cref data data?
preprocessor db dd df dosseg dq dt dw else end endif endm endp ends equ
preprocessor err err1 err2 erre errnz errdef errndef errb errnb
preprocessor erridn erridni errdif errdifi
preprocessor even exitm extrn fardata fardata? group if if1 if2 ifb ifdef
preprocessor ifdif ifdifi ife ifidn ifidni ifnb ifndef include includelib irp
preprocessor irpc label lall lfcond list local macro model name org %out
preprocessor page proc public purge radix record rept sall segment seq
preprocessor sfcond stack struc subttl tfcond title union xall xcref xlist
; Operators. Use symbol or keyword? Since I have symbol in white, I'll use that,
; but if you like symbols in normal, you'll probably want to use keyword. (Some
; of them will be keywords, anyway.)
; Taken from the same place as above.
symbol and byte con dword dup eq far fword ge gt high le length line low lt
symbol mask mod ne near not nothing offset or ptr qword seg shl short shr size
symbol stack this tbyte type width word xor
; Instruction set taken from intel.doc that I got from their site (I think).
; Only goes up to the 486. Not sure if I have all variations. Corrections
; greatly appreciated.
; 8086
keyword AH AL BH BL CH CL DH DL
keyword AX BX CX DX SI DI SP BP
keyword CS DS ES SS SEGCS SEGDS SEGES SEGSS
keyword AAA CMPSW JAE JNE LDS MUL REPNZ STC
keyword AAD CWD JB JNG LEA NEG RET STD
keyword AAM DAA JBE JNGE LES NOP RETF STI
keyword AAS DAS JC JNL LOCK NOT RETN STOS
keyword ADC DEC JCXZ JNLE LODS OR ROL STOSB
keyword ADD DIV JE JNO LODSB OUT ROR STOSW
keyword AND ESC JG JNP LODSW POP SAHF SUB
keyword CALL HLT JGE JNS LOOP POPF SAL TEST
keyword CBW IDIV JL JNZ LOOPE PUSH SHL WAIT
keyword CLC IMUL JLE JO LOOPZ PUSHF SAR FWAIT
keyword CLD IN JMP JP LOOPNZ RCL SBB XCHG
keyword CLI INC JNA JPE LOOPNE RCR SCAS XLAT
keyword CMC INT JNAE JPO MOV REP SCASB XLATB
keyword CMP INTO JNB JS MOVS REPE SCASW XOR
keyword CMPS IRET JNBE JZ MOVSB REPZ SHL
keyword CMPSB JA JNC LAHF MOVSW REPNE SHR
; 80188
keyword BOUND INS INSW OUTS OUTSB OUTSW POPA PUSHA
keyword ENTER INSB LEAVE
; 286
keyword ARPL LAR LIDT LMSW LTR SIDT SMSW VERR
keyword CLTS LGDT LLDT LSL SGDT SLDT STR VERW
; 386
keyword EAX EBX ECX EDX EDI ESI EBP ESP
keyword FS GS SEGFS SEGGS
keyword CR0 CR2 CR3 TR4 TR5 TR6 TR7
keyword DR0 DR1 DR2 DR3 DR6 DR7
keyword BSF CWDE MOVSD PUSHFD SETE SETNB SETNLE SETPE
keyword BSR INSD MOVSX SCASD SETG SETNBE SETNO SETPO
keyword BT IRETD MOVZX SETA SETGE SETNC SETNP SETS
keyword BTC JECXZ OUTSD SETAE SETL SETNE SETNS SETZ
keyword BTR LFS POPAD SETB SETLE SETNG SETNZ SHLD
keyword BTS LGS POPFD SETBE SETNA SETNGE SETO SHRD
keyword CDQ LODSD PUSHAD SETC SETNAE SETNL SETP STOSD
keyword CMPSD LSS
; 486
keyword BSWAP CMPXCHG INVD INVLPG WBINVD
; Maths/numeric coprocessor. Taken from "BC45\DOC\TD_ASM.TXT".
; 8087/287
keyword ST
keyword F2XM1 FCOMP FFREE FINIT FLDL2E FNSTS FSQRT FSUBRP
keyword FABS FCOMPP FIACOM FIST FLDL2T FPATAN FST FTST
keyword FADD FDECSTP FIACOMP FISTP FLDLG2 FPREM FSTCW FWAIT
keyword FADDP FDISI FIADD FISUB FLDLN2 FPTAN FSTENV FXAM
keyword FBLD FDIV FIDIV FISUBR FLDPI FRNDINT FSTP FXCH
keyword FBSTP FDIVP FIDIVR FLD FLDZ FRSTOR FSTSW FXTRACT
keyword FCHS FDIVR FILD FLD1 FMUL FSAVENT FSUB FYL2X
keyword FCLEX FDIVRP FIMUL FLDCWR FMULP FSCALE FSUBP FYL2XPI
keyword FCOM FENI FINCSTP FLDENV FNOP FSETPM FSUBR
; 387
keyword FCOS FPREM1 FSIN FSINCOS FUCOM FUCOMP FUCOMPP
;---------------------------------- AT&T ----------------------------------
; Assembly - AT&T style (GAS). Taken from RHIDE's syntaxhl.shl file.
language at&t
pattern *.s
case ignore
hex 0x-
string """"
character ' 0
; Let's treat (some) labels as functions
function :
preprocessor #
comment /* */
startword ._
inword _
Keyword aaa aad aam aas adc adcb adcw adcl add addb addw addl and andb andw
Keyword andl arpl bound bsf bsr bswap bt btc btr bts lcall call cbw cbtw cdq
Keyword cltd clc cld cli clts cmc cmp cmpb cmpw cmpl cmps cmpsb cmpsw cmpsl
Keyword cmpxchg cwd cwtd cwde cwtl daa das dec decb decw decl div divw divl
Keyword enter esc hlt idiv idivw idivl imul imulw imull in inb inw inl inc
Keyword incb incw incl ins insb insw insl int into invd invlpg iret iretd ja
Keyword jae jb jbe jc je jg jge jl jle jmp jna jnae jnb jnbe jnc jne jng
Keyword jnge jnl jnle jno jnp jns jnz jo jp jpe jpo js jz jcxz jecxz jmp
Keyword ljmp lahf lar lds lea leaw leal leave les lfs lgdt lidt lgs lldt
Keyword lmsw lock lods lodsb lodsw lodsl loop loope loopz loopnz loopne lsl
Keyword lss ltr mov movb movw movl movs movsb movsw movsl movsx movsbl
Keyword movsbw movswl movzx movzbl movzbw movzwl mul mulw mull neg negb negw
Keyword negl nop not notb notw notl or orb orw orl out outb outw outl outs
Keyword outsb outsw outsl pop popb popw popl popa popad popf popfd push
Keyword pushb pushw pushl pusha pushad pushf pushfd rcl rclb rclw rcll rcr
Keyword rcrb rcrw rcrl rep repe repz repne repnz ret retf rol rolb rolw roll
Keyword ror rorb rorw rorl sahf sal salb salw sall shl shlb shlw shll sar
Keyword sarb sarw sarl sbb sbbb sbbw sbbl scas scasb scasw scasl setae setnb
Keyword setb setnae setbe setna sete setz setne setnz setl setnge setge
Keyword setnl setle setng setg setnle sets setns setc setnc seto setno setp
Keyword setpe setnp setpo sgdt sidt shl shlb shlw shll shr shrb shrw shrl
Keyword shld shldb shldw shldl shrd shrdb shrdw shrdl sldt smsw stc std sti
Keyword stos stosb stosw stosl str sub subb subw subl test testb testw testl
Keyword verr verw wait fwait wbinvd xchg xchgb xchgw xchgl xlat xlatb xor
Keyword xorb xorw xorl ax eax ah al bx ebx bh bl cx ecx ch cl dx edx dh dl
Keyword si esi di edi sp esp bp ebp cs ds ss es fs gs
; GAS specific
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -