| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
if exists("b:current_syntax") |
| 9 |
finish |
| 10 |
endif |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
syn region espeakReplace start="^\.replace"hs=s+9 end="^\."me=e-2,he=e-2 contains=espeakReplaceKeyword,espeakComment nextgroup=espeakReplaceKeyword |
| 15 |
syn match espeakReplaceKeyword /^\.replace/ contained |
| 16 |
|
| 17 |
|
| 18 |
syn region espeakRule start="^\.group"hs=s+6 end="^\."me=e-2,he=e-2 contains=espeakRuleGroupKeyword,espeakRuleName,espeakRuleLine,espeakKeyword,espeakComment nextgroup=espeaGroupName fold |
| 19 |
|
| 20 |
|
| 21 |
syn region espeakRuleLine start="^[^\.]" end="$" contains=espeak1Cols,espeak2Cols,espeak3Cols,espeak4Cols,espeak5Cols,espeakComment |
| 22 |
|
| 23 |
syn match espeakRuleCond /^?\!\{-}\d\+/ contained |
| 24 |
syn match espeakCharGroup /^\.L\d\{2}/ |
| 25 |
syn match espeakCharGroup /L\d\{2}/ contained |
| 26 |
syn match espeakRuleSymbol /[@#&ABCDHFGKNVXYZ]/ contained |
| 27 |
syn match espeakRuleSpecial /[_\-\/&%+<]/ contained |
| 28 |
syn match espeakRulePrePoFix /[SP]\d\+/ contained |
| 29 |
syn match espeakRuleNote /\(\$w_alt\d*\|\$p_alt\d*\|$noprefix\)/ contained |
| 30 |
syn match espeakComment "//.*$" contains=espeakTodo |
| 31 |
syn match espeakComment "//.*$" contains=espeakTodo contained |
| 32 |
syn match espeakTodo /\(TODO\|FIXME\|\!\!\!\)/ |
| 33 |
|
| 34 |
|
| 35 |
syn match espeakRuleGroupKeyword /^\.group/ nextgroup=espeakGroupName contained |
| 36 |
syn match espeakGroupName /\s*\S\+/ nextgroup=espeakComment contained |
| 37 |
syn match espeak1Cols /^\s*\S\+/ contains=espeakComment contained |
| 38 |
syn match espeak2Cols /^\s*\S\+\s\+\S\+/ contains=espeakRuleCond,espeakRuleSpell,espeakCharGroup,espeakComment contained |
| 39 |
syn match espeak3Cols /^\s*\S\+\s\+\S\+\s\+\S\+/ contains=espeakRuleCond,espeakRulePre,espeakRulePos,espeakRuleSpell,espeakComment contained |
| 40 |
syn match espeak4Cols /^\s*\S\+\s\+\S\+\s\+\S\+\s\+\S\+/ contains=espeakRuleCond,espeakRulePre,espeakRulePos,espeakRuleSpell,espeakComment contained |
| 41 |
syn match espeak5Cols /^\s*\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+/ contains=espeakRuleCond,espeakRulePre,espeakRulePos,espeakRuleSpell,espeakComment contained |
| 42 |
syn match espeakRulePre /\S\+)/ contains=espeakCharGroup,espeakRuleSymbol,espeakRuleSpecial contained |
| 43 |
syn match espeakRulePos /\s*(\S\+/ contains=espeakCharGroup,espeakRulePrePoFix,espeakRuleNote,espeakRuleSymbol,espeakRuleSpecial contained |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
hi link espeakReplace String |
| 49 |
hi link espeakRuleName Statement |
| 50 |
hi link espeakReplaceKeyword Statement |
| 51 |
hi link espeakRuleGroupKeyword Keyword |
| 52 |
hi link espeakRuleSpecial espeakRuleHiglight |
| 53 |
hi link espeakRuleNote espeakRuleHiglight |
| 54 |
hi link espeakRuleCond espeakRuleHiglight |
| 55 |
hi link espeakRulePrePoFix Keyword |
| 56 |
hi link espeakGroupName Character |
| 57 |
hi link espeakCharGroup espeakRuleDarklight |
| 58 |
hi link espeakRuleSymbol Special |
| 59 |
hi link espeak1Cols String |
| 60 |
hi link espeak2Cols String |
| 61 |
hi link espeak3Cols String |
| 62 |
hi link espeak4Cols String |
| 63 |
hi link espeak5Cols String |
| 64 |
hi link espeakRulePre Identifier |
| 65 |
hi link espeakRulePos Identifier |
| 66 |
hi link espeakError Error |
| 67 |
hi link espeakKeyword Keyword |
| 68 |
hi link espeakComment Comment |
| 69 |
hi link espeakTodo Todo |
| 70 |
hi espeakRuleHiglight guifg=magenta |
| 71 |
hi espeakRuleDarklight guifg=darkmagenta |
| 72 |
|
| 73 |
let b:current_syntax = "espeakrules" |
| 74 |
|
| 75 |
|