home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / asn.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  2.7 KB  |  69 lines

  1. " Vim syntax file
  2. " Language:    ASN.1
  3. " Maintainer:    Claudio Fleiner <claudio@fleiner.com>
  4. " URL:        http://www.fleiner.com/vim/syntax/asn.vim
  5. " Last change:    1998 Mar 7
  6.  
  7. " Remove any old syntax stuff hanging around
  8. syn clear
  9.  
  10. " keyword definitions
  11. syn keyword asnExternal       DEFINITIONS BEGIN END IMPORTS EXPORTS FROM
  12. syn match   asnExternal       "\<IMPLICIT\s\+TAGS\>"
  13. syn match   asnExternal       "\<EXPLICIT\s\+TAGS\>"
  14. syn keyword asnFieldOption    DEFAULT OPTIONAL
  15. syn keyword asnTagModifier    IMPLICIT EXPLICIT
  16. syn keyword asnTypeInfo       ABSENT PRESENT SIZE UNIVERSAL APPLICATION PRIVATE
  17. syn keyword asnBoolValue      TRUE FALSE
  18. syn keyword asnNumber         MIN MAX
  19. syn match   asnNumber         "\<PLUS-INFINITY\>"
  20. syn match   asnNumber         "\<MINUS-INFINITY\>"
  21. syn keyword asnType           INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV
  22. syn keyword asnType           BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString
  23. syn keyword asnType           ANY DEFINED
  24. syn match   asnType           "\.\.\."
  25. syn match   asnType           "OBJECT\s\+IDENTIFIER"
  26. syn match   asnType           "TYPE-IDENTIFIER"
  27. syn keyword asnType           UTF8String
  28. syn keyword asnStructure      CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS
  29.  
  30. " Strings and constants
  31. syn match   asnSpecial           contained "\\\d\d\d\|\\."
  32. syn region  asnString            start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=asnSpecial
  33. syn match   asnCharacter         "'[^\\]'"
  34. syn match   asnSpecialCharacter  "'\\.'"
  35. syn match   asnNumber            "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
  36. syn match   asnLineComment       "--.*"
  37. syn match   asnLineComment       "--.*--"
  38.  
  39. syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType
  40. syn match asnBraces     "[{}]"
  41.  
  42. syn sync ccomment asnComment
  43.  
  44. if !exists("did_asn_syntax_inits")
  45.   let did_asn_syntax_inits = 1
  46.   " The default methods for highlighting.  Can be overridden later
  47.   hi link asnDefinition       Function
  48.   hi link asnBraces           Function
  49.   hi link asnStructure        Statement
  50.   hi link asnBoolValue        Boolean
  51.   hi link asnSpecial          Special
  52.   hi link asnString           String
  53.   hi link asnCharacter        Character
  54.   hi link asnSpecialCharacter asnSpecial
  55.   hi link asnNumber           asnValue
  56.   hi link asnComment          Comment
  57.   hi link asnLineComment      asnComment
  58.   hi link asnType             Type
  59.   hi link asnTypeInfo         PreProc
  60.   hi link asnValue            Number
  61.   hi link asnExternal         Include
  62.   hi link asnTagModifier      Function
  63.   hi link asnFieldOption      Type
  64. endif
  65.  
  66. let b:current_syntax = "asn"
  67.  
  68. " vim: ts=8
  69.