codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: CHILL3" Maintainer: YoungSang Yoon <image@lgic.co.kr>4" Last change: 2004 Jan 215"6 7" first created by image@lgic.co.kr & modified by paris@lgic.co.kr8 9" CHILL (CCITT High Level Programming Language) is used for10" developing software of ATM switch at LGIC (LG Information11" & Communications LTd.)12 13 14" quit when a syntax file was already loaded15if exists("b:current_syntax")16 finish17endif18 19" A bunch of useful CHILL keywords20syn keyword chillStatement goto GOTO return RETURN returns RETURNS21syn keyword chillLabel CASE case ESAC esac22syn keyword chillConditional if IF else ELSE elsif ELSIF switch SWITCH THEN then FI fi23syn keyword chillLogical NOT not24syn keyword chillRepeat while WHILE for FOR do DO od OD TO to25syn keyword chillProcess START start STACKSIZE stacksize PRIORITY priority THIS this STOP stop26syn keyword chillBlock PROC proc PROCESS process27syn keyword chillSignal RECEIVE receive SEND send NONPERSISTENT nonpersistent PERSISTENT persistent SET set EVER ever28 29syn keyword chillTodo contained TODO FIXME XXX30 31" String and Character constants32" Highlight special characters (those which have a backslash) differently33syn match chillSpecial contained "\\x\x\+\|\\\o\{1,3\}\|\\.\|\\$"34syn region chillString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=chillSpecial35syn match chillCharacter "'[^\\]'"36syn match chillSpecialCharacter "'\\.'"37syn match chillSpecialCharacter "'\\\o\{1,3\}'"38 39"when wanted, highlight trailing white space40if exists("chill_space_errors")41 syn match chillSpaceError "\s*$"42 syn match chillSpaceError " \+\t"me=e-143endif44 45"catch errors caused by wrong parenthesis46syn cluster chillParenGroup contains=chillParenError,chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField47syn region chillParen transparent start='(' end=')' contains=ALLBUT,@chillParenGroup48syn match chillParenError ")"49syn match chillInParen contained "[{}]"50 51"integer number, or floating point number without a dot and with "f".52syn case ignore53syn match chillNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"54"floating point number, with dot, optional exponent55syn match chillFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"56"floating point number, starting with a dot, optional exponent57syn match chillFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"58"floating point number, without dot, with exponent59syn match chillFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"60"hex number61syn match chillNumber "\<0x\x\+\(u\=l\=\|lu\)\>"62"syn match chillIdentifier "\<[a-z_][a-z0-9_]*\>"63syn case match64" flag an octal number with wrong digits65syn match chillOctalError "\<0\o*[89]"66 67if exists("chill_comment_strings")68 " A comment can contain chillString, chillCharacter and chillNumber.69 " But a "*/" inside a chillString in a chillComment DOES end the comment! So we70 " need to use a special type of chillString: chillCommentString, which also ends on71 " "*/", and sees a "*" at the start of the line as comment again.72 " Unfortunately this doesn't very well work for // type of comments :-(73 syntax match chillCommentSkip contained "^\s*\*\($\|\s\+\)"74 syntax region chillCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=chillSpecial,chillCommentSkip75 syntax region chillComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=chillSpecial76 syntax region chillComment start="/\*" end="\*/" contains=chillTodo,chillCommentString,chillCharacter,chillNumber,chillFloat,chillSpaceError77 syntax match chillComment "//.*" contains=chillTodo,chillComment2String,chillCharacter,chillNumber,chillSpaceError78else79 syn region chillComment start="/\*" end="\*/" contains=chillTodo,chillSpaceError80 syn match chillComment "//.*" contains=chillTodo,chillSpaceError81endif82syntax match chillCommentError "\*/"83 84syn keyword chillOperator SIZE size85syn keyword chillType dcl DCL int INT char CHAR bool BOOL REF ref LOC loc INSTANCE instance86syn keyword chillStructure struct STRUCT enum ENUM newmode NEWMODE synmode SYNMODE87"syn keyword chillStorageClass88syn keyword chillBlock PROC proc END end89syn keyword chillScope GRANT grant SEIZE seize90syn keyword chillEDML select SELECT delete DELETE update UPDATE in IN seq SEQ WHERE where INSERT insert include INCLUDE exclude EXCLUDE91syn keyword chillBoolConst true TRUE false FALSE92 93syn region chillPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=chillComment,chillString,chillCharacter,chillNumber,chillCommentError,chillSpaceError94syn region chillIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+95syn match chillIncluded contained "<[^>]*>"96syn match chillInclude "^\s*#\s*include\>\s*["<]" contains=chillIncluded97"syn match chillLineSkip "\\$"98syn cluster chillPreProcGroup contains=chillPreCondit,chillIncluded,chillInclude,chillDefine,chillInParen,chillUserLabel99syn region chillDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup100syn region chillPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup101 102" Highlight User Labels103syn cluster chillMultiGroup contains=chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField104syn region chillMulti transparent start='?' end=':' contains=ALLBUT,@chillMultiGroup105" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'106syn match chillUserCont "^\s*\I\i*\s*:$" contains=chillUserLabel107syn match chillUserCont ";\s*\I\i*\s*:$" contains=chillUserLabel108syn match chillUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel109syn match chillUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel110 111syn match chillUserLabel "\I\i*" contained112 113" Avoid recognizing most bitfields as labels114syn match chillBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1115syn match chillBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1116 117syn match chillBracket contained "[<>]"118if !exists("chill_minlines")119 let chill_minlines = 15120endif121exec "syn sync ccomment chillComment minlines=" . chill_minlines122 123" Define the default highlighting.124" Only when an item doesn't have highlighting yet125 126hi def link chillLabel Label127hi def link chillUserLabel Label128hi def link chillConditional Conditional129" hi def link chillConditional term=bold ctermfg=red guifg=red gui=bold130 131hi def link chillRepeat Repeat132hi def link chillProcess Repeat133hi def link chillSignal Repeat134hi def link chillCharacter Character135hi def link chillSpecialCharacter chillSpecial136hi def link chillNumber Number137hi def link chillFloat Float138hi def link chillOctalError chillError139hi def link chillParenError chillError140hi def link chillInParen chillError141hi def link chillCommentError chillError142hi def link chillSpaceError chillError143hi def link chillOperator Operator144hi def link chillStructure Structure145hi def link chillBlock Operator146hi def link chillScope Operator147"hi def link chillEDML term=underline ctermfg=DarkRed guifg=Red148hi def link chillEDML PreProc149"hi def link chillBoolConst term=bold ctermfg=brown guifg=brown150hi def link chillBoolConst Constant151"hi def link chillLogical term=bold ctermfg=brown guifg=brown152hi def link chillLogical Constant153hi def link chillStorageClass StorageClass154hi def link chillInclude Include155hi def link chillPreProc PreProc156hi def link chillDefine Macro157hi def link chillIncluded chillString158hi def link chillError Error159hi def link chillStatement Statement160hi def link chillPreCondit PreCondit161hi def link chillType Type162hi def link chillCommentError chillError163hi def link chillCommentString chillString164hi def link chillComment2String chillString165hi def link chillCommentSkip chillComment166hi def link chillString String167hi def link chillComment Comment168" hi def link chillComment term=None ctermfg=lightblue guifg=lightblue169hi def link chillSpecial SpecialChar170hi def link chillTodo Todo171hi def link chillBlock Statement172"hi def link chillIdentifier Identifier173hi def link chillBracket Delimiter174 175 176let b:current_syntax = "chill"177 178" vim: ts=8179 