diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-09-30 21:47:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-09-30 21:47:56 +0200 |
commit | 4a74803ef837eeb4d4fc799ac9a26fc93e584111 (patch) | |
tree | 49d3d0a083a47078ae42a3b353a691e005d71ab6 /runtime/syntax | |
parent | c2a406b3179af3a77fb059288ead7266cdce2ac8 (diff) | |
download | vim-git-4a74803ef837eeb4d4fc799ac9a26fc93e584111.tar.gz |
Runtime file updates.
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/d.vim | 10 | ||||
-rw-r--r-- | runtime/syntax/falcon.vim | 155 | ||||
-rw-r--r-- | runtime/syntax/nasm.vim | 38 |
3 files changed, 182 insertions, 21 deletions
diff --git a/runtime/syntax/d.vim b/runtime/syntax/d.vim index e43487cd1..b7f5ebac8 100644 --- a/runtime/syntax/d.vim +++ b/runtime/syntax/d.vim @@ -2,8 +2,8 @@ " " Language: D " Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com> -" Last Change: 2010 Sep 9 -" Version: 0.21 +" Last Change: 2010 Sep 21 +" Version: 0.22 " " Contributors: " - Jason Mills <jasonmills@nf.sympatico.ca>: original Maintainer @@ -117,9 +117,9 @@ syn match dSharpBang "\%^#!.*" display syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute " Version Identifiers -syn match dVersion "version\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+7 contains=dVersionIdentifier -syn match dVersion "[^.]\s*\<version\>" -syn match dVersion "^\<version\>" +syn match dVersion "[^.]version" nextgroup=dVersionInside +syn match dVersion "^version" nextgroup=dVersionInside +syn match dVersionInside "([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier " Scope StorageClass syn match dStorageClass "scope" diff --git a/runtime/syntax/falcon.vim b/runtime/syntax/falcon.vim new file mode 100644 index 000000000..0ff500ccc --- /dev/null +++ b/runtime/syntax/falcon.vim @@ -0,0 +1,155 @@ +" Vim syntax file +" Language: Falcon +" Maintainer: Steven Oliver <oliver.steven@gmail.com> +" Website: http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim +" Credits: Thanks the ruby.vim authors, I borrowed a lot! +" ------------------------------------------------------------------------------- +" GetLatestVimScripts: 2745 1 :AutoInstall: falcon.vim + +" When wanted, highlight the trailing whitespace. +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match falconSpaceError "\s\+$" + endif + + if !exists("c_no_tab_space_error") + syn match falconSpaceError " \+\t"me=e-1 + endif +endif + +" Symbols +syn match falconSymbol "\(;\|,\|\.\)" +syn match falconSymbolOther "\(#\|@\)" display + +" Operators +syn match falconOperator "\(+\|-\|\*\|/\|=\|<\|>\|\*\*\|!=\|\~=\)" +syn match falconOperator "\(<=\|>=\|=>\|\.\.\|<<\|>>\|\"\)" + +" Clusters +syn region falconSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@falconStringSpecial fold +syn case match + +" Keywords +syn keyword falconKeyword all allp any anyp as attributes brigade cascade catch choice class const +syn keyword falconKeyword continue def directive do list dropping enum eq eval exit export from function +syn keyword falconKeyword give global has hasnt in init innerfunc lambda launch launch len List list +syn keyword falconKeyword load notin object pass print printl provides raise return self sender static to +syn keyword falconKeyword try xamp + +" Error Type Keywords +syn keyword falconKeyword CloneError CodeError Error InterruprtedError IoError MathError +syn keyword falconKeyword ParamError RangeError SyntaxError TraceStep TypeError + +" Todo +syn keyword falconTodo DEBUG FIXME NOTE TODO XXX + +" Conditionals +syn keyword falconConditional and case default else end if iff +syn keyword falconConditional elif or not switch select +syn match falconConditional "end\s\if" + +" Loops +syn keyword falconRepeat break for loop forfirst forlast formiddle while + +" Booleans +syn keyword falconBool true false + +" Constants +syn keyword falconConst PI E nil + +" Comments +syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)" +syn region falconComment start="/\*" end="\*/" contains=@falconCommentGroup,falconSpaceError,falconTodo +syn region falconCommentL start="//" end="$" keepend contains=@falconCommentGroup,falconSpaceError,falconTodo +syn match falconSharpBang "\%^#!.*" display +syn sync ccomment falconComment + +" Numbers +syn match falconNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal +syn match falconNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal +syn match falconHexadecimal contained "\<0x\x\+\>" +syn match falconOctal contained "\<0\o\+\>" +syn match falconIntLiteral contained "[+-]\<d\+\(\d\+\)\?\>" +syn match falconFloatLiteral contained "[+-]\=\d\+\.\d*" +syn match falconFloatLiteral contained "[+-]\=\d*\.\d*" + +" Includes +syn keyword falconInclude load import + +" Expression Substitution and Backslash Notation +syn match falconStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match falconStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display +syn region falconSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=falconStringEscape fold + +" Normal String and Shell Command Output +syn region falconString matchgroup=falconStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=falconStringEscape fold +syn region falconString matchgroup=falconStringDelimiter start="'" end="'" skip="\\\\\|\\'" fold +syn region falconString matchgroup=falconStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=falconStringEscape fold + +" Generalized Single Quoted String, Symbol and Array of Strings +syn region falconString matchgroup=falconStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region falconString matchgroup=falconStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape +syn region falconString matchgroup=falconStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape +syn region falconString matchgroup=falconStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape +syn region falconString matchgroup=falconStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape + +" Generalized Double Quoted String and Array of Strings and Shell Command Output +syn region falconString matchgroup=falconStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=falconStringEscape,falconDelimEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=falconStringEscape,falconDelimEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=falconStringEscape,falconDelimEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=falconStringEscape,falconDelimEscape fold + +syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend +syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend +syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ fold keepend +syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend + +syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend +syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend +syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ fold keepend +syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend + +" Syntax Synchronizing +syn sync minlines=10 maxlines=100 + +" Define the default highlighting +if !exists("did_falcon_syn_inits") + command -nargs=+ HiLink hi def link <args> + + HiLink falconKeyword Keyword + HiLink falconCommentString String + HiLink falconTodo Todo + HiLink falconConditional Keyword + HiLink falconRepeat Repeat + HiLink falconcommentSkip Comment + HiLink falconComment Comment + HiLink falconCommentL Comment + HiLink falconConst Constant + HiLink falconOperator Operator + HiLink falconSymbol Normal + HiLink falconSpaceError Error + HiLink falconHexadecimal Number + HiLink falconOctal Number + HiLink falconIntLiteral Number + HiLink falconFloatLiteral Float + HiLink falconStringEscape Special + HiLink falconStringDelimiter Delimiter + HiLink falconString String + HiLink falconBool Constant + HiLink falconSharpBang PreProc + HiLink falconInclude Include + HiLink falconSymbol Constant + HiLink falconSymbolOther Delimiter + delcommand HiLink +endif + +let b:current_syntax = "falcon" + +" vim: set sw=4 sts=4 et tw=80 : diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim index 6bbf33a9c..50cbe1ca0 100644 --- a/runtime/syntax/nasm.vim +++ b/runtime/syntax/nasm.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: NASM - The Netwide Assembler (v0.98) -" Maintainer: Manuel M.H. Stol <mmh.stol@gmx.net> -" Last Change: 2003 May 11 -" Vim URL: http://www.vim.org/lang.html -" NASM Home: http://www.cryogen.com/Nasm/ +" Maintainer: Andriy Sokolov <andriy145@gmail.com> +" Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl> +" Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl> +" Last Change: 2010 Sep 24 +" NASM Home: http://www.nasm.us/ @@ -160,6 +161,7 @@ syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure kee "syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro "syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure syn region nasmInMacPreConDef contained transparent matchgroup=nasmInMacPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(ctx\|def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(ctx\|def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnMacro,nasmInMacPreCondit,nasmInPreCondit +" Todo: allow STRUC/ISTRUC to be used inside preprocessor conditional block syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx @@ -210,15 +212,17 @@ syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPr syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel " Other pre-processor statements -syn match nasmPreProc "^\s*%rep\>"hs=e-3 +syn match nasmPreProc "^\s*%\(rep\|use\)\>"hs=e-3 syn match nasmPreProc "^\s*%line\>"hs=e-4 -syn match nasmPreProc "^\s*%\(clear\|error\)\>"hs=e-5 -syn match nasmPreProc "^\s*%endrep\>"hs=e-6 -syn match nasmPreProc "^\s*%exitrep\>"hs=e-7 +syn match nasmPreProc "^\s*%\(clear\|error\|fatal\)\>"hs=e-5 +syn match nasmPreProc "^\s*%\(endrep\|strlen\|substr\)\>"hs=e-6 +syn match nasmPreProc "^\s*%\(exitrep\|warning\)\>"hs=e-7 syn match nasmDefine "^\s*%undef\>"hs=e-5 syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6 syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7 +syn match nasmDefine "^\s*%unmacro\>"hs=e-7 syn match nasmInclude "^\s*%include\>"hs=e-7 +" Todo: Treat the line tail after %fatal, %error, %warning as text " Multiple pre-processor instructions on single line detection (obsolete) "syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+ @@ -231,6 +235,7 @@ syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCo syn match nasmGen08Register "\<[A-D][HL]\>" syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>" syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>" +syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WD]\|1[0-5][WD]\)\>" syn match nasmSegRegister "\<[C-GS]S\>" syn match nasmSpcRegister "\<E\=IP\>" syn match nasmFpuRegister "\<ST\o\>" @@ -298,20 +303,21 @@ syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P syn match nasmStdInstruction "\<POP\>" syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS -syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW -syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] +syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ +syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER -syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW +syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ syn keyword nasmStdInstruction JCXZ JECXZ JMP -syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD +syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD LODSQ syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS -syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVZX MUL NEG NOP NOT -syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW -syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW +syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT +syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ +syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW -syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW SUB +syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR +syn keyword nasmStdInstruction LFENCE MFENCE SFENCE " System Instructions: (usually privileged) |