blob: 4094a553038f8747e98c5997859c7f85456d1221 [file] [log] [blame]
Bram Moolenaar8c8de832008-06-24 22:58:06 +00001" Vim syntax file
2" Language: Coco/R
3" Maintainer: Ashish Shukla <wahjava@gmail.com>
4" Last Change: 2007 Aug 10
5" Remark: Coco/R syntax partially implemented.
6" License: Vim license
7
8if version < 600
9 syntax clear
10elseif exists("b:current_syntax")
11 finish
12endif
13
14syn keyword cocoKeywords ANY CHARACTERS COMMENTS COMPILER CONTEXT END FROM IF IGNORE IGNORECASE NESTED PRAGMAS PRODUCTIONS SYNC TO TOKENS WEAK
15syn match cocoUnilineComment #//.*$#
16syn match cocoIdentifier /[[:alpha:]][[:alnum:]]*/
17syn region cocoMultilineComment start=#/[*]# end=#[*]/#
18syn region cocoString start=/"/ skip=/\\"\|\\\\/ end=/"/
19syn region cocoCharacter start=/'/ skip=/\\'\|\\\\/ end=/'/
20syn match cocoOperator /+\||\|\.\.\|-\|(\|)\|{\|}\|\[\|\]\|=\|<\|>/
21syn region cocoProductionCode start=/([.]/ end=/[.])/
22syn match cocoPragma /[$][[:alnum:]]*/
23
24hi def link cocoKeywords Keyword
25hi def link cocoUnilineComment Comment
26hi def link cocoMultilineComment Comment
27hi def link cocoIdentifier Identifier
28hi def link cocoString String
29hi def link cocoCharacter Character
30hi def link cocoOperator Operator
31hi def link cocoProductionCode Statement
32hi def link cocoPragma Special
33