Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 1 | " 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 | |
| 8 | if version < 600 |
| 9 | syntax clear |
| 10 | elseif exists("b:current_syntax") |
| 11 | finish |
| 12 | endif |
| 13 | |
| 14 | syn keyword cocoKeywords ANY CHARACTERS COMMENTS COMPILER CONTEXT END FROM IF IGNORE IGNORECASE NESTED PRAGMAS PRODUCTIONS SYNC TO TOKENS WEAK |
| 15 | syn match cocoUnilineComment #//.*$# |
| 16 | syn match cocoIdentifier /[[:alpha:]][[:alnum:]]*/ |
| 17 | syn region cocoMultilineComment start=#/[*]# end=#[*]/# |
| 18 | syn region cocoString start=/"/ skip=/\\"\|\\\\/ end=/"/ |
| 19 | syn region cocoCharacter start=/'/ skip=/\\'\|\\\\/ end=/'/ |
| 20 | syn match cocoOperator /+\||\|\.\.\|-\|(\|)\|{\|}\|\[\|\]\|=\|<\|>/ |
| 21 | syn region cocoProductionCode start=/([.]/ end=/[.])/ |
| 22 | syn match cocoPragma /[$][[:alnum:]]*/ |
| 23 | |
| 24 | hi def link cocoKeywords Keyword |
| 25 | hi def link cocoUnilineComment Comment |
| 26 | hi def link cocoMultilineComment Comment |
| 27 | hi def link cocoIdentifier Identifier |
| 28 | hi def link cocoString String |
| 29 | hi def link cocoCharacter Character |
| 30 | hi def link cocoOperator Operator |
| 31 | hi def link cocoProductionCode Statement |
| 32 | hi def link cocoPragma Special |
| 33 | |