java_syntax 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. --- Syntax items ---
  2. htmlValue xxx match /=[\t ]*[^'" \t>][^ \t>]*/hs=s+1 contained contains=javaScriptExpression,@htmlPreproc
  3. links to Normal
  4. cCustomFunc xxx match /\w\+\s*\((\)\@=/
  5. links to Function
  6. cCustomClass xxx match /\w\+\s*\(::\)\@=/
  7. links to Function
  8. OperatorChars xxx match #?\|+\|-\|\*\|;\|:\|,\|<\|>\|&\||\|!\|\~\|%\|=\|)\|(\|{\|}\|\.\|\[\|\]\|/\(/\|*\)\@!#
  9. javaFold xxx start=/{/ end=/}/ transparent fold
  10. javaError xxx const goto
  11. match /[\\@`]/
  12. match +<<<\|\.\.\|=>\|||=\|&&=\|[^-]->\|\*\/+
  13. links to Error
  14. javaOK xxx match /\.\.\./
  15. javaError2 xxx match /#\|=</
  16. links to javaError
  17. javaExternal xxx native package
  18. match /\<import\>\(\s\+static\>\)\?/
  19. links to Include
  20. javaConditional xxx if else switch
  21. links to Conditional
  22. javaRepeat xxx do for while
  23. links to Repeat
  24. javaBoolean xxx true false
  25. links to Boolean
  26. javaConstant xxx null
  27. links to Constant
  28. javaTypedef xxx this super
  29. match /\.\s*\<class\>/ms=s+1
  30. links to Typedef
  31. javaOperator xxx new instanceof
  32. links to Operator
  33. javaType xxx float boolean long void double short char byte int
  34. links to Type
  35. javaStatement xxx return
  36. links to Statement
  37. javaStorageClass xxx transient strictfp serializable synchronized static final volatile
  38. links to StorageClass
  39. javaExceptions xxx finally catch try throw
  40. links to Exception
  41. javaAssert xxx assert
  42. links to Statement
  43. javaMethodDecl xxx synchronized throws
  44. links to javaStorageClass
  45. javaClassDecl xxx interface implements enum extends
  46. match /^class\>/
  47. match /[^.]\s*\<class\>/ms=s+1
  48. match /@interface\>/
  49. links to javaStorageClass
  50. javaAnnotation xxx match /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
  51. links to PreProc
  52. javaBranch xxx nextgroup=javaUserLabelRef skipwhite continue
  53. nextgroup=javaUserLabelRef skipwhite break
  54. links to Conditional
  55. javaUserLabelRef xxx match /\k\+/ contained
  56. links to javaUserLabel
  57. javaVarArg xxx match /\.\.\./
  58. links to Function
  59. javaScopeDecl xxx protected public private abstract
  60. links to javaStorageClass
  61. javaLabel xxx default
  62. links to Label
  63. javaNumber xxx match /\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>/
  64. match /\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=/
  65. match /\<\d\+[eE][-+]\=\d\+[fFdD]\=\>/
  66. match /\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>/
  67. links to Number
  68. javaCharacter xxx match /'[^']*'/ contains=javaSpecialChar,javaSpecialCharError
  69. match /'\\''/ contains=javaSpecialChar
  70. match /'[^\\]'/
  71. links to Character
  72. javaLabelRegion xxx matchgroup=javaLabel start=/\<case\>/ matchgroup=NONE end=/:/ transparent contains=javaNumber,javaCharacter
  73. javaUserLabel xxx match /^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:/he=e-1 contains=javaLabel
  74. links to Label
  75. javaTodo xxx contained TODO XXX FIXME
  76. links to Todo
  77. javaSpecial xxx match /\\u\d\{4\}/
  78. links to Special
  79. javaCommentStar xxx match +^\s*\*[^/]+me=e-1 contained
  80. match /^\s*\*$/ contained
  81. links to javaComment
  82. javaSpecialChar xxx match /\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)/ contained
  83. links to SpecialChar
  84. javaComment xxx start=+/\*+ end=+\*/+ contains=@javaCommentSpecial,javaTodo,@Spell
  85. match +/\*\*/+
  86. links to Comment
  87. javaLineComment xxx match +//.*+ contains=@javaCommentSpecial2,javaTodo,@Spell
  88. links to Comment
  89. javaString xxx start=/"/ end=/$/ end=/"/ contains=javaSpecialChar,javaSpecialError,@Spell
  90. links to String
  91. htmlError xxx match /[<>&]/ contained
  92. links to Error
  93. htmlSpecialChar xxx match /&#\=[0-9A-Za-z]\{1,8};/ contained
  94. links to Special
  95. htmlString xxx start=/"/ end=/"/ contained contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
  96. start=/'/ end=/'/ contained contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
  97. links to String
  98. htmlTagN xxx match /<\s*[-a-zA-Z0-9]\+/hs=s+1 contained contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
  99. match =</\s*[-a-zA-Z0-9]\+=hs=s+2 contained contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
  100. htmlTagError xxx match /[^>]</ms=s+1 contained
  101. links to htmlError
  102. htmlEndTag xxx start=+</+ end=/>/ contained contains=htmlTagN,htmlTagError
  103. links to Identifier
  104. htmlArg xxx contained below color name gutter span classid alt marginheight target rows bgcolor ismap cellspacing object codetype frame noshade data for bordercolor clip rowspan defer cellpadding shape usemap rules multiple start selected language summary hspace lowsrc type valign hreflang noresize scheme
  105. contained class visibility checked pagex pagey headers scrolling clear charset id id declare codebase tabindex standby version link accept coords alink background vspace wrap profile width compact marginwidth above content border top maxlength prompt dir value charoff height longdesc nowrap
  106. contained accesskey cols cite rel rev style method size src axis vlink valuetype colspan nohref face lang frameborder enctype readonly action left text url char align scope code disabled abbr datetime archive
  107. match /\<\(http-equiv\|href\|title\)=/me=e-1 contained
  108. match /\<z-index\>/ contained
  109. match /\<\(accept-charset\|label\)\>/ contained
  110. links to Type
  111. htmlTag xxx start=+<[^/]+ end=/>/ contained fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
  112. links to Function
  113. htmlTagName xxx contained marquee span ol thead pre blink tbody a p q s object legend frame acronym noframes blockquote var table input hr button bdo font caption sub del sup col basefont xmp iframe dfn html meta nobr fieldset optgroup option applet link area map li td th tr tt param center address small frameset
  114. contained label ul dir div kbd cite big layer form textarea base tfoot br strike samp select menu colgroup img nolayer spacer ilayer code abbr isindex dd ins dl dt noscript
  115. match /\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>/ contained
  116. links to htmlStatement
  117. htmlSpecialTagName xxx contained script style
  118. links to Exception
  119. htmlCommentPart xxx start=/--/ end=/--\s*/ contained contains=@htmlPreproc,@Spell
  120. links to Comment
  121. htmlCommentError xxx match /[^><!]/ contained
  122. links to htmlError
  123. htmlComment xxx start=/<!/ end=/>/ contained contains=htmlCommentPart,htmlCommentError,@Spell
  124. start=/<!DOCTYPE/ end=/>/ contained keepend
  125. links to Comment
  126. htmlPreStmt xxx match /<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>/ contained
  127. links to PreProc
  128. htmlPreError xxx match /<!--#\S*/ms=s+4 contained
  129. links to Error
  130. htmlPreAttr xxx match /\w\+=[^"]\S\+/ contained contains=htmlPreProcAttrError,htmlPreProcAttrName
  131. start=/\w\+="/ skip=/\\\\\|\\"/ end=/"/ contained keepend contains=htmlPreProcAttrName
  132. links to String
  133. htmlPreProc xxx start=/<!--#/ end=/-->/ contained contains=htmlPreStmt,htmlPreError,htmlPreAttr
  134. links to PreProc
  135. htmlPreProcAttrError xxx match /\w\+=/he=e-1 contained
  136. links to Error
  137. htmlPreProcAttrName xxx match /\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)=/he=e-1 contained
  138. links to PreProc
  139. htmlLink xxx start=/<a\>\_[^>]*\<href\>/ end=+</a>+me=e-4 contained contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
  140. links to Underlined
  141. htmlBoldUnderline xxx start=/<u\>/ end=+</u>+me=e-4 contained contains=@htmlTop,htmlBoldUnderlineItalic
  142. htmlBoldItalic xxx start=/<i\>/ end=+</i>+me=e-4 contained contains=@htmlTop,htmlBoldItalicUnderline
  143. start=/<em\>/ end=+</em>+me=e-5 contained contains=@htmlTop,htmlBoldItalicUnderline
  144. htmlBold xxx start=/<b\>/ end=+</b>+me=e-4 contained contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
  145. start=/<strong\>/ end=+</strong>+me=e-9 contained contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
  146. htmlBoldUnderlineItalic xxx start=/<i\>/ end=+</i>+me=e-4 contained contains=@htmlTop
  147. start=/<em\>/ end=+</em>+me=e-5 contained contains=@htmlTop
  148. htmlBoldItalicUnderline xxx start=/<u\>/ end=+</u>+me=e-4 contained contains=@htmlTop,htmlBoldUnderlineItalic
  149. links to htmlBoldUnderlineItalic
  150. htmlUnderlineBold xxx start=/<b\>/ end=+</b>+me=e-4 contained contains=@htmlTop,htmlUnderlineBoldItalic
  151. start=/<strong\>/ end=+</strong>+me=e-9 contained contains=@htmlTop,htmlUnderlineBoldItalic
  152. links to htmlBoldUnderline
  153. htmlUnderlineItalic xxx start=/<i\>/ end=+</i>+me=e-4 contained contains=@htmlTop,htmlUnderlineItalicBold
  154. start=/<em\>/ end=+</em>+me=e-5 contained contains=@htmlTop,htmlUnderlineItalicBold
  155. htmlUnderline xxx start=/<u\>/ end=+</u>+me=e-4 contained contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
  156. htmlUnderlineBoldItalic xxx start=/<i\>/ end=+</i>+me=e-4 contained contains=@htmlTop
  157. start=/<em\>/ end=+</em>+me=e-5 contained contains=@htmlTop
  158. links to htmlBoldUnderlineItalic
  159. htmlUnderlineItalicBold xxx start=/<b\>/ end=+</b>+me=e-4 contained contains=@htmlTop
  160. start=/<strong\>/ end=+</strong>+me=e-9 contained contains=@htmlTop
  161. links to htmlBoldUnderlineItalic
  162. htmlItalicBold xxx start=/<b\>/ end=+</b>+me=e-4 contained contains=@htmlTop,htmlItalicBoldUnderline
  163. start=/<strong\>/ end=+</strong>+me=e-9 contained contains=@htmlTop,htmlItalicBoldUnderline
  164. links to htmlBoldItalic
  165. htmlItalicUnderline xxx start=/<u\>/ end=+</u>+me=e-4 contained contains=@htmlTop,htmlItalicUnderlineBold
  166. links to htmlUnderlineItalic
  167. htmlItalic xxx start=/<i\>/ end=+</i>+me=e-4 contained contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
  168. start=/<em\>/ end=+</em>+me=e-5 contained contains=@htmlTop
  169. htmlItalicBoldUnderline xxx start=/<u\>/ end=+</u>+me=e-4 contained contains=@htmlTop
  170. links to htmlBoldUnderlineItalic
  171. htmlItalicUnderlineBold xxx start=/<b\>/ end=+</b>+me=e-4 contained contains=@htmlTop
  172. start=/<strong\>/ end=+</strong>+me=e-9 contained contains=@htmlTop
  173. links to htmlBoldUnderlineItalic
  174. htmlLeadingSpace xxx match /^\s\+/ contained
  175. links to None
  176. htmlH1 xxx start=/<h1\>/ end=+</h1>+me=e-5 contained contains=@htmlTop
  177. links to Title
  178. htmlH2 xxx start=/<h2\>/ end=+</h2>+me=e-5 contained contains=@htmlTop
  179. links to htmlH1
  180. htmlH3 xxx start=/<h3\>/ end=+</h3>+me=e-5 contained contains=@htmlTop
  181. links to htmlH2
  182. htmlH4 xxx start=/<h4\>/ end=+</h4>+me=e-5 contained contains=@htmlTop
  183. links to htmlH3
  184. htmlH5 xxx start=/<h5\>/ end=+</h5>+me=e-5 contained contains=@htmlTop
  185. links to htmlH4
  186. htmlH6 xxx start=/<h6\>/ end=+</h6>+me=e-5 contained contains=@htmlTop
  187. links to htmlH5
  188. htmlTitle xxx start=/<title\>/ end=+</title>+me=e-8 contained contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
  189. links to Title
  190. htmlHead xxx start=/<head\>/ end=/<h[1-6]\>/me=e-3 end=/<body\>/me=e-5 end=+</head>+me=e-7 contained contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
  191. links to PreProc
  192. javaCommentTitle xxx matchgroup=javaDocComment start=+/\*\*+ matchgroup=javaCommentTitle end=+\*/+me=s-1,he=s-1 end=/[^{]@/me=s-2,he=s-1 end=/\.[ \t\r<&]/me=e-1 end=/\.$/ contained keepend contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag
  193. links to SpecialComment
  194. javaDocTags xxx start=/{@\(code\|link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)/ end=/}/ contained
  195. match /@\(param\|exception\|throws\|since\)\s\+\S\+/ contained contains=javaDocParam
  196. match /@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>/ contained
  197. links to Special
  198. javaDocSeeTag xxx matchgroup=javaDocTags start=/@see\s\+/ matchgroup=NONE end=/\_./re=e-1 contained contains=javaDocSeeTagParam
  199. javaDocComment xxx start=+/\*\*+ end=+\*/+ keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell
  200. links to Comment
  201. javaDocParam xxx match /\s\S\+/ contained
  202. links to Function
  203. javaDocSeeTagParam xxx match @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ contained extend
  204. links to Function
  205. javaSpecialError xxx match /\\./ contained
  206. links to Error
  207. javaSpecialCharError xxx match /[^']/ contained
  208. links to Error
  209. javaParenT1 xxx matchgroup=javaParen1 start=/(/ end=/)/ contained transparent contains=@javaTop,javaParenT2
  210. matchgroup=javaParen1 start=/\[/ end=/\]/ contained transparent contains=@javaTop,javaParenT2
  211. javaParenT xxx matchgroup=javaParen start=/(/ end=/)/ transparent contains=@javaTop,javaParenT1
  212. matchgroup=javaParen start=/\[/ end=/\]/ transparent contains=@javaTop,javaParenT1
  213. javaParenT2 xxx matchgroup=javaParen2 start=/(/ end=/)/ contained transparent contains=@javaTop,javaParenT
  214. matchgroup=javaParen2 start=/\[/ end=/\]/ contained transparent contains=@javaTop,javaParenT
  215. javaParenError xxx match /)/
  216. match /\]/
  217. links to javaError
  218. javaTop cluster=javaError,javaError,javaError,javaError2,javaExternal,javaConditional,javaRepeat,javaBoolean,javaConstant,javaTypedef,javaOperator,javaType,javaType,javaStatement,javaStorageClass,javaExceptions,javaAssert,javaMethodDecl,javaClassDecl,javaClassDecl,javaClassDecl,javaAnnotation,javaBranch,javaVarArg,javaScopeDecl,javaLangObject,javaLabel,javaNumber,javaCharacter,javaLabelRegion,javaUserLabel,javaSpecial,javaComment,javaLineComment,javaString,javaStringError
  219. Spell cluster=NONE
  220. javaCommentSpecial cluster=NONE
  221. javaCommentSpecial2 cluster=NONE
  222. javaHtml cluster=htmlError,htmlSpecialChar,htmlEndTag,htmlTag,htmlComment,htmlPreProc,htmlLink,htmlBold,htmlUnderline,htmlItalic,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlTitle,htmlHead
  223. htmlPreproc cluster=NONE
  224. htmlArgCluster cluster=NONE
  225. htmlTagNameCluster cluster=NONE
  226. htmlTop cluster=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
  227. htmlJavaScript cluster=@htmlPreproc
  228. htmlVbScript cluster=NONE
  229. htmlCss cluster=NONE
  230. javaClasses cluster=NONE