1" Vim syntax file 2" Language: Sather/pSather 3" Maintainer: Claudio Fleiner <claudio@fleiner.com> 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" For version 5.x: Clear all syntax items 13" For version 6.x: Quit when a syntax file was already loaded 14if version < 600 15 syntax clear 16elseif exists("b:current_syntax") 17 finish 18endif 19 20" keyword definitions 21syn keyword satherExternal extern 22syn keyword satherBranch break continue 23syn keyword satherLabel when then 24syn keyword satherConditional if else elsif end case typecase assert with 25syn match satherConditional "near$" 26syn match satherConditional "far$" 27syn match satherConditional "near *[^(]"he=e-1 28syn match satherConditional "far *[^(]"he=e-1 29syn keyword satherSynchronize lock guard sync 30syn keyword satherRepeat loop parloop do 31syn match satherRepeat "while!" 32syn match satherRepeat "break!" 33syn match satherRepeat "until!" 34syn keyword satherBoolValue true false 35syn keyword satherValue self here cluster 36syn keyword satherOperator new "== != & ^ | && || 37syn keyword satherOperator and or not 38syn match satherOperator "[#!]" 39syn match satherOperator ":-" 40syn keyword satherType void attr where 41syn match satherType "near *("he=e-1 42syn match satherType "far *("he=e-1 43syn keyword satherStatement return 44syn keyword satherStorageClass static const 45syn keyword satherExceptions try raise catch 46syn keyword satherMethodDecl is pre post 47syn keyword satherClassDecl abstract value class include 48syn keyword satherScopeDecl public private readonly 49 50 51syn match satherSpecial contained "\\\d\d\d\|\\." 52syn region satherString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=satherSpecial 53syn match satherCharacter "'[^\\]'" 54syn match satherSpecialCharacter "'\\.'" 55syn match satherNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" 56syn match satherCommentSkip contained "^\s*\*\($\|\s\+\)" 57syn region satherComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+$\|"+ contains=satherSpecial 58syn match satherComment "--.*" contains=satherComment2String,satherCharacter,satherNumber 59 60 61syn sync ccomment satherComment 62 63" Define the default highlighting. 64" For version 5.7 and earlier: only when not done already 65" For version 5.8 and later: only when an item doesn't have highlighting yet 66if version >= 508 || !exists("did_sather_syn_inits") 67 if version < 508 68 let did_sather_syn_inits = 1 69 command -nargs=+ HiLink hi link <args> 70 else 71 command -nargs=+ HiLink hi def link <args> 72 endif 73 74 HiLink satherBranch satherStatement 75 HiLink satherLabel satherStatement 76 HiLink satherConditional satherStatement 77 HiLink satherSynchronize satherStatement 78 HiLink satherRepeat satherStatement 79 HiLink satherExceptions satherStatement 80 HiLink satherStorageClass satherDeclarative 81 HiLink satherMethodDecl satherDeclarative 82 HiLink satherClassDecl satherDeclarative 83 HiLink satherScopeDecl satherDeclarative 84 HiLink satherBoolValue satherValue 85 HiLink satherSpecial satherValue 86 HiLink satherString satherValue 87 HiLink satherCharacter satherValue 88 HiLink satherSpecialCharacter satherValue 89 HiLink satherNumber satherValue 90 HiLink satherStatement Statement 91 HiLink satherOperator Statement 92 HiLink satherComment Comment 93 HiLink satherType Type 94 HiLink satherValue String 95 HiLink satherString String 96 HiLink satherSpecial String 97 HiLink satherCharacter String 98 HiLink satherDeclarative Type 99 HiLink satherExternal PreCondit 100 delcommand HiLink 101endif 102 103let b:current_syntax = "sather" 104 105" vim: ts=8 106