annotate runtime/syntax/datascript.vim @ 2875:c7d942260772 v7.3.211

updated for version 7.3.211 Problem: Compiler warning. Solution: Add type cast.
author Bram Moolenaar <bram@vim.org>
date Sun, 12 Jun 2011 21:25:00 +0200
parents 9c8d603fd4d1
children d1e4abe8342c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2467
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Datascript
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Last Change: 2010-08-01
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 "
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " DataScript is a formal language for modelling binary datatypes,
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " bitstreams or file formats. For more information, see:
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " http://datascript.berlios.de/DataScriptLanguageOverview.html
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 if version < 600
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 syntax clear
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 elseif exists("b:current_syntax")
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 finish
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 endif
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 syn keyword dsPackage import package
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 syn keyword dsType bit string
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 syn keyword dsType int8 int16 int32 int64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn keyword dsType uint8 uint16 uint32 uint64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 syn keyword dsType leint16 leint32 leint64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 syn keyword dsType leuint16 leuint32 leuint64
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 syn keyword dsEndian little big
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 syn keyword dsAlign align
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 syn keyword dsLabel case default
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 syn keyword dsConditional if condition
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 syn keyword dsCompound union choice on enum bitmask subtype
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn keyword dsKeyword function return
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn keyword dsOperator sizeof bitsizeof lengthof is sum forall in
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 syn keyword dsStorageClass const
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 syn keyword dsTodo contained TODO FIXME XXX
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syn keyword dsSql sql sql_table sql_database sql_pragma
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 syn keyword dsSql sql_integer sql_metadata sql_key
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 " dsCommentGroup allows adding matches for special things in comments.
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 syn cluster dsCommentGroup contains=dsTodo
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 syn match dsOffset display "^\s*[a-zA-Z_:\.][a-zA-Z0-9_:\.]*\s*:"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn match dsNumber display "\<\d\+\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 syn match dsNumberHex display "\<0[xX]\x\+\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 syn match dsNumberBin display "\<[01]\+[bB]\>" contains=dsBinaryB
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn match dsBinaryB display contained "[bB]\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn match dsOctal display "\<0\o\+\>" contains=dsOctalZero
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn match dsOctalZero display contained "\<0"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn match dsOctalError display "\<0\o*[89]\d*\>"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 syn match dsCommentError display "\*/"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 syn match dsCommentStartError display "/\*"me=e-1 contained
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 syn region dsCommentL
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 \ start="//" skip="\\$" end="$" keepend
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 \ contains=@dsCommentGroup,@Spell
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn region dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 \ matchgroup=dsCommentStart start="/\*" end="\*/"
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 \ contains=@dsCommentGroup,dsCommentStartError,@Spell extend
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 syn region dsString
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 " Define the default highlighting.
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 hi def link dsType Type
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 hi def link dsEndian StorageClass
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 hi def link dsStorageClass StorageClass
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 hi def link dsAlign Label
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 hi def link dsLabel Label
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 hi def link dsOffset Label
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 hi def link dsSql PreProc
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 hi def link dsCompound Structure
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 hi def link dsConditional Conditional
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 hi def link dsKeyword Statement
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 hi def link dsString String
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 hi def link dsNumber Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 hi def link dsNumberBin Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 hi def link dsBinaryB Special
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 hi def link dsOctal Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 hi def link dsOctalZero Special
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 hi def link dsOctalError Error
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 hi def link dsNumberHex Number
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 hi def link dsTodo Todo
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 hi def link dsOperator Operator
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 hi def link dsPackage Include
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 hi def link dsCommentError Error
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 hi def link dsCommentStartError Error
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 hi def link dsCommentStart dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 hi def link dsCommentL dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 hi def link cCommentL dsComment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 hi def link dsComment Comment
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89
9c8d603fd4d1 Add Datascript syntax file. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 let b:current_syntax = "datascript"