1" Vim syntax file 2" Language: Sather/pSather 3" Maintainer: Claudio Fleiner <[email protected]> 4" URL: http://www.fleiner.com/vim/syntax/sather.vim 5" Last Change: 2003 May 11 6 7" Sather is a OO-language developped at the International Computer Science 8" Institute (ICSI) in Berkeley, CA. pSather is a parallel extension to Sather. 9" Homepage: http://www.icsi.berkeley.edu/~sather 10" Sather files use .sa as suffix 11 12" quit when a syntax file was already loaded 13if exists("b:current_syntax") 14 finish 15endif 16 17" keyword definitions 18syn keyword satherExternal extern 19syn keyword satherBranch break continue 20syn keyword satherLabel when then 21syn keyword satherConditional if else elsif end case typecase assert with 22syn match satherConditional "near$" 23syn match satherConditional "far$" 24syn match satherConditional "near *[^(]"he=e-1 25syn match satherConditional "far *[^(]"he=e-1 26syn keyword satherSynchronize lock guard sync 27syn keyword satherRepeat loop parloop do 28syn match satherRepeat "while!" 29syn match satherRepeat "break!" 30syn match satherRepeat "until!" 31syn keyword satherBoolValue true false 32syn keyword satherValue self here cluster 33syn keyword satherOperator new "== != & ^ | && || 34syn keyword satherOperator and or not 35syn match satherOperator "[#!]" 36syn match satherOperator ":-" 37syn keyword satherType void attr where 38syn match satherType "near *("he=e-1 39syn match satherType "far *("he=e-1 40syn keyword satherStatement return 41syn keyword satherStorageClass static const 42syn keyword satherExceptions try raise catch 43syn keyword satherMethodDecl is pre post 44syn keyword satherClassDecl abstract value class include 45syn keyword satherScopeDecl public private readonly 46 47 48syn match satherSpecial contained "\\\d\d\d\|\\." 49syn region satherString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=satherSpecial 50syn match satherCharacter "'[^\\]'" 51syn match satherSpecialCharacter "'\\.'" 52syn match satherNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" 53syn match satherCommentSkip contained "^\s*\*\($\|\s\+\)" 54syn region satherComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+$\|"+ contains=satherSpecial 55syn match satherComment "--.*" contains=satherComment2String,satherCharacter,satherNumber 56 57 58syn sync ccomment satherComment 59 60" Define the default highlighting. 61" Only when an item doesn't have highlighting yet 62command -nargs=+ HiLink hi def link <args> 63 64HiLink satherBranch satherStatement 65HiLink satherLabel satherStatement 66HiLink satherConditional satherStatement 67HiLink satherSynchronize satherStatement 68HiLink satherRepeat satherStatement 69HiLink satherExceptions satherStatement 70HiLink satherStorageClass satherDeclarative 71HiLink satherMethodDecl satherDeclarative 72HiLink satherClassDecl satherDeclarative 73HiLink satherScopeDecl satherDeclarative 74HiLink satherBoolValue satherValue 75HiLink satherSpecial satherValue 76HiLink satherString satherValue 77HiLink satherCharacter satherValue 78HiLink satherSpecialCharacter satherValue 79HiLink satherNumber satherValue 80HiLink satherStatement Statement 81HiLink satherOperator Statement 82HiLink satherComment Comment 83HiLink satherType Type 84HiLink satherValue String 85HiLink satherString String 86HiLink satherSpecial String 87HiLink satherCharacter String 88HiLink satherDeclarative Type 89HiLink satherExternal PreCondit 90delcommand HiLink 91 92let b:current_syntax = "sather" 93 94" vim: ts=8 95