" Vim syntax file " Language: CSC258 Assembler (ax) " Maintainer: David Wolever " Last Change: Nov. 6, 2007 syntax clear syn case ignore " Everything that isn't a command, data or comment is an error! syn match asmError "[^ \t]" contains=asmCommand,asmData,asmComment " The list of valid keywords, which can be followed by a constant or label syn keyword asmCommand LDA STA ADD SUB MUL DIV MOD FLA FLS FLM FLD CIF CFI AND IOR XOR BUN BZE BSA BIN INP OUT nextgroup=asmConst,asmLabel syn match asmLabel " .\{-}\>" nextgroup=asmInlineComment contained syn match asmConst " C[0-9]\+" nextgroup=asmInlineComment contained syn match asmInlineComment " .*" contained syn match asmComment "#.*" syn match asmNumber "I[ \t]\+-\?[0-9]\+"hs=s+1 syn match asmNumber "W[ \t]\+[0-9]\+"hs=s+1 syn match asmNumber "F[ \t]\+-\?[0-9]\+\(\.[0-9]\+\)\?\(e[0-9]\+\)\?"hs=s+1 syn match asmNumber "B[ \t]\+[0-1]\{,32}"hs=s+1 syn match asmNumber "H[ \t]\+[0-9A-F]\{,8}"hs=s+1 syn match asmNumber "C[ \t]*'.\{,4}'"hs=s+1 syn match asmNumber "A[ \t]\+[a-zA-Z_-]\+"hs=s+1 syn match asmData "[AIWFBH][ \t]\+.\{-}" contains=asmNumber,asmError nextgroup=asmInlineComment syn match asmData "C[ \t]*'.\{-}'" contains=asmNumber,asmError nextgroup=asmInlineComment syn match asmLabelDef "[a-z_][a-z0-9_]*:"he=e-1 syn case match hi def link asmLabelDef Identifier hi def link asmLabel Identifier hi def link asmComment Comment hi def link asmInlineComment Comment hi def link asmCommand Statement hi def link asmData Statement hi def link asmNumber Number hi def link asmConst Number hi def link asmError Error let b:current_syntax = "ax" " vim: ts=8