annotate runtime/syntax/asn.vim @ 9629:ea0c9f0a8519

Added tag v7.4.2091 for changeset fefd0551aa9df391596bd60efac4e965c8984fa0
author Christian Brabandt <cb@256bit.org>
date Fri, 22 Jul 2016 22:15:06 +0200
parents aa51675adf7e
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: ASN.1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.fleiner.com/vim/syntax/asn.vim
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Last Change: 2012 Oct 05
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 let s:cpo_save = &cpo
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 set cpo&vim
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
17
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " keyword definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword asnExternal DEFINITIONS BEGIN END IMPORTS EXPORTS FROM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match asnExternal "\<IMPLICIT\s\+TAGS\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match asnExternal "\<EXPLICIT\s\+TAGS\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword asnFieldOption DEFAULT OPTIONAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword asnTagModifier IMPLICIT EXPLICIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword asnTypeInfo ABSENT PRESENT SIZE UNIVERSAL APPLICATION PRIVATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword asnBoolValue TRUE FALSE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword asnNumber MIN MAX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match asnNumber "\<PLUS-INFINITY\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match asnNumber "\<MINUS-INFINITY\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword asnType INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword asnType BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword asnType ANY DEFINED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match asnType "\.\.\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match asnType "OBJECT\s\+IDENTIFIER"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match asnType "TYPE-IDENTIFIER"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword asnType UTF8String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword asnStructure CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Strings and constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match asnSpecial contained "\\\d\d\d\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region asnString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=asnSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match asnCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match asnSpecialCharacter "'\\.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match asnNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match asnLineComment "--.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match asnLineComment "--.*--"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match asnBraces "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn sync ccomment asnComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 if version >= 508 || !exists("did_asn_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 let did_asn_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink asnDefinition Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink asnBraces Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink asnStructure Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink asnBoolValue Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink asnSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink asnString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink asnCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink asnSpecialCharacter asnSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink asnNumber asnValue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink asnComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink asnLineComment asnComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink asnType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink asnTypeInfo PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink asnValue Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink asnExternal Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink asnTagModifier Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink asnFieldOption Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
82 let &cpo = s:cpo_save
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
83 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 let b:current_syntax = "asn"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " vim: ts=8