; TextPad syntax definitions for D ; Written by Benji Smith, benji@benjismith.net ; ; Based on versions 1.034 and 2.0.18 of the language specification: ; ; D1: http://digitalmars.com/d/1.0/index.html ; D2: http://digitalmars.com/d/2.0/index.html ; ; Highlights include: ; ; * The [Keywords 1] section contains all language keywords, as well as a few common ; aliases and typedefs (like 'string' and 'size_t'), which aren't technically part ; of the language, but still deserve high-priority syntax highlighting status. ; ; * The [Keywords 2] section contains all of the directives recognized by D's inline ; assembler (omitting cases like 'align' that conflict with an already-defined D ; language keyword). ; ; * The [Keywords 3] section contains all of the register names recognized by D's ; inline assembler (omitting cases like 'ds', where those keywords conflict with an ; already-defined keyword from the D language or the D inline assembler directives). ; ; * The [Keywords 4] section contains all of the CPU opcodes recognized by D's inline ; assembler (omitting cases like 'int' or 'out', where those keywords conflict with ; an already-defined keyword from the D language, the D inline assembler directives, ; or the D inline assemblyer register names). ; ; Originally, I also planned on using the [Keywords 5] section to include all of the ; public modules, classes, aliases, typedefs, and structs from both the Phobos and Tango ; libraries, and using the [Keywords 6] section to include all of the public functions ; and methods from both the Phobos and Tango libraries. ; ; But I haven't figured out a good way of creating those lists, so I've left them empty. ; C=1 [Syntax] Namespace1 = 6 IgnoreCase = No KeyWordLength = BracketChars = {[()]} OperatorChars = !$%&*+,-./:<=>?^|~ PreprocStart = SyntaxStart = SyntaxEnd = HexPrefix = 0x CommentStart = /* CommentEnd = */ CommentStartAlt = /+ CommentEndAlt = +/ SingleComment = // SingleCommentCol = SingleCommentAlt = SingleCommentColAlt = SingleCommentEsc = StringsSpanLines = Yes StringStart = " StringEnd = " StringAlt = ` StringEsc = \ CharStart = ' CharEnd = ' CharEsc = \ [Keywords 1] ; D language keywords (plus "size_t" and "char_t", which aren't language keywords, but ; are common enough to be included here) __FILE__ __LINE__ __traits _argptr _arguments abstract alias align asm assert auto body bool break byte case cast catch cdouble cent cfloat char char_t class const continue creal dchar debug default delegate delete deprecated do double else enum export extern false final finally float for foreach foreach_reverse function goto idouble if ifloat import in inout int interface invariant ireal is lazy long macro mixin module new nothrow null out override package pragma private protected public pure real ref return scope short size_t static struct super switch synchronized template this throw true try typedef typeid typeof ubyte ucent uint ulong union unittest ushort version void volatile wchar while with [Keywords 2] ; Inline Assembler Keywords __local_size db dd de df di dl ds dword even far naked near ptr qword word [Keywords 3] ; Inline Assembler Registers ; (excluding those already defined as assembler keywords) ah al ax bh bl bp bx ch cl cr0 cr2 cr3 cr4 cs cx dh dr0 dr1 dr2 dr3 dr6 dr7 dx eax ebp ebx ecx edi edx es esi esp fs gs mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 si sp ss st st(0) st(1) st(2) st(3) st(4) st(5) st(6) st(7) tr3 tr4 tr5 tr6 tr7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 [Keywords 4] ; Inline Assembler Opcodes ; (excluding those already defined as assembler or D keywords) aaa aad aam aas adc add addpd addps addsd addss addsubpd addsubps and andnpd andnps andpd andps arpl bound bsf bsr bswap bt btc btr bts call cbw cdq clc cld clflush cli clts cmc cmova cmovae cmovb cmovbe cmovc cmove cmovg cmovge cmovl cmovle cmovna cmovnae cmovnb cmovnbe cmovnc cmovne cmovng cmovnge cmovnl cmovnle cmovno cmovnp cmovns cmovnz cmovo cmovp cmovpe cmovpo cmovs cmovz cmp cmppd cmpps cmps cmpsb cmpsd cmpss cmpsw cmpxch8b cmpxchg comisd comiss cpuid cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtpi2ps cvtps2dq cvtps2pd cvtps2pi cvtsd2si cvtsd2ss cvtsi2sd cvtsi2ss cvtss2sd cvtss2si cvttpd2dq cvttpd2pi cvttps2dq cvttps2pi cvttsd2si cvttss2si cwd cwde da daa das dec div divpd divps divsd divss dq dt dw emms enter f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp feni ffree fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fwait fxam fxch fxrstor fxsave fxtract fyl2x fyl2xp1 haddpd haddps hlt hsubpd hsubps idiv imul inc ins insb insd insw into invd invlpg iret iretd ja jae jb jbe jc jcxz je jecxz jg jge jl jle jmp jna jnae jnb jnbe jnc jne jng jnge jnl jnle jno jnp jns jnz jo jp jpe jpo js jz lahf lar lddqu ldmxcsr lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw lock lods lodsb lodsd lodsw loop loope loopne loopnz loopz lsl lss ltr maskmovdqu maskmovq maxpd maxps maxsd maxss mfence minpd minps minsd minss monitor mov movapd movaps movd movddup movdq2q movdqa movdqu movhlps movhpd movhps movlhps movlpd movlps movmskpd movmskps movntdq movnti movntpd movntps movntq movq movq2dq movs movsb movsd movshdup movsldup movss movsw movsx movupd movups movzx mul mulpd mulps mulsd mulss mwait neg nop not or orpd orps outs outsb outsd outsw packssdw packsswb packuswb paddb paddd paddq paddsb paddsw paddusb paddusw paddw pand pandn pavgb pavgusb pavgw pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pextrw pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfnacc pfpnacc pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pinsrw pmaddwd pmaxsw pmaxub pminsw pminub pmovmskb pmulhrw pmulhuw pmulhw pmullw pmuludq pop popa popad popf popfd por prefetchnta prefetcht0 prefetcht1 prefetcht2 psadbw pshufd pshufhw pshuflw pshufw pslld pslldq psllq psllw psrad psraw psrld psrldq psrlq psrlw psubb psubd psubq psubsb psubsw psubusb psubusw psubw pswapd punpckhbw punpckhdq punpckhqdq punpckhwd punpcklbw punpckldq punpcklqdq punpcklwd push pusha pushad pushf pushfd pxor rcl rcpps rcpss rcr rdmsr rdpmc rdtsc rep repe repne repnz repz ret retf rol ror rsm rsqrtps rsqrtss sahf sal sar sbb scas scasb scasd scasw seta setae setb setbe setc sete setg setge setl setle setna setnae setnb setnbe setnc setne setng setnge setnl setnle setno setnp setns setnz seto setp setpe setpo sets setz sfence sgdt shl shld shr shrd shufpd shufps sidt sldt smsw sqrtpd sqrtps sqrtsd sqrtss stc std sti stmxcsr stos stosb stosd stosw str sub subpd subps subsd subss sysenter sysexit test ucomisd ucomiss ud2 unpckhpd unpckhps unpcklpd unpcklps verr verw wait wbinvd wrmsr xadd xchg xlat xlatb xor xorpd xorps [Keywords 5] ; Phobos Modules, Classes, Aliases, Typedefs, and Structs ; Tango Modules, Classes, Aliases, Typedefs, and Structs ; (excluding those already defined in the Phobos section) [Keywords 6] ; Phobos Functions & Methods ; Tango Functions & Methods ; (excluding those already defined in the Phobos section)